(CommandList
  children: [
    (C {(set)} {(-o)} {(errexit)})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name BAZEL_WRKDIR))} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name BAZEL_WRKDIR) (/tmp))})
            (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name BAZEL_WRKDIR) (/user_root))})
            (C {(Lit_Other ":")} 
              {
                (BracedVarSub
                  token: <VSub_Name TMPDIR>
                  suffix_op: 
                    (StringUnary
                      op_id: VTest_ColonEquals
                      arg_word: {(${ VSub_Name BAZEL_WRKDIR) (Lit_Slash /) (tmp)}
                    )
                  spids: [107 115]
                )
              }
            )
            (C {(export)} {(TMPDIR)})
            (C {(Lit_Other ":")} 
              {
                (BracedVarSub
                  token: <VSub_Name BAZEL_DIR_STARTUP_OPTIONS>
                  suffix_op: 
                    (StringUnary
                      op_id: VTest_ColonEquals
                      arg_word: {(DQ ("--output_user_root=") (${ VSub_Name BAZEL_WRKDIR) (/user_root))}
                    )
                  spids: [125 135]
                )
              }
            )
          ]
          spids: [-1 78]
        )
      ]
      spids: [-1 137]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:DIR)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (AndOr
                        children: [
                          (C {(cd)} 
                            {
                              (DQ 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (C {(dirname)} 
                                          {
                                            (DQ 
                                              (BracedVarSub
                                                token: <VSub_Name BASH_SOURCE>
                                                bracket_op: 
                                                  (ArrayIndex
                                                    expr: (ArithWord w:{(Lit_Digits 0)})
                                                  )
                                                spids: [153 158]
                                              )
                                            )
                                          }
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub "$(">
                                  spids: [149 160]
                                )
                              )
                            }
                          )
                          (C {(pwd)})
                        ]
                        op_id: Op_DAmp
                      )
                    ]
                  )
                left_token: <Left_CommandSub "$(">
                spids: [145 166]
              )
            }
          spids: [144]
        )
      ]
      spids: [144]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:WORKSPACE_DIR)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (C {(dirname)} 
                          {
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [(C {(dirname)} {(${ VSub_Name DIR)})]
                                )
                              left_token: <Left_CommandSub "$(">
                              spids: [173 179]
                            )
                          }
                        )
                      ]
                    )
                  left_token: <Left_CommandSub "$(">
                  spids: [170 180]
                )
              )
            }
          spids: [168]
        )
      ]
      spids: [168]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:JAVA_VERSION)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Name JAVA_VERSION>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(1.8)})
                spids: [185 189]
              )
            }
          spids: [184]
        )
      ]
      spids: [184]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:BAZELRC)
          op: Equal
          rhs: 
            {
              (BracedVarSub
                token: <VSub_Name BAZELRC>
                suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (/dev/null))})
                spids: [192 198]
              )
            }
          spids: [191]
        )
      ]
      spids: [191]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:PLATFORM)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [(C {(uname)} {(-s)}) (C {(tr)} {(SQ <A-Z>)} {(SQ <a-z>)})]
                          negated: False
                        )
                      ]
                    )
                  left_token: <Left_CommandSub "$(">
                  spids: [202 218]
                )
              )
            }
          spids: [200]
        )
      ]
      spids: [200]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:MACHINE_TYPE)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: (CommandList children:[(C {(uname)} {(-m)})])
                  left_token: <Left_CommandSub "$(">
                  spids: [224 228]
                )
              )
            }
          spids: [222]
        )
      ]
      spids: [222]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:MACHINE_IS_64BIT) op:Equal rhs:{(SQ <no>)} spids:[231])]
      spids: [231]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other "[")} {(DQ (${ VSub_Name MACHINE_TYPE))} {(Lit_Other "=")} {(SQ <amd64>)} 
                  {(-o)} {(DQ (${ VSub_Name MACHINE_TYPE))} {(Lit_Other "=")} {(SQ <x86_64>)} {(-o)} 
                  {(DQ (${ VSub_Name MACHINE_TYPE))} {(Lit_Other "=")} {(SQ <s390x>)} {(Lit_Other "]")}
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:MACHINE_IS_64BIT)
                  op: Equal
                  rhs: {(SQ <yes>)}
                  spids: [286]
                )
              ]
              spids: [286]
            )
          ]
          spids: [-1 283]
        )
      ]
      spids: [-1 291]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:MACHINE_IS_ARM) op:Equal rhs:{(SQ <no>)} spids:[294])]
      spids: [294]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other "[")} {(DQ (${ VSub_Name MACHINE_TYPE))} {(Lit_Other "=")} {(SQ <arm>)} 
                  {(-o)} {(DQ (${ VSub_Name MACHINE_TYPE))} {(Lit_Other "=")} {(SQ <armv7l>)} {(-o)} 
                  {(DQ (${ VSub_Name MACHINE_TYPE))} {(Lit_Other "=")} {(SQ <aarch64>)} {(Lit_Other "]")}
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:MACHINE_IS_ARM)
                  op: Equal
                  rhs: {(SQ <yes>)}
                  spids: [349]
                )
              ]
              spids: [349]
            )
          ]
          spids: [-1 346]
        )
      ]
      spids: [-1 354]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:MACHINE_IS_Z) op:Equal rhs:{(SQ <no>)} spids:[357])]
      spids: [357]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other "[")} {(DQ (${ VSub_Name MACHINE_TYPE))} {(Lit_Other "=")} {(SQ <s390x>)} 
                  {(Lit_Other "]")}
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:MACHINE_IS_Z)
                  op: Equal
                  rhs: {(SQ <yes>)}
                  spids: [384]
                )
              ]
              spids: [384]
            )
          ]
          spids: [-1 381]
        )
      ]
      spids: [-1 389]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:EXE_EXT) op:Equal rhs:{(DQ )} spids:[395])]
      spids: [395]
    )
    (Case
      to_match: {(DQ (${ VSub_Name PLATFORM))}
      arms: [
        (case_arm
          pat_list: [{(msys) (Lit_Other "*")} {(mingw) (Lit_Other "*")}]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:EXE_EXT) op:Equal rhs:{(DQ (.exe))} spids:[417])]
              spids: [417]
            )
          ]
          spids: [409 414 -1 422]
        )
      ]
      spids: [399 407 422]
    )
    (Case
      to_match: {(DQ (${ VSub_Name PLATFORM))}
      arms: [
        (case_arm
          pat_list: [{(msys) (Lit_Other "*")} {(mingw) (Lit_Other "*")}]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:default_tmp)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name TMP>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: 
                              {
                                (CommandSubPart
                                  command_list: (CommandList children:[(C {(cygpath)} {(-W)})])
                                  left_token: <Left_CommandSub "$(">
                                  spids: [450 454]
                                ) (Lit_Slash /) (Temp)
                              }
                          )
                        spids: [447 457]
                      )
                    }
                  spids: [446]
                )
              ]
              spids: [446]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TMPDIR)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(cygpath)} {(-ml)} 
                                {
                                  (DQ 
                                    (BracedVarSub
                                      token: <VSub_Name TMPDIR>
                                      suffix_op: 
                                        (StringUnary
                                          op_id: VTest_ColonHyphen
                                          arg_word: {($ VSub_Name "$default_tmp")}
                                        )
                                      spids: [467 471]
                                    )
                                  )
                                }
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [461 473]
                      )
                    }
                  spids: [460]
                )
              ]
              spids: [460]
            )
          ]
          spids: [438 443 -1 475]
        )
      ]
      spids: [428 436 475]
    )
    (C {(Lit_Other ":")} 
      {
        (BracedVarSub
          token: <VSub_Name VERBOSE>
          suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(yes)})
          spids: [490 494]
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:ATEXIT_HANDLERS) op:Equal rhs:{(SQ )} spids:[500])]
      spids: [500]
    )
    (FuncDef
      name: atexit
      body: 
        (BraceGroup
          children: [
            (Sentence
              child: 
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:handler)
                      op: Equal
                      rhs: {(DQ (${ VSub_Number 1))}
                      spids: [526]
                    )
                  ]
                  spids: [524]
                )
              terminator: <Op_Semi ";">
            )
            (C {(shift)})
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name ATEXIT_HANDLERS))} {(Lit_Other "]")})
                (C {(trap)} {(SQ <"run_atexit_handlers $?">)} {(EXIT)})
              ]
              op_id: Op_DPipe
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ATEXIT_HANDLERS)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name ATEXIT_HANDLERS) (" ") (${ VSub_Name handler))}
                  spids: [561]
                )
              ]
              spids: [561]
            )
          ]
          spids: [521]
        )
      spids: [515 520]
    )
    (FuncDef
      name: run_atexit_handlers
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:exit_code)
                  op: Equal
                  rhs: {(DQ ($ VSub_QMark "$?"))}
                  spids: [601]
                )
              ]
              spids: [599]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:failed) op:Equal rhs:{(no)} spids:[610])]
              spids: [608]
            )
            (ForEach
              iter_name: handler
              iter_words: [{(${ VSub_Name ATEXIT_HANDLERS)}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      children: [
                        (C {(eval)} {(DQ (${ VSub_Name handler))})
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:failed)
                              op: Equal
                              rhs: {(yes)}
                              spids: [638]
                            )
                          ]
                          spids: [638]
                        )
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [625 642]
                )
              spids: [619 623]
            )
            (C {(trap)} {(-)} {(EXIT)})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(${ VSub_Name exit_code)} {(-ne)} {(0)} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(exit)} {(${ VSub_Name exit_code)})]
                  spids: [-1 671]
                )
              ]
              else_action: [
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (C {(Lit_Other "[")} {(DQ (${ VSub_Name failed))} {(Lit_Other "=")} {(yes)} 
                              {(Lit_Other "]")}
                            )
                          terminator: <Op_Semi ";">
                        )
                      ]
                      action: [
                        (SimpleCommand
                          words: [
                            {(echo)}
                            {(DQ ("Program tried to exit successfully but atexit routines failed"))}
                          ]
                          redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[710])]
                        )
                        (C {(exit)} {(1)})
                      ]
                      spids: [-1 701]
                    )
                  ]
                  else_action: [(C {(exit)} {(0)})]
                  spids: [719 727]
                )
              ]
              spids: [681 730]
            )
          ]
          spids: [596]
        )
      spids: [590 595]
    )
    (FuncDef
      name: tempdir
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:tmp)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name TMPDIR>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(Lit_Slash /) (tmp)})
                        spids: [747 752]
                      )
                    }
                  spids: [746]
                )
              ]
              spids: [744]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:DIR)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(mktemp)} {(-d)} 
                                  {
                                    (BracedVarSub
                                      token: <VSub_Name tmp>
                                      suffix_op: 
                                        (StringUnary
                                          op_id: VOp1_DPercent
                                          arg_word: {(Lit_Slash /)}
                                        )
                                      spids: [764 768]
                                    ) (/bazel_XXXXXXXX)
                                  }
                                )
                              ]
                            )
                          left_token: <Left_CommandSub "$(">
                          spids: [759 770]
                        )
                      )
                    }
                  spids: [757]
                )
              ]
              spids: [755]
            )
            (C {(mkdir)} {(-p)} {(DQ (${ VSub_Name DIR))})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:DIRBASE)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(basename)} {(DQ (${ VSub_Name DIR))})]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [788 796]
                      )
                    }
                  spids: [787]
                )
              ]
              spids: [785]
            )
            (C {(eval)} 
              {
                (DQ (cleanup_tempdir_) (${ VSub_Name DIRBASE) ("() { rm -rf '") (${ VSub_Name DIR) 
                  ("'; }")
                )
              }
            )
            (C {(atexit)} {(cleanup_tempdir_) (${ VSub_Name DIRBASE)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:NEW_TMPDIR)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name DIR))}
                  spids: [822]
                )
              ]
              spids: [822]
            )
          ]
          spids: [741]
        )
      spids: [735 740]
    )
    (C {(tempdir)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:OUTPUT_DIR)
          op: Equal
          rhs: {(${ VSub_Name NEW_TMPDIR)}
          spids: [833]
        )
      ]
      spids: [833]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:phasefile)
          op: Equal
          rhs: {(${ VSub_Name OUTPUT_DIR) (/phase)}
          spids: [838]
        )
      ]
      spids: [838]
    )
    (FuncDef
      name: cleanup_phasefile
      body: 
        (BraceGroup
          children: [
            (Sentence
              child: 
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (C {(Lit_Other "[")} {(-f)} {(DQ (${ VSub_Name phasefile))} {(Lit_Other "]")})
                          terminator: <Op_Semi ";">
                        )
                      ]
                      action: [
                        (Sentence
                          child: 
                            (SimpleCommand
                              words: [{(echo)}]
                              redirects: [
                                (Redir
                                  op_id: Redir_GreatAnd
                                  fd: 1
                                  arg_word: {(2)}
                                  spids: [873]
                                )
                              ]
                            )
                          terminator: <Op_Semi ";">
                        )
                        (Sentence
                          child: 
                            (SimpleCommand
                              words: [{(cat)} {(DQ (${ VSub_Name phasefile))}]
                              redirects: [
                                (Redir
                                  op_id: Redir_GreatAnd
                                  fd: 1
                                  arg_word: {(2)}
                                  spids: [886]
                                )
                              ]
                            )
                          terminator: <Op_Semi ";">
                        )
                      ]
                      spids: [-1 868]
                    )
                  ]
                  spids: [-1 891]
                )
              terminator: <Op_Semi ";">
            )
          ]
          spids: [850]
        )
      spids: [844 849]
    )
    (C {(atexit)} {(cleanup_phasefile)})
    (FuncDef
      name: run
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(DQ (${ VSub_Name VERBOSE))} {(Lit_Other "=")} {(yes)} 
                          {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ (${ VSub_At "@"))})
                    (AndOr
                      children: [(C {(DQ (${ VSub_At "@"))}) (C {(exit)} {($ VSub_QMark "$?")})]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [-1 946]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:errfile)
                      op: Equal
                      rhs: {(DQ (${ VSub_Name OUTPUT_DIR) (/errors))}
                      spids: [976]
                    )
                  ]
                  spids: [974]
                )
                (SimpleCommand
                  words: [{(echo)} {(DQ (${ VSub_At "@"))}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(DQ (${ VSub_Name errfile))}
                      spids: [994]
                    )
                  ]
                )
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: 
                            (Pipeline
                              children: [
                                (SimpleCommand
                                  words: [{(DQ (${ VSub_At "@"))}]
                                  redirects: [
                                    (Redir
                                      op_id: Redir_DGreat
                                      fd: -1
                                      arg_word: {(DQ (${ VSub_Name errfile))}
                                      spids: [1012]
                                    )
                                    (Redir
                                      op_id: Redir_GreatAnd
                                      fd: 2
                                      arg_word: {(1)}
                                      spids: [1019]
                                    )
                                  ]
                                )
                              ]
                              negated: True
                            )
                          terminator: <Op_Semi ";">
                        )
                      ]
                      action: [
                        (Assignment
                          keyword: Assign_Local
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:exitcode)
                              op: Equal
                              rhs: {($ VSub_QMark "$?")}
                              spids: [1028]
                            )
                          ]
                          spids: [1026]
                        )
                        (SimpleCommand
                          words: [{(cat)} {(DQ (${ VSub_Name errfile))}]
                          redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[1040])]
                        )
                        (C {(exit)} {($ VSub_Name "$exitcode")})
                      ]
                      spids: [-1 1023]
                    )
                  ]
                  spids: [-1 1049]
                )
              ]
              spids: [971 1052]
            )
          ]
          spids: [926]
        )
      spids: [920 925]
    )
    (FuncDef
      name: fail
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:exitCode)
                  op: Equal
                  rhs: {($ VSub_QMark "$?")}
                  spids: [1068]
                )
              ]
              spids: [1066]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_GlobEqual
                              left: {(DQ ($ VSub_Name "$exitCode"))}
                              right: {(DQ (0))}
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:exitCode)
                          op: Equal
                          rhs: {(1)}
                          spids: [1092]
                        )
                      ]
                      spids: [1092]
                    )
                  ]
                  spids: [-1 1089]
                )
              ]
              spids: [-1 1096]
            )
            (SimpleCommand
              words: [{(echo)}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1101])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("ERROR: ") ($ VSub_At "$@"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1112])]
            )
            (C {(exit)} {($ VSub_Name "$exitCode")})
          ]
          spids: [1063]
        )
      spids: [1057 1062]
    )
    (FuncDef
      name: display
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: (BoolUnary op_id:BoolUnary_z child:{(DQ (${ VSub_Name QUIETMODE))})
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [{(echo)} {(-e)} {(DQ ($ VSub_At "$@"))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1158])]
                    )
                  ]
                  spids: [-1 1147]
                )
              ]
              spids: [-1 1162]
            )
          ]
          spids: [1129]
        )
      spids: [1123 1128]
    )
    (FuncDef
      name: log
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(-n)} {(DQ (.))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1184])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Number "$1"))}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: -1
                  arg_word: {(${ VSub_Name phasefile)}
                  spids: [1194]
                )
              ]
            )
          ]
          spids: [1173]
        )
      spids: [1167 1172]
    )
    (FuncDef
      name: clear_log
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[1213])]
            )
            (C {(rm)} {(-f)} {(${ VSub_Name phasefile)})
          ]
          spids: [1208]
        )
      spids: [1202 1207]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:LEAVES)
          op: Equal
          rhs: 
            {
              (DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\x">) (F0) 
                (EscapedLiteralPart token:<Lit_EscapedChar "\\x">) (9F) (EscapedLiteralPart token:<Lit_EscapedChar "\\x">) (8D) 
                (EscapedLiteralPart token:<Lit_EscapedChar "\\x">) (83)
              )
            }
          spids: [1228]
        )
      ]
      spids: [1228]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:INFO)
          op: Equal
          rhs: 
            {
              (DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\0">) ("33[32mINFO") 
                (EscapedLiteralPart token:<Lit_EscapedChar "\\0">) ("33[0m:")
              )
            }
          spids: [1240]
        )
      ]
      spids: [1240]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:WARNING)
          op: Equal
          rhs: 
            {
              (DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\0">) ("33[31mWARN") 
                (EscapedLiteralPart token:<Lit_EscapedChar "\\0">) ("33[0m:")
              )
            }
          spids: [1248]
        )
      ]
      spids: [1248]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:first_step) op:Equal rhs:{(1)} spids:[1257])]
      spids: [1257]
    )
    (FuncDef
      name: new_step
      body: 
        (BraceGroup
          children: [
            (C {(rm)} {(-f)} {(${ VSub_Name phasefile)})
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:new_line) op:Equal rhs:{(SQ )} spids:[1280])]
              spids: [1278]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name first_step))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:first_step)
                          op: Equal
                          rhs: {(SQ )}
                          spids: [1301]
                        )
                      ]
                      spids: [1301]
                    )
                  ]
                  spids: [-1 1298]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:new_line)
                      op: Equal
                      rhs: {(DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\n">))}
                      spids: [1307]
                    )
                  ]
                  spids: [1307]
                )
              ]
              spids: [1304 1313]
            )
            (C {(display)} {(-n)} 
              {(DQ ($ VSub_Name "$new_line") ($ VSub_Name "$LEAVES") ("  ") ($ VSub_Number "$1"))}
            )
          ]
          spids: [1266]
        )
      spids: [1260 1265]
    )
    (FuncDef
      name: git_sha1
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (AndOr
                          children: [
                            (C {(Lit_Other "[")} {(-x)} 
                              {
                                (DQ 
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [
                                          (AndOr
                                            children: [(C {(which)} {(git)}) (C {(true)})]
                                            op_id: Op_DPipe
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub "$(">
                                    spids: [1346 1354]
                                  )
                                )
                              } {(Lit_Other "]")}
                            )
                            (C {(Lit_Other "[")} {(-d)} {(.git)} {(Lit_Other "]")})
                          ]
                          op_id: Op_DAmp
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (AndOr
                      children: [
                        (SimpleCommand
                          words: [{(git)} {(rev-parse)} {(--short)} {(HEAD)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 2
                              arg_word: {(/dev/null)}
                              spids: [1381]
                            )
                          ]
                        )
                        (C {(true)})
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [-1 1370]
                )
              ]
              spids: [-1 1389]
            )
          ]
          spids: [1336]
        )
      spids: [1330 1335]
    )
    (FuncDef
      name: git_date
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (AndOr
                          children: [
                            (C {(Lit_Other "[")} {(-x)} 
                              {
                                (DQ 
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [
                                          (AndOr
                                            children: [(C {(which)} {(git)}) (C {(true)})]
                                            op_id: Op_DPipe
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub "$(">
                                    spids: [1410 1418]
                                  )
                                )
                              } {(Lit_Other "]")}
                            )
                            (C {(Lit_Other "[")} {(-d)} {(.git)} {(Lit_Other "]")})
                          ]
                          op_id: Op_DAmp
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (AndOr
                      children: [
                        (Pipeline
                          children: [
                            (C {(git)} {(log)} {(-1)} {(--pretty) (Lit_Other "=") (Lit_Other "%") (ai)})
                            (C {(cut)} {(-d)} {(DQ (" "))} {(-f)} {(1)})
                          ]
                          negated: False
                        )
                        (C {(true)})
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [-1 1434]
                )
              ]
              spids: [-1 1467]
            )
          ]
          spids: [1400]
        )
      spids: [1394 1399]
    )
    (FuncDef
      name: get_last_version
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(Lit_Other "[")} {(-f)} {(DQ (CHANGELOG.md))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_Local
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:version)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (Pipeline
                                          children: [
                                            (C {(fgrep)} {(-m)} {(1)} {(SQ <"## Release">)} 
                                              {(CHANGELOG.md)}
                                            )
                                            (C {(sed)} {(-E)} {(SQ <"s|.*Release (.*) \\(.*\\)|\\1|">)})
                                          ]
                                          negated: False
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub "$(">
                                  spids: [1507 1531]
                                )
                              )
                            }
                          spids: [1505]
                        )
                      ]
                      spids: [1503]
                    )
                  ]
                  spids: [-1 1500]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_Local
                  pairs: [(assign_pair lhs:(LhsName name:version) op:Equal rhs:{(DQ )} spids:[1540])]
                  spids: [1538]
                )
              ]
              spids: [1535 1545]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:date)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: (CommandList children:[(C {(git_date)})])
                          left_token: <Left_CommandSub "$(">
                          spids: [1553 1555]
                        )
                      )
                    }
                  spids: [1551]
                )
              ]
              spids: [1549]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-z)} 
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name version>
                                suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                                spids: [1566 1569]
                              )
                            )
                          } {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:version)
                          op: Equal
                          rhs: {(DQ (unknown))}
                          spids: [1578]
                        )
                      ]
                      spids: [1578]
                    )
                  ]
                  spids: [-1 1575]
                )
              ]
              spids: [-1 1584]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-n)} 
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name date>
                                suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                                spids: [1594 1597]
                              )
                            )
                          } {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:date)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (C {(date)} 
                                          {(Lit_Other "+") (Lit_Other "%") (Y-) (Lit_Other "%") (m-) 
                                            (Lit_Other "%") (d)
                                          }
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub "$(">
                                  spids: [1608 1618]
                                )
                              )
                            }
                          spids: [1606]
                        )
                      ]
                      spids: [1606]
                    )
                  ]
                  spids: [-1 1603]
                )
              ]
              spids: [-1 1622]
            )
            (C {(echo)} {(DQ (${ VSub_Name version) (-) (${ VSub_Name date))})
          ]
          spids: [1484]
        )
      spids: [1478 1483]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_GlobDEqual
                      left: {(${ VSub_Name PLATFORM)}
                      right: {(DQ (darwin))}
                    )
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (FuncDef
              name: md5_file
              body: 
                (BraceGroup
                  children: [
                    (C {(echo)} 
                      {
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (Pipeline
                                  children: [(C {(cat)} {($ VSub_Number "$1")}) (C {(md5)})]
                                  negated: False
                                )
                              ]
                            )
                          left_token: <Left_CommandSub "$(">
                          spids: [1671 1679]
                        )
                      } {($ VSub_Number "$1")}
                    )
                  ]
                  spids: [1666]
                )
              spids: [1660 1665]
            )
          ]
          spids: [-1 1657]
        )
      ]
      else_action: [
        (FuncDef
          name: md5_file
          body: (BraceGroup children:[(C {(md5sum)} {($ VSub_Number "$1")})] spids:[1695])
          spids: [1689 1694]
        )
      ]
      spids: [1686 1705]
    )
    (FuncDef
      name: get_java_version
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (C {(test)} {(-z)} {(DQ ($ VSub_Name "$JAVA_HOME"))})
                (C {(fail)} 
                  {
                    (DQ ("JDK not found, please set ") 
                      (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) (JAVA_HOME.)
                    )
                  }
                )
              ]
              op_id: Op_DAmp
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:JAVAC)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name JAVA_HOME) (/bin/javac))}
                  spids: [1745]
                )
              ]
              spids: [1745]
            )
            (AndOr
              children: [
                (DBracket
                  expr: (BoolUnary op_id:BoolUnary_x child:{(DQ (${ VSub_Name JAVAC))})
                )
                (C {(fail)} 
                  {
                    (DQ ("JAVA_HOME (") ($ VSub_Name "$JAVA_HOME") 
                      (") is not a path to a working JDK.")
                    )
                  }
                )
              ]
              op_id: Op_DPipe
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:JAVAC_VERSION)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (SimpleCommand
                                words: [{(DQ (${ VSub_Name JAVAC))} {(-version)}]
                                redirects: [
                                  (Redir
                                    op_id: Redir_GreatAnd
                                    fd: 2
                                    arg_word: {(1)}
                                    spids: [1790]
                                  )
                                ]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [1781 1792]
                      )
                    }
                  spids: [1780]
                )
              ]
              spids: [1780]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (BoolBinary
                              op_id: BoolBinary_EqualTilde
                              left: {(DQ ($ VSub_Name "$JAVAC_VERSION"))}
                              right: 
                                {(javac) (EscapedLiteralPart token:<Lit_EscapedChar "\\ ">) ("(") (1) 
                                  (EscapedLiteralPart
                                    token: <Lit_EscapedChar "\\.">
                                  ) ("(") (Lit_Other "[") (789) (Lit_Other "]") ("|") (Lit_Other "[") (1-9) (Lit_Other "]") (Lit_Other "[") (0-9) 
                                  (Lit_Other "]") (")") (")") (.) (Lit_Other "*") (Lit_Other "$")
                                }
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:JAVAC_VERSION)
                          op: Equal
                          rhs: 
                            {
                              (BracedVarSub
                                token: <VSub_Name BASH_REMATCH>
                                bracket_op: (ArrayIndex expr:(ArithWord w:{(Lit_Digits 1)}))
                                spids: [1834 1839]
                              )
                            }
                          spids: [1833]
                        )
                      ]
                      spids: [1833]
                    )
                  ]
                  spids: [-1 1830]
                )
              ]
              else_action: [
                (C {(fail)} 
                  {
                    (DQ ("Cannot determine JDK version, please set ") 
                      (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) (JAVA_HOME.) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">)
                    )
                  } 
                  {
                    (DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\$">) ("JAVAC_VERSION is ") 
                      (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (${ VSub_Name JAVAC_VERSION) (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">)
                    )
                  }
                )
              ]
              spids: [1842 1869]
            )
          ]
          spids: [1723]
        )
      spids: [1717 1722]
    )
    (FuncDef
      name: get_bind_target
      body: 
        (BraceGroup
          children: [
            (C {($ VSub_Name "$BAZEL")} {(--bazelrc) (Lit_Other "=") (${ VSub_Name BAZELRC)} 
              {(--nomaster_bazelrc)} {(${ VSub_Name BAZEL_DIR_STARTUP_OPTIONS)} {(query)} 
              {(DQ ("deps(") ($ VSub_Number "$1") (", 1) - ") ($ VSub_Number "$1"))}
            )
          ]
          spids: [1883]
        )
      spids: [1877 1882]
    )
  ]
)