; LLVM IR from Dovyski/opengl-demos :: src/model-md2/pcx.ll (Z11LoadFilePCXPKcPPhPiS3_b)

; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"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" }
%"class.std::locale" = type { ptr }
%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 }
%"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::fpos" = type { i64, %struct.__mbstate_t }
%struct.tagPCXHEADER = type { i8, i8, i8, i8, i16, i16, i16, i16, i16, i16, ptr, i8, i8, i16, i16, i16, i16, [54 x i8] }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11LoadFilePCXPKcPPhPiS3_b(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i1 noundef zeroext %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca %"class.std::basic_ifstream", align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca %"class.std::fpos", align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  %29 = zext i1 %4 to i8
  store i8 %29, ptr %11, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 520, ptr %12) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
          to label %32 unwind label %41

32:                                               ; preds = %5
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %12, ptr noundef %30, i32 noundef %31)
          to label %33 unwind label %41

33:                                               ; preds = %32
  %34 = load ptr, ptr %12, align 8, !tbaa !13
  %35 = getelementptr i8, ptr %34, i64 -24
  %36 = load i64, ptr %35, align 8
  %37 = getelementptr inbounds i8, ptr %12, i64 %36
  %38 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv(ptr noundef nonnull align 8 dereferenceable(264) %37)
          to label %39 unwind label %41

39:                                               ; preds = %33
  br i1 %38, label %40, label %45

40:                                               ; preds = %39
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %358

41:                                               ; preds = %45, %33, %32, %5
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %22, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %23, align 4
  br label %360

45:                                               ; preds = %39
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef 0, i32 noundef 2)
          to label %47 unwind label %41

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  %48 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %49 unwind label %93

49:                                               ; preds = %47
  %50 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 0
  %51 = extractvalue { i64, i64 } %48, 0
  store i64 %51, ptr %50, align 8
  %52 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 1
  %53 = extractvalue { i64, i64 } %48, 1
  store i64 %53, ptr %52, align 8
  %54 = invoke noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %55 unwind label %93

55:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  store i64 %54, ptr %25, align 8, !tbaa !15
  %56 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %12, i64 noundef 0, i32 noundef 0)
          to label %57 unwind label %97

57:                                               ; preds = %55
  %58 = load i64, ptr %25, align 8, !tbaa !15
  %59 = add nsw i64 %58, 1
  %60 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %59) #8
          to label %61 unwind label %97

61:                                               ; preds = %57
  store ptr %60, ptr %17, align 8, !tbaa !5
  %62 = load ptr, ptr %17, align 8, !tbaa !5
  %63 = load i64, ptr %25, align 8, !tbaa !15
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef %62, i64 noundef %63)
          to label %65 unwind label %97

65:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %66 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %66, ptr %27, align 8, !tbaa !5
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %12)
          to label %67 unwind label %101

67:                                               ; preds = %65
  %68 = load ptr, ptr %27, align 8, !tbaa !5
  store ptr %68, ptr %13, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.tagPCXHEADER, ptr %69, i32 0, i32 0
  %71 = load i8, ptr %70, align 1, !tbaa !17
  %72 = zext i8 %71 to i32
  %73 = icmp ne i32 %72, 10
  br i1 %73, label %92, label %74

74:                                               ; preds = %67
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.tagPCXHEADER, ptr %75, i32 0, i32 1
  %77 = load i8, ptr %76, align 1, !tbaa !20
  %78 = zext i8 %77 to i32
  %79 = icmp ne i32 %78, 5
  br i1 %79, label %92, label %80

80:                                               ; preds = %74
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.tagPCXHEADER, ptr %81, i32 0, i32 2
  %83 = load i8, ptr %82, align 1, !tbaa !21
  %84 = zext i8 %83 to i32
  %85 = icmp ne i32 %84, 1
  br i1 %85, label %92, label %86

86:                                               ; preds = %80
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.tagPCXHEADER, ptr %87, i32 0, i32 3
  %89 = load i8, ptr %88, align 1, !tbaa !22
  %90 = zext i8 %89 to i32
  %91 = icmp ne i32 %90, 8
  br i1 %91, label %92, label %105

92:                                               ; preds = %86, %80, %74, %67
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %356

93:                                               ; preds = %49, %47
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %22, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  br label %357

97:                                               ; preds = %61, %57, %55
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %22, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %23, align 4
  br label %357

101:                                              ; preds = %239, %157, %65
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %22, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %357

105:                                              ; preds = %86
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.tagPCXHEADER, ptr %106, i32 0, i32 6
  %108 = load i16, ptr %107, align 1, !tbaa !23
  %109 = zext i16 %108 to i32
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.tagPCXHEADER, ptr %110, i32 0, i32 4
  %112 = load i16, ptr %111, align 1, !tbaa !24
  %113 = zext i16 %112 to i32
  %114 = sub nsw i32 %109, %113
  %115 = add nsw i32 %114, 1
  %116 = trunc i32 %115 to i16
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.tagPCXHEADER, ptr %117, i32 0, i32 6
  store i16 %116, ptr %118, align 1, !tbaa !23
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.tagPCXHEADER, ptr %119, i32 0, i32 7
  %121 = load i16, ptr %120, align 1, !tbaa !25
  %122 = zext i16 %121 to i32
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.tagPCXHEADER, ptr %123, i32 0, i32 5
  %125 = load i16, ptr %124, align 1, !tbaa !26
  %126 = zext i16 %125 to i32
  %127 = sub nsw i32 %122, %126
  %128 = add nsw i32 %127, 1
  %129 = trunc i32 %128 to i16
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.tagPCXHEADER, ptr %130, i32 0, i32 7
  store i16 %129, ptr %131, align 1, !tbaa !25
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = icmp ne ptr %132, null
  br i1 %133, label %134, label %140

134:                                              ; preds = %105
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.tagPCXHEADER, ptr %135, i32 0, i32 6
  %137 = load i16, ptr %136, align 1, !tbaa !23
  %138 = zext i16 %137 to i32
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %138, ptr %139, align 4, !tbaa !11
  br label %140

140:                                              ; preds = %134, %105
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = icmp ne ptr %141, null
  br i1 %142, label %143, label %149

143:                                              ; preds = %140
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.tagPCXHEADER, ptr %144, i32 0, i32 7
  %146 = load i16, ptr %145, align 1, !tbaa !25
  %147 = zext i16 %146 to i32
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %147, ptr %148, align 4, !tbaa !11
  br label %149

149:                                              ; preds = %143, %140
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = icmp ne ptr %150, null
  br i1 %151, label %157, label %152

152:                                              ; preds = %149
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = icmp eq ptr %153, null
  br i1 %154, label %156, label %155

155:                                              ; preds = %152
  call void @_ZdaPv(ptr noundef %153) #9
  br label %156

156:                                              ; preds = %155, %152
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %356

157:                                              ; preds = %149
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.tagPCXHEADER, ptr %158, i32 0, i32 6
  %160 = load i16, ptr %159, align 1, !tbaa !23
  %161 = zext i16 %160 to i32
  %162 = load ptr, ptr %13, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.tagPCXHEADER, ptr %162, i32 0, i32 7
  %164 = load i16, ptr %163, align 1, !tbaa !25
  %165 = zext i16 %164 to i32
  %166 = mul nsw i32 %161, %165
  %167 = sext i32 %166 to i64
  %168 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %167) #8
          to label %169 unwind label %101

169:                                              ; preds = %157
  store ptr %168, ptr %14, align 8, !tbaa !5
  %170 = load ptr, ptr %17, align 8, !tbaa !5
  %171 = getelementptr inbounds i8, ptr %170, i64 128
  store ptr %171, ptr %27, align 8, !tbaa !5
  br label %172

172:                                              ; preds = %219, %169
  %173 = load i32, ptr %18, align 4, !tbaa !11
  %174 = load ptr, ptr %13, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.tagPCXHEADER, ptr %174, i32 0, i32 6
  %176 = load i16, ptr %175, align 1, !tbaa !23
  %177 = zext i16 %176 to i32
  %178 = load ptr, ptr %13, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.tagPCXHEADER, ptr %178, i32 0, i32 7
  %180 = load i16, ptr %179, align 1, !tbaa !25
  %181 = zext i16 %180 to i32
  %182 = mul nsw i32 %177, %181
  %183 = icmp slt i32 %173, %182
  br i1 %183, label %184, label %220

184:                                              ; preds = %172
  %185 = load ptr, ptr %27, align 8, !tbaa !5
  %186 = getelementptr inbounds i8, ptr %185, i32 1
  store ptr %186, ptr %27, align 8, !tbaa !5
  %187 = load i8, ptr %185, align 1, !tbaa !27
  store i8 %187, ptr %16, align 1, !tbaa !27
  %188 = zext i8 %187 to i32
  %189 = icmp sgt i32 %188, 191
  br i1 %189, label %190, label %212

190:                                              ; preds = %184
  %191 = load i8, ptr %16, align 1, !tbaa !27
  %192 = zext i8 %191 to i32
  %193 = and i32 63, %192
  store i32 %193, ptr %19, align 4, !tbaa !11
  %194 = load ptr, ptr %27, align 8, !tbaa !5
  %195 = getelementptr inbounds i8, ptr %194, i32 1
  store ptr %195, ptr %27, align 8, !tbaa !5
  %196 = load i8, ptr %194, align 1, !tbaa !27
  store i8 %196, ptr %16, align 1, !tbaa !27
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %197

197:                                              ; preds = %208, %190
  %198 = load i32, ptr %20, align 4, !tbaa !11
  %199 = load i32, ptr %19, align 4, !tbaa !11
  %200 = icmp slt i32 %198, %199
  br i1 %200, label %201, label %211

201:                                              ; preds = %197
  %202 = load i8, ptr %16, align 1, !tbaa !27
  %203 = load ptr, ptr %14, align 8, !tbaa !5
  %204 = load i32, ptr %18, align 4, !tbaa !11
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %18, align 4, !tbaa !11
  %206 = sext i32 %204 to i64
  %207 = getelementptr inbounds i8, ptr %203, i64 %206
  store i8 %202, ptr %207, align 1, !tbaa !27
  br label %208

208:                                              ; preds = %201
  %209 = load i32, ptr %20, align 4, !tbaa !11
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %20, align 4, !tbaa !11
  br label %197, !llvm.loop !28

211:                                              ; preds = %197
  br label %219

212:                                              ; preds = %184
  %213 = load i8, ptr %16, align 1, !tbaa !27
  %214 = load ptr, ptr %14, align 8, !tbaa !5
  %215 = load i32, ptr %18, align 4, !tbaa !11
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %18, align 4, !tbaa !11
  %217 = sext i32 %215 to i64
  %218 = getelementptr inbounds i8, ptr %214, i64 %217
  store i8 %213, ptr %218, align 1, !tbaa !27
  br label %219

219:                                              ; preds = %212, %211
  br label %172, !llvm.loop !30

220:                                              ; preds = %172
  %221 = load ptr, ptr %17, align 8, !tbaa !5
  %222 = load i64, ptr %25, align 8, !tbaa !15
  %223 = sub nsw i64 %222, 769
  %224 = getelementptr inbounds i8, ptr %221, i64 %223
  store ptr %224, ptr %27, align 8, !tbaa !5
  %225 = load ptr, ptr %27, align 8, !tbaa !5
  %226 = getelementptr inbounds i8, ptr %225, i32 1
  store ptr %226, ptr %27, align 8, !tbaa !5
  %227 = load i8, ptr %225, align 1, !tbaa !27
  %228 = sext i8 %227 to i32
  %229 = icmp ne i32 %228, 12
  br i1 %229, label %230, label %239

230:                                              ; preds = %220
  %231 = load ptr, ptr %17, align 8, !tbaa !5
  %232 = icmp eq ptr %231, null
  br i1 %232, label %234, label %233

233:                                              ; preds = %230
  call void @_ZdaPv(ptr noundef %231) #9
  br label %234

234:                                              ; preds = %233, %230
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = icmp eq ptr %235, null
  br i1 %236, label %238, label %237

237:                                              ; preds = %234
  call void @_ZdaPv(ptr noundef %235) #9
  br label %238

238:                                              ; preds = %237, %234
  store i32 0, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %356

239:                                              ; preds = %220
  %240 = load ptr, ptr %27, align 8, !tbaa !5
  %241 = load ptr, ptr %13, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.tagPCXHEADER, ptr %241, i32 0, i32 10
  store ptr %240, ptr %242, align 1, !tbaa !31
  %243 = load ptr, ptr %13, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.tagPCXHEADER, ptr %243, i32 0, i32 6
  %245 = load i16, ptr %244, align 1, !tbaa !23
  %246 = zext i16 %245 to i32
  %247 = load ptr, ptr %13, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.tagPCXHEADER, ptr %247, i32 0, i32 7
  %249 = load i16, ptr %248, align 1, !tbaa !25
  %250 = zext i16 %249 to i32
  %251 = mul nsw i32 %246, %250
  %252 = mul nsw i32 %251, 4
  %253 = sext i32 %252 to i64
  %254 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %253) #8
          to label %255 unwind label %101

255:                                              ; preds = %239
  %256 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %254, ptr %256, align 8, !tbaa !5
  %257 = load ptr, ptr %8, align 8, !tbaa !5
  %258 = load ptr, ptr %257, align 8, !tbaa !5
  %259 = getelementptr inbounds i8, ptr %258, i64 0
  store ptr %259, ptr %15, align 8, !tbaa !5
  %260 = load ptr, ptr %13, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.tagPCXHEADER, ptr %260, i32 0, i32 7
  %262 = load i16, ptr %261, align 1, !tbaa !25
  %263 = zext i16 %262 to i32
  %264 = sub nsw i32 %263, 1
  store i32 %264, ptr %21, align 4, !tbaa !11
  br label %265

265:                                              ; preds = %344, %255
  %266 = load i32, ptr %21, align 4, !tbaa !11
  %267 = icmp sgt i32 %266, 0
  br i1 %267, label %268, label %347

268:                                              ; preds = %265
  %269 = load i8, ptr %11, align 1, !tbaa !9, !range !32, !noundef !33
  %270 = trunc i8 %269 to i1
  br i1 %270, label %271, label %283

271:                                              ; preds = %268
  %272 = load ptr, ptr %8, align 8, !tbaa !5
  %273 = load ptr, ptr %272, align 8, !tbaa !5
  %274 = load i32, ptr %21, align 4, !tbaa !11
  %275 = load ptr, ptr %13, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.tagPCXHEADER, ptr %275, i32 0, i32 6
  %277 = load i16, ptr %276, align 1, !tbaa !23
  %278 = zext i16 %277 to i32
  %279 = mul nsw i32 %274, %278
  %280 = mul nsw i32 %279, 4
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds i8, ptr %273, i64 %281
  store ptr %282, ptr %15, align 8, !tbaa !5
  br label %283

283:                                              ; preds = %271, %268
  store i32 0, ptr %20, align 4, !tbaa !11
  br label %284

284:                                              ; preds = %338, %283
  %285 = load i32, ptr %20, align 4, !tbaa !11
  %286 = load ptr, ptr %13, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.tagPCXHEADER, ptr %286, i32 0, i32 6
  %288 = load i16, ptr %287, align 1, !tbaa !23
  %289 = zext i16 %288 to i32
  %290 = icmp slt i32 %285, %289
  br i1 %290, label %291, label %343

291:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  %292 = load ptr, ptr %14, align 8, !tbaa !5
  %293 = load i32, ptr %21, align 4, !tbaa !11
  %294 = load ptr, ptr %13, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.tagPCXHEADER, ptr %294, i32 0, i32 6
  %296 = load i16, ptr %295, align 1, !tbaa !23
  %297 = zext i16 %296 to i32
  %298 = mul nsw i32 %293, %297
  %299 = load i32, ptr %20, align 4, !tbaa !11
  %300 = add nsw i32 %298, %299
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds i8, ptr %292, i64 %301
  %303 = load i8, ptr %302, align 1, !tbaa !27
  %304 = zext i8 %303 to i32
  %305 = mul nsw i32 3, %304
  store i32 %305, ptr %28, align 4, !tbaa !11
  %306 = load ptr, ptr %13, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.tagPCXHEADER, ptr %306, i32 0, i32 10
  %308 = load ptr, ptr %307, align 1, !tbaa !31
  %309 = load i32, ptr %28, align 4, !tbaa !11
  %310 = add nsw i32 %309, 0
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds i8, ptr %308, i64 %311
  %313 = load i8, ptr %312, align 1, !tbaa !27
  %314 = load ptr, ptr %15, align 8, !tbaa !5
  %315 = getelementptr inbounds i8, ptr %314, i64 0
  store i8 %313, ptr %315, align 1, !tbaa !27
  %316 = load ptr, ptr %13, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.tagPCXHEADER, ptr %316, i32 0, i32 10
  %318 = load ptr, ptr %317, align 1, !tbaa !31
  %319 = load i32, ptr %28, align 4, !tbaa !11
  %320 = add nsw i32 %319, 1
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds i8, ptr %318, i64 %321
  %323 = load i8, ptr %322, align 1, !tbaa !27
  %324 = load ptr, ptr %15, align 8, !tbaa !5
  %325 = getelementptr inbounds i8, ptr %324, i64 1
  store i8 %323, ptr %325, align 1, !tbaa !27
  %326 = load ptr, ptr %13, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.tagPCXHEADER, ptr %326, i32 0, i32 10
  %328 = load ptr, ptr %327, align 1, !tbaa !31
  %329 = load i32, ptr %28, align 4, !tbaa !11
  %330 = add nsw i32 %329, 2
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds i8, ptr %328, i64 %331
  %333 = load i8, ptr %332, align 1, !tbaa !27
  %334 = load ptr, ptr %15, align 8, !tbaa !5
  %335 = getelementptr inbounds i8, ptr %334, i64 2
  store i8 %333, ptr %335, align 1, !tbaa !27
  %336 = load ptr, ptr %15, align 8, !tbaa !5
  %337 = getelementptr inbounds i8, ptr %336, i64 3
  store i8 -1, ptr %337, align 1, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %338

338:                                              ; preds = %291
  %339 = load i32, ptr %20, align 4, !tbaa !11
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %20, align 4, !tbaa !11
  %341 = load ptr, ptr %15, align 8, !tbaa !5
  %342 = getelementptr inbounds i8, ptr %341, i64 4
  store ptr %342, ptr %15, align 8, !tbaa !5
  br label %284, !llvm.loop !34

343:                                              ; preds = %284
  br label %344

344:                                              ; preds = %343
  %345 = load i32, ptr %21, align 4, !tbaa !11
  %346 = add nsw i32 %345, -1
  store i32 %346, ptr %21, align 4, !tbaa !11
  br label %265, !llvm.loop !35

347:                                              ; preds = %265
  %348 = load ptr, ptr %14, align 8, !tbaa !5
  %349 = icmp eq ptr %348, null
  br i1 %349, label %351, label %350

350:                                              ; preds = %347
  call void @_ZdaPv(ptr noundef %348) #9
  br label %351

351:                                              ; preds = %350, %347
  %352 = load ptr, ptr %17, align 8, !tbaa !5
  %353 = icmp eq ptr %352, null
  br i1 %353, label %355, label %354

354:                                              ; preds = %351
  call void @_ZdaPv(ptr noundef %352) #9
  br label %355

355:                                              ; preds = %354, %351
  store i32 1, ptr %6, align 4
  store i32 1, ptr %24, align 4
  br label %356

356:                                              ; preds = %355, %238, %156, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %358

357:                                              ; preds = %101, %97, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %360

358:                                              ; preds = %356, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %12) #7
  %359 = load i32, ptr %6, align 4
  ret i32 %359

360:                                              ; preds = %357, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #7
  call void @llvm.lifetime.end.p0(i64 520, ptr %12) #7
  br label %361

361:                                              ; preds = %360
  %362 = load ptr, ptr %22, align 8
  %363 = load i32, ptr %23, align 4
  %364 = insertvalue { ptr, i32 } poison, ptr %362, 0
  %365 = insertvalue { ptr, i32 } %364, i32 %363, 1
  resume { ptr, i32 } %365
}

; 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 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !7, i64 0}
!18 = !{!"_ZTS12tagPCXHEADER", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !19, i64 4, !19, i64 6, !19, i64 8, !19, i64 10, !19, i64 12, !19, i64 14, !6, i64 16, !7, i64 24, !7, i64 25, !19, i64 26, !19, i64 28, !19, i64 30, !19, i64 32, !7, i64 34}
!19 = !{!"short", !7, i64 0}
!20 = !{!18, !7, i64 1}
!21 = !{!18, !7, i64 2}
!22 = !{!18, !7, i64 3}
!23 = !{!18, !19, i64 8}
!24 = !{!18, !19, i64 4}
!25 = !{!18, !19, i64 10}
!26 = !{!18, !19, i64 6}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}
!31 = !{!18, !6, i64 16}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = distinct !{!34, !29}
!35 = distinct !{!35, !29}


; 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_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"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" }
%"class.std::locale" = type { ptr }
%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 }
%"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::fpos" = type { i64, %struct.__mbstate_t }

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 -1, 2) i32 @_Z11LoadFilePCXPKcPPhPiS3_b(ptr noundef %0, ptr noundef %1, ptr noundef writeonly %2, ptr noundef writeonly %3, i1 noundef zeroext %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::basic_ifstream", align 8
  %7 = alloca %"class.std::fpos", align 8
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %6) #8
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256) %6)
  %8 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %6, ptr noundef %0, i32 noundef %8)
          to label %9 unwind label %16

9:                                                ; preds = %5
  %10 = load ptr, ptr %6, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr %6, i64 %12
  %14 = invoke noundef zeroext i1 @_ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv(ptr noundef nonnull align 8 dereferenceable(264) %13)
          to label %15 unwind label %16

15:                                               ; preds = %9
  br i1 %14, label %173, label %18

16:                                               ; preds = %18, %9, %5
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %174

18:                                               ; preds = %15
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef 0, i32 noundef 2)
          to label %20 unwind label %16

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %21 = invoke { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %22 unwind label %45

22:                                               ; preds = %20
  %23 = extractvalue { i64, i64 } %21, 0
  store i64 %23, ptr %7, align 8
  %24 = getelementptr inbounds i8, ptr %7, i64 8
  %25 = extractvalue { i64, i64 } %21, 1
  store i64 %25, ptr %24, align 8
  %26 = call noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  %27 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi5seekgElSt12_Ios_Seekdir(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef 0, i32 noundef 0)
          to label %28 unwind label %47

28:                                               ; preds = %22
  %29 = add nsw i64 %26, 1
  %30 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %29) #9
          to label %31 unwind label %47

31:                                               ; preds = %28
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi4readEPcl(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %30, i64 noundef %26)
          to label %33 unwind label %47

33:                                               ; preds = %31
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256) %6)
          to label %34 unwind label %49

34:                                               ; preds = %33
  %35 = load i8, ptr %30, align 1, !tbaa !8
  %.not = icmp eq i8 %35, 10
  br i1 %.not, label %36, label %173

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %30, i64 1
  %38 = load i8, ptr %37, align 1, !tbaa !13
  %.not101 = icmp eq i8 %38, 5
  br i1 %.not101, label %39, label %173

39:                                               ; preds = %36
  %40 = getelementptr inbounds i8, ptr %30, i64 2
  %41 = load i8, ptr %40, align 1, !tbaa !14
  %.not102 = icmp eq i8 %41, 1
  br i1 %.not102, label %42, label %173

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %30, i64 3
  %44 = load i8, ptr %43, align 1, !tbaa !15
  %.not103 = icmp eq i8 %44, 8
  br i1 %.not103, label %51, label %173

45:                                               ; preds = %20
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  br label %174

47:                                               ; preds = %31, %28, %22
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %174

49:                                               ; preds = %98, %66, %33
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %174

51:                                               ; preds = %42
  %52 = getelementptr inbounds i8, ptr %30, i64 8
  %53 = getelementptr inbounds i8, ptr %30, i64 4
  %54 = load <2 x i16>, ptr %52, align 1, !tbaa !16
  %55 = load <2 x i16>, ptr %53, align 1, !tbaa !16
  %56 = sub <2 x i16> %54, %55
  %57 = add <2 x i16> %56, <i16 1, i16 1>
  store <2 x i16> %57, ptr %52, align 1, !tbaa !16
  %.not104 = icmp eq ptr %2, null
  br i1 %.not104, label %61, label %58

58:                                               ; preds = %51
  %59 = extractelement <2 x i16> %57, i64 0
  %60 = zext i16 %59 to i32
  store i32 %60, ptr %2, align 4, !tbaa !17
  br label %61

61:                                               ; preds = %58, %51
  %.not105 = icmp eq ptr %3, null
  br i1 %.not105, label %65, label %62

62:                                               ; preds = %61
  %63 = extractelement <2 x i16> %57, i64 1
  %64 = zext i16 %63 to i32
  store i32 %64, ptr %3, align 4, !tbaa !17
  br label %65

65:                                               ; preds = %62, %61
  %.not106 = icmp eq ptr %1, null
  br i1 %.not106, label %.sink.split, label %66

66:                                               ; preds = %65
  %67 = extractelement <2 x i16> %57, i64 0
  %68 = zext i16 %67 to i64
  %69 = extractelement <2 x i16> %57, i64 1
  %70 = zext i16 %69 to i64
  %71 = mul nuw nsw i64 %70, %68
  %72 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %71) #9
          to label %73 unwind label %49

73:                                               ; preds = %66
  %74 = zext i16 %67 to i32
  %75 = zext i16 %69 to i32
  %76 = mul nuw nsw i32 %75, %74
  %.not128 = icmp eq i32 %76, 0
  br i1 %.not128, label %._crit_edge, label %.lr.ph115.preheader

.lr.ph115.preheader:                              ; preds = %73
  %77 = getelementptr inbounds i8, ptr %30, i64 128
  br label %.lr.ph115

.lr.ph115:                                        ; preds = %.lr.ph115.preheader, %.loopexit110
  %.082114 = phi ptr [ %.183, %.loopexit110 ], [ %77, %.lr.ph115.preheader ]
  %.093113 = phi i32 [ %.295, %.loopexit110 ], [ 0, %.lr.ph115.preheader ]
  %78 = getelementptr inbounds i8, ptr %.082114, i64 1
  %79 = load i8, ptr %.082114, align 1, !tbaa !19
  %80 = icmp ugt i8 %79, -65
  br i1 %80, label %81, label %90

81:                                               ; preds = %.lr.ph115
  %82 = and i8 %79, 63
  %83 = getelementptr inbounds i8, ptr %.082114, i64 2
  %.not129 = icmp eq i8 %82, 0
  br i1 %.not129, label %.loopexit110, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %81
  %84 = load i8, ptr %78, align 1, !tbaa !19
  %85 = zext nneg i8 %82 to i32
  %86 = sext i32 %.093113 to i64
  %scevgep = getelementptr i8, ptr %72, i64 %86
  %87 = and i8 %79, 63
  %88 = zext nneg i8 %87 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %scevgep, i8 %84, i64 %88, i1 false), !tbaa !19
  %89 = add i32 %.093113, %85
  br label %.loopexit110

90:                                               ; preds = %.lr.ph115
  %91 = add nsw i32 %.093113, 1
  %92 = sext i32 %.093113 to i64
  %93 = getelementptr inbounds i8, ptr %72, i64 %92
  store i8 %79, ptr %93, align 1, !tbaa !19
  br label %.loopexit110

.loopexit110:                                     ; preds = %.lr.ph.preheader, %81, %90
  %.295 = phi i32 [ %91, %90 ], [ %.093113, %81 ], [ %89, %.lr.ph.preheader ]
  %.183 = phi ptr [ %78, %90 ], [ %83, %81 ], [ %83, %.lr.ph.preheader ]
  %94 = icmp slt i32 %.295, %76
  br i1 %94, label %.lr.ph115, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %.loopexit110, %73
  %95 = getelementptr i8, ptr %30, i64 %26
  %96 = getelementptr i8, ptr %95, i64 -769
  %97 = load i8, ptr %96, align 1, !tbaa !19
  %.not107 = icmp eq i8 %97, 12
  br i1 %.not107, label %98, label %.sink.split.sink.split

98:                                               ; preds = %._crit_edge
  %99 = getelementptr i8, ptr %95, i64 -768
  %100 = getelementptr inbounds i8, ptr %30, i64 16
  store ptr %99, ptr %100, align 1, !tbaa !22
  %101 = shl nuw nsw i64 %71, 2
  %102 = and i64 %101, 4294967292
  %103 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %102) #9
          to label %104 unwind label %49

104:                                              ; preds = %98
  store ptr %103, ptr %1, align 8, !tbaa !23
  %105 = icmp ugt i16 %69, 1
  br i1 %105, label %.lr.ph126, label %.sink.split.sink.split

.lr.ph126:                                        ; preds = %104
  %.090122 = add nsw i32 %75, -1
  br i1 %4, label %.lr.ph126.split.us, label %.lr.ph126.split

.lr.ph126.split.us:                               ; preds = %.lr.ph126, %.loopexit.us
  %106 = phi i16 [ %140, %.loopexit.us ], [ %67, %.lr.ph126 ]
  %.090124.us = phi i32 [ %.090.us, %.loopexit.us ], [ %.090122, %.lr.ph126 ]
  %.not131 = icmp eq i16 %106, 0
  br i1 %.not131, label %.loopexit.us, label %.lr.ph120.us.preheader

.lr.ph120.us.preheader:                           ; preds = %.lr.ph126.split.us
  %107 = load ptr, ptr %1, align 8, !tbaa !23
  %108 = shl i32 %.090124.us, 2
  %109 = zext i16 %106 to i32
  %110 = mul i32 %108, %109
  %111 = zext nneg i32 %110 to i64
  %112 = getelementptr inbounds i8, ptr %107, i64 %111
  br label %.lr.ph120.us

.lr.ph120.us:                                     ; preds = %.lr.ph120.us.preheader, %.lr.ph120.us
  %113 = phi i32 [ %138, %.lr.ph120.us ], [ %109, %.lr.ph120.us.preheader ]
  %.2118.us = phi ptr [ %136, %.lr.ph120.us ], [ %112, %.lr.ph120.us.preheader ]
  %.192117.us = phi i32 [ %135, %.lr.ph120.us ], [ 0, %.lr.ph120.us.preheader ]
  %114 = mul nuw nsw i32 %113, %.090124.us
  %115 = add nsw i32 %114, %.192117.us
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds i8, ptr %72, i64 %116
  %118 = load i8, ptr %117, align 1, !tbaa !19
  %119 = zext i8 %118 to i64
  %120 = mul nuw nsw i64 %119, 3
  %121 = load ptr, ptr %100, align 1, !tbaa !22
  %122 = getelementptr inbounds i8, ptr %121, i64 %120
  %123 = load i8, ptr %122, align 1, !tbaa !19
  store i8 %123, ptr %.2118.us, align 1, !tbaa !19
  %124 = load ptr, ptr %100, align 1, !tbaa !22
  %125 = getelementptr inbounds i8, ptr %124, i64 %120
  %126 = getelementptr inbounds i8, ptr %125, i64 1
  %127 = load i8, ptr %126, align 1, !tbaa !19
  %128 = getelementptr inbounds i8, ptr %.2118.us, i64 1
  store i8 %127, ptr %128, align 1, !tbaa !19
  %129 = load ptr, ptr %100, align 1, !tbaa !22
  %130 = getelementptr inbounds i8, ptr %129, i64 %120
  %131 = getelementptr inbounds i8, ptr %130, i64 2
  %132 = load i8, ptr %131, align 1, !tbaa !19
  %133 = getelementptr inbounds i8, ptr %.2118.us, i64 2
  store i8 %132, ptr %133, align 1, !tbaa !19
  %134 = getelementptr inbounds i8, ptr %.2118.us, i64 3
  store i8 -1, ptr %134, align 1, !tbaa !19
  %135 = add nuw nsw i32 %.192117.us, 1
  %136 = getelementptr inbounds i8, ptr %.2118.us, i64 4
  %137 = load i16, ptr %52, align 1, !tbaa !24
  %138 = zext i16 %137 to i32
  %139 = icmp ult i32 %135, %138
  br i1 %139, label %.lr.ph120.us, label %.loopexit.us, !llvm.loop !25

.loopexit.us:                                     ; preds = %.lr.ph120.us, %.lr.ph126.split.us
  %140 = phi i16 [ 0, %.lr.ph126.split.us ], [ %137, %.lr.ph120.us ]
  %.090.us = add nsw i32 %.090124.us, -1
  %141 = icmp sgt i32 %.090124.us, 1
  br i1 %141, label %.lr.ph126.split.us, label %.sink.split.sink.split, !llvm.loop !26

.loopexit:                                        ; preds = %.lr.ph120, %.lr.ph126.split
  %142 = phi i16 [ 0, %.lr.ph126.split ], [ %170, %.lr.ph120 ]
  %.2.lcssa = phi ptr [ %.084123, %.lr.ph126.split ], [ %169, %.lr.ph120 ]
  %.090 = add nsw i32 %.090124, -1
  %143 = icmp sgt i32 %.090124, 1
  br i1 %143, label %.lr.ph126.split, label %.sink.split.sink.split, !llvm.loop !26

.lr.ph126.split:                                  ; preds = %.lr.ph126, %.loopexit
  %144 = phi i16 [ %142, %.loopexit ], [ %67, %.lr.ph126 ]
  %.090124 = phi i32 [ %.090, %.loopexit ], [ %.090122, %.lr.ph126 ]
  %.084123 = phi ptr [ %.2.lcssa, %.loopexit ], [ %103, %.lr.ph126 ]
  %.not130 = icmp eq i16 %144, 0
  br i1 %.not130, label %.loopexit, label %.lr.ph120.preheader

.lr.ph120.preheader:                              ; preds = %.lr.ph126.split
  %145 = zext i16 %144 to i32
  br label %.lr.ph120

.lr.ph120:                                        ; preds = %.lr.ph120.preheader, %.lr.ph120
  %146 = phi i32 [ %171, %.lr.ph120 ], [ %145, %.lr.ph120.preheader ]
  %.2118 = phi ptr [ %169, %.lr.ph120 ], [ %.084123, %.lr.ph120.preheader ]
  %.192117 = phi i32 [ %168, %.lr.ph120 ], [ 0, %.lr.ph120.preheader ]
  %147 = mul nuw nsw i32 %146, %.090124
  %148 = add nsw i32 %147, %.192117
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds i8, ptr %72, i64 %149
  %151 = load i8, ptr %150, align 1, !tbaa !19
  %152 = zext i8 %151 to i64
  %153 = mul nuw nsw i64 %152, 3
  %154 = load ptr, ptr %100, align 1, !tbaa !22
  %155 = getelementptr inbounds i8, ptr %154, i64 %153
  %156 = load i8, ptr %155, align 1, !tbaa !19
  store i8 %156, ptr %.2118, align 1, !tbaa !19
  %157 = load ptr, ptr %100, align 1, !tbaa !22
  %158 = getelementptr inbounds i8, ptr %157, i64 %153
  %159 = getelementptr inbounds i8, ptr %158, i64 1
  %160 = load i8, ptr %159, align 1, !tbaa !19
  %161 = getelementptr inbounds i8, ptr %.2118, i64 1
  store i8 %160, ptr %161, align 1, !tbaa !19
  %162 = load ptr, ptr %100, align 1, !tbaa !22
  %163 = getelementptr inbounds i8, ptr %162, i64 %153
  %164 = getelementptr inbounds i8, ptr %163, i64 2
  %165 = load i8, ptr %164, align 1, !tbaa !19
  %166 = getelementptr inbounds i8, ptr %.2118, i64 2
  store i8 %165, ptr %166, align 1, !tbaa !19
  %167 = getelementptr inbounds i8, ptr %.2118, i64 3
  store i8 -1, ptr %167, align 1, !tbaa !19
  %168 = add nuw nsw i32 %.192117, 1
  %169 = getelementptr inbounds i8, ptr %.2118, i64 4
  %170 = load i16, ptr %52, align 1, !tbaa !24
  %171 = zext i16 %170 to i32
  %172 = icmp ult i32 %168, %171
  br i1 %172, label %.lr.ph120, label %.loopexit, !llvm.loop !25

.sink.split.sink.split:                           ; preds = %.loopexit, %.loopexit.us, %104, %._crit_edge
  %.sink138 = phi ptr [ %30, %._crit_edge ], [ %72, %104 ], [ %72, %.loopexit.us ], [ %72, %.loopexit ]
  %.sink.ph = phi ptr [ %72, %._crit_edge ], [ %30, %104 ], [ %30, %.loopexit.us ], [ %30, %.loopexit ]
  %.1.ph.ph = phi i32 [ 0, %._crit_edge ], [ 1, %104 ], [ 1, %.loopexit.us ], [ 1, %.loopexit ]
  call void @_ZdaPv(ptr noundef nonnull %.sink138) #10
  br label %.sink.split

.sink.split:                                      ; preds = %.sink.split.sink.split, %65
  %.sink = phi ptr [ %30, %65 ], [ %.sink.ph, %.sink.split.sink.split ]
  %.1.ph = phi i32 [ -1, %65 ], [ %.1.ph.ph, %.sink.split.sink.split ]
  call void @_ZdaPv(ptr noundef nonnull %.sink) #10
  br label %173

173:                                              ; preds = %.sink.split, %42, %39, %36, %34, %15
  %.1 = phi i32 [ 0, %15 ], [ 0, %42 ], [ 0, %39 ], [ 0, %36 ], [ 0, %34 ], [ %.1.ph, %.sink.split ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %6) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %6) #8
  ret i32 %.1

174:                                              ; preds = %45, %47, %49, %16
  %.pn.pn = phi { ptr, i32 } [ %17, %16 ], [ %50, %49 ], [ %48, %47 ], [ %46, %45 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %6) #8
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %6) #8
  resume { ptr, i32 } %.pn.pn
}

; 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 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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 #3

declare { i64, i64 } @_ZNSi5tellgEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt4fposI11__mbstate_tEcvlEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 = { 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 #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTS12tagPCXHEADER", !10, i64 0, !10, i64 1, !10, i64 2, !10, i64 3, !11, i64 4, !11, i64 6, !11, i64 8, !11, i64 10, !11, i64 12, !11, i64 14, !12, i64 16, !10, i64 24, !10, i64 25, !11, i64 26, !11, i64 28, !11, i64 30, !11, i64 32, !10, i64 34}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!"short", !10, i64 0}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!9, !10, i64 1}
!14 = !{!9, !10, i64 2}
!15 = !{!9, !10, i64 3}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !10, i64 0}
!19 = !{!10, !10, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!9, !12, i64 16}
!23 = !{!12, !12, i64 0}
!24 = !{!9, !11, i64 8}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass