; LLVM IR from JessonYue/LeetCodeLearning :: Array/luoyida/ELF (ELFTest)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_fstream" = type { %"class.std::basic_iostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%struct.Elf32_Shdr = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.Elf32_Phdr = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.Elf64_Shdr = type { i32, i32, i64, i64, i64, i64, i32, i32, i64, i64 }
%struct.Elf64_Phdr = type { i32, i32, i64, i64, i64, i64, i64, i64 }
%struct.Elf32_Ehdr = type { [16 x i8], i16, i16, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16 }
%struct.Elf64_Ehdr = type { [16 x i8], i16, i16, i32, i64, i64, i64, i32, i16, i16, i16, i16, i16, i16 }

@strtable = external dso_local global [9999 x i8], align 16
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::basic_fstream", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca [99 x %struct.Elf32_Shdr], align 16
  %17 = alloca [99 x %struct.Elf32_Phdr], align 16
  %18 = alloca i32, align 4
  %19 = alloca [99 x %struct.Elf64_Shdr], align 16
  %20 = alloca [99 x %struct.Elf64_Phdr], align 16
  %21 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.start.p0(i64 528, ptr %8) #12
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #12
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #12
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #12
  store ptr @.str, ptr %11, align 8, !tbaa !9
  %22 = load ptr, ptr %11, align 8, !tbaa !9
  %23 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %22)
          to label %24 unwind label %47

24:                                               ; preds = %2
  %25 = load ptr, ptr %11, align 8, !tbaa !9
  %26 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
          to label %27 unwind label %47

27:                                               ; preds = %24
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef %25, i32 noundef %26)
          to label %28 unwind label %47

28:                                               ; preds = %27
  %29 = invoke noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264) %8)
          to label %30 unwind label %47

30:                                               ; preds = %28
  br i1 %29, label %51, label %31

31:                                               ; preds = %30
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %33 unwind label %47

33:                                               ; preds = %31
  %34 = call ptr @__errno_location() #13
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = call ptr @strerror(i32 noundef %35) #12
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %36)
          to label %38 unwind label %47

38:                                               ; preds = %33
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str.3)
          to label %40 unwind label %47

40:                                               ; preds = %38
  %41 = call ptr @__errno_location() #13
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %39, i32 noundef %42)
          to label %44 unwind label %47

44:                                               ; preds = %40
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %46 unwind label %47

46:                                               ; preds = %44
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %406

47:                                               ; preds = %403, %294, %288, %286, %283, %280, %278, %272, %267, %265, %160, %154, %152, %149, %146, %144, %138, %133, %131, %122, %120, %118, %109, %107, %81, %58, %56, %53, %51, %44, %40, %38, %33, %31, %28, %27, %24, %2
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %12, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %13, align 4
  br label %408

51:                                               ; preds = %30
  %52 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef 16) #14
          to label %53 unwind label %47

53:                                               ; preds = %51
  store ptr %52, ptr %6, align 8, !tbaa !9
  %54 = load ptr, ptr %6, align 8, !tbaa !9
  %55 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %54, i64 noundef 16)
          to label %56 unwind label %47

56:                                               ; preds = %53
  %57 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef 0, i32 noundef 0)
          to label %58 unwind label %47

58:                                               ; preds = %56
  %59 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4)
          to label %60 unwind label %47

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #12
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %74, %60
  %62 = load i32, ptr %15, align 4, !tbaa !5
  %63 = icmp slt i32 %62, 16
  br i1 %63, label %65, label %64

64:                                               ; preds = %61
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #12
  br label %81

65:                                               ; preds = %61
  %66 = load ptr, ptr %6, align 8, !tbaa !9
  %67 = load i32, ptr %15, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i8, ptr %66, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !11
  %71 = sext i8 %70 to i32
  %72 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %71)
          to label %73 unwind label %77

73:                                               ; preds = %65
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %15, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %15, align 4, !tbaa !5
  br label %61, !llvm.loop !12

77:                                               ; preds = %65
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %12, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #12
  br label %408

81:                                               ; preds = %64
  %82 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.6)
          to label %83 unwind label %47

83:                                               ; preds = %81
  %84 = load ptr, ptr %6, align 8, !tbaa !9
  %85 = getelementptr inbounds i8, ptr %84, i64 0
  %86 = load i8, ptr %85, align 1, !tbaa !11
  %87 = sext i8 %86 to i32
  %88 = icmp ne i32 %87, 127
  br i1 %88, label %107, label %89

89:                                               ; preds = %83
  %90 = load ptr, ptr %6, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %90, i64 1
  %92 = load i8, ptr %91, align 1, !tbaa !11
  %93 = sext i8 %92 to i32
  %94 = icmp ne i32 %93, 69
  br i1 %94, label %107, label %95

95:                                               ; preds = %89
  %96 = load ptr, ptr %6, align 8, !tbaa !9
  %97 = getelementptr inbounds i8, ptr %96, i64 2
  %98 = load i8, ptr %97, align 1, !tbaa !11
  %99 = sext i8 %98 to i32
  %100 = icmp ne i32 %99, 76
  br i1 %100, label %107, label %101

101:                                              ; preds = %95
  %102 = load ptr, ptr %6, align 8, !tbaa !9
  %103 = getelementptr inbounds i8, ptr %102, i64 3
  %104 = load i8, ptr %103, align 1, !tbaa !11
  %105 = sext i8 %104 to i32
  %106 = icmp ne i32 %105, 70
  br i1 %106, label %107, label %112

107:                                              ; preds = %101, %95, %89, %83
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.7)
          to label %109 unwind label %47

109:                                              ; preds = %107
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %111 unwind label %47

111:                                              ; preds = %109
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %406

112:                                              ; preds = %101
  %113 = load ptr, ptr %6, align 8, !tbaa !9
  %114 = getelementptr inbounds i8, ptr %113, i64 4
  %115 = load i8, ptr %114, align 1, !tbaa !11
  %116 = sext i8 %115 to i32
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %125

118:                                              ; preds = %112
  %119 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.8)
          to label %120 unwind label %47

120:                                              ; preds = %118
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
          to label %122 unwind label %47

122:                                              ; preds = %120
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %121, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %124 unwind label %47

124:                                              ; preds = %122
  store i32 -2, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %406

125:                                              ; preds = %112
  %126 = load ptr, ptr %6, align 8, !tbaa !9
  %127 = getelementptr inbounds i8, ptr %126, i64 4
  %128 = load i8, ptr %127, align 1, !tbaa !11
  %129 = sext i8 %128 to i32
  %130 = icmp eq i32 %129, 1
  br i1 %130, label %131, label %259

131:                                              ; preds = %125
  %132 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.10)
          to label %133 unwind label %47

133:                                              ; preds = %131
  %134 = load ptr, ptr %6, align 8, !tbaa !9
  %135 = getelementptr inbounds i8, ptr %134, i64 5
  %136 = load i8, ptr %135, align 1, !tbaa !11
  %137 = sext i8 %136 to i32
  invoke void @_Z9getEIDATAi(i32 noundef %137)
          to label %138 unwind label %47

138:                                              ; preds = %133
  %139 = load ptr, ptr %6, align 8, !tbaa !9
  %140 = getelementptr inbounds i8, ptr %139, i64 6
  %141 = load i8, ptr %140, align 1, !tbaa !11
  %142 = sext i8 %141 to i32
  %143 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %142)
          to label %144 unwind label %47

144:                                              ; preds = %138
  %145 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef 52) #14
          to label %146 unwind label %47

146:                                              ; preds = %144
  store ptr %145, ptr %9, align 8, !tbaa !9
  %147 = load ptr, ptr %9, align 8, !tbaa !9
  %148 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %147, i64 noundef 52)
          to label %149 unwind label %47

149:                                              ; preds = %146
  %150 = load ptr, ptr %9, align 8, !tbaa !9
  %151 = invoke noundef i32 @_Z9getHead32P10Elf32_Ehdr(ptr noundef %150)
          to label %152 unwind label %47

152:                                              ; preds = %149
  %153 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.12)
          to label %154 unwind label %47

154:                                              ; preds = %152
  %155 = load ptr, ptr %11, align 8, !tbaa !9
  %156 = invoke noalias ptr @fopen(ptr noundef %155, ptr noundef @.str.13)
          to label %157 unwind label %47

157:                                              ; preds = %154
  store ptr %156, ptr %7, align 8, !tbaa !9
  %158 = load ptr, ptr %7, align 8, !tbaa !9
  %159 = icmp eq ptr %158, null
  br i1 %159, label %160, label %164

160:                                              ; preds = %157
  %161 = load ptr, ptr %11, align 8, !tbaa !9
  %162 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %161)
          to label %163 unwind label %47

163:                                              ; preds = %160
  call void @exit(i32 noundef 1) #15
  unreachable

164:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 3960, ptr %16) #12
  %165 = load ptr, ptr %7, align 8, !tbaa !9
  %166 = load ptr, ptr %9, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %166, i32 0, i32 6
  %168 = load i32, ptr %167, align 4, !tbaa !14
  %169 = zext i32 %168 to i64
  %170 = invoke i32 @fseek(ptr noundef %165, i64 noundef %169, i32 noundef 0)
          to label %171 unwind label %245

171:                                              ; preds = %164
  %172 = getelementptr inbounds [99 x %struct.Elf32_Shdr], ptr %16, i64 0, i64 0
  %173 = load ptr, ptr %9, align 8, !tbaa !9
  %174 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %173, i32 0, i32 12
  %175 = load i16, ptr %174, align 4, !tbaa !17
  %176 = zext i16 %175 to i64
  %177 = load ptr, ptr %7, align 8, !tbaa !9
  %178 = invoke i64 @fread(ptr noundef %172, i64 noundef 40, i64 noundef %176, ptr noundef %177)
          to label %179 unwind label %245

179:                                              ; preds = %171
  %180 = load ptr, ptr %7, align 8, !tbaa !9
  %181 = load ptr, ptr %9, align 8, !tbaa !9
  %182 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %181, i32 0, i32 13
  %183 = load i16, ptr %182, align 2, !tbaa !18
  %184 = zext i16 %183 to i64
  %185 = getelementptr inbounds [99 x %struct.Elf32_Shdr], ptr %16, i64 0, i64 %184
  %186 = getelementptr inbounds %struct.Elf32_Shdr, ptr %185, i32 0, i32 4
  %187 = load i32, ptr %186, align 8, !tbaa !19
  %188 = zext i32 %187 to i64
  %189 = invoke i32 @fseek(ptr noundef %180, i64 noundef %188, i32 noundef 0)
          to label %190 unwind label %245

190:                                              ; preds = %179
  %191 = load ptr, ptr %9, align 8, !tbaa !9
  %192 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %191, i32 0, i32 13
  %193 = load i16, ptr %192, align 2, !tbaa !18
  %194 = zext i16 %193 to i64
  %195 = getelementptr inbounds [99 x %struct.Elf32_Shdr], ptr %16, i64 0, i64 %194
  %196 = getelementptr inbounds %struct.Elf32_Shdr, ptr %195, i32 0, i32 5
  %197 = load i32, ptr %196, align 4, !tbaa !21
  %198 = zext i32 %197 to i64
  %199 = load ptr, ptr %7, align 8, !tbaa !9
  %200 = invoke i64 @fread(ptr noundef @strtable, i64 noundef 1, i64 noundef %198, ptr noundef %199)
          to label %201 unwind label %245

201:                                              ; preds = %190
  %202 = load ptr, ptr %9, align 8, !tbaa !9
  %203 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %202, i32 0, i32 12
  %204 = load i16, ptr %203, align 4, !tbaa !17
  %205 = zext i16 %204 to i32
  %206 = load ptr, ptr %9, align 8, !tbaa !9
  %207 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %206, i32 0, i32 6
  %208 = load i32, ptr %207, align 4, !tbaa !14
  %209 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %205, i32 noundef %208)
          to label %210 unwind label %245

210:                                              ; preds = %201
  %211 = getelementptr inbounds [99 x %struct.Elf32_Shdr], ptr %16, i64 0, i64 0
  %212 = load ptr, ptr %9, align 8, !tbaa !9
  %213 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %212, i32 0, i32 12
  %214 = load i16, ptr %213, align 4, !tbaa !17
  %215 = zext i16 %214 to i32
  invoke void @_Z23section_header_32_parseP10Elf32_Shdri(ptr noundef %211, i32 noundef %215)
          to label %216 unwind label %245

216:                                              ; preds = %210
  %217 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.12)
          to label %218 unwind label %245

218:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 3168, ptr %17) #12
  %219 = load ptr, ptr %7, align 8, !tbaa !9
  %220 = load ptr, ptr %9, align 8, !tbaa !9
  %221 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %220, i32 0, i32 5
  %222 = load i32, ptr %221, align 4, !tbaa !22
  %223 = zext i32 %222 to i64
  %224 = invoke i32 @fseek(ptr noundef %219, i64 noundef %223, i32 noundef 0)
          to label %225 unwind label %249

225:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #12
  %226 = load ptr, ptr %9, align 8, !tbaa !9
  %227 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %226, i32 0, i32 10
  %228 = load i16, ptr %227, align 4, !tbaa !23
  %229 = zext i16 %228 to i32
  store i32 %229, ptr %18, align 4, !tbaa !5
  %230 = getelementptr inbounds [99 x %struct.Elf32_Phdr], ptr %17, i64 0, i64 0
  %231 = load i32, ptr %18, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = load ptr, ptr %7, align 8, !tbaa !9
  %234 = invoke i64 @fread(ptr noundef %230, i64 noundef 32, i64 noundef %232, ptr noundef %233)
          to label %235 unwind label %253

235:                                              ; preds = %225
  %236 = load i32, ptr %18, align 4, !tbaa !5
  %237 = load ptr, ptr %9, align 8, !tbaa !9
  %238 = getelementptr inbounds %struct.Elf32_Ehdr, ptr %237, i32 0, i32 5
  %239 = load i32, ptr %238, align 4, !tbaa !22
  %240 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %236, i32 noundef %239)
          to label %241 unwind label %253

241:                                              ; preds = %235
  %242 = getelementptr inbounds [99 x %struct.Elf32_Phdr], ptr %17, i64 0, i64 0
  %243 = load i32, ptr %18, align 4, !tbaa !5
  invoke void @_Z23program_header_32_parseP10Elf32_Phdri(ptr noundef %242, i32 noundef %243)
          to label %244 unwind label %253

244:                                              ; preds = %241
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #12
  call void @llvm.lifetime.end.p0(i64 3168, ptr %17) #12
  call void @llvm.lifetime.end.p0(i64 3960, ptr %16) #12
  br label %390

245:                                              ; preds = %216, %210, %201, %190, %179, %171, %164
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %12, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %13, align 4
  br label %258

249:                                              ; preds = %218
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %12, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %13, align 4
  br label %257

253:                                              ; preds = %241, %235, %225
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %12, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #12
  br label %257

257:                                              ; preds = %253, %249
  call void @llvm.lifetime.end.p0(i64 3168, ptr %17) #12
  br label %258

258:                                              ; preds = %257, %245
  call void @llvm.lifetime.end.p0(i64 3960, ptr %16) #12
  br label %408

259:                                              ; preds = %125
  %260 = load ptr, ptr %6, align 8, !tbaa !9
  %261 = getelementptr inbounds i8, ptr %260, i64 4
  %262 = load i8, ptr %261, align 1, !tbaa !11
  %263 = sext i8 %262 to i32
  %264 = icmp eq i32 %263, 2
  br i1 %264, label %265, label %389

265:                                              ; preds = %259
  %266 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.17)
          to label %267 unwind label %47

267:                                              ; preds = %265
  %268 = load ptr, ptr %6, align 8, !tbaa !9
  %269 = getelementptr inbounds i8, ptr %268, i64 5
  %270 = load i8, ptr %269, align 1, !tbaa !11
  %271 = sext i8 %270 to i32
  invoke void @_Z9getEIDATAi(i32 noundef %271)
          to label %272 unwind label %47

272:                                              ; preds = %267
  %273 = load ptr, ptr %6, align 8, !tbaa !9
  %274 = getelementptr inbounds i8, ptr %273, i64 6
  %275 = load i8, ptr %274, align 1, !tbaa !11
  %276 = sext i8 %275 to i32
  %277 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef %276)
          to label %278 unwind label %47

278:                                              ; preds = %272
  %279 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef 64) #14
          to label %280 unwind label %47

280:                                              ; preds = %278
  store ptr %279, ptr %10, align 8, !tbaa !9
  %281 = load ptr, ptr %10, align 8, !tbaa !9
  %282 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef %281, i64 noundef 64)
          to label %283 unwind label %47

283:                                              ; preds = %280
  %284 = load ptr, ptr %10, align 8, !tbaa !9
  %285 = invoke noundef i32 @_Z9getHead64P10Elf64_Ehdr(ptr noundef %284)
          to label %286 unwind label %47

286:                                              ; preds = %283
  %287 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.12)
          to label %288 unwind label %47

288:                                              ; preds = %286
  %289 = load ptr, ptr %11, align 8, !tbaa !9
  %290 = invoke noalias ptr @fopen(ptr noundef %289, ptr noundef @.str.13)
          to label %291 unwind label %47

291:                                              ; preds = %288
  store ptr %290, ptr %7, align 8, !tbaa !9
  %292 = load ptr, ptr %7, align 8, !tbaa !9
  %293 = icmp eq ptr %292, null
  br i1 %293, label %294, label %298

294:                                              ; preds = %291
  %295 = load ptr, ptr %11, align 8, !tbaa !9
  %296 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef %295)
          to label %297 unwind label %47

297:                                              ; preds = %294
  call void @exit(i32 noundef 1) #15
  unreachable

298:                                              ; preds = %291
  call void @llvm.lifetime.start.p0(i64 6336, ptr %19) #12
  %299 = load ptr, ptr %7, align 8, !tbaa !9
  %300 = load ptr, ptr %10, align 8, !tbaa !9
  %301 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %300, i32 0, i32 6
  %302 = load i64, ptr %301, align 8, !tbaa !24
  %303 = invoke i32 @fseek(ptr noundef %299, i64 noundef %302, i32 noundef 0)
          to label %304 unwind label %375

304:                                              ; preds = %298
  %305 = getelementptr inbounds [99 x %struct.Elf64_Shdr], ptr %19, i64 0, i64 0
  %306 = load ptr, ptr %10, align 8, !tbaa !9
  %307 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %306, i32 0, i32 12
  %308 = load i16, ptr %307, align 4, !tbaa !27
  %309 = zext i16 %308 to i64
  %310 = load ptr, ptr %7, align 8, !tbaa !9
  %311 = invoke i64 @fread(ptr noundef %305, i64 noundef 64, i64 noundef %309, ptr noundef %310)
          to label %312 unwind label %375

312:                                              ; preds = %304
  %313 = load ptr, ptr %7, align 8, !tbaa !9
  %314 = load ptr, ptr %10, align 8, !tbaa !9
  %315 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %314, i32 0, i32 13
  %316 = load i16, ptr %315, align 2, !tbaa !28
  %317 = zext i16 %316 to i64
  %318 = getelementptr inbounds [99 x %struct.Elf64_Shdr], ptr %19, i64 0, i64 %317
  %319 = getelementptr inbounds %struct.Elf64_Shdr, ptr %318, i32 0, i32 4
  %320 = load i64, ptr %319, align 8, !tbaa !29
  %321 = invoke i32 @fseek(ptr noundef %313, i64 noundef %320, i32 noundef 0)
          to label %322 unwind label %375

322:                                              ; preds = %312
  %323 = load ptr, ptr %10, align 8, !tbaa !9
  %324 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %323, i32 0, i32 13
  %325 = load i16, ptr %324, align 2, !tbaa !28
  %326 = zext i16 %325 to i64
  %327 = getelementptr inbounds [99 x %struct.Elf64_Shdr], ptr %19, i64 0, i64 %326
  %328 = getelementptr inbounds %struct.Elf64_Shdr, ptr %327, i32 0, i32 5
  %329 = load i64, ptr %328, align 16, !tbaa !31
  %330 = load ptr, ptr %7, align 8, !tbaa !9
  %331 = invoke i64 @fread(ptr noundef @strtable, i64 noundef 1, i64 noundef %329, ptr noundef %330)
          to label %332 unwind label %375

332:                                              ; preds = %322
  %333 = load ptr, ptr %10, align 8, !tbaa !9
  %334 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %333, i32 0, i32 12
  %335 = load i16, ptr %334, align 4, !tbaa !27
  %336 = zext i16 %335 to i32
  %337 = load ptr, ptr %10, align 8, !tbaa !9
  %338 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %337, i32 0, i32 6
  %339 = load i64, ptr %338, align 8, !tbaa !24
  %340 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %336, i64 noundef %339)
          to label %341 unwind label %375

341:                                              ; preds = %332
  %342 = getelementptr inbounds [99 x %struct.Elf64_Shdr], ptr %19, i64 0, i64 0
  %343 = load ptr, ptr %10, align 8, !tbaa !9
  %344 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %343, i32 0, i32 12
  %345 = load i16, ptr %344, align 4, !tbaa !27
  %346 = zext i16 %345 to i32
  invoke void @_Z23section_header_64_parseP10Elf64_Shdri(ptr noundef %342, i32 noundef %346)
          to label %347 unwind label %375

347:                                              ; preds = %341
  %348 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.12)
          to label %349 unwind label %375

349:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 5544, ptr %20) #12
  %350 = load ptr, ptr %7, align 8, !tbaa !9
  %351 = load ptr, ptr %10, align 8, !tbaa !9
  %352 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %351, i32 0, i32 5
  %353 = load i64, ptr %352, align 8, !tbaa !32
  %354 = invoke i32 @fseek(ptr noundef %350, i64 noundef %353, i32 noundef 0)
          to label %355 unwind label %379

355:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #12
  %356 = load ptr, ptr %10, align 8, !tbaa !9
  %357 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %356, i32 0, i32 10
  %358 = load i16, ptr %357, align 8, !tbaa !33
  %359 = zext i16 %358 to i32
  store i32 %359, ptr %21, align 4, !tbaa !5
  %360 = getelementptr inbounds [99 x %struct.Elf64_Phdr], ptr %20, i64 0, i64 0
  %361 = load i32, ptr %21, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = load ptr, ptr %7, align 8, !tbaa !9
  %364 = invoke i64 @fread(ptr noundef %360, i64 noundef 56, i64 noundef %362, ptr noundef %363)
          to label %365 unwind label %383

365:                                              ; preds = %355
  %366 = load i32, ptr %21, align 4, !tbaa !5
  %367 = load ptr, ptr %10, align 8, !tbaa !9
  %368 = getelementptr inbounds %struct.Elf64_Ehdr, ptr %367, i32 0, i32 5
  %369 = load i64, ptr %368, align 8, !tbaa !32
  %370 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef %366, i64 noundef %369)
          to label %371 unwind label %383

371:                                              ; preds = %365
  %372 = getelementptr inbounds [99 x %struct.Elf64_Phdr], ptr %20, i64 0, i64 0
  %373 = load i32, ptr %21, align 4, !tbaa !5
  invoke void @_Z23program_header_64_parseP10Elf64_Phdri(ptr noundef %372, i32 noundef %373)
          to label %374 unwind label %383

374:                                              ; preds = %371
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #12
  call void @llvm.lifetime.end.p0(i64 5544, ptr %20) #12
  call void @llvm.lifetime.end.p0(i64 6336, ptr %19) #12
  br label %389

375:                                              ; preds = %347, %341, %332, %322, %312, %304, %298
  %376 = landingpad { ptr, i32 }
          cleanup
  %377 = extractvalue { ptr, i32 } %376, 0
  store ptr %377, ptr %12, align 8
  %378 = extractvalue { ptr, i32 } %376, 1
  store i32 %378, ptr %13, align 4
  br label %388

379:                                              ; preds = %349
  %380 = landingpad { ptr, i32 }
          cleanup
  %381 = extractvalue { ptr, i32 } %380, 0
  store ptr %381, ptr %12, align 8
  %382 = extractvalue { ptr, i32 } %380, 1
  store i32 %382, ptr %13, align 4
  br label %387

383:                                              ; preds = %371, %365, %355
  %384 = landingpad { ptr, i32 }
          cleanup
  %385 = extractvalue { ptr, i32 } %384, 0
  store ptr %385, ptr %12, align 8
  %386 = extractvalue { ptr, i32 } %384, 1
  store i32 %386, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #12
  br label %387

387:                                              ; preds = %383, %379
  call void @llvm.lifetime.end.p0(i64 5544, ptr %20) #12
  br label %388

388:                                              ; preds = %387, %375
  call void @llvm.lifetime.end.p0(i64 6336, ptr %19) #12
  br label %408

389:                                              ; preds = %374, %259
  br label %390

390:                                              ; preds = %389, %244
  br label %391

391:                                              ; preds = %390
  %392 = load ptr, ptr %6, align 8, !tbaa !9
  %393 = icmp eq ptr %392, null
  br i1 %393, label %395, label %394

394:                                              ; preds = %391
  call void @_ZdaPv(ptr noundef %392) #16
  br label %395

395:                                              ; preds = %394, %391
  %396 = load ptr, ptr %9, align 8, !tbaa !9
  %397 = icmp eq ptr %396, null
  br i1 %397, label %399, label %398

398:                                              ; preds = %395
  call void @_ZdaPv(ptr noundef %396) #16
  br label %399

399:                                              ; preds = %398, %395
  %400 = load ptr, ptr %10, align 8, !tbaa !9
  %401 = icmp eq ptr %400, null
  br i1 %401, label %403, label %402

402:                                              ; preds = %399
  call void @_ZdaPv(ptr noundef %400) #16
  br label %403

403:                                              ; preds = %402, %399
  %404 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.18)
          to label %405 unwind label %47

405:                                              ; preds = %403
  store i32 0, ptr %3, align 4
  store i32 1, ptr %14, align 4
  br label %406

406:                                              ; preds = %405, %124, %111, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #12
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %8) #12
  call void @llvm.lifetime.end.p0(i64 528, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #12
  %407 = load i32, ptr %3, align 4
  ret i32 %407

408:                                              ; preds = %388, %258, %77, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #12
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %8) #12
  call void @llvm.lifetime.end.p0(i64 528, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #12
  br label %409

409:                                              ; preds = %408
  %410 = load ptr, ptr %12, align 8
  %411 = load i32, ptr %13, align 4
  %412 = insertvalue { ptr, i32 } poison, ptr %410, 0
  %413 = insertvalue { ptr, i32 } %412, i32 %411, 1
  resume { ptr, i32 } %413
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264)) unnamed_addr #2 align 2

declare i32 @printf(ptr noundef, ...) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef, i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #7

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #8

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #9

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) #3

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9getEIDATAi(i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z9getHead32P10Elf32_Ehdr(ptr noundef) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #10

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #3

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23section_header_32_parseP10Elf32_Shdri(ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23program_header_32_parseP10Elf32_Phdri(ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z9getHead64P10Elf64_Ehdr(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23section_header_64_parseP10Elf64_Shdri(ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23program_header_64_parseP10Elf64_Phdri(ptr noundef, i32 noundef) #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #11

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(none) }
attributes #14 = { builtin allocsize(0) }
attributes #15 = { noreturn nounwind }
attributes #16 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !6, i64 32}
!15 = !{!"_ZTS10Elf32_Ehdr", !7, i64 0, !16, i64 16, !16, i64 18, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !16, i64 40, !16, i64 42, !16, i64 44, !16, i64 46, !16, i64 48, !16, i64 50}
!16 = !{!"short", !7, i64 0}
!17 = !{!15, !16, i64 48}
!18 = !{!15, !16, i64 50}
!19 = !{!20, !6, i64 16}
!20 = !{!"_ZTS10Elf32_Shdr", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36}
!21 = !{!20, !6, i64 20}
!22 = !{!15, !6, i64 28}
!23 = !{!15, !16, i64 44}
!24 = !{!25, !26, i64 40}
!25 = !{!"_ZTS10Elf64_Ehdr", !7, i64 0, !16, i64 16, !16, i64 18, !6, i64 20, !26, i64 24, !26, i64 32, !26, i64 40, !6, i64 48, !16, i64 52, !16, i64 54, !16, i64 56, !16, i64 58, !16, i64 60, !16, i64 62}
!26 = !{!"long", !7, i64 0}
!27 = !{!25, !16, i64 60}
!28 = !{!25, !16, i64 62}
!29 = !{!30, !26, i64 24}
!30 = !{!"_ZTS10Elf64_Shdr", !6, i64 0, !6, i64 4, !26, i64 8, !26, i64 16, !26, i64 24, !26, i64 32, !6, i64 40, !6, i64 44, !26, i64 48, !26, i64 56}
!31 = !{!30, !26, i64 32}
!32 = !{!25, !26, i64 32}
!33 = !{!25, !16, i64 56}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_fstream" = type { %"class.std::basic_iostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%struct.Elf32_Shdr = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.Elf32_Phdr = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.Elf64_Shdr = type { i32, i32, i64, i64, i64, i64, i32, i32, i64, i64 }
%struct.Elf64_Phdr = type { i32, i32, i64, i64, i64, i64, i64, i64 }

@strtable = external dso_local global [9999 x i8], align 16
@.str = external hidden unnamed_addr constant [69 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [23 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 -2, 1) i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::basic_fstream", align 8
  %4 = alloca [99 x %struct.Elf32_Shdr], align 16
  %5 = alloca [99 x %struct.Elf32_Phdr], align 16
  %6 = alloca [99 x %struct.Elf64_Shdr], align 16
  %7 = alloca [99 x %struct.Elf64_Phdr], align 16
  call void @llvm.lifetime.start.p0(i64 528, ptr nonnull %3) #13
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264) %3)
  %8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull @.str)
  %9 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
  invoke void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264) %3, ptr noundef nonnull @.str, i32 noundef %9)
          to label %10 unwind label %24

10:                                               ; preds = %2
  %11 = call noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264) %3)
  br i1 %11, label %26, label %12

12:                                               ; preds = %10
  %13 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %14 unwind label %24

14:                                               ; preds = %12
  %15 = tail call ptr @__errno_location() #14
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = call ptr @strerror(i32 noundef %16) #13
  %18 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %17)
          to label %19 unwind label %24

19:                                               ; preds = %14
  %20 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.3)
          to label %21 unwind label %24

21:                                               ; preds = %19
  %22 = load i32, ptr %15, align 4, !tbaa !5
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %20, i32 noundef %22)
          to label %.invoke unwind label %24

24:                                               ; preds = %.invoke, %187, %185, %180, %176, %122, %120, %115, %111, %109, %106, %100, %30, %28, %26, %21, %19, %14, %12, %2
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %240

26:                                               ; preds = %10
  %27 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znam(i64 noundef 16) #15
          to label %28 unwind label %24

28:                                               ; preds = %26
  %29 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %27, i64 noundef 16)
          to label %30 unwind label %24

30:                                               ; preds = %28
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %3, i64 noundef 0, i32 noundef 0)
          to label %32 unwind label %24

32:                                               ; preds = %30
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %34 = load i8, ptr %27, align 1, !tbaa !9
  %35 = sext i8 %34 to i32
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %35)
  %37 = getelementptr inbounds i8, ptr %27, i64 1
  %38 = load i8, ptr %37, align 1, !tbaa !9
  %39 = sext i8 %38 to i32
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %39)
  %41 = getelementptr inbounds i8, ptr %27, i64 2
  %42 = load i8, ptr %41, align 1, !tbaa !9
  %43 = sext i8 %42 to i32
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %43)
  %45 = getelementptr inbounds i8, ptr %27, i64 3
  %46 = load i8, ptr %45, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %47)
  %49 = getelementptr inbounds i8, ptr %27, i64 4
  %50 = load i8, ptr %49, align 1, !tbaa !9
  %51 = sext i8 %50 to i32
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %51)
  %53 = getelementptr inbounds i8, ptr %27, i64 5
  %54 = load i8, ptr %53, align 1, !tbaa !9
  %55 = sext i8 %54 to i32
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %55)
  %57 = getelementptr inbounds i8, ptr %27, i64 6
  %58 = load i8, ptr %57, align 1, !tbaa !9
  %59 = sext i8 %58 to i32
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %59)
  %61 = getelementptr inbounds i8, ptr %27, i64 7
  %62 = load i8, ptr %61, align 1, !tbaa !9
  %63 = sext i8 %62 to i32
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %63)
  %65 = getelementptr inbounds i8, ptr %27, i64 8
  %66 = load i8, ptr %65, align 1, !tbaa !9
  %67 = sext i8 %66 to i32
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %67)
  %69 = getelementptr inbounds i8, ptr %27, i64 9
  %70 = load i8, ptr %69, align 1, !tbaa !9
  %71 = sext i8 %70 to i32
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %71)
  %73 = getelementptr inbounds i8, ptr %27, i64 10
  %74 = load i8, ptr %73, align 1, !tbaa !9
  %75 = sext i8 %74 to i32
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %75)
  %77 = getelementptr inbounds i8, ptr %27, i64 11
  %78 = load i8, ptr %77, align 1, !tbaa !9
  %79 = sext i8 %78 to i32
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %79)
  %81 = getelementptr inbounds i8, ptr %27, i64 12
  %82 = load i8, ptr %81, align 1, !tbaa !9
  %83 = sext i8 %82 to i32
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %83)
  %85 = getelementptr inbounds i8, ptr %27, i64 13
  %86 = load i8, ptr %85, align 1, !tbaa !9
  %87 = sext i8 %86 to i32
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %87)
  %89 = getelementptr inbounds i8, ptr %27, i64 14
  %90 = load i8, ptr %89, align 1, !tbaa !9
  %91 = sext i8 %90 to i32
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %91)
  %93 = getelementptr inbounds i8, ptr %27, i64 15
  %94 = load i8, ptr %93, align 1, !tbaa !9
  %95 = sext i8 %94 to i32
  %96 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %95)
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %98 = load <4 x i8>, ptr %27, align 1
  %.fr = freeze <4 x i8> %98
  %.fr.scalar = bitcast <4 x i8> %.fr to i32
  %99 = icmp eq i32 %.fr.scalar, 1179403647
  br i1 %99, label %104, label %100

100:                                              ; preds = %32
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.7)
          to label %.invoke unwind label %24

.invoke:                                          ; preds = %21, %100
  %102 = phi ptr [ %101, %100 ], [ %23, %21 ]
  %103 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %102, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %239 unwind label %24

104:                                              ; preds = %32
  %105 = load i8, ptr %49, align 1, !tbaa !9
  switch i8 %105, label %.thread99 [
    i8 0, label %106
    i8 1, label %111
    i8 2, label %176
  ]

106:                                              ; preds = %104
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.9)
          to label %109 unwind label %24

109:                                              ; preds = %106
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %239 unwind label %24

111:                                              ; preds = %104
  %112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %113 = load i8, ptr %53, align 1, !tbaa !9
  %114 = sext i8 %113 to i32
  invoke void @_Z9getEIDATAi(i32 noundef %114)
          to label %115 unwind label %24

115:                                              ; preds = %111
  %116 = load i8, ptr %57, align 1, !tbaa !9
  %117 = sext i8 %116 to i32
  %118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %117)
  %119 = invoke noalias noundef nonnull dereferenceable(52) ptr @_Znam(i64 noundef 52) #15
          to label %120 unwind label %24

120:                                              ; preds = %115
  %121 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %119, i64 noundef 52)
          to label %122 unwind label %24

122:                                              ; preds = %120
  %123 = invoke noundef i32 @_Z9getHead32P10Elf32_Ehdr(ptr noundef nonnull %119)
          to label %124 unwind label %24

124:                                              ; preds = %122
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %126 = call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.13)
  %127 = icmp eq ptr %126, null
  br i1 %127, label %128, label %130

128:                                              ; preds = %124
  %129 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef nonnull @.str)
  call void @exit(i32 noundef 1) #16
  unreachable

130:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 3960, ptr nonnull %4) #13
  %131 = getelementptr inbounds i8, ptr %119, i64 32
  %132 = load i32, ptr %131, align 4, !tbaa !10
  %133 = zext i32 %132 to i64
  %134 = call i32 @fseek(ptr noundef nonnull %126, i64 noundef %133, i32 noundef 0)
  %135 = getelementptr inbounds i8, ptr %119, i64 48
  %136 = load i16, ptr %135, align 4, !tbaa !13
  %137 = zext i16 %136 to i64
  %138 = call i64 @fread(ptr noundef nonnull %4, i64 noundef 40, i64 noundef %137, ptr noundef nonnull %126)
  %139 = getelementptr inbounds i8, ptr %119, i64 50
  %140 = load i16, ptr %139, align 2, !tbaa !14
  %141 = zext i16 %140 to i64
  %142 = getelementptr inbounds [99 x %struct.Elf32_Shdr], ptr %4, i64 0, i64 %141, i32 4
  %143 = load i32, ptr %142, align 8, !tbaa !15
  %144 = zext i32 %143 to i64
  %145 = call i32 @fseek(ptr noundef nonnull %126, i64 noundef %144, i32 noundef 0)
  %146 = load i16, ptr %139, align 2, !tbaa !14
  %147 = zext i16 %146 to i64
  %148 = getelementptr inbounds [99 x %struct.Elf32_Shdr], ptr %4, i64 0, i64 %147, i32 5
  %149 = load i32, ptr %148, align 4, !tbaa !17
  %150 = zext i32 %149 to i64
  %151 = call i64 @fread(ptr noundef nonnull @strtable, i64 noundef 1, i64 noundef %150, ptr noundef nonnull %126)
  %152 = load i16, ptr %135, align 4, !tbaa !13
  %153 = zext i16 %152 to i32
  %154 = load i32, ptr %131, align 4, !tbaa !10
  %155 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %153, i32 noundef %154)
  %156 = load i16, ptr %135, align 4, !tbaa !13
  %157 = zext i16 %156 to i32
  invoke void @_Z23section_header_32_parseP10Elf32_Shdri(ptr noundef nonnull %4, i32 noundef %157)
          to label %158 unwind label %171

158:                                              ; preds = %130
  %159 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  call void @llvm.lifetime.start.p0(i64 3168, ptr nonnull %5) #13
  %160 = getelementptr inbounds i8, ptr %119, i64 28
  %161 = load i32, ptr %160, align 4, !tbaa !18
  %162 = zext i32 %161 to i64
  %163 = call i32 @fseek(ptr noundef nonnull %126, i64 noundef %162, i32 noundef 0)
  %164 = getelementptr inbounds i8, ptr %119, i64 44
  %165 = load i16, ptr %164, align 4, !tbaa !19
  %166 = zext i16 %165 to i32
  %167 = zext i16 %165 to i64
  %168 = call i64 @fread(ptr noundef nonnull %5, i64 noundef 32, i64 noundef %167, ptr noundef nonnull %126)
  %169 = load i32, ptr %160, align 4, !tbaa !18
  %170 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %166, i32 noundef %169)
  invoke void @_Z23program_header_32_parseP10Elf32_Phdri(ptr noundef nonnull %5, i32 noundef %166)
          to label %.thread97 unwind label %173

171:                                              ; preds = %130
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %175

173:                                              ; preds = %158
  %174 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 3168, ptr nonnull %5) #13
  br label %175

175:                                              ; preds = %173, %171
  %.pn85 = phi { ptr, i32 } [ %174, %173 ], [ %172, %171 ]
  call void @llvm.lifetime.end.p0(i64 3960, ptr nonnull %4) #13
  br label %240

176:                                              ; preds = %104
  %177 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  %178 = load i8, ptr %53, align 1, !tbaa !9
  %179 = sext i8 %178 to i32
  invoke void @_Z9getEIDATAi(i32 noundef %179)
          to label %180 unwind label %24

180:                                              ; preds = %176
  %181 = load i8, ptr %57, align 1, !tbaa !9
  %182 = sext i8 %181 to i32
  %183 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef %182)
  %184 = invoke noalias noundef nonnull dereferenceable(64) ptr @_Znam(i64 noundef 64) #15
          to label %185 unwind label %24

185:                                              ; preds = %180
  %186 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull %184, i64 noundef 64)
          to label %187 unwind label %24

187:                                              ; preds = %185
  %188 = invoke noundef i32 @_Z9getHead64P10Elf64_Ehdr(ptr noundef nonnull %184)
          to label %189 unwind label %24

189:                                              ; preds = %187
  %190 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %191 = call noalias ptr @fopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.13)
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %195

193:                                              ; preds = %189
  %194 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef nonnull @.str)
  call void @exit(i32 noundef 1) #16
  unreachable

195:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 6336, ptr nonnull %6) #13
  %196 = getelementptr inbounds i8, ptr %184, i64 40
  %197 = load i64, ptr %196, align 8, !tbaa !20
  %198 = call i32 @fseek(ptr noundef nonnull %191, i64 noundef %197, i32 noundef 0)
  %199 = getelementptr inbounds i8, ptr %184, i64 60
  %200 = load i16, ptr %199, align 4, !tbaa !23
  %201 = zext i16 %200 to i64
  %202 = call i64 @fread(ptr noundef nonnull %6, i64 noundef 64, i64 noundef %201, ptr noundef nonnull %191)
  %203 = getelementptr inbounds i8, ptr %184, i64 62
  %204 = load i16, ptr %203, align 2, !tbaa !24
  %205 = zext i16 %204 to i64
  %206 = getelementptr inbounds [99 x %struct.Elf64_Shdr], ptr %6, i64 0, i64 %205, i32 4
  %207 = load i64, ptr %206, align 8, !tbaa !25
  %208 = call i32 @fseek(ptr noundef nonnull %191, i64 noundef %207, i32 noundef 0)
  %209 = load i16, ptr %203, align 2, !tbaa !24
  %210 = zext i16 %209 to i64
  %211 = getelementptr inbounds [99 x %struct.Elf64_Shdr], ptr %6, i64 0, i64 %210, i32 5
  %212 = load i64, ptr %211, align 16, !tbaa !27
  %213 = call i64 @fread(ptr noundef nonnull @strtable, i64 noundef 1, i64 noundef %212, ptr noundef nonnull %191)
  %214 = load i16, ptr %199, align 4, !tbaa !23
  %215 = zext i16 %214 to i32
  %216 = load i64, ptr %196, align 8, !tbaa !20
  %217 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %215, i64 noundef %216)
  %218 = load i16, ptr %199, align 4, !tbaa !23
  %219 = zext i16 %218 to i32
  invoke void @_Z23section_header_64_parseP10Elf64_Shdri(ptr noundef nonnull %6, i32 noundef %219)
          to label %220 unwind label %232

220:                                              ; preds = %195
  %221 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  call void @llvm.lifetime.start.p0(i64 5544, ptr nonnull %7) #13
  %222 = getelementptr inbounds i8, ptr %184, i64 32
  %223 = load i64, ptr %222, align 8, !tbaa !28
  %224 = call i32 @fseek(ptr noundef nonnull %191, i64 noundef %223, i32 noundef 0)
  %225 = getelementptr inbounds i8, ptr %184, i64 56
  %226 = load i16, ptr %225, align 8, !tbaa !29
  %227 = zext i16 %226 to i32
  %228 = zext i16 %226 to i64
  %229 = call i64 @fread(ptr noundef nonnull %7, i64 noundef 56, i64 noundef %228, ptr noundef nonnull %191)
  %230 = load i64, ptr %222, align 8, !tbaa !28
  %231 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef %227, i64 noundef %230)
  invoke void @_Z23program_header_64_parseP10Elf64_Phdri(ptr noundef nonnull %7, i32 noundef %227)
          to label %237 unwind label %234

232:                                              ; preds = %195
  %233 = landingpad { ptr, i32 }
          cleanup
  br label %236

234:                                              ; preds = %220
  %235 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 5544, ptr nonnull %7) #13
  br label %236

236:                                              ; preds = %234, %232
  %.pn = phi { ptr, i32 } [ %235, %234 ], [ %233, %232 ]
  call void @llvm.lifetime.end.p0(i64 6336, ptr nonnull %6) #13
  br label %240

.thread97:                                        ; preds = %158
  call void @llvm.lifetime.end.p0(i64 3168, ptr nonnull %5) #13
  call void @llvm.lifetime.end.p0(i64 3960, ptr nonnull %4) #13
  br label %.thread99.sink.split

237:                                              ; preds = %220
  call void @llvm.lifetime.end.p0(i64 5544, ptr nonnull %7) #13
  call void @llvm.lifetime.end.p0(i64 6336, ptr nonnull %6) #13
  br label %.thread99.sink.split

.thread99.sink.split:                             ; preds = %237, %.thread97
  %.sink.ph = phi ptr [ %184, %237 ], [ %119, %.thread97 ]
  call void @_ZdaPv(ptr noundef nonnull %27) #17
  br label %.thread99

.thread99:                                        ; preds = %.thread99.sink.split, %104
  %.sink = phi ptr [ %27, %104 ], [ %.sink.ph, %.thread99.sink.split ]
  call void @_ZdaPv(ptr noundef nonnull %.sink) #17
  %238 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  br label %239

239:                                              ; preds = %.invoke, %109, %.thread99
  %.0 = phi i32 [ 0, %.thread99 ], [ -2, %109 ], [ -1, %.invoke ]
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %3) #13
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %3) #13
  ret i32 %.0

240:                                              ; preds = %236, %175, %24
  %.pn87 = phi { ptr, i32 } [ %25, %24 ], [ %.pn85, %175 ], [ %.pn, %236 ]
  call void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264) %3) #13
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %3) #13
  resume { ptr, i32 } %.pn87
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(264)) unnamed_addr #2 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(264)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #8

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #9

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #10

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef) local_unnamed_addr #9

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i32 noundef) local_unnamed_addr #9

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z9getEIDATAi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z9getHead32P10Elf32_Ehdr(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #11

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23section_header_32_parseP10Elf32_Shdri(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23program_header_32_parseP10Elf32_Phdri(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z9getHead64P10Elf64_Ehdr(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23section_header_64_parseP10Elf64_Shdri(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z23program_header_64_parseP10Elf64_Phdri(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #12

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(264)) unnamed_addr #5 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #12 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #13 = { nounwind }
attributes #14 = { nounwind willreturn memory(none) }
attributes #15 = { builtin allocsize(0) }
attributes #16 = { noreturn nounwind }
attributes #17 = { builtin nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 32}
!11 = !{!"_ZTS10Elf32_Ehdr", !7, i64 0, !12, i64 16, !12, i64 18, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !12, i64 40, !12, i64 42, !12, i64 44, !12, i64 46, !12, i64 48, !12, i64 50}
!12 = !{!"short", !7, i64 0}
!13 = !{!11, !12, i64 48}
!14 = !{!11, !12, i64 50}
!15 = !{!16, !6, i64 16}
!16 = !{!"_ZTS10Elf32_Shdr", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36}
!17 = !{!16, !6, i64 20}
!18 = !{!11, !6, i64 28}
!19 = !{!11, !12, i64 44}
!20 = !{!21, !22, i64 40}
!21 = !{!"_ZTS10Elf64_Ehdr", !7, i64 0, !12, i64 16, !12, i64 18, !6, i64 20, !22, i64 24, !22, i64 32, !22, i64 40, !6, i64 48, !12, i64 52, !12, i64 54, !12, i64 56, !12, i64 58, !12, i64 60, !12, i64 62}
!22 = !{!"long", !7, i64 0}
!23 = !{!21, !12, i64 60}
!24 = !{!21, !12, i64 62}
!25 = !{!26, !22, i64 24}
!26 = !{!"_ZTS10Elf64_Shdr", !6, i64 0, !6, i64 4, !22, i64 8, !22, i64 16, !22, i64 24, !22, i64 32, !6, i64 40, !6, i64 44, !22, i64 48, !22, i64 56}
!27 = !{!26, !22, i64 32}
!28 = !{!21, !22, i64 32}
!29 = !{!21, !12, i64 56}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass