(command.CommandList
  children: [
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {<source>} {<'sources/include.sh'>})
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
    (command.Simple
      words: [{<load_target>} {(DQ ($ Id.VSub_Number '$1'))}]
      more_env: [(env_pair name:KEEP_STAGEDIR val:{<1>} spids:[29])]
      do_fork: T
    )
    (command.ShFunction
      name: is_newer
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:X)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$1'))}
                  spids: [50]
                )
              ]
            )
            (C {<shift>})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} {(DQ ($ Id.VSub_DollarName '$X'))} 
                  {<Id.Lit_RBracket ']'>}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} 
                  {
                    (DQ 
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: (C {<which>} {(DQ (${ Id.VSub_Name CC_PREFIX) <cc>)})
                      )
                    )
                  } {<-nt>} {(DQ ($ Id.VSub_DollarName '$X'))} {<Id.Lit_RBracket ']'>}
                )
                (command.ControlFlow
                  token: <Id.ControlFlow_Return return>
                  arg_word: {<0>}
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: 
                (condition.Shell
                  commands: [
                    (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {(DQ ($ Id.VSub_Number '$1'))} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  ]
                )
              body: 
                (command.DoGroup
                  children: [
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (command.Simple
                                    words: [
                                      {<find>}
                                      {(DQ ($ Id.VSub_Number '$1'))}
                                      {<-newer>}
                                      {(DQ ($ Id.VSub_DollarName '$X'))}
                                    ]
                                    redirects: [
                                      (redir
                                        op: <Id.Redir_Great '2>'>
                                        loc: (redir_loc.Fd fd:2)
                                        arg: {<'/dev/null'>}
                                      )
                                    ]
                                    do_fork: T
                                  )
                              )
                            )
                          } {<Id.Lit_RBracket ']'>}
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                    )
                    (C {<shift>})
                  ]
                )
            )
            (C {<echo>} 
              {
                (DQ <'Keeping '> 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: (C {<basename>} {(DQ ($ Id.VSub_DollarName '$X'))})
                  )
                )
              }
            )
            (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
        )
    )
    (command.ShFunction
      name: qemu_defaults
      body: 
        (BraceGroup
          children: [
            (C {<echo>} {<-n>} {(DQ <'-nographic -no-reboot -kernel linux'>)})
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$SYSIMAGE_TYPE'))} 
                  {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <rootfs>)} {<Id.Lit_RBracket ']'>}
                )
                (C {<echo>} {<-n>} {(DQ <' -initrd rootfs.cpio.gz'>)})
              ]
            )
            (C {<echo>} {<-n>} 
              {
                (DQ <' -append '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                  <'panic=1 console='> ($ Id.VSub_DollarName '$CONSOLE') <' HOST='> ($ Id.VSub_DollarName '$ARCH') <' '> 
                  (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <KERNEL_EXTRA> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                )
              }
            )
            (C {<echo>} {<-n>} 
              {(DQ <' '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <QEMU_EXTRA>)}
            )
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp Id.Op_DAmp]
      children: [
        (command.Simple
          words: [{<cat>}]
          redirects: [
            (redir
              op: <Id.Redir_Great '>'>
              loc: (redir_loc.Fd fd:1)
              arg: {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/run-emulator.sh'>)}
            )
            (redir
              op: <Id.Redir_DLess '<<'>
              loc: (redir_loc.Fd fd:0)
              arg: 
                (redir_param.HereDoc
                  here_begin: {<EOF>}
                  here_end_span_id: 326
                  stdin_parts: [
                    <'#!/bin/bash\n'>
                    <'\n'>
                    <'# Boot the emulated system to a shell prompt.\n'>
                    <'\n'>
                    <'ARCH='>
                    ($ Id.VSub_DollarName '$ARCH')
                    <'\n'>
                    <'run_emulator()\n'>
                    <'{\n'>
                    <'  [ ! -z '>
                    <Id.Right_DoubleQuote '"'>
                    (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>)
                    <DEBUG>
                    <Id.Right_DoubleQuote '"'>
                    <' ] && set -x\n'>
                    <'  '>
                    (command_sub
                      left_token: <Id.Left_DollarParen '$('>
                      child: (C {<emulator_command>})
                    )
                    <'\n'>
                    <'}\n'>
                    <'\n'>
                    <'if [ '>
                    <Id.Right_DoubleQuote '"'>
                    (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>)
                    <1>
                    <Id.Right_DoubleQuote '"'>
                    <' != '>
                    <Id.Right_DoubleQuote '"'>
                    <--norun>
                    <Id.Right_DoubleQuote '"'>
                    <' ]\n'>
                    <'then\n'>
                    <'  run_emulator\n'>
                    <'fi\n'>
                  ]
                )
            )
          ]
          do_fork: T
        )
        (C {<chmod>} {<Id.Lit_Other '+'> <x>} 
          {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/run-emulator.sh'>)}
        )
        (command.ForEach
          iter_name: FILE
          iter_words: [{<dev-environment.sh>} {<native-build.sh>}]
          do_arg_iter: F
          body: 
            (command.DoGroup
              children: [
                (command.Subshell
                  child: 
                    (command.CommandList
                      children: [
                        (C {<export>} 
                          {<Id.Lit_VarLike 'IFS='> 
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: (C {<echo>} {<-e>} {(DQ <Id.Lit_BadBackslash '\\'> <n>)})
                              )
                            )
                          }
                        )
                        (command.Pipeline
                          children: [
                            (C {<cat>} 
                              {
                                (DQ ($ Id.VSub_DollarName '$SOURCES') <'/toys/'> 
                                  ($ Id.VSub_DollarName '$FILE')
                                )
                              }
                            )
                            (command.WhileUntil
                              keyword: <Id.KW_While while>
                              cond: (condition.Shell commands:[(C {<read>} {<-r>} {<i>})])
                              body: 
                                (command.DoGroup
                                  children: [
                                    (command.If
                                      arms: [
                                        (if_arm
                                          cond: 
                                            (condition.Shell
                                              commands: [
                                                (C {<Id.Lit_LBracket '['>} 
                                                  {
                                                    (DQ 
                                                      (braced_var_sub
                                                        token: <Id.VSub_Name i>
                                                        suffix_op: 
                                                          (suffix_op.Slice
                                                            begin: {<Id.Lit_Digits 0>}
                                                            length: {<Id.Lit_Digits 8>}
                                                          )
                                                      )
                                                    )
                                                  } {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {(DQ <'INCLUDE '>)} {<Id.Lit_RBracket ']'>}
                                                )
                                              ]
                                            )
                                          action: [
                                            (command.AndOr
                                              ops: [Id.Op_DPipe]
                                              children: [
                                                (C {<cat>} 
                                                  {
                                                    (DQ ($ Id.VSub_DollarName '$SOURCES') <'/toys/'> 
                                                      (braced_var_sub
                                                        token: <Id.VSub_Name i>
                                                        suffix_op: 
                                                          (suffix_op.Slice
                                                            begin: {<Id.Lit_Digits 8>}
                                                          )
                                                      )
                                                    )
                                                  }
                                                )
                                                (C {<dienow>})
                                              ]
                                            )
                                          ]
                                          spids: [397 421]
                                        )
                                      ]
                                      else_action: [
                                        (command.AndOr
                                          ops: [Id.Op_DPipe]
                                          children: [
                                            (C {<echo>} {(DQ ($ Id.VSub_DollarName '$i'))})
                                            (C {<dienow>})
                                          ]
                                        )
                                      ]
                                    )
                                  ]
                                )
                            )
                          ]
                          negated: F
                        )
                      ]
                    )
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: 
                        {
                          (DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/'> ($ Id.VSub_DollarName '$FILE'))
                        }
                    )
                  ]
                )
                (command.AndOr
                  ops: [Id.Op_DPipe]
                  children: [
                    (C {<chmod>} {<Id.Lit_Other '+'> <x>} 
                      {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/'> ($ Id.VSub_DollarName '$FILE'))}
                    )
                    (C {<dienow>})
                  ]
                )
              ]
            )
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<is_newer>} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/rootfs.cpio.gz'>)} 
                  {
                    (DQ ($ Id.VSub_DollarName '$BUILD') <'/root-filesystem-'> 
                      ($ Id.VSub_DollarName '$ARCH')
                    )
                  }
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {<image_filesystem>}
                    {
                      (DQ ($ Id.VSub_DollarName '$BUILD') <'/root-filesystem-'> 
                        ($ Id.VSub_DollarName '$ARCH')
                      )
                    }
                    {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/temp'>)}
                  ]
                  more_env: [(env_pair name:SYSIMAGE_TYPE val:{<cpio>} spids:[517])]
                  do_fork: T
                )
                (C {<mv>} {<-f>} 
                  (word.BracedTree
                    parts: [
                      (DQ ($ Id.VSub_DollarName '$STAGE_DIR'))
                      <'/'>
                      (word_part.BracedTuple words:[{<temp>} {<rootfs>}])
                      <.cpio.gz>
                    ]
                  )
                )
                (C {<dienow>})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$SYSIMAGE_TYPE'))} 
                  {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {<rootfs>} {<Id.Lit_RBracket ']'>}
                )
                (C {<rm>} {<-f>} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/linux'>)})
              ]
            )
          ]
          spids: [499 514]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.AndOr
                  ops: [Id.Op_DAmp]
                  children: [
                    (C {<Id.Lit_LBracket '['>} {<-e>} 
                      {
                        (DQ ($ Id.VSub_DollarName '$BUILD') <'/native-compiler-'> 
                          ($ Id.VSub_DollarName '$ARCH')
                        )
                      } {<Id.Lit_RBracket ']'>}
                    )
                    (C {<is_newer>} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/toolchain.sqf'>)} 
                      {
                        (DQ ($ Id.VSub_DollarName '$BUILD') <'/native-compiler-'> 
                          ($ Id.VSub_DollarName '$ARCH')
                        )
                      }
                    )
                  ]
                )
              ]
            )
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {<image_filesystem>}
                    {
                      (DQ ($ Id.VSub_DollarName '$BUILD') <'/native-compiler-'> 
                        ($ Id.VSub_DollarName '$ARCH')
                      )
                    }
                    {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/temp'>)}
                  ]
                  more_env: [(env_pair name:SYSIMAGE_TYPE val:{<squashfs>} spids:[622])]
                  do_fork: T
                )
                (C {<mv>} {<-f>} 
                  (word.BracedTree
                    parts: [
                      (DQ ($ Id.VSub_DollarName '$STAGE_DIR'))
                      <'/'>
                      (word_part.BracedTuple words:[{<temp>} {<toolchain>}])
                      <.sqf>
                    ]
                  )
                )
                (C {<dienow>})
              ]
            )
          ]
          spids: [589 619]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<is_newer>} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/linux'>)} 
                  {
                    (DQ ($ Id.VSub_DollarName '$BUILD') <'/root-filesystem-'> 
                      ($ Id.VSub_DollarName '$ARCH')
                    )
                  } {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<package_cache>} {<linux>}))}
                )
              ]
            )
          action: [
            (C {<setupfor>} {<linux>})
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'# make allnoconfig ARCH='> 
                    (braced_var_sub
                      token: <Id.VSub_Name BOOT_KARCH>
                      suffix_op: 
                        (suffix_op.Unary
                          tok: <Id.VTest_ColonHyphen ':-'>
                          arg_word: {($ Id.VSub_DollarName '$KARCH')}
                        )
                    ) <' KCONFIG_ALLCONFIG=mini.config'>
                  )
                }
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$STAGE_DIR') <'/mini.config'>}
                )
              ]
              do_fork: T
            )
            (command.Simple
              words: [{<getconfig>} {<linux>}]
              redirects: [
                (redir
                  op: <Id.Redir_DGreat '>>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(DQ ($ Id.VSub_DollarName '$STAGE_DIR')) <'/mini.config'>}
                )
              ]
              do_fork: T
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$SYSIMAGE_TYPE'))} 
                  {<Id.Lit_Equals '='> <Id.Lit_Equals '='>} {<rootfs>} {<Id.Lit_RBracket ']'>}
                )
                (command.Simple
                  words: [
                    {<echo>}
                    {<-e>}
                    {
                      (DQ <'CONFIG_INITRAMFS_SOURCE='> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\"'>
                        ) ($ Id.VSub_DollarName '$STAGE_DIR') <'/rootfs.cpio.gz'> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\"'>
                        ) <Id.Lit_BadBackslash '\\'> <n>
                      )
                    }
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(DQ ($ Id.VSub_DollarName '$STAGE_DIR')) <'/mini.config'>}
                    )
                  ]
                  do_fork: T
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [
                    {<make>}
                    {<allnoconfig>}
                    {<Id.Lit_VarLike 'ARCH='> 
                      (braced_var_sub
                        token: <Id.VSub_Name BOOT_KARCH>
                        suffix_op: 
                          (suffix_op.Unary
                            tok: <Id.VTest_ColonHyphen ':-'>
                            arg_word: {($ Id.VSub_DollarName '$KARCH')}
                          )
                      )
                    }
                    {($ Id.VSub_DollarName '$LINUX_FLAGS')}
                    {<Id.Lit_VarLike 'KCONFIG_ALLCONFIG='> (DQ ($ Id.VSub_DollarName '$STAGE_DIR')) 
                      <'/mini.config'>
                    }
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (C {<make>} {<-j>} {($ Id.VSub_DollarName '$CPUS')} 
                  {<Id.Lit_VarLike 'ARCH='> 
                    (braced_var_sub
                      token: <Id.VSub_Name BOOT_KARCH>
                      suffix_op: 
                        (suffix_op.Unary
                          tok: <Id.VTest_ColonHyphen ':-'>
                          arg_word: {($ Id.VSub_DollarName '$KARCH')}
                        )
                    )
                  } {($ Id.VSub_DollarName '$DO_CROSS')} {($ Id.VSub_DollarName '$LINUX_FLAGS')} 
                  {($ Id.VSub_DollarName '$VERBOSITY')}
                )
                (C {<cp>} {(DQ ($ Id.VSub_DollarName '$KERNEL_PATH'))} 
                  {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') <'/linux'>)}
                )
              ]
            )
            (C {<cleanup>})
          ]
          spids: [669 692]
        )
      ]
    )
    (command.Simple
      words: [{<create_stage_tarball>}]
      more_env: [(env_pair name:ARCH val:{(DQ ($ Id.VSub_DollarName '$ARCH_NAME'))} spids:[842])]
      do_fork: T
    )
    (C {<announce>} {(DQ <'Packaging complete'>)})
  ]
)