(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:SUBDIRECTORY_OK) op:Equal rhs:{(Yes)})]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:OPTIONS_KEEPDASHDASH) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:OPTIONS_STUCKLONG) op:Equal rhs:{(t)})]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OPTIONS_SPEC)
          op: Equal
          rhs: 
            {
              (DQ 
                (
'git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]\n'
                ) ('git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]\n') 
                ('git-rebase --continue | --abort | --skip | --edit-todo\n') ('--\n') (' Available options are\n') 
                ('v,verbose!         display a diffstat of what changed upstream\n') ('q,quiet!           be quiet. implies --no-stat\n') 
                ('autostash          automatically stash/stash pop before and after\n') ("fork-point         use 'merge-base --fork-point' to refine upstream\n") 
                ('onto=!             rebase onto given branch instead of upstream\n') ('p,preserve-merges! try to recreate merges instead of ignoring them\n') 
                ('s,strategy=!       use the given merge strategy\n') ('no-ff!             cherry-pick all commits, even if unchanged\n') 
                ('m,merge!           use merging strategies to rebase\n') ('i,interactive!     let the user edit the list of commits to rebase\n') 
                ('x,exec=!           add exec lines after each commit of the editable list\n') ('k,keep-empty\t   preserve empty commits during rebase\n') 
                ('f,force-rebase!    force rebase even if branch is up to date\n') ('X,strategy-option=! pass the argument through to the merge strategy\n') 
                ('stat!              display a diffstat of what changed upstream\n') ('n,no-stat!         do not show diffstat of what changed upstream\n') 
                ('verify             allow pre-rebase hook to run\n') ('rerere-autoupdate  allow rerere to update index with resolved conflicts\n') 
                ('root!              rebase all reachable commits up to the root(s)\n') ('autosquash         move commits that begin with squash!/fixup! under -i\n') 
                ("committer-date-is-author-date! passed to 'git am'\n") ("ignore-date!       passed to 'git am'\n") ("whitespace=!       passed to 'git apply'\n") 
                ("ignore-whitespace! passed to 'git apply'\n") ("C=!                passed to 'git apply'\n") ('S,gpg-sign?        GPG-sign commits\n') 
                (' Actions:\n') ('continue!          continue\n') ('abort!             abort and check out the original branch\n') 
                ('skip!              skip current patch and continue\n') ('edit-todo!         edit the todo list during an interactive rebase\n')
              )
            }
        )
      ]
    )
    (C {(.)} {(git-sh-setup)})
    (C {(set_reflog_action)} {(rebase)})
    (C {(require_work_tree_exists)})
    (C {(cd_to_toplevel)})
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:LF) op:Equal rhs:{(SQ <'\n'>)})]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ok_to_skip_pre_rebase) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:resolvemsg)
          op: Equal
          rhs: 
            {
              (DQ ('\n') 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [
                        (C {(gettext)} 
                          {
                            (SQ 
                              <
'When you have resolved this problem, run "git rebase --continue".\n'
                              > <'If you prefer to skip this patch, run "git rebase --skip" instead.\n'> 
                              <
'To check out the original branch and stop rebasing, run "git rebase --abort".'
                              >
                            )
                          }
                        )
                      ]
                    )
                ) ('\n')
              )
            }
        )
      ]
    )
    (C {(unset)} {(onto)})
    (C {(unset)} {(restrict_revision)})
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:cmd) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:strategy) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:strategy_opts) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:do_merge) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:merge_dir)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_DIR')) (/rebase-merge)}
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:apply_dir)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_DIR')) (/rebase-apply)}
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:verbose) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:diffstat) op:Equal rhs:(word.Empty))]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} 
          {
            (DQ 
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(config)} {(--bool)} {(rebase.stat)})]
                  )
              )
            )
          } {(Lit_Equals '=')} {(true)}
        )
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:diffstat) op:Equal rhs:{(t)})]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:autostash)
          op: Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (C {(git)} {(config)} {(--bool)} {(rebase.autostash)})
                            (C {(echo)} {(false)})
                          ]
                        )
                      ]
                    )
                )
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fork_point) op:Equal rhs:{(auto)})]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:git_am_opt) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:rebase_root) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:force_rebase) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:allow_rerere_autoupdate) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:in_progress) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:type) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:state_dir) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:action) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:preserve_merges) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:autosquash) op:Equal rhs:(word.Empty))]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:keep_empty) op:Equal rhs:(word.Empty))]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} 
          {
            (DQ 
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(config)} {(--bool)} {(rebase.autosquash)})]
                  )
              )
            )
          } {(Lit_Equals '=')} {(DQ (true))}
        )
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:autosquash) op:Equal rhs:{(t)})]
        )
      ]
    )
    (command.Case
      to_match: 
        {
          (DQ 
            (command_sub
              left_token: <Left_DollarParen '$('>
              command_list: 
                (command.CommandList
                  children: [(C {(git)} {(config)} {(--bool)} {(commit.gpgsign)})]
                )
            )
          )
        }
      arms: [
        (case_arm
          pat_list: [{(true)}]
          action: [
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:gpg_sign_opt) op:Equal rhs:{(-S)})]
            )
          ]
        )
        (case_arm
          pat_list: [{(Lit_Star '*')}]
          action: [
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:gpg_sign_opt) op:Equal rhs:(word.Empty))]
            )
          ]
        )
      ]
    )
    (command.ShFunction
      name: read_basic_state
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir') (/head-name))})
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir') (/onto))})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:head_name)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(cat)} {(DQ ($ VSub_DollarName '$state_dir')) (/head-name)})
                                ]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:onto)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(cat)} {(DQ ($ VSub_DollarName '$state_dir')) (/onto)})]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [(C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir')) (/orig-head)})]
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:orig_head)
                              op: Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(cat)} 
                                            {(DQ ($ VSub_DollarName '$state_dir')) (/orig-head)}
                                          )
                                        ]
                                      )
                                  )
                                }
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  else_action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:orig_head)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(cat)} {(DQ ($ VSub_DollarName '$state_dir')) (/head)})
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:GIT_QUIET)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(cat)} {(DQ ($ VSub_DollarName '$state_dir')) (/quiet)})]
                              )
                          )
                        }
                    )
                  ]
                )
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir')) (/verbose)})
                (command.ShAssignment
                  pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:verbose) op:Equal rhs:{(t)})]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir')) (/strategy)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:strategy)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: <Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(cat)} {(DQ ($ VSub_DollarName '$state_dir')) (/strategy)})
                                  ]
                                )
                            )
                          )
                        }
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir')) (/strategy_opts)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:strategy_opts)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: <Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(cat)} {(DQ ($ VSub_DollarName '$state_dir')) (/strategy_opts)})
                                  ]
                                )
                            )
                          )
                        }
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir')) (/allow_rerere_autoupdate)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:allow_rerere_autoupdate)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: <Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(cat)} 
                                      {(DQ ($ VSub_DollarName '$state_dir')) 
                                        (/allow_rerere_autoupdate)
                                      }
                                    )
                                  ]
                                )
                            )
                          )
                        }
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir')) (/gpg_sign_opt)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:gpg_sign_opt)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: <Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(cat)} {(DQ ($ VSub_DollarName '$state_dir')) (/gpg_sign_opt)})
                                  ]
                                )
                            )
                          )
                        }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: write_basic_state
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$head_name'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/head-name)}
                    )
                  ]
                )
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$onto'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/onto)}
                    )
                  ]
                )
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$orig_head'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/orig-head)}
                    )
                  ]
                )
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$GIT_QUIET'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/quiet)}
                    )
                  ]
                )
                (C {(test)} {(t)} {(Lit_Equals '=')} {(DQ ($ VSub_DollarName '$verbose'))})
                (command.Simple
                  words: [{(Lit_Other ':')}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/verbose)}
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$strategy'))})
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$strategy'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/strategy)}
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$strategy_opts'))})
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$strategy_opts'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/strategy_opts)}
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$allow_rerere_autoupdate'))})
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$allow_rerere_autoupdate'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/allow_rerere_autoupdate)}
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$gpg_sign_opt'))})
                (command.Simple
                  words: [{(echo)} {(DQ ($ VSub_DollarName '$gpg_sign_opt'))}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir')) (/gpg_sign_opt)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: output
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$verbose'))}
              arms: [
                (case_arm
                  pat_list: [{(SQ )}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:output)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Simple
                                        words: [{(DQ ($ VSub_At '$@'))}]
                                        redirects: [
                                          (redir.Redir
                                            op: <Redir_GreatAnd '2>&'>
                                            fd: 2
                                            arg_word: {(1)}
                                          )
                                        ]
                                      )
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:status)
                          op: Equal
                          rhs: {($ VSub_QMark '$?')}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {($ VSub_DollarName '$status')} {(KW_Bang '!') (Lit_Equals '=')} 
                          {(0)}
                        )
                        (C {(printf)} {(DQ ('%s') (Lit_Other '\\') (n))} 
                          {(DQ ($ VSub_DollarName '$output'))}
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {($ VSub_DollarName '$status')}
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [(C {(DQ ($ VSub_At '$@'))})]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: move_to_original_branch
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$head_name'))}
              arms: [
                (case_arm
                  pat_list: [{(refs/) (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:message)
                          op: Equal
                          rhs: 
                            {
                              (DQ ('rebase finished: ') ($ VSub_DollarName '$head_name') (' onto ') 
                                ($ VSub_DollarName '$onto')
                              )
                            }
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp Op_DPipe]
                      children: [
                        (C {(git)} {(update-ref)} {(-m)} {(DQ ($ VSub_DollarName '$message'))} 
                          {($ VSub_DollarName '$head_name')} 
                          {
                            (command_sub
                              left_token: <Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [(C {(git)} {(rev-parse)} {(HEAD)})]
                                )
                            )
                          } {($ VSub_DollarName '$orig_head')}
                        )
                        (C {(git)} {(symbolic-ref)} {(-m)} 
                          {(DQ ('rebase finished: returning to ') ($ VSub_DollarName '$head_name'))} {(HEAD)} {($ VSub_DollarName '$head_name')}
                        )
                        (C {(die)} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(eval_gettext)} 
                                        {
                                          (DQ ('Could not move back to ') 
                                            (word_part.EscapedLiteral
                                              token: <Lit_EscapedChar '\\$'>
                                            ) (head_name)
                                          )
                                        }
                                      )
                                    ]
                                  )
                              )
                            )
                          }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: apply_autostash
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$state_dir') (/autostash))})]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:stash_sha1)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(cat)} {(DQ ($ VSub_DollarName '$state_dir') (/autostash))})
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Simple
                              words: [{(git)} {(stash)} {(apply)} {($ VSub_DollarName '$stash_sha1')}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '2>&'>
                                  fd: 2
                                  arg_word: {(1)}
                                )
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(/dev/null)}
                                )
                              ]
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [(C {(gettext)} {(SQ <'Applied autostash.'>)})]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                      ]
                      else_action: [
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (C {(git)} {(stash)} {(store)} {(-m)} {(DQ (autostash))} {(-q)} 
                              {($ VSub_DollarName '$stash_sha1')}
                            )
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ ('Cannot store ') 
                                                (word_part.EscapedLiteral
                                                  token: <Lit_EscapedChar '\\$'>
                                                ) (stash_sha1)
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                        (C {(gettext)} 
                          {
                            (SQ <'Applying autostash resulted in conflicts.\n'> 
                              <'Your changes are safe in the stash.\n'> <'You can run "git stash pop" or "git stash drop" at any time.\n'>
                            )
                          }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: finish_rebase
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (C {(apply_autostash)})
                (command.BraceGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [(C {(git)} {(gc)} {(--auto)}) (C {(true)})]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                )
                (C {(rm)} {(-rf)} {(DQ ($ VSub_DollarName '$state_dir'))})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: run_specific_rebase
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$interactive_rebase'))} 
                          {(Lit_Equals '=')} {(implied)} {(Lit_RBracket ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:GIT_EDITOR)
                          op: Equal
                          rhs: {(Lit_Other ':')}
                        )
                      ]
                    )
                    (C {(export)} {(GIT_EDITOR)})
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:autosquash) op:Equal rhs:(word.Empty))]
                    )
                  ]
                )
              ]
            )
            (C {(.)} {(git-rebase--) ($ VSub_DollarName '$type')})
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:ret) op:Equal rhs:{($ VSub_QMark '$?')})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ VSub_DollarName '$ret')} {(-eq)} {(0)})]
                  action: [(C {(finish_rebase)})]
                )
                (if_arm
                  cond: [(C {(test)} {($ VSub_DollarName '$ret')} {(-eq)} {(2)})]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp Op_DAmp]
                      children: [
                        (C {(apply_autostash)})
                        (C {(rm)} {(-rf)} {(DQ ($ VSub_DollarName '$state_dir'))})
                        (C {(die)} {(DQ ('Nothing to do'))})
                      ]
                    )
                  ]
                )
              ]
            )
            (command.ControlFlow
              token: <ControlFlow_Exit exit>
              arg_word: {($ VSub_DollarName '$ret')}
            )
          ]
        )
    )
    (command.ShFunction
      name: run_pre_rebase_hook
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$ok_to_skip_pre_rebase'))})
                        (C {(test)} {(-x)} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(rev-parse)} {(--git-path)} {(hooks/pre-rebase)})
                                    ]
                                  )
                              )
                            )
                          }
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(rev-parse)} {(--git-path)} {(hooks/pre-rebase)})
                                    ]
                                  )
                              )
                            )
                          } 
                          {
                            (braced_var_sub
                              token: <VSub_Number 1>
                              suffix_op: 
                                (suffix_op.Unary
                                  op_id: VTest_Plus
                                  arg_word: {(DQ ($ VSub_At '$@'))}
                                )
                            )
                          }
                        )
                        (C {(die)} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(gettext)} {(DQ ('The pre-rebase hook refused to rebase.'))})
                                    ]
                                  )
                              )
                            )
                          }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$apply_dir')) (/applying)})
        (C {(die)} 
          {
            (DQ 
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(gettext)} {(DQ ('It looks like git-am is in progress. Cannot rebase.'))})
                    ]
                  )
              )
            )
          }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-d)} {(DQ ($ VSub_DollarName '$apply_dir'))})]
          action: [
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:type) op:Equal rhs:{(am)})]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:state_dir)
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$apply_dir'))}
                )
              ]
            )
          ]
        )
        (if_arm
          cond: [(C {(test)} {(-d)} {(DQ ($ VSub_DollarName '$merge_dir'))})]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$merge_dir')) (/interactive)})]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:type)
                          op: Equal
                          rhs: {(interactive)}
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:interactive_rebase)
                          op: Equal
                          rhs: {(explicit)}
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:type) op:Equal rhs:{(merge)})]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:state_dir)
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$merge_dir'))}
                )
              ]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$type'))})
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:in_progress) op:Equal rhs:{(t)})]
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:total_argc) op:Equal rhs:{($ VSub_Pound '$#')})]
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Pound '$#')} {(KW_Bang '!') (Lit_Equals '=')} {(0)})]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(--no-verify)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ok_to_skip_pre_rebase)
                          op: Equal
                          rhs: {(yes)}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--verify)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ok_to_skip_pre_rebase)
                          op: Equal
                          rhs: (word.Empty)
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--continue)} {(--skip)} {(--abort)} {(--edit-todo)}]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(test)} {($ VSub_DollarName '$total_argc')} {(-eq)} {(2)})
                        (C {(usage)})
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:action)
                          op: Equal
                          rhs: 
                            {
                              (braced_var_sub
                                token: <VSub_Number 1>
                                suffix_op: (suffix_op.Unary op_id:VOp1_DPound arg_word:{(--)})
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--onto) (Lit_Equals '=') (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:onto)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: <VSub_Number 1>
                                  suffix_op: (suffix_op.Unary op_id:VOp1_Pound arg_word:{('--onto=')})
                                )
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--exec) (Lit_Equals '=') (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:cmd)
                          op: Equal
                          rhs: 
                            {
                              (DQ (${ VSub_Name cmd) ('exec ') 
                                (braced_var_sub
                                  token: <VSub_Number 1>
                                  suffix_op: (suffix_op.Unary op_id:VOp1_Pound arg_word:{('--exec=')})
                                ) (${ VSub_Name LF)
                              )
                            }
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$interactive_rebase'))})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:interactive_rebase)
                              op: Equal
                              rhs: {(implied)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--interactive)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:interactive_rebase)
                          op: Equal
                          rhs: {(explicit)}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--keep-empty)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:keep_empty) op:Equal rhs:{(yes)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--preserve-merges)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:preserve_merges)
                          op: Equal
                          rhs: {(t)}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$interactive_rebase'))})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:interactive_rebase)
                              op: Equal
                              rhs: {(implied)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--autosquash)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:autosquash) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--no-autosquash)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:autosquash) op:Equal rhs:(word.Empty))]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--fork-point)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fork_point) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--no-fork-point)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:fork_point) op:Equal rhs:(word.Empty))]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--merge)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:do_merge) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--strategy-option) (Lit_Equals '=') (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:strategy_opts)
                          op: Equal
                          rhs: 
                            {
                              (DQ ($ VSub_DollarName '$strategy_opts') (' ') 
                                (command_sub
                                  left_token: <Left_DollarParen '$('>
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {(git)} {(rev-parse)} {(--sq-quote)} 
                                          {
                                            (DQ (--) 
                                              (braced_var_sub
                                                token: <VSub_Number 1>
                                                suffix_op: 
                                                  (suffix_op.Unary
                                                    op_id: VOp1_Pound
                                                    arg_word: {('--strategy-option=')}
                                                  )
                                              )
                                            )
                                          }
                                        )
                                      ]
                                    )
                                )
                              )
                            }
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:do_merge) op:Equal rhs:{(t)})]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$strategy'))})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:strategy)
                              op: Equal
                              rhs: {(recursive)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--strategy) (Lit_Equals '=') (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:strategy)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (braced_var_sub
                                  token: <VSub_Number 1>
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op_id: VOp1_Pound
                                      arg_word: {('--strategy=')}
                                    )
                                )
                              )
                            }
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:do_merge) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--no-stat)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:diffstat) op:Equal rhs:(word.Empty))]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--stat)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:diffstat) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--autostash)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:autostash) op:Equal rhs:{(true)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--no-autostash)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:autostash)
                          op: Equal
                          rhs: {(false)}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--verbose)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:verbose) op:Equal rhs:{(t)})]
                    )
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:diffstat) op:Equal rhs:{(t)})]
                    )
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:GIT_QUIET) op:Equal rhs:(word.Empty))]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--quiet)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:GIT_QUIET) op:Equal rhs:{(t)})]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:git_am_opt)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$git_am_opt') (' -q'))}
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:verbose) op:Equal rhs:(word.Empty))]
                    )
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:diffstat) op:Equal rhs:(word.Empty))]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--whitespace) (Lit_Equals '=') (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:git_am_opt)
                          op: Equal
                          rhs: 
                            {
                              (DQ ($ VSub_DollarName '$git_am_opt') (' --whitespace=') 
                                (braced_var_sub
                                  token: <VSub_Number 1>
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op_id: VOp1_Pound
                                      arg_word: {('--whitespace=')}
                                    )
                                )
                              )
                            }
                        )
                      ]
                    )
                    (command.Case
                      to_match: 
                        {
                          (DQ 
                            (braced_var_sub
                              token: <VSub_Number 1>
                              suffix_op: 
                                (suffix_op.Unary
                                  op_id: VOp1_Pound
                                  arg_word: {('--whitespace=')}
                                )
                            )
                          )
                        }
                      arms: [
                        (case_arm
                          pat_list: [{(fix)} {(strip)}]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:force_rebase)
                                  op: Equal
                                  rhs: {(t)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--ignore-whitespace)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:git_am_opt)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$git_am_opt') (' ') ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--committer-date-is-author-date)} {(--ignore-date)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:git_am_opt)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$git_am_opt') (' ') ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:force_rebase) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-C) (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:git_am_opt)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$git_am_opt') (' ') ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--root)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:rebase_root) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--force-rebase)} {(--no-ff)}]
                  action: [
                    (command.ShAssignment
                      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:force_rebase) op:Equal rhs:{(t)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--rerere-autoupdate)} {(--no-rerere-autoupdate)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:allow_rerere_autoupdate)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--gpg-sign)}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:gpg_sign_opt)
                          op: Equal
                          rhs: {(-S)}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--gpg-sign) (Lit_Equals '=') (Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:gpg_sign_opt)
                          op: Equal
                          rhs: 
                            {
                              (DQ (-S) 
                                (braced_var_sub
                                  token: <VSub_Number 1>
                                  suffix_op: 
                                    (suffix_op.Unary
                                      op_id: VOp1_Pound
                                      arg_word: {('--gpg-sign=')}
                                    )
                                )
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--)}]
                  action: [(C {(shift)}) (command.ControlFlow token:<ControlFlow_Break break>)]
                )
              ]
            )
            (C {(shift)})
          ]
        )
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [(C {(test)} {($ VSub_Pound '$#')} {(-gt)} {(2)}) (C {(usage)})]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$action'))})]
          action: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$in_progress'))})
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(gettext)} {(DQ ('No rebase in progress?'))})]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(DQ ($ VSub_DollarName '$type'))} {(Lit_Equals '=')} {(interactive)})
                        (C {(test)} {(DQ ($ VSub_DollarName '$GIT_REFLOG_ACTION'))} {(Lit_Equals '=')} 
                          {(rebase)}
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:GIT_REFLOG_ACTION)
                          op: Equal
                          rhs: {(DQ ('rebase -i (') ($ VSub_DollarName '$action') (')'))}
                        )
                      ]
                    )
                    (C {(export)} {(GIT_REFLOG_ACTION)})
                  ]
                )
              ]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(DQ ($ VSub_DollarName '$action'))} {(Lit_Equals '=')} {(DQ (edit-todo))})
                (C {(test)} {(DQ ($ VSub_DollarName '$type'))} {(KW_Bang '!') (Lit_Equals '=')} 
                  {(DQ (interactive))}
                )
              ]
            )
          ]
          action: [
            (C {(die)} 
              {
                (DQ 
                  (command_sub
                    left_token: <Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [
                          (C {(gettext)} 
                            {
                              (DQ 
                                (
'The --edit-todo action can only be used during interactive rebase.'
                                )
                              )
                            }
                          )
                        ]
                      )
                  )
                )
              }
            )
          ]
        )
      ]
    )
    (command.Case
      to_match: {(DQ ($ VSub_DollarName '$action'))}
      arms: [
        (case_arm
          pat_list: [{(ControlFlow_Continue continue)}]
          action: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.Simple
                  words: [{(git)} {(rev-parse)} {(--verify)} {(HEAD)}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
                )
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(gettext)} {(DQ ('Cannot read HEAD'))})]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (C {(git)} {(update-index)} {(--ignore-submodules)} {(--refresh)})
                (C {(git)} {(diff-files)} {(--quiet)} {(--ignore-submodules)})
                (command.BraceGroup
                  children: [
                    (C {(echo)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(gettext)} 
                                    {
                                      (DQ ('You must edit all merge conflicts and then\n') 
                                        ('mark them as resolved using git add')
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (C {(read_basic_state)})
            (C {(run_specific_rebase)})
          ]
        )
        (case_arm
          pat_list: [{(skip)}]
          action: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(output)} {(git)} {(reset)} {(--hard)} {(HEAD)})
                (command.ControlFlow
                  token: <ControlFlow_Exit exit>
                  arg_word: {($ VSub_QMark '$?')}
                )
              ]
            )
            (C {(read_basic_state)})
            (C {(run_specific_rebase)})
          ]
        )
        (case_arm
          pat_list: [{(abort)}]
          action: [
            (C {(git)} {(rerere)} {(clear)})
            (C {(read_basic_state)})
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$head_name'))}
              arms: [
                (case_arm
                  pat_list: [{(refs/) (Lit_Star '*')}]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(git)} {(symbolic-ref)} {(-m)} {(DQ ('rebase: aborting'))} {(HEAD)} 
                          {($ VSub_DollarName '$head_name')}
                        )
                        (C {(die)} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(eval_gettext)} 
                                        {
                                          (DQ ('Could not move back to ') 
                                            (word_part.EscapedLiteral
                                              token: <Lit_EscapedChar '\\$'>
                                            ) (head_name)
                                          )
                                        }
                                      )
                                    ]
                                  )
                              )
                            )
                          }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (C {(output)} {(git)} {(reset)} {(--hard)} {($ VSub_DollarName '$orig_head')})
            (C {(finish_rebase)})
            (command.ControlFlow token:<ControlFlow_Exit exit>)
          ]
        )
        (case_arm pat_list:[{(edit-todo)}] action:[(C {(run_specific_rebase)})])
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$in_progress'))})]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:state_dir_base)
                  op: Equal
                  rhs: 
                    {
                      (braced_var_sub
                        token: <VSub_Name state_dir>
                        suffix_op: (suffix_op.Unary op_id:VOp1_DPound arg_word:{('*') (Lit_Slash /)})
                      )
                    }
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:cmd_live_rebase)
                  op: Equal
                  rhs: {(DQ ('git rebase (--continue | --abort | --skip)'))}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:cmd_clear_stale_rebase)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('rm -fr ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) 
                        ($ VSub_DollarName '$state_dir') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>)
                      )
                    }
                )
              ]
            )
            (C {(die)} 
              {
                (DQ ('\n') 
                  (command_sub
                    left_token: <Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [
                          (C {(eval_gettext)} 
                            {
                              (SQ 
                                <
'It seems that there is already a $state_dir_base directory, and\n'
                                > <'I wonder if you are in the middle of another rebase.  If that is the\n'> <'case, please try\n'> 
                                <'\t$cmd_live_rebase\n'> <'If that is not the case, please\n'> <'\t$cmd_clear_stale_rebase\n'> 
                                <
'and run me again.  I am stopping in case you still have something\n'
                                > <'valuable there.'>
                              )
                            }
                          )
                        ]
                      )
                  )
                )
              }
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$rebase_root'))})
                (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$onto'))})
              ]
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$interactive_rebase'))})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:interactive_rebase)
                      op: Equal
                      rhs: {(implied)}
                    )
                  ]
                )
              ]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$interactive_rebase'))})]
          action: [
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:type) op:Equal rhs:{(interactive)})]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:state_dir)
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$merge_dir'))}
                )
              ]
            )
          ]
        )
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$do_merge'))})]
          action: [
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:type) op:Equal rhs:{(merge)})]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:state_dir)
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$merge_dir'))}
                )
              ]
            )
          ]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:type) op:Equal rhs:{(am)})]
        )
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:state_dir)
              op: Equal
              rhs: {(DQ ($ VSub_DollarName '$apply_dir'))}
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$rebase_root'))})]
          action: [
            (command.Case
              to_match: {(DQ ($ VSub_Pound '$#'))}
              arms: [
                (case_arm
                  pat_list: [{(0)}]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Pipeline
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:upstream_name)
                                      op: Equal
                                      rhs: 
                                        {
                                          (command_sub
                                            left_token: <Left_DollarParen '$('>
                                            command_list: 
                                              (command.CommandList
                                                children: [
                                                  (command.Simple
                                                    words: [
                                                      {(git)}
                                                      {(rev-parse)}
                                                      {(--symbolic-full-name)}
                                                      {(--verify)}
                                                      {(-q)}
                                                      {(Lit_Other '@') (Lit_LBrace '{') (upstream) 
                                                        (Lit_RBrace '}')
                                                      }
                                                    ]
                                                    redirects: [
                                                      (redir.Redir
                                                        op: <Redir_Great '2>'>
                                                        fd: 2
                                                        arg_word: {(/dev/null)}
                                                      )
                                                    ]
                                                  )
                                                ]
                                              )
                                          )
                                        }
                                    )
                                  ]
                                )
                              ]
                              negated: T
                            )
                          ]
                          action: [
                            (C {(.)} {(git-parse-remote)})
                            (C {(error_on_missing_default_upstream)} {(DQ (rebase))} {(DQ (rebase))} 
                              {(DQ (against))} 
                              {
                                (DQ ('git rebase ') 
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [(C {(gettext)} {(SQ <'<branch>'>)})]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(DQ ($ VSub_DollarName '$fork_point'))} {(Lit_Equals '=')} {(auto)})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:fork_point)
                              op: Equal
                              rhs: {(t)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:upstream_name)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(DQ ($ VSub_DollarName '$upstream_name'))} {(Lit_Equals '=')} 
                              {(DQ (-))}
                            )
                          ]
                          action: [
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:upstream_name)
                                  op: Equal
                                  rhs: {(DQ ('@{-1}'))}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (C {(shift)})
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:upstream)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(peel_committish)} {(DQ (${ VSub_Name upstream_name))})]
                              )
                          )
                        }
                    )
                  ]
                )
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ('invalid upstream ') 
                                    (word_part.EscapedLiteral
                                      token: <Lit_EscapedChar '\\$'>
                                    ) (upstream_name)
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:upstream_arg)
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$upstream_name'))}
                )
              ]
            )
          ]
        )
      ]
      else_action: [
        (command.If
          arms: [
            (if_arm
              cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$onto'))})]
              action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:empty_tree)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(git)} {(hash-object)} {(-t)} {(tree)} {(/dev/null)})]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:onto)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Simple
                                    words: [{(git)} {(commit-tree)} {($ VSub_DollarName '$empty_tree')}]
                                    redirects: [
                                      (redir.Redir
                                        op: <Redir_Less '<'>
                                        fd: 16777215
                                        arg_word: {(/dev/null)}
                                      )
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:squash_onto)
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$onto'))}
                    )
                  ]
                )
              ]
            )
          ]
        )
        (C {(unset)} {(upstream_name)})
        (C {(unset)} {(upstream)})
        (command.AndOr
          ops: [Op_DAmp]
          children: [(C {(test)} {($ VSub_Pound '$#')} {(-gt)} {(1)}) (C {(usage)})]
        )
        (command.ShAssignment
          pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:upstream_arg) op:Equal rhs:{(--root)})]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:onto_name)
          op: Equal
          rhs: 
            {
              (braced_var_sub
                token: <VSub_Name onto>
                suffix_op: 
                  (suffix_op.Unary
                    op_id: VTest_Hyphen
                    arg_word: {(DQ ($ VSub_DollarName '$upstream_name'))}
                  )
              )
            }
        )
      ]
    )
    (command.Case
      to_match: {(DQ ($ VSub_DollarName '$onto_name'))}
      arms: [
        (case_arm
          pat_list: [{(Lit_Star '*') (...) (Lit_Star '*')}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:left)
                              op: Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <VSub_Name onto_name>
                                    suffix_op: (suffix_op.Unary op_id:VOp1_Percent arg_word:{('...*')})
                                  )
                                }
                            )
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:right)
                              op: Equal
                              rhs: 
                                {
                                  (braced_var_sub
                                    token: <VSub_Name onto_name>
                                    suffix_op: (suffix_op.Unary op_id:VOp1_Pound arg_word:{('*...')})
                                  )
                                }
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:onto)
                              op: Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(git)} {(merge-base)} {(--all)} 
                                            {
                                              (braced_var_sub
                                                token: <VSub_Name left>
                                                suffix_op: 
                                                  (suffix_op.Unary
                                                    op_id: VTest_ColonHyphen
                                                    arg_word: {(HEAD)}
                                                  )
                                              )
                                            } 
                                            {
                                              (braced_var_sub
                                                token: <VSub_Name right>
                                                suffix_op: 
                                                  (suffix_op.Unary
                                                    op_id: VTest_ColonHyphen
                                                    arg_word: {(HEAD)}
                                                  )
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                }
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.Case
                      to_match: {(DQ ($ VSub_DollarName '$onto'))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {(Lit_QMark '?') (Lit_Star '*') (DQ ($ VSub_DollarName '$LF')) 
                              (Lit_QMark '?') (Lit_Star '*')
                            }
                          ]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ 
                                                (word_part.EscapedLiteral
                                                  token: <Lit_EscapedChar '\\$'>
                                                ) ('onto_name: there are more than one merge bases')
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(SQ )}]
                          action: [
                            (C {(die)} 
                              {
                                (DQ 
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(eval_gettext)} 
                                            {
                                              (DQ 
                                                (word_part.EscapedLiteral
                                                  token: <Lit_EscapedChar '\\$'>
                                                ) ('onto_name: there is no merge base')
                                              )
                                            }
                                          )
                                        ]
                                      )
                                  )
                                )
                              }
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) 
                                    ('onto_name: there is no merge base')
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
          ]
        )
        (case_arm
          pat_list: [{(Lit_Star '*')}]
          action: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:onto)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(peel_committish)} {(DQ ($ VSub_DollarName '$onto_name'))})
                                ]
                              )
                          )
                        }
                    )
                  ]
                )
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ('Does not point to a valid commit: ') 
                                    (word_part.EscapedLiteral
                                      token: <Lit_EscapedChar '\\$'>
                                    ) (onto_name)
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:switch_to) op:Equal rhs:(word.Empty))]
    )
    (command.Case
      to_match: {(DQ ($ VSub_Pound '$#'))}
      arms: [
        (case_arm
          pat_list: [{(1)}]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:branch_name)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:switch_to)
                  op: Equal
                  rhs: {(DQ ($ VSub_Number '$1'))}
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(git)} {(show-ref)} {(--verify)} {(--quiet)} {(--)} 
                          {(DQ (refs/heads/) ($ VSub_Number '$1'))}
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:orig_head)
                              op: Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(git)} {(rev-parse)} {(-q)} {(--verify)} 
                                            {(DQ (refs/heads/) ($ VSub_Number '$1'))}
                                          )
                                        ]
                                      )
                                  )
                                }
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:head_name)
                          op: Equal
                          rhs: {(DQ (refs/heads/) ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (if_arm
                  cond: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:orig_head)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(git)} {(rev-parse)} {(-q)} {(--verify)} 
                                        {(DQ ($ VSub_Number '$1'))}
                                      )
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:head_name)
                          op: Equal
                          rhs: {(DQ ('detached HEAD'))}
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ('fatal: no such branch: ') 
                                    (word_part.EscapedLiteral
                                      token: <Lit_EscapedChar '\\$'>
                                    ) (branch_name)
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
          ]
        )
        (case_arm
          pat_list: [{(0)}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:branch_name)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(symbolic-ref)} {(-q)} {(HEAD)})]
                                  )
                              )
                            }
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:head_name)
                          op: Equal
                          rhs: {($ VSub_DollarName '$branch_name')}
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:branch_name)
                          op: Equal
                          rhs: 
                            {
                              (command_sub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (C {(expr)} {(DQ (z) ($ VSub_DollarName '$branch_name'))} 
                                        {(Lit_Other ':')} {(SQ <'zrefs/heads/\\(.*\\)'>)}
                                      )
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:head_name)
                      op: Equal
                      rhs: {(DQ ('detached HEAD'))}
                    )
                  ]
                )
                (command.Sentence
                  child: 
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:branch_name)
                          op: Equal
                          rhs: {(HEAD)}
                        )
                      ]
                    )
                  terminator: <Op_Semi ';'>
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:orig_head)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(git)} {(rev-parse)} {(--verify)} {(HEAD)})]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.ControlFlow token:<ControlFlow_Exit exit>)
              ]
            )
          ]
        )
        (case_arm
          pat_list: [{(Lit_Star '*')}]
          action: [(C {(die)} {(DQ ('BUG: unexpected number of arguments left to parse'))})]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(DQ ($ VSub_DollarName '$fork_point'))} {(Lit_Equals '=')} {(t)})]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:new_upstream)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(git)} {(merge-base)} {(--fork-point)} 
                                {(DQ ($ VSub_DollarName '$upstream_name'))} 
                                {
                                  (DQ 
                                    (braced_var_sub
                                      token: <VSub_Name switch_to>
                                      suffix_op: 
                                        (suffix_op.Unary
                                          op_id: VTest_ColonHyphen
                                          arg_word: {(HEAD)}
                                        )
                                    )
                                  )
                                }
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$new_upstream'))})]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:restrict_revision)
                          op: Equal
                          rhs: {($ VSub_DollarName '$new_upstream')}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(DQ ($ VSub_DollarName '$autostash'))} {(Lit_Equals '=')} {(true)})
                (command.Pipeline
                  children: [
                    (command.Subshell
                      command_list: (command.CommandList children:[(C {(require_clean_work_tree)})])
                      redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                    )
                  ]
                  negated: T
                )
              ]
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:stash_sha1)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(git)} {(stash)} {(create)} {(DQ (autostash))})]
                              )
                          )
                        }
                    )
                  ]
                )
                (C {(die)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(gettext)} {(SQ <'Cannot autostash'>)})]
                          )
                      )
                    )
                  }
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(mkdir)} {(-p)} {(DQ ($ VSub_DollarName '$state_dir'))})
                (command.Simple
                  words: [{(echo)} {($ VSub_DollarName '$stash_sha1')}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$state_dir') (/autostash))}
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:stash_abbrev)
                      op: Equal
                      rhs: 
                        {
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(git)} {(rev-parse)} {(--short)} 
                                    {($ VSub_DollarName '$stash_sha1')}
                                  )
                                ]
                              )
                          )
                        }
                    )
                  ]
                )
                (C {(echo)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [(C {(eval_gettext)} {(SQ <'Created autostash: $stash_abbrev'>)})]
                          )
                      )
                    )
                  }
                )
                (C {(git)} {(reset)} {(--hard)})
              ]
            )
          ]
        )
      ]
    )
    (C {(require_clean_work_tree)} {(DQ (rebase))} 
      {
        (DQ 
          (command_sub
            left_token: <Left_DollarParen '$('>
            command_list: 
              (command.CommandList
                children: [(C {(gettext)} {(DQ ('Please commit or stash them.'))})]
              )
          )
        )
      }
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:mb)
          op: Equal
          rhs: 
            {
              (command_sub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(git)} {(merge-base)} {(DQ ($ VSub_DollarName '$onto'))} 
                        {(DQ ($ VSub_DollarName '$orig_head'))}
                      )
                    ]
                  )
              )
            }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
              children: [
                (C {(test)} {(DQ ($ VSub_DollarName '$type'))} {(KW_Bang '!') (Lit_Equals '=')} 
                  {(interactive)}
                )
                (C {(test)} {(DQ ($ VSub_DollarName '$upstream'))} {(Lit_Equals '=')} 
                  {(DQ ($ VSub_DollarName '$onto'))}
                )
                (C {(test)} {(DQ ($ VSub_DollarName '$mb'))} {(Lit_Equals '=')} 
                  {(DQ ($ VSub_DollarName '$onto'))}
                )
                (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$restrict_revision'))})
                (command.Pipeline
                  children: [
                    (command.Subshell
                      command_list: 
                        (command.CommandList
                          children: [
                            (command.Pipeline
                              children: [
                                (C {(git)} {(rev-list)} {(--parents)} 
                                  {(DQ ($ VSub_DollarName '$onto')) (..) 
                                    (DQ ($ VSub_DollarName '$orig_head'))
                                  }
                                )
                                (C {(sane_grep)} {(DQ (' .* '))})
                              ]
                              negated: F
                            )
                          ]
                        )
                      redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
                    )
                  ]
                  negated: T
                )
              ]
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$force_rebase'))})]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$switch_to'))})
                        (command.Simple
                          words: [
                            {(git)}
                            {(checkout)}
                            {(-q)}
                            {(DQ ($ VSub_DollarName '$switch_to'))}
                            {(--)}
                          ]
                          more_env: [
                            (env_pair
                              name: GIT_REFLOG_ACTION
                              val: 
                                {
                                  (DQ ($ VSub_DollarName '$GIT_REFLOG_ACTION') (': checkout ') 
                                    ($ VSub_DollarName '$switch_to')
                                  )
                                }
                            )
                          ]
                        )
                      ]
                    )
                    (C {(say)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(eval_gettext)} 
                                    {
                                      (DQ ('Current branch ') 
                                        (word_part.EscapedLiteral
                                          token: <Lit_EscapedChar '\\$'>
                                        ) ('branch_name is up to date.')
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                    (C {(finish_rebase)})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(0)}
                    )
                  ]
                )
              ]
              else_action: [
                (C {(say)} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ('Current branch ') 
                                    (word_part.EscapedLiteral
                                      token: <Lit_EscapedChar '\\$'>
                                    ) ('branch_name is up to date, rebase forced.')
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
          ]
        )
      ]
    )
    (C {(run_pre_rebase_hook)} {(DQ ($ VSub_DollarName '$upstream_arg'))} {(DQ ($ VSub_At '$@'))})
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$diffstat'))})]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$verbose'))})]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ 
                          (command_sub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(eval_gettext)} 
                                    {
                                      (DQ ('Changes from ') 
                                        (word_part.EscapedLiteral
                                          token: <Lit_EscapedChar '\\$'>
                                        ) ('mb to ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('onto:')
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                  ]
                )
              ]
            )
            (command.Simple
              words: [
                {(git)}
                {(diff)}
                {(--stat)}
                {(--summary)}
                {(DQ ($ VSub_DollarName '$mb'))}
                {(DQ ($ VSub_DollarName '$onto'))}
              ]
              more_env: [(env_pair name:GIT_PAGER val:{(SQ )})]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(DQ ($ VSub_DollarName '$type'))} {(Lit_Equals '=')} {(interactive)})
        (C {(run_specific_rebase)})
      ]
    )
    (C {(say)} 
      {
        (DQ 
          (command_sub
            left_token: <Left_DollarParen '$('>
            command_list: 
              (command.CommandList
                children: [
                  (C {(gettext)} {(DQ ('First, rewinding head to replay your work on top of it...'))})
                ]
              )
          )
        )
      }
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (command.Simple
          words: [{(git)} {(checkout)} {(-q)} {(DQ ($ VSub_DollarName '$onto') ('^0'))}]
          more_env: [
            (env_pair
              name: GIT_REFLOG_ACTION
              val: 
                {
                  (DQ ($ VSub_DollarName '$GIT_REFLOG_ACTION') (': checkout ') 
                    ($ VSub_DollarName '$onto_name')
                  )
                }
            )
          ]
        )
        (C {(die)} {(DQ ('could not detach HEAD'))})
      ]
    )
    (C {(git)} {(update-ref)} {(ORIG_HEAD)} {($ VSub_DollarName '$orig_head')})
    (command.If
      arms: [
        (if_arm
          cond: [
            (C {(test)} {(DQ ($ VSub_DollarName '$mb'))} {(Lit_Equals '=')} 
              {(DQ ($ VSub_DollarName '$orig_head'))}
            )
          ]
          action: [
            (C {(say)} 
              {
                (DQ 
                  (command_sub
                    left_token: <Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [
                          (C {(eval_gettext)} 
                            {
                              (DQ ('Fast-forwarded ') 
                                (word_part.EscapedLiteral
                                  token: <Lit_EscapedChar '\\$'>
                                ) ('branch_name to ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) (onto_name.)
                              )
                            }
                          )
                        ]
                      )
                  )
                )
              }
            )
            (C {(move_to_original_branch)})
            (C {(finish_rebase)})
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$rebase_root'))})]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:revisions)
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$onto') (..) ($ VSub_DollarName '$orig_head'))}
                )
              ]
            )
          ]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:revisions)
              op: Equal
              rhs: 
                {
                  (DQ 
                    (braced_var_sub
                      token: <VSub_Name restrict_revision>
                      suffix_op: 
                        (suffix_op.Unary
                          op_id: VTest_Hyphen
                          arg_word: {($ VSub_DollarName '$upstream')}
                        )
                    ) (..) ($ VSub_DollarName '$orig_head')
                  )
                }
            )
          ]
        )
      ]
    )
    (C {(run_specific_rebase)})
  ]
)