; LLVM IR from JayXon/Leanify :: lib/zopflipng (zopflipng_lib)

; 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.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, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = 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 }
%struct.LodePNGColorStats = type { i32, i32, i16, i16, i16, i32, i32, [1024 x i8], i32, i64, i32, i32 }
%struct.ZopfliPNGOptions = type { i8, i8, i8, %"class.std::vector", i8, %"class.std::vector.0", i8, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl" }
%"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl" = type { %"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ZopfliPNGFilterStrategy, std::allocator<ZopfliPNGFilterStrategy>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z16CustomPNGDeflatePPhPmPKhmPK23LodePNGCompressSettings(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #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: mustprogress uwtable
define dso_local noundef i32 @_Z11TryOptimizeRKSt6vectorIhSaIhEEjjRKN7lodepng5StateEbbS3_23ZopfliPNGFilterStrategybiPK16ZopfliPNGOptionsPS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(528) %3, i1 noundef zeroext %4, i1 noundef zeroext %5, ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %7, i1 noundef zeroext %8, i32 noundef %9, ptr noundef %10, ptr noundef %11) #0 personality ptr @__gxx_personality_v0 {
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i8, align 1
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.lodepng::State", align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::vector.8", align 8
  %31 = alloca i32, align 4
  %32 = alloca %struct.LodePNGInfo, align 8
  %33 = alloca %struct.LodePNGColorStats, align 8
  %34 = alloca %"class.std::vector.8", align 8
  store ptr %0, ptr %14, align 8, !tbaa !5
  store i32 %1, ptr %15, align 4, !tbaa !9
  store i32 %2, ptr %16, align 4, !tbaa !9
  store ptr %3, ptr %17, align 8, !tbaa !5
  %35 = zext i1 %4 to i8
  store i8 %35, ptr %18, align 1, !tbaa !11
  %36 = zext i1 %5 to i8
  store i8 %36, ptr %19, align 1, !tbaa !11
  store ptr %6, ptr %20, align 8, !tbaa !5
  store i32 %7, ptr %21, align 4, !tbaa !13
  %37 = zext i1 %8 to i8
  store i8 %37, ptr %22, align 1, !tbaa !11
  store i32 %9, ptr %23, align 4, !tbaa !9
  store ptr %10, ptr %24, align 8, !tbaa !5
  store ptr %11, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  store i32 0, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 528, ptr %27) #5
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(528) %27)
  %38 = load i32, ptr %23, align 4, !tbaa !9
  %39 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %40 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %struct.LodePNGCompressSettings, ptr %40, i32 0, i32 2
  store i32 %38, ptr %41, align 8, !tbaa !15
  %42 = load i8, ptr %22, align 1, !tbaa !11, !range !27, !noundef !28
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %57

44:                                               ; preds = %12
  %45 = load ptr, ptr %24, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ZopfliPNGOptions, ptr %45, i32 0, i32 6
  %47 = load i8, ptr %46, align 8, !tbaa !29, !range !27, !noundef !28
  %48 = trunc i8 %47 to i1
  br i1 %48, label %49, label %57

49:                                               ; preds = %44
  %50 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %51 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %struct.LodePNGCompressSettings, ptr %51, i32 0, i32 7
  store ptr @_Z16CustomPNGDeflatePPhPmPKhmPK23LodePNGCompressSettings, ptr %52, align 8, !tbaa !39
  %53 = load ptr, ptr %24, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %55 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %54, i32 0, i32 0
  %56 = getelementptr inbounds %struct.LodePNGCompressSettings, ptr %55, i32 0, i32 8
  store ptr %53, ptr %56, align 8, !tbaa !40
  br label %57

57:                                               ; preds = %49, %44, %12
  %58 = load i8, ptr %19, align 1, !tbaa !11, !range !27, !noundef !28
  %59 = trunc i8 %58 to i1
  br i1 %59, label %60, label %74

60:                                               ; preds = %57
  %61 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %62 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %61, i32 0, i32 1
  store i32 0, ptr %62, align 8, !tbaa !41
  %63 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %64 = getelementptr inbounds %struct.LodePNGInfo, ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %17, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.LodePNGState, ptr %65, i32 0, i32 3
  %67 = getelementptr inbounds %struct.LodePNGInfo, ptr %66, i32 0, i32 3
  %68 = invoke noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef %64, ptr noundef %67)
          to label %69 unwind label %70

69:                                               ; preds = %60
  br label %74

70:                                               ; preds = %81, %60
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %28, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %29, align 4
  br label %317

74:                                               ; preds = %69, %57
  %75 = load ptr, ptr %17, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.LodePNGState, ptr %75, i32 0, i32 3
  %77 = getelementptr inbounds %struct.LodePNGInfo, ptr %76, i32 0, i32 3
  %78 = getelementptr inbounds %struct.LodePNGColorMode, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 8, !tbaa !42
  %80 = icmp eq i32 %79, 3
  br i1 %80, label %81, label %92

81:                                               ; preds = %74
  %82 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 2
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.LodePNGState, ptr %83, i32 0, i32 3
  %85 = getelementptr inbounds %struct.LodePNGInfo, ptr %84, i32 0, i32 3
  %86 = invoke noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef %82, ptr noundef %85)
          to label %87 unwind label %70

87:                                               ; preds = %81
  %88 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 2
  %89 = getelementptr inbounds %struct.LodePNGColorMode, ptr %88, i32 0, i32 0
  store i32 6, ptr %89, align 8, !tbaa !43
  %90 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 2
  %91 = getelementptr inbounds %struct.LodePNGColorMode, ptr %90, i32 0, i32 1
  store i32 8, ptr %91, align 4, !tbaa !44
  br label %92

92:                                               ; preds = %87, %74
  %93 = load i8, ptr %18, align 1, !tbaa !11, !range !27, !noundef !28
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %98

95:                                               ; preds = %92
  %96 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 2
  %97 = getelementptr inbounds %struct.LodePNGColorMode, ptr %96, i32 0, i32 1
  store i32 16, ptr %97, align 4, !tbaa !44
  br label %98

98:                                               ; preds = %95, %92
  %99 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %100 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %99, i32 0, i32 2
  store i32 0, ptr %100, align 4, !tbaa !45
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %101 = load i32, ptr %21, align 4, !tbaa !13
  switch i32 %101, label %145 [
    i32 0, label %102
    i32 5, label %105
    i32 6, label %108
    i32 8, label %111
    i32 1, label %114
    i32 2, label %117
    i32 3, label %120
    i32 4, label %123
    i32 7, label %126
  ]

102:                                              ; preds = %98
  %103 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %104 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %103, i32 0, i32 3
  store i32 0, ptr %104, align 8, !tbaa !46
  br label %146

105:                                              ; preds = %98
  %106 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %107 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %106, i32 0, i32 3
  store i32 5, ptr %107, align 8, !tbaa !46
  br label %146

108:                                              ; preds = %98
  %109 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %110 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %109, i32 0, i32 3
  store i32 6, ptr %110, align 8, !tbaa !46
  br label %146

111:                                              ; preds = %98
  %112 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %113 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %112, i32 0, i32 3
  store i32 7, ptr %113, align 8, !tbaa !46
  br label %146

114:                                              ; preds = %98
  %115 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %116 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %115, i32 0, i32 3
  store i32 1, ptr %116, align 8, !tbaa !46
  br label %146

117:                                              ; preds = %98
  %118 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %119 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %118, i32 0, i32 3
  store i32 2, ptr %119, align 8, !tbaa !46
  br label %146

120:                                              ; preds = %98
  %121 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %122 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %121, i32 0, i32 3
  store i32 3, ptr %122, align 8, !tbaa !46
  br label %146

123:                                              ; preds = %98
  %124 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %125 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %124, i32 0, i32 3
  store i32 4, ptr %125, align 8, !tbaa !46
  br label %146

126:                                              ; preds = %98
  %127 = load ptr, ptr %20, align 8, !tbaa !5
  %128 = invoke noundef i32 @_ZN7lodepng14getFilterTypesERSt6vectorIhSaIhEERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %30, ptr noundef nonnull align 8 dereferenceable(24) %127)
          to label %129 unwind label %135

129:                                              ; preds = %126
  %130 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  %131 = load i32, ptr %16, align 4, !tbaa !9
  %132 = zext i32 %131 to i64
  %133 = icmp ne i64 %130, %132
  br i1 %133, label %134, label %139

134:                                              ; preds = %129
  store i32 1, ptr %13, align 4
  store i32 1, ptr %31, align 4
  br label %314

135:                                              ; preds = %309, %305, %146, %126
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %28, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %29, align 4
  br label %316

139:                                              ; preds = %129
  %140 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %141 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %140, i32 0, i32 3
  store i32 8, ptr %141, align 8, !tbaa !46
  %142 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 0) #5
  %143 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %144 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %143, i32 0, i32 4
  store ptr %142, ptr %144, align 8, !tbaa !47
  br label %146

145:                                              ; preds = %98
  br label %146

146:                                              ; preds = %145, %139, %123, %120, %117, %114, %111, %108, %105, %102
  %147 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %148 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %147, i32 0, i32 6
  store i32 0, ptr %148, align 4, !tbaa !48
  %149 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %150 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %149, i32 0, i32 7
  store i32 1, ptr %150, align 8, !tbaa !49
  %151 = load ptr, ptr %25, align 8, !tbaa !5
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = load i32, ptr %15, align 4, !tbaa !9
  %154 = load i32, ptr %16, align 4, !tbaa !9
  %155 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %151, ptr noundef nonnull align 8 dereferenceable(24) %152, i32 noundef %153, i32 noundef %154, ptr noundef nonnull align 8 dereferenceable(528) %27)
          to label %156 unwind label %135

156:                                              ; preds = %146
  store i32 %155, ptr %26, align 4, !tbaa !9
  %157 = load i32, ptr %26, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %302, label %159

159:                                              ; preds = %156
  %160 = load ptr, ptr %25, align 8, !tbaa !5
  %161 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %160) #5
  %162 = icmp ult i64 %161, 4096
  br i1 %162, label %163, label %302

163:                                              ; preds = %159
  %164 = load i8, ptr %19, align 1, !tbaa !11, !range !27, !noundef !28
  %165 = trunc i8 %164 to i1
  br i1 %165, label %302, label %166

166:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 312, ptr %32) #5
  %167 = load ptr, ptr %25, align 8, !tbaa !5
  invoke void @_ZN7lodepng16getPNGHeaderInfoERKSt6vectorIhSaIhEE(ptr dead_on_unwind writable sret(%struct.LodePNGInfo) align 8 %32, ptr noundef nonnull align 8 dereferenceable(24) %167)
          to label %168 unwind label %192

168:                                              ; preds = %166
  %169 = getelementptr inbounds %struct.LodePNGInfo, ptr %32, i32 0, i32 3
  %170 = getelementptr inbounds %struct.LodePNGColorMode, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %170, align 8, !tbaa !50
  %172 = icmp eq i32 %171, 3
  call void @llvm.lifetime.end.p0(i64 312, ptr %32) #5
  br i1 %172, label %173, label %301

173:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 1072, ptr %33) #5
  invoke void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef %33)
          to label %174 unwind label %196

174:                                              ; preds = %173
  %175 = load ptr, ptr %14, align 8, !tbaa !5
  %176 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %175, i64 noundef 0) #5
  %177 = load i32, ptr %15, align 4, !tbaa !9
  %178 = load i32, ptr %16, align 4, !tbaa !9
  %179 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 2
  %180 = invoke noundef i32 @_Z27lodepng_compute_color_statsP17LodePNGColorStatsPKhjjPK16LodePNGColorMode(ptr noundef %33, ptr noundef %176, i32 noundef %177, i32 noundef %178, ptr noundef %179)
          to label %181 unwind label %196

181:                                              ; preds = %174
  %182 = load i32, ptr %15, align 4, !tbaa !9
  %183 = load i32, ptr %16, align 4, !tbaa !9
  %184 = mul i32 %182, %183
  %185 = icmp ule i32 %184, 16
  br i1 %185, label %186, label %200

186:                                              ; preds = %181
  %187 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 1
  %188 = load i32, ptr %187, align 4, !tbaa !51
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %200

190:                                              ; preds = %186
  %191 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 5
  store i32 1, ptr %191, align 8, !tbaa !54
  br label %200

192:                                              ; preds = %166
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %28, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 312, ptr %32) #5
  br label %316

196:                                              ; preds = %174, %173
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %28, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %29, align 4
  br label %300

200:                                              ; preds = %190, %186, %181
  %201 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 1
  %202 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %201, i32 0, i32 1
  store i32 0, ptr %202, align 8, !tbaa !41
  %203 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 5
  %204 = load i32, ptr %203, align 8, !tbaa !54
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %212

206:                                              ; preds = %200
  %207 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 0
  %208 = load i32, ptr %207, align 8, !tbaa !55
  %209 = icmp ne i32 %208, 0
  %210 = zext i1 %209 to i64
  %211 = select i1 %209, i32 6, i32 4
  br label %218

212:                                              ; preds = %200
  %213 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 0
  %214 = load i32, ptr %213, align 8, !tbaa !55
  %215 = icmp ne i32 %214, 0
  %216 = zext i1 %215 to i64
  %217 = select i1 %215, i32 2, i32 0
  br label %218

218:                                              ; preds = %212, %206
  %219 = phi i32 [ %211, %206 ], [ %217, %212 ]
  %220 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %221 = getelementptr inbounds %struct.LodePNGInfo, ptr %220, i32 0, i32 3
  %222 = getelementptr inbounds %struct.LodePNGColorMode, ptr %221, i32 0, i32 0
  store i32 %219, ptr %222, align 8, !tbaa !42
  %223 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 5
  %224 = load i32, ptr %223, align 8, !tbaa !54
  %225 = icmp ne i32 %224, 0
  br i1 %225, label %230, label %226

226:                                              ; preds = %218
  %227 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 0
  %228 = load i32, ptr %227, align 8, !tbaa !55
  %229 = icmp ne i32 %228, 0
  br i1 %229, label %230, label %231

230:                                              ; preds = %226, %218
  br label %234

231:                                              ; preds = %226
  %232 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 8
  %233 = load i32, ptr %232, align 8, !tbaa !56
  br label %234

234:                                              ; preds = %231, %230
  %235 = phi i32 [ 8, %230 ], [ %233, %231 ]
  %236 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %237 = getelementptr inbounds %struct.LodePNGInfo, ptr %236, i32 0, i32 3
  %238 = getelementptr inbounds %struct.LodePNGColorMode, ptr %237, i32 0, i32 1
  store i32 %235, ptr %238, align 4, !tbaa !57
  %239 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 1
  %240 = load i32, ptr %239, align 4, !tbaa !51
  %241 = icmp ne i32 %240, 0
  br i1 %241, label %242, label %247

242:                                              ; preds = %234
  %243 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 5
  %244 = load i32, ptr %243, align 8, !tbaa !54
  %245 = icmp ne i32 %244, 0
  %246 = xor i1 %245, true
  br label %247

247:                                              ; preds = %242, %234
  %248 = phi i1 [ false, %234 ], [ %246, %242 ]
  %249 = zext i1 %248 to i32
  %250 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %251 = getelementptr inbounds %struct.LodePNGInfo, ptr %250, i32 0, i32 3
  %252 = getelementptr inbounds %struct.LodePNGColorMode, ptr %251, i32 0, i32 4
  store i32 %249, ptr %252, align 8, !tbaa !58
  %253 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %254 = getelementptr inbounds %struct.LodePNGInfo, ptr %253, i32 0, i32 3
  %255 = getelementptr inbounds %struct.LodePNGColorMode, ptr %254, i32 0, i32 4
  %256 = load i32, ptr %255, align 8, !tbaa !58
  %257 = icmp ne i32 %256, 0
  br i1 %257, label %258, label %283

258:                                              ; preds = %247
  %259 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %260 = getelementptr inbounds %struct.LodePNGInfo, ptr %259, i32 0, i32 3
  %261 = getelementptr inbounds %struct.LodePNGColorMode, ptr %260, i32 0, i32 4
  store i32 1, ptr %261, align 8, !tbaa !58
  %262 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 2
  %263 = load i16, ptr %262, align 8, !tbaa !59
  %264 = zext i16 %263 to i32
  %265 = and i32 %264, 255
  %266 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %267 = getelementptr inbounds %struct.LodePNGInfo, ptr %266, i32 0, i32 3
  %268 = getelementptr inbounds %struct.LodePNGColorMode, ptr %267, i32 0, i32 5
  store i32 %265, ptr %268, align 4, !tbaa !60
  %269 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 3
  %270 = load i16, ptr %269, align 2, !tbaa !61
  %271 = zext i16 %270 to i32
  %272 = and i32 %271, 255
  %273 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %274 = getelementptr inbounds %struct.LodePNGInfo, ptr %273, i32 0, i32 3
  %275 = getelementptr inbounds %struct.LodePNGColorMode, ptr %274, i32 0, i32 6
  store i32 %272, ptr %275, align 8, !tbaa !62
  %276 = getelementptr inbounds %struct.LodePNGColorStats, ptr %33, i32 0, i32 4
  %277 = load i16, ptr %276, align 4, !tbaa !63
  %278 = zext i16 %277 to i32
  %279 = and i32 %278, 255
  %280 = getelementptr inbounds %struct.LodePNGState, ptr %27, i32 0, i32 3
  %281 = getelementptr inbounds %struct.LodePNGInfo, ptr %280, i32 0, i32 3
  %282 = getelementptr inbounds %struct.LodePNGColorMode, ptr %281, i32 0, i32 7
  store i32 %279, ptr %282, align 4, !tbaa !64
  br label %283

283:                                              ; preds = %258, %247
  call void @llvm.lifetime.start.p0(i64 24, ptr %34) #5
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  %284 = load ptr, ptr %14, align 8, !tbaa !5
  %285 = load i32, ptr %15, align 4, !tbaa !9
  %286 = load i32, ptr %16, align 4, !tbaa !9
  %287 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(24) %284, i32 noundef %285, i32 noundef %286, ptr noundef nonnull align 8 dereferenceable(528) %27)
          to label %288 unwind label %295

288:                                              ; preds = %283
  store i32 %287, ptr %26, align 4, !tbaa !9
  %289 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  %290 = load ptr, ptr %25, align 8, !tbaa !5
  %291 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %290) #5
  %292 = icmp ult i64 %289, %291
  br i1 %292, label %293, label %299

293:                                              ; preds = %288
  %294 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %294, ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  br label %299

295:                                              ; preds = %283
  %296 = landingpad { ptr, i32 }
          cleanup
  %297 = extractvalue { ptr, i32 } %296, 0
  store ptr %297, ptr %28, align 8
  %298 = extractvalue { ptr, i32 } %296, 1
  store i32 %298, ptr %29, align 4
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #5
  br label %300

299:                                              ; preds = %293, %288
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 1072, ptr %33) #5
  br label %301

300:                                              ; preds = %295, %196
  call void @llvm.lifetime.end.p0(i64 1072, ptr %33) #5
  br label %316

301:                                              ; preds = %299, %168
  br label %302

302:                                              ; preds = %301, %163, %159, %156
  %303 = load i32, ptr %26, align 4, !tbaa !9
  %304 = icmp ne i32 %303, 0
  br i1 %304, label %305, label %313

305:                                              ; preds = %302
  %306 = load i32, ptr %26, align 4, !tbaa !9
  %307 = load i32, ptr %26, align 4, !tbaa !9
  %308 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %307)
          to label %309 unwind label %135

309:                                              ; preds = %305
  %310 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %306, ptr noundef %308)
          to label %311 unwind label %135

311:                                              ; preds = %309
  %312 = load i32, ptr %26, align 4, !tbaa !9
  store i32 %312, ptr %13, align 4
  store i32 1, ptr %31, align 4
  br label %314

313:                                              ; preds = %302
  store i32 0, ptr %13, align 4
  store i32 1, ptr %31, align 4
  br label %314

314:                                              ; preds = %313, %311, %134
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #5
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %27) #5
  call void @llvm.lifetime.end.p0(i64 528, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  %315 = load i32, ptr %13, align 4
  ret i32 %315

316:                                              ; preds = %300, %192, %135
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %30) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #5
  br label %317

317:                                              ; preds = %316, %70
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %27) #5
  call void @llvm.lifetime.end.p0(i64 528, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %318

318:                                              ; preds = %317
  %319 = load ptr, ptr %28, align 8
  %320 = load i32, ptr %29, align 4
  %321 = insertvalue { ptr, i32 } poison, ptr %319, 0
  %322 = insertvalue { ptr, i32 } %321, i32 %320, 1
  resume { ptr, i32 } %322
}

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

declare noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef, ptr noundef) #3

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

declare noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(528)) #3

declare void @_ZN7lodepng16getPNGHeaderInfoERKSt6vectorIhSaIhEE(ptr dead_on_unwind writable sret(%struct.LodePNGInfo) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3

declare void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef) #3

declare noundef i32 @_Z27lodepng_compute_color_statsP17LodePNGColorStatsPKhjjPK16LodePNGColorMode(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

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

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

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

declare noundef ptr @_Z18lodepng_error_textj(i32 noundef) #3

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 }

!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 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS23ZopfliPNGFilterStrategy", !7, i64 0}
!15 = !{!16, !10, i64 88}
!16 = !{!"_ZTS12LodePNGState", !17, i64 0, !20, i64 80, !23, i64 168, !25, i64 208, !10, i64 520}
!17 = !{!"_ZTS22LodePNGDecoderSettings", !18, i64 0, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !19, i64 64, !19, i64 72}
!18 = !{!"_ZTS25LodePNGDecompressSettings", !10, i64 0, !10, i64 4, !19, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTS22LodePNGEncoderSettings", !21, i64 0, !10, i64 48, !10, i64 52, !22, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80}
!21 = !{!"_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}
!22 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!23 = !{!"_ZTS16LodePNGColorMode", !24, i64 0, !10, i64 4, !6, i64 8, !19, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!24 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!25 = !{!"_ZTS11LodePNGInfo", !10, i64 0, !10, i64 4, !10, i64 8, !23, i64 16, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !19, i64 72, !6, i64 80, !6, i64 88, !19, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !10, i64 136, !26, 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}
!26 = !{!"_ZTS11LodePNGTime", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!30, !12, i64 64}
!30 = !{!"_ZTS16ZopfliPNGOptions", !12, i64 0, !12, i64 1, !12, i64 2, !31, i64 8, !12, i64 32, !35, i64 40, !12, i64 64, !10, i64 68, !10, i64 72, !10, i64 76}
!31 = !{!"_ZTSSt6vectorI23ZopfliPNGFilterStrategySaIS0_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!39 = !{!16, !6, i64 112}
!40 = !{!16, !6, i64 120}
!41 = !{!16, !10, i64 128}
!42 = !{!16, !24, i64 224}
!43 = !{!16, !24, i64 168}
!44 = !{!16, !10, i64 172}
!45 = !{!16, !10, i64 132}
!46 = !{!16, !22, i64 136}
!47 = !{!16, !6, i64 144}
!48 = !{!16, !10, i64 156}
!49 = !{!16, !10, i64 160}
!50 = !{!25, !24, i64 16}
!51 = !{!52, !10, i64 4}
!52 = !{!"_ZTS17LodePNGColorStats", !10, i64 0, !10, i64 4, !53, i64 8, !53, i64 10, !53, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !10, i64 1048, !19, i64 1056, !10, i64 1064, !10, i64 1068}
!53 = !{!"short", !7, i64 0}
!54 = !{!52, !10, i64 16}
!55 = !{!52, !10, i64 0}
!56 = !{!52, !10, i64 1048}
!57 = !{!16, !10, i64 228}
!58 = !{!16, !10, i64 248}
!59 = !{!52, !53, i64 8}
!60 = !{!16, !10, i64 252}
!61 = !{!52, !53, i64 10}
!62 = !{!16, !10, i64 256}
!63 = !{!52, !53, i64 12}
!64 = !{!16, !10, i64 260}


; 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.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, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = 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 }
%struct.LodePNGColorStats = type { i32, i32, i16, i16, i16, i32, i32, [1024 x i8], i32, i64, i32, i32 }

@.str = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z16CustomPNGDeflatePPhPmPKhmPK23LodePNGCompressSettings(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_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: mustprogress uwtable
define dso_local noundef i32 @_Z11TryOptimizeRKSt6vectorIhSaIhEEjjRKN7lodepng5StateEbbS3_23ZopfliPNGFilterStrategybiPK16ZopfliPNGOptionsPS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(528) %3, i1 noundef zeroext %4, i1 noundef zeroext %5, ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %7, i1 noundef zeroext %8, i32 noundef %9, ptr noundef %10, ptr noundef %11) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %13 = alloca %"class.lodepng::State", align 8
  %14 = alloca %"class.std::vector.8", align 8
  %15 = alloca %struct.LodePNGInfo, align 8
  %16 = alloca %struct.LodePNGColorStats, align 8
  %17 = alloca %"class.std::vector.8", align 8
  call void @llvm.lifetime.start.p0(i64 528, ptr nonnull %13) #6
  call void @_ZN7lodepng5StateC1Ev(ptr noundef nonnull align 8 dereferenceable(528) %13)
  %18 = getelementptr inbounds i8, ptr %13, i64 88
  store i32 %9, ptr %18, align 8, !tbaa !5
  br i1 %8, label %19, label %26

19:                                               ; preds = %12
  %20 = getelementptr inbounds i8, ptr %10, i64 64
  %21 = load i8, ptr %20, align 8, !tbaa !21, !range !32, !noundef !33
  %22 = trunc nuw i8 %21 to i1
  br i1 %22, label %23, label %26

23:                                               ; preds = %19
  %24 = getelementptr inbounds i8, ptr %13, i64 112
  store ptr @_Z16CustomPNGDeflatePPhPmPKhmPK23LodePNGCompressSettings, ptr %24, align 8, !tbaa !34
  %25 = getelementptr inbounds i8, ptr %13, i64 120
  store ptr %10, ptr %25, align 8, !tbaa !35
  br label %26

26:                                               ; preds = %23, %19, %12
  br i1 %5, label %27, label %34

27:                                               ; preds = %26
  %28 = getelementptr inbounds i8, ptr %13, i64 128
  store i32 0, ptr %28, align 8, !tbaa !36
  %29 = getelementptr inbounds i8, ptr %13, i64 224
  %30 = getelementptr inbounds i8, ptr %3, i64 224
  %31 = invoke noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef nonnull %29, ptr noundef nonnull %30)
          to label %34 unwind label %32

32:                                               ; preds = %38, %27
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %150

34:                                               ; preds = %27, %26
  %35 = getelementptr inbounds i8, ptr %3, i64 224
  %36 = load i32, ptr %35, align 8, !tbaa !37
  %37 = icmp eq i32 %36, 3
  br i1 %37, label %38, label %43

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %13, i64 168
  %40 = invoke noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef nonnull %39, ptr noundef nonnull %35)
          to label %41 unwind label %32

41:                                               ; preds = %38
  store i32 6, ptr %39, align 8, !tbaa !38
  %42 = getelementptr inbounds i8, ptr %13, i64 172
  store i32 8, ptr %42, align 4, !tbaa !39
  br label %43

43:                                               ; preds = %41, %34
  br i1 %4, label %44, label %46

44:                                               ; preds = %43
  %45 = getelementptr inbounds i8, ptr %13, i64 172
  store i32 16, ptr %45, align 4, !tbaa !39
  br label %46

46:                                               ; preds = %44, %43
  %47 = getelementptr inbounds i8, ptr %13, i64 132
  store i32 0, ptr %47, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  switch i32 %7, label %75 [
    i32 0, label %48
    i32 5, label %50
    i32 6, label %52
    i32 8, label %54
    i32 1, label %56
    i32 2, label %58
    i32 3, label %60
    i32 4, label %62
    i32 7, label %64
  ]

48:                                               ; preds = %46
  %49 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 0, ptr %49, align 8, !tbaa !41
  br label %75

50:                                               ; preds = %46
  %51 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 5, ptr %51, align 8, !tbaa !41
  br label %75

52:                                               ; preds = %46
  %53 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 6, ptr %53, align 8, !tbaa !41
  br label %75

54:                                               ; preds = %46
  %55 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 7, ptr %55, align 8, !tbaa !41
  br label %75

56:                                               ; preds = %46
  %57 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 1, ptr %57, align 8, !tbaa !41
  br label %75

58:                                               ; preds = %46
  %59 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 2, ptr %59, align 8, !tbaa !41
  br label %75

60:                                               ; preds = %46
  %61 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 3, ptr %61, align 8, !tbaa !41
  br label %75

62:                                               ; preds = %46
  %63 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 4, ptr %63, align 8, !tbaa !41
  br label %75

64:                                               ; preds = %46
  %65 = invoke noundef i32 @_ZN7lodepng14getFilterTypesERSt6vectorIhSaIhEERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %66 unwind label %69

66:                                               ; preds = %64
  %67 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %68 = zext i32 %2 to i64
  %.not = icmp eq i64 %67, %68
  br i1 %.not, label %71, label %.thread

69:                                               ; preds = %.thread61, %75, %64
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %149

71:                                               ; preds = %66
  %72 = getelementptr inbounds i8, ptr %13, i64 136
  store i32 8, ptr %72, align 8, !tbaa !41
  %73 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef 0) #6
  %74 = getelementptr inbounds i8, ptr %13, i64 144
  store ptr %73, ptr %74, align 8, !tbaa !42
  br label %75

75:                                               ; preds = %46, %71, %62, %60, %58, %56, %54, %52, %50, %48
  %76 = getelementptr inbounds i8, ptr %13, i64 156
  store i32 0, ptr %76, align 4, !tbaa !43
  %77 = getelementptr inbounds i8, ptr %13, i64 160
  store i32 1, ptr %77, align 8, !tbaa !44
  %78 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(528) %13)
          to label %79 unwind label %69

79:                                               ; preds = %75
  %.not48 = icmp eq i32 %78, 0
  br i1 %.not48, label %80, label %.thread61

80:                                               ; preds = %79
  %81 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %82 = icmp ugt i64 %81, 4095
  %brmerge = or i1 %82, %5
  br i1 %brmerge, label %.thread, label %83

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 312, ptr nonnull %15) #6
  invoke void @_ZN7lodepng16getPNGHeaderInfoERKSt6vectorIhSaIhEE(ptr dead_on_unwind nonnull writable sret(%struct.LodePNGInfo) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %84 unwind label %101

84:                                               ; preds = %83
  %85 = getelementptr inbounds i8, ptr %15, i64 16
  %86 = load i32, ptr %85, align 8, !tbaa !45
  %87 = icmp eq i32 %86, 3
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %15) #6
  br i1 %87, label %88, label %.thread

88:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 1072, ptr nonnull %16) #6
  invoke void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef nonnull %16)
          to label %89 unwind label %103

89:                                               ; preds = %88
  %90 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNKSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  %91 = getelementptr inbounds i8, ptr %13, i64 168
  %92 = invoke noundef i32 @_Z27lodepng_compute_color_statsP17LodePNGColorStatsPKhjjPK16LodePNGColorMode(ptr noundef nonnull %16, ptr noundef nonnull %90, i32 noundef %1, i32 noundef %2, ptr noundef nonnull %91)
          to label %93 unwind label %103

93:                                               ; preds = %89
  %94 = mul i32 %2, %1
  %95 = icmp ult i32 %94, 17
  %96 = getelementptr inbounds i8, ptr %16, i64 4
  %97 = load i32, ptr %96, align 4
  %98 = icmp ne i32 %97, 0
  %or.cond = select i1 %95, i1 %98, i1 false
  %99 = getelementptr inbounds i8, ptr %16, i64 16
  %100 = getelementptr inbounds i8, ptr %13, i64 128
  br i1 %or.cond, label %.thread65, label %105

.thread65:                                        ; preds = %93
  store i32 1, ptr %99, align 8, !tbaa !46
  store i32 0, ptr %100, align 8, !tbaa !36
  br label %106

101:                                              ; preds = %83
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %15) #6
  br label %149

103:                                              ; preds = %89, %88
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %144

105:                                              ; preds = %93
  %.pre = load i32, ptr %99, align 8
  store i32 0, ptr %100, align 8, !tbaa !36
  %.not49 = icmp eq i32 %.pre, 0
  br i1 %.not49, label %109, label %106

106:                                              ; preds = %.thread65, %105
  %107 = load i32, ptr %16, align 8
  %.not51 = icmp eq i32 %107, 0
  %108 = select i1 %.not51, i32 4, i32 6
  br label %112

109:                                              ; preds = %105
  %110 = load i32, ptr %16, align 8
  %.not50 = icmp eq i32 %110, 0
  %111 = select i1 %.not50, i32 0, i32 2
  br label %112

112:                                              ; preds = %109, %106
  %.not4967 = phi i1 [ false, %106 ], [ true, %109 ]
  %113 = phi i1 [ true, %106 ], [ false, %109 ]
  %114 = phi i32 [ %107, %106 ], [ %110, %109 ]
  %115 = phi i32 [ %108, %106 ], [ %111, %109 ]
  %116 = getelementptr inbounds i8, ptr %13, i64 224
  store i32 %115, ptr %116, align 8, !tbaa !37
  %117 = icmp ne i32 %114, 0
  %or.cond5 = select i1 %113, i1 true, i1 %117
  %118 = getelementptr inbounds i8, ptr %16, i64 1048
  %119 = load i32, ptr %118, align 8
  %120 = select i1 %or.cond5, i32 8, i32 %119
  %121 = getelementptr inbounds i8, ptr %13, i64 228
  store i32 %120, ptr %121, align 4, !tbaa !49
  %122 = and i1 %98, %.not4967
  %123 = zext i1 %122 to i32
  %124 = getelementptr inbounds i8, ptr %13, i64 248
  store i32 %123, ptr %124, align 8, !tbaa !50
  br i1 %122, label %125, label %135

125:                                              ; preds = %112
  store i32 1, ptr %124, align 8, !tbaa !50
  %126 = getelementptr inbounds i8, ptr %16, i64 8
  %127 = getelementptr inbounds i8, ptr %13, i64 252
  %128 = load <2 x i16>, ptr %126, align 8, !tbaa !51
  %.mask = and <2 x i16> %128, <i16 255, i16 255>
  %129 = zext nneg <2 x i16> %.mask to <2 x i32>
  store <2 x i32> %129, ptr %127, align 4, !tbaa !52
  %130 = getelementptr inbounds i8, ptr %16, i64 12
  %131 = load i16, ptr %130, align 4, !tbaa !53
  %132 = and i16 %131, 255
  %133 = zext nneg i16 %132 to i32
  %134 = getelementptr inbounds i8, ptr %13, i64 260
  store i32 %133, ptr %134, align 4, !tbaa !54
  br label %135

135:                                              ; preds = %125, %112
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #6
  call void @_ZNSt6vectorIhSaIhEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %136 = invoke noundef i32 @_ZN7lodepng6encodeERSt6vectorIhSaIhEERKS2_jjRNS_5StateE(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(528) %13)
          to label %137 unwind label %142

137:                                              ; preds = %135
  %138 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %139 = call noundef i64 @_ZNKSt6vectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  %140 = icmp ult i64 %138, %139
  br i1 %140, label %141, label %145

141:                                              ; preds = %137
  call void @_ZNSt6vectorIhSaIhEE4swapERS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  br label %145

142:                                              ; preds = %135
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  br label %144

144:                                              ; preds = %142, %103
  %.pn = phi { ptr, i32 } [ %143, %142 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 1072, ptr nonnull %16) #6
  br label %149

145:                                              ; preds = %137, %141
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 1072, ptr nonnull %16) #6
  %.not54 = icmp eq i32 %136, 0
  br i1 %.not54, label %.thread, label %.thread61

.thread61:                                        ; preds = %79, %145
  %.04464 = phi i32 [ %136, %145 ], [ %78, %79 ]
  %146 = invoke noundef ptr @_Z18lodepng_error_textj(i32 noundef %.04464)
          to label %147 unwind label %69

147:                                              ; preds = %.thread61
  %148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.04464, ptr noundef %146)
  br label %.thread

.thread:                                          ; preds = %80, %84, %145, %66, %147
  %.045 = phi i32 [ %.04464, %147 ], [ 1, %66 ], [ 0, %145 ], [ 0, %84 ], [ 0, %80 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %13) #6
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %13) #6
  ret i32 %.045

149:                                              ; preds = %144, %101, %69
  %.pn55 = phi { ptr, i32 } [ %70, %69 ], [ %.pn, %144 ], [ %102, %101 ]
  call void @_ZNSt6vectorIhSaIhEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #6
  br label %150

150:                                              ; preds = %149, %32
  %.pn55.pn = phi { ptr, i32 } [ %.pn55, %149 ], [ %33, %32 ]
  call void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528) %13) #6
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %13) #6
  resume { ptr, i32 } %.pn55.pn
}

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

declare noundef i32 @_Z23lodepng_color_mode_copyP16LodePNGColorModePKS_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

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

declare void @_ZN7lodepng16getPNGHeaderInfoERKSt6vectorIhSaIhEE(ptr dead_on_unwind writable sret(%struct.LodePNGInfo) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

declare void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef) local_unnamed_addr #3

declare noundef i32 @_Z27lodepng_compute_color_statsP17LodePNGColorStatsPKhjjPK16LodePNGColorMode(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: nounwind
declare void @_ZN7lodepng5StateD1Ev(ptr noundef nonnull align 8 dereferenceable(528)) unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !9, i64 88}
!6 = !{!"_ZTS12LodePNGState", !7, i64 0, !14, i64 80, !17, i64 168, !19, i64 208, !9, i64 520}
!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, !10, i64 264, !10, i64 288}
!20 = !{!"_ZTS11LodePNGTime", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
!21 = !{!22, !23, i64 64}
!22 = !{!"_ZTS16ZopfliPNGOptions", !23, i64 0, !23, i64 1, !23, i64 2, !24, i64 8, !23, i64 32, !28, i64 40, !23, i64 64, !9, i64 68, !9, i64 72, !9, i64 76}
!23 = !{!"bool", !10, i64 0}
!24 = !{!"_ZTSSt6vectorI23ZopfliPNGFilterStrategySaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI23ZopfliPNGFilterStrategySaIS0_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!28 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = !{!6, !13, i64 112}
!35 = !{!6, !13, i64 120}
!36 = !{!6, !9, i64 128}
!37 = !{!6, !18, i64 224}
!38 = !{!6, !18, i64 168}
!39 = !{!6, !9, i64 172}
!40 = !{!6, !9, i64 132}
!41 = !{!6, !16, i64 136}
!42 = !{!6, !13, i64 144}
!43 = !{!6, !9, i64 156}
!44 = !{!6, !9, i64 160}
!45 = !{!19, !18, i64 16}
!46 = !{!47, !9, i64 16}
!47 = !{!"_ZTS17LodePNGColorStats", !9, i64 0, !9, i64 4, !48, i64 8, !48, i64 10, !48, i64 12, !9, i64 16, !9, i64 20, !10, i64 24, !9, i64 1048, !12, i64 1056, !9, i64 1064, !9, i64 1068}
!48 = !{!"short", !10, i64 0}
!49 = !{!6, !9, i64 228}
!50 = !{!6, !9, i64 248}
!51 = !{!48, !48, i64 0}
!52 = !{!9, !9, i64 0}
!53 = !{!47, !48, i64 12}
!54 = !{!6, !9, i64 260}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass