(command.CommandList
  children: [
    (command.ShFunction
      name: clean_hex
      body: 
        (BraceGroup
          children: [
            (command.Pipeline
              children: [
                (C {<echo>} {(DQ ($ Id.VSub_Number '$1'))})
                (C {<sed>} {<-e>} {(SQ <'s/0x//'>)} {<-e>} {(SQ <'y/abcdef/ABCDEF/'>)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.ShFunction
      name: check
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELRO_START)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<grep>} {<GNU_RELRO>} {(DQ ($ Id.VSub_Number '$1'))})
                              (C {<awk>} {(SQ <'{ print $3; }'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [112]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELRO_LEN)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<grep>} {<GNU_RELRO>} {(DQ ($ Id.VSub_Number '$1'))})
                              (C {<awk>} {(SQ <'{ print $6; }'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [134]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$RELRO_START'))})]
                    )
                  action: [
                    (C {<echo>} {(DQ <'Did not find a PT_GNU_RELRO segment.'>)})
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [157 168]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:LOAD_ALIGN)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<grep>} {<LOAD>} {(DQ ($ Id.VSub_Number '$1'))})
                              (C {<awk>} {<-v>} 
                                {<Id.Lit_VarLike 'A='> ($ Id.VSub_DollarName '$RELRO_START')} {(SQ <'$3 == A { print $NF; }'>)}
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [195]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:LOAD_LEN)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<grep>} {<LOAD>} {(DQ ($ Id.VSub_Number '$1'))})
                              (C {<awk>} {<-v>} 
                                {<Id.Lit_VarLike 'A='> ($ Id.VSub_DollarName '$RELRO_START')} {(SQ <'$3 == A { print $6; }'>)}
                              )
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [222]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$LOAD_LEN'))})]
                    )
                  action: [
                    (C {<echo>} 
                      {(DQ <'Did not find a PT_LOAD segment matching the PT_GNU_RELRO segment.'>)}
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [250 261]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELRO_START)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<clean_hex>} {(DQ ($ Id.VSub_DollarName '$RELRO_START'))})
                      )
                    }
                  spids: [288]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELRO_LEN)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<clean_hex>} {(DQ ($ Id.VSub_DollarName '$RELRO_LEN'))})
                      )
                    }
                  spids: [300]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:LOAD_ALIGN)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: (C {<clean_hex>} {(DQ ($ Id.VSub_DollarName '$LOAD_ALIGN'))})
                      )
                    }
                  spids: [312]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:RELRO_END)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} 
                                {
                                  (DQ <'16o 16i '> ($ Id.VSub_DollarName '$RELRO_START') <' '> 
                                    ($ Id.VSub_DollarName '$RELRO_LEN') <' + p'>
                                  )
                                }
                              )
                              (C {<dc>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [324]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:REM)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_Backtick '`'>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<echo>} 
                                {
                                  (DQ <'16i '> ($ Id.VSub_DollarName '$RELRO_END') <' '> 
                                    ($ Id.VSub_DollarName '$LOAD_ALIGN') <' % p'>
                                  )
                                }
                              )
                              (C {<dc>})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [344]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: (C {<test>} {(DQ ($ Id.VSub_DollarName '$REM'))} {<-eq>} {<0>})
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<Id.Lit_Colon ':'>})]
                  spids: [365 378]
                )
              ]
              else_action: [
                (C {<echo>} {(DQ <'PT_GNU_RELRO segment does not end at page boundary.'>)})
                (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
              ]
            )
          ]
        )
    )
    (C {<check>} {<relro_test.stdout>})
  ]
)