(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SYSIMG)
          op: assign_op.Equal
          rhs: {(DQ <'build/system-image-'> ($ Id.VSub_Number '$1'))}
          spids: [11]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} 
                  {(DQ ($ Id.VSub_DollarName '$SYSIMG'))} {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'no '> ($ Id.VSub_DollarName '$SYSIMG'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [18 32]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PATH)
          op: assign_op.Equal
          rhs: 
            {
              (DQ ($ Id.VSub_DollarName '$PWD') <'/build/host:'> ($ Id.VSub_DollarName '$PWD') 
                <'/build/native-compiler-'> ($ Id.VSub_Number '$1') <':'> ($ Id.VSub_DollarName '$PATH')
              )
            }
          spids: [53]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:X)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    words: [{<readlink>} {<-f>} {(DQ ($ Id.VSub_Number '$2'))}]
                    redirects: [
                      (redir
                        op: <Id.Redir_Great '2>'>
                        loc: (redir_loc.Fd fd:2)
                        arg: {<'/dev/null'>}
                      )
                    ]
                    do_fork: T
                  )
              )
            }
          spids: [65]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$X'))} 
                  {<Id.Lit_RBracket ']'>}
                )
              ]
            )
          action: [
            (command.Simple
              words: [{<echo>} {(DQ <'No control image '> ($ Id.VSub_Number '$2'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [79 91]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DAmp]
      children: [
        (C {<cd>} {(DQ ($ Id.VSub_DollarName '$SYSIMG'))})
        (C {<'./native-build.sh'>} {(DQ ($ Id.VSub_DollarName '$X'))})
      ]
    )
  ]
)