(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:bases spids:[22])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [22]
        )
        (assign_pair
          lhs: (lhs_expr.LhsName name:head spids:[24])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [24]
        )
        (assign_pair
          lhs: (lhs_expr.LhsName name:remotes spids:[26])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [26]
        )
        (assign_pair
          lhs: (lhs_expr.LhsName name:sep_seen spids:[28])
          op: Equal
          rhs: (word.EmptyWord)
          spids: [28]
        )
      ]
      spids: [22]
    )
    (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:[59])
                          op: Equal
                          rhs: {(yes)}
                          spids: [59]
                        )
                      ]
                      spids: [59]
                    )
                  ]
                  spids: [52 56 63 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:[74])
                          op: Equal
                          rhs: {($ VSub_Name '$arg')}
                          spids: [74]
                        )
                      ]
                      spids: [74]
                    )
                  ]
                  spids: [66 71 78 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:[88])
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$remotes') ($ VSub_Name '$arg') (' '))}
                          spids: [88]
                        )
                      ]
                      spids: [88]
                    )
                  ]
                  spids: [81 85 96 16777215]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:bases spids:[103])
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$bases') ($ VSub_Name '$arg') (' '))}
                          spids: [103]
                        )
                      ]
                      spids: [103]
                    )
                  ]
                  spids: [99 100 111 16777215]
                )
              ]
              spids: [37 49 114]
            )
          ]
          spids: [34 116]
        )
      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: [130 137 144 16777215]
        )
      ]
      spids: [122 128 146]
    )
    (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 165]
        )
      ]
      spids: [16777215 172]
    )
    (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:[213])
                  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: [214 221]
                      )
                    }
                  spids: [213]
                )
              ]
              spids: [213]
            )
          ]
          action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})]
          spids: [16777215 223]
        )
      ]
      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 251]
            )
          ]
          else_action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
          spids: [259 267]
        )
      ]
      spids: [230 269]
    )
  ]
)