(command.CommandList
  children: [
    (command.ShFunction
      name: this_filename
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ctr)
                  op: assign_op.Equal
                  rhs: {(0)}
                  spids: [16]
                )
              ]
            )
            (command.WhileUntil
              keyword: (Token id:Id.KW_While val:while span_id:20)
              cond: [
                (command.Sentence
                  child: (C {(true)})
                  terminator: (Token id:Id.Op_Semi val:';' span_id:23)
                )
              ]
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Unary
                                      op_id: Id.BoolUnary_z
                                      child: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: (Token id:Id.VSub_Name val:FUNCNAME span_id:36)
                                              bracket_op: 
                                                (bracket_op.ArrayIndex
                                                  expr: 
                                                    (arith_expr.ArithWord
                                                      w: {($ Id.VSub_DollarName '$ctr')}
                                                    )
                                                )
                                            )
                                          )
                                        }
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:44)
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [{(echo)} {(DQ ("Error: couldn't find this_filename"))}]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:55)
                                  fd: 1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Exit val:exit span_id:59)
                              arg_word: {(1)}
                            )
                          ]
                          spids: [28 46]
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Binary
                                      op_id: Id.BoolBinary_GlobDEqual
                                      left: 
                                        {
                                          (DQ 
                                            (braced_var_sub
                                              token: (Token id:Id.VSub_Name val:FUNCNAME span_id:73)
                                              bracket_op: 
                                                (bracket_op.ArrayIndex
                                                  expr: 
                                                    (arith_expr.ArithWord
                                                      w: {($ Id.VSub_DollarName '$ctr')}
                                                    )
                                                )
                                            )
                                          )
                                        }
                                      right: {(DQ (this_filename))}
                                    )
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:87)
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (braced_var_sub
                                  token: (Token id:Id.VSub_Name val:BASH_SOURCE span_id:95)
                                  bracket_op: 
                                    (bracket_op.ArrayIndex
                                      expr: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$ctr')})
                                    )
                                )
                              }
                            )
                            (command.ControlFlow
                              token: (Token id:Id.ControlFlow_Exit val:exit span_id:102)
                              arg_word: {(0)}
                            )
                          ]
                          spids: [67 89]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:ctr)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (word_part.ArithSub
                                anode: 
                                  (arith_expr.Binary
                                    op_id: Id.Arith_Plus
                                    left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$ctr')})
                                    right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                                  )
                              )
                            }
                          spids: [110]
                        )
                      ]
                    )
                  ]
                )
            )
          ]
        )
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LIBALLOCS_BASE)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: (Token id:Id.VSub_Name val:LIBALLOCS_BASE span_id:131)
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: Id.VTest_ColonHyphen
                      arg_word: 
                        {
                          (command_sub
                            left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:133)
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(dirname)} 
                                    {
                                      (DQ 
                                        (command_sub
                                          left_token: 
                                            (Token
                                              id: Id.Left_DollarParen
                                              val: '$('
                                              span_id: 138
                                            )
                                          command_list: 
                                            (command.CommandList
                                              children: [(C {(this_filename)})]
                                            )
                                        )
                                      )
                                    }
                                  )
                                ]
                              )
                          ) (Id.Lit_Slash /) (..)
                        }
                    )
                )
              )
            }
          spids: [128]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:USEDTYPES)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: (Token id:Id.VSub_Name val:USEDTYPES span_id:151)
                suffix_op: 
                  (suffix_op.Unary
                    op_id: Id.VTest_ColonHyphen
                    arg_word: 
                      {(${ Id.VSub_Name LIBALLOCS_BASE) (Id.Lit_Slash /) (tools) (Id.Lit_Slash /) 
                        (usedtypes)
                      }
                  )
              )
            }
          spids: [149]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BASE_TYPES_TRANSLATION)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: (Token id:Id.VSub_Name val:BASE_TYPES_TRANSLATION span_id:164)
                suffix_op: 
                  (suffix_op.Unary
                    op_id: Id.VTest_ColonHyphen
                    arg_word: 
                      {(${ Id.VSub_Name LIBALLOCS_BASE) (Id.Lit_Slash /) (tools) (Id.Lit_Slash /) (lang) 
                        (Id.Lit_Slash /) (c) (Id.Lit_Slash /) (bin) (Id.Lit_Slash /) (base-types-translation)
                      }
                  )
              )
            }
          spids: [162]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:CC)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: (Token id:Id.VSub_Name val:CC span_id:183)
                suffix_op: 
                  (suffix_op.Unary
                    op_id: Id.VTest_ColonHyphen
                    arg_word: 
                      {
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:185)
                          command_list: (command.CommandList children:[(C {(which)} {(cc)})])
                        )
                      }
                  )
              )
            }
          spids: [181]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:LD)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: (Token id:Id.VSub_Name val:LD span_id:194)
                suffix_op: 
                  (suffix_op.Unary
                    op_id: Id.VTest_ColonHyphen
                    arg_word: 
                      {
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:196)
                          command_list: (command.CommandList children:[(C {(which)} {(ld)})])
                        )
                      }
                  )
              )
            }
          spids: [192]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:OBJCOPY)
          op: assign_op.Equal
          rhs: 
            {
              (braced_var_sub
                token: (Token id:Id.VSub_Name val:OBJCOPY span_id:205)
                suffix_op: 
                  (suffix_op.Unary
                    op_id: Id.VTest_ColonHyphen
                    arg_word: 
                      {
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:207)
                          command_list: (command.CommandList children:[(C {(which)} {(objcopy)})])
                        )
                      }
                  )
              )
            }
          spids: [203]
        )
      ]
    )
    (command.ShFunction
      name: compile
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:src)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [223]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:dest)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [229]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:asm)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:237)
                          command_list: 
                            (command.CommandList
                              children: [(C {(mktemp)} {(--suffix) (Id.Lit_Equals '=') (.s)})]
                            )
                        )
                      )
                    }
                  spids: [235]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(gcc)} {(-S)} {(-x)} {(c)} {(-o)} {(DQ ($ Id.VSub_DollarName '$asm'))} 
                  {(DQ ($ Id.VSub_DollarName '$src'))}
                )
                (C {(gcc)} {(-c)} {(-o)} {(DQ ($ Id.VSub_DollarName '$dest'))} 
                  {(DQ ($ Id.VSub_DollarName '$asm'))}
                )
                (command.Simple
                  words: [{(echo)} {(DQ ('Compiler generated ') ($ Id.VSub_DollarName '$dest'))}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:300)
                      fd: 1
                      arg_word: {(2)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: link_defining_aliases
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:our_objfile)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [314]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:our_usedtypes_obj)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [320]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:temporary_out)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:327)
                        command_list: (command.CommandList children:[(C {(mktemp)})])
                      )
                    }
                  spids: [326]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(${ Id.VSub_Name LD)} {(-o)} {(DQ ($ Id.VSub_DollarName '$temporary_out'))} {(-r)} 
                  {(DQ ($ Id.VSub_DollarName '$our_objfile'))} {(DQ ($ Id.VSub_DollarName '$our_usedtypes_obj'))}
                )
                (command.Simple
                  words: [
                    {(echo)}
                    {
                      (DQ ('Linker generated ') (${ Id.VSub_Name temporary_out) (', moving to ') 
                        (${ Id.VSub_Name our_objfile)
                      )
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:383)
                      fd: 1
                      arg_word: {(2)}
                    )
                  ]
                )
                (C {(mv)} {(DQ ($ Id.VSub_DollarName '$temporary_out'))} 
                  {(DQ ($ Id.VSub_DollarName '$our_objfile'))}
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: symbol_redefinitions
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:f)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [411]
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {(nm)} {(-fposix)} {(--defined-only)} {(DQ ($ Id.VSub_DollarName '$f'))})
                (C {(tr)} {(-s)} {(SQ (Token id:Id.Lit_Chars val:'[:blank:]' span_id:442))} 
                  {(SQ (Token id:Id.Lit_Chars val:'\\t' span_id:446))}
                )
                (C {(cut)} {(-f1)})
                (C {(egrep)} {(SQ (Token id:Id.Lit_Chars val:'__uniqtype_([0-9a-f]{8})_' span_id:462))})
                (C {(sed)} {(-r)} 
                  {
                    (SQ 
                      (Token
                        id: Id.Lit_Chars
                        val: 
's/__uniqtype_([0-9a-f]{8})_(.*)/--redefine-sym __uniqtype__\\2=__uniqtype_\\1_\\2/'
                        span_id: 474
                      )
                    )
                  }
                )
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: objcopy_and_redefine_codeless_names
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:our_objfile)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [488]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:our_usedtypes_obj)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [494]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:second_redefinition_args)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (command_sub
                              left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:508)
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(symbol_redefinitions)} 
                                      {(DQ ($ Id.VSub_DollarName '$our_usedtypes_obj'))}
                                    )
                                  ]
                                )
                            )
                          )
                        }
                      spids: [506]
                    )
                  ]
                )
                (command.Simple
                  words: [
                    {(echo)}
                    {(${ Id.VSub_Name OBJCOPY)}
                    {($ Id.VSub_DollarName '$second_redefinition_args')}
                    {(DQ ($ Id.VSub_DollarName '$our_objfile'))}
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:535)
                      fd: 1
                      arg_word: {(2)}
                    )
                  ]
                )
                (C {(${ Id.VSub_Name OBJCOPY)} {($ Id.VSub_DollarName '$second_redefinition_args')} 
                  {(DQ ($ Id.VSub_DollarName '$our_objfile'))}
                )
                (command.Simple
                  words: [
                    {(echo)}
                    {
                      (DQ ('objcopy renamed symbols in ') ($ Id.VSub_DollarName '$our_objfile') 
                        (' according to ') ($ Id.VSub_DollarName '$second_redefinition_args')
                      )
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:565)
                      fd: 1
                      arg_word: {(2)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
  ]
)