(CommandList
  children: [
    (AndOr
      children: [(C {(.)} {(sources/utility_functions.sh)}) (C {(exit)} {(1)})]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$CROSS_COMPILER_HOST"))} {(Lit_Other "]")})
        (C {(export)} {(Lit_VarLike "CROSS_COMPILER_HOST=") (i686)})
      ]
      op_id: Op_DAmp
    )
    (C {(trap)} {(DQ ("killtree ") ($ VSub_Dollar "$$"))} {(EXIT)})
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$NO_CLEAN"))} {(Lit_Other "]")})
        (C {(blank_tempdir)} {(build)})
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (C {(mkdir)} {(-p)} {(build/logs)})
        (Pipeline
          children: [
            (Subshell
              child: 
                (AndOr
                  children: [
                    (SimpleCommand
                      words: [{(./download.sh)}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[102])]
                      more_env: [(env_pair name:EXTRACT_ALL val:{(1)} spids:[97])]
                    )
                    (AndOr
                      children: [
                        (C {(more/record-commands.sh)})
                        (AndOr
                          children: [
                            (SimpleCommand
                              words: [{(./host-tools.sh)}]
                              redirects: [
                                (Redir
                                  op_id: Redir_GreatAnd
                                  fd: 2
                                  arg_word: {(1)}
                                  spids: [115]
                                )
                              ]
                            )
                            (AndOr
                              children: [
                                (C {(more/record-commands.sh)})
                                (AndOr
                                  children: [
                                    (SimpleCommand
                                      words: [
                                        {(./simple-cross-compiler.sh)}
                                        {(DQ ($ VSub_Name "$CROSS_COMPILER_HOST"))}
                                      ]
                                      redirects: [
                                        (Redir
                                          op_id: Redir_GreatAnd
                                          fd: 2
                                          arg_word: {(1)}
                                          spids: [132]
                                        )
                                      ]
                                    )
                                    (C {(dienow)})
                                  ]
                                  op_id: Op_DPipe
                                )
                              ]
                              op_id: Op_DAmp
                            )
                          ]
                          op_id: Op_DAmp
                        )
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  op_id: Op_DAmp
                )
              spids: [96 139]
            )
            (C {(tee)} {(build/logs/build-host-cc.txt)})
            (C {(maybe_quiet)})
          ]
          negated: False
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr children:[(C {(cp)} {(packages/MANIFEST)} {(build)})(C {(dienow)})] op_id:Op_DPipe)
    (If
      arms: [
        (if_arm
          cond: [
            (AndOr
              children: [
                (C {(Lit_Other "[")} {(KW_Bang "!")} {(-z)} {(DQ ($ VSub_Name "$FORK"))} {(Lit_Other "]")})
                (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$CPUS"))} {(Lit_Other "]")})
              ]
              op_id: Op_DAmp
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:MEGS)
                  op: Equal
                  rhs: 
                    {
                      (ArithSubPart
                        anode: 
                          (ArithBinary
                            op_id: Arith_Slash
                            left: 
                              (ArithWord
                                w: 
                                  {
                                    (CommandSubPart
                                      command_list: 
                                        (CommandList
                                          children: [
                                            (C {(awk)} {(SQ <"/MemTotal:/{print $2}">)} 
                                              {(/proc/meminfo)}
                                            )
                                          ]
                                        )
                                      left_token: <Left_CommandSub "$(">
                                      spids: [201 209]
                                    )
                                  }
                              )
                            right: (ArithWord w:{(Lit_Digits 1024)})
                          )
                        spids: [200 213]
                      )
                    }
                  spids: [199]
                )
              ]
              spids: [199]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:TARGET_COUNT)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(find)} {(sources/targets)} {(-maxdepth)} {(1)} {(-type)} {(f)})
                                  (C {(wc)} {(-l)})
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [217 235]
                      )
                    }
                  spids: [216]
                )
              ]
              spids: [216]
            )
            (C {(export)} 
              {(Lit_VarLike "CPUS=") 
                (ArithSubPart
                  anode: 
                    (ArithBinary
                      op_id: Arith_Slash
                      left: (ArithWord w:{($ VSub_Name "$MEGS")})
                      right: 
                        (ArithBinary
                          op_id: Arith_Star
                          left: (ArithWord w:{($ VSub_Name "$TARGET_COUNT")})
                          right: (ArithWord w:{(Lit_Digits 512)})
                        )
                    )
                  spids: [241 250]
                )
              }
            )
            (AndOr
              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:[267])]
                  spids: [267]
                )
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [-1 196]
        )
      ]
      spids: [-1 270]
    )
    (C {(more/for-each-target.sh)} 
      {(SQ <"./build.sh $TARGET 2>&1 | tee build/logs/build-${TARGET}.txt">)}
    )
    (C {(more/for-each-target.sh)} 
      {(SQ <"more/smoketest.sh $TARGET 2>&1 | tee build/logs/smoketest-$TARGET.txt">)}
    )
    (ForEach
      iter_name: i
      iter_words: [{(DQ ($ VSub_At "$@"))}]
      do_arg_iter: False
      body: 
        (DoGroup
          children: [(C {(more/buildall-native.sh)} {(DQ ($ VSub_Number "$1"))})]
          spids: [313 322]
        )
      spids: [308 -1]
    )
    (Pipeline
      children: [(C {(more/smoketest-report.sh)}) (C {(tee)} {(build/logs/status.txt)})]
      negated: False
    )
  ]
)