(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:bases spids:[30])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [30]
        )
        (assign_pair
          lhs: (lhs_expr.LhsName name:head spids:[32])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [32]
        )
        (assign_pair
          lhs: (lhs_expr.LhsName name:remotes spids:[34])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [34]
        )
        (assign_pair
          lhs: (lhs_expr.LhsName name:sep_seen spids:[36])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [36]
        )
      ]
      spids: [30]
    )
    (command.ForEach
      iter_name: arg
      do_arg_iter: T
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: 
                {
                  (DQ (',') ($ VSub_Name '$sep_seen') (',') ($ VSub_Name '$head') (',') 
                    ($ VSub_Name '$arg') (',')
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(Lit_Other '*') (Lit_Comma ',') (--) (Lit_Comma ',')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:sep_seen spids:[67])
                          op: Equal
                          rhs: {(yes)}
                          spids: [67]
                        )
                      ]
                      spids: [67]
                    )
                  ]
                  spids: [60 64 71 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Comma ',') (yes) (Lit_Comma ',') (Lit_Comma ',') (Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:head spids:[82])
                          op: Equal
                          rhs: {($ VSub_Name '$arg')}
                          spids: [82]
                        )
                      ]
                      spids: [82]
                    )
                  ]
                  spids: [74 79 86 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Comma ',') (yes) (Lit_Comma ',') (Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:remotes spids:[96])
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$remotes') ($ VSub_Name '$arg') (' '))}
                          spids: [96]
                        )
                      ]
                      spids: [96]
                    )
                  ]
                  spids: [89 93 104 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:bases spids:[111])
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$bases') ($ VSub_Name '$arg') (' '))}
                          spids: [111]
                        )
                      ]
                      spids: [111]
                    )
                  ]
                  spids: [107 108 119 16777215]
                )
              ]
              spids: [45 57 122]
            )
          ]
          spids: [42 124]
        )
      spids: [16777215 16777215]
    )
    (command.Case
      to_match: {(DQ ($ VSub_Name '$remotes'))}
      arms: [
        (case_arm
          pat_list: [{(Lit_Other '?') (Lit_Other '*') (SQ <' '>) (Lit_Other '?') (Lit_Other '*')}]
          action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})]
          spids: [138 145 152 16777215]
        )
      ]
      spids: [130 136 154]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(SQ )} {(Lit_Other '=')} {(DQ ($ VSub_Name '$bases'))})]
          action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})]
          spids: [16777215 173]
        )
      ]
      spids: [16777215 180]
    )
    (C {(git)} {(update-index)} {(-q)} {(--refresh)})
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {(git)} {(read-tree)} {(-u)} {(-m)} {(--aggressive)} {($ VSub_Name '$bases')} 
          {($ VSub_Name '$head')} {($ VSub_Name '$remotes')}
        )
        (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})
      ]
    )
    (C {(echo)} {(DQ ('Trying simple merge.'))})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:result_tree spids:[221])
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.SimpleCommand
                                words: [{(git)} {(write-tree)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Redir_Great '2>'>
                                    fd: 2
                                    arg_word: {(/dev/null)}
                                  )
                                ]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [222 229]
                      )
                    }
                  spids: [221]
                )
              ]
              spids: [221]
            )
          ]
          action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})]
          spids: [16777215 231]
        )
      ]
      else_action: [
        (C {(echo)} {(DQ ('Simple merge failed, trying Automatic merge.'))})
        (command.If
          arms: [
            (if_arm
              cond: [(C {(git-merge-index)} {(-o)} {(git-merge-one-file)} {(-a)})]
              action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})]
              spids: [16777215 259]
            )
          ]
          else_action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
          spids: [267 275]
        )
      ]
      spids: [238 277]
    )
  ]
)