(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:USAGE)
          op: assign_op.Equal
          rhs: 
            {
              (SQ 
                (Token
                  id: Id.Lit_Chars
                  val: 
'[help|start|bad|good|new|old|terms|skip|next|reset|visualize|replay|log|run]'
                  span_id: 6
                )
              )
            }
          spids: [4]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LONG_USAGE)
          op: assign_op.Equal
          rhs: 
            {
              (SQ (Token id:Id.Lit_Chars val:'git bisect help\n' span_id:11) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tprint this long help message.\n'
                  span_id: 12
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: 'git bisect start [--term-{old,good}=<term> --term-{new,bad}=<term>]\n'
                  span_id: 13
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '\t\t [--no-checkout] [<bad> [<good>...]] [--] [<pathspec>...]\n'
                  span_id: 14
                ) (Token id:Id.Lit_Chars val:'\treset bisect state and start bisection.\n' span_id:15) 
                (Token
                  id: Id.Lit_Chars
                  val: 'git bisect (bad|new) [<rev>]\n'
                  span_id: 16
                ) (Token id:Id.Lit_Chars val:'\tmark <rev> a known-bad revision/\n' span_id:17) 
                (Token
                  id: Id.Lit_Chars
                  val: '\t\ta revision after change in a given property.\n'
                  span_id: 18
                ) (Token id:Id.Lit_Chars val:'git bisect (good|old) [<rev>...]\n' span_id:19) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tmark <rev>... known-good revisions/\n'
                  span_id: 20
                ) (Token id:Id.Lit_Chars val:'\t\trevisions before change in a given property.\n' span_id:21) 
                (Token
                  id: Id.Lit_Chars
                  val: 'git bisect terms [--term-good | --term-bad]\n'
                  span_id: 22
                ) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tshow the terms used for old and new commits (default: bad, good)\n'
                  span_id: 23
                ) (Token id:Id.Lit_Chars val:'git bisect skip [(<rev>|<range>)...]\n' span_id:24) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tmark <rev>... untestable revisions.\n'
                  span_id: 25
                ) (Token id:Id.Lit_Chars val:'git bisect next\n' span_id:26) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tfind next bisection to test and check it out.\n'
                  span_id: 27
                ) (Token id:Id.Lit_Chars val:'git bisect reset [<commit>]\n' span_id:28) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tfinish bisection search and go back to commit.\n'
                  span_id: 29
                ) (Token id:Id.Lit_Chars val:'git bisect visualize\n' span_id:30) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tshow bisect status in gitk.\n'
                  span_id: 31
                ) (Token id:Id.Lit_Chars val:'git bisect replay <logfile>\n' span_id:32) 
                (Token id:Id.Lit_Chars val:'\treplay bisection log.\n' span_id:33) (Token id:Id.Lit_Chars val:'git bisect log\n' span_id:34) 
                (Token id:Id.Lit_Chars val:'\tshow bisect log.\n' span_id:35) (Token id:Id.Lit_Chars val:'git bisect run <cmd>...\n' span_id:36) 
                (Token
                  id: Id.Lit_Chars
                  val: '\tuse <cmd>... to automatically bisect.\n'
                  span_id: 37
                ) (Token id:Id.Lit_Chars val:'\n' span_id:38) 
                (Token
                  id: Id.Lit_Chars
                  val: 'Please use "git help bisect" to get the full man page.'
                  span_id: 39
                )
              )
            }
          spids: [9]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OPTIONS_SPEC)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [43]
        )
      ]
    )
    (C {(.)} {(git-sh-setup)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:_x40)
          op: assign_op.Equal
          rhs: {(SQ (Token id:Id.Lit_Chars val:'[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]' span_id:52))}
          spids: [50]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:_x40)
          op: assign_op.Equal
          rhs: 
            {
              (DQ ($ Id.VSub_DollarName '$_x40') ($ Id.VSub_DollarName '$_x40') 
                ($ Id.VSub_DollarName '$_x40') ($ Id.VSub_DollarName '$_x40') ($ Id.VSub_DollarName '$_x40') ($ Id.VSub_DollarName '$_x40') 
                ($ Id.VSub_DollarName '$_x40') ($ Id.VSub_DollarName '$_x40')
              )
            }
          spids: [55]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TERM_BAD)
          op: assign_op.Equal
          rhs: {(bad)}
          spids: [67]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TERM_GOOD)
          op: assign_op.Equal
          rhs: {(good)}
          spids: [70]
        )
      ]
    )
    (command.ShFunction
      name: bisect_head
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_HEAD))})]
                  action: [(C {(echo)} {(BISECT_HEAD)})]
                  spids: [81 93]
                )
              ]
              else_action: [(C {(echo)} {(HEAD)})]
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_autostart
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))})
                (command.BraceGroup
                  children: [
                    (command.Simple
                      words: [
                        {(gettextln)}
                        {
                          (DQ ('You need to start by ') 
                            (word_part.EscapedLiteral
                              token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:139)
                            ) ('git bisect start') 
                            (word_part.EscapedLiteral
                              token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:141)
                            )
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:144)
                          fd: -1
                          arg_word: {(2)}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-t)} {(0)})]
                          action: [
                            (command.Simple
                              words: [{(gettext)} {(DQ ('Do you want me to do it for you [Y/n]? '))}]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:178)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (C {(read)} {(yesno)})
                            (command.Case
                              to_match: {(DQ ($ Id.VSub_DollarName '$yesno'))}
                              arms: [
                                (case_arm
                                  pat_list: [
                                    {(Id.Lit_LBracket '[') (Nn) (Id.Lit_RBracket ']') (Id.Lit_Star '*')}
                                  ]
                                  action: [
                                    (command.ControlFlow
                                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:203)
                                    )
                                  ]
                                  spids: [196 200 205 -1]
                                )
                              ]
                            )
                            (C {(bisect_start)})
                          ]
                          spids: [148 157]
                        )
                      ]
                      else_action: [
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Exit val:exit span_id:217)
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_start
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:has_double_dash)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [249]
                )
              ]
            )
            (command.ForEach
              iter_name: arg
              do_arg_iter: T
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$arg'))}
                      arms: [
                        (case_arm
                          pat_list: [{(--)}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:has_double_dash)
                                      op: assign_op.Equal
                                      rhs: {(1)}
                                      spids: [272]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:274)
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Break val:break span_id:276)
                            )
                          ]
                          spids: [269 270 278 -1]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:orig_args)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:287)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(git)} {(rev-parse)} {(--sq-quote)} {(DQ ($ Id.VSub_At '$@'))})
                            ]
                          )
                      )
                    }
                  spids: [286]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:bad_seen)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [300]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:eval)
                  op: assign_op.Equal
                  rhs: {(SQ )}
                  spids: [304]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:must_write_terms)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [309]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:revs)
                  op: assign_op.Equal
                  rhs: {(SQ )}
                  spids: [313]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(test)} 
                      {
                        (DQ (z) 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:324)
                            command_list: 
                              (command.CommandList
                                children: [(C {(git)} {(rev-parse)} {(--is-bare-repository)})]
                              )
                          )
                        )
                      } {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(zfalse)}
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:mode)
                          op: assign_op.Equal
                          rhs: {(--no-checkout)}
                          spids: [342]
                        )
                      ]
                    )
                  ]
                  spids: [318 339]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:mode)
                      op: assign_op.Equal
                      rhs: {(SQ )}
                      spids: [349]
                    )
                  ]
                )
              ]
            )
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:357)
              cond: [
                (command.Sentence
                  child: 
                    (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-gt)} {(0)} 
                      {(Id.Lit_RBracket ']')}
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:368)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:arg)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number '$1'))}
                          spids: [373]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$arg'))}
                      arms: [
                        (case_arm
                          pat_list: [{(--)}]
                          action: [
                            (C {(shift)})
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Break val:break span_id:395)
                            )
                          ]
                          spids: [388 389 398 -1]
                        )
                        (case_arm
                          pat_list: [{(--no-checkout)}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:mode)
                                  op: assign_op.Equal
                                  rhs: {(--no-checkout)}
                                  spids: [405]
                                )
                              ]
                            )
                            (C {(shift)})
                          ]
                          spids: [401 402 411 -1]
                        )
                        (case_arm
                          pat_list: [{(--term-good)} {(--term-old)}]
                          action: [
                            (C {(shift)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:must_write_terms)
                                  op: assign_op.Equal
                                  rhs: {(1)}
                                  spids: [423]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:TERM_GOOD)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_Number '$1')}
                                  spids: [427]
                                )
                              ]
                            )
                            (C {(shift)})
                          ]
                          spids: [414 417 433 -1]
                        )
                        (case_arm
                          pat_list: [
                            {(--term-good) (Id.Lit_Equals '=') (Id.Lit_Star '*')}
                            {(--term-old) (Id.Lit_Equals '=') (Id.Lit_Star '*')}
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:must_write_terms)
                                  op: assign_op.Equal
                                  rhs: {(1)}
                                  spids: [446]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:TERM_GOOD)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Number val:1 span_id:452)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Pound
                                            arg_word: {('*=')}
                                          )
                                      )
                                    }
                                  spids: [450]
                                )
                              ]
                            )
                            (C {(shift)})
                          ]
                          spids: [436 443 460 -1]
                        )
                        (case_arm
                          pat_list: [{(--term-bad)} {(--term-new)}]
                          action: [
                            (C {(shift)})
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:must_write_terms)
                                  op: assign_op.Equal
                                  rhs: {(1)}
                                  spids: [472]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:TERM_BAD)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_Number '$1')}
                                  spids: [476]
                                )
                              ]
                            )
                            (C {(shift)})
                          ]
                          spids: [463 466 482 -1]
                        )
                        (case_arm
                          pat_list: [
                            {(--term-bad) (Id.Lit_Equals '=') (Id.Lit_Star '*')}
                            {(--term-new) (Id.Lit_Equals '=') (Id.Lit_Star '*')}
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:must_write_terms)
                                  op: assign_op.Equal
                                  rhs: {(1)}
                                  spids: [495]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:TERM_BAD)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Number val:1 span_id:501)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Pound
                                            arg_word: {('*=')}
                                          )
                                      )
                                    }
                                  spids: [499]
                                )
                              ]
                            )
                            (C {(shift)})
                          ]
                          spids: [485 492 509 -1]
                        )
                        (case_arm
                          pat_list: [{(--) (Id.Lit_Star '*')}]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:520)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ ("unrecognised option: '") 
                                                (word_part.EscapedLiteral
                                                  token: 
                                                    (Token
                                                      id: Id.Lit_EscapedChar
                                                      val: '\\$'
                                                      span_id: 525
                                                    )
                                                ) ("arg'")
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                          spids: [512 514 531 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:rev)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: 
                                              (Token
                                                id: Id.Left_DollarParen
                                                val: '$('
                                                span_id: 539
                                              )
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {(git)} {(rev-parse)} {(-q)} {(--verify)} 
                                                    {(DQ ($ Id.VSub_DollarName '$arg') ('^{commit}'))}
                                                  )
                                                ]
                                              )
                                          )
                                        }
                                      spids: [538]
                                    )
                                  ]
                                )
                                (command.BraceGroup
                                  children: [
                                    (command.AndOr
                                      ops: [Id.Op_DAmp]
                                      children: [
                                        (C {(test)} {($ Id.VSub_DollarName '$has_double_dash')} {(-eq)} 
                                          {(1)}
                                        )
                                        (C {(die)} 
                                          {
                                            (DQ 
                                              (command_sub
                                                left_token: 
                                                  (Token
                                                    id: Id.Left_DollarParen
                                                    val: '$('
                                                    span_id: 573
                                                  )
                                                command_list: 
                                                  (command.CommandList
                                                    children: [
                                                      (C {(eval_gettext)} 
                                                        {
                                                          (DQ ("'") 
                                                            (word_part.EscapedLiteral
                                                              token: 
                                                                (Token
                                                                  id: Id.Lit_EscapedChar
                                                                  val: '\\$'
                                                                  span_id: 578
                                                                )
                                                            ) ("arg' does not appear to be a valid revision")
                                                          )
                                                        }
                                                      )
                                                    ]
                                                  )
                                              )
                                            )
                                          }
                                        )
                                      ]
                                    )
                                    (command.ControlFlow
                                      token: (Token id:Id.ControlFlow_Break val:break span_id:585)
                                    )
                                  ]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:revs)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$revs') (' ') 
                                        ($ Id.VSub_DollarName '$rev')
                                      )
                                    }
                                  spids: [591]
                                )
                              ]
                            )
                            (C {(shift)})
                          ]
                          spids: [534 535 602 -1]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ForEach
              iter_name: rev
              iter_words: [{($ Id.VSub_DollarName '$revs')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:must_write_terms)
                          op: assign_op.Equal
                          rhs: {(1)}
                          spids: [644]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {($ Id.VSub_DollarName '$bad_seen')}
                      arms: [
                        (case_arm
                          pat_list: [{(0)}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:state)
                                      op: assign_op.Equal
                                      rhs: {($ Id.VSub_DollarName '$TERM_BAD')}
                                      spids: [659]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:662)
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:bad_seen)
                                  op: assign_op.Equal
                                  rhs: {(1)}
                                  spids: [664]
                                )
                              ]
                            )
                          ]
                          spids: [656 657 667 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:state)
                                  op: assign_op.Equal
                                  rhs: {($ Id.VSub_DollarName '$TERM_GOOD')}
                                  spids: [673]
                                )
                              ]
                            )
                          ]
                          spids: [670 671 676 -1]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:eval)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName '$eval') (" bisect_write '") 
                                ($ Id.VSub_DollarName '$state') ("' '") ($ Id.VSub_DollarName '$rev') ("' 'nolog' &&")
                              )
                            }
                          spids: [682]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.AndOr
              ops: [Id.Op_DPipe Id.Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:head)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:709)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Simple
                                    words: [{(git)} {(symbolic-ref)} {(-q)} {(HEAD)}]
                                    more_env: [
                                      (env_pair
                                        name: GIT_DIR
                                        val: {(DQ ($ Id.VSub_DollarName '$GIT_DIR'))}
                                        spids: [710]
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                      spids: [708]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:head)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:728)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Simple
                                    words: [{(git)} {(rev-parse)} {(--verify)} {(HEAD)}]
                                    more_env: [
                                      (env_pair
                                        name: GIT_DIR
                                        val: {(DQ ($ Id.VSub_DollarName '$GIT_DIR'))}
                                        spids: [729]
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                      spids: [727]
                    )
                  ]
                )
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:749)
                        command_list: 
                          (command.CommandList
                            children: [(C {(gettext)} {(DQ ('Bad HEAD - I need a HEAD'))})]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:start_head)
                  op: assign_op.Equal
                  rhs: {(SQ )}
                  spids: [772]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))})]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:start_head)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:797)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(cat)} 
                                        {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))}
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [796]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(DQ (z) ($ Id.VSub_DollarName '$mode'))} 
                              {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (z--no-checkout))}
                            )
                          ]
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (C {(git)} {(checkout)} {(DQ ($ Id.VSub_DollarName '$start_head'))} 
                                  {(--)}
                                )
                                (C {(die)} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 843
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(eval_gettext)} 
                                                {
                                                  (DQ ("Checking out '") 
                                                    (word_part.EscapedLiteral
                                                      token: 
                                                        (Token
                                                          id: Id.Lit_EscapedChar
                                                          val: '\\$'
                                                          span_id: 848
                                                        )
                                                    ) ("start_head' failed. Try 'git bisect reset <valid-branch>'.")
                                                  )
                                                }
                                              )
                                            ]
                                          )
                                      )
                                    )
                                  }
                                )
                              ]
                            )
                          ]
                          spids: [807 824]
                        )
                      ]
                    )
                  ]
                  spids: [777 789]
                )
              ]
              else_action: [
                (command.Case
                  to_match: {(DQ ($ Id.VSub_DollarName '$head'))}
                  arms: [
                    (case_arm
                      pat_list: [{(refs/heads/) (Id.Lit_Star '*')} {($ Id.VSub_DollarName '$_x40')}]
                      action: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(Id.Lit_LBracket '[')} {(-s)} 
                              {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/head-name))} {(Id.Lit_RBracket ']')}
                            )
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:910)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(gettext)} {(DQ ("won't bisect on cg-seek'ed tree"))})
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:start_head)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: (Token id:Id.VSub_Name val:head span_id:923)
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op_id: Id.VOp1_Pound
                                          arg_word: {(refs) (Id.Lit_Slash /) (heads) (Id.Lit_Slash /)}
                                        )
                                    )
                                  )
                                }
                              spids: [920]
                            )
                          ]
                        )
                      ]
                      spids: [874 878 933 -1]
                    )
                    (case_arm
                      pat_list: [{(Id.Lit_Star '*')}]
                      action: [
                        (C {(die)} 
                          {
                            (DQ 
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:943)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(gettext)} {(DQ ('Bad HEAD - strange symbolic ref'))})
                                    ]
                                  )
                              )
                            )
                          }
                        )
                      ]
                      spids: [936 937 953 -1]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(bisect_clean_state)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:979)
                )
              ]
            )
            (C {(trap)} {(SQ (Token id:Id.Lit_Chars val:bisect_clean_state span_id:1014))} {(0)})
            (C {(trap)} {(SQ (Token id:Id.Lit_Chars val:'exit 255' span_id:1023))} {(1)} {(2)} {(3)} {(15)})
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [{(echo)} {(DQ ($ Id.VSub_DollarName '$start_head'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:1054)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))}
                    )
                  ]
                )
                (command.BraceGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(test)} {(DQ (z) ($ Id.VSub_DollarName '$mode'))} 
                          {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (z--no-checkout))}
                        )
                        (C {(git)} {(update-ref)} {(--no-deref)} {(BISECT_HEAD)} 
                          {(DQ ($ Id.VSub_DollarName '$start_head'))}
                        )
                      ]
                    )
                  ]
                )
                (command.Simple
                  words: [{(git)} {(rev-parse)} {(--sq-quote)} {(DQ ($ Id.VSub_At '$@'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:1110)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_NAMES))}
                    )
                  ]
                )
                (C {(eval)} {(DQ ($ Id.VSub_DollarName '$eval') (' true'))})
                (command.If
                  arms: [
                    (if_arm
                      cond: [(C {(test)} {($ Id.VSub_DollarName '$must_write_terms')} {(-eq)} {(1)})]
                      action: [
                        (C {(write_terms)} {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))} 
                          {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                        )
                      ]
                      spids: [1129 1140]
                    )
                  ]
                )
                (command.Simple
                  words: [{(echo)} {(DQ ('git bisect start') ($ Id.VSub_DollarName '$orig_args'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_DGreat val:'>>' span_id:1166)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))}
                    )
                  ]
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:1174)
                )
              ]
            )
            (C {(bisect_auto_next)})
            (C {(trap)} {(SQ (Token id:Id.Lit_Chars val:- span_id:1196))} {(0)})
          ]
        )
    )
    (command.ShFunction
      name: bisect_write
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:state)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [1211]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:rev)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [1217]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:nolog)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$3'))}
                  spids: [1223]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$state'))}
              arms: [
                (case_arm
                  pat_list: [{(DQ ($ Id.VSub_DollarName '$TERM_BAD'))}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:tag)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName '$state'))}
                          spids: [1244]
                        )
                      ]
                    )
                  ]
                  spids: [1238 1241 1249 -1]
                )
                (case_arm
                  pat_list: [{(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))} {(skip)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:tag)
                          op: assign_op.Equal
                          rhs: 
                            {(DQ ($ Id.VSub_DollarName '$state')) (-) 
                              (DQ ($ Id.VSub_DollarName '$rev'))
                            }
                          spids: [1260]
                        )
                      ]
                    )
                  ]
                  spids: [1252 1257 1269 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (C {(die)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1279)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(eval_gettext)} 
                                    {
                                      (DQ ('Bad bisect_write argument: ') 
                                        (word_part.EscapedLiteral
                                          token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1284)
                                        ) (state)
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                  ]
                  spids: [1272 1273 1290 -1]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(git)} {(update-ref)} {(DQ (refs/bisect/) ($ Id.VSub_DollarName '$tag'))} 
                  {(DQ ($ Id.VSub_DollarName '$rev'))}
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:1311)
                )
              ]
            )
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ ('# ') ($ Id.VSub_DollarName '$state') (': ') 
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1320)
                      command_list: 
                        (command.CommandList
                          children: [(C {(git)} {(show-branch)} {($ Id.VSub_DollarName '$rev')})]
                        )
                    )
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_DGreat val:'>>' span_id:1329)
                  fd: -1
                  arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$nolog'))})
                (command.Simple
                  words: [
                    {(echo)}
                    {
                      (DQ ('git bisect ') ($ Id.VSub_DollarName '$state') (' ') 
                        ($ Id.VSub_DollarName '$rev')
                      )
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_DGreat val:'>>' span_id:1355)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: is_expected_rev
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(test)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_EXPECTED_REV))})
                (C {(test)} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} 
                  {
                    (command_sub
                      left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1391)
                      command_list: 
                        (command.CommandList
                          children: [
                            (C {(cat)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_EXPECTED_REV))})
                          ]
                        )
                    )
                  }
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_expected_revs
      body: 
        (command.BraceGroup
          children: [
            (command.ForEach
              iter_name: _rev
              iter_words: [{(DQ ($ Id.VSub_At '$@'))}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Pipeline
                              children: [(C {(is_expected_rev)} {(DQ ($ Id.VSub_DollarName '$_rev'))})]
                              negated: T
                            )
                          ]
                          action: [
                            (C {(rm)} {(-f)} 
                              {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_ANCESTORS_OK))}
                            )
                            (C {(rm)} {(-f)} 
                              {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_EXPECTED_REV))}
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Return val:return span_id:1458)
                            )
                          ]
                          spids: [1424 1435]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_skip
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:all)
                  op: assign_op.Equal
                  rhs: {(SQ )}
                  spids: [1476]
                )
              ]
            )
            (command.ForEach
              iter_name: arg
              iter_words: [{(DQ ($ Id.VSub_At '$@'))}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$arg'))}
                      arms: [
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*') (..) (Id.Lit_Star '*')}]
                          action: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:revs)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: 
                                              (Token
                                                id: Id.Left_DollarParen
                                                val: '$('
                                                span_id: 1511
                                              )
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {(git)} {(rev-list)} 
                                                    {(DQ ($ Id.VSub_DollarName '$arg'))}
                                                  )
                                                ]
                                              )
                                          )
                                        }
                                      spids: [1510]
                                    )
                                  ]
                                )
                                (C {(die)} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 1526
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(eval_gettext)} 
                                                {
                                                  (DQ ('Bad rev input: ') 
                                                    (word_part.EscapedLiteral
                                                      token: 
                                                        (Token
                                                          id: Id.Lit_EscapedChar
                                                          val: '\\$'
                                                          span_id: 1531
                                                        )
                                                    ) (arg)
                                                  )
                                                }
                                              )
                                            ]
                                          )
                                      )
                                    )
                                  }
                                )
                              ]
                            )
                          ]
                          spids: [1504 1507 1537 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:revs)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 1545
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(git)} {(rev-parse)} {(--sq-quote)} 
                                                {(DQ ($ Id.VSub_DollarName '$arg'))}
                                              )
                                            ]
                                          )
                                      )
                                    }
                                  spids: [1544]
                                )
                              ]
                            )
                          ]
                          spids: [1540 1541 1557 -1]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:all)
                          op: assign_op.Equal
                          rhs: 
                            {(DQ ($ Id.VSub_DollarName '$all') (' ') ($ Id.VSub_DollarName '$revs'))}
                          spids: [1563]
                        )
                      ]
                    )
                  ]
                )
            )
            (C {(eval)} {(bisect_state)} {(SQ (Token id:Id.Lit_Chars val:skip span_id:1579))} 
              {($ Id.VSub_DollarName '$all')}
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_state
      body: 
        (command.BraceGroup
          children: [
            (C {(bisect_autostart)})
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:state)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [1597]
                )
              ]
            )
            (C {(check_and_set_terms)} {($ Id.VSub_DollarName '$state')})
            (command.Case
              to_match: {(DQ ($ Id.VSub_Pound '$#') (',') ($ Id.VSub_DollarName '$state'))}
              arms: [
                (case_arm
                  pat_list: [{(0) (Id.Lit_Comma ',') (Id.Lit_Star '*')}]
                  action: [(C {(die)} {(DQ ("Please call 'bisect_state' with at least one argument."))})]
                  spids: [1617 1620 1629 -1]
                )
                (case_arm
                  pat_list: [
                    {(1) (Id.Lit_Comma ',') (DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                    {(1) (Id.Lit_Comma ',') (DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                    {(1) (Id.Lit_Comma ',') (skip)}
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:bisected_head)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1651)
                                command_list: (command.CommandList children:[(C {(bisect_head)})])
                              )
                            }
                          spids: [1650]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:rev)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1657)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(git)} {(rev-parse)} {(--verify)} 
                                            {(DQ ($ Id.VSub_DollarName '$bisected_head'))}
                                          )
                                        ]
                                      )
                                  )
                                }
                              spids: [1656]
                            )
                          ]
                        )
                        (C {(die)} 
                          {
                            (DQ 
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1675)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(eval_gettext)} 
                                        {
                                          (DQ ('Bad rev input: ') 
                                            (word_part.EscapedLiteral
                                              token: 
                                                (Token
                                                  id: Id.Lit_EscapedChar
                                                  val: '\\$'
                                                  span_id: 1680
                                                )
                                            ) (bisected_head)
                                          )
                                        }
                                      )
                                    ]
                                  )
                              )
                            )
                          }
                        )
                      ]
                    )
                    (C {(bisect_write)} {(DQ ($ Id.VSub_DollarName '$state'))} 
                      {(DQ ($ Id.VSub_DollarName '$rev'))}
                    )
                    (C {(check_expected_revs)} {(DQ ($ Id.VSub_DollarName '$rev'))})
                  ]
                  spids: [1632 1647 1704 -1]
                )
                (case_arm
                  pat_list: [
                    {(2) (Id.Lit_Comma ',') (DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                    {(Id.Lit_Star '*') (Id.Lit_Comma ',') (DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                    {(Id.Lit_Star '*') (Id.Lit_Comma ',') (skip)}
                  ]
                  action: [
                    (C {(shift)})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:hash_list)
                          op: assign_op.Equal
                          rhs: {(SQ )}
                          spids: [1728]
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: rev
                      iter_words: [{(DQ ($ Id.VSub_At '$@'))}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.AndOr
                              ops: [Id.Op_DPipe]
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:sha)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: 
                                              (Token
                                                id: Id.Left_DollarParen
                                                val: '$('
                                                span_id: 1748
                                              )
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (C {(git)} {(rev-parse)} {(--verify)} 
                                                    {(DQ ($ Id.VSub_DollarName '$rev') ('^{commit}'))}
                                                  )
                                                ]
                                              )
                                          )
                                        }
                                      spids: [1747]
                                    )
                                  ]
                                )
                                (C {(die)} 
                                  {
                                    (DQ 
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 1767
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(eval_gettext)} 
                                                {
                                                  (DQ ('Bad rev input: ') 
                                                    (word_part.EscapedLiteral
                                                      token: 
                                                        (Token
                                                          id: Id.Lit_EscapedChar
                                                          val: '\\$'
                                                          span_id: 1772
                                                        )
                                                    ) (rev)
                                                  )
                                                }
                                              )
                                            ]
                                          )
                                      )
                                    )
                                  }
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:hash_list)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName '$hash_list') (' ') 
                                        ($ Id.VSub_DollarName '$sha')
                                      )
                                    }
                                  spids: [1779]
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.ForEach
                      iter_name: rev
                      iter_words: [{($ Id.VSub_DollarName '$hash_list')}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (C {(bisect_write)} {(DQ ($ Id.VSub_DollarName '$state'))} 
                              {(DQ ($ Id.VSub_DollarName '$rev'))}
                            )
                          ]
                        )
                    )
                    (C {(check_expected_revs)} {($ Id.VSub_DollarName '$hash_list')})
                  ]
                  spids: [1707 1722 1820 -1]
                )
                (case_arm
                  pat_list: [
                    {(Id.Lit_Star '*') (Id.Lit_Comma ',') (DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                  ]
                  action: [
                    (C {(die)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1834)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(eval_gettext)} 
                                    {
                                      (DQ ("'git bisect ") 
                                        (word_part.EscapedLiteral
                                          token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1839)
                                        ) ("TERM_BAD' can take only one argument.")
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                  ]
                  spids: [1823 1828 1845 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(usage)})]
                  spids: [1848 1849 1854 -1]
                )
              ]
            )
            (C {(bisect_auto_next)})
          ]
        )
    )
    (command.ShFunction
      name: bisect_next_check
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:missing_good)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [1872]
                )
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:missing_bad)
                  op: assign_op.Equal
                  rhs: (word.Empty)
                  spids: [1874]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(git)} {(show-ref)} {(-q)} {(--verify)} 
                  {(refs/bisect/) ($ Id.VSub_DollarName '$TERM_BAD')}
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:missing_bad)
                      op: assign_op.Equal
                      rhs: {(t)}
                      spids: [1890]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-n)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1899)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(git)} {(for-each-ref)} 
                                {(DQ (refs/bisect/) ($ Id.VSub_DollarName '$TERM_GOOD') ('-*'))}
                              )
                            ]
                          )
                      )
                    )
                  }
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:missing_good)
                      op: assign_op.Equal
                      rhs: {(t)}
                      spids: [1914]
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: 
                {
                  (DQ ($ Id.VSub_DollarName '$missing_good') (',') 
                    ($ Id.VSub_DollarName '$missing_bad') (',') ($ Id.VSub_Number '$1')
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(Id.Lit_Comma ',') (Id.Lit_Comma ',') (Id.Lit_Star '*')}]
                  action: [
                    (C {(Id.Lit_Other ':')} {(have)} {(both)} {($ Id.VSub_DollarName '$TERM_GOOD')} 
                      {(and)} {($ Id.VSub_DollarName '$TERM_BAD')} {(-)} {(ok)}
                    )
                  ]
                  spids: [1932 1935 1955 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*') (Id.Lit_Comma ',')}]
                  action: [(C {(false)})]
                  spids: [1958 1960 1970 -1]
                )
                (case_arm
                  pat_list: [
                    {(t) (Id.Lit_Comma ',') (Id.Lit_Comma ',') (DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                  ]
                  action: [
                    (command.Simple
                      words: [
                        {(eval_gettextln)}
                        {
                          (DQ ('Warning: bisecting only with a ') 
                            (word_part.EscapedLiteral
                              token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1994)
                            ) ('TERM_BAD commit.')
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1998)
                          fd: -1
                          arg_word: {(2)}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-t)} {(0)})]
                          action: [
                            (command.Simple
                              words: [{(gettext)} {(DQ ('Are you sure [Y/n]? '))}]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2032)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (C {(read)} {(yesno)})
                            (command.Case
                              to_match: {(DQ ($ Id.VSub_DollarName '$yesno'))}
                              arms: [
                                (case_arm
                                  pat_list: [
                                    {(Id.Lit_LBracket '[') (Nn) (Id.Lit_RBracket ']') (Id.Lit_Star '*')}
                                  ]
                                  action: [
                                    (command.ControlFlow
                                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:2055)
                                      arg_word: {(1)}
                                    )
                                  ]
                                  spids: [2049 2053 2059 -1]
                                )
                              ]
                            )
                          ]
                          spids: [2002 2011]
                        )
                      ]
                    )
                    (C {(Id.Lit_Other ':')} {(bisect)} {(without)} 
                      {($ Id.VSub_DollarName '$TERM_GOOD') (...)}
                    )
                  ]
                  spids: [1973 1979 2077 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:bad_syn)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2085)
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(bisect_voc)} {(bad)})]
                                  )
                              )
                            }
                          spids: [2084]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:good_syn)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2093)
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(bisect_voc)} {(good)})]
                                  )
                              )
                            }
                          spids: [2092]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))})
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(eval_gettextln)}
                                {
                                  (DQ ('You need to give me at least one ') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:2120)
                                    ) ('bad_syn and one ') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:2122)
                                    ) ('good_syn revision.\n') ('(You can use ') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2125)
                                    ) ('git bisect ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:2127)) 
                                    (bad_syn) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:2129)) (' and ') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2131)
                                    ) ('git bisect ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:2133)) 
                                    (good_syn) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:2135)) (' for that.)')
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2139)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          ]
                          spids: [2100 2112]
                        )
                      ]
                      else_action: [
                        (command.Simple
                          words: [
                            {(eval_gettextln)}
                            {
                              (DQ ('You need to start by ') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2150)
                                ) ('git bisect start') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2152)
                                ) ('.\n') ('You then need to give me at least one ') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:2155)
                                ) ('good_syn and one ') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:2157)
                                ) ('bad_syn revision.\n') ('(You can use ') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2160)
                                ) ('git bisect ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:2162)) 
                                (bad_syn) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:2164)) (' and ') 
                                (word_part.EscapedLiteral
                                  token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:2166)
                                ) ('git bisect ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:2168)) 
                                (good_syn) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:2170)) (' for that.)')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2174)
                              fd: -1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:2181)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [2080 2081 2185 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_auto_next
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [(C {(bisect_next_check)}) (C {(bisect_next)}) (C {(Id.Lit_Other ':')})]
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_next
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Pound '$#'))}
              arms: [
                (case_arm pat_list:[{(0)}] spids:[2228 2229 2231 -1])
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(usage)})]
                  spids: [2233 2234 2238 -1]
                )
              ]
            )
            (C {(bisect_autostart)})
            (C {(bisect_next_check)} {($ Id.VSub_DollarName '$TERM_GOOD')})
            (C {(git)} {(bisect--helper)} {(--next-all)} 
              {
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2262)
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(test)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_HEAD))})
                            (C {(echo)} {(--no-checkout)})
                          ]
                        )
                      ]
                    )
                )
              }
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:res)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_QMark '$?')}
                  spids: [2280]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ Id.VSub_DollarName '$res')} {(-eq)} {(10)})]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:bad_rev)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2304)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(show-ref)} {(--hash)} {(--verify)} 
                                        {(refs/bisect/) ($ Id.VSub_DollarName '$TERM_BAD')}
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [2303]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:bad_commit)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2319)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(show-branch)} {($ Id.VSub_DollarName '$bad_rev')})
                                    ]
                                  )
                              )
                            }
                          spids: [2318]
                        )
                      ]
                    )
                    (command.Simple
                      words: [
                        {(echo)}
                        {
                          (DQ ('# first ') ($ Id.VSub_DollarName '$TERM_BAD') (' commit: ') 
                            ($ Id.VSub_DollarName '$bad_commit')
                          )
                        }
                      ]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_DGreat val:'>>' span_id:2337)
                          fd: -1
                          arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))}
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:2344)
                      arg_word: {(0)}
                    )
                  ]
                  spids: [2289 2300]
                )
                (if_arm
                  cond: [(C {(test)} {($ Id.VSub_DollarName '$res')} {(-eq)} {(2)})]
                  action: [
                    (command.Simple
                      words: [{(echo)} {(DQ ('# only skipped commits left to test'))}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_DGreat val:'>>' span_id:2369)
                          fd: -1
                          arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))}
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:good_revs)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2377)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(for-each-ref)} 
                                        {(--format) (Id.Lit_Equals '=') (DQ ('%(objectname)'))} {(DQ (refs/bisect/) ($ Id.VSub_DollarName '$TERM_GOOD') ('-*'))}
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [2376]
                        )
                      ]
                    )
                    (command.ForEach
                      iter_name: skipped
                      iter_words: [
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2402)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(git)} {(rev-list)} 
                                    {(refs/bisect/) ($ Id.VSub_DollarName '$TERM_BAD')} {(--not)} {($ Id.VSub_DollarName '$good_revs')}
                                  )
                                ]
                              )
                          )
                        }
                      ]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:skipped_commit)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (command_sub
                                        left_token: 
                                          (Token
                                            id: Id.Left_DollarParen
                                            val: '$('
                                            span_id: 2420
                                          )
                                        command_list: 
                                          (command.CommandList
                                            children: [
                                              (C {(git)} {(show-branch)} 
                                                {($ Id.VSub_DollarName '$skipped')}
                                              )
                                            ]
                                          )
                                      )
                                    }
                                  spids: [2419]
                                )
                              ]
                            )
                            (command.Simple
                              words: [
                                {(echo)}
                                {
                                  (DQ ('# possible first ') ($ Id.VSub_DollarName '$TERM_BAD') 
                                    (' commit: ') ($ Id.VSub_DollarName '$skipped_commit')
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_DGreat val:'>>' span_id:2438)
                                  fd: -1
                                  arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))}
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:2448)
                      arg_word: {($ Id.VSub_DollarName '$res')}
                    )
                  ]
                  spids: [2349 2360]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(test)} {($ Id.VSub_DollarName '$res')} {(-ne)} {(0)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:2471)
                  arg_word: {($ Id.VSub_DollarName '$res')}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:2477)
              arg_word: {(0)}
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_visualize
      body: 
        (command.BraceGroup
          children: [
            (C {(bisect_next_check)} {(fail)})
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(Id.Lit_Equals '=')} {(0)})]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.AndOr
                              ops: [Id.Op_DAmp]
                              children: [
                                (C {(test)} {(-n)} 
                                  {
                                    (DQ 
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Name val:DISPLAY span_id:2519)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VTest_Plus
                                            arg_word: {(set)}
                                          )
                                      ) 
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Name val:SESSIONNAME span_id:2524)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VTest_Plus
                                            arg_word: {(set)}
                                          )
                                      ) 
                                      (braced_var_sub
                                        token: (Token id:Id.VSub_Name val:MSYSTEM span_id:2529)
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VTest_Plus
                                            arg_word: {(set)}
                                          )
                                      ) 
                                      (braced_var_sub
                                        token: 
                                          (Token
                                            id: Id.VSub_Name
                                            val: SECURITYSESSIONID
                                            span_id: 2534
                                          )
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VTest_Plus
                                            arg_word: {(set)}
                                          )
                                      )
                                    )
                                  }
                                )
                                (command.Simple
                                  words: [{(type)} {(gitk)}]
                                  redirects: [
                                    (redir.Redir
                                      op: (Token id:Id.Redir_Great val:'>' span_id:2547)
                                      fd: -1
                                      arg_word: {(/dev/null)}
                                    )
                                    (redir.Redir
                                      op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:2550)
                                      fd: 2
                                      arg_word: {(1)}
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                          action: [(C {(Id.KW_Set set)} {(gitk)})]
                          spids: [2511 2554]
                        )
                      ]
                      else_action: [(C {(Id.KW_Set set)} {(git)} {(log)})]
                    )
                  ]
                  spids: [2497 2508]
                )
              ]
              else_action: [
                (command.Case
                  to_match: {(DQ ($ Id.VSub_Number '$1'))}
                  arms: [
                    (case_arm
                      pat_list: [{(git) (Id.Lit_Star '*')} {(tig)}]
                      spids: [2587 2591 2593 -1]
                    )
                    (case_arm
                      pat_list: [{(-) (Id.Lit_Star '*')}]
                      action: [(C {(Id.KW_Set set)} {(git)} {(log)} {(DQ ($ Id.VSub_At '$@'))})]
                      spids: [2596 2598 2610 -1]
                    )
                    (case_arm
                      pat_list: [{(Id.Lit_Star '*')}]
                      action: [(C {(Id.KW_Set set)} {(git)} {(DQ ($ Id.VSub_At '$@'))})]
                      spids: [2613 2614 2624 -1]
                    )
                  ]
                )
              ]
            )
            (C {(eval)} {(SQ (Token id:Id.Lit_Chars val:'"$@"' span_id:2637))} {(--bisect)} {(--)} 
              {
                (command_sub
                  left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2644)
                  command_list: 
                    (command.CommandList
                      children: [(C {(cat)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_NAMES))})]
                    )
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_reset
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))})
                (command.BraceGroup
                  children: [
                    (C {(gettextln)} {(DQ ('We are not bisecting.'))})
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Return val:return span_id:2684)
                    )
                  ]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_Pound '$#'))}
              arms: [
                (case_arm
                  pat_list: [{(0)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:branch)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2703)
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(cat)} 
                                        {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))}
                                      )
                                    ]
                                  )
                              )
                            }
                          spids: [2702]
                        )
                      ]
                    )
                  ]
                  spids: [2699 2700 2712 -1]
                )
                (case_arm
                  pat_list: [{(1)}]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.Simple
                          words: [
                            {(git)}
                            {(rev-parse)}
                            {(--quiet)}
                            {(--verify)}
                            {(DQ ($ Id.VSub_Number '$1') ('^{commit}'))}
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_Great val:'>' span_id:2731)
                              fd: -1
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                        (command.BraceGroup
                          children: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:invalid)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                                  spids: [2739]
                                )
                              ]
                            )
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2748)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ ("'") 
                                                (word_part.EscapedLiteral
                                                  token: 
                                                    (Token
                                                      id: Id.Lit_EscapedChar
                                                      val: '\\$'
                                                      span_id: 2753
                                                    )
                                                ) ("invalid' is not a valid commit")
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:branch)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_Number '$1'))}
                          spids: [2763]
                        )
                      ]
                    )
                  ]
                  spids: [2715 2716 2768 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(usage)})]
                  spids: [2771 2772 2777 -1]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (command.Pipeline
                          children: [
                            (C {(test)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_HEAD))})
                          ]
                          negated: T
                        )
                        (command.Pipeline
                          children: [
                            (C {(git)} {(checkout)} {(DQ ($ Id.VSub_DollarName '$branch'))} {(--)})
                          ]
                          negated: T
                        )
                      ]
                    )
                  ]
                  action: [
                    (C {(die)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2818)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(eval_gettext)} 
                                    {
                                      (DQ ("Could not check out original HEAD '") 
                                        (word_part.EscapedLiteral
                                          token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:2823)
                                        ) ("branch'.\n") ("Try 'git bisect reset <commit>'.")
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                  ]
                  spids: [2784 2812]
                )
              ]
            )
            (C {(bisect_clean_state)})
          ]
        )
    )
    (command.ShFunction
      name: bisect_clean_state
      body: 
        (command.BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {(git)} {(for-each-ref)} 
                  {(--format) (Id.Lit_Equals '=') 
                    (SQ (Token id:Id.Lit_Chars val:'%(refname) %(objectname)' span_id:2857))
                  } {(refs/bisect/) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\*' span_id:2861))}
                )
                (command.WhileUntil
                  keyword: (Token id:Id.KW_While val:while span_id:2866)
                  cond: [(C {(read)} {(ref)} {(hash)})]
                  body: 
                    (command.DoGroup
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DPipe]
                          children: [
                            (C {(git)} {(update-ref)} {(-d)} {($ Id.VSub_DollarName '$ref')} 
                              {($ Id.VSub_DollarName '$hash')}
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Exit val:exit span_id:2890)
                            )
                          ]
                        )
                      ]
                    )
                )
              ]
              negated: F
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_EXPECTED_REV))})
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_ANCESTORS_OK))})
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))})
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_NAMES))})
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_RUN))})
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))})
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/head-name))})
                (C {(git)} {(update-ref)} {(-d)} {(--no-deref)} {(BISECT_HEAD)})
                (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_START))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_replay
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:file)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [3021]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(DQ ($ Id.VSub_Pound '$#'))} {(-eq)} {(1)})
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3042)
                        command_list: 
                          (command.CommandList
                            children: [(C {(gettext)} {(DQ ('No logfile given'))})]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-r)} {(DQ ($ Id.VSub_DollarName '$file'))})
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3065)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ('cannot read ') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:3070)
                                    ) ('file for replaying')
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (C {(bisect_reset)})
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:3080)
              cond: [(C {(read)} {(git)} {(bisect)} {(command)} {(rev)})]
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DPipe Id.Op_DPipe]
                      children: [
                        (C {(test)} 
                          {(DQ ($ Id.VSub_DollarName '$git') (' ') ($ Id.VSub_DollarName '$bisect'))} {(Id.Lit_Equals '=')} {(DQ ('git bisect'))}
                        )
                        (C {(test)} {(DQ ($ Id.VSub_DollarName '$git'))} {(Id.Lit_Equals '=')} 
                          {(DQ (git-bisect))}
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Continue val:continue span_id:3126)
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(DQ ($ Id.VSub_DollarName '$git'))} {(Id.Lit_Equals '=')} 
                              {(DQ (git-bisect))}
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:rev)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$command'))}
                                  spids: [3147]
                                )
                              ]
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:command)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$bisect'))}
                                  spids: [3153]
                                )
                              ]
                            )
                          ]
                          spids: [3129 3144]
                        )
                      ]
                    )
                    (C {(get_terms)})
                    (C {(check_and_set_terms)} {(DQ ($ Id.VSub_DollarName '$command'))})
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$command'))}
                      arms: [
                        (case_arm
                          pat_list: [{(start)}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:cmd)
                                  op: assign_op.Equal
                                  rhs: {(DQ ('bisect_start ') ($ Id.VSub_DollarName '$rev'))}
                                  spids: [3185]
                                )
                              ]
                            )
                            (C {(eval)} {(DQ ($ Id.VSub_DollarName '$cmd'))})
                          ]
                          spids: [3181 3182 3198 -1]
                        )
                        (case_arm
                          pat_list: [
                            {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                            {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                            {(skip)}
                          ]
                          action: [
                            (C {(bisect_write)} {(DQ ($ Id.VSub_DollarName '$command'))} 
                              {(DQ ($ Id.VSub_DollarName '$rev'))}
                            )
                          ]
                          spids: [3201 3210 3223 -1]
                        )
                        (case_arm
                          pat_list: [{(terms)}]
                          action: [(C {(bisect_terms)} {($ Id.VSub_DollarName '$rev')})]
                          spids: [3226 3227 3234 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3244)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(gettext)} {(DQ ('?? what are you talking about?'))})
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                          spids: [3237 3238 3253 -1]
                        )
                      ]
                    )
                  ]
                )
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Less val:'<' span_id:3261)
                  fd: -1
                  arg_word: {(DQ ($ Id.VSub_DollarName '$file'))}
                )
              ]
            )
            (C {(bisect_auto_next)})
          ]
        )
    )
    (command.ShFunction
      name: bisect_run
      body: 
        (command.BraceGroup
          children: [
            (C {(bisect_next_check)} {(fail)})
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:3286)
              cond: [(C {(true)})]
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:command)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_At '$@'))}
                          spids: [3294]
                        )
                      ]
                    )
                    (C {(eval_gettextln)} 
                      {
                        (DQ ('running ') 
                          (word_part.EscapedLiteral
                            token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:3304)
                          ) (command)
                        )
                      }
                    )
                    (C {(DQ ($ Id.VSub_At '$@'))})
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:res)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_QMark '$?')}
                          spids: [3314]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$res')} {(-lt)} {(0)} 
                              {(-o)} {($ Id.VSub_DollarName '$res')} {(-ge)} {(128)} {(Id.Lit_RBracket ']')}
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(eval_gettextln)}
                                {
                                  (DQ ('bisect run failed:\n') ('exit code ') 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:3352)
                                    ) ("res from '") (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:3354)) 
                                    ("command' is < 0 or >= 128")
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:3358)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Exit val:exit span_id:3362)
                              arg_word: {($ Id.VSub_DollarName '$res')}
                            )
                          ]
                          spids: [3323 3344]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$res')} {(-eq)} {(125)} 
                              {(Id.Lit_RBracket ']')}
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:state)
                                  op: assign_op.Equal
                                  rhs: {(SQ (Token id:Id.Lit_Chars val:skip span_id:3397))}
                                  spids: [3395]
                                )
                              ]
                            )
                          ]
                          spids: [3379 3392]
                        )
                        (if_arm
                          cond: [
                            (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$res')} {(-gt)} {(0)} 
                              {(Id.Lit_RBracket ']')}
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:state)
                                  op: assign_op.Equal
                                  rhs: {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                                  spids: [3417]
                                )
                              ]
                            )
                          ]
                          spids: [3401 3414]
                        )
                      ]
                      else_action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:state)
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                              spids: [3426]
                            )
                          ]
                        )
                      ]
                    )
                    (command.Subshell
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Simple
                              words: [{(bisect_state)} {($ Id.VSub_DollarName '$state')}]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Great val:'>' span_id:3446)
                                  fd: -1
                                  arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_RUN))}
                                )
                              ]
                            )
                          ]
                        )
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:res)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_QMark '$?')}
                          spids: [3455]
                        )
                      ]
                    )
                    (C {(cat)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_RUN))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Simple
                              words: [
                                {(sane_grep)}
                                {
                                  (DQ ('first ') ($ Id.VSub_DollarName '$TERM_BAD') 
                                    (' commit could be any of')
                                  )
                                }
                                {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_RUN))}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Great val:'>' span_id:3486)
                                  fd: -1
                                  arg_word: {(/dev/null)}
                                )
                              ]
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [{(gettextln)} {(DQ ('bisect run cannot continue any more'))}]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:3499)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Exit val:exit span_id:3503)
                              arg_word: {($ Id.VSub_DollarName '$res')}
                            )
                          ]
                          spids: [3469 3490]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(Id.Lit_LBracket '[')} {($ Id.VSub_DollarName '$res')} {(-ne)} {(0)} 
                              {(Id.Lit_RBracket ']')}
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(eval_gettextln)}
                                {
                                  (DQ ('bisect run failed:\n') ("'bisect_state ") 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:3533)
                                    ) ("state' exited with error code ") 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:3535)
                                    ) (res)
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:3539)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Exit val:exit span_id:3543)
                              arg_word: {($ Id.VSub_DollarName '$res')}
                            )
                          ]
                          spids: [3512 3525]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Simple
                              words: [
                                {(sane_grep)}
                                {
                                  (DQ ('is the first ') ($ Id.VSub_DollarName '$TERM_BAD') (' commit'))
                                }
                                {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_RUN))}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_Great val:'>' span_id:3567)
                                  fd: -1
                                  arg_word: {(/dev/null)}
                                )
                              ]
                            )
                          ]
                          action: [
                            (C {(gettextln)} {(DQ ('bisect run success'))})
                            (command.Sentence
                              child: 
                                (command.ControlFlow
                                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:3581)
                                  arg_word: {(0)}
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:3584)
                            )
                          ]
                          spids: [3552 3571]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_log
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))})
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3618)
                        command_list: 
                          (command.CommandList
                            children: [(C {(gettext)} {(DQ ('We are not bisecting.'))})]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (C {(cat)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_LOG))})
          ]
        )
    )
    (command.ShFunction
      name: get_terms
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))})]
                  action: [
                    (command.BraceGroup
                      children: [(C {(read)} {(TERM_BAD)}) (C {(read)} {(TERM_GOOD)})]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Less val:'<' span_id:3676)
                          fd: -1
                          arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))}
                        )
                      ]
                    )
                  ]
                  spids: [3646 3658]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: write_terms
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TERM_BAD)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [3696]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TERM_GOOD)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$2')}
                  spids: [3700]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(test)} {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))} {(Id.Lit_Equals '=')} 
                      {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                    )
                  ]
                  action: [
                    (C {(die)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3725)
                            command_list: 
                              (command.CommandList
                                children: [(C {(gettext)} {(DQ ('please use two different terms'))})]
                              )
                          )
                        )
                      }
                    )
                  ]
                  spids: [3704 3719]
                )
              ]
            )
            (C {(check_term_format)} {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))} {(bad)})
            (C {(check_term_format)} {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))} {(good)})
            (command.Simple
              words: [
                {(printf)}
                {(SQ (Token id:Id.Lit_Chars val:'%s\\n%s\\n' span_id:3759))}
                {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_Great val:'>' span_id:3770)
                  fd: -1
                  arg_word: {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_term_format
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:term)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number '$1')}
                  spids: [3787]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(git)} {(check-ref-format)} {(refs/bisect/) (DQ ($ Id.VSub_DollarName '$term'))})
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3806)
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ("'") 
                                    (word_part.EscapedLiteral
                                      token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:3811)
                                    ) ("term' is not a valid term")
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$term'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(help)}
                    {(start)}
                    {(terms)}
                    {(skip)}
                    {(next)}
                    {(reset)}
                    {(visualize)}
                    {(replay)}
                    {(log)}
                    {(run)}
                  ]
                  action: [
                    (C {(die)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3852)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(eval_gettext)} 
                                    {
                                      (DQ ("can't use the builtin command '") 
                                        (word_part.EscapedLiteral
                                          token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:3857)
                                        ) ("term' as a term")
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                  ]
                  spids: [3827 3846 3864 -1]
                )
                (case_arm
                  pat_list: [{(bad)} {(new)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(DQ ($ Id.VSub_Number '$2'))} 
                              {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(bad)}
                            )
                          ]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3909)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ ("can't change the meaning of term '") 
                                                (word_part.EscapedLiteral
                                                  token: 
                                                    (Token
                                                      id: Id.Lit_EscapedChar
                                                      val: '\\$'
                                                      span_id: 3914
                                                    )
                                                ) ("term'")
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                          spids: [3873 3887]
                        )
                      ]
                    )
                  ]
                  spids: [3867 3870 3924 -1]
                )
                (case_arm
                  pat_list: [{(good)} {(old)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(DQ ($ Id.VSub_Number '$2'))} 
                              {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(good)}
                            )
                          ]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:3953)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ ("can't change the meaning of term '") 
                                                (word_part.EscapedLiteral
                                                  token: 
                                                    (Token
                                                      id: Id.Lit_EscapedChar
                                                      val: '\\$'
                                                      span_id: 3958
                                                    )
                                                ) ("term'")
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                          spids: [3933 3947]
                        )
                      ]
                    )
                  ]
                  spids: [3927 3930 3968 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_and_set_terms
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:cmd)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [3984]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$cmd'))}
              arms: [
                (case_arm
                  pat_list: [{(skip)} {(start)} {(terms)}]
                  spids: [3999 4004 4006 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.AndOr
                              ops: [Id.Op_DAmp Id.Op_DAmp]
                              children: [
                                (C {(test)} {(-s)} 
                                  {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))}
                                )
                                (C {(test)} {(DQ ($ Id.VSub_DollarName '$cmd'))} 
                                  {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                                )
                                (C {(test)} {(DQ ($ Id.VSub_DollarName '$cmd'))} 
                                  {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                                )
                              ]
                            )
                          ]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4061)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ ("Invalid command: you're currently in a ") 
                                                (word_part.EscapedLiteral
                                                  token: 
                                                    (Token
                                                      id: Id.Lit_EscapedChar
                                                      val: '\\$'
                                                      span_id: 4066
                                                    )
                                                ) (TERM_BAD/) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:4068)) 
                                                ('TERM_GOOD bisect.')
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                          spids: [4013 4055]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$cmd'))}
                      arms: [
                        (case_arm
                          pat_list: [{(bad)} {(good)}]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Pipeline
                                      children: [
                                        (C {(test)} {(-s)} 
                                          {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))}
                                        )
                                      ]
                                      negated: T
                                    )
                                  ]
                                  action: [(C {(write_terms)} {(bad)} {(good)})]
                                  spids: [4093 4107]
                                )
                              ]
                            )
                          ]
                          spids: [4087 4090 4120 -1]
                        )
                        (case_arm
                          pat_list: [{(new)} {(old)}]
                          action: [
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (command.Pipeline
                                      children: [
                                        (C {(test)} {(-s)} 
                                          {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))}
                                        )
                                      ]
                                      negated: T
                                    )
                                  ]
                                  action: [(C {(write_terms)} {(new)} {(old)})]
                                  spids: [4129 4143]
                                )
                              ]
                            )
                          ]
                          spids: [4123 4126 4156 -1]
                        )
                      ]
                    )
                  ]
                  spids: [4009 4010 4161 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_voc
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(bad)}]
                  action: [(C {(echo)} {(DQ ('bad|new'))})]
                  spids: [4186 4187 4195 -1]
                )
                (case_arm
                  pat_list: [{(good)}]
                  action: [(C {(echo)} {(DQ ('good|old'))})]
                  spids: [4198 4199 4207 -1]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: bisect_terms
      body: 
        (command.BraceGroup
          children: [
            (C {(get_terms)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Pipeline
                      children: [
                        (C {(test)} {(-s)} {(DQ ($ Id.VSub_DollarName '$GIT_DIR') (/BISECT_TERMS))})
                      ]
                      negated: T
                    )
                  ]
                  action: [
                    (C {(die)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4246)
                            command_list: 
                              (command.CommandList
                                children: [(C {(gettext)} {(DQ ('no terms defined'))})]
                              )
                          )
                        )
                      }
                    )
                  ]
                  spids: [4226 4240]
                )
              ]
            )
            (command.Case
              to_match: {(DQ ($ Id.VSub_Pound '$#'))}
              arms: [
                (case_arm
                  pat_list: [{(0)}]
                  action: [
                    (C {(gettextln)} 
                      {
                        (DQ ('Your current terms are ') ($ Id.VSub_DollarName '$TERM_GOOD') 
                          (' for the old state\n') ('and ') ($ Id.VSub_DollarName '$TERM_BAD') (' for the new state.')
                        )
                      }
                    )
                  ]
                  spids: [4268 4269 4284 -1]
                )
                (case_arm
                  pat_list: [{(1)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:arg)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_Number '$1')}
                          spids: [4291]
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_DollarName '$arg'))}
                      arms: [
                        (case_arm
                          pat_list: [{(--term-good)} {(--term-old)}]
                          action: [
                            (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:4313))} 
                              {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                            )
                          ]
                          spids: [4304 4307 4321 -1]
                        )
                        (case_arm
                          pat_list: [{(--term-bad)} {(--term-new)}]
                          action: [
                            (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:4333))} 
                              {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                            )
                          ]
                          spids: [4324 4327 4341 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4351)
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ ('invalid argument ') 
                                                (word_part.EscapedLiteral
                                                  token: 
                                                    (Token
                                                      id: Id.Lit_EscapedChar
                                                      val: '\\$'
                                                      span_id: 4356
                                                    )
                                                ) ("arg for 'git bisect terms'.\n") 
                                                (
'Supported options are: --term-good|--term-old and --term-bad|--term-new.'
                                                )
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                          spids: [4344 4345 4364 -1]
                        )
                      ]
                    )
                  ]
                  spids: [4287 4288 4370 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(usage)})]
                  spids: [4373 4374 4379 -1]
                )
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Pound '$#'))}
      arms: [
        (case_arm pat_list:[{(0)}] action:[(C {(usage)})] spids:[4395 4396 4401 -1])
        (case_arm
          pat_list: [{(Id.Lit_Star '*')}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:cmd)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [4407]
                )
              ]
            )
            (C {(get_terms)})
            (C {(shift)})
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$cmd'))}
              arms: [
                (case_arm
                  pat_list: [{(help)}]
                  action: [(C {(git)} {(bisect)} {(-h)})]
                  spids: [4428 4429 4438 -1]
                )
                (case_arm
                  pat_list: [{(start)}]
                  action: [(C {(bisect_start)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4441 4442 4451 -1]
                )
                (case_arm
                  pat_list: [
                    {(bad)}
                    {(good)}
                    {(new)}
                    {(old)}
                    {(DQ ($ Id.VSub_DollarName '$TERM_BAD'))}
                    {(DQ ($ Id.VSub_DollarName '$TERM_GOOD'))}
                  ]
                  action: [
                    (C {(bisect_state)} {(DQ ($ Id.VSub_DollarName '$cmd'))} {(DQ ($ Id.VSub_At '$@'))})
                  ]
                  spids: [4454 4469 4482 -1]
                )
                (case_arm
                  pat_list: [{(skip)}]
                  action: [(C {(bisect_skip)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4485 4486 4495 -1]
                )
                (case_arm
                  pat_list: [{(next)}]
                  action: [(C {(bisect_next)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4498 4499 4512 -1]
                )
                (case_arm
                  pat_list: [{(visualize)} {(view)}]
                  action: [(C {(bisect_visualize)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4515 4518 4527 -1]
                )
                (case_arm
                  pat_list: [{(reset)}]
                  action: [(C {(bisect_reset)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4530 4531 4540 -1]
                )
                (case_arm
                  pat_list: [{(replay)}]
                  action: [(C {(bisect_replay)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4543 4544 4553 -1]
                )
                (case_arm
                  pat_list: [{(log)}]
                  action: [(C {(bisect_log)})]
                  spids: [4556 4557 4562 -1]
                )
                (case_arm
                  pat_list: [{(run)}]
                  action: [(C {(bisect_run)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4565 4566 4575 -1]
                )
                (case_arm
                  pat_list: [{(terms)}]
                  action: [(C {(bisect_terms)} {(DQ ($ Id.VSub_At '$@'))})]
                  spids: [4578 4579 4588 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [(C {(usage)})]
                  spids: [4591 4592 4597 -1]
                )
              ]
            )
          ]
          spids: [4403 4404 -1 4602]
        )
      ]
    )
  ]
)