(CommandList
  children: [
    (C {(set)} {(-o)} {(pipefail)})
    (If
      arms: [
        (if_arm
          cond: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-lt)} {(4)} {(Lit_Other "]")})
          action: 
            (CommandList
              children: [
                (SimpleCommand
                  words: [{(echo)} {(DQ ("usage: bisectinate ARCH PACKAGE REPO[@BAD] GOOD [TEST...]"))}]
                  redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[43])]
                )
                (SimpleCommand
                  words: [{(echo)}]
                  redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[49])]
                )
                (SimpleCommand
                  words: [{(echo)} {(DQ ("Bisect PACKAGE for ARCH, from START to BAD within REPO"))}]
                  redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[59])]
                )
                (C {(exit)} {(1)})
              ]
            )
          spids: [-1 34]
        )
      ]
      spids: [-1 67]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:ARCH) rhs:{(DQ ($ VSub_Number "$1"))} spids:[74])]
      spids: [74]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:PKG) rhs:{(DQ ($ VSub_Number "$2"))} spids:[79])]
      spids: [79]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:REPO)
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Number 3>
                  suffix_op: 
                    (PatSub
                      pat: {("@*")}
                      replace: {}
                      do_all: False
                      do_prefix: False
                      do_suffix: False
                    )
                  spids: [86 91]
                )
              )
            }
          spids: [84]
        )
      ]
      spids: [84]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:BRANCH)
          rhs: 
            {
              (DQ 
                (BracedVarSub
                  token: <VSub_Number 3>
                  suffix_op: 
                    (PatSub
                      pat: {("*@")}
                      replace: {}
                      do_all: False
                      do_prefix: False
                      do_suffix: False
                    )
                  spids: [96 101]
                )
              )
            }
          spids: [94]
        )
      ]
      spids: [94]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$BRANCH"))} {(Lit_Other "=") (Lit_Other "=")} 
          {(DQ ($ VSub_Number "$3"))} {(Lit_Other "]")}
        )
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LeftVar name:BRANCH) rhs:{(master)} spids:[121])]
          spids: [121]
        )
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:START) rhs:{(DQ ($ VSub_Number "$4"))} spids:[124])]
      spids: [124]
    )
    (C {(shift)} {(4)})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LeftVar name:TEST) rhs:{(DQ ($ VSub_Number "$1"))} spids:[133])]
      spids: [133]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:TOP)
          rhs: {(DQ (CommandSubPart command_list:(C {(pwd)}) spids:[141143]))}
          spids: [139]
        )
      ]
      spids: [139]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$SRCDIR"))} {(Lit_Other "]")})
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LeftVar name:SRCDIR)
              rhs: {(DQ ($ VSub_Name "$TOP") (/packages))}
              spids: [158]
            )
          ]
          spids: [158]
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$BUILD"))} {(Lit_Other "]")})
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LeftVar name:BUILD)
              rhs: {(DQ ($ VSub_Name "$TOP") (/build))}
              spids: [176]
            )
          ]
          spids: [176]
        )
      ]
      op_id: Op_DAmp
    )
    (If
      arms: [
        (if_arm
          cond: 
            (C {(Lit_Other "[")} {(KW_Bang "!")} {(-d)} {(DQ ($ VSub_Name "$REPO") (/.git))} 
              {(Lit_Other "]")}
            )
          action: 
            (CommandList
              children: [
                (C {(echo)} {(DQ ("No git repo at ") ($ VSub_Name "$REPO"))})
                (C {(exit)} {(1)})
              ]
            )
          spids: [-1 198]
        )
      ]
      spids: [-1 213]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$TEST"))} {(Lit_Other "]")})
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LeftVar name:TEST) rhs:{(true)} spids:[228])]
          spids: [228]
        )
      ]
      op_id: Op_DAmp
    )
    (If
      arms: [
        (if_arm
          cond: 
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$PKG"))} {(Lit_Other "=") (Lit_Other "=")} 
                  {(linux)} {(Lit_Other "]")}
                )
                (C {(Lit_Other "[")} {(-e)} 
                  {(DQ ($ VSub_Name "$BUILD") (/root-filesystem-) ($ VSub_Name "$ARCH")) (.tar.bz2)} {(Lit_Other "]")}
                )
              ]
              op_id: Op_DAmp
            )
          action: 
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LeftVar name:ZAPJUST) rhs:{(linux-kernel)} spids:[269])]
              spids: [269]
            )
          spids: [-1 266]
        )
        (if_arm
          cond: 
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$PKG"))} {(Lit_Other "=") (Lit_Other "=")} 
                  {(busybox)} {(Lit_Other "]")}
                )
                (C {(Lit_Other "[")} {(-e)} 
                  {
                    (DQ ($ VSub_Name "$BUILD") (/simple-cross-compiler-) ($ VSub_Name "$ARCH") 
                      (.tar.bz2)
                    )
                  } {(Lit_Other "]")}
                )
              ]
              op_id: Op_DAmp
            )
          action: 
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LeftVar name:ZAPJUST) rhs:{(root-filesystem)} spids:[306])]
              spids: [306]
            )
          spids: [272 303]
        )
      ]
      else_action: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LeftVar name:ZAPJUST) rhs:{(SQ )} spids:[312])]
          spids: [312]
        )
      spids: [309 314]
    )
    (AndOr
      children: [
        (C {(rm)} {(-rf)} {(DQ ($ VSub_Name "$BUILD") (/packages/alt-) ($ VSub_Name "$PKG"))} 
          {(DQ ($ VSub_Name "$SRCDIR") (/alt-) ($ VSub_Name "$PKG") (-0.tar.bz2))}
        )
        (AndOr
          children: [
            (C {(mkdir)} {(-p)} 
              {(DQ ($ VSub_Name "$BUILD")) (/) (Lit_LBrace "{") (logs) (Lit_Comma ",") (packages) 
                (Lit_RBrace "}")
              }
            )
            (AndOr
              children: [
                (C {(cd)} {(DQ ($ VSub_Name "$BUILD") (/packages))})
                (AndOr
                  children: [
                    (C {(git)} {(clone)} {(DQ ($ VSub_Name "$REPO"))} {(DQ (alt-) ($ VSub_Name "$PKG"))})
                    (AndOr
                      children: [
                        (C {(cd)} {(DQ (alt-) ($ VSub_Name "$PKG"))})
                        (AndOr
                          children: [
                            (C {(git)} {(bisect)} {(start)})
                            (AndOr
                              children: [
                                (C {(git)} {(bisect)} {(good)} {(DQ ($ VSub_Name "$START"))})
                                (C {(exit)} {(1)})
                              ]
                              op_id: Op_DPipe
                            )
                          ]
                          op_id: Op_DAmp
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  op_id: Op_DAmp
                )
              ]
              op_id: Op_DAmp
            )
          ]
          op_id: Op_DAmp
        )
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:RESULT)
          rhs: {(DQ ("bad ") ($ VSub_Name "$BRANCH"))}
          spids: [414]
        )
      ]
      spids: [414]
    )
    (While
      cond: (C {(true)})
      body: 
        (DoGroup
          child: 
            (CommandList
              children: [
                (AndOr
                  children: [
                    (C {(cd)} {(DQ ($ VSub_Name "$BUILD") (/packages/alt-) ($ VSub_Name "$PKG"))})
                    (AndOr
                      children: [
                        (C {(git)} {(clean)} {(-fdx)})
                        (AndOr
                          children: [(C {(git)} {(checkout)} {(-f)}) (C {(exit)} {(1)})]
                          op_id: Op_DPipe
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  op_id: Op_DAmp
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LeftVar name:RESULT)
                      rhs: 
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: (C {(git)} {(bisect)} {($ VSub_Name "$RESULT")})
                              spids: [473 479]
                            )
                          )
                        }
                      spids: [471]
                    )
                  ]
                  spids: [471]
                )
                (C {(echo)} {(DQ ($ VSub_Name "$RESULT"))})
                (AndOr
                  children: [
                    (C {(Lit_Other "[")} {(KW_Bang "!")} 
                      {
                        (DQ 
                          (CommandSubPart
                            command_list: 
                              (Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ VSub_Name "$RESULT"))})
                                  (C {(head)} {(-n)} {(1)})
                                  (C {(grep)} {(DQ ("^Bisecting:"))})
                                ]
                                negated: False
                              )
                            spids: [495 517]
                          )
                        )
                      } {(Lit_Other "]")}
                    )
                    (C {(exit)})
                  ]
                  op_id: Op_DAmp
                )
                (SimpleCommand
                  words: [{(git)} {(show)}]
                  redirects: [
                    (Redirect
                      op_id: Redir_Great
                      arg_word: 
                        {(DQ ($ VSub_Name "$BUILD") (/logs/bisectinate-) (${ VSub_Name ARCH) (.txt))}
                      fd: -1
                      spids: [537]
                    )
                  ]
                )
                (SimpleCommand
                  words: [{(git)} {(bisect)} {(log)}]
                  redirects: [
                    (Redirect
                      op_id: Redir_Great
                      arg_word: 
                        {(DQ ($ VSub_Name "$BUILD") (/logs/bisectinate-) (${ VSub_Name ARCH) (.log))}
                      fd: -1
                      spids: [555]
                    )
                  ]
                )
                (Pipeline
                  children: [(C {(git)} {(log)} {(HEAD)} {(-1)}) (C {(cat)})]
                  negated: False
                )
                (C {(echo)} {(DQ (Testing...))})
                (AndOr
                  children: [(C {(cd)} {(DQ ($ VSub_Name "$TOP"))}) (C {(exit)} {(1)})]
                  op_id: Op_DPipe
                )
                (AndOr
                  children: [
                    (C {(Lit_Other "[")} {(KW_Bang "!")} {(-z)} {(DQ ($ VSub_Name "$ZAPJUST"))} 
                      {(Lit_Other "]")}
                    )
                    (AndOr
                      children: [
                        (C {(rm)} {(-rf)} 
                          {
                            (DQ ($ VSub_Name "$BUILD") (/) (${ VSub_Name ZAPJUST) (-) 
                              ($ VSub_Name "$ARCH")
                            ) (Lit_LBrace "{") (Lit_Comma ",") (.tar.bz2) (Lit_RBrace "}")
                          }
                        )
                        (C {(rm)} {(-rf)} 
                          {(DQ ($ VSub_Name "$BUILD")) (/) (Lit_Other "*") (-) 
                            (DQ ($ VSub_Name "$ARCH")) (Lit_LBrace "{") (Lit_Comma ",") (.tar.bz2) (Lit_RBrace "}")
                          }
                        )
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  op_id: Op_DAmp
                )
                (Pipeline
                  children: [
                    (SimpleCommand
                      words: [{(./build.sh)} {(DQ ($ VSub_Name "$ARCH"))}]
                      redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(1)} fd:2 spids:[691])]
                      more_env: [
                        (env_pair name:EXTRACT_ALL val:{(1)} spids:[672])
                        (env_pair
                          name: ALLOW_PATCH_FAILURE
                          val: {(1)}
                          spids: [675]
                        )
                        (env_pair
                          name: USE_ALT
                          val: {(DQ ($ VSub_Name "$PKG"))}
                          spids: [678]
                        )
                      ]
                    )
                    (C {(tee)} {(-a)} 
                      {(DQ ($ VSub_Name "$BUILD")) (/logs/bisectinate-) (DQ ($ VSub_Name "$ARCH")) 
                        (.txt)
                      }
                    )
                  ]
                  negated: False
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LeftVar name:RESULT) rhs:{(bad)} spids:[716])]
                  spids: [716]
                )
                (If
                  arms: [
                    (if_arm
                      cond: 
                        (C {(Lit_Other "[")} {(-e)} 
                          {(DQ ($ VSub_Name "$BUILD")) (/system-image-) (DQ ($ VSub_Name "$ARCH")) 
                            (.tar.bz2)
                          } {(Lit_Other "]")}
                        )
                      action: 
                        (CommandList
                          children: [
                            (C {(set)} {(-o)} {(pipefail)})
                            (Pipeline
                              children: [
                                (SimpleCommand
                                  words: [{(more/timeout.sh)} {(60)} {(DQ ($ VSub_Name "$TEST"))}]
                                  redirects: [
                                    (Redirect
                                      op_id: Redir_GreatAnd
                                      arg_word: {(1)}
                                      fd: 2
                                      spids: [761]
                                    )
                                  ]
                                  more_env: [
                                    (env_pair
                                      name: ARCH
                                      val: {(DQ ($ VSub_Name "$ARCH"))}
                                      spids: [748]
                                    )
                                  ]
                                )
                                (C {(tee)} {(-a)} 
                                  {
                                    (DQ ($ VSub_Name "$BUILD") (/logs/bisectinate-) 
                                      ($ VSub_Name "$ARCH")
                                    ) (.txt)
                                  }
                                )
                              ]
                              negated: False
                            )
                            (AndOr
                              children: [
                                (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-eq)} {(0)} {(Lit_Other "]")})
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LeftVar name:RESULT)
                                      rhs: {(good)}
                                      spids: [792]
                                    )
                                  ]
                                  spids: [792]
                                )
                              ]
                              op_id: Op_DAmp
                            )
                          ]
                        )
                      spids: [-1 738]
                    )
                  ]
                  spids: [-1 796]
                )
                (C {(mv)} 
                  {(DQ ($ VSub_Name "$BUILD")) (/logs/bisectinate) (Lit_LBrace "{") (Lit_Comma ",") (-) 
                    ($ VSub_Name "$RESULT") (Lit_RBrace "}") (-) (DQ ($ VSub_Name "$ARCH")) (.txt)
                  }
                )
              ]
            )
          spids: [429 822]
        )
    )
  ]
)