(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:REFERENCE)
          op: Equal
          rhs: {($ VSub_DollarName '$HOME') (/persist/firmware.bin)}
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_LBracket '[')} {(-f)} {($ VSub_DollarName '$REFERENCE')} {(Lit_RBracket ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:size_old)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(stat)} {(-c) (Lit_Other '%') (s)} {($ VSub_DollarName '$REFERENCE')})
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:size_new)
                  op: Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(stat)} {(-c) (Lit_Other '%') (s)} {(minimal/build/firmware.bin)})
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (C {(echo)} 
              {
                (DQ ('Old size: ') ($ VSub_DollarName '$size_old') (' new size: ') 
                  ($ VSub_DollarName '$size_new')
                )
              }
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Lit_LBracket '[')} {($ VSub_DollarName '$size_new')} {(-gt)} 
                          {($ VSub_DollarName '$size_old')} {(Lit_RBracket ']')}
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ('Validation failure: Core code size increased'))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(Lit_LBracket '[')} 
                                  {(DQ ($ VSub_DollarName '$TRAVIS_PULL_REQUEST'))} {(KW_Bang '!') (Lit_Equals '=')} {(DQ (false))} {(Lit_RBracket ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
      ]
      else_action: [
        (C {(echo)} {(DQ ("Warning: reference file doesn't exist, code size check didn't run"))})
      ]
    )
  ]
)