(command.CommandList
  children: [
    (command.ShFunction
      name: check
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Pipeline
                          children: [
                            (C {<grep>} {<-q>} {(DQ ($ Id.VSub_Number '$2'))} 
                              {(DQ ($ Id.VSub_Number '$1'))}
                            )
                          ]
                          negated: T
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ <'Did not find expected segment in '> ($ Id.VSub_Number '$1') <':'>)}
                    )
                    (C {<echo>} {(DQ <'   '> ($ Id.VSub_Number '$2'))})
                    (C {<echo>} {(DQ )})
                    (C {<echo>} {(DQ <'Actual output below:'>)})
                    (C {<cat>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [75 92]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: check_count
      body: 
        (BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (C {<test>} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_Backtick '`'>
                                child: 
                                  (C {<grep>} {<-c>} {(DQ ($ Id.VSub_Number '$2'))} 
                                    {(DQ ($ Id.VSub_Number '$1'))}
                                  )
                              )
                            )
                          } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_Number '$3'))}
                        )
                      ]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ <'Did not find expected segment in '> ($ Id.VSub_Number '$1') <':'>)}
                    )
                    (C {<echo>} {(DQ <'   '> ($ Id.VSub_Number '$2'))})
                    (C {<echo>} {(DQ )})
                    (C {<echo>} {(DQ <'Actual output below:'>)})
                    (C {<cat>} {(DQ ($ Id.VSub_Number '$1'))})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [149 179]
                )
              ]
            )
          ]
        )
    )
    (C {<check_count>} {<script_test_3.stdout>} {(DQ <'^  INTERP'>)} {<1>})
    (C {<check_count>} {<script_test_3.stdout>} {(DQ <'^  LOAD'>)} {<3>})
    (C {<check_count>} {<script_test_3.stdout>} {(DQ <'^  DYNAMIC'>)} {<1>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:section)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<fgrep>} {<.interp>} {<script_test_3.stdout>})
                      (C {<grep>} {<PROGBITS>})
                    ]
                    negated: F
                  )
              )
            }
          spids: [266]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: (C {<test>} {(DQ ($ Id.VSub_DollarName '$section'))} {<Id.Lit_Equals '='>} {(DQ )})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Did not find .interp section'>)})
            (C {<echo>} {(DQ )})
            (C {<echo>} {(DQ <'Actual output below:'>)})
            (C {<cat>} {<script_test_3.stdout>})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [283 297]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:section)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {(DQ ($ Id.VSub_DollarName '$section'))})
                      (C {<sed>} {<-e>} {(SQ <'s/[][]*//g'>)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [337]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:section_size)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {(DQ ($ Id.VSub_DollarName '$section'))})
                      (C {<awk>} {(SQ <'{ print $6; }'>)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [358]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:segment)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: (C {<grep>} {(SQ <'^  INTERP'>)} {<script_test_3.stdout>})
              )
            }
          spids: [378]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:segment_size)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {(DQ ($ Id.VSub_DollarName '$segment'))})
                      (C {<awk>} {(SQ <'{ print $5; }'>)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [394]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:section_size)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {(DQ ($ Id.VSub_DollarName '$section_size'))})
                      (C {<sed>} {<-e>} {(SQ <'s/^0*//'>)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [420]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:segment_size)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {(DQ ($ Id.VSub_DollarName '$segment_size'))})
                      (C {<sed>} {<-e>} {(SQ <'s/^0x//'>)} {<-e>} {(SQ <'s/^0*//'>)})
                    ]
                    negated: F
                  )
              )
            }
          spids: [441]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {(DQ ($ Id.VSub_DollarName '$section_size'))} 
                      {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$segment_size'))}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} 
              {
                (DQ <'.interp size '> ($ Id.VSub_DollarName '$section_size') <' != PT_INTERP size '> 
                  ($ Id.VSub_DollarName '$segment_size')
                )
              }
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [469 485]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:found)
          op: assign_op.Equal
          rhs: {<no>}
          spids: [508]
        )
      ]
    )
    (command.ForEach
      iter_name: a
      iter_words: [
        {
          (command_sub
            left_token: <Id.Left_Backtick '`'>
            child: 
              (command.Pipeline
                children: [
                  (C {<grep>} {<LOAD>} {<script_test_3.stdout>})
                  (C {<sed>} {<-e>} {(SQ <'s/^.* 0x/0x/'>)})
                ]
                negated: F
              )
          )
        }
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:script)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'BEGIN { if ('> ($ Id.VSub_DollarName '$a') <' >= 0x100000) { print '> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\"'>
                        ) <true> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' } else { print '> 
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\"'>
                        ) <false> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' } }'>
                      )
                    }
                  spids: [541]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:x)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Simple
                            words: [{<awk>} {(DQ ($ Id.VSub_DollarName '$script'))}]
                            redirects: [
                              (redir
                                op: <Id.Redir_Less '<'>
                                loc: (redir_loc.Fd fd:0)
                                arg: {<'/dev/null'>}
                              )
                            ]
                            do_fork: T
                          )
                      )
                    }
                  spids: [557]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (C {<test>} {(DQ ($ Id.VSub_DollarName '$x'))} {<Id.Lit_Equals '='>} 
                              {(DQ <true>)}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:found)
                          op: assign_op.Equal
                          rhs: {<yes>}
                          spids: [591]
                        )
                      ]
                    )
                  ]
                  spids: [573 588]
                )
              ]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<test>} {(DQ ($ Id.VSub_DollarName '$found'))} {<Id.Lit_Equals '='>} {(DQ <no>)})
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'no LOAD segment has required alignment'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          spids: [599 614]
        )
      ]
    )
    (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})
  ]
)