(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'TOOL_MODE='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'TOOL_MODE='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'TOOL_MODE='> name:TOOL_MODE)
          op: assign_op.Equal
          rhs: {<diff>}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<git-mergetool--lib>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <should_prompt>
      name: should_prompt
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'prompt_merge='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'prompt_merge='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prompt_merge='> name:prompt_merge)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.AndOr
                            children: [
                              (command.Simple
                                blame_tok: <git>
                                more_env: []
                                words: [{<git>} {<config>} {<--bool>} {<mergetool.prompt>}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <echo>
                                more_env: []
                                words: [{<echo>} {<true>}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_DPipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'prompt='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'prompt='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'prompt='> name:prompt)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.AndOr
                            children: [
                              (command.Simple
                                blame_tok: <git>
                                more_env: []
                                words: [{<git>} {<config>} {<--bool>} {<difftool.prompt>}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <echo>
                                more_env: []
                                words: [{<echo>} {($ Id.VSub_DollarName prompt_merge)}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_DPipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [
                            {<test>}
                            {(DQ ($ Id.VSub_DollarName prompt))}
                            {<Id.Lit_Equals '='>}
                            {<true>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <test>
                      more_env: []
                      words: [{<test>} {<-z>} {(DQ ($ Id.VSub_DollarName GIT_DIFFTOOL_NO_PROMPT))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [77 90]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName GIT_DIFFTOOL_PROMPT))}]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <use_ext_cmd>
      name: use_ext_cmd
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <test>
              more_env: []
              words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName GIT_DIFFTOOL_EXTCMD))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <launch_merge_tool>
      name: launch_merge_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'MERGED='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'MERGED='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MERGED='> name:MERGED)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'LOCAL='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'LOCAL='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LOCAL='> name:LOCAL)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 2))}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'REMOTE='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'REMOTE='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REMOTE='> name:REMOTE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 3))}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'BASE='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'BASE='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'BASE='> name:BASE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <should_prompt>
                          more_env: []
                          words: [{<should_prompt>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <printf>
                      more_env: []
                      words: [
                        {<printf>}
                        {
                          (DQ <Id.Lit_BadBackslash '\\'> <'nViewing (%s/%s): \'%s\''> 
                            <Id.Lit_BadBackslash '\\'> <n>
                          )
                        }
                        {(DQ ($ Id.VSub_DollarName GIT_DIFF_PATH_COUNTER))}
                        {(DQ ($ Id.VSub_DollarName GIT_DIFF_PATH_TOTAL))}
                        {(DQ ($ Id.VSub_DollarName MERGED))}
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Simple
                                  blame_tok: <use_ext_cmd>
                                  more_env: []
                                  words: [{<use_ext_cmd>}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <printf>
                              more_env: []
                              words: [
                                {<printf>}
                                {(DQ <'Launch \'%s\' [Y/n]? '>)}
                                {(DQ ($ Id.VSub_DollarName GIT_DIFFTOOL_EXTCMD))}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [230 235]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.Simple
                          blame_tok: <printf>
                          more_env: []
                          words: [
                            {<printf>}
                            {(DQ <'Launch \'%s\' [Y/n]? '>)}
                            {(DQ ($ Id.VSub_DollarName merge_tool))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <read>
                          more_env: []
                          words: [{<read>} {<ans>}]
                          redirects: []
                          do_fork: T
                        )
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Return return>
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Simple
                                  blame_tok: <test>
                                  more_env: []
                                  words: [
                                    {<test>}
                                    {(DQ ($ Id.VSub_DollarName ans))}
                                    {<Id.Lit_Equals '='>}
                                    {<n>}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return>)]
                          spids: [277 290]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  spids: [198 203]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <use_ext_cmd>
                          more_env: []
                          words: [{<use_ext_cmd>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <export>
                      more_env: []
                      words: [{<export>} {<BASE>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <eval>
                      more_env: []
                      words: [
                        {<eval>}
                        {($ Id.VSub_DollarName GIT_DIFFTOOL_EXTCMD)}
                        {(SQ <'"$LOCAL"'>)}
                        {(SQ <'"$REMOTE"'>)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [303 308]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <run_merge_tool>
                  more_env: []
                  words: [{<run_merge_tool>} {(DQ ($ Id.VSub_DollarName merge_tool))}]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Pipeline
                  negated: <Id.KW_Bang '!'>
                  children: [
                    (command.Simple
                      blame_tok: <use_ext_cmd>
                      more_env: []
                      words: [{<use_ext_cmd>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: []
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName GIT_DIFF_TOOL))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'merge_tool='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'merge_tool='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'merge_tool='> name:merge_tool)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName GIT_DIFF_TOOL))}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [353 364]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.AndOr
                  children: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'merge_tool='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'merge_tool='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'merge_tool='> name:merge_tool)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSub
                                  left_token: <Id.Left_DollarParen '$('>
                                  child: 
                                    (command.Simple
                                      blame_tok: <get_merge_tool>
                                      more_env: []
                                      words: [{<get_merge_tool>}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  right: <Id.Eof_RParen _>
                                )
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
                  ]
                  ops: [<Id.Op_DPipe _>]
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          spids: [344 350]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName GIT_DIFFTOOL_DIRDIFF))}]
                  redirects: []
                  do_fork: T
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'LOCAL='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'LOCAL='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LOCAL='> name:LOCAL)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'REMOTE='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'REMOTE='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REMOTE='> name:REMOTE)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 2))}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <run_merge_tool>
              more_env: []
              words: [{<run_merge_tool>} {(DQ ($ Id.VSub_DollarName merge_tool))} {<false>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [393 403]
        )
      ]
      else_kw: <Id.KW_Else else>
      else_action: [
        (command.WhileUntil
          keyword: <Id.KW_While while>
          cond: 
            (condition.Shell
              commands: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [{<test>} {($ Id.VSub_Pound '#')} {<-gt>} {<6>}]
                  redirects: []
                  do_fork: T
                )
              ]
            )
          body: 
            (command.DoGroup
              left: <Id.KW_Do do>
              children: [
                (command.Simple
                  blame_tok: <launch_merge_tool>
                  more_env: []
                  words: [
                    {<launch_merge_tool>}
                    {(DQ ($ Id.VSub_Number 1))}
                    {(DQ ($ Id.VSub_Number 2))}
                    {(DQ ($ Id.VSub_Number 5))}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'status='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'status='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'status='> name:status)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_QMark '?')}
                    )
                  ]
                  redirects: []
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [{<test>} {($ Id.VSub_DollarName status)} {<-ge>} {<126>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Exit exit>
                          arg_word: {($ Id.VSub_DollarName status)}
                        )
                      ]
                      spids: [466 477]
                    )
                  ]
                  else_action: []
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.AndOr
                              children: [
                                (command.Simple
                                  blame_tok: <test>
                                  more_env: []
                                  words: [
                                    {<test>}
                                    {(DQ ($ Id.VSub_DollarName status))}
                                    {<Id.KW_Bang '!'> <Id.Lit_Equals '='>}
                                    {<0>}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                                (command.Simple
                                  blame_tok: <test>
                                  more_env: []
                                  words: [
                                    {<test>}
                                    {(DQ ($ Id.VSub_DollarName GIT_DIFFTOOL_TRUST_EXIT_CODE))}
                                    {<Id.Lit_Equals '='>}
                                    {<true>}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: [<Id.Op_DAmp _>]
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Exit exit>
                          arg_word: {($ Id.VSub_DollarName status)}
                        )
                      ]
                      spids: [497 524]
                    )
                  ]
                  else_action: []
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
                (command.Simple
                  blame_tok: <shift>
                  more_env: []
                  words: [{<shift>} {<7>}]
                  redirects: []
                  do_fork: T
                )
              ]
              right: <Id.KW_Done done>
            )
          redirects: []
        )
      ]
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)