(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: [
            (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$NO_SANITIZE_ENVIRONMENT'))} {(Lit_Other ']')})
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TEMP)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(echo)} 
                                    {
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [
                                              (C {(sed)} {(-n)} 
                                                {(SQ <'s/.*export[ \\t]*\\([^=]*\\)=.*/\\1/p'>)} {(config)}
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub '$('>
                                        spids: [44 54]
                                      )
                                    }
                                  )
                                  (C {(sed)} {(SQ <'s/ /,/g'>)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [41 63]
                      )
                    }
                  spids: [40]
                )
              ]
              spids: [40]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TEMP)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$TEMP') 
                        (',LANG,PATH,SHELL,TERM,USER,USERNAME,LOGNAME,PWD,EDITOR,HOME')
                      )
                    }
                  spids: [72]
                )
              ]
              spids: [72]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TEMP)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$TEMP') 
                        (',DISPLAY,_,TOPSHELL,START_TIME,STAGE_NAME,TOOLCHAIN_PREFIX')
                      )
                    }
                  spids: [79]
                )
              ]
              spids: [79]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TEMP)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_Name '$TEMP') 
                        (',HOST_ARCH,WRAPPY_LOGPATH,OLDPATH,http_proxy,ftp_proxy')
                      )
                    }
                  spids: [86]
                )
              ]
              spids: [86]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TEMP)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name '$TEMP') (',https_proxy,no_proxy,TEMP,TMPDIR,FORK,MUSL'))}
                  spids: [93]
                )
              ]
              spids: [93]
            )
            (ForEach
              iter_name: i
              iter_words: [
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (Pipeline
                            children: [(C {(env)}) (C {(sed)} {(-n)} {(SQ <'s/=.*//p'>)})]
                            negated: F
                          )
                        ]
                      )
                    left_token: <Left_CommandSub '$('>
                    spids: [112 124]
                  )
                }
              ]
              do_arg_iter: F
              body: 
                (DoGroup
                  children: [
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(is_in_list)} {($ VSub_Name '$i')} {(DQ ($ VSub_Name '$TEMP'))})
                        (ControlFlow token:<ControlFlow_Continue continue>)
                      ]
                    )
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} 
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name i>
                                suffix_op: 
                                  (Slice
                                    begin: (ArithWord w:{(Lit_Digits 0)})
                                    length: (ArithWord w:{(Lit_Digits 7)})
                                  )
                                spids: [146 152]
                              )
                            )
                          } {(Lit_Other '=') (Lit_Other '=')} {(DQ (DISTCC_))} {(Lit_Other ']')}
                        )
                        (ControlFlow token:<ControlFlow_Continue continue>)
                      ]
                    )
                    (AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} 
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name i>
                                suffix_op: 
                                  (Slice
                                    begin: (ArithWord w:{(Lit_Digits 0)})
                                    length: (ArithWord w:{(Lit_Digits 7)})
                                  )
                                spids: [172 178]
                              )
                            )
                          } {(Lit_Other '=') (Lit_Other '=')} {(DQ (CCACHE_))} {(Lit_Other ']')}
                        )
                        (ControlFlow token:<ControlFlow_Continue continue>)
                      ]
                    )
                    (SimpleCommand
                      words: [{(unset)} {($ VSub_Name '$i')}]
                      redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                    )
                  ]
                  spids: [127 204]
                )
              spids: [111 16777215]
            )
          ]
          spids: [16777215 32]
        )
      ]
      spids: [16777215 206]
    )
    (FuncDef
      name: export_if_blank
      body: 
        (BraceGroup
          children: [
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(-z)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(eval)} 
                                {
                                  (DQ ('echo ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                                    (EscapedLiteralPart
                                      token: <Lit_EscapedChar '\\$'>
                                    ) ('{') 
                                    (BracedVarSub
                                      token: <VSub_Number 1>
                                      suffix_op: 
                                        (PatSub
                                          pat: {('=*')}
                                          replace: {(EmptyPart)}
                                          do_all: F
                                          do_prefix: F
                                          do_suffix: F
                                        )
                                      spids: [233 238]
                                    ) ('}') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                                  )
                                }
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [225 242]
                      )
                    )
                  } {(Lit_Other ']')}
                )
                (C {(export)} {(DQ ($ VSub_Number '$1'))})
              ]
            )
          ]
          spids: [217]
        )
      spids: [213 216]
    )
    (C {(export_if_blank)} 
      {(Lit_VarLike 'MIRROR_LIST=') 
        (DQ ('http://landley.net/code/aboriginal/mirror http://127.0.0.1/code/aboriginal/mirror'))
      }
    )
    (C {(export_if_blank)} 
      {(Lit_VarLike 'TOP=') 
        (CommandSubPart
          command_list: (CommandList children:[(C {(pwd)})])
          left_token: <Left_Backtick '`'>
          spids: [277 279]
        )
      }
    )
    (C {(export_if_blank)} {(Lit_VarLike 'SOURCES=') (DQ ($ VSub_Name '$TOP') (/sources))})
    (C {(export_if_blank)} {(Lit_VarLike 'SRCDIR=') (DQ ($ VSub_Name '$TOP') (/packages))})
    (C {(export_if_blank)} {(Lit_VarLike 'PATCHDIR=') (DQ ($ VSub_Name '$SOURCES') (/patches))})
    (C {(export_if_blank)} {(Lit_VarLike 'BUILD=') (DQ ($ VSub_Name '$TOP') (/build))})
    (C {(export_if_blank)} {(Lit_VarLike 'SRCTREE=') (DQ ($ VSub_Name '$BUILD') (/packages))})
    (C {(export_if_blank)} {(Lit_VarLike 'HOSTTOOLS=') (DQ ($ VSub_Name '$BUILD') (/host))})
    (C {(export_if_blank)} {(Lit_VarLike 'WRAPDIR=') (DQ ($ VSub_Name '$BUILD') (/record-commands))})
    (AndOr
      ops: [Op_DAmp]
      children: [
        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$MY_PATCH_DIR'))} {(Lit_Other ']')})
        (C {(export)} 
          {(Lit_VarLike 'MY_PATCH_DIR=') 
            (DQ 
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [(C {(readlink)} {(-e)} {(DQ ($ VSub_Name '$MY_PATCH_DIR'))})]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [356 364]
              )
            )
          }
        )
      ]
    )
    (C {(export)} {(Lit_VarLike 'WORK=') (DQ (${ VSub_Name BUILD) (/host-temp))})
    (C {(export)} {(Lit_VarLike 'ARCH_NAME=') (host)})
    (C {(export_if_blank)} {(Lit_VarLike 'CC=') (cc)})
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:MEMTOTAL)
          op: Equal
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [(C {(awk)} {(SQ <'/MemTotal:/{print $2}'>)} {(/proc/meminfo)})]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [404 412]
                )
              )
            }
          spids: [402]
        )
      ]
      spids: [402]
    )
    (If
      arms: [
        (if_arm
          cond: [(C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$CPUS'))} {(Lit_Other ']')})]
          action: [
            (C {(export)} 
              {(Lit_VarLike 'CPUS=') 
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(echo)} 
                              {(/sys/devices/system/cpu/cpu) (Lit_Other '[') (0-9) (Lit_Other ']') 
                                (Lit_Other '*')
                              }
                            )
                            (C {(wc)} {(-w)})
                          ]
                          negated: F
                        )
                      ]
                    )
                  left_token: <Left_CommandSub '$('>
                  spids: [433 447]
                )
              }
            )
            (AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$CPUS'))} {(-lt)} {(1)} {(Lit_Other ']')})
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:CPUS) op:Equal rhs:{(1)} spids:[464])]
                  spids: [464]
                )
              ]
            )
            (AndOr
              ops: [Op_DAmp Op_DAmp]
              children: [
                (C {(Lit_Other '[')} {(-z)} 
                  {
                    (DQ 
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(cat)} {(/proc/cpuinfo)})
                                  (C {(grep)} {(SQ <'^flags'>)})
                                  (C {(head)} {(-n)} {(1)})
                                  (C {(grep)} {(-w)} {(ht)})
                                ]
                                negated: F
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [483 511]
                      )
                    )
                  } {(Lit_Other ']')}
                )
                (C {(Lit_Other '[')} 
                  {
                    (ArithSubPart
                      anode: 
                        (ArithBinary
                          op_id: Arith_Star
                          left: 
                            (ArithBinary
                              op_id: Arith_Star
                              left: (ArithWord w:{($ VSub_Name '$CPUS')})
                              right: (ArithWord w:{(Lit_Digits 512)})
                            )
                          right: (ArithWord w:{(Lit_Digits 1024)})
                        )
                      spids: [521 528]
                    )
                  } {(-le)} {($ VSub_Name '$MEMTOTAL')} {(Lit_Other ']')}
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:CPUS)
                      op: Equal
                      rhs: 
                        {
                          (ArithSubPart
                            anode: 
                              (ArithBinary
                                op_id: Arith_Slash
                                left: 
                                  (ArithBinary
                                    op_id: Arith_Star
                                    left: (ArithWord w:{($ VSub_Name '$CPUS')})
                                    right: (ArithWord w:{(Lit_Digits 3)})
                                  )
                                right: (ArithWord w:{(Lit_Digits 2)})
                              )
                            spids: [540 549]
                          )
                        }
                      spids: [539]
                    )
                  ]
                  spids: [539]
                )
              ]
            )
          ]
          spids: [16777215 427]
        )
      ]
      spids: [16777215 551]
    )
    (C {(export_if_blank)} 
      {(Lit_VarLike 'STAGE_NAME=') 
        (CommandSubPart
          command_list: 
            (CommandList
              children: [
                (Pipeline
                  children: [
                    (C {(echo)} {($ VSub_Number '$0')})
                    (C {(sed)} {(SQ <'s@.*/\\(.*\\)\\.sh@\\1@'>)})
                  ]
                  negated: F
                )
              ]
            )
          left_token: <Left_Backtick '`'>
          spids: [557 569]
        )
      }
    )
    (AndOr
      ops: [Op_DAmp]
      children: [
        (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$BUILD_VERBOSE'))} 
          {(Lit_Other ']')}
        )
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:VERBOSITY) op:Equal rhs:{(DQ ('V=1'))} spids:[585])]
          spids: [585]
        )
      ]
    )
    (C {(export_if_blank)} 
      {(Lit_VarLike 'BUILD_STATIC=') (busybox) (Lit_Comma ',') (toybox) (Lit_Comma ',') (binutils) 
        (Lit_Comma ',') (gcc-core) (Lit_Comma ',') (gcc-g) (Lit_Other '+') (Lit_Other '+') (Lit_Comma ',') (make)
      }
    )
    (C {(export)} {(PATH)})
    (If
      arms: [
        (if_arm
          cond: [(C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$OLDPATH'))} {(Lit_Other ']')})]
          action: [
            (C {(export)} {(Lit_VarLike 'OLDPATH=') (DQ ($ VSub_Name '$PATH'))})
            (AndOr
              ops: [Op_DPipe]
              children: [
                (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$BUSYBOX'))} {(Lit_Other ']')})
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:BUSYBOX)
                      op: Equal
                      rhs: {(busybox)}
                      spids: [652]
                    )
                  ]
                  spids: [652]
                )
              ]
            )
            (AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (C {(Lit_Other '[')} {(-f)} 
                  {
                    (DQ ($ VSub_Name '$HOSTTOOLS') (/) 
                      (BracedVarSub
                        token: <VSub_Name BUSYBOX>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(toybox)})
                        spids: [663 667]
                      )
                    )
                  } {(Lit_Other ']')}
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:PATH)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: (CommandList children:[(C {(hosttools_path)})])
                              left_token: <Left_CommandSub '$('>
                              spids: [677 679]
                            )
                          )
                        }
                      spids: [675]
                    )
                  ]
                  spids: [675]
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:PATH)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (CommandSubPart
                              command_list: (CommandList children:[(C {(hosttools_path)})])
                              left_token: <Left_CommandSub '$('>
                              spids: [687 689]
                            ) (':') ($ VSub_Name '$PATH')
                          )
                        }
                      spids: [685]
                    )
                  ]
                  spids: [685]
                )
              ]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$WRAPDIR') (/wrappy))} 
                      {(Lit_Other ']')}
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:OLDPATH)
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$PATH'))}
                          spids: [713]
                        )
                      ]
                      spids: [713]
                    )
                    (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$BUILD') (/logs))})
                    (AndOr
                      ops: [Op_DAmp Op_DAmp]
                      children: [
                        (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')})
                        (SimpleCommand
                          words: [{(echo)} {(DQ ('Bad ') ($ VSub_Name '$WRAPDIR'))}]
                          redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                        )
                        (C {(dienow)})
                      ]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:PATH)
                          op: Equal
                          rhs: {(DQ ($ VSub_Name '$WRAPDIR'))}
                          spids: [756]
                        )
                      ]
                      spids: [756]
                    )
                  ]
                  spids: [16777215 710]
                )
              ]
              spids: [16777215 762]
            )
          ]
          spids: [16777215 629]
        )
      ]
      spids: [16777215 764]
    )
    (C {(export)} 
      {(Lit_VarLike 'WRAPPY_LOGPATH=') 
        (DQ ($ VSub_Name '$BUILD') (/logs/cmdlines.) ($ VSub_Name '$ARCH_NAME') (.early))
      }
    )
  ]
)