(CommandList
  children: [
    (C {(set)} {(-o)} {(errexit)})
    (C {(cd)} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(dirname)} {(DQ ($ VSub_Number "$0"))})])
            left_token: <Left_CommandSub "$(">
            spids: [70 76]
          )
        )
      }
    )
    (C {(Lit_Other ":")} 
      {
        (BracedVarSub
          token: <VSub_Name VERBOSE>
          suffix_op: (StringUnary op_id:VTest_ColonEquals arg_word:{(no)})
          spids: [91 95]
        )
      }
    )
    (C {(source)} {(scripts/bootstrap/buildenv.sh)})
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(-n)} 
                  {
                    (DQ 
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(compile)})
                        spids: [117 121]
                      )
                    )
                  } {(Lit_Other "]")}
                )
                (SimpleCommand
                  words: [{(echo)} {(DQ ("Invalid command(s): ") ($ VSub_Number "$1"))}]
                  redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[135])]
                )
              ]
              op_id: Op_DAmp
            )
            (SimpleCommand
              words: [
                {(echo)}
                {
                  (DQ ("syntax: ") ($ VSub_Number "$0") 
                    (" [command[,command]* [BAZEL_BIN [BAZEL_SUM]]]")
                  )
                }
              ]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[147])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("  General purpose commands:"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[157])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("     compile       = compile the bazel binary (default)"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[167])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("  Commands for developers:"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[177])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("     all         = compile,determinism,test"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[187])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("     determinism = test for stability of Bazel builds"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[197])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("     srcs        = test that //:srcs contains all the sources"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[207])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("     test        = run the full test suite of Bazel"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[217])]
            )
            (C {(exit)} {(1)})
          ]
          spids: [109]
        )
      spids: [103 108]
    )
    (FuncDef
      name: parse_options
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:keywords)
                  op: Equal
                  rhs: {(DQ ("(compile|all|determinism|bootstrap|srcs|test)"))}
                  spids: [239]
                )
              ]
              spids: [237]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:COMMANDS)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Number 1>
                          suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(compile)})
                          spids: [247 251]
                        )
                      )
                    }
                  spids: [245]
                )
              ]
              spids: [245]
            )
            (AndOr
              children: [
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_EqualTilde
                      left: {(DQ (${ VSub_Name COMMANDS))}
                      right: 
                        {(Lit_Other "^") ($ VSub_Name "$keywords") ("(") (Lit_Comma ",") 
                          ($ VSub_Name "$keywords") (")") (Lit_Other "*") (Lit_Other "$")
                        }
                    )
                )
                (C {(usage)} {(DQ ($ VSub_At "$@"))})
              ]
              op_id: Op_DPipe
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:DO_COMPILE) op:Equal rhs:{(SQ )} spids:[285])]
              spids: [285]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:DO_CHECKSUM) op:Equal rhs:{(SQ )} spids:[288])]
              spids: [288]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:DO_FULL_CHECKSUM)
                  op: Equal
                  rhs: {(1)}
                  spids: [291]
                )
              ]
              spids: [291]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:DO_TESTS) op:Equal rhs:{(SQ )} spids:[295])]
              spids: [295]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:DO_SRCS_TEST) op:Equal rhs:{(SQ )} spids:[298])]
              spids: [298]
            )
            (AndOr
              children: [
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_EqualTilde
                      left: {(DQ (${ VSub_Name COMMANDS))}
                      right: {("(") (compile) ("|") (all) (")")}
                    )
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:DO_COMPILE) op:Equal rhs:{(1)} spids:[321])]
                  spids: [321]
                )
              ]
              op_id: Op_DAmp
            )
            (AndOr
              children: [
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_EqualTilde
                      left: {(DQ (${ VSub_Name COMMANDS))}
                      right: {("(") (bootstrap) ("|") (determinism) ("|") (all) (")")}
                    )
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:DO_CHECKSUM) op:Equal rhs:{(1)} spids:[347])]
                  spids: [347]
                )
              ]
              op_id: Op_DAmp
            )
            (AndOr
              children: [
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_EqualTilde
                      left: {(DQ (${ VSub_Name COMMANDS))}
                      right: {("(") (bootstrap) (")")}
                    )
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:DO_FULL_CHECKSUM)
                      op: Equal
                      rhs: {(SQ )}
                      spids: [369]
                    )
                  ]
                  spids: [369]
                )
              ]
              op_id: Op_DAmp
            )
            (AndOr
              children: [
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_EqualTilde
                      left: {(DQ (${ VSub_Name COMMANDS))}
                      right: {("(") (srcs) ("|") (all) (")")}
                    )
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:DO_SRCS_TEST)
                      op: Equal
                      rhs: {(1)}
                      spids: [392]
                    )
                  ]
                  spids: [392]
                )
              ]
              op_id: Op_DAmp
            )
            (AndOr
              children: [
                (DBracket
                  expr: 
                    (BoolBinary
                      op_id: BoolBinary_EqualTilde
                      left: {(DQ (${ VSub_Name COMMANDS))}
                      right: {("(") (test) ("|") (all) (")")}
                    )
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:DO_TESTS) op:Equal rhs:{(1)} spids:[416])]
                  spids: [416]
                )
              ]
              op_id: Op_DAmp
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:BAZEL_BIN)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {(DQ (bazel-bin/src/bazel))}
                          )
                        spids: [422 428]
                      )
                    }
                  spids: [421]
                )
              ]
              spids: [421]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:BAZEL_SUM)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 3>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(DQ (x))})
                        spids: [432 438]
                      )
                    }
                  spids: [431]
                )
              ]
              spids: [431]
            )
          ]
          spids: [234]
        )
      spids: [228 233]
    )
    (C {(parse_options)} {(DQ (${ VSub_At "@"))})
    (C {(mkdir)} {(-p)} {(output)})
    (C {(Lit_Other ":")} 
      {
        (BracedVarSub
          token: <VSub_Name BAZEL>
          suffix_op: 
            (StringUnary
              op_id: VTest_ColonEquals
              arg_word: 
                {
                  (BracedVarSub
                    token: <VSub_Number 2>
                    suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{})
                    spids: [463 466]
                  )
                }
            )
          spids: [460 467]
        )
      }
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other "[")} {(KW_Bang "!")} {(-x)} {(DQ (${ VSub_Name BAZEL))} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(display)} 
              {
                (DQ ($ VSub_Name "$INFO") 
                  (
" You can skip this first step by providing a path to the bazel binary as second argument:"
                  )
                )
              }
            )
            (C {(display)} 
              {
                (DQ ($ VSub_Name "$INFO") ("    ") ($ VSub_Number "$0") (" ") (${ VSub_Name COMMANDS) 
                  (" /path/to/bazel")
                )
              }
            )
            (C {(new_step)} {(SQ <"Building Bazel from scratch">)})
            (C {(source)} {(scripts/bootstrap/compile.sh)})
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:DO_COMPILE) op:Equal rhs:{(1)} spids:[537])]
              spids: [537]
            )
          ]
          spids: [-1 496]
        )
      ]
      spids: [-1 540]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (C {(Lit_Other "[")} 
                  {
                    (DQ 
                      (BracedVarSub
                        token: <VSub_Name EMBED_LABEL>
                        suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(x)})
                        spids: [557 561]
                      )
                    )
                  } {(Lit_Other "=")} {(DQ (x))} {(Lit_Other "]")}
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:git_sha1)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(git_sha1)})])
                        left_token: <Left_CommandSub "$(">
                        spids: [581 583]
                      )
                    }
                  spids: [580]
                )
              ]
              spids: [580]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:EMBED_LABEL)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: (CommandList children:[(C {(get_last_version)})])
                          left_token: <Left_CommandSub "$(">
                          spids: [588 590]
                        ) (" (@") 
                        (BracedVarSub
                          token: <VSub_Name git_sha1>
                          suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(non-git)})
                          spids: [592 596]
                        ) (")")
                      )
                    }
                  spids: [586]
                )
              ]
              spids: [586]
            )
          ]
          spids: [-1 573]
        )
      ]
      spids: [-1 600]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  children: [
                    (DBracket
                      expr: 
                        (BoolBinary
                          op_id: BoolBinary_GlobDEqual
                          left: {($ VSub_Name "$PLATFORM")}
                          right: {(DQ (darwin))}
                        )
                    )
                    (Pipeline
                      children: [
                        (SimpleCommand
                          words: [{(xcodebuild)} {(-showsdks)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: 2
                              arg_word: {(/dev/null)}
                              spids: [625]
                            )
                          ]
                        )
                        (C {(grep)} {(-q)} {(SQ <"\\-sdk iphonesimulator">)})
                      ]
                      negated: False
                    )
                  ]
                  op_id: Op_DAmp
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:EXTRA_BAZEL_ARGS)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (BracedVarSub
                          token: <VSub_Name EXTRA_BAZEL_ARGS>
                          suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                          spids: [645 648]
                        ) (" --define IPHONE_SDK=1")
                      )
                    }
                  spids: [643]
                )
              ]
              spids: [643]
            )
          ]
          spids: [-1 640]
        )
      ]
      spids: [-1 652]
    )
    (C {(source)} {(scripts/bootstrap/bootstrap.sh)})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Name "$DO_COMPILE")} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(new_step)} {(SQ <"Building Bazel with Bazel">)})
            (C {(display)} {(DQ (.))})
            (C {(log)} {(DQ ("Building output/bazel"))})
            (AndOr
              children: [
                (C {(bazel_build)} {(DQ ("src:bazel") (${ VSub_Name EXE_EXT))})
                (C {(fail)} {(DQ ("Could not build Bazel"))})
              ]
              op_id: Op_DPipe
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:bazel_bin_path)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: (CommandList children:[(C {(get_bazel_bin_path)})])
                          left_token: <Left_CommandSub "$(">
                          spids: [714 716]
                        ) (/src/bazel) (${ VSub_Name EXE_EXT)
                      )
                    }
                  spids: [712]
                )
              ]
              spids: [712]
            )
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(-e)} {(DQ ($ VSub_Name "$bazel_bin_path"))} {(Lit_Other "]")})
                (C {(fail)} 
                  {
                    (DQ ("Could not find freshly built Bazel binary at '") 
                      ($ VSub_Name "$bazel_bin_path") ("'")
                    )
                  }
                )
              ]
              op_id: Op_DPipe
            )
            (AndOr
              children: [
                (C {(cp)} {(-f)} {(DQ ($ VSub_Name "$bazel_bin_path"))} 
                  {(DQ (output/bazel) (${ VSub_Name EXE_EXT))}
                )
                (C {(fail)} 
                  {
                    (DQ ("Could not copy '") ($ VSub_Name "$bazel_bin_path") ("' to 'output/bazel") 
                      (${ VSub_Name EXE_EXT) ("'")
                    )
                  }
                )
              ]
              op_id: Op_DPipe
            )
            (C {(chmod)} {(0755)} {(DQ (output/bazel) (${ VSub_Name EXE_EXT))})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:BAZEL)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: (CommandList children:[(C {(pwd)})])
                          left_token: <Left_CommandSub "$(">
                          spids: [793 795]
                        ) (/output/bazel) (${ VSub_Name EXE_EXT)
                      )
                    }
                  spids: [791]
                )
              ]
              spids: [791]
            )
          ]
          spids: [-1 668]
        )
      ]
      spids: [-1 802]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Name "$DO_CHECKSUM")} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(new_step)} {(DQ ("Determinism test"))})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} 
                          {
                            (BracedVarSub
                              token: <VSub_Name BAZEL_SUM>
                              suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(x)})
                              spids: [844 848]
                            )
                          } {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:BAZEL_SUM)
                          op: Equal
                          rhs: {(bazel-out/bazel_checksum)}
                          spids: [856]
                        )
                      ]
                      spids: [856]
                    )
                    (C {(log)} {(DQ ("First build"))})
                    (C {(bootstrap_test)} {(${ VSub_Name BAZEL)} {(${ VSub_Name BAZEL_SUM)})
                  ]
                  spids: [-1 853]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:BOOTSTRAP)
                      op: Equal
                      rhs: {(${ VSub_Name BAZEL)}
                      spids: [881]
                    )
                  ]
                  spids: [881]
                )
              ]
              spids: [878 887]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(DQ (${ VSub_Name BAZEL_SUM))} 
                          {(KW_Bang "!") (Lit_Other "=")} {(DQ (${ VSub_Name OUTPUT_DIR) (/bazel_checksum))} {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(cp)} {(${ VSub_Name BAZEL_SUM)} {(${ VSub_Name OUTPUT_DIR) (/bazel_checksum)})
                  ]
                  spids: [-1 913]
                )
              ]
              spids: [-1 928]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {($ VSub_Name "$DO_FULL_CHECKSUM")} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(log)} {(DQ ("Second build"))})
                    (C {(bootstrap_test)} {(${ VSub_Name BOOTSTRAP)} {(bazel-out/bazel_checksum)})
                    (C {(log)} {(DQ ("Comparing output"))})
                    (AndOr
                      children: [
                        (Subshell
                          child: 
                            (SimpleCommand
                              words: [
                                {(diff)}
                                {(-U)}
                                {(0)}
                                {(${ VSub_Name OUTPUT_DIR) (/bazel_checksum)}
                                {(bazel-out/bazel_checksum)}
                              ]
                              redirects: [
                                (Redir
                                  op_id: Redir_GreatAnd
                                  fd: -1
                                  arg_word: {(2)}
                                  spids: [980]
                                )
                              ]
                            )
                          spids: [966 982]
                        )
                        (C {(fail)} {(DQ ("Differences detected in outputs!"))})
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [-1 940]
                )
              ]
              spids: [-1 995]
            )
          ]
          spids: [-1 826]
        )
      ]
      spids: [-1 997]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Name "$DO_SRCS_TEST")} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(new_step)} {(DQ ("Checking that //:srcs contains all the sources"))})
            (C {(log)} {(DQ ("Querying //:srcs"))})
            (Pipeline
              children: [
                (SimpleCommand
                  words: [
                    {(${ VSub_Name BAZEL)}
                    {(query)}
                    {(SQ <"kind(\"source file\", deps(//:srcs))">)}
                  ]
                  redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[1045])]
                )
                (C {(grep)} {(-v)} {(SQ <"^@">)})
                (C {(sed)} {(-e)} {(SQ <"s|^//||">)})
                (C {(sed)} {(SQ <"s|^:||">)})
                (C {(sed)} {(SQ <"s|:|/|">)})
                (SimpleCommand
                  words: [{(sort)} {(-u)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-query))}
                      spids: [1096]
                    )
                  ]
                )
              ]
              negated: False
            )
            (C {(log)} {(DQ ("Finding all files"))})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:SRCS_EXCLUDES)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name SRCS_EXCLUDES>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_Hyphen
                            arg_word: {(XXXXXXXXXXXXXX1268778dfsdf4)}
                          )
                        spids: [1122 1126]
                      )
                    }
                  spids: [1121]
                )
              ]
              spids: [1121]
            )
            (Pipeline
              children: [
                (C {(find)} {(.)} {(-type)} {(f)})
                (C {(sed)} {(SQ <"s|./||">)})
                (C {(grep)} {(-v)} {(SQ <"^bazel-">)})
                (C {(grep)} {(-v)} {(SQ <"^WORKSPACE.user.bzl">)})
                (C {(grep)} {(-v)} {(SQ <"^\\.">)})
                (C {(grep)} {(-v)} {(SQ <"^out/">)})
                (C {(grep)} {(-v)} {(SQ <"^output/">)})
                (C {(grep)} {(-Ev)} {(DQ (${ VSub_Name SRCS_EXCLUDES))})
                (C {(grep)} {(-v)} {(SQ <"^tools/defaults/BUILD">)})
                (SimpleCommand
                  words: [{(sort)} {(-u)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-find))}
                      spids: [1241]
                    )
                  ]
                )
              ]
              negated: False
            )
            (C {(log)} {(DQ (Diffing))})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:res)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (AndOr
                                  children: [
                                    (Pipeline
                                      children: [
                                        (C {(diff)} {(-U)} {(0)} 
                                          {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-find))} {(DQ (${ VSub_Name OUTPUT_DIR) (/srcs-query))}
                                        )
                                        (C {(sed)} {(SQ <"s|^-||">)})
                                        (C {(grep)} {(-Ev)} {(SQ <"^(@@|\\+\\+|--)">)})
                                      ]
                                      negated: False
                                    )
                                    (C {(true)})
                                  ]
                                  op_id: Op_DPipe
                                )
                              ]
                            )
                          left_token: <Left_CommandSub "$(">
                          spids: [1260 1302]
                        )
                      )
                    }
                  spids: [1258]
                )
              ]
              spids: [1258]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(Lit_Other "[")} {(-n)} {(DQ (${ VSub_Name res))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(fail)} 
                      {
                        (DQ ("//:srcs filegroup do not contains all the sources, missing:\n") 
                          (${ VSub_Name res)
                        )
                      }
                    )
                  ]
                  spids: [-1 1322]
                )
              ]
              spids: [-1 1335]
            )
          ]
          spids: [-1 1018]
        )
      ]
      spids: [-1 1337]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {($ VSub_Name "$DO_TESTS")} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(new_step)} {(DQ ("Running tests"))})
            (C {(display)} {(DQ (.))})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:ndk_target)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(get_bind_target)} 
                                  {(//external) (Lit_Other ":") (android_ndk_for_testing)}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub "$(">
                          spids: [1378 1384]
                        )
                      )
                    }
                  spids: [1376]
                )
              ]
              spids: [1376]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:sdk_target)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(get_bind_target)} 
                                  {(//external) (Lit_Other ":") (android_sdk_for_testing)}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub "$(">
                          spids: [1390 1396]
                        )
                      )
                    }
                  spids: [1388]
                )
              ]
              spids: [1388]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$ndk_target"))} {(Lit_Other "=")} 
                          {(DQ ("//:dummy"))} {(-o)} {(DQ ($ VSub_Name "$sdk_target"))} {(Lit_Other "=")} {(DQ ("//:dummy"))} {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(display)} 
                      {
                        (DQ ($ VSub_Name "$WARNING") 
                          (
" Android SDK or NDK are not set in the WORKSPACE file. Android tests will not be run."
                          )
                        )
                      }
                    )
                  ]
                  spids: [-1 1429]
                )
              ]
              spids: [-1 1440]
            )
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$JAVAC_VERSION"))} {(Lit_Other "]")})
                (C {(get_java_version)})
              ]
              op_id: Op_DPipe
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DBracket
                          expr: 
                            (LogicalNot
                              child: 
                                (BoolBinary
                                  op_id: BoolBinary_EqualTilde
                                  left: 
                                    {
                                      (DQ 
                                        (BracedVarSub
                                          token: <VSub_Name BAZEL_TEST_FILTERS>
                                          suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                                          spids: [1466 1469]
                                        )
                                      )
                                    }
                                  right: {(DQ (-jdk8))}
                                )
                            )
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (AndOr
                                  children: [
                                    (C {(Lit_Other "[")} {(DQ (8))} {(-gt)} 
                                      {
                                        (BracedVarSub
                                          token: <VSub_Name JAVAC_VERSION>
                                          suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{("*.")})
                                          spids: [1494 1498]
                                        )
                                      } {(Lit_Other "]")}
                                    )
                                    (C {(Lit_Other "[")} {(DQ (${ VSub_Name JAVA_VERSION))} 
                                      {(Lit_Other "=")} {(DQ (1.7))} {(Lit_Other "]")}
                                    )
                                  ]
                                  op_id: Op_DPipe
                                )
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (C {(display)} 
                              {
                                (DQ ($ VSub_Name "$WARNING") 
                                  (" Your version of Java is lower than 1.8!")
                                )
                              }
                            )
                            (C {(display)} 
                              {
                                (DQ ($ VSub_Name "$WARNING") 
                                  (" Deactivating Java 8 tests, please use a JDK 8 to fully")
                                )
                              }
                            )
                            (C {(display)} {(DQ ($ VSub_Name "$WARNING") (" test Bazel."))})
                            (If
                              arms: [
                                (if_arm
                                  cond: [
                                    (Sentence
                                      child: 
                                        (C {(Lit_Other "[")} {(-n)} 
                                          {
                                            (DQ 
                                              (BracedVarSub
                                                token: <VSub_Name BAZEL_TEST_FILTERS>
                                                suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                                                spids: [1555 1558]
                                              )
                                            )
                                          } {(Lit_Other "]")}
                                        )
                                      terminator: <Op_Semi ";">
                                    )
                                  ]
                                  action: [
                                    (Assignment
                                      keyword: Assign_None
                                      pairs: [
                                        (assign_pair
                                          lhs: (LhsName name:BAZEL_TEST_FILTERS)
                                          op: Equal
                                          rhs: {(DQ (${ VSub_Name BAZEL_TEST_FILTERS) (",-jdk8"))}
                                          spids: [1567]
                                        )
                                      ]
                                      spids: [1567]
                                    )
                                  ]
                                  spids: [-1 1564]
                                )
                              ]
                              else_action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:BAZEL_TEST_FILTERS)
                                      op: Equal
                                      rhs: {(DQ (-jdk8))}
                                      spids: [1579]
                                    )
                                  ]
                                  spids: [1579]
                                )
                              ]
                              spids: [1576 1585]
                            )
                          ]
                          spids: [-1 1521]
                        )
                      ]
                      spids: [-1 1588]
                    )
                  ]
                  spids: [-1 1481]
                )
              ]
              spids: [-1 1591]
            )
            (AndOr
              children: [
                (C {($ VSub_Name "$BAZEL")} {(--bazelrc) (Lit_Other "=") (${ VSub_Name BAZELRC)} 
                  {(--nomaster_bazelrc)} {(${ VSub_Name BAZEL_DIR_STARTUP_OPTIONS)} {(test)} 
                  {(--test_tag_filters) (Lit_Other "=") 
                    (DQ 
                      (BracedVarSub
                        token: <VSub_Name BAZEL_TEST_FILTERS>
                        suffix_op: (StringUnary op_id:VTest_Hyphen arg_word:{(SQ )})
                        spids: [1619 1622]
                      )
                    )
                  } {(--build_tests_only)} {(--nolegacy_bazel_java_test)} {(--define)} 
                  {(Lit_VarLike "JAVA_VERSION=") (${ VSub_Name JAVA_VERSION)} {(${ VSub_Name EXTRA_BAZEL_ARGS)} {(-k)} {(--test_output) (Lit_Other "=") (errors)} {(//src/...)} 
                  {(//third_party/ijar/...)} {(//scripts/...)}
                )
                (C {(fail)} {(DQ ("Tests failed"))})
              ]
              op_id: Op_DPipe
            )
          ]
          spids: [-1 1358]
        )
      ]
      spids: [-1 1672]
    )
    (C {(clear_log)})
    (C {(display)} {(DQ ("Build successful! Binary is here: ") (${ VSub_Name BAZEL))})
  ]
)