(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:obj) op:Equal rhs:{($ VSub_Number "$1")} spids:[7])]
      spids: [7]
    )
    (AndOr
      children: [
        (Pipeline
          children: [(C {(file)} {(${ VSub_Name obj)}) (C {(grep)} {(-q)} {(ELF)})]
          negated: False
        )
        (Subshell
          child: 
            (CommandList
              children: [
                (Sentence
                  child: 
                    (SimpleCommand
                      words: [{(echo)} {(DQ (${ VSub_Name obj) (" is not and ELF file."))}]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[37])]
                    )
                  terminator: <Op_Semi ";">
                )
                (C {(exit)} {(0)})
              ]
            )
          spids: [27 45]
        )
      ]
      op_id: Op_DPipe
    )
    (SimpleCommand
      words: [{(objdump)} {(-hj)} {(__ex_table)} {(${ VSub_Name obj)}]
      redirects: [
        (Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[61])
        (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[65])
      ]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {($ VSub_QMark "$?")} {(-ne)} {(0)} {(Lit_Other "]")})
        (C {(exit)} {(0)})
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:white_list)
          op: Equal
          rhs: {(.text) (Lit_Comma ",") (.fixup)}
          spids: [86]
        )
      ]
      spids: [86]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:suspicious_relocs)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (Pipeline
                        children: [
                          (C {(objdump)} {(-rj)} {(__ex_table)} {(${ VSub_Name obj)})
                          (C {(tail)} {(-n)} {(Lit_Other "+") (6)})
                          (C {(grep)} {(-v)} 
                            {
                              (CommandSubPart
                                command_list: 
                                  (CommandList
                                    children: [
                                      (C {(eval)} {(echo)} 
                                        {(-e) (Lit_LBrace "{") (${ VSub_Name white_list) 
                                          (Lit_RBrace "}")
                                        }
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub "$(">
                                spids: [120 131]
                              )
                            }
                          )
                          (C {(awk)} {(SQ <"{print $3}">)})
                        ]
                        negated: False
                      )
                    ]
                  )
                left_token: <Left_CommandSub "$(">
                spids: [93 140]
              )
            }
          spids: [92]
        )
      ]
      spids: [92]
    )
    (AndOr
      children: [
        (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name suspicious_relocs))} {(Lit_Other "]")})
        (C {(exit)} {(0)})
      ]
      op_id: Op_DAmp
    )
    (FuncDef
      name: find_section_offset_from_symbol
      body: 
        (BraceGroup
          children: [
            (C {(eval)} 
              {
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(objdump)} {(-t)} {(${ VSub_Name obj)})
                            (C {(grep)} {(${ VSub_Number 1)})
                            (C {(sed)} 
                              {
                                (SQ 
                                  <
"s/\\([0-9a-f]\\+\\) .\\{7\\} \\([^ \\t]\\+\\).*/section=\"\\2\"; section_offset=\"0x\\1\" /"
                                  >
                                )
                              }
                            )
                          ]
                          negated: False
                        )
                      ]
                    )
                  left_token: <Left_CommandSub "$(">
                  spids: [202 226]
                )
              }
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:section_offset)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(printf)} {(DQ ("0x%016x"))} 
                                {
                                  (ArithSubPart
                                    anode: 
                                      (ArithBinary
                                        op_id: Arith_Plus
                                        left: (ArithWord w:{(${ VSub_Name section_offset)})
                                        right: (ArithWord w:{($ VSub_Number "$2")})
                                      )
                                    spids: [242 253]
                                  )
                                }
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [235 255]
                      )
                    }
                  spids: [234]
                )
              ]
              spids: [234]
            )
          ]
          spids: [197]
        )
      spids: [191 196]
    )
    (FuncDef
      name: find_symbol_and_offset_from_reloc
      body: 
        (BraceGroup
          children: [
            (C {(eval)} 
              {
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(echo)} {($ VSub_Name "$reloc")})
                            (C {(sed)} 
                              {
                                (SQ 
                                  <
"s/\\([^+]\\+\\)+\\?\\(0x[0-9a-f]\\+\\)\\?/symbol=\"\\1\"; symbol_offset=\"\\2\"/"
                                  >
                                )
                              }
                            )
                          ]
                          negated: False
                        )
                      ]
                    )
                  left_token: <Left_CommandSub "$(">
                  spids: [275 287]
                )
              }
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-z)} {(DQ (${ VSub_Name symbol_offset))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:symbol_offset)
                          op: Equal
                          rhs: {(0x0)}
                          spids: [317]
                        )
                      ]
                      spids: [317]
                    )
                  ]
                  spids: [-1 314]
                )
              ]
              spids: [-1 321]
            )
          ]
          spids: [266]
        )
      spids: [260 265]
    )
    (FuncDef
      name: find_alt_replacement_target
      body: 
        (BraceGroup
          children: [
            (C {(eval)} 
              {
                (CommandSubPart
                  command_list: 
                    (CommandList
                      children: [
                        (Pipeline
                          children: [
                            (C {(objdump)} {(-rj)} {(.altinstructions)} {(${ VSub_Name obj)})
                            (C {(grep)} {(-B1)} 
                              {(DQ (${ VSub_Name section) ("+") (${ VSub_Name section_offset))}
                            )
                            (C {(head)} {(-n1)})
                            (C {(awk)} {(SQ <"{print $3}">)})
                            (C {(sed)} 
                              {
                                (SQ 
                                  <
"s/\\([^+]\\+\\)+\\(0x[0-9a-f]\\+\\)/alt_target_section=\"\\1\"; alt_target_offset=\"\\2\"/"
                                  >
                                )
                              }
                            )
                          ]
                          negated: False
                        )
                      ]
                    )
                  left_token: <Left_CommandSub "$(">
                  spids: [345 394]
                )
              }
            )
          ]
          spids: [332]
        )
      spids: [326 331]
    )
    (FuncDef
      name: handle_alt_replacement_reloc
      body: 
        (BraceGroup
          children: [
            (C {(find_alt_replacement_target)} {(${ VSub_Name section)} {(${ VSub_Name section_offset)})
            (C {(echo)} {(DQ ("Error: found a reference to .altinstr_replacement in __ex_table:"))})
            (Pipeline
              children: [
                (C {(addr2line)} {(-fip)} {(-j)} {(${ VSub_Name alt_target_section)} {(-e)} 
                  {(${ VSub_Name obj)} {(${ VSub_Name alt_target_offset)}
                )
                (C {(awk)} {(SQ <"{print \"\\t\" $0}">)})
              ]
              negated: False
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:error) op:Equal rhs:{(true)} spids:[461])]
              spids: [461]
            )
          ]
          spids: [405]
        )
      spids: [399 404]
    )
    (FuncDef
      name: is_executable_section
      body: 
        (BraceGroup
          children: [
            (Pipeline
              children: [
                (C {(objdump)} {(-hwj)} {(${ VSub_Name section)} {(${ VSub_Name obj)})
                (C {(grep)} {(-q)} {(CODE)})
              ]
              negated: False
            )
            (ControlFlow token:<ControlFlow_Return return> arg_word:{($ VSub_QMark "$?")})
          ]
          spids: [473]
        )
      spids: [467 472]
    )
    (FuncDef
      name: handle_suspicious_generic_reloc
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (C {(is_executable_section)} {(${ VSub_Name section)})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} 
                      {
                        (DQ ("Warning: found a reference to section ") 
                          (EscapedLiteralPart
                            token: <Lit_EscapedChar "\\\"">
                          ) (${ VSub_Name section) (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (" in __ex_table:")
                        )
                      }
                    )
                    (Pipeline
                      children: [
                        (C {(addr2line)} {(-fip)} {(-j)} {(${ VSub_Name section)} {(-e)} 
                          {(${ VSub_Name obj)} {(${ VSub_Name section_offset)}
                        )
                        (C {(awk)} {(SQ <"{print \"\\t\" $0}">)})
                      ]
                      negated: False
                    )
                  ]
                  spids: [-1 522]
                )
              ]
              else_action: [
                (C {(echo)} 
                  {
                    (DQ ("Error: found a reference to non-executable section ") 
                      (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) (${ VSub_Name section) (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) 
                      (" in __ex_table at offset ") (${ VSub_Name section_offset)
                    )
                  }
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:error) op:Equal rhs:{(true)} spids:[614])]
                  spids: [614]
                )
              ]
              spids: [583 618]
            )
          ]
          spids: [510]
        )
      spids: [504 509]
    )
    (FuncDef
      name: handle_suspicious_reloc
      body: 
        (BraceGroup
          children: [
            (Case
              to_match: {(DQ (${ VSub_Name section))}
              arms: [
                (case_arm
                  pat_list: [{(DQ (.altinstr_replacement))}]
                  action: [
                    (C {(handle_alt_replacement_reloc)} {(${ VSub_Name section)} 
                      {(${ VSub_Name section_offset)}
                    )
                  ]
                  spids: [644 646 660 -1]
                )
                (case_arm
                  pat_list: [{(Lit_Other "*")}]
                  action: [
                    (C {(handle_suspicious_generic_reloc)} {(${ VSub_Name section)} 
                      {(${ VSub_Name section_offset)}
                    )
                  ]
                  spids: [663 664 678 -1]
                )
              ]
              spids: [632 640 681]
            )
          ]
          spids: [629]
        )
      spids: [623 628]
    )
    (FuncDef
      name: diagnose
      body: 
        (BraceGroup
          children: [
            (ForEach
              iter_name: reloc
              iter_words: [{(${ VSub_Name suspicious_relocs)}]
              do_arg_iter: False
              body: 
                (DoGroup
                  children: [
                    (C {(find_symbol_and_offset_from_reloc)} {(${ VSub_Name reloc)})
                    (C {(find_section_offset_from_symbol)} {(${ VSub_Name symbol)} 
                      {(${ VSub_Name symbol_offset)}
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {(-z)} 
                                  {
                                    (DQ 
                                      (CommandSubPart
                                        command_list: 
                                          (CommandList
                                            children: [
                                              (Pipeline
                                                children: [
                                                  (C {(echo)} {($ VSub_Name "$section")})
                                                  (C {(grep)} {(-v)} 
                                                    {
                                                      (CommandSubPart
                                                        command_list: 
                                                          (CommandList
                                                            children: [
                                                              (C {(eval)} {(echo)} 
                                                                {(-e) (Lit_LBrace "{") 
                                                                  (${ VSub_Name white_list) (Lit_RBrace "}")
                                                                }
                                                              )
                                                            ]
                                                          )
                                                        left_token: <Left_CommandSub "$(">
                                                        spids: [785 796]
                                                      )
                                                    }
                                                  )
                                                ]
                                                negated: False
                                              )
                                            ]
                                          )
                                        left_token: <Left_CommandSub "$(">
                                        spids: [773 797]
                                      )
                                    )
                                  } {(Lit_Other "]")}
                                )
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (Sentence
                              child: (ControlFlow token:<ControlFlow_Continue continue>)
                              terminator: <Op_Semi ";">
                            )
                          ]
                          spids: [-1 803]
                        )
                      ]
                      spids: [-1 810]
                    )
                    (C {(handle_suspicious_reloc)})
                  ]
                  spids: [707 825]
                )
              spids: [701 705]
            )
          ]
          spids: [692]
        )
      spids: [686 691]
    )
    (FuncDef
      name: check_debug_info
      body: 
        (BraceGroup
          children: [
            (AndOr
              children: [
                (SimpleCommand
                  words: [{(objdump)} {(-hj)} {(.debug_info)} {(${ VSub_Name obj)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: 2
                      arg_word: {(/dev/null)}
                      spids: [849]
                    )
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(/dev/null)}
                      spids: [853]
                    )
                  ]
                )
                (C {(echo)} {(-e)} 
                  {
                    (DQ (${ VSub_Name obj) 
                      (
" does not contain debug information, the addr2line output will be limited."
                      ) (EscapedLiteralPart token:<Lit_EscapedChar "\\n">)
                    )
                  } {(DQ ("Recompile ") (${ VSub_Name obj) (" with CONFIG_DEBUG_INFO to get a more useful output."))}
                )
              ]
              op_id: Op_DPipe
            )
          ]
          spids: [836]
        )
      spids: [830 835]
    )
    (C {(check_debug_info)})
    (C {(diagnose)})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {(DQ (${ VSub_Name error))} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [(C {(exit)} {(1)})]
          spids: [-1 904]
        )
      ]
      spids: [-1 911]
    )
    (C {(exit)} {(0)})
  ]
)