; LLVM IR from Optiroc/SuperFamiconv :: src/Image.ll/ZN3sfc5ImageC2ERKNSt7 (cxx1112basic_stringIcSt11char_traitsIcESaIcEEE)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.lodepng::State" = type { %struct.LodePNGState }
%struct.LodePNGState = type { %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32, i64, i64 }
%struct.LodePNGDecompressSettings = type { i32, i32, i64, ptr, ptr, ptr }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.sfc::Image" = type { i32, i32, i32, i32, %"class.std::vector", %"class.std::vector", %"class.std::vector.0", %"class.std::set" }

@_ZTISt13runtime_error = external constant ptr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sfc5ImageC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.lodepng::State", align 8
  %12 = alloca i8, align 1
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::allocator", align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::vector.0", align 8
  %24 = alloca %"class.std::set", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8
  %28 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 4
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  %29 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  %30 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 6
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %31 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 7
  call void @_ZNSt3setIjSt4lessIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = invoke noundef i32 @_ZN7lodepng9load_fileERSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %34 unwind label %43

34:                                               ; preds = %2
  store i32 %33, ptr %8, align 4, !tbaa !9
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %51

37:                                               ; preds = %34
  %38 = call ptr @__cxa_allocate_exception(i64 16) #5
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %39)
          to label %41 unwind label %47

41:                                               ; preds = %37
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef %40)
          to label %42 unwind label %47

42:                                               ; preds = %41
  invoke void @__cxa_throw(ptr %38, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
          to label %329 unwind label %43

43:                                               ; preds = %42, %2
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %9, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %10, align 4
  br label %323

47:                                               ; preds = %41, %37
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  call void @__cxa_free_exception(ptr %38) #5
  br label %323

51:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 544, ptr %11) #5
  invoke void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(544) %11)
          to label %52 unwind label %68

52:                                               ; preds = %51
  %53 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 0
  %54 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %53, i32 0, i32 4
  store i32 0, ptr %54, align 4, !tbaa !11
  %55 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 0
  %56 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %55, i32 0, i32 1
  store i32 1, ptr %56, align 8, !tbaa !23
  %57 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 4
  %58 = invoke noundef i32 @_ZN7lodepng6decodeERSt6vectorIhSaIhEERjS4_RNS_5StateERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 8 dereferenceable(544) %11, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %59 unwind label %72

59:                                               ; preds = %52
  store i32 %58, ptr %8, align 4, !tbaa !9
  %60 = load i32, ptr %8, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %80

62:                                               ; preds = %59
  %63 = call ptr @__cxa_allocate_exception(i64 16) #5
  %64 = load i32, ptr %8, align 4, !tbaa !9
  %65 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %64)
          to label %66 unwind label %76

66:                                               ; preds = %62
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %63, ptr noundef %65)
          to label %67 unwind label %76

67:                                               ; preds = %66
  invoke void @__cxa_throw(ptr %63, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
          to label %329 unwind label %72

68:                                               ; preds = %51
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %9, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %10, align 4
  br label %322

72:                                               ; preds = %67, %52
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %9, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %10, align 4
  br label %321

76:                                               ; preds = %66, %62
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  call void @__cxa_free_exception(ptr %63) #5
  br label %321

80:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 0, ptr %12, align 1, !tbaa !24
  %81 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %82 = getelementptr inbounds %struct.LodePNGColorMode, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !26
  %84 = icmp eq i32 %83, 3
  br i1 %84, label %85, label %239

85:                                               ; preds = %80
  %86 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %87 = getelementptr inbounds %struct.LodePNGColorMode, ptr %86, i32 0, i32 1
  %88 = load i32, ptr %87, align 4, !tbaa !27
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %166

90:                                               ; preds = %85
  %91 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %92 = getelementptr inbounds %struct.LodePNGColorMode, ptr %91, i32 0, i32 1
  %93 = load i32, ptr %92, align 4, !tbaa !27
  %94 = icmp ult i32 %93, 8
  br i1 %94, label %95, label %166

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #5
  %96 = load i32, ptr %6, align 4, !tbaa !9
  %97 = load i32, ptr %7, align 4, !tbaa !9
  %98 = mul i32 %96, %97
  %99 = zext i32 %98 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %99, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %100 unwind label %115

100:                                              ; preds = %95
  %101 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 5
  %102 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %101, ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %103 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %104 = getelementptr inbounds %struct.LodePNGColorMode, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !27
  store i32 %105, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %106 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %107 = getelementptr inbounds %struct.LodePNGColorMode, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !27
  %109 = udiv i32 8, %108
  store i32 %109, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  store i8 0, ptr %17, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %125, %100
  %111 = load i32, ptr %18, align 4, !tbaa !9
  %112 = load i32, ptr %15, align 4, !tbaa !9
  %113 = icmp ult i32 %111, %112
  br i1 %113, label %119, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %128

115:                                              ; preds = %95
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %9, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #5
  br label %320

119:                                              ; preds = %110
  %120 = load i8, ptr %17, align 1, !tbaa !28
  %121 = zext i8 %120 to i32
  %122 = shl i32 %121, 1
  %123 = add nsw i32 %122, 1
  %124 = trunc i32 %123 to i8
  store i8 %124, ptr %17, align 1, !tbaa !28
  br label %125

125:                                              ; preds = %119
  %126 = load i32, ptr %18, align 4, !tbaa !9
  %127 = add i32 %126, 1
  store i32 %127, ptr %18, align 4, !tbaa !9
  br label %110, !llvm.loop !29

128:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %162, %128
  %130 = load i32, ptr %19, align 4, !tbaa !9
  %131 = zext i32 %130 to i64
  %132 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 5
  %133 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %132) #5
  %134 = icmp ult i64 %131, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %165

136:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %137 = load i32, ptr %15, align 4, !tbaa !9
  %138 = sub i32 8, %137
  %139 = load i32, ptr %19, align 4, !tbaa !9
  %140 = load i32, ptr %15, align 4, !tbaa !9
  %141 = mul i32 %139, %140
  %142 = urem i32 %141, 8
  %143 = sub i32 %138, %142
  store i32 %143, ptr %20, align 4, !tbaa !9
  %144 = load i8, ptr %17, align 1, !tbaa !28
  %145 = zext i8 %144 to i32
  %146 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 4
  %147 = load i32, ptr %19, align 4, !tbaa !9
  %148 = load i32, ptr %16, align 4, !tbaa !9
  %149 = udiv i32 %147, %148
  %150 = zext i32 %149 to i64
  %151 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %146, i64 noundef %150) #5
  %152 = load i8, ptr %151, align 1, !tbaa !28
  %153 = zext i8 %152 to i32
  %154 = load i32, ptr %20, align 4, !tbaa !9
  %155 = ashr i32 %153, %154
  %156 = and i32 %145, %155
  %157 = trunc i32 %156 to i8
  %158 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 5
  %159 = load i32, ptr %19, align 4, !tbaa !9
  %160 = zext i32 %159 to i64
  %161 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %160) #5
  store i8 %157, ptr %161, align 1, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %162

162:                                              ; preds = %136
  %163 = load i32, ptr %19, align 4, !tbaa !9
  %164 = add i32 %163, 1
  store i32 %164, ptr %19, align 4, !tbaa !9
  br label %129, !llvm.loop !31

165:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %175

166:                                              ; preds = %90, %85
  %167 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 4
  %168 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 5
  %169 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %168, ptr noundef nonnull align 8 dereferenceable(24) %167)
          to label %170 unwind label %171

170:                                              ; preds = %166
  br label %175

171:                                              ; preds = %286, %272, %166
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %9, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %10, align 4
  br label %320

175:                                              ; preds = %170, %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %176

176:                                              ; preds = %229, %175
  %177 = load i32, ptr %21, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %180 = getelementptr inbounds %struct.LodePNGColorMode, ptr %179, i32 0, i32 3
  %181 = load i64, ptr %180, align 8, !tbaa !32
  %182 = mul i64 %181, 4
  %183 = icmp ult i64 %178, %182
  br i1 %183, label %185, label %184

184:                                              ; preds = %176
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %236

185:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %186 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %187 = getelementptr inbounds %struct.LodePNGColorMode, ptr %186, i32 0, i32 2
  %188 = load ptr, ptr %187, align 8, !tbaa !33
  %189 = load i32, ptr %21, align 4, !tbaa !9
  %190 = zext i32 %189 to i64
  %191 = getelementptr inbounds i8, ptr %188, i64 %190
  %192 = load i8, ptr %191, align 1, !tbaa !28
  %193 = zext i8 %192 to i32
  %194 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %195 = getelementptr inbounds %struct.LodePNGColorMode, ptr %194, i32 0, i32 2
  %196 = load ptr, ptr %195, align 8, !tbaa !33
  %197 = load i32, ptr %21, align 4, !tbaa !9
  %198 = add i32 %197, 1
  %199 = zext i32 %198 to i64
  %200 = getelementptr inbounds i8, ptr %196, i64 %199
  %201 = load i8, ptr %200, align 1, !tbaa !28
  %202 = zext i8 %201 to i32
  %203 = shl i32 %202, 8
  %204 = add nsw i32 %193, %203
  %205 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %206 = getelementptr inbounds %struct.LodePNGColorMode, ptr %205, i32 0, i32 2
  %207 = load ptr, ptr %206, align 8, !tbaa !33
  %208 = load i32, ptr %21, align 4, !tbaa !9
  %209 = add i32 %208, 2
  %210 = zext i32 %209 to i64
  %211 = getelementptr inbounds i8, ptr %207, i64 %210
  %212 = load i8, ptr %211, align 1, !tbaa !28
  %213 = zext i8 %212 to i32
  %214 = shl i32 %213, 16
  %215 = add nsw i32 %204, %214
  %216 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %217 = getelementptr inbounds %struct.LodePNGColorMode, ptr %216, i32 0, i32 2
  %218 = load ptr, ptr %217, align 8, !tbaa !33
  %219 = load i32, ptr %21, align 4, !tbaa !9
  %220 = add i32 %219, 3
  %221 = zext i32 %220 to i64
  %222 = getelementptr inbounds i8, ptr %218, i64 %221
  %223 = load i8, ptr %222, align 1, !tbaa !28
  %224 = zext i8 %223 to i32
  %225 = shl i32 %224, 24
  %226 = add nsw i32 %215, %225
  store i32 %226, ptr %22, align 4, !tbaa !9
  %227 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 6
  invoke void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %227, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %228 unwind label %232

228:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %229

229:                                              ; preds = %228
  %230 = load i32, ptr %21, align 4, !tbaa !9
  %231 = add i32 %230, 4
  store i32 %231, ptr %21, align 4, !tbaa !9
  br label %176, !llvm.loop !34

232:                                              ; preds = %185
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %9, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %320

236:                                              ; preds = %184
  store i8 1, ptr %12, align 1, !tbaa !24
  %237 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %238 = getelementptr inbounds %struct.LodePNGColorMode, ptr %237, i32 0, i32 0
  store i32 6, ptr %238, align 8, !tbaa !26
  br label %239

239:                                              ; preds = %236, %80
  %240 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 3
  %241 = getelementptr inbounds %struct.LodePNGInfo, ptr %240, i32 0, i32 3
  %242 = getelementptr inbounds %struct.LodePNGColorMode, ptr %241, i32 0, i32 0
  %243 = load i32, ptr %242, align 8, !tbaa !35
  %244 = icmp eq i32 %243, 2
  br i1 %244, label %257, label %245

245:                                              ; preds = %239
  %246 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 3
  %247 = getelementptr inbounds %struct.LodePNGInfo, ptr %246, i32 0, i32 3
  %248 = getelementptr inbounds %struct.LodePNGColorMode, ptr %247, i32 0, i32 0
  %249 = load i32, ptr %248, align 8, !tbaa !35
  %250 = icmp eq i32 %249, 0
  br i1 %250, label %257, label %251

251:                                              ; preds = %245
  %252 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 3
  %253 = getelementptr inbounds %struct.LodePNGInfo, ptr %252, i32 0, i32 3
  %254 = getelementptr inbounds %struct.LodePNGColorMode, ptr %253, i32 0, i32 0
  %255 = load i32, ptr %254, align 8, !tbaa !35
  %256 = icmp eq i32 %255, 4
  br i1 %256, label %257, label %260

257:                                              ; preds = %251, %245, %239
  %258 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %259 = getelementptr inbounds %struct.LodePNGColorMode, ptr %258, i32 0, i32 0
  store i32 6, ptr %259, align 8, !tbaa !26
  store i8 1, ptr %12, align 1, !tbaa !24
  br label %260

260:                                              ; preds = %257, %251
  %261 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 3
  %262 = getelementptr inbounds %struct.LodePNGInfo, ptr %261, i32 0, i32 3
  %263 = getelementptr inbounds %struct.LodePNGColorMode, ptr %262, i32 0, i32 1
  %264 = load i32, ptr %263, align 4, !tbaa !36
  %265 = icmp ne i32 %264, 8
  br i1 %265, label %266, label %269

266:                                              ; preds = %260
  %267 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 2
  %268 = getelementptr inbounds %struct.LodePNGColorMode, ptr %267, i32 0, i32 1
  store i32 8, ptr %268, align 4, !tbaa !27
  store i8 1, ptr %12, align 1, !tbaa !24
  br label %269

269:                                              ; preds = %266, %260
  %270 = load i8, ptr %12, align 1, !tbaa !24, !range !37, !noundef !38
  %271 = trunc i8 %270 to i1
  br i1 %271, label %272, label %292

272:                                              ; preds = %269
  %273 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 4
  call void @_ZNSt6vectorIhSaIhEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %273) #5
  %274 = getelementptr inbounds %struct.LodePNGState, ptr %11, i32 0, i32 0
  %275 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %274, i32 0, i32 4
  store i32 1, ptr %275, align 4, !tbaa !11
  %276 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 4
  %277 = invoke noundef i32 @_ZN7lodepng6decodeERSt6vectorIhSaIhEERjS4_RNS_5StateERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %276, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 8 dereferenceable(544) %11, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %278 unwind label %171

278:                                              ; preds = %272
  store i32 %277, ptr %8, align 4, !tbaa !9
  %279 = load i32, ptr %8, align 4, !tbaa !9
  %280 = icmp ne i32 %279, 0
  br i1 %280, label %281, label %291

281:                                              ; preds = %278
  %282 = call ptr @__cxa_allocate_exception(i64 16) #5
  %283 = load i32, ptr %8, align 4, !tbaa !9
  %284 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %283)
          to label %285 unwind label %287

285:                                              ; preds = %281
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %282, ptr noundef %284)
          to label %286 unwind label %287

286:                                              ; preds = %285
  invoke void @__cxa_throw(ptr %282, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
          to label %329 unwind label %171

287:                                              ; preds = %285, %281
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %9, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %10, align 4
  call void @__cxa_free_exception(ptr %282) #5
  br label %320

291:                                              ; preds = %278
  br label %292

292:                                              ; preds = %291, %269
  %293 = load i32, ptr %6, align 4, !tbaa !9
  %294 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 0
  store i32 %293, ptr %294, align 8, !tbaa !39
  %295 = load i32, ptr %7, align 4, !tbaa !9
  %296 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 1
  store i32 %295, ptr %296, align 4, !tbaa !57
  %297 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 3
  store i32 0, ptr %297, align 4, !tbaa !58
  %298 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 2
  store i32 0, ptr %298, align 8, !tbaa !59
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #5
  invoke void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind writable sret(%"class.std::vector.0") align 8 %23, ptr noundef nonnull align 8 dereferenceable(136) %27)
          to label %299 unwind label %311

299:                                              ; preds = %292
  call void @llvm.lifetime.start.p0(i64 48, ptr %24) #5
  %300 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %301 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  store ptr %300, ptr %301, align 8
  %302 = call ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %303 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %302, ptr %303, align 8
  %304 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %25, i32 0, i32 0
  %305 = load ptr, ptr %304, align 8
  %306 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  %307 = load ptr, ptr %306, align 8
  invoke void @_ZNSt3setIjSt4lessIjESaIjEEC2IN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr %305, ptr %307)
          to label %308 unwind label %315

308:                                              ; preds = %299
  %309 = getelementptr inbounds %"struct.sfc::Image", ptr %27, i32 0, i32 7
  %310 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %309, ptr noundef nonnull align 8 dereferenceable(48) %24) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %24) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %24) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(544) %11) #5
  call void @llvm.lifetime.end.p0(i64 544, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  ret void

311:                                              ; preds = %292
  %312 = landingpad { ptr, i32 }
          cleanup
  %313 = extractvalue { ptr, i32 } %312, 0
  store ptr %313, ptr %9, align 8
  %314 = extractvalue { ptr, i32 } %312, 1
  store i32 %314, ptr %10, align 4
  br label %319

315:                                              ; preds = %299
  %316 = landingpad { ptr, i32 }
          cleanup
  %317 = extractvalue { ptr, i32 } %316, 0
  store ptr %317, ptr %9, align 8
  %318 = extractvalue { ptr, i32 } %316, 1
  store i32 %318, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 48, ptr %24) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  br label %319

319:                                              ; preds = %315, %311
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  br label %320

320:                                              ; preds = %319, %287, %232, %171, %115
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %321

321:                                              ; preds = %320, %76, %72
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(544) %11) #5
  br label %322

322:                                              ; preds = %321, %68
  call void @llvm.lifetime.end.p0(i64 544, ptr %11) #5
  br label %323

323:                                              ; preds = %322, %47, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %31) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #5
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #5
  br label %324

324:                                              ; preds = %323
  %325 = load ptr, ptr %9, align 8
  %326 = load i32, ptr %10, align 4
  %327 = insertvalue { ptr, i32 } poison, ptr %325, 0
  %328 = insertvalue { ptr, i32 } %327, i32 %326, 1
  resume { ptr, i32 } %328

329:                                              ; preds = %286, %67, %42
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIjSt4lessIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

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

declare noundef i32 @_ZN7lodepng9load_fileERSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #3

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64)

declare noundef ptr @_Z18lodepng_error_textj(i32 noundef) #3

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(544)) unnamed_addr #3

declare noundef i32 @_ZN7lodepng6decodeERSt6vectorIhSaIhEERjS4_RNS_5StateERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(544), ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(136)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3setIjSt4lessIjESaIjEEC2IN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48), ptr, ptr) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(544)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 52}
!12 = !{!"_ZTS12LodePNGState", !13, i64 0, !16, i64 80, !19, i64 168, !21, i64 208, !10, i64 536}
!13 = !{!"_ZTS22LodePNGDecoderSettings", !14, i64 0, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !15, i64 64, !15, i64 72}
!14 = !{!"_ZTS25LodePNGDecompressSettings", !10, i64 0, !10, i64 4, !15, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTS22LodePNGEncoderSettings", !17, i64 0, !10, i64 48, !10, i64 52, !18, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80}
!17 = !{!"_ZTS23LodePNGCompressSettings", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!19 = !{!"_ZTS16LodePNGColorMode", !20, i64 0, !10, i64 4, !6, i64 8, !15, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!20 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!21 = !{!"_ZTS11LodePNGInfo", !10, i64 0, !10, i64 4, !10, i64 8, !19, i64 16, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !15, i64 72, !6, i64 80, !6, i64 88, !15, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !10, i64 136, !22, i64 140, !10, i64 164, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !10, i64 232, !6, i64 240, !6, i64 248, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !10, i64 272, !10, i64 276, !7, i64 280, !7, i64 304}
!22 = !{!"_ZTS11LodePNGTime", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!23 = !{!12, !10, i64 40}
!24 = !{!25, !25, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!12, !20, i64 168}
!27 = !{!12, !10, i64 172}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!12, !15, i64 184}
!33 = !{!12, !6, i64 176}
!34 = distinct !{!34, !30}
!35 = !{!12, !20, i64 224}
!36 = !{!12, !10, i64 228}
!37 = !{i8 0, i8 2}
!38 = !{}
!39 = !{!40, !10, i64 0}
!40 = !{!"_ZTSN3sfc5ImageE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !41, i64 16, !41, i64 40, !45, i64 64, !49, i64 88}
!41 = !{!"_ZTSSt6vectorIhSaIhEE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"_ZTSSt6vectorIjSaIjEE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{!"_ZTSSt3setIjSt4lessIjESaIjEE", !50, i64 0}
!50 = !{!"_ZTSSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE", !51, i64 0}
!51 = !{!"_ZTSNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13_Rb_tree_implIS3_Lb1EEE", !52, i64 0, !54, i64 8}
!52 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !53, i64 0}
!53 = !{!"_ZTSSt4lessIjE"}
!54 = !{!"_ZTSSt15_Rb_tree_header", !55, i64 0, !15, i64 32}
!55 = !{!"_ZTSSt18_Rb_tree_node_base", !56, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!56 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!57 = !{!40, !10, i64 4}
!58 = !{!40, !10, i64 12}
!59 = !{!40, !10, i64 8}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.lodepng::State" = type { %struct.LodePNGState }
%struct.LodePNGState = type { %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32, i64, i64 }
%struct.LodePNGDecompressSettings = type { i32, i32, i64, ptr, ptr, ptr }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::allocator" = type { i8 }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

@_ZTISt13runtime_error = external constant ptr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3sfc5ImageC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.lodepng::State", align 8
  %7 = alloca %"class.std::vector", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca %"class.std::set", align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %15 = getelementptr inbounds i8, ptr %0, i64 88
  tail call void @_ZNSt3setIjSt4lessIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %16 = invoke noundef i32 @_ZN7lodepng9load_fileERSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %17 unwind label %23

17:                                               ; preds = %2
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %27, label %18

18:                                               ; preds = %17
  %19 = call ptr @__cxa_allocate_exception(i64 16) #6
  %20 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %16)
          to label %21 unwind label %25

21:                                               ; preds = %18
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %20)
          to label %22 unwind label %25

22:                                               ; preds = %21
  invoke void @__cxa_throw(ptr nonnull %19, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
          to label %166 unwind label %23

23:                                               ; preds = %22, %2
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %165

25:                                               ; preds = %21, %18
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %19) #6
  br label %165

27:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 544, ptr nonnull %6) #6
  invoke void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(544) %6)
          to label %28 unwind label %38

28:                                               ; preds = %27
  %29 = getelementptr inbounds i8, ptr %6, i64 52
  store i32 0, ptr %29, align 4, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %6, i64 40
  store i32 1, ptr %30, align 8, !tbaa !21
  %31 = invoke noundef i32 @_ZN7lodepng6decodeERSt6vectorIhSaIhEERjS4_RNS_5StateERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(544) %6, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %32 unwind label %40

32:                                               ; preds = %28
  %.not62 = icmp eq i32 %31, 0
  br i1 %.not62, label %44, label %33

33:                                               ; preds = %32
  %34 = call ptr @__cxa_allocate_exception(i64 16) #6
  %35 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %31)
          to label %36 unwind label %42

36:                                               ; preds = %33
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef %35)
          to label %37 unwind label %42

37:                                               ; preds = %36
  invoke void @__cxa_throw(ptr nonnull %34, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
          to label %166 unwind label %40

38:                                               ; preds = %27
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %164

40:                                               ; preds = %37, %28
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %163

42:                                               ; preds = %36, %33
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %34) #6
  br label %163

44:                                               ; preds = %32
  %45 = getelementptr inbounds i8, ptr %6, i64 168
  %46 = load i32, ptr %45, align 8, !tbaa !22
  %47 = icmp eq i32 %46, 3
  br i1 %47, label %48, label %128

48:                                               ; preds = %44
  %49 = getelementptr inbounds i8, ptr %6, i64 172
  %50 = load i32, ptr %49, align 4
  %51 = add i32 %50, -1
  %or.cond = icmp ult i32 %51, 7
  br i1 %or.cond, label %52, label %86

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  %53 = load i32, ptr %4, align 4, !tbaa !23
  %54 = load i32, ptr %5, align 4, !tbaa !23
  %55 = mul i32 %54, %53
  %56 = zext i32 %55 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %56, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %57 unwind label %65

57:                                               ; preds = %52
  %58 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  %59 = load i32, ptr %49, align 4, !tbaa !24
  %umax = call i32 @llvm.umax.i32(i32 %59, i32 1)
  %xtraiter = and i32 %umax, 7
  %60 = icmp ult i32 %59, 8
  br i1 %60, label %.preheader.unr-lcssa, label %.new

.new:                                             ; preds = %57
  %unroll_iter = and i32 %umax, -8
  br label %67

.preheader.unr-lcssa:                             ; preds = %67, %57
  %.05280.unr = phi i8 [ 0, %57 ], [ -1, %67 ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader.unr-lcssa, %.epil.preheader
  %.05280.epil = phi i8 [ %62, %.epil.preheader ], [ %.05280.unr, %.preheader.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader.unr-lcssa ]
  %61 = shl i8 %.05280.epil, 1
  %62 = or disjoint i8 %61, 1
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader, label %.epil.preheader, !llvm.loop !25

.preheader:                                       ; preds = %.epil.preheader, %.preheader.unr-lcssa
  %.lcssa = phi i8 [ -1, %.preheader.unr-lcssa ], [ %62, %.epil.preheader ]
  %63 = udiv i32 8, %59
  %64 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %.not85 = icmp eq i64 %64, 0
  br i1 %.not85, label %.loopexit, label %.lr.ph

65:                                               ; preds = %52
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %163

67:                                               ; preds = %67, %.new
  %niter = phi i32 [ 0, %.new ], [ %niter.next.7, %67 ]
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader.unr-lcssa, label %67, !llvm.loop !27

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %68 = phi i64 [ %83, %.lr.ph ], [ 0, %.preheader ]
  %.05082 = phi i32 [ %82, %.lr.ph ], [ 0, %.preheader ]
  %69 = mul i32 %.05082, %59
  %70 = and i32 %69, 7
  %71 = add i32 %59, %70
  %72 = sub i32 8, %71
  %73 = udiv i32 %.05082, %63
  %74 = zext i32 %73 to i64
  %75 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %74) #6
  %76 = load i8, ptr %75, align 1, !tbaa !29
  %77 = zext i8 %76 to i32
  %78 = lshr i32 %77, %72
  %79 = trunc nuw i32 %78 to i8
  %80 = and i8 %.lcssa, %79
  %81 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %68) #6
  store i8 %80, ptr %81, align 1, !tbaa !29
  %82 = add i32 %.05082, 1
  %83 = zext i32 %82 to i64
  %84 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  %85 = icmp ugt i64 %84, %83
  br i1 %85, label %.lr.ph, label %.loopexit, !llvm.loop !30

86:                                               ; preds = %48
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %.loopexit unwind label %88

88:                                               ; preds = %144, %.thread76, %86
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %163

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %86
  %90 = getelementptr inbounds i8, ptr %6, i64 184
  %91 = load i64, ptr %90, align 8, !tbaa !31
  %.mask = and i64 %91, 4611686018427387903
  %.not86 = icmp eq i64 %.mask, 0
  br i1 %.not86, label %._crit_edge, label %.lr.ph84

.lr.ph84:                                         ; preds = %.loopexit
  %92 = getelementptr inbounds i8, ptr %6, i64 176
  br label %93

._crit_edge:                                      ; preds = %120, %.loopexit
  store i32 6, ptr %45, align 8, !tbaa !22
  br label %128

93:                                               ; preds = %.lr.ph84, %120
  %94 = phi i64 [ 0, %.lr.ph84 ], [ %122, %120 ]
  %.04483 = phi i32 [ 0, %.lr.ph84 ], [ %121, %120 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %95 = load ptr, ptr %92, align 8, !tbaa !32
  %96 = getelementptr inbounds i8, ptr %95, i64 %94
  %97 = load i8, ptr %96, align 1, !tbaa !29
  %98 = zext i8 %97 to i32
  %99 = or disjoint i32 %.04483, 1
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %95, i64 %100
  %102 = load i8, ptr %101, align 1, !tbaa !29
  %103 = zext i8 %102 to i32
  %104 = shl nuw nsw i32 %103, 8
  %105 = or disjoint i32 %104, %98
  %106 = or disjoint i32 %.04483, 2
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %95, i64 %107
  %109 = load i8, ptr %108, align 1, !tbaa !29
  %110 = zext i8 %109 to i32
  %111 = shl nuw nsw i32 %110, 16
  %112 = or disjoint i32 %105, %111
  %113 = or disjoint i32 %.04483, 3
  %114 = zext i32 %113 to i64
  %115 = getelementptr inbounds i8, ptr %95, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !29
  %117 = zext i8 %116 to i32
  %118 = shl nuw i32 %117, 24
  %119 = or disjoint i32 %112, %118
  store i32 %119, ptr %9, align 4, !tbaa !23
  invoke void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %120 unwind label %126

120:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  %121 = add i32 %.04483, 4
  %122 = zext i32 %121 to i64
  %123 = load i64, ptr %90, align 8, !tbaa !31
  %124 = shl i64 %123, 2
  %125 = icmp ugt i64 %124, %122
  br i1 %125, label %93, label %._crit_edge, !llvm.loop !33

126:                                              ; preds = %93
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %163

128:                                              ; preds = %._crit_edge, %44
  %129 = getelementptr inbounds i8, ptr %6, i64 224
  %130 = load i32, ptr %129, align 8
  switch i32 %130, label %131 [
    i32 4, label %.thread
    i32 2, label %.thread
    i32 0, label %.thread
  ]

131:                                              ; preds = %128
  %132 = getelementptr inbounds i8, ptr %6, i64 228
  %133 = load i32, ptr %132, align 4, !tbaa !34
  %.not63 = icmp eq i32 %133, 8
  br i1 %.not63, label %137, label %.critedge

.thread:                                          ; preds = %128, %128, %128
  store i32 6, ptr %45, align 8, !tbaa !22
  %134 = getelementptr inbounds i8, ptr %6, i64 228
  %135 = load i32, ptr %134, align 4, !tbaa !34
  %.not6374 = icmp eq i32 %135, 8
  br i1 %.not6374, label %.thread76, label %.critedge

.critedge:                                        ; preds = %.thread, %131
  %136 = getelementptr inbounds i8, ptr %6, i64 172
  store i32 8, ptr %136, align 4, !tbaa !24
  br label %.thread76

137:                                              ; preds = %131
  br i1 %47, label %.thread76, label %147

.thread76:                                        ; preds = %.thread, %.critedge, %137
  call void @_ZNSt6vectorIhSaIhEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  store i32 1, ptr %29, align 4, !tbaa !5
  %138 = invoke noundef i32 @_ZN7lodepng6decodeERSt6vectorIhSaIhEERjS4_RNS_5StateERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(544) %6, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %139 unwind label %88

139:                                              ; preds = %.thread76
  %.not64 = icmp eq i32 %138, 0
  br i1 %.not64, label %147, label %140

140:                                              ; preds = %139
  %141 = call ptr @__cxa_allocate_exception(i64 16) #6
  %142 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %138)
          to label %143 unwind label %145

143:                                              ; preds = %140
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %141, ptr noundef %142)
          to label %144 unwind label %145

144:                                              ; preds = %143
  invoke void @__cxa_throw(ptr nonnull %141, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
          to label %166 unwind label %88

145:                                              ; preds = %143, %140
  %146 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %141) #6
  br label %163

147:                                              ; preds = %139, %137
  %148 = load i32, ptr %4, align 4, !tbaa !23
  store i32 %148, ptr %0, align 8, !tbaa !35
  %149 = load i32, ptr %5, align 4, !tbaa !23
  %150 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %149, ptr %150, align 4, !tbaa !53
  %151 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 0, ptr %151, align 4, !tbaa !54
  %152 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %152, align 8, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #6
  invoke void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.0") align 8 %10, ptr noundef nonnull align 8 dereferenceable(136) %0)
          to label %153 unwind label %158

153:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #6
  %154 = call ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %155 = call ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  invoke void @_ZNSt3setIjSt4lessIjESaIjEEC2IN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr %154, ptr %155)
          to label %156 unwind label %160

156:                                              ; preds = %153
  %157 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(544) %6) #6
  call void @llvm.lifetime.end.p0(i64 544, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret void

158:                                              ; preds = %147
  %159 = landingpad { ptr, i32 }
          cleanup
  br label %162

160:                                              ; preds = %153
  %161 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  br label %162

162:                                              ; preds = %160, %158
  %.pn = phi { ptr, i32 } [ %161, %160 ], [ %159, %158 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #6
  br label %163

163:                                              ; preds = %65, %88, %126, %145, %162, %42, %40
  %.pn68 = phi { ptr, i32 } [ %41, %40 ], [ %43, %42 ], [ %127, %126 ], [ %89, %88 ], [ %146, %145 ], [ %.pn, %162 ], [ %66, %65 ]
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(544) %6) #6
  br label %164

164:                                              ; preds = %163, %38
  %.pn68.pn = phi { ptr, i32 } [ %.pn68, %163 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 544, ptr nonnull %6) #6
  br label %165

165:                                              ; preds = %164, %25, %23
  %.pn71 = phi { ptr, i32 } [ %24, %23 ], [ %26, %25 ], [ %.pn68.pn, %164 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  call void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #6
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  resume { ptr, i32 } %.pn71

166:                                              ; preds = %144, %37, %22
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIjSt4lessIjESaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

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

declare noundef i32 @_ZN7lodepng9load_fileERSt6vectorIhSaIhEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare noundef ptr @_Z18lodepng_error_textj(i32 noundef) local_unnamed_addr #3

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(544)) unnamed_addr #3

declare noundef i32 @_ZN7lodepng6decodeERSt6vectorIhSaIhEERjS4_RNS_5StateERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(544), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIhSaIhEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backERKj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3sfc5Image9rgba_dataEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8, ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIjSaIjEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIjSaIjEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt3setIjSt4lessIjESaIjEEC2IN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjS2_EEEEET_SB_(ptr noundef nonnull align 8 dereferenceable(48), ptr, ptr) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3setIjSt4lessIjESaIjEEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIjSt4lessIjESaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(544)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #5

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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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, !9, i64 52}
!6 = !{!"_ZTS12LodePNGState", !7, i64 0, !14, i64 80, !17, i64 168, !19, i64 208, !9, i64 536}
!7 = !{!"_ZTS22LodePNGDecoderSettings", !8, i64 0, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52, !9, i64 56, !9, i64 60, !12, i64 64, !12, i64 72}
!8 = !{!"_ZTS25LodePNGDecompressSettings", !9, i64 0, !9, i64 4, !12, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"any pointer", !10, i64 0}
!14 = !{!"_ZTS22LodePNGEncoderSettings", !15, i64 0, !9, i64 48, !9, i64 52, !16, i64 56, !13, i64 64, !9, i64 72, !9, i64 76, !9, i64 80}
!15 = !{!"_ZTS23LodePNGCompressSettings", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !13, i64 24, !13, i64 32, !13, i64 40}
!16 = !{!"_ZTS21LodePNGFilterStrategy", !10, i64 0}
!17 = !{!"_ZTS16LodePNGColorMode", !18, i64 0, !9, i64 4, !13, i64 8, !12, i64 16, !9, i64 24, !9, i64 28, !9, i64 32, !9, i64 36}
!18 = !{!"_ZTS16LodePNGColorType", !10, i64 0}
!19 = !{!"_ZTS11LodePNGInfo", !9, i64 0, !9, i64 4, !9, i64 8, !17, i64 16, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68, !12, i64 72, !13, i64 80, !13, i64 88, !12, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !9, i64 136, !20, i64 140, !9, i64 164, !9, i64 168, !9, i64 172, !9, i64 176, !9, i64 180, !9, i64 184, !9, i64 188, !9, i64 192, !9, i64 196, !9, i64 200, !9, i64 204, !9, i64 208, !9, i64 212, !9, i64 216, !9, i64 220, !9, i64 224, !9, i64 228, !9, i64 232, !13, i64 240, !13, i64 248, !9, i64 256, !9, i64 260, !9, i64 264, !9, i64 268, !9, i64 272, !9, i64 276, !10, i64 280, !10, i64 304}
!20 = !{!"_ZTS11LodePNGTime", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
!21 = !{!6, !9, i64 40}
!22 = !{!6, !18, i64 168}
!23 = !{!9, !9, i64 0}
!24 = !{!6, !9, i64 172}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!10, !10, i64 0}
!30 = distinct !{!30, !28}
!31 = !{!6, !12, i64 184}
!32 = !{!6, !13, i64 176}
!33 = distinct !{!33, !28}
!34 = !{!6, !9, i64 228}
!35 = !{!36, !9, i64 0}
!36 = !{!"_ZTSN3sfc5ImageE", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !37, i64 16, !37, i64 40, !41, i64 64, !45, i64 88}
!37 = !{!"_ZTSSt6vectorIhSaIhEE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!41 = !{!"_ZTSSt6vectorIjSaIjEE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!45 = !{!"_ZTSSt3setIjSt4lessIjESaIjEE", !46, i64 0}
!46 = !{!"_ZTSSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE", !47, i64 0}
!47 = !{!"_ZTSNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13_Rb_tree_implIS3_Lb1EEE", !48, i64 0, !50, i64 8}
!48 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIjEE", !49, i64 0}
!49 = !{!"_ZTSSt4lessIjE"}
!50 = !{!"_ZTSSt15_Rb_tree_header", !51, i64 0, !12, i64 32}
!51 = !{!"_ZTSSt18_Rb_tree_node_base", !52, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!52 = !{!"_ZTSSt14_Rb_tree_color", !10, i64 0}
!53 = !{!36, !9, i64 4}
!54 = !{!36, !9, i64 12}
!55 = !{!36, !9, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass