(CommandList
  children: [
    (If
      arms: [
        (if_arm
          cond: (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-ne)} {(1)} {(Lit_Other "]")})
          action: 
            (CommandList
              children: [
                (SimpleCommand
                  words: [{(echo)} {(DQ ("usage: ") ($ VSub_Number "$0") (" CONTROL_IMAGE"))}]
                  redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[45])]
                )
                (C {(exit)} {(1)})
              ]
            )
          spids: [-1 34]
        )
      ]
      spids: [-1 53]
    )
    (If
      arms: [
        (if_arm
          cond: 
            (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(DQ ($ VSub_Number "$1"))} {(Lit_Other "]")})
          action: 
            (CommandList
              children: [
                (SimpleCommand
                  words: [{(echo)} {(DQ ("Filesystem image ") ($ VSub_Number "$1") (" missing"))}]
                  redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[81])]
                )
                (C {(exit)} {(1)})
              ]
            )
          spids: [-1 70]
        )
      ]
      spids: [-1 89]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:HDCFILE)
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: (C {(readlink)} {(-f)} {($ VSub_Number "$1")})
                  spids: [93 99]
                )
              )
            }
          spids: [91]
        )
      ]
      spids: [91]
    )
    (C {(INCLUDE)} {(unique-port.sh)})
    (If
      arms: [
        (if_arm
          cond: (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$FTP_SERVER"))} {(Lit_Other "]")})
          action: 
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LeftVar name:FTP_SERVER) rhs:{(127.0.0.1)} spids:[127])]
              spids: [127]
            )
          spids: [-1 124]
        )
        (if_arm
          cond: (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$FTP_PORT"))} {(Lit_Other "]")})
          action: 
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LeftVar name:FTP_PORT) rhs:{(21)} spids:[145])]
              spids: [145]
            )
          spids: [130 142]
        )
      ]
      spids: [-1 148]
    )
    (If
      arms: [
        (if_arm
          cond: (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$FTP_PORT"))} {(Lit_Other "]")})
          action: 
            (If
              arms: [
                (if_arm
                  cond: 
                    (C {(Lit_Other "[")} {(-z)} 
                      {(DQ (CommandSubPart command_list:(C {(which)} {(toybox)}) spids:[173177]))} {(Lit_Other "]")}
                    )
                  action: 
                    (SimpleCommand
                      words: [{(echo)} {(DQ ("Warning: can't find toybox, no ftp daemon launched."))}]
                      redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[192])]
                    )
                  spids: [-1 183]
                )
              ]
              else_action: 
                (CommandList
                  children: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LeftVar name:FTP_PORT)
                          rhs: {(CommandSubPart command_list:(C {(unique_port)}) spids:[200202])}
                          spids: [199]
                        )
                      ]
                      spids: [199]
                    )
                    (C {(echo)} {(Lit_Other "=") (Lit_Other "=") (Lit_Other "=")} {(launching)} {(FTP)} 
                      {(daemon)} {(on)} {(port)} {(DQ ($ VSub_Name "$FTP_PORT"))}
                    )
                    (C {(mkdir)} {(-p)} {(upload)})
                    (Sentence
                      command: 
                        (C {(toybox)} {(nc)} {(-s)} {(127.0.0.1)} {(-p)} {($ VSub_Name "$FTP_PORT")} {(-L)} 
                          {(busybox)} {(ftpd)} {(-w)} {(upload)}
                        )
                      terminator: <Op_Amp "&">
                    )
                    (C {(trap)} 
                      {
                        (DQ ("kill ") (CommandSubPart command_list:(C {(jobs)} {(-p)}) spids:[277281]))
                      } {(EXIT)}
                    )
                    (C {(disown)} {(CommandSubPart command_list:(C {(jobs)} {(-p)}) spids:[289293])})
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LeftVar name:FTP_SERVER)
                          rhs: {(10.0.2.2)}
                          spids: [302]
                        )
                      ]
                      spids: [302]
                    )
                  ]
                )
              spids: [196 306]
            )
          spids: [-1 163]
        )
      ]
      spids: [-1 308]
    )
    (Assignment
      keyword: Assign_Export
      pairs: [(assign_pair lhs:(LeftVar name:HDC) rhs:{(DQ ($ VSub_Name "$HDCFILE"))} spids:[320])]
      spids: [318]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LeftVar name:NATIVE_BUILD)
          rhs: 
            {
              (DQ 
                (CommandSubPart
                  command_list: 
                    (Pipeline
                      children: [
                        (C {(echo)} {(DQ ($ VSub_Name "$HDCFILE"))})
                        (C {(sed)} {(-e)} {(SQ <"s@.*/@@">)} {(-e)} {(SQ <"s@[.]hdc$@@">)})
                      ]
                      negated: False
                    )
                  spids: [327 349]
                )
              )
            }
          spids: [325]
        )
      ]
      spids: [325]
    )
    (Assignment
      keyword: Assign_Export
      pairs: [
        (assign_pair
          lhs: (LeftVar name:KERNEL_EXTRA)
          rhs: 
            {
              (DQ ("FTP_SERVER=") ($ VSub_Name "$FTP_SERVER") (" FTP_PORT=") ($ VSub_Name "$FTP_PORT") 
                (" NATIVE_BUILD=") ($ VSub_Name "$NATIVE_BUILD") (" ") ($ VSub_Name "$KERNEL_EXTRA")
              )
            }
          spids: [354]
        )
      ]
      spids: [352]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$HDB"))} {(Lit_Other "]")})
        (C {(rm)} {(-f)} {(hdb.img)})
      ]
      op_id: Op_DAmp
    )
    (C {(./dev-environment.sh)})
    (C {(echo)} {(Lit_Other "=") (Lit_Other "=") (Lit_Other "=")} {(End)} {(native)} {(build)})
  ]
)