(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:prec) op:Equal rhs:{(4)} spids:[19])]
      spids: [19]
    )
    (FuncDef
      name: read_state
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:onto_name)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [(C {(cat)} {(DQ ($ VSub_Name '$state_dir')) (/onto_name)})]
                              )
                            left_token: <Left_CommandSub '$('>
                            spids: [32 39]
                          )
                        }
                      spids: [31]
                    )
                  ]
                  spids: [31]
                )
                (AndOr
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:end)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [(C {(cat)} {(DQ ($ VSub_Name '$state_dir')) (/end)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [45 52]
                              )
                            }
                          spids: [44]
                        )
                      ]
                      spids: [44]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:msgnum)
                          op: Equal
                          rhs: 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [(C {(cat)} {(DQ ($ VSub_Name '$state_dir')) (/msgnum)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                                spids: [58 65]
                              )
                            }
                          spids: [57]
                        )
                      ]
                      spids: [57]
                    )
                  ]
                  op_id: Op_DAmp
                )
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [28]
        )
      spids: [23 27]
    )
    (FuncDef
      name: continue_merge
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (C {(test)} {(-d)} {(DQ ($ VSub_Name '$state_dir'))})
                (C {(die)} {(DQ ($ VSub_Name '$state_dir') (' directory does not exist'))})
              ]
              op_id: Op_DPipe
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:unmerged)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: (CommandList children:[(C {(git)} {(ls-files)} {(-u)})])
                        left_token: <Left_CommandSub '$('>
                        spids: [98 104]
                      )
                    }
                  spids: [97]
                )
              ]
              spids: [97]
            )
            (If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$unmerged'))})]
                  action: [
                    (C {(echo)} {(DQ ('You still have unmerged paths in your index'))})
                    (C {(echo)} {(DQ ('did you forget to use git add?'))})
                    (C {(die)} {(DQ ($ VSub_Name '$resolvemsg'))})
                  ]
                  spids: [16777215 118]
                )
              ]
              spids: [16777215 142]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmt)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(cat)} {(DQ ($ VSub_Name '$state_dir') (/current))})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [147 154]
                      )
                    }
                  spids: [146]
                )
              ]
              spids: [146]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Pipeline
                      children: [
                        (C {(git)} {(diff-index)} {(--quiet)} {(--ignore-submodules)} {(HEAD)} {(--)})
                      ]
                      negated: True
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Pipeline
                              children: [
                                (C {(git)} {(commit)} 
                                  {
                                    (BracedVarSub
                                      token: <VSub_Name gpg_sign_opt>
                                      suffix_op: 
                                        (StringUnary
                                          op_id: VTest_ColonPlus
                                          arg_word: {(DQ ($ VSub_Name '$gpg_sign_opt'))}
                                        )
                                      spids: [185 191]
                                    )
                                  } {(--no-verify)} {(-C)} {(DQ ($ VSub_Name '$cmt'))}
                                )
                              ]
                              negated: True
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('Commit failed, please do not call ') 
                                  (EscapedLiteralPart
                                    token: <Lit_EscapedChar '\\"'>
                                  ) ('git commit') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                                )
                              }
                            )
                            (C {(echo)} {(DQ ('directly, but instead do one of the following: '))})
                            (C {(die)} {(DQ ($ VSub_Name '$resolvemsg'))})
                          ]
                          spids: [16777215 202]
                        )
                      ]
                      spids: [16777215 229]
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_QUIET'))})]
                          action: [
                            (C {(printf)} {(DQ ('Committed: %0') (${ VSub_Name prec) ('d '))} 
                              {($ VSub_Name '$msgnum')}
                            )
                          ]
                          spids: [16777215 243]
                        )
                      ]
                      spids: [16777215 259]
                    )
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ($ VSub_Name '$cmt') (' ') 
                            (CommandSubPart
                              command_list: 
                                (CommandList
                                  children: [(C {(git)} {(rev-parse)} {(HEAD) (Lit_Other '^') (0)})]
                                )
                              left_token: <Left_CommandSub '$('>
                              spids: [267 275]
                            )
                          )
                        }
                      ]
                      redirects: [
                        (Redir
                          op_id: Redir_DGreat
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_Name '$state_dir') (/rewritten))}
                          spids: [278]
                        )
                      ]
                    )
                  ]
                  spids: [16777215 174]
                )
              ]
              else_action: [
                (If
                  arms: [
                    (if_arm
                      cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_QUIET'))})]
                      action: [
                        (C {(printf)} {(DQ ('Already applied: %0') (${ VSub_Name prec) ('d '))} 
                          {($ VSub_Name '$msgnum')}
                        )
                      ]
                      spids: [16777215 300]
                    )
                  ]
                  spids: [16777215 316]
                )
              ]
              spids: [286 319]
            )
            (AndOr
              children: [
                (C {(test)} {(-z)} {(DQ ($ VSub_Name '$GIT_QUIET'))})
                (SimpleCommand
                  words: [
                    {(git)}
                    {(log)}
                    {(--format) (Lit_Other '=') (Lit_Other '%') (s)}
                    {(-1)}
                    {(DQ ($ VSub_Name '$cmt'))}
                  ]
                  more_env: [(env_pair name:GIT_PAGER val:{(SQ )} spids:[333])]
                )
              ]
              op_id: Op_DAmp
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:msgnum)
                  op: Equal
                  rhs: 
                    {
                      (ArithSubPart
                        anode: 
                          (ArithBinary
                            op_id: Arith_Plus
                            left: (ArithWord w:{($ VSub_Name '$msgnum')})
                            right: (ArithWord w:{(Lit_Digits 1)})
                          )
                        spids: [359 366]
                      )
                    }
                  spids: [358]
                )
              ]
              spids: [358]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Name '$msgnum'))}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$state_dir') (/msgnum))}
                  spids: [375]
                )
              ]
            )
          ]
          spids: [75]
        )
      spids: [70 74]
    )
    (FuncDef
      name: call_merge
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:msgnum)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                  spids: [392]
                )
              ]
              spids: [392]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Name '$msgnum'))}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$state_dir') (/msgnum))}
                  spids: [404]
                )
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmt)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: 
                            (CommandList
                              children: [
                                (C {(cat)} 
                                  {(DQ ($ VSub_Name '$state_dir') (/cmt.) ($ VSub_Name '$msgnum'))}
                                )
                              ]
                            )
                          left_token: <Left_CommandSub '$('>
                          spids: [413 421]
                        )
                      )
                    }
                  spids: [411]
                )
              ]
              spids: [411]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Name '$cmt'))}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$state_dir') (/current))}
                  spids: [431]
                )
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:hd)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(git)} {(rev-parse)} {(--verify)} {(HEAD)})]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [440 448]
                      )
                    }
                  spids: [439]
                )
              ]
              spids: [439]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:cmt_name)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (AndOr
                                children: [
                                  (SimpleCommand
                                    words: [{(git)} {(symbolic-ref)} {(HEAD)}]
                                    redirects: [
                                      (Redir
                                        op_id: Redir_Great
                                        fd: 2
                                        arg_word: {(/dev/null)}
                                        spids: [459]
                                      )
                                    ]
                                  )
                                  (C {(echo)} {(HEAD)})
                                ]
                                op_id: Op_DPipe
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [452 468]
                      )
                    }
                  spids: [451]
                )
              ]
              spids: [451]
            )
            (C {(eval)} 
              {(GITHEAD_) ($ VSub_Name '$cmt') (Lit_Other '=') 
                (SQ <'"${cmt_name##refs/heads/}~$(($end - $msgnum))"'>)
              }
            )
            (C {(eval)} {(GITHEAD_) ($ VSub_Name '$hd') (Lit_Other '=') (SQ <'$onto_name'>)})
            (C {(export)} {(GITHEAD_) ($ VSub_Name '$cmt')} {(GITHEAD_) ($ VSub_Name '$hd')})
            (If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-n)} {(DQ ($ VSub_Name '$GIT_QUIET'))})]
                  action: [
                    (AndOr
                      children: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:GIT_MERGE_VERBOSITY)
                              op: Equal
                              rhs: {(1)}
                              spids: [514]
                            )
                          ]
                          spids: [514]
                        )
                        (C {(export)} {(GIT_MERGE_VERBOSITY)})
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  spids: [16777215 511]
                )
              ]
              spids: [16777215 524]
            )
            (AndOr
              children: [
                (C {(test)} {(-z)} {(DQ ($ VSub_Name '$strategy'))})
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:strategy)
                      op: Equal
                      rhs: {(recursive)}
                      spids: [537]
                    )
                  ]
                  spids: [537]
                )
              ]
              op_id: Op_DAmp
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:base)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(git)} {(rev-parse)} {(--verify)} {(--quiet)} 
                                {($ VSub_Name '$cmt') (Lit_Other '^')}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [546 557]
                      )
                    }
                  spids: [545]
                )
              ]
              spids: [545]
            )
            (C {(eval)} {(SQ <'git-merge-$strategy'>)} {($ VSub_Name '$strategy_opts')} 
              {($ VSub_Name '$base')} {(SQ <' -- "$hd" "$cmt"'>)}
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:rv)
                  op: Equal
                  rhs: {($ VSub_QMark '$?')}
                  spids: [575]
                )
              ]
              spids: [575]
            )
            (Case
              to_match: {(DQ ($ VSub_Name '$rv'))}
              arms: [
                (case_arm
                  pat_list: [{(0)}]
                  action: [
                    (C {(unset)} {(GITHEAD_) ($ VSub_Name '$cmt')} {(GITHEAD_) ($ VSub_Name '$hd')})
                    (ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [588 589 604 16777215]
                )
                (case_arm
                  pat_list: [{(1)}]
                  action: [
                    (C {(git)} {(rerere)} {($ VSub_Name '$allow_rerere_autoupdate')})
                    (C {(die)} {(DQ ($ VSub_Name '$resolvemsg'))})
                  ]
                  spids: [607 608 625 16777215]
                )
                (case_arm
                  pat_list: [{(2)}]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {(DQ ('Strategy: ') ($ VSub_Name '$strategy') (' failed, try another'))}
                      ]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[640])]
                    )
                    (C {(die)} {(DQ ($ VSub_Name '$resolvemsg'))})
                  ]
                  spids: [628 629 651 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (C {(die)} {(DQ ('Unknown exit code (') ($ VSub_Name '$rv') (') from command:'))} 
                      {
                        (DQ (git-merge-) ($ VSub_Name '$strategy') (' ') ($ VSub_Name '$cmt') 
                          ('^ -- HEAD ') ($ VSub_Name '$cmt')
                        )
                      }
                    )
                  ]
                  spids: [654 655 678 16777215]
                )
              ]
              spids: [579 585 681]
            )
          ]
          spids: [389]
        )
      spids: [384 388]
    )
    (FuncDef
      name: finish_rb_merge
      body: 
        (BraceGroup
          children: [
            (C {(move_to_original_branch)})
            (If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-s)} {(DQ ($ VSub_Name '$state_dir')) (/rewritten)})]
                  action: [
                    (SimpleCommand
                      words: [{(git)} {(notes)} {(copy)} {(--for-rewrite) (Lit_Other '=') (rebase)}]
                      redirects: [
                        (Redir
                          op_id: Redir_Less
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_Name '$state_dir')) (/rewritten)}
                          spids: [722]
                        )
                      ]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:hook)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [
                                        (C {(git)} {(rev-parse)} {(--git-path)} {(hooks/post-rewrite)})
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                  spids: [731 739]
                                )
                              )
                            }
                          spids: [729]
                        )
                      ]
                      spids: [729]
                    )
                    (AndOr
                      children: [
                        (C {(test)} {(-x)} {(DQ ($ VSub_Name '$hook'))})
                        (SimpleCommand
                          words: [{(DQ ($ VSub_Name '$hook'))} {(rebase)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Less
                              fd: 16777215
                              arg_word: {(DQ ($ VSub_Name '$state_dir')) (/rewritten)}
                              spids: [759]
                            )
                          ]
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  spids: [16777215 709]
                )
              ]
              spids: [16777215 766]
            )
            (C {(say)} {(All)} {(done.)})
          ]
          spids: [691]
        )
      spids: [686 690]
    )
    (FuncDef
      name: git_rebase__merge
      body: 
        (BraceGroup
          children: [
            (Case
              to_match: {(DQ ($ VSub_Name '$action'))}
              arms: [
                (case_arm
                  pat_list: [{(ControlFlow_Continue continue)}]
                  action: [
                    (C {(read_state)})
                    (C {(continue_merge)})
                    (While
                      cond: [
                        (C {(test)} {(DQ ($ VSub_Name '$msgnum'))} {(-le)} {(DQ ($ VSub_Name '$end'))})
                      ]
                      body: 
                        (DoGroup
                          children: [
                            (C {(call_merge)} {(DQ ($ VSub_Name '$msgnum'))})
                            (C {(continue_merge)})
                          ]
                          spids: [846 859]
                        )
                    )
                    (C {(finish_rb_merge)})
                    (ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [821 822 868 16777215]
                )
                (case_arm
                  pat_list: [{(skip)}]
                  action: [
                    (C {(read_state)})
                    (C {(git)} {(rerere)} {(clear)})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:msgnum)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name '$msgnum')})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [885 892]
                              )
                            }
                          spids: [884]
                        )
                      ]
                      spids: [884]
                    )
                    (While
                      cond: [
                        (C {(test)} {(DQ ($ VSub_Name '$msgnum'))} {(-le)} {(DQ ($ VSub_Name '$end'))})
                      ]
                      body: 
                        (DoGroup
                          children: [
                            (C {(call_merge)} {(DQ ($ VSub_Name '$msgnum'))})
                            (C {(continue_merge)})
                          ]
                          spids: [910 923]
                        )
                    )
                    (C {(finish_rb_merge)})
                    (ControlFlow token:<ControlFlow_Return return>)
                  ]
                  spids: [870 871 932 16777215]
                )
              ]
              spids: [813 819 934]
            )
            (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$state_dir'))})
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Name '$onto_name'))}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$state_dir') (/onto_name))}
                  spids: [951]
                )
              ]
            )
            (C {(write_basic_state)})
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:msgnum) op:Equal rhs:{(0)} spids:[961])]
              spids: [961]
            )
            (ForEach
              iter_name: cmt
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (C {(git)} {(rev-list)} {(--reverse)} {(--no-merges)} 
                            {(DQ ($ VSub_Name '$revisions'))}
                          )
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [970 982]
                  )
                }
              ]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:msgnum)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Plus
                                    left: (ArithWord w:{($ VSub_Name '$msgnum')})
                                    right: (ArithWord w:{(Lit_Digits 1)})
                                  )
                                spids: [988 995]
                              )
                            }
                          spids: [987]
                        )
                      ]
                      spids: [987]
                    )
                    (SimpleCommand
                      words: [{(echo)} {(DQ ($ VSub_Name '$cmt'))}]
                      redirects: [
                        (Redir
                          op_id: Redir_Great
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_Name '$state_dir') (/cmt.) ($ VSub_Name '$msgnum'))}
                          spids: [1004]
                        )
                      ]
                    )
                  ]
                  spids: [984 1012]
                )
              spids: [969 16777215]
            )
            (SimpleCommand
              words: [{(echo)} {(1)}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$state_dir') (/msgnum))}
                  spids: [1019]
                )
              ]
            )
            (SimpleCommand
              words: [{(echo)} {($ VSub_Name '$msgnum')}]
              redirects: [
                (Redir
                  op_id: Redir_Great
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_Name '$state_dir') (/end))}
                  spids: [1029]
                )
              ]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:end)
                  op: Equal
                  rhs: {($ VSub_Name '$msgnum')}
                  spids: [1036]
                )
              ]
              spids: [1036]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:msgnum) op:Equal rhs:{(1)} spids:[1039])]
              spids: [1039]
            )
            (While
              cond: [(C {(test)} {(DQ ($ VSub_Name '$msgnum'))} {(-le)} {(DQ ($ VSub_Name '$end'))})]
              body: 
                (DoGroup
                  children: [(C {(call_merge)} {(DQ ($ VSub_Name '$msgnum'))}) (C {(continue_merge)})]
                  spids: [1057 1069]
                )
            )
            (C {(finish_rb_merge)})
          ]
          spids: [810]
        )
      spids: [805 809]
    )
    (C {(git_rebase__merge)})
  ]
)