(command.CommandList
  children: [
    (command.ShFunction
      name: macro
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:n)
                  op: assign_op.Equal
                  rhs: {(${ Id.VSub_Number 1)}
                  spids: [100]
                )
              ]
            )
            (C {<shift>})
            (C {<echo>} {<-n>} {(DQ <'#define bus_'> (${ Id.VSub_Name n) <'(r'>)})
            (command.ForEach
              iter_name: i
              do_arg_iter: T
              body: 
                (command.DoGroup
                  children: [(C {<echo>} {<-n>} {(DQ <', '> (${ Id.VSub_Name i))})]
                )
            )
            (C {<echo>} {(DQ <') '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\\'>))})
            (C {<echo>} {<-n>} 
              {(DQ <'\tbus_space_'> (${ Id.VSub_Name n) <'((r)->r_bustag, (r)->r_bushandle'>)}
            )
            (command.ForEach
              iter_name: i
              do_arg_iter: T
              body: 
                (command.DoGroup
                  children: [(C {<echo>} {<-n>} {(DQ <', ('> (${ Id.VSub_Name i) <')'>)})]
                )
            )
            (C {<echo>} {(DQ <')'>)})
          ]
        )
    )
    (C {<macro>} {<barrier>} {<o>} {<l>} {<f>})
    (command.ForEach
      iter_name: w
      iter_words: [{<1>} {<2>} {<4>} {<8>}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ForEach
              iter_name: s
              iter_words: [{(DQ )} {<stream_>}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (C {<macro>} {<read_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} {<o>})
                    (C {<macro>} 
                      {<read_multi_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} {<o>} {<d>} {<c>}
                    )
                    (C {<macro>} 
                      {<read_region_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} {<o>} {<d>} {<c>}
                    )
                    (C {<macro>} {<set_multi_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} 
                      {<o>} {<v>} {<c>}
                    )
                    (C {<macro>} 
                      {<set_region_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} {<o>} {<v>} {<c>}
                    )
                    (C {<macro>} {<write_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} 
                      {<o>} {<v>}
                    )
                    (C {<macro>} 
                      {<write_multi_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} {<o>} {<d>} {<c>}
                    )
                    (C {<macro>} 
                      {<write_region_> ($ Id.VSub_DollarName '$s') ($ Id.VSub_DollarName '$w')} {<o>} {<d>} {<c>}
                    )
                  ]
                )
            )
          ]
        )
    )
  ]
)