(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Pound '$#'))} {<-ne>} {<1>} 
                      {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Usage: appsign.sh *build dir*'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [4 19]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BUILD)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number '$1')}
          spids: [39]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} 
                      {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<uname>} {<-s>}))} {<Id.Lit_Equals '='>} {(DQ <Darwin>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.Simple
              words: [
                {<echo>}
                {<-n>}
                {
                  (command_sub
                    left_token: <Id.Left_Backtick '`'>
                    child: (C {<md5>} {<-q>} {($ Id.VSub_DollarName '$BUILD') <'/application.bin'>})
                  )
                }
              ]
              redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<__md5hash.bin>})]
              do_fork: T
            )
          ]
          spids: [49 70]
        )
      ]
      else_action: [
        (command.Simple
          words: [
            {<echo>}
            {<-n>}
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<md5sum>} {<--binary>} {($ Id.VSub_DollarName '$BUILD') <'/application.bin'>})
                      (C {<awk>} {(SQ <'{ print $1 }'>)})
                    ]
                    negated: F
                  )
              )
            }
          ]
          redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<__md5hash.bin>})]
          do_fork: T
        )
      ]
    )
    (command.Simple
      words: [{<cat>} {($ Id.VSub_DollarName '$BUILD') <'/application.bin'>} {<__md5hash.bin>}]
      redirects: [
        (redir
          op: <Id.Redir_Great '>'>
          loc: (redir_loc.Fd fd:1)
          arg: {($ Id.VSub_DollarName '$BUILD') <'/mcuimg.bin'>}
        )
      ]
      do_fork: T
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RET)
          op: assign_op.Equal
          rhs: {($ Id.VSub_QMark '$?')}
          spids: [138]
        )
      ]
    )
    (C {<rm>} {<-f>} {<__md5hash.bin>})
    (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$BUILD') <'/application.bin'>})
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{($ Id.VSub_DollarName '$RET')})
  ]
)