(command.CommandList
  children: [
    (command.ShFunction
      name: die
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              words: [{<echo>} {(DQ <'ERROR: '> ($ Id.VSub_Star '*'))}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/stderr'>})]
              more_env: []
              do_fork: T
            )
            (command.Simple
              words: [{<patch>} {<-p0>} {<make.conf.example>}]
              redirects: [
                (redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {<make.conf.example.diff>}
                )
              ]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.LogicalOr
                          left: 
                            (bool_expr.LogicalNot
                              child: (bool_expr.Unary op_id:Id.BoolUnary_f child:{<make.conf.example>})
                            )
                          right: 
                            (bool_expr.LogicalOr
                              left: 
                                (bool_expr.LogicalNot
                                  child: 
                                    (bool_expr.Unary
                                      op_id: Id.BoolUnary_f
                                      child: {<make.conf.example.x86.diff>}
                                    )
                                )
                              right: 
                                (bool_expr.LogicalNot
                                  child: (bool_expr.Unary op_id:Id.BoolUnary_d child:{<'../.git'>})
                                )
                            )
                        )
                      redirects: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'ERROR: current directory is invalid'>)}]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/stderr'>})]
              more_env: []
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [41 70]
        )
      ]
      else_action: []
      redirects: []
    )
    (command.Simple
      words: [
        {<git>}
        {<diff>}
        {<--no-prefix>}
        {<--relative> <Id.Lit_Equals '='> 
          (DQ 
            (command_sub
              left_token: <Id.Left_DollarParen '$('>
              child: 
                (C {<basename>} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<pwd>})
                        right: <Id.Eof_RParen _>
                      )
                    )
                  }
                )
              right: <Id.Eof_RParen _>
            )
          )
        }
        {<make.conf.example>}
      ]
      redirects: [
        (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<make.conf.example.diff>})
      ]
      more_env: []
      do_fork: T
    )
    (C {<git>} {<checkout>} {<-->} {<make.conf.example>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'archs='> name:archs)
          op: assign_op.Equal
          rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[])}
          spids: [126]
        )
      ]
      redirects: []
    )
    (command.ForEach
      iter_names: [x]
      iterable: (for_iter.Words words:[{<make.conf.example.> <Id.Lit_Star '*'> <.diff>}])
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'archs+='> name:archs)
                  op: assign_op.PlusEqual
                  rhs: 
                    {
                      (sh_array_literal
                        left: <Id.Op_LParen _>
                        words: [
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<basename>} 
                                    {
                                      (braced_var_sub
                                        left: <Id.Left_DollarBrace '${'>
                                        token: <Id.VSub_Name x>
                                        var_name: x
                                        suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 18>})
                                        right: <Id.Arith_RBrace _>
                                      )
                                    } {<.diff>}
                                  )
                                right: <Id.Eof_RParen _>
                              )
                            )
                          }
                        ]
                      )
                    }
                  spids: [144]
                )
              ]
              redirects: []
            )
          ]
        )
      redirects: []
    )
    (command.ForEach
      iter_names: [arch]
      iterable: 
        (for_iter.Words
          words: [
            {
              (DQ 
                (braced_var_sub
                  left: <Id.Left_DollarBrace '${'>
                  token: <Id.VSub_Name archs>
                  var_name: archs
                  bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                  right: <Id.Right_DollarBrace '}'>
                )
              )
            }
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (C {<echo>} {(DQ <'* Patching '> (${ Id.VSub_Name arch))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<cp>} {<make.conf.example>} {<make.conf.example.> (${ Id.VSub_Name arch)})
                (C {<die>} {(DQ <'copy failed'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [{<patch>} {<-p0>} {<make.conf.example.> (${ Id.VSub_Name arch)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {<make.conf.example.> (${ Id.VSub_Name arch) <.diff>}
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  more_env: []
                  do_fork: T
                )
                (C {<die>} {(DQ <'arch-patch failed'>)})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [{<patch>} {<-p0>} {<make.conf.example.> (${ Id.VSub_Name arch)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {<make.conf.example.diff>}
                    )
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  more_env: []
                  do_fork: T
                )
                (C {<die>} {(DQ <'patch failed'>)})
              ]
            )
          ]
        )
      redirects: []
    )
    (C {<echo>} {(DQ <'* Re-patching make.conf.example'>)})
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (command.Simple
          words: [{<patch>} {<-p0>} {<make.conf.example>}]
          redirects: [
            (redir
              op: <Id.Redir_Less '<'>
              loc: (redir_loc.Fd fd:0)
              arg: {<make.conf.example.diff>}
            )
            (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})
          ]
          more_env: []
          do_fork: T
        )
        (C {<die>} {(DQ <'repatch failed'>)})
      ]
    )
    (command.ForEach
      iter_names: [arch]
      iterable: 
        (for_iter.Words
          words: [
            {
              (DQ 
                (braced_var_sub
                  left: <Id.Left_DollarBrace '${'>
                  token: <Id.VSub_Name archs>
                  var_name: archs
                  bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At)
                  right: <Id.Right_DollarBrace '}'>
                )
              )
            }
          ]
        )
      body: 
        (command.DoGroup
          children: [
            (C {<echo>} {(DQ <'* Creating diff for '> (${ Id.VSub_Name arch))})
            (command.Simple
              words: [{<diff>} {<-u>} {<make.conf.example>} {<make.conf.example.> (${ Id.VSub_Name arch)}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<make.conf.example.> (${ Id.VSub_Name arch) <.diff>}
                )
              ]
              more_env: []
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_z
                      child: {(${ Id.VSub_Name KEEP_ARCH_MAKE_CONF_EXAMPLE)}
                    )
                  redirects: []
                )
                (C {<rm>} {<-f>} {<make.conf.example.> (${ Id.VSub_Name arch)} 
                  {<make.conf.example.> (${ Id.VSub_Name arch) <.orig>}
                )
              ]
            )
          ]
        )
      redirects: []
    )
    (C {<rm>} {<make.conf.example.diff>})
    (C {<echo>} {(DQ <Done>)})
  ]
)