; LLVM IR from venumb/ZSPACE :: cpp/depends/lodePNG/lodepng_unittest.ll (Z16createComplexPNGRSt6vectorIhSaIhEE)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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.std::allocator.0" = type { i8 }
%"class.lodepng::State" = type { %struct.LodePNGState.base, [4 x i8] }
%struct.LodePNGState.base = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }>
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32 }
%struct.LodePNGDecompressSettings = type { i32, i32, 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, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::allocator" = type { i8 }
%struct.LodePNGState = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32, [4 x i8] }>

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.167 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.174 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.175 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.176 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.179 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.180 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.183 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.184 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16assertNoPNGErrorjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508)) unnamed_addr #4

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

declare noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #4

; 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16createComplexPNGRSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(24) %0) #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator.0", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca %"class.lodepng::State", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca i1, align 1
  %23 = alloca i1, align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca i1, align 1
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca i1, align 1
  %28 = alloca i1, align 1
  %29 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 16, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 17, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = load i32, ptr %4, align 4, !tbaa !9
  %32 = mul i32 %30, %31
  %33 = zext i32 %32 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %33, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %34 unwind label %43

34:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !11
  br label %35

35:                                               ; preds = %53, %34
  %36 = load i64, ptr %9, align 8, !tbaa !11
  %37 = load i32, ptr %3, align 4, !tbaa !9
  %38 = load i32, ptr %4, align 4, !tbaa !9
  %39 = mul i32 %37, %38
  %40 = zext i32 %39 to i64
  %41 = icmp ult i64 %36, %40
  br i1 %41, label %47, label %42

42:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %56

43:                                               ; preds = %1
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %7, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  br label %296

47:                                               ; preds = %35
  %48 = load i64, ptr %9, align 8, !tbaa !11
  %49 = urem i64 %48, 256
  %50 = trunc i64 %49 to i8
  %51 = load i64, ptr %9, align 8, !tbaa !11
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %51) #6
  store i8 %50, ptr %52, align 1, !tbaa !13
  br label %53

53:                                               ; preds = %47
  %54 = load i64, ptr %9, align 8, !tbaa !11
  %55 = add i64 %54, 1
  store i64 %55, ptr %9, align 8, !tbaa !11
  br label %35, !llvm.loop !14

56:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 512, ptr %10) #6
  invoke void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508) %10)
          to label %57 unwind label %79

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %58 = getelementptr inbounds %struct.LodePNGState, ptr %10, i32 0, i32 4
  store ptr %58, ptr %11, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.LodePNGInfo, ptr %59, i32 0, i32 3
  %61 = getelementptr inbounds %struct.LodePNGColorMode, ptr %60, i32 0, i32 0
  store i32 3, ptr %61, align 8, !tbaa !16
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.LodePNGInfo, ptr %62, i32 0, i32 3
  %64 = getelementptr inbounds %struct.LodePNGColorMode, ptr %63, i32 0, i32 1
  store i32 8, ptr %64, align 4, !tbaa !21
  %65 = getelementptr inbounds %struct.LodePNGState, ptr %10, i32 0, i32 3
  %66 = getelementptr inbounds %struct.LodePNGColorMode, ptr %65, i32 0, i32 0
  store i32 3, ptr %66, align 8, !tbaa !22
  %67 = getelementptr inbounds %struct.LodePNGState, ptr %10, i32 0, i32 3
  %68 = getelementptr inbounds %struct.LodePNGColorMode, ptr %67, i32 0, i32 1
  store i32 8, ptr %68, align 4, !tbaa !29
  %69 = getelementptr inbounds %struct.LodePNGState, ptr %10, i32 0, i32 2
  %70 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %69, i32 0, i32 1
  store i32 0, ptr %70, align 8, !tbaa !30
  %71 = getelementptr inbounds %struct.LodePNGState, ptr %10, i32 0, i32 2
  %72 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %71, i32 0, i32 7
  store i32 1, ptr %72, align 8, !tbaa !31
  %73 = getelementptr inbounds %struct.LodePNGState, ptr %10, i32 0, i32 2
  %74 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %73, i32 0, i32 6
  store i32 1, ptr %74, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %107, %57
  %76 = load i64, ptr %12, align 8, !tbaa !11
  %77 = icmp ult i64 %76, 256
  br i1 %77, label %83, label %78

78:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %114

79:                                               ; preds = %56
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %7, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %8, align 4
  br label %295

83:                                               ; preds = %75
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.LodePNGInfo, ptr %84, i32 0, i32 3
  %86 = load i64, ptr %12, align 8, !tbaa !11
  %87 = trunc i64 %86 to i8
  %88 = load i64, ptr %12, align 8, !tbaa !11
  %89 = trunc i64 %88 to i8
  %90 = load i64, ptr %12, align 8, !tbaa !11
  %91 = trunc i64 %90 to i8
  %92 = load i64, ptr %12, align 8, !tbaa !11
  %93 = trunc i64 %92 to i8
  %94 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef %85, i8 noundef zeroext %87, i8 noundef zeroext %89, i8 noundef zeroext %91, i8 noundef zeroext %93)
          to label %95 unwind label %110

95:                                               ; preds = %83
  %96 = getelementptr inbounds %struct.LodePNGState, ptr %10, i32 0, i32 3
  %97 = load i64, ptr %12, align 8, !tbaa !11
  %98 = trunc i64 %97 to i8
  %99 = load i64, ptr %12, align 8, !tbaa !11
  %100 = trunc i64 %99 to i8
  %101 = load i64, ptr %12, align 8, !tbaa !11
  %102 = trunc i64 %101 to i8
  %103 = load i64, ptr %12, align 8, !tbaa !11
  %104 = trunc i64 %103 to i8
  %105 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef %96, i8 noundef zeroext %98, i8 noundef zeroext %100, i8 noundef zeroext %102, i8 noundef zeroext %104)
          to label %106 unwind label %110

106:                                              ; preds = %95
  br label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %12, align 8, !tbaa !11
  %109 = add i64 %108, 1
  store i64 %109, ptr %12, align 8, !tbaa !11
  br label %75, !llvm.loop !33

110:                                              ; preds = %95, %83
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %7, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %294

114:                                              ; preds = %78
  %115 = load ptr, ptr %11, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.LodePNGInfo, ptr %115, i32 0, i32 4
  store i32 1, ptr %116, align 8, !tbaa !34
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.LodePNGInfo, ptr %117, i32 0, i32 5
  store i32 127, ptr %118, align 4, !tbaa !35
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = invoke noundef i32 @_Z16lodepng_add_textP11LodePNGInfoPKcS2_(ptr noundef %119, ptr noundef @.str.165, ptr noundef @.str.166)
          to label %121 unwind label %228

121:                                              ; preds = %114
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = invoke noundef i32 @_Z16lodepng_add_textP11LodePNGInfoPKcS2_(ptr noundef %122, ptr noundef @.str.167, ptr noundef @.str.168)
          to label %124 unwind label %228

124:                                              ; preds = %121
  %125 = load ptr, ptr %11, align 8, !tbaa !5
  %126 = invoke noundef i32 @_Z17lodepng_add_itextP11LodePNGInfoPKcS2_S2_S2_(ptr noundef %125, ptr noundef @.str.169, ptr noundef @.str.170, ptr noundef @.str.171, ptr noundef @.str.172)
          to label %127 unwind label %228

127:                                              ; preds = %124
  %128 = load ptr, ptr %11, align 8, !tbaa !5
  %129 = invoke noundef i32 @_Z17lodepng_add_itextP11LodePNGInfoPKcS2_S2_S2_(ptr noundef %128, ptr noundef @.str.173, ptr noundef @.str.174, ptr noundef @.str.175, ptr noundef @.str.176)
          to label %130 unwind label %228

130:                                              ; preds = %127
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.LodePNGInfo, ptr %131, i32 0, i32 16
  store i32 1, ptr %132, align 8, !tbaa !36
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.LodePNGInfo, ptr %133, i32 0, i32 17
  %135 = getelementptr inbounds %struct.LodePNGTime, ptr %134, i32 0, i32 0
  store i32 2012, ptr %135, align 4, !tbaa !37
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.LodePNGInfo, ptr %136, i32 0, i32 17
  %138 = getelementptr inbounds %struct.LodePNGTime, ptr %137, i32 0, i32 1
  store i32 1, ptr %138, align 4, !tbaa !38
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.LodePNGInfo, ptr %139, i32 0, i32 17
  %141 = getelementptr inbounds %struct.LodePNGTime, ptr %140, i32 0, i32 2
  store i32 2, ptr %141, align 4, !tbaa !39
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.LodePNGInfo, ptr %142, i32 0, i32 17
  %144 = getelementptr inbounds %struct.LodePNGTime, ptr %143, i32 0, i32 3
  store i32 3, ptr %144, align 4, !tbaa !40
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.LodePNGInfo, ptr %145, i32 0, i32 17
  %147 = getelementptr inbounds %struct.LodePNGTime, ptr %146, i32 0, i32 4
  store i32 4, ptr %147, align 4, !tbaa !41
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.LodePNGInfo, ptr %148, i32 0, i32 17
  %150 = getelementptr inbounds %struct.LodePNGTime, ptr %149, i32 0, i32 5
  store i32 5, ptr %150, align 4, !tbaa !42
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.LodePNGInfo, ptr %151, i32 0, i32 18
  store i32 1, ptr %152, align 4, !tbaa !43
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.LodePNGInfo, ptr %153, i32 0, i32 19
  store i32 1, ptr %154, align 8, !tbaa !44
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.LodePNGInfo, ptr %155, i32 0, i32 20
  store i32 2, ptr %156, align 4, !tbaa !45
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.LodePNGInfo, ptr %157, i32 0, i32 21
  store i32 1, ptr %158, align 8, !tbaa !46
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.LodePNGInfo, ptr %159, i32 0, i32 39
  %161 = getelementptr inbounds [3 x ptr], ptr %160, i64 0, i64 0
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.LodePNGInfo, ptr %162, i32 0, i32 40
  %164 = getelementptr inbounds [3 x i64], ptr %163, i64 0, i64 0
  %165 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef %161, ptr noundef %164, i32 noundef 3, ptr noundef @.str.177, ptr noundef @.str.178)
          to label %166 unwind label %228

166:                                              ; preds = %130
  %167 = load ptr, ptr %11, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.LodePNGInfo, ptr %167, i32 0, i32 39
  %169 = getelementptr inbounds [3 x ptr], ptr %168, i64 0, i64 0
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.LodePNGInfo, ptr %170, i32 0, i32 40
  %172 = getelementptr inbounds [3 x i64], ptr %171, i64 0, i64 0
  %173 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef %169, ptr noundef %172, i32 noundef 3, ptr noundef @.str.177, ptr noundef @.str.179)
          to label %174 unwind label %228

174:                                              ; preds = %166
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.LodePNGInfo, ptr %175, i32 0, i32 39
  %177 = getelementptr inbounds [3 x ptr], ptr %176, i64 0, i64 1
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.LodePNGInfo, ptr %178, i32 0, i32 40
  %180 = getelementptr inbounds [3 x i64], ptr %179, i64 0, i64 1
  %181 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef %177, ptr noundef %180, i32 noundef 3, ptr noundef @.str.180, ptr noundef @.str.181)
          to label %182 unwind label %228

182:                                              ; preds = %174
  %183 = load ptr, ptr %11, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.LodePNGInfo, ptr %183, i32 0, i32 39
  %185 = getelementptr inbounds [3 x ptr], ptr %184, i64 0, i64 2
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.LodePNGInfo, ptr %186, i32 0, i32 40
  %188 = getelementptr inbounds [3 x i64], ptr %187, i64 0, i64 2
  %189 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef %185, ptr noundef %188, i32 noundef 3, ptr noundef @.str.182, ptr noundef @.str.183)
          to label %190 unwind label %228

190:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #6
  %193 = load i32, ptr %3, align 4, !tbaa !9
  %194 = load i32, ptr %4, align 4, !tbaa !9
  %195 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %191, ptr noundef %192, i32 noundef %193, i32 noundef %194, ptr noundef nonnull align 8 dereferenceable(508) %10)
          to label %196 unwind label %232

196:                                              ; preds = %190
  store i32 %195, ptr %13, align 4, !tbaa !9
  %197 = load i32, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %198 unwind label %236

198:                                              ; preds = %196
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.184)
          to label %199 unwind label %240

199:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  store i1 false, ptr %22, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %25, align 1
  store i1 false, ptr %27, align 1
  store i1 false, ptr %28, align 1
  store i1 false, ptr %29, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %200 unwind label %244

200:                                              ; preds = %199
  %201 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br i1 %201, label %202, label %204

202:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  store i1 true, ptr %22, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  store i1 true, ptr %23, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %203 unwind label %248

203:                                              ; preds = %202
  br label %207

204:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #6
  store i1 true, ptr %25, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #6
  store i1 true, ptr %27, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  store i1 true, ptr %28, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %205 unwind label %252

205:                                              ; preds = %204
  store i1 true, ptr %29, align 1
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef @.str.3, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %206 unwind label %256

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206, %203
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %208 unwind label %260

208:                                              ; preds = %207
  invoke void @_Z16assertNoPNGErrorjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef %197, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %209 unwind label %264

209:                                              ; preds = %208
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  %210 = load i1, ptr %29, align 1
  br i1 %210, label %211, label %212

211:                                              ; preds = %209
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  br label %212

212:                                              ; preds = %211, %209
  %213 = load i1, ptr %28, align 1
  br i1 %213, label %214, label %215

214:                                              ; preds = %212
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  br label %215

215:                                              ; preds = %214, %212
  %216 = load i1, ptr %27, align 1
  br i1 %216, label %217, label %218

217:                                              ; preds = %215
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  br label %218

218:                                              ; preds = %217, %215
  %219 = load i1, ptr %25, align 1
  br i1 %219, label %220, label %221

220:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  br label %221

221:                                              ; preds = %220, %218
  %222 = load i1, ptr %23, align 1
  br i1 %222, label %223, label %224

223:                                              ; preds = %221
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  br label %224

224:                                              ; preds = %223, %221
  %225 = load i1, ptr %22, align 1
  br i1 %225, label %226, label %227

226:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %227

227:                                              ; preds = %226, %224
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %10) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %10) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void

228:                                              ; preds = %182, %174, %166, %130, %127, %124, %121, %114
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %7, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %8, align 4
  br label %294

232:                                              ; preds = %190
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %7, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %8, align 4
  br label %293

236:                                              ; preds = %196
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %7, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %8, align 4
  br label %292

240:                                              ; preds = %198
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %7, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %8, align 4
  br label %291

244:                                              ; preds = %199
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %7, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %8, align 4
  br label %290

248:                                              ; preds = %202
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %7, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %8, align 4
  br label %283

252:                                              ; preds = %204
  %253 = landingpad { ptr, i32 }
          cleanup
  %254 = extractvalue { ptr, i32 } %253, 0
  store ptr %254, ptr %7, align 8
  %255 = extractvalue { ptr, i32 } %253, 1
  store i32 %255, ptr %8, align 4
  br label %273

256:                                              ; preds = %205
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %7, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %8, align 4
  br label %269

260:                                              ; preds = %207
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %7, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %8, align 4
  br label %268

264:                                              ; preds = %208
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %7, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %268

268:                                              ; preds = %264, %260
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  br label %269

269:                                              ; preds = %268, %256
  %270 = load i1, ptr %29, align 1
  br i1 %270, label %271, label %272

271:                                              ; preds = %269
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #6
  br label %272

272:                                              ; preds = %271, %269
  br label %273

273:                                              ; preds = %272, %252
  %274 = load i1, ptr %28, align 1
  br i1 %274, label %275, label %276

275:                                              ; preds = %273
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  br label %276

276:                                              ; preds = %275, %273
  %277 = load i1, ptr %27, align 1
  br i1 %277, label %278, label %279

278:                                              ; preds = %276
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #6
  br label %279

279:                                              ; preds = %278, %276
  %280 = load i1, ptr %25, align 1
  br i1 %280, label %281, label %282

281:                                              ; preds = %279
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #6
  br label %282

282:                                              ; preds = %281, %279
  br label %283

283:                                              ; preds = %282, %248
  %284 = load i1, ptr %23, align 1
  br i1 %284, label %285, label %286

285:                                              ; preds = %283
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #6
  br label %286

286:                                              ; preds = %285, %283
  %287 = load i1, ptr %22, align 1
  br i1 %287, label %288, label %289

288:                                              ; preds = %286
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  br label %289

289:                                              ; preds = %288, %286
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %290

290:                                              ; preds = %289, %244
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %291

291:                                              ; preds = %290, %240
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %292

292:                                              ; preds = %291, %236
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  br label %293

293:                                              ; preds = %292, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %294

294:                                              ; preds = %293, %228, %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %10) #6
  br label %295

295:                                              ; preds = %294, %79
  call void @llvm.lifetime.end.p0(i64 512, ptr %10) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %296

296:                                              ; preds = %295, %43
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %297

297:                                              ; preds = %296
  %298 = load ptr, ptr %7, align 8
  %299 = load i32, ptr %8, align 4
  %300 = insertvalue { ptr, i32 } poison, ptr %298, 0
  %301 = insertvalue { ptr, i32 } %300, i32 %299, 1
  resume { ptr, i32 } %301
}

declare noundef i32 @_Z16lodepng_add_textP11LodePNGInfoPKcS2_(ptr noundef, ptr noundef, ptr noundef) #4

declare noundef i32 @_Z17lodepng_add_itextP11LodePNGInfoPKcS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #4

declare noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(508)) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 "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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !19, i64 16}
!17 = !{!"_ZTS11LodePNGInfo", !10, i64 0, !10, i64 4, !10, i64 8, !18, i64 16, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !12, i64 72, !6, i64 80, !6, i64 88, !12, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !10, i64 136, !20, 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, !7, i64 264, !7, i64 288}
!18 = !{!"_ZTS16LodePNGColorMode", !19, i64 0, !10, i64 4, !6, i64 8, !12, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!19 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!20 = !{!"_ZTS11LodePNGTime", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!21 = !{!17, !10, i64 20}
!22 = !{!23, !19, i64 152}
!23 = !{!"_ZTS12LodePNGState", !24, i64 8, !26, i64 64, !18, i64 152, !17, i64 192, !10, i64 504}
!24 = !{!"_ZTS22LodePNGDecoderSettings", !25, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!25 = !{!"_ZTS25LodePNGDecompressSettings", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!26 = !{!"_ZTS22LodePNGEncoderSettings", !27, i64 0, !10, i64 48, !10, i64 52, !28, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80}
!27 = !{!"_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}
!28 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!29 = !{!23, !10, i64 156}
!30 = !{!23, !10, i64 112}
!31 = !{!23, !10, i64 144}
!32 = !{!23, !10, i64 140}
!33 = distinct !{!33, !15}
!34 = !{!17, !10, i64 56}
!35 = !{!17, !10, i64 60}
!36 = !{!17, !10, i64 136}
!37 = !{!17, !10, i64 140}
!38 = !{!17, !10, i64 144}
!39 = !{!17, !10, i64 148}
!40 = !{!17, !10, i64 152}
!41 = !{!17, !10, i64 156}
!42 = !{!17, !10, i64 160}
!43 = !{!17, !10, i64 164}
!44 = !{!17, !10, i64 168}
!45 = !{!17, !10, i64 172}
!46 = !{!17, !10, i64 176}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"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.std::allocator.0" = type { i8 }
%"class.lodepng::State" = type { %struct.LodePNGState.base, [4 x i8] }
%struct.LodePNGState.base = type <{ ptr, %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }>
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32 }
%struct.LodePNGDecompressSettings = type { i32, i32, 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, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::allocator" = type { i8 }

@.str.2 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.165 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.166 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.167 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.168 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.169 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.170 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.171 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.172 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.173 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.174 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.175 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.176 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.177 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.178 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.179 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.180 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.181 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.182 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.183 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.184 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16assertNoPNGErrorjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508)) unnamed_addr #4

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

declare noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #4

; 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16createComplexPNGRSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"class.lodepng::State", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  call void @_ZNSaIhEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  invoke void @_ZNSt6vectorIhSaIhEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 272, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %15 unwind label %17

15:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %19

16:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %4) #6
  invoke void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(508) %4)
          to label %23 unwind label %36

17:                                               ; preds = %1
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIhED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  br label %109

19:                                               ; preds = %15, %19
  %.094136 = phi i64 [ 0, %15 ], [ %22, %19 ]
  %20 = trunc i64 %.094136 to i8
  %21 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %.094136) #6
  store i8 %20, ptr %21, align 1, !tbaa !5
  %22 = add nuw nsw i64 %.094136, 1
  %exitcond.not = icmp eq i64 %22, 272
  br i1 %exitcond.not, label %16, label %19, !llvm.loop !8

23:                                               ; preds = %16
  %24 = getelementptr inbounds i8, ptr %4, i64 192
  %25 = getelementptr inbounds i8, ptr %4, i64 208
  store i32 3, ptr %25, align 8, !tbaa !10
  %26 = getelementptr inbounds i8, ptr %4, i64 212
  store i32 8, ptr %26, align 4, !tbaa !18
  %27 = getelementptr inbounds i8, ptr %4, i64 152
  store i32 3, ptr %27, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %4, i64 156
  store i32 8, ptr %28, align 4, !tbaa !26
  %29 = getelementptr inbounds i8, ptr %4, i64 112
  store i32 0, ptr %29, align 8, !tbaa !27
  %30 = getelementptr inbounds i8, ptr %4, i64 144
  store i32 1, ptr %30, align 8, !tbaa !28
  %31 = getelementptr inbounds i8, ptr %4, i64 140
  store i32 1, ptr %31, align 4, !tbaa !29
  br label %38

32:                                               ; preds = %43
  %33 = getelementptr inbounds i8, ptr %4, i64 248
  store i32 1, ptr %33, align 8, !tbaa !30
  %34 = getelementptr inbounds i8, ptr %4, i64 252
  store i32 127, ptr %34, align 4, !tbaa !31
  %35 = invoke noundef i32 @_Z16lodepng_add_textP11LodePNGInfoPKcS2_(ptr noundef nonnull %24, ptr noundef nonnull @.str.165, ptr noundef nonnull @.str.166)
          to label %47 unwind label %86

36:                                               ; preds = %16
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %108

38:                                               ; preds = %23, %43
  %.082137 = phi i64 [ 0, %23 ], [ %44, %43 ]
  %39 = trunc nuw i64 %.082137 to i8
  %40 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef nonnull %25, i8 noundef zeroext %39, i8 noundef zeroext %39, i8 noundef zeroext %39, i8 noundef zeroext %39)
          to label %41 unwind label %45

41:                                               ; preds = %38
  %42 = invoke noundef i32 @_Z19lodepng_palette_addP16LodePNGColorModehhhh(ptr noundef nonnull %27, i8 noundef zeroext %39, i8 noundef zeroext %39, i8 noundef zeroext %39, i8 noundef zeroext %39)
          to label %43 unwind label %45

43:                                               ; preds = %41
  %44 = add nuw nsw i64 %.082137, 1
  %exitcond138.not = icmp eq i64 %44, 256
  br i1 %exitcond138.not, label %32, label %38, !llvm.loop !32

45:                                               ; preds = %41, %38
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %107

47:                                               ; preds = %32
  %48 = invoke noundef i32 @_Z16lodepng_add_textP11LodePNGInfoPKcS2_(ptr noundef nonnull %24, ptr noundef nonnull @.str.167, ptr noundef nonnull @.str.168)
          to label %49 unwind label %86

49:                                               ; preds = %47
  %50 = invoke noundef i32 @_Z17lodepng_add_itextP11LodePNGInfoPKcS2_S2_S2_(ptr noundef nonnull %24, ptr noundef nonnull @.str.169, ptr noundef nonnull @.str.170, ptr noundef nonnull @.str.171, ptr noundef nonnull @.str.172)
          to label %51 unwind label %86

51:                                               ; preds = %49
  %52 = invoke noundef i32 @_Z17lodepng_add_itextP11LodePNGInfoPKcS2_S2_S2_(ptr noundef nonnull %24, ptr noundef nonnull @.str.173, ptr noundef nonnull @.str.174, ptr noundef nonnull @.str.175, ptr noundef nonnull @.str.176)
          to label %53 unwind label %86

53:                                               ; preds = %51
  %54 = getelementptr inbounds i8, ptr %4, i64 328
  store <4 x i32> <i32 1, i32 2012, i32 1, i32 2>, ptr %54, align 8, !tbaa !33
  %55 = getelementptr inbounds i8, ptr %4, i64 344
  store <4 x i32> <i32 3, i32 4, i32 5, i32 1>, ptr %55, align 8, !tbaa !33
  %56 = getelementptr inbounds i8, ptr %4, i64 360
  store i32 1, ptr %56, align 8, !tbaa !34
  %57 = getelementptr inbounds i8, ptr %4, i64 364
  store i32 2, ptr %57, align 4, !tbaa !35
  %58 = getelementptr inbounds i8, ptr %4, i64 368
  store i32 1, ptr %58, align 8, !tbaa !36
  %59 = getelementptr inbounds i8, ptr %4, i64 456
  %60 = getelementptr inbounds i8, ptr %4, i64 480
  %61 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef nonnull %59, ptr noundef nonnull %60, i32 noundef 3, ptr noundef nonnull @.str.177, ptr noundef nonnull @.str.178)
          to label %62 unwind label %86

62:                                               ; preds = %53
  %63 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef nonnull %59, ptr noundef nonnull %60, i32 noundef 3, ptr noundef nonnull @.str.177, ptr noundef nonnull @.str.179)
          to label %64 unwind label %86

64:                                               ; preds = %62
  %65 = getelementptr inbounds i8, ptr %4, i64 464
  %66 = getelementptr inbounds i8, ptr %4, i64 488
  %67 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef nonnull %65, ptr noundef nonnull %66, i32 noundef 3, ptr noundef nonnull @.str.180, ptr noundef nonnull @.str.181)
          to label %68 unwind label %86

68:                                               ; preds = %64
  %69 = getelementptr inbounds i8, ptr %4, i64 472
  %70 = getelementptr inbounds i8, ptr %4, i64 496
  %71 = invoke noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef nonnull %69, ptr noundef nonnull %70, i32 noundef 3, ptr noundef nonnull @.str.182, ptr noundef nonnull @.str.183)
          to label %72 unwind label %86

72:                                               ; preds = %68
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #6
  %74 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull %73, i32 noundef 16, i32 noundef 17, ptr noundef nonnull align 8 dereferenceable(508) %4)
          to label %75 unwind label %88

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %76 unwind label %90

76:                                               ; preds = %75
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.184)
          to label %77 unwind label %92

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %78 unwind label %94

78:                                               ; preds = %77
  %79 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %83 unwind label %.critedge114.thread

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %82 unwind label %.critedge113.thread

82:                                               ; preds = %81
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull @.str.3, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %83 unwind label %.thread

83:                                               ; preds = %82, %80
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %84 unwind label %99

84:                                               ; preds = %83
  invoke void @_Z16assertNoPNGErrorjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef %74, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %85 unwind label %101

85:                                               ; preds = %84
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br i1 %79, label %.critedge117, label %.critedge

.critedge:                                        ; preds = %85
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  br label %.critedge111

.critedge117:                                     ; preds = %85
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %.critedge111

.critedge111:                                     ; preds = %.critedge, %.critedge117
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(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 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %4) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %4) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  ret void

86:                                               ; preds = %68, %64, %62, %53, %51, %49, %47, %32
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %107

88:                                               ; preds = %72
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %107

90:                                               ; preds = %75
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %106

92:                                               ; preds = %76
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %105

94:                                               ; preds = %77
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %104

.critedge114.thread:                              ; preds = %80
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %.critedge114

.critedge113.thread:                              ; preds = %81
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  br label %.critedge116

.thread:                                          ; preds = %82
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %.critedge113

99:                                               ; preds = %83
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %103

101:                                              ; preds = %84
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %103

103:                                              ; preds = %99, %101
  %.pn = phi { ptr, i32 } [ %102, %101 ], [ %100, %99 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  br i1 %79, label %.critedge114, label %.critedge113

.critedge113:                                     ; preds = %103, %.thread
  %.pn.pn121 = phi { ptr, i32 } [ %98, %.thread ], [ %.pn, %103 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  br label %.critedge116

.critedge114:                                     ; preds = %103, %.critedge114.thread
  %.pn.pn.pn.pn133 = phi { ptr, i32 } [ %96, %.critedge114.thread ], [ %.pn, %103 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  br label %.critedge116

.critedge116:                                     ; preds = %.critedge113, %.critedge113.thread, %.critedge114
  %.pn.pn.pn.pn132 = phi { ptr, i32 } [ %.pn.pn.pn.pn133, %.critedge114 ], [ %.pn.pn121, %.critedge113 ], [ %97, %.critedge113.thread ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %104

104:                                              ; preds = %.critedge116, %94
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn132, %.critedge116 ], [ %95, %94 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %105

105:                                              ; preds = %104, %92
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %104 ], [ %93, %92 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %106

106:                                              ; preds = %105, %90
  %.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn.pn, %105 ], [ %91, %90 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(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 32, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %107

107:                                              ; preds = %88, %106, %86, %45
  %.pn103 = phi { ptr, i32 } [ %46, %45 ], [ %87, %86 ], [ %.pn.pn.pn.pn.pn.pn.pn, %106 ], [ %89, %88 ]
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(508) %4) #6
  br label %108

108:                                              ; preds = %107, %36
  %.pn103.pn = phi { ptr, i32 } [ %.pn103, %107 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %4) #6
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  br label %109

109:                                              ; preds = %108, %17
  %.pn103.pn.pn = phi { ptr, i32 } [ %.pn103.pn, %108 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn103.pn.pn
}

declare noundef i32 @_Z16lodepng_add_textP11LodePNGInfoPKcS2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare noundef i32 @_Z17lodepng_add_itextP11LodePNGInfoPKcS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare noundef i32 @_Z20lodepng_chunk_createPPhPmjPKcPKh(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEEPKhjjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(508)) local_unnamed_addr #4

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 "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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !14, i64 16}
!11 = !{!"_ZTS11LodePNGInfo", !12, i64 0, !12, i64 4, !12, i64 8, !13, i64 16, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !16, i64 72, !15, i64 80, !15, i64 88, !16, i64 96, !15, i64 104, !15, i64 112, !15, i64 120, !15, i64 128, !12, i64 136, !17, i64 140, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !12, i64 212, !12, i64 216, !12, i64 220, !12, i64 224, !12, i64 228, !12, i64 232, !15, i64 240, !15, i64 248, !12, i64 256, !6, i64 264, !6, i64 288}
!12 = !{!"int", !6, i64 0}
!13 = !{!"_ZTS16LodePNGColorMode", !14, i64 0, !12, i64 4, !15, i64 8, !16, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!14 = !{!"_ZTS16LodePNGColorType", !6, i64 0}
!15 = !{!"any pointer", !6, i64 0}
!16 = !{!"long", !6, i64 0}
!17 = !{!"_ZTS11LodePNGTime", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!18 = !{!11, !12, i64 20}
!19 = !{!20, !14, i64 152}
!20 = !{!"_ZTS12LodePNGState", !21, i64 8, !23, i64 64, !13, i64 152, !11, i64 192, !12, i64 504}
!21 = !{!"_ZTS22LodePNGDecoderSettings", !22, i64 0, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52}
!22 = !{!"_ZTS25LodePNGDecompressSettings", !12, i64 0, !12, i64 4, !15, i64 8, !15, i64 16, !15, i64 24}
!23 = !{!"_ZTS22LodePNGEncoderSettings", !24, i64 0, !12, i64 48, !12, i64 52, !25, i64 56, !15, i64 64, !12, i64 72, !12, i64 76, !12, i64 80}
!24 = !{!"_ZTS23LodePNGCompressSettings", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !15, i64 24, !15, i64 32, !15, i64 40}
!25 = !{!"_ZTS21LodePNGFilterStrategy", !6, i64 0}
!26 = !{!20, !12, i64 156}
!27 = !{!20, !12, i64 112}
!28 = !{!20, !12, i64 144}
!29 = !{!20, !12, i64 140}
!30 = !{!11, !12, i64 56}
!31 = !{!11, !12, i64 60}
!32 = distinct !{!32, !9}
!33 = !{!12, !12, i64 0}
!34 = !{!11, !12, i64 168}
!35 = !{!11, !12, i64 172}
!36 = !{!11, !12, i64 176}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass