(command.CommandList
  children: [
    (command.Simple
      blame_tok: <Id.Lit_Colon ':'>
      more_env: []
      words: [
        {<Id.Lit_Colon ':'>}
        {
          (BracedVarSub
            left: <Id.Left_DollarBrace '${'>
            token: <Id.VSub_Name MERGE_TOOLS_DIR>
            var_name: MERGE_TOOLS_DIR
            suffix_op: 
              (suffix_op.Unary
                op: <Id.VTest_Equals _>
                arg_word: 
                  {
                    (CommandSub
                      left_token: <Id.Left_DollarParen '$('>
                      child: 
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<--exec-path>}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Eof_RParen _>
                    ) <Id.Lit_Slash '/'> <mergetools>
                  }
              )
            right: <Id.Right_DollarBrace '}'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'IFS='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'IFS='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'IFS='> name:IFS)
          op: assign_op.Equal
          rhs: {(SQ <'\n'>)}
        )
      ]
      redirects: []
    )
    (command.ShFunction
      name_tok: <mode_ok>
      name: mode_ok
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <diff_mode>
                          more_env: []
                          words: [{<diff_mode>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <can_diff>
                      more_env: []
                      words: [{<can_diff>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [33 38]
                )
                (IfArm
                  keyword: <Id.KW_Elif elif>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <merge_mode>
                          more_env: []
                          words: [{<merge_mode>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <can_merge>
                      more_env: []
                      words: [{<can_merge>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [44 49]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <false>
                  more_env: []
                  words: [{<false>}]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <is_available>
      name: is_available
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'merge_tool_path='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'merge_tool_path='>
                      lhs: 
                        (sh_lhs_expr.Name
                          left: <Id.Lit_VarLike 'merge_tool_path='>
                          name: merge_tool_path
                        )
                      op: assign_op.Equal
                      rhs: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <translate_merge_tool_path>
                                more_env: []
                                words: [{<translate_merge_tool_path>} {(DQ ($ Id.VSub_Number 1))}]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <type>
                  more_env: []
                  words: [{<type>} {(DQ ($ Id.VSub_DollarName merge_tool_path))}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                    (Redir
                      op: <Id.Redir_GreatAnd '2>&'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<1>}
                    )
                  ]
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <list_config_tools>
      name: list_config_tools
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'section='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'section='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'section='> name:section)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'line_prefix='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'line_prefix='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'line_prefix='> name:line_prefix)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Number 2>
                        var_name: 2
                        suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Pipeline
              children: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [
                    {<git>}
                    {<config>}
                    {<--get-regexp>}
                    {($ Id.VSub_DollarName section) (SQ <'\\..*\\.cmd'>)}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <read>
                          more_env: []
                          words: [{<read>} {<-r>} {<key>} {<value>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      left: <Id.KW_Do do>
                      children: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'toolname='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'toolname='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'toolname='> name:toolname)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (BracedVarSub
                                    left: <Id.Left_DollarBrace '${'>
                                    token: <Id.VSub_Name key>
                                    var_name: key
                                    suffix_op: 
                                      (suffix_op.Unary
                                        op: <Id.VOp1_Pound '#'>
                                        arg_word: {($ Id.VSub_DollarName section) <.>}
                                      )
                                    right: <Id.Right_DollarBrace '}'>
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'toolname='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'toolname='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'toolname='> name:toolname)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (BracedVarSub
                                    left: <Id.Left_DollarBrace '${'>
                                    token: <Id.VSub_Name toolname>
                                    var_name: toolname
                                    suffix_op: 
                                      (suffix_op.Unary
                                        op: <Id.VOp1_Percent '%'>
                                        arg_word: {<.cmd>}
                                      )
                                    right: <Id.Right_DollarBrace '}'>
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.Simple
                          blame_tok: <printf>
                          more_env: []
                          words: [
                            {<printf>}
                            {(DQ <'%s%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                            {(DQ ($ Id.VSub_DollarName line_prefix))}
                            {(DQ ($ Id.VSub_DollarName toolname))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      right: <Id.KW_Done done>
                    )
                  redirects: []
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <show_tool_names>
      name: show_tool_names
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'condition='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'condition='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'condition='> name:condition)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Number 1>
                        var_name: 1
                        suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<true>})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
                (AssignPair
                  left: <Id.Lit_VarLike 'per_line_prefix='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'per_line_prefix='>
                      name: per_line_prefix
                    )
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Number 2>
                        var_name: 2
                        suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
                (AssignPair
                  left: <Id.Lit_VarLike 'preamble='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'preamble='> name:preamble)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Number 3>
                        var_name: 3
                        suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'not_found_msg='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'not_found_msg='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'not_found_msg='> name:not_found_msg)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Number 4>
                        var_name: 4
                        suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'extra_content='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'extra_content='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'extra_content='> name:extra_content)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Number 5>
                        var_name: 5
                        suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'shown_any='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'shown_any='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'shown_any='> name:shown_any)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              redirects: []
            )
            (command.Pipeline
              children: [
                (command.Subshell
                  left: <Id.Op_LParen _>
                  child: 
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <cd>
                          more_env: []
                          words: [{<cd>} {(DQ ($ Id.VSub_DollarName MERGE_TOOLS_DIR))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <ls>
                          more_env: []
                          words: [{<ls>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DAmp _>]
                    )
                  right: <Id.Right_Subshell _>
                  redirects: []
                )
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.WhileUntil
                      keyword: <Id.KW_While while>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Simple
                              blame_tok: <read>
                              more_env: []
                              words: [{<read>} {<toolname>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                        )
                      body: 
                        (command.DoGroup
                          left: <Id.KW_Do do>
                          children: [
                            (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: <setup_tool>
                                              more_env: []
                                              words: [
                                                {<setup_tool>}
                                                {(DQ ($ Id.VSub_DollarName toolname))}
                                              ]
                                              redirects: [
                                                (Redir
                                                  op: <Id.Redir_Great '2>'>
                                                  loc: (redir_loc.Fd fd:2)
                                                  arg: {<'/dev/null'>}
                                                )
                                              ]
                                              do_fork: T
                                            )
                                            (command.Subshell
                                              left: <Id.Op_LParen _>
                                              child: 
                                                (command.Simple
                                                  blame_tok: <eval>
                                                  more_env: []
                                                  words: [
                                                    {<eval>}
                                                    {(DQ ($ Id.VSub_DollarName condition))}
                                                    {(DQ ($ Id.VSub_DollarName toolname))}
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                              right: <Id.Right_Subshell _>
                                              redirects: []
                                            )
                                          ]
                                          ops: [<Id.Op_DAmp _>]
                                        )
                                      ]
                                    )
                                  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 preamble))}
                                                  ]
                                                  redirects: []
                                                  do_fork: T
                                                )
                                              ]
                                            )
                                          then_kw: <Id.KW_Then then>
                                          action: [
                                            (command.Simple
                                              blame_tok: <printf>
                                              more_env: []
                                              words: [
                                                {<printf>}
                                                {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                                                {(DQ ($ Id.VSub_DollarName preamble))}
                                              ]
                                              redirects: []
                                              do_fork: T
                                            )
                                            (command.ShAssignment
                                              left: <Id.Lit_VarLike 'preamble='>
                                              pairs: [
                                                (AssignPair
                                                  left: <Id.Lit_VarLike 'preamble='>
                                                  lhs: 
                                                    (sh_lhs_expr.Name
                                                      left: <Id.Lit_VarLike 'preamble='>
                                                      name: preamble
                                                    )
                                                  op: assign_op.Equal
                                                  rhs: (rhs_word__Empty)
                                                )
                                              ]
                                              redirects: []
                                            )
                                          ]
                                          spids: [294 305]
                                        )
                                      ]
                                      else_action: []
                                      fi_kw: <Id.KW_Fi fi>
                                      redirects: []
                                    )
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'shown_any='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'shown_any='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'shown_any='>
                                              name: shown_any
                                            )
                                          op: assign_op.Equal
                                          rhs: {<yes>}
                                        )
                                      ]
                                      redirects: []
                                    )
                                    (command.Simple
                                      blame_tok: <printf>
                                      more_env: []
                                      words: [
                                        {<printf>}
                                        {(DQ <'%s%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                                        {(DQ ($ Id.VSub_DollarName per_line_prefix))}
                                        {(DQ ($ Id.VSub_DollarName toolname))}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  spids: [264 291]
                                )
                              ]
                              else_action: []
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                          ]
                          right: <Id.KW_Done done>
                        )
                      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 extra_content))}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                            )
                          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 preamble))}]
                                          redirects: []
                                          do_fork: T
                                        )
                                      ]
                                    )
                                  then_kw: <Id.KW_Then then>
                                  action: [
                                    (command.Simple
                                      blame_tok: <printf>
                                      more_env: []
                                      words: [
                                        {<printf>}
                                        {(DQ <'%s'>)}
                                        {(DQ ($ Id.VSub_DollarName preamble))}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.ShAssignment
                                      left: <Id.Lit_VarLike 'preamble='>
                                      pairs: [
                                        (AssignPair
                                          left: <Id.Lit_VarLike 'preamble='>
                                          lhs: 
                                            (sh_lhs_expr.Name
                                              left: <Id.Lit_VarLike 'preamble='>
                                              name: preamble
                                            )
                                          op: assign_op.Equal
                                          rhs: (rhs_word__Empty)
                                        )
                                      ]
                                      redirects: []
                                    )
                                  ]
                                  spids: [369 380]
                                )
                              ]
                              else_action: []
                              fi_kw: <Id.KW_Fi fi>
                              redirects: []
                            )
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'shown_any='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'shown_any='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'shown_any='>
                                      name: shown_any
                                    )
                                  op: assign_op.Equal
                                  rhs: {<yes>}
                                )
                              ]
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <printf>
                              more_env: []
                              words: [
                                {<printf>}
                                {
                                  (DQ <Id.Lit_BadBackslash '\\'> <'n%s'> <Id.Lit_BadBackslash '\\'> <n>)
                                }
                                {(DQ ($ Id.VSub_DollarName extra_content))}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [355 366]
                        )
                      ]
                      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>} {<-n>} {(DQ ($ Id.VSub_DollarName preamble))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <test>
                                      more_env: []
                                      words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName not_found_msg))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_DAmp _>]
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <printf>
                              more_env: []
                              words: [
                                {<printf>}
                                {(DQ <'%s'> <Id.Lit_BadBackslash '\\'> <n>)}
                                {(DQ ($ Id.VSub_DollarName not_found_msg))}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [430 451]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.Simple
                      blame_tok: <test>
                      more_env: []
                      words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName shown_any))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
              ]
              ops: [<Id.Op_Pipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <diff_mode>
      name: diff_mode
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <test>
              more_env: []
              words: [{<test>} {(DQ ($ Id.VSub_DollarName TOOL_MODE))} {<Id.Lit_Equals '='>} {<diff>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <merge_mode>
      name: merge_mode
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <test>
              more_env: []
              words: [{<test>} {(DQ ($ Id.VSub_DollarName TOOL_MODE))} {<Id.Lit_Equals '='>} {<merge>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <translate_merge_tool_path>
      name: translate_merge_tool_path
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_Number 1))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <check_unchanged>
      name: check_unchanged
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (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 MERGED))}
                            {<-nt>}
                            {(DQ ($ Id.VSub_DollarName BACKUP))}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  spids: [550 565]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <true>
                          more_env: []
                          words: [{<true>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  body: 
                    (command.DoGroup
                      left: <Id.KW_Do do>
                      children: [
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {(DQ ($ Id.VSub_DollarName MERGED) <' seems unchanged.'>)}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <printf>
                          more_env: []
                          words: [{<printf>} {(DQ <'Was the merge successful [y/n]? '>)}]
                          redirects: []
                          do_fork: T
                        )
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <read>
                              more_env: []
                              words: [{<read>} {<answer>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Return return>
                              arg_word: {<1>}
                            )
                          ]
                          ops: [<Id.Op_DPipe _>]
                        )
                        (command.Case
                          case_kw: <Id.KW_Case case>
                          to_match: (case_arg.Word w:{(DQ ($ Id.VSub_DollarName answer))})
                          arms_start: <Id.KW_In in>
                          arms: [
                            (CaseArm
                              left: <y>
                              pattern: 
                                (pat.Words
                                  words: [{<y> <Id.Lit_Star '*'>} {<Y> <Id.Lit_Star '*'>}]
                                )
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.ControlFlow
                                  keyword: <Id.ControlFlow_Return return>
                                  arg_word: {<0>}
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                            (CaseArm
                              left: <n>
                              pattern: 
                                (pat.Words
                                  words: [{<n> <Id.Lit_Star '*'>} {<N> <Id.Lit_Star '*'>}]
                                )
                              middle: <Id.Right_CasePat _>
                              action: [
                                (command.ControlFlow
                                  keyword: <Id.ControlFlow_Return return>
                                  arg_word: {<1>}
                                )
                              ]
                              right: <Id.Op_DSemi _>
                            )
                          ]
                          arms_end: <Id.KW_Esac esac>
                          redirects: []
                        )
                      ]
                      right: <Id.KW_Done done>
                    )
                  redirects: []
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <valid_tool>
      name: valid_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <setup_tool>
                  more_env: []
                  words: [{<setup_tool>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow
                  keyword: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'cmd='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'cmd='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cmd='> name:cmd)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <get_merge_tool_cmd>
                            more_env: []
                            words: [{<get_merge_tool_cmd>} {(DQ ($ Id.VSub_Number 1))}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test>
              more_env: []
              words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName cmd))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <setup_user_tool>
      name: setup_user_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'merge_tool_cmd='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'merge_tool_cmd='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'merge_tool_cmd='> name:merge_tool_cmd)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <get_merge_tool_cmd>
                            more_env: []
                            words: [{<get_merge_tool_cmd>} {(DQ ($ Id.VSub_DollarName tool))}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName merge_tool_cmd))}]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow
                  keyword: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.ShFunction
              name_tok: <diff_cmd>
              name: diff_cmd
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Subshell
                      left: <Id.Op_LParen _>
                      child: 
                        (command.Simple
                          blame_tok: <eval>
                          more_env: []
                          words: [{<eval>} {($ Id.VSub_DollarName merge_tool_cmd)}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Right_Subshell _>
                      redirects: []
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <merge_cmd>
              name: merge_cmd
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'trust_exit_code='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'trust_exit_code='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'trust_exit_code='>
                              name: trust_exit_code
                            )
                          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>}
                                          {(DQ <mergetool.> ($ Id.VSub_Number 1) <.trustExitCode>)}
                                        ]
                                        redirects: []
                                        do_fork: T
                                      )
                                      (command.Simple
                                        blame_tok: <echo>
                                        more_env: []
                                        words: [{<echo>} {<false>}]
                                        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 trust_exit_code))}
                                    {<Id.Lit_Equals '='>}
                                    {(DQ <false>)}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <touch>
                              more_env: []
                              words: [{<touch>} {(DQ ($ Id.VSub_DollarName BACKUP))}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Subshell
                              left: <Id.Op_LParen _>
                              child: 
                                (command.Simple
                                  blame_tok: <eval>
                                  more_env: []
                                  words: [{<eval>} {($ Id.VSub_DollarName merge_tool_cmd)}]
                                  redirects: []
                                  do_fork: T
                                )
                              right: <Id.Right_Subshell _>
                              redirects: []
                            )
                            (command.Simple
                              blame_tok: <check_unchanged>
                              more_env: []
                              words: [{<check_unchanged>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          spids: [787 802]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.Subshell
                          left: <Id.Op_LParen _>
                          child: 
                            (command.Simple
                              blame_tok: <eval>
                              more_env: []
                              words: [{<eval>} {($ Id.VSub_DollarName merge_tool_cmd)}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Right_Subshell _>
                          redirects: []
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <setup_tool>
      name: setup_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'tool='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'tool='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tool='> name:tool)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 1))}
                )
              ]
              redirects: []
            )
            (command.ShFunction
              name_tok: <can_merge>
              name: can_merge
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <can_diff>
              name: can_diff
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<0>}
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <diff_cmd>
              name: diff_cmd
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <merge_cmd>
              name: merge_cmd
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
            )
            (command.ShFunction
              name_tok: <translate_merge_tool_path>
              name: translate_merge_tool_path
              body: 
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  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: <test>
                              more_env: []
                              words: [
                                {<test>}
                                {<-f>}
                                {
                                  (DQ ($ Id.VSub_DollarName MERGE_TOOLS_DIR) <'/'> 
                                    ($ Id.VSub_DollarName tool)
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: []
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <setup_user_tool>
                      more_env: []
                      words: [{<setup_user_tool>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {($ Id.VSub_QMark '?')}
                    )
                  ]
                  spids: [950 965]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <.>
              more_env: []
              words: [
                {<.>}
                {(DQ ($ Id.VSub_DollarName MERGE_TOOLS_DIR) <'/'> ($ Id.VSub_DollarName tool))}
              ]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <setup_user_tool>
              more_env: []
              words: [{<setup_user_tool>}]
              redirects: []
              do_fork: T
            )
            (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: <merge_mode>
                              more_env: []
                              words: [{<merge_mode>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Pipeline
                              negated: <Id.KW_Bang '!'>
                              children: [
                                (command.Simple
                                  blame_tok: <can_merge>
                                  more_env: []
                                  words: [{<can_merge>}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: []
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'error: \''> ($ Id.VSub_DollarName tool) 
                            <'\' can not be used to resolve merges'>
                          )
                        }
                      ]
                      redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1005 1016]
                )
                (IfArm
                  keyword: <Id.KW_Elif elif>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <diff_mode>
                              more_env: []
                              words: [{<diff_mode>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Pipeline
                              negated: <Id.KW_Bang '!'>
                              children: [
                                (command.Simple
                                  blame_tok: <can_diff>
                                  more_env: []
                                  words: [{<can_diff>}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: []
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'error: \''> ($ Id.VSub_DollarName tool) 
                            <'\' can only be used to resolve merges'>
                          )
                        }
                      ]
                      redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1036 1047]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <get_merge_tool_cmd>
      name: get_merge_tool_cmd
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          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 ($ 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: <diff_mode>
                          more_env: []
                          words: [{<diff_mode>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [
                            {<git>}
                            {<config>}
                            {(DQ <difftool.> ($ Id.VSub_DollarName merge_tool) <.cmd>)}
                          ]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [
                            {<git>}
                            {<config>}
                            {(DQ <mergetool.> ($ Id.VSub_DollarName merge_tool) <.cmd>)}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                  ]
                  spids: [1091 1096]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<config>} {(DQ <mergetool.> ($ Id.VSub_DollarName merge_tool) <.cmd>)}]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <run_merge_tool>
      name: run_merge_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'GIT_PREFIX='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'GIT_PREFIX='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'GIT_PREFIX='> name:GIT_PREFIX)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (BracedVarSub
                        left: <Id.Left_DollarBrace '${'>
                        token: <Id.VSub_Name GIT_PREFIX>
                        var_name: GIT_PREFIX
                        suffix_op: (suffix_op.Unary op:<Id.VTest_ColonHyphen _> arg_word:{<.>})
                        right: <Id.Right_DollarBrace '}'>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [{<export>} {<GIT_PREFIX>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'merge_tool_path='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'merge_tool_path='>
                      lhs: 
                        (sh_lhs_expr.Name
                          left: <Id.Lit_VarLike 'merge_tool_path='>
                          name: merge_tool_path
                        )
                      op: assign_op.Equal
                      rhs: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <get_merge_tool_path>
                                more_env: []
                                words: [{<get_merge_tool_path>} {(DQ ($ Id.VSub_Number 1))}]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
                (command.ControlFlow keyword:<Id.ControlFlow_Exit exit>)
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'base_present='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'base_present='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'base_present='> name:base_present)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number 2))}
                )
              ]
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <setup_tool>
                  more_env: []
                  words: [{<setup_tool>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow
                  keyword: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
              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: <merge_mode>
                          more_env: []
                          words: [{<merge_mode>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <run_merge_cmd>
                      more_env: []
                      words: [{<run_merge_cmd>} {(DQ ($ Id.VSub_Number 1))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [1214 1219]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <run_diff_cmd>
                  more_env: []
                  words: [{<run_diff_cmd>} {(DQ ($ Id.VSub_Number 1))}]
                  redirects: []
                  do_fork: T
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <run_diff_cmd>
      name: run_diff_cmd
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <diff_cmd>
              more_env: []
              words: [{<diff_cmd>} {(DQ ($ Id.VSub_Number 1))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <run_merge_cmd>
      name: run_merge_cmd
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <merge_cmd>
              more_env: []
              words: [{<merge_cmd>} {(DQ ($ Id.VSub_Number 1))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <list_merge_tool_candidates>
      name: list_merge_tool_candidates
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <merge_mode>
                          more_env: []
                          words: [{<merge_mode>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'tools='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'tools='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                          op: assign_op.Equal
                          rhs: {(DQ <tortoisemerge>)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1292 1297]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'tools='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'tools='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                      op: assign_op.Equal
                      rhs: {(DQ <kompare>)}
                    )
                  ]
                  redirects: []
                )
              ]
              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 DISPLAY))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  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 GNOME_DESKTOP_SESSION_ID))}
                                  ]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'tools='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'tools='>
                                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ <'meld opendiff kdiff3 tkdiff xxdiff '> 
                                        ($ Id.VSub_DollarName tools)
                                      )
                                    }
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [1332 1343]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'tools='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'tools='>
                              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ <'opendiff kdiff3 tkdiff xxdiff meld '> 
                                    ($ Id.VSub_DollarName tools)
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'tools='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'tools='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ ($ Id.VSub_DollarName tools) <' gvimdiff diffuse diffmerge ecmerge'>)
                            }
                        )
                      ]
                      redirects: []
                    )
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'tools='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'tools='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName tools) <' p4merge araxis bc codecompare'>)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1318 1329]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: 
                (case_arg.Word
                  w: 
                    {
                      (DQ 
                        (BracedVarSub
                          left: <Id.Left_DollarBrace '${'>
                          token: <Id.VSub_Name VISUAL>
                          var_name: VISUAL
                          suffix_op: 
                            (suffix_op.Unary
                              op: <Id.VTest_ColonHyphen _>
                              arg_word: {($ Id.VSub_DollarName EDITOR)}
                            )
                          right: <Id.Right_DollarBrace '}'>
                        )
                      )
                    }
                )
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Lit_Star '*'>
                  pattern: (pat.Words words:[{<Id.Lit_Star '*'> <vim> <Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'tools='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'tools='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName tools) <' vimdiff emerge'>)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
                (CaseArm
                  left: <Id.Lit_Star '*'>
                  pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
                  middle: <Id.Right_CasePat _>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'tools='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'tools='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tools='> name:tools)
                          op: assign_op.Equal
                          rhs: {(DQ ($ Id.VSub_DollarName tools) <' emerge vimdiff'>)}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <show_tool_help>
      name: show_tool_help
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'tool_opt='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'tool_opt='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tool_opt='> name:tool_opt)
                  op: assign_op.Equal
                  rhs: {(DQ <'\'git '> (${ Id.VSub_Name TOOL_MODE) <'tool --tool=<tool>\''>)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'tab='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'tab='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tab='> name:tab)
                  op: assign_op.Equal
                  rhs: {(SQ <'\t'>)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'LF='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'LF='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'LF='> name:LF)
                  op: assign_op.Equal
                  rhs: {(SQ <'\n'>)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'any_shown='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'any_shown='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'any_shown='> name:any_shown)
                  op: assign_op.Equal
                  rhs: {<no>}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'cmd_name='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'cmd_name='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cmd_name='> name:cmd_name)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Name TOOL_MODE) <tool>}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'config_tools='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'config_tools='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'config_tools='> name:config_tools)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (BraceGroup
                                left: <Id.Lit_LBrace '{'>
                                children: [
                                  (command.AndOr
                                    children: [
                                      (command.Simple
                                        blame_tok: <diff_mode>
                                        more_env: []
                                        words: [{<diff_mode>}]
                                        redirects: []
                                        do_fork: T
                                      )
                                      (command.Simple
                                        blame_tok: <list_config_tools>
                                        more_env: []
                                        words: [
                                          {<list_config_tools>}
                                          {<difftool>}
                                          {(DQ ($ Id.VSub_DollarName tab) ($ Id.VSub_DollarName tab))}
                                        ]
                                        redirects: []
                                        do_fork: T
                                      )
                                    ]
                                    ops: [<Id.Op_DAmp _>]
                                  )
                                  (command.Simple
                                    blame_tok: <list_config_tools>
                                    more_env: []
                                    words: [
                                      {<list_config_tools>}
                                      {<mergetool>}
                                      {(DQ ($ Id.VSub_DollarName tab) ($ Id.VSub_DollarName tab))}
                                    ]
                                    redirects: []
                                    do_fork: T
                                  )
                                ]
                                redirects: []
                                right: <Id.Lit_RBrace '}'>
                              )
                              (command.Simple
                                blame_tok: <sort>
                                more_env: []
                                words: [{<sort>}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_Pipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'extra_content='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'extra_content='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'extra_content='> name:extra_content)
                  op: assign_op.Equal
                  rhs: (rhs_word__Empty)
                )
              ]
              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 config_tools))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'extra_content='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'extra_content='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'extra_content='>
                              name: extra_content
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ (${ Id.VSub_Name tab) <'user-defined:'> (${ Id.VSub_Name LF) 
                                ($ Id.VSub_DollarName config_tools)
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1514 1525]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <show_tool_names>
                  more_env: []
                  words: [
                    {<show_tool_names>}
                    {(SQ <'mode_ok && is_available'>)}
                    {(DQ ($ Id.VSub_DollarName tab) ($ Id.VSub_DollarName tab))}
                    {(DQ ($ Id.VSub_DollarName tool_opt) <' may be set to one of the following:'>)}
                    {
                      (DQ <'No suitable tool for \'git '> ($ Id.VSub_DollarName cmd_name) 
                        <' --tool=<tool>\' found.'>
                      )
                    }
                    {(DQ ($ Id.VSub_DollarName extra_content))}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'any_shown='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'any_shown='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'any_shown='> name:any_shown)
                      op: assign_op.Equal
                      rhs: {<yes>}
                    )
                  ]
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <show_tool_names>
                  more_env: []
                  words: [
                    {<show_tool_names>}
                    {(SQ <'mode_ok && ! is_available'>)}
                    {(DQ ($ Id.VSub_DollarName tab) ($ Id.VSub_DollarName tab))}
                    {
                      (DQ (${ Id.VSub_Name LF) 
                        <'The following tools are valid, but not currently available:'>
                      )
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'any_shown='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'any_shown='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'any_shown='> name:any_shown)
                      op: assign_op.Equal
                      rhs: {<yes>}
                    )
                  ]
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _>]
            )
            (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 any_shown))}
                            {<Id.Lit_Equals '='>}
                            {<yes>}
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ <'Some of the tools listed above only work in a windowed'>)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {(DQ <'environment. If run in a terminal-only session, they will fail.'>)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [1613 1626]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <guess_merge_tool>
      name: guess_merge_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <list_merge_tool_candidates>
              more_env: []
              words: [{<list_merge_tool_candidates>}]
              redirects: []
              do_fork: T
            )
            (command.Simple
              blame_tok: <cat>
              more_env: []
              words: [{<cat>}]
              redirects: [
                (Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})
                (Redir
                  op: <Id.Redir_DLessDash '<<-'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_tok: <Id.Undefined_Tok ''>
                      stdin_parts: [
                        <'\n'>
                        <'This message is displayed because \''>
                        ($ Id.VSub_DollarName TOOL_MODE)
                        <'.tool\' is not configured.\n'>
                        <'See \'git '>
                        (${ Id.VSub_Name TOOL_MODE)
                        <'tool --tool-help\' or \'git help config\' for more details.\n'>
                        <'\'git '>
                        (${ Id.VSub_Name TOOL_MODE)
                        <'tool\' will now attempt to use one of the following tools:\n'>
                        ($ Id.VSub_DollarName tools)
                        <'\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'IFS='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'IFS='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'IFS='> name:IFS)
                  op: assign_op.Equal
                  rhs: {(SQ <' '>)}
                )
              ]
              redirects: []
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [tool]
              iterable: (for_iter.Words words:[{($ Id.VSub_DollarName tools)}])
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <is_available>
                          more_env: []
                          words: [{<is_available>} {(DQ ($ Id.VSub_DollarName tool))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <echo>
                          more_env: []
                          words: [{<echo>} {(DQ ($ Id.VSub_DollarName tool))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ <'No known '> (${ Id.VSub_Name TOOL_MODE) <' tool is available.'>)}]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <get_configured_merge_tool>
      name: get_configured_merge_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <diff_mode>
                          more_env: []
                          words: [{<diff_mode>}]
                          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: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.AndOr
                                    children: [
                                      (command.Simple
                                        blame_tok: <git>
                                        more_env: []
                                        words: [{<git>} {<config>} {<diff.tool>}]
                                        redirects: []
                                        do_fork: T
                                      )
                                      (command.Simple
                                        blame_tok: <git>
                                        more_env: []
                                        words: [{<git>} {<config>} {<merge.tool>}]
                                        redirects: []
                                        do_fork: T
                                      )
                                    ]
                                    ops: [<Id.Op_DPipe _>]
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1779 1784]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_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: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <git>
                                more_env: []
                                words: [{<git>} {<config>} {<merge.tool>}]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
              ]
              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>} {<-n>} {(DQ ($ Id.VSub_DollarName merge_tool))}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Pipeline
                              negated: <Id.KW_Bang '!'>
                              children: [
                                (command.Simple
                                  blame_tok: <valid_tool>
                                  more_env: []
                                  words: [{<valid_tool>} {(DQ ($ Id.VSub_DollarName merge_tool))}]
                                  redirects: []
                                  do_fork: T
                                )
                              ]
                              ops: []
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'git config option '> ($ Id.VSub_DollarName TOOL_MODE) 
                            <'.tool set to unknown tool: '> ($ Id.VSub_DollarName merge_tool)
                          )
                        }
                      ]
                      redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ <'Resetting to default...'>)}]
                      redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1821 1842]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName merge_tool))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <get_merge_tool_path>
      name: get_merge_tool_path
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          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 ($ 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.Pipeline
                          negated: <Id.KW_Bang '!'>
                          children: [
                            (command.Simple
                              blame_tok: <valid_tool>
                              more_env: []
                              words: [{<valid_tool>} {(DQ ($ Id.VSub_DollarName merge_tool))}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: []
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ <'Unknown merge tool '> ($ Id.VSub_DollarName merge_tool))}]
                      redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [1903 1914]
                )
              ]
              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: <diff_mode>
                          more_env: []
                          words: [{<diff_mode>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'merge_tool_path='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'merge_tool_path='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'merge_tool_path='>
                              name: merge_tool_path
                            )
                          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>}
                                          {<difftool.> (DQ ($ Id.VSub_DollarName merge_tool)) <.path>}
                                        ]
                                        redirects: []
                                        do_fork: T
                                      )
                                      (command.Simple
                                        blame_tok: <git>
                                        more_env: []
                                        words: [
                                          {<git>}
                                          {<config>}
                                          {<mergetool.> (DQ ($ Id.VSub_DollarName merge_tool)) <.path>}
                                        ]
                                        redirects: []
                                        do_fork: T
                                      )
                                    ]
                                    ops: [<Id.Op_DPipe _>]
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1936 1941]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'merge_tool_path='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'merge_tool_path='>
                      lhs: 
                        (sh_lhs_expr.Name
                          left: <Id.Lit_VarLike 'merge_tool_path='>
                          name: merge_tool_path
                        )
                      op: assign_op.Equal
                      rhs: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.Simple
                                blame_tok: <git>
                                more_env: []
                                words: [
                                  {<git>}
                                  {<config>}
                                  {<mergetool.> (DQ ($ Id.VSub_DollarName merge_tool)) <.path>}
                                ]
                                redirects: []
                                do_fork: T
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
              ]
              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>} {<-z>} {(DQ ($ Id.VSub_DollarName merge_tool_path))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'merge_tool_path='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'merge_tool_path='>
                          lhs: 
                            (sh_lhs_expr.Name
                              left: <Id.Lit_VarLike 'merge_tool_path='>
                              name: merge_tool_path
                            )
                          op: assign_op.Equal
                          rhs: 
                            {
                              (CommandSub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    blame_tok: <translate_merge_tool_path>
                                    more_env: []
                                    words: [
                                      {<translate_merge_tool_path>}
                                      {(DQ ($ Id.VSub_DollarName merge_tool))}
                                    ]
                                    redirects: []
                                    do_fork: T
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            }
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [1991 2002]
                )
              ]
              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>}
                                {<-z>}
                                {
                                  (DQ 
                                    (CommandSub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: 
                                        (command.Simple
                                          blame_tok: <get_merge_tool_cmd>
                                          more_env: []
                                          words: [
                                            {<get_merge_tool_cmd>}
                                            {(DQ ($ Id.VSub_DollarName merge_tool))}
                                          ]
                                          redirects: []
                                          do_fork: T
                                        )
                                      right: <Id.Eof_RParen _>
                                    )
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.Pipeline
                              negated: <Id.KW_Bang '!'>
                              children: [
                                (command.Simple
                                  blame_tok: <type>
                                  more_env: []
                                  words: [{<type>} {(DQ ($ Id.VSub_DollarName merge_tool_path))}]
                                  redirects: [
                                    (Redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                    (Redir
                                      op: <Id.Redir_GreatAnd '2>&'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<1>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                              ops: []
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'The '> ($ Id.VSub_DollarName TOOL_MODE) <' tool '> 
                            ($ Id.VSub_DollarName merge_tool) <' is not available as'>
                          )
                        }
                        {(DQ <'\''> ($ Id.VSub_DollarName merge_tool_path) <'\''>)}
                      ]
                      redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [2018 2052]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName merge_tool_path))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <get_merge_tool>
      name: get_merge_tool
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          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: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <get_configured_merge_tool>
                            more_env: []
                            words: [{<get_configured_merge_tool>}]
                            redirects: []
                            do_fork: T
                          )
                        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>} {<-z>} {(DQ ($ Id.VSub_DollarName merge_tool))}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  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: 
                                {
                                  (CommandSub
                                    left_token: <Id.Left_DollarParen '$('>
                                    child: 
                                      (command.Simple
                                        blame_tok: <guess_merge_tool>
                                        more_env: []
                                        words: [{<guess_merge_tool>}]
                                        redirects: []
                                        do_fork: T
                                      )
                                    right: <Id.Eof_RParen _>
                                  )
                                }
                            )
                          ]
                          redirects: []
                        )
                        (command.ControlFlow
                          keyword: <Id.ControlFlow_Exit exit>
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                  ]
                  spids: [2115 2126]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [{<echo>} {(DQ ($ Id.VSub_DollarName merge_tool))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <mergetool_find_win32_cmd>
      name: mergetool_find_win32_cmd
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'executable='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'executable='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'executable='> name:executable)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 1)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'sub_directory='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'sub_directory='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sub_directory='> name:sub_directory)
                  op: assign_op.Equal
                  rhs: {($ Id.VSub_Number 2)}
                )
              ]
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Simple
                          blame_tok: <type>
                          more_env: []
                          words: [{<type>} {<-p>} {(DQ ($ Id.VSub_DollarName executable))}]
                          redirects: [
                            (Redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/dev/null'>}
                            )
                            (Redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <printf>
                      more_env: []
                      words: [{<printf>} {(SQ <'%s'>)} {(DQ ($ Id.VSub_DollarName executable))}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ControlFlow keyword:<Id.ControlFlow_Return return>)
                  ]
                  spids: [2172 2189]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ForEach
              keyword: <Id.KW_For for>
              iter_names: [directory]
              iterable: 
                (for_iter.Words
                  words: [
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (command.Simple
                                blame_tok: <env>
                                more_env: []
                                words: [{<env>}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <grep>
                                more_env: []
                                words: [{<grep>} {<-Ei>} {(SQ <'^PROGRAM(FILES(\\(X86\\))?|W6432)='>)}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <cut>
                                more_env: []
                                words: [{<cut>} {<-d>} {(SQ <'='>)} {<-f>} {<2->}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <sort>
                                more_env: []
                                words: [{<sort>} {<-u>}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_Pipe _> <Id.Op_Pipe _> <Id.Op_Pipe _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                  ]
                )
              body: 
                (command.DoGroup
                  left: <Id.KW_Do do>
                  children: [
                    (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>} {<-n>} {(DQ ($ Id.VSub_DollarName directory))}]
                                      redirects: []
                                      do_fork: T
                                    )
                                    (command.Simple
                                      blame_tok: <test>
                                      more_env: []
                                      words: [
                                        {<test>}
                                        {<-x>}
                                        {
                                          (DQ ($ Id.VSub_DollarName directory) <'/'> 
                                            ($ Id.VSub_DollarName sub_directory) <'/'> ($ Id.VSub_DollarName executable)
                                          )
                                        }
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  ]
                                  ops: [<Id.Op_DAmp _>]
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.Simple
                              blame_tok: <printf>
                              more_env: []
                              words: [
                                {<printf>}
                                {(SQ <'%s'>)}
                                {
                                  (DQ ($ Id.VSub_DollarName directory) <'/'> 
                                    ($ Id.VSub_DollarName sub_directory) <'/'> ($ Id.VSub_DollarName executable)
                                  )
                                }
                              ]
                              redirects: []
                              do_fork: T
                            )
                            (command.ControlFlow
                              keyword: <Id.ControlFlow_Return return>
                            )
                          ]
                          spids: [2259 2284]
                        )
                      ]
                      else_action: []
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                  ]
                  right: <Id.KW_Done done>
                )
              redirects: []
            )
            (command.Simple
              blame_tok: <printf>
              more_env: []
              words: [{<printf>} {(SQ <'%s'>)} {(DQ ($ Id.VSub_DollarName executable))}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
  ]
)