; LLVM IR from aap/librw :: src/lodepng/lodepng.ll (Z14lodepng_encodePPhPmPKhjjP12LodePNGState)

; 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"

%struct.ucvector = type { ptr, i64, i64 }
%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 }
%struct.LodePNGColorStats = type { i32, i32, i16, i16, i16, i32, i32, [1024 x i8], i32, i64, i32, i32 }
%struct.LodePNGState = type { %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 }

@LODEPNG_VERSION_STRING = external dso_local global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [8 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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL14lodepng_mallocm(i64 noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL12lodepng_freePv(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL13ucvector_initPhm(ptr dead_on_unwind noalias writable sret(%struct.ucvector) align 8, ptr noundef, i64 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z23lodepng_color_mode_make16LodePNGColorTypej(ptr dead_on_unwind noalias writable sret(%struct.LodePNGColorMode) align 8, i32 noundef, i32 noundef) #1

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z19lodepng_convert_rgbPjS_S_jjjPK16LodePNGColorModeS2_(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL18checkColorValidity16LodePNGColorTypej(i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z14lodepng_encodePPhPmPKhjjP12LodePNGState(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca %struct.ucvector, align 8
  %17 = alloca %struct.LodePNGInfo, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %struct.LodePNGColorStats, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %struct.LodePNGColorMode, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #3
  call void @_ZL13ucvector_initPhm(ptr dead_on_unwind writable sret(%struct.ucvector) align 8 %16, ptr noundef null, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 312, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.LodePNGState, ptr %33, i32 0, i32 3
  store ptr %34, ptr %18, align 8, !tbaa !5
  call void @_Z17lodepng_info_initP11LodePNGInfo(ptr noundef %17)
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr null, ptr %35, align 8, !tbaa !5
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 0, ptr %36, align 8, !tbaa !11
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.LodePNGState, ptr %37, i32 0, i32 4
  store i32 0, ptr %38, align 8, !tbaa !13
  %39 = load ptr, ptr %18, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.LodePNGInfo, ptr %39, i32 0, i32 3
  %41 = getelementptr inbounds %struct.LodePNGColorMode, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 8, !tbaa !24
  %43 = icmp eq i32 %42, 3
  br i1 %43, label %50, label %44

44:                                               ; preds = %6
  %45 = load ptr, ptr %13, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.LodePNGState, ptr %45, i32 0, i32 1
  %47 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %46, i32 0, i32 5
  %48 = load i32, ptr %47, align 8, !tbaa !25
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %65

50:                                               ; preds = %44, %6
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.LodePNGInfo, ptr %51, i32 0, i32 3
  %53 = getelementptr inbounds %struct.LodePNGColorMode, ptr %52, i32 0, i32 3
  %54 = load i64, ptr %53, align 8, !tbaa !26
  %55 = icmp eq i64 %54, 0
  br i1 %55, label %62, label %56

56:                                               ; preds = %50
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.LodePNGInfo, ptr %57, i32 0, i32 3
  %59 = getelementptr inbounds %struct.LodePNGColorMode, ptr %58, i32 0, i32 3
  %60 = load i64, ptr %59, align 8, !tbaa !26
  %61 = icmp ugt i64 %60, 256
  br i1 %61, label %62, label %65

62:                                               ; preds = %56, %50
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.LodePNGState, ptr %63, i32 0, i32 4
  store i32 68, ptr %64, align 8, !tbaa !13
  br label %903

65:                                               ; preds = %56, %44
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.LodePNGState, ptr %66, i32 0, i32 1
  %68 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds %struct.LodePNGCompressSettings, ptr %68, i32 0, i32 0
  %70 = load i32, ptr %69, align 8, !tbaa !27
  %71 = icmp ugt i32 %70, 2
  br i1 %71, label %72, label %75

72:                                               ; preds = %65
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.LodePNGState, ptr %73, i32 0, i32 4
  store i32 61, ptr %74, align 8, !tbaa !13
  br label %903

75:                                               ; preds = %65
  %76 = load ptr, ptr %18, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.LodePNGInfo, ptr %76, i32 0, i32 2
  %78 = load i32, ptr %77, align 8, !tbaa !28
  %79 = icmp ugt i32 %78, 1
  br i1 %79, label %80, label %83

80:                                               ; preds = %75
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.LodePNGState, ptr %81, i32 0, i32 4
  store i32 71, ptr %82, align 8, !tbaa !13
  br label %903

83:                                               ; preds = %75
  %84 = load ptr, ptr %18, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.LodePNGInfo, ptr %84, i32 0, i32 3
  %86 = getelementptr inbounds %struct.LodePNGColorMode, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !24
  %88 = load ptr, ptr %18, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.LodePNGInfo, ptr %88, i32 0, i32 3
  %90 = getelementptr inbounds %struct.LodePNGColorMode, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !29
  %92 = call noundef i32 @_ZL18checkColorValidity16LodePNGColorTypej(i32 noundef %87, i32 noundef %91)
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.LodePNGState, ptr %93, i32 0, i32 4
  store i32 %92, ptr %94, align 8, !tbaa !13
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.LodePNGState, ptr %95, i32 0, i32 4
  %97 = load i32, ptr %96, align 8, !tbaa !13
  %98 = icmp ne i32 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %83
  br label %903

100:                                              ; preds = %83
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.LodePNGState, ptr %101, i32 0, i32 2
  %103 = getelementptr inbounds %struct.LodePNGColorMode, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !30
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.LodePNGState, ptr %105, i32 0, i32 2
  %107 = getelementptr inbounds %struct.LodePNGColorMode, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !31
  %109 = call noundef i32 @_ZL18checkColorValidity16LodePNGColorTypej(i32 noundef %104, i32 noundef %108)
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.LodePNGState, ptr %110, i32 0, i32 4
  store i32 %109, ptr %111, align 8, !tbaa !13
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.LodePNGState, ptr %112, i32 0, i32 4
  %114 = load i32, ptr %113, align 8, !tbaa !13
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %100
  br label %903

117:                                              ; preds = %100
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.LodePNGState, ptr %118, i32 0, i32 3
  %120 = call noundef i32 @_Z17lodepng_info_copyP11LodePNGInfoPKS_(ptr noundef %17, ptr noundef %119)
  %121 = load ptr, ptr %13, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.LodePNGState, ptr %121, i32 0, i32 1
  %123 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %122, i32 0, i32 1
  %124 = load i32, ptr %123, align 8, !tbaa !32
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %248

126:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 1072, ptr %19) #3
  call void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef %19)
  %127 = load ptr, ptr %18, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.LodePNGInfo, ptr %127, i32 0, i32 35
  %129 = load i32, ptr %128, align 8, !tbaa !33
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %142

131:                                              ; preds = %126
  %132 = load ptr, ptr %18, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.LodePNGInfo, ptr %132, i32 0, i32 37
  %134 = load ptr, ptr %133, align 8, !tbaa !34
  %135 = load ptr, ptr %18, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.LodePNGInfo, ptr %135, i32 0, i32 38
  %137 = load i32, ptr %136, align 8, !tbaa !35
  %138 = call noundef i32 @_ZL16isGrayICCProfilePKhj(ptr noundef %134, i32 noundef %137)
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %142

140:                                              ; preds = %131
  %141 = getelementptr inbounds %struct.LodePNGColorStats, ptr %19, i32 0, i32 10
  store i32 0, ptr %141, align 8, !tbaa !36
  br label %142

142:                                              ; preds = %140, %131, %126
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.LodePNGInfo, ptr %143, i32 0, i32 35
  %145 = load i32, ptr %144, align 8, !tbaa !33
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %158

147:                                              ; preds = %142
  %148 = load ptr, ptr %18, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.LodePNGInfo, ptr %148, i32 0, i32 37
  %150 = load ptr, ptr %149, align 8, !tbaa !34
  %151 = load ptr, ptr %18, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.LodePNGInfo, ptr %151, i32 0, i32 38
  %153 = load i32, ptr %152, align 8, !tbaa !35
  %154 = call noundef i32 @_ZL15isRGBICCProfilePKhj(ptr noundef %150, i32 noundef %153)
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %158

156:                                              ; preds = %147
  %157 = getelementptr inbounds %struct.LodePNGColorStats, ptr %19, i32 0, i32 11
  store i32 0, ptr %157, align 4, !tbaa !39
  br label %158

158:                                              ; preds = %156, %147, %142
  %159 = load ptr, ptr %10, align 8, !tbaa !5
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = load i32, ptr %12, align 4, !tbaa !9
  %162 = load ptr, ptr %13, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.LodePNGState, ptr %162, i32 0, i32 2
  %164 = call noundef i32 @_Z27lodepng_compute_color_statsP17LodePNGColorStatsPKhjjPK16LodePNGColorMode(ptr noundef %19, ptr noundef %159, i32 noundef %160, i32 noundef %161, ptr noundef %163)
  %165 = load ptr, ptr %13, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.LodePNGState, ptr %165, i32 0, i32 4
  store i32 %164, ptr %166, align 8, !tbaa !13
  %167 = load ptr, ptr %13, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.LodePNGState, ptr %167, i32 0, i32 4
  %169 = load i32, ptr %168, align 8, !tbaa !13
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %172

171:                                              ; preds = %158
  store i32 2, ptr %24, align 4
  br label %245

172:                                              ; preds = %158
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.LodePNGInfo, ptr %173, i32 0, i32 4
  %175 = load i32, ptr %174, align 8, !tbaa !40
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %205

177:                                              ; preds = %172
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store i32 0, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #3
  call void @_Z23lodepng_color_mode_make16LodePNGColorTypej(ptr dead_on_unwind writable sret(%struct.LodePNGColorMode) align 8 %23, i32 noundef 2, i32 noundef 16)
  %178 = load ptr, ptr %18, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.LodePNGInfo, ptr %178, i32 0, i32 5
  %180 = load i32, ptr %179, align 4, !tbaa !41
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.LodePNGInfo, ptr %181, i32 0, i32 6
  %183 = load i32, ptr %182, align 8, !tbaa !42
  %184 = load ptr, ptr %18, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.LodePNGInfo, ptr %184, i32 0, i32 7
  %186 = load i32, ptr %185, align 4, !tbaa !43
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.LodePNGInfo, ptr %187, i32 0, i32 3
  %189 = call noundef i32 @_Z19lodepng_convert_rgbPjS_S_jjjPK16LodePNGColorModeS2_(ptr noundef %20, ptr noundef %21, ptr noundef %22, i32 noundef %180, i32 noundef %183, i32 noundef %186, ptr noundef %23, ptr noundef %188)
  %190 = load i32, ptr %20, align 4, !tbaa !9
  %191 = load i32, ptr %21, align 4, !tbaa !9
  %192 = load i32, ptr %22, align 4, !tbaa !9
  %193 = call noundef i32 @_ZL23lodepng_color_stats_addP17LodePNGColorStatsjjjj(ptr noundef %19, i32 noundef %190, i32 noundef %191, i32 noundef %192, i32 noundef 65535)
  %194 = load ptr, ptr %13, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.LodePNGState, ptr %194, i32 0, i32 4
  store i32 %193, ptr %195, align 8, !tbaa !13
  %196 = load ptr, ptr %13, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.LodePNGState, ptr %196, i32 0, i32 4
  %198 = load i32, ptr %197, align 8, !tbaa !13
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %201

200:                                              ; preds = %177
  store i32 2, ptr %24, align 4
  br label %202

201:                                              ; preds = %177
  store i32 0, ptr %24, align 4
  br label %202

202:                                              ; preds = %201, %200
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  %203 = load i32, ptr %24, align 4
  switch i32 %203, label %245 [
    i32 0, label %204
  ]

204:                                              ; preds = %202
  br label %205

205:                                              ; preds = %204, %172
  %206 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %207 = load ptr, ptr %13, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.LodePNGState, ptr %207, i32 0, i32 2
  %209 = call noundef i32 @_ZL17auto_choose_colorP16LodePNGColorModePKS_PK17LodePNGColorStats(ptr noundef %206, ptr noundef %208, ptr noundef %19)
  %210 = load ptr, ptr %13, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.LodePNGState, ptr %210, i32 0, i32 4
  store i32 %209, ptr %211, align 8, !tbaa !13
  %212 = load ptr, ptr %13, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.LodePNGState, ptr %212, i32 0, i32 4
  %214 = load i32, ptr %213, align 8, !tbaa !13
  %215 = icmp ne i32 %214, 0
  br i1 %215, label %216, label %217

216:                                              ; preds = %205
  store i32 2, ptr %24, align 4
  br label %245

217:                                              ; preds = %205
  %218 = load ptr, ptr %18, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.LodePNGInfo, ptr %218, i32 0, i32 4
  %220 = load i32, ptr %219, align 8, !tbaa !40
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %222, label %244

222:                                              ; preds = %217
  %223 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 5
  %224 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 6
  %225 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 7
  %226 = load ptr, ptr %18, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.LodePNGInfo, ptr %226, i32 0, i32 5
  %228 = load i32, ptr %227, align 4, !tbaa !41
  %229 = load ptr, ptr %18, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.LodePNGInfo, ptr %229, i32 0, i32 6
  %231 = load i32, ptr %230, align 8, !tbaa !42
  %232 = load ptr, ptr %18, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.LodePNGInfo, ptr %232, i32 0, i32 7
  %234 = load i32, ptr %233, align 4, !tbaa !43
  %235 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %236 = load ptr, ptr %18, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.LodePNGInfo, ptr %236, i32 0, i32 3
  %238 = call noundef i32 @_Z19lodepng_convert_rgbPjS_S_jjjPK16LodePNGColorModeS2_(ptr noundef %223, ptr noundef %224, ptr noundef %225, i32 noundef %228, i32 noundef %231, i32 noundef %234, ptr noundef %235, ptr noundef %237)
  %239 = icmp ne i32 %238, 0
  br i1 %239, label %240, label %243

240:                                              ; preds = %222
  %241 = load ptr, ptr %13, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.LodePNGState, ptr %241, i32 0, i32 4
  store i32 104, ptr %242, align 8, !tbaa !13
  store i32 2, ptr %24, align 4
  br label %245

243:                                              ; preds = %222
  br label %244

244:                                              ; preds = %243, %217
  store i32 0, ptr %24, align 4
  br label %245

245:                                              ; preds = %244, %240, %216, %202, %171
  call void @llvm.lifetime.end.p0(i64 1072, ptr %19) #3
  %246 = load i32, ptr %24, align 4
  switch i32 %246, label %914 [
    i32 0, label %247
    i32 2, label %903
  ]

247:                                              ; preds = %245
  br label %248

248:                                              ; preds = %247, %117
  %249 = load ptr, ptr %18, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.LodePNGInfo, ptr %249, i32 0, i32 35
  %251 = load i32, ptr %250, align 8, !tbaa !33
  %252 = icmp ne i32 %251, 0
  br i1 %252, label %253, label %306

253:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  %254 = load ptr, ptr %18, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.LodePNGInfo, ptr %254, i32 0, i32 37
  %256 = load ptr, ptr %255, align 8, !tbaa !34
  %257 = load ptr, ptr %18, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.LodePNGInfo, ptr %257, i32 0, i32 38
  %259 = load i32, ptr %258, align 8, !tbaa !35
  %260 = call noundef i32 @_ZL16isGrayICCProfilePKhj(ptr noundef %256, i32 noundef %259)
  store i32 %260, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  %261 = load ptr, ptr %18, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.LodePNGInfo, ptr %261, i32 0, i32 37
  %263 = load ptr, ptr %262, align 8, !tbaa !34
  %264 = load ptr, ptr %18, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.LodePNGInfo, ptr %264, i32 0, i32 38
  %266 = load i32, ptr %265, align 8, !tbaa !35
  %267 = call noundef i32 @_ZL15isRGBICCProfilePKhj(ptr noundef %263, i32 noundef %266)
  store i32 %267, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  %268 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %269 = getelementptr inbounds %struct.LodePNGColorMode, ptr %268, i32 0, i32 0
  %270 = load i32, ptr %269, align 8, !tbaa !24
  %271 = icmp eq i32 %270, 0
  br i1 %271, label %277, label %272

272:                                              ; preds = %253
  %273 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %274 = getelementptr inbounds %struct.LodePNGColorMode, ptr %273, i32 0, i32 0
  %275 = load i32, ptr %274, align 8, !tbaa !24
  %276 = icmp eq i32 %275, 4
  br label %277

277:                                              ; preds = %272, %253
  %278 = phi i1 [ true, %253 ], [ %276, %272 ]
  %279 = zext i1 %278 to i32
  store i32 %279, ptr %27, align 4, !tbaa !9
  %280 = load i32, ptr %25, align 4, !tbaa !9
  %281 = icmp ne i32 %280, 0
  br i1 %281, label %288, label %282

282:                                              ; preds = %277
  %283 = load i32, ptr %26, align 4, !tbaa !9
  %284 = icmp ne i32 %283, 0
  br i1 %284, label %288, label %285

285:                                              ; preds = %282
  %286 = load ptr, ptr %13, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.LodePNGState, ptr %286, i32 0, i32 4
  store i32 100, ptr %287, align 8, !tbaa !13
  store i32 2, ptr %24, align 4
  br label %303

288:                                              ; preds = %282, %277
  %289 = load i32, ptr %25, align 4, !tbaa !9
  %290 = load i32, ptr %27, align 4, !tbaa !9
  %291 = icmp ne i32 %289, %290
  br i1 %291, label %292, label %302

292:                                              ; preds = %288
  %293 = load ptr, ptr %13, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.LodePNGState, ptr %293, i32 0, i32 1
  %295 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %294, i32 0, i32 1
  %296 = load i32, ptr %295, align 8, !tbaa !32
  %297 = icmp ne i32 %296, 0
  %298 = zext i1 %297 to i64
  %299 = select i1 %297, i32 102, i32 101
  %300 = load ptr, ptr %13, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.LodePNGState, ptr %300, i32 0, i32 4
  store i32 %299, ptr %301, align 8, !tbaa !13
  store i32 2, ptr %24, align 4
  br label %303

302:                                              ; preds = %288
  store i32 0, ptr %24, align 4
  br label %303

303:                                              ; preds = %302, %292, %285
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  %304 = load i32, ptr %24, align 4
  switch i32 %304, label %914 [
    i32 0, label %305
    i32 2, label %903
  ]

305:                                              ; preds = %303
  br label %306

306:                                              ; preds = %305, %248
  %307 = load ptr, ptr %13, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.LodePNGState, ptr %307, i32 0, i32 2
  %309 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %310 = call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef %308, ptr noundef %309)
  %311 = icmp ne i32 %310, 0
  br i1 %311, label %375, label %312

312:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %313 = load i32, ptr %11, align 4, !tbaa !9
  %314 = zext i32 %313 to i64
  %315 = load i32, ptr %12, align 4, !tbaa !9
  %316 = zext i32 %315 to i64
  %317 = mul i64 %314, %316
  %318 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %319 = call noundef i32 @_Z15lodepng_get_bppPK16LodePNGColorMode(ptr noundef %318)
  %320 = zext i32 %319 to i64
  %321 = mul i64 %317, %320
  %322 = add i64 %321, 7
  %323 = udiv i64 %322, 8
  store i64 %323, ptr %29, align 8, !tbaa !11
  %324 = load i64, ptr %29, align 8, !tbaa !11
  %325 = call noundef ptr @_ZL14lodepng_mallocm(i64 noundef %324)
  store ptr %325, ptr %28, align 8, !tbaa !5
  %326 = load ptr, ptr %28, align 8, !tbaa !5
  %327 = icmp ne ptr %326, null
  br i1 %327, label %334, label %328

328:                                              ; preds = %312
  %329 = load i64, ptr %29, align 8, !tbaa !11
  %330 = icmp ne i64 %329, 0
  br i1 %330, label %331, label %334

331:                                              ; preds = %328
  %332 = load ptr, ptr %13, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.LodePNGState, ptr %332, i32 0, i32 4
  store i32 83, ptr %333, align 8, !tbaa !13
  br label %334

334:                                              ; preds = %331, %328, %312
  %335 = load ptr, ptr %13, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.LodePNGState, ptr %335, i32 0, i32 4
  %337 = load i32, ptr %336, align 8, !tbaa !13
  %338 = icmp ne i32 %337, 0
  br i1 %338, label %350, label %339

339:                                              ; preds = %334
  %340 = load ptr, ptr %28, align 8, !tbaa !5
  %341 = load ptr, ptr %10, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %343 = load ptr, ptr %13, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.LodePNGState, ptr %343, i32 0, i32 2
  %345 = load i32, ptr %11, align 4, !tbaa !9
  %346 = load i32, ptr %12, align 4, !tbaa !9
  %347 = call noundef i32 @_Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj(ptr noundef %340, ptr noundef %341, ptr noundef %342, ptr noundef %344, i32 noundef %345, i32 noundef %346)
  %348 = load ptr, ptr %13, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.LodePNGState, ptr %348, i32 0, i32 4
  store i32 %347, ptr %349, align 8, !tbaa !13
  br label %350

350:                                              ; preds = %339, %334
  %351 = load ptr, ptr %13, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.LodePNGState, ptr %351, i32 0, i32 4
  %353 = load i32, ptr %352, align 8, !tbaa !13
  %354 = icmp ne i32 %353, 0
  br i1 %354, label %364, label %355

355:                                              ; preds = %350
  %356 = load ptr, ptr %28, align 8, !tbaa !5
  %357 = load i32, ptr %11, align 4, !tbaa !9
  %358 = load i32, ptr %12, align 4, !tbaa !9
  %359 = load ptr, ptr %13, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.LodePNGState, ptr %359, i32 0, i32 1
  %361 = call noundef i32 @_ZL19preProcessScanlinesPPhPmPKhjjPK11LodePNGInfoPK22LodePNGEncoderSettings(ptr noundef %14, ptr noundef %15, ptr noundef %356, i32 noundef %357, i32 noundef %358, ptr noundef %17, ptr noundef %360)
  %362 = load ptr, ptr %13, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.LodePNGState, ptr %362, i32 0, i32 4
  store i32 %361, ptr %363, align 8, !tbaa !13
  br label %364

364:                                              ; preds = %355, %350
  %365 = load ptr, ptr %28, align 8, !tbaa !5
  call void @_ZL12lodepng_freePv(ptr noundef %365)
  %366 = load ptr, ptr %13, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct.LodePNGState, ptr %366, i32 0, i32 4
  %368 = load i32, ptr %367, align 8, !tbaa !13
  %369 = icmp ne i32 %368, 0
  br i1 %369, label %370, label %371

370:                                              ; preds = %364
  store i32 2, ptr %24, align 4
  br label %372

371:                                              ; preds = %364
  store i32 0, ptr %24, align 4
  br label %372

372:                                              ; preds = %371, %370
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  %373 = load i32, ptr %24, align 4
  switch i32 %373, label %914 [
    i32 0, label %374
    i32 2, label %903
  ]

374:                                              ; preds = %372
  br label %390

375:                                              ; preds = %306
  %376 = load ptr, ptr %10, align 8, !tbaa !5
  %377 = load i32, ptr %11, align 4, !tbaa !9
  %378 = load i32, ptr %12, align 4, !tbaa !9
  %379 = load ptr, ptr %13, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.LodePNGState, ptr %379, i32 0, i32 1
  %381 = call noundef i32 @_ZL19preProcessScanlinesPPhPmPKhjjPK11LodePNGInfoPK22LodePNGEncoderSettings(ptr noundef %14, ptr noundef %15, ptr noundef %376, i32 noundef %377, i32 noundef %378, ptr noundef %17, ptr noundef %380)
  %382 = load ptr, ptr %13, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.LodePNGState, ptr %382, i32 0, i32 4
  store i32 %381, ptr %383, align 8, !tbaa !13
  %384 = load ptr, ptr %13, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.LodePNGState, ptr %384, i32 0, i32 4
  %386 = load i32, ptr %385, align 8, !tbaa !13
  %387 = icmp ne i32 %386, 0
  br i1 %387, label %388, label %389

388:                                              ; preds = %375
  br label %903

389:                                              ; preds = %375
  br label %390

390:                                              ; preds = %389, %374
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %391 = call noundef i32 @_ZL14writeSignatureP8ucvector(ptr noundef %16)
  %392 = load ptr, ptr %13, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.LodePNGState, ptr %392, i32 0, i32 4
  store i32 %391, ptr %393, align 8, !tbaa !13
  %394 = load ptr, ptr %13, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.LodePNGState, ptr %394, i32 0, i32 4
  %396 = load i32, ptr %395, align 8, !tbaa !13
  %397 = icmp ne i32 %396, 0
  br i1 %397, label %398, label %399

398:                                              ; preds = %390
  store i32 2, ptr %24, align 4
  br label %900

399:                                              ; preds = %390
  %400 = load i32, ptr %11, align 4, !tbaa !9
  %401 = load i32, ptr %12, align 4, !tbaa !9
  %402 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %403 = getelementptr inbounds %struct.LodePNGColorMode, ptr %402, i32 0, i32 0
  %404 = load i32, ptr %403, align 8, !tbaa !24
  %405 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %406 = getelementptr inbounds %struct.LodePNGColorMode, ptr %405, i32 0, i32 1
  %407 = load i32, ptr %406, align 4, !tbaa !29
  %408 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 2
  %409 = load i32, ptr %408, align 8, !tbaa !28
  %410 = call noundef i32 @_ZL13addChunk_IHDRP8ucvectorjj16LodePNGColorTypejj(ptr noundef %16, i32 noundef %400, i32 noundef %401, i32 noundef %404, i32 noundef %407, i32 noundef %409)
  %411 = load ptr, ptr %13, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.LodePNGState, ptr %411, i32 0, i32 4
  store i32 %410, ptr %412, align 8, !tbaa !13
  %413 = load ptr, ptr %13, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct.LodePNGState, ptr %413, i32 0, i32 4
  %415 = load i32, ptr %414, align 8, !tbaa !13
  %416 = icmp ne i32 %415, 0
  br i1 %416, label %417, label %418

417:                                              ; preds = %399
  store i32 2, ptr %24, align 4
  br label %900

418:                                              ; preds = %399
  %419 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 39
  %420 = getelementptr inbounds [3 x ptr], ptr %419, i64 0, i64 0
  %421 = load ptr, ptr %420, align 8, !tbaa !5
  %422 = icmp ne ptr %421, null
  br i1 %422, label %423, label %439

423:                                              ; preds = %418
  %424 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 39
  %425 = getelementptr inbounds [3 x ptr], ptr %424, i64 0, i64 0
  %426 = load ptr, ptr %425, align 8, !tbaa !5
  %427 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 40
  %428 = getelementptr inbounds [3 x i64], ptr %427, i64 0, i64 0
  %429 = load i64, ptr %428, align 8, !tbaa !11
  %430 = call noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef %16, ptr noundef %426, i64 noundef %429)
  %431 = load ptr, ptr %13, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.LodePNGState, ptr %431, i32 0, i32 4
  store i32 %430, ptr %432, align 8, !tbaa !13
  %433 = load ptr, ptr %13, align 8, !tbaa !5
  %434 = getelementptr inbounds %struct.LodePNGState, ptr %433, i32 0, i32 4
  %435 = load i32, ptr %434, align 8, !tbaa !13
  %436 = icmp ne i32 %435, 0
  br i1 %436, label %437, label %438

437:                                              ; preds = %423
  store i32 2, ptr %24, align 4
  br label %900

438:                                              ; preds = %423
  br label %439

439:                                              ; preds = %438, %418
  %440 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 35
  %441 = load i32, ptr %440, align 8, !tbaa !33
  %442 = icmp ne i32 %441, 0
  br i1 %442, label %443, label %456

443:                                              ; preds = %439
  %444 = load ptr, ptr %13, align 8, !tbaa !5
  %445 = getelementptr inbounds %struct.LodePNGState, ptr %444, i32 0, i32 1
  %446 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %445, i32 0, i32 0
  %447 = call noundef i32 @_ZL13addChunk_iCCPP8ucvectorPK11LodePNGInfoP23LodePNGCompressSettings(ptr noundef %16, ptr noundef %17, ptr noundef %446)
  %448 = load ptr, ptr %13, align 8, !tbaa !5
  %449 = getelementptr inbounds %struct.LodePNGState, ptr %448, i32 0, i32 4
  store i32 %447, ptr %449, align 8, !tbaa !13
  %450 = load ptr, ptr %13, align 8, !tbaa !5
  %451 = getelementptr inbounds %struct.LodePNGState, ptr %450, i32 0, i32 4
  %452 = load i32, ptr %451, align 8, !tbaa !13
  %453 = icmp ne i32 %452, 0
  br i1 %453, label %454, label %455

454:                                              ; preds = %443
  store i32 2, ptr %24, align 4
  br label %900

455:                                              ; preds = %443
  br label %456

456:                                              ; preds = %455, %439
  %457 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 33
  %458 = load i32, ptr %457, align 8, !tbaa !44
  %459 = icmp ne i32 %458, 0
  br i1 %459, label %460, label %470

460:                                              ; preds = %456
  %461 = call noundef i32 @_ZL13addChunk_sRGBP8ucvectorPK11LodePNGInfo(ptr noundef %16, ptr noundef %17)
  %462 = load ptr, ptr %13, align 8, !tbaa !5
  %463 = getelementptr inbounds %struct.LodePNGState, ptr %462, i32 0, i32 4
  store i32 %461, ptr %463, align 8, !tbaa !13
  %464 = load ptr, ptr %13, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.LodePNGState, ptr %464, i32 0, i32 4
  %466 = load i32, ptr %465, align 8, !tbaa !13
  %467 = icmp ne i32 %466, 0
  br i1 %467, label %468, label %469

468:                                              ; preds = %460
  store i32 2, ptr %24, align 4
  br label %900

469:                                              ; preds = %460
  br label %470

470:                                              ; preds = %469, %456
  %471 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 22
  %472 = load i32, ptr %471, align 4, !tbaa !45
  %473 = icmp ne i32 %472, 0
  br i1 %473, label %474, label %484

474:                                              ; preds = %470
  %475 = call noundef i32 @_ZL13addChunk_gAMAP8ucvectorPK11LodePNGInfo(ptr noundef %16, ptr noundef %17)
  %476 = load ptr, ptr %13, align 8, !tbaa !5
  %477 = getelementptr inbounds %struct.LodePNGState, ptr %476, i32 0, i32 4
  store i32 %475, ptr %477, align 8, !tbaa !13
  %478 = load ptr, ptr %13, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.LodePNGState, ptr %478, i32 0, i32 4
  %480 = load i32, ptr %479, align 8, !tbaa !13
  %481 = icmp ne i32 %480, 0
  br i1 %481, label %482, label %483

482:                                              ; preds = %474
  store i32 2, ptr %24, align 4
  br label %900

483:                                              ; preds = %474
  br label %484

484:                                              ; preds = %483, %470
  %485 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 24
  %486 = load i32, ptr %485, align 4, !tbaa !46
  %487 = icmp ne i32 %486, 0
  br i1 %487, label %488, label %498

488:                                              ; preds = %484
  %489 = call noundef i32 @_ZL13addChunk_cHRMP8ucvectorPK11LodePNGInfo(ptr noundef %16, ptr noundef %17)
  %490 = load ptr, ptr %13, align 8, !tbaa !5
  %491 = getelementptr inbounds %struct.LodePNGState, ptr %490, i32 0, i32 4
  store i32 %489, ptr %491, align 8, !tbaa !13
  %492 = load ptr, ptr %13, align 8, !tbaa !5
  %493 = getelementptr inbounds %struct.LodePNGState, ptr %492, i32 0, i32 4
  %494 = load i32, ptr %493, align 8, !tbaa !13
  %495 = icmp ne i32 %494, 0
  br i1 %495, label %496, label %497

496:                                              ; preds = %488
  store i32 2, ptr %24, align 4
  br label %900

497:                                              ; preds = %488
  br label %498

498:                                              ; preds = %497, %484
  %499 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %500 = getelementptr inbounds %struct.LodePNGColorMode, ptr %499, i32 0, i32 0
  %501 = load i32, ptr %500, align 8, !tbaa !24
  %502 = icmp eq i32 %501, 3
  br i1 %502, label %503, label %514

503:                                              ; preds = %498
  %504 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %505 = call noundef i32 @_ZL13addChunk_PLTEP8ucvectorPK16LodePNGColorMode(ptr noundef %16, ptr noundef %504)
  %506 = load ptr, ptr %13, align 8, !tbaa !5
  %507 = getelementptr inbounds %struct.LodePNGState, ptr %506, i32 0, i32 4
  store i32 %505, ptr %507, align 8, !tbaa !13
  %508 = load ptr, ptr %13, align 8, !tbaa !5
  %509 = getelementptr inbounds %struct.LodePNGState, ptr %508, i32 0, i32 4
  %510 = load i32, ptr %509, align 8, !tbaa !13
  %511 = icmp ne i32 %510, 0
  br i1 %511, label %512, label %513

512:                                              ; preds = %503
  store i32 2, ptr %24, align 4
  br label %900

513:                                              ; preds = %503
  br label %514

514:                                              ; preds = %513, %498
  %515 = load ptr, ptr %13, align 8, !tbaa !5
  %516 = getelementptr inbounds %struct.LodePNGState, ptr %515, i32 0, i32 1
  %517 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %516, i32 0, i32 5
  %518 = load i32, ptr %517, align 8, !tbaa !25
  %519 = icmp ne i32 %518, 0
  br i1 %519, label %520, label %541

520:                                              ; preds = %514
  %521 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %522 = getelementptr inbounds %struct.LodePNGColorMode, ptr %521, i32 0, i32 0
  %523 = load i32, ptr %522, align 8, !tbaa !24
  %524 = icmp eq i32 %523, 2
  br i1 %524, label %530, label %525

525:                                              ; preds = %520
  %526 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %527 = getelementptr inbounds %struct.LodePNGColorMode, ptr %526, i32 0, i32 0
  %528 = load i32, ptr %527, align 8, !tbaa !24
  %529 = icmp eq i32 %528, 6
  br i1 %529, label %530, label %541

530:                                              ; preds = %525, %520
  %531 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %532 = call noundef i32 @_ZL13addChunk_PLTEP8ucvectorPK16LodePNGColorMode(ptr noundef %16, ptr noundef %531)
  %533 = load ptr, ptr %13, align 8, !tbaa !5
  %534 = getelementptr inbounds %struct.LodePNGState, ptr %533, i32 0, i32 4
  store i32 %532, ptr %534, align 8, !tbaa !13
  %535 = load ptr, ptr %13, align 8, !tbaa !5
  %536 = getelementptr inbounds %struct.LodePNGState, ptr %535, i32 0, i32 4
  %537 = load i32, ptr %536, align 8, !tbaa !13
  %538 = icmp ne i32 %537, 0
  br i1 %538, label %539, label %540

539:                                              ; preds = %530
  store i32 2, ptr %24, align 4
  br label %900

540:                                              ; preds = %530
  br label %541

541:                                              ; preds = %540, %525, %514
  %542 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 3
  %543 = call noundef i32 @_ZL13addChunk_tRNSP8ucvectorPK16LodePNGColorMode(ptr noundef %16, ptr noundef %542)
  %544 = load ptr, ptr %13, align 8, !tbaa !5
  %545 = getelementptr inbounds %struct.LodePNGState, ptr %544, i32 0, i32 4
  store i32 %543, ptr %545, align 8, !tbaa !13
  %546 = load ptr, ptr %13, align 8, !tbaa !5
  %547 = getelementptr inbounds %struct.LodePNGState, ptr %546, i32 0, i32 4
  %548 = load i32, ptr %547, align 8, !tbaa !13
  %549 = icmp ne i32 %548, 0
  br i1 %549, label %550, label %551

550:                                              ; preds = %541
  store i32 2, ptr %24, align 4
  br label %900

551:                                              ; preds = %541
  %552 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 4
  %553 = load i32, ptr %552, align 8, !tbaa !40
  %554 = icmp ne i32 %553, 0
  br i1 %554, label %555, label %565

555:                                              ; preds = %551
  %556 = call noundef i32 @_ZL13addChunk_bKGDP8ucvectorPK11LodePNGInfo(ptr noundef %16, ptr noundef %17)
  %557 = load ptr, ptr %13, align 8, !tbaa !5
  %558 = getelementptr inbounds %struct.LodePNGState, ptr %557, i32 0, i32 4
  store i32 %556, ptr %558, align 8, !tbaa !13
  %559 = load ptr, ptr %13, align 8, !tbaa !5
  %560 = getelementptr inbounds %struct.LodePNGState, ptr %559, i32 0, i32 4
  %561 = load i32, ptr %560, align 8, !tbaa !13
  %562 = icmp ne i32 %561, 0
  br i1 %562, label %563, label %564

563:                                              ; preds = %555
  store i32 2, ptr %24, align 4
  br label %900

564:                                              ; preds = %555
  br label %565

565:                                              ; preds = %564, %551
  %566 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 18
  %567 = load i32, ptr %566, align 4, !tbaa !47
  %568 = icmp ne i32 %567, 0
  br i1 %568, label %569, label %579

569:                                              ; preds = %565
  %570 = call noundef i32 @_ZL13addChunk_pHYsP8ucvectorPK11LodePNGInfo(ptr noundef %16, ptr noundef %17)
  %571 = load ptr, ptr %13, align 8, !tbaa !5
  %572 = getelementptr inbounds %struct.LodePNGState, ptr %571, i32 0, i32 4
  store i32 %570, ptr %572, align 8, !tbaa !13
  %573 = load ptr, ptr %13, align 8, !tbaa !5
  %574 = getelementptr inbounds %struct.LodePNGState, ptr %573, i32 0, i32 4
  %575 = load i32, ptr %574, align 8, !tbaa !13
  %576 = icmp ne i32 %575, 0
  br i1 %576, label %577, label %578

577:                                              ; preds = %569
  store i32 2, ptr %24, align 4
  br label %900

578:                                              ; preds = %569
  br label %579

579:                                              ; preds = %578, %565
  %580 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 39
  %581 = getelementptr inbounds [3 x ptr], ptr %580, i64 0, i64 1
  %582 = load ptr, ptr %581, align 8, !tbaa !5
  %583 = icmp ne ptr %582, null
  br i1 %583, label %584, label %600

584:                                              ; preds = %579
  %585 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 39
  %586 = getelementptr inbounds [3 x ptr], ptr %585, i64 0, i64 1
  %587 = load ptr, ptr %586, align 8, !tbaa !5
  %588 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 40
  %589 = getelementptr inbounds [3 x i64], ptr %588, i64 0, i64 1
  %590 = load i64, ptr %589, align 8, !tbaa !11
  %591 = call noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef %16, ptr noundef %587, i64 noundef %590)
  %592 = load ptr, ptr %13, align 8, !tbaa !5
  %593 = getelementptr inbounds %struct.LodePNGState, ptr %592, i32 0, i32 4
  store i32 %591, ptr %593, align 8, !tbaa !13
  %594 = load ptr, ptr %13, align 8, !tbaa !5
  %595 = getelementptr inbounds %struct.LodePNGState, ptr %594, i32 0, i32 4
  %596 = load i32, ptr %595, align 8, !tbaa !13
  %597 = icmp ne i32 %596, 0
  br i1 %597, label %598, label %599

598:                                              ; preds = %584
  store i32 2, ptr %24, align 4
  br label %900

599:                                              ; preds = %584
  br label %600

600:                                              ; preds = %599, %579
  %601 = load ptr, ptr %14, align 8, !tbaa !5
  %602 = load i64, ptr %15, align 8, !tbaa !11
  %603 = load ptr, ptr %13, align 8, !tbaa !5
  %604 = getelementptr inbounds %struct.LodePNGState, ptr %603, i32 0, i32 1
  %605 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %604, i32 0, i32 0
  %606 = call noundef i32 @_ZL13addChunk_IDATP8ucvectorPKhmP23LodePNGCompressSettings(ptr noundef %16, ptr noundef %601, i64 noundef %602, ptr noundef %605)
  %607 = load ptr, ptr %13, align 8, !tbaa !5
  %608 = getelementptr inbounds %struct.LodePNGState, ptr %607, i32 0, i32 4
  store i32 %606, ptr %608, align 8, !tbaa !13
  %609 = load ptr, ptr %13, align 8, !tbaa !5
  %610 = getelementptr inbounds %struct.LodePNGState, ptr %609, i32 0, i32 4
  %611 = load i32, ptr %610, align 8, !tbaa !13
  %612 = icmp ne i32 %611, 0
  br i1 %612, label %613, label %614

613:                                              ; preds = %600
  store i32 2, ptr %24, align 4
  br label %900

614:                                              ; preds = %600
  %615 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 16
  %616 = load i32, ptr %615, align 8, !tbaa !48
  %617 = icmp ne i32 %616, 0
  br i1 %617, label %618, label %629

618:                                              ; preds = %614
  %619 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 17
  %620 = call noundef i32 @_ZL13addChunk_tIMEP8ucvectorPK11LodePNGTime(ptr noundef %16, ptr noundef %619)
  %621 = load ptr, ptr %13, align 8, !tbaa !5
  %622 = getelementptr inbounds %struct.LodePNGState, ptr %621, i32 0, i32 4
  store i32 %620, ptr %622, align 8, !tbaa !13
  %623 = load ptr, ptr %13, align 8, !tbaa !5
  %624 = getelementptr inbounds %struct.LodePNGState, ptr %623, i32 0, i32 4
  %625 = load i32, ptr %624, align 8, !tbaa !13
  %626 = icmp ne i32 %625, 0
  br i1 %626, label %627, label %628

627:                                              ; preds = %618
  store i32 2, ptr %24, align 4
  br label %900

628:                                              ; preds = %618
  br label %629

629:                                              ; preds = %628, %614
  store i64 0, ptr %30, align 8, !tbaa !11
  br label %630

630:                                              ; preds = %707, %629
  %631 = load i64, ptr %30, align 8, !tbaa !11
  %632 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 8
  %633 = load i64, ptr %632, align 8, !tbaa !49
  %634 = icmp ne i64 %631, %633
  br i1 %634, label %635, label %710

635:                                              ; preds = %630
  %636 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 9
  %637 = load ptr, ptr %636, align 8, !tbaa !50
  %638 = load i64, ptr %30, align 8, !tbaa !11
  %639 = getelementptr inbounds ptr, ptr %637, i64 %638
  %640 = load ptr, ptr %639, align 8, !tbaa !5
  %641 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %640)
  %642 = icmp ugt i64 %641, 79
  br i1 %642, label %643, label %646

643:                                              ; preds = %635
  %644 = load ptr, ptr %13, align 8, !tbaa !5
  %645 = getelementptr inbounds %struct.LodePNGState, ptr %644, i32 0, i32 4
  store i32 66, ptr %645, align 8, !tbaa !13
  store i32 2, ptr %24, align 4
  br label %900

646:                                              ; preds = %635
  %647 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 9
  %648 = load ptr, ptr %647, align 8, !tbaa !50
  %649 = load i64, ptr %30, align 8, !tbaa !11
  %650 = getelementptr inbounds ptr, ptr %648, i64 %649
  %651 = load ptr, ptr %650, align 8, !tbaa !5
  %652 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %651)
  %653 = icmp ult i64 %652, 1
  br i1 %653, label %654, label %657

654:                                              ; preds = %646
  %655 = load ptr, ptr %13, align 8, !tbaa !5
  %656 = getelementptr inbounds %struct.LodePNGState, ptr %655, i32 0, i32 4
  store i32 67, ptr %656, align 8, !tbaa !13
  store i32 2, ptr %24, align 4
  br label %900

657:                                              ; preds = %646
  %658 = load ptr, ptr %13, align 8, !tbaa !5
  %659 = getelementptr inbounds %struct.LodePNGState, ptr %658, i32 0, i32 1
  %660 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %659, i32 0, i32 7
  %661 = load i32, ptr %660, align 8, !tbaa !51
  %662 = icmp ne i32 %661, 0
  br i1 %662, label %663, label %686

663:                                              ; preds = %657
  %664 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 9
  %665 = load ptr, ptr %664, align 8, !tbaa !50
  %666 = load i64, ptr %30, align 8, !tbaa !11
  %667 = getelementptr inbounds ptr, ptr %665, i64 %666
  %668 = load ptr, ptr %667, align 8, !tbaa !5
  %669 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 10
  %670 = load ptr, ptr %669, align 8, !tbaa !52
  %671 = load i64, ptr %30, align 8, !tbaa !11
  %672 = getelementptr inbounds ptr, ptr %670, i64 %671
  %673 = load ptr, ptr %672, align 8, !tbaa !5
  %674 = load ptr, ptr %13, align 8, !tbaa !5
  %675 = getelementptr inbounds %struct.LodePNGState, ptr %674, i32 0, i32 1
  %676 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %675, i32 0, i32 0
  %677 = call noundef i32 @_ZL13addChunk_zTXtP8ucvectorPKcS2_P23LodePNGCompressSettings(ptr noundef %16, ptr noundef %668, ptr noundef %673, ptr noundef %676)
  %678 = load ptr, ptr %13, align 8, !tbaa !5
  %679 = getelementptr inbounds %struct.LodePNGState, ptr %678, i32 0, i32 4
  store i32 %677, ptr %679, align 8, !tbaa !13
  %680 = load ptr, ptr %13, align 8, !tbaa !5
  %681 = getelementptr inbounds %struct.LodePNGState, ptr %680, i32 0, i32 4
  %682 = load i32, ptr %681, align 8, !tbaa !13
  %683 = icmp ne i32 %682, 0
  br i1 %683, label %684, label %685

684:                                              ; preds = %663
  store i32 2, ptr %24, align 4
  br label %900

685:                                              ; preds = %663
  br label %706

686:                                              ; preds = %657
  %687 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 9
  %688 = load ptr, ptr %687, align 8, !tbaa !50
  %689 = load i64, ptr %30, align 8, !tbaa !11
  %690 = getelementptr inbounds ptr, ptr %688, i64 %689
  %691 = load ptr, ptr %690, align 8, !tbaa !5
  %692 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 10
  %693 = load ptr, ptr %692, align 8, !tbaa !52
  %694 = load i64, ptr %30, align 8, !tbaa !11
  %695 = getelementptr inbounds ptr, ptr %693, i64 %694
  %696 = load ptr, ptr %695, align 8, !tbaa !5
  %697 = call noundef i32 @_ZL13addChunk_tEXtP8ucvectorPKcS2_(ptr noundef %16, ptr noundef %691, ptr noundef %696)
  %698 = load ptr, ptr %13, align 8, !tbaa !5
  %699 = getelementptr inbounds %struct.LodePNGState, ptr %698, i32 0, i32 4
  store i32 %697, ptr %699, align 8, !tbaa !13
  %700 = load ptr, ptr %13, align 8, !tbaa !5
  %701 = getelementptr inbounds %struct.LodePNGState, ptr %700, i32 0, i32 4
  %702 = load i32, ptr %701, align 8, !tbaa !13
  %703 = icmp ne i32 %702, 0
  br i1 %703, label %704, label %705

704:                                              ; preds = %686
  store i32 2, ptr %24, align 4
  br label %900

705:                                              ; preds = %686
  br label %706

706:                                              ; preds = %705, %685
  br label %707

707:                                              ; preds = %706
  %708 = load i64, ptr %30, align 8, !tbaa !11
  %709 = add i64 %708, 1
  store i64 %709, ptr %30, align 8, !tbaa !11
  br label %630, !llvm.loop !53

710:                                              ; preds = %630
  %711 = load ptr, ptr %13, align 8, !tbaa !5
  %712 = getelementptr inbounds %struct.LodePNGState, ptr %711, i32 0, i32 1
  %713 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %712, i32 0, i32 6
  %714 = load i32, ptr %713, align 4, !tbaa !55
  %715 = icmp ne i32 %714, 0
  br i1 %715, label %716, label %801

716:                                              ; preds = %710
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  store i32 0, ptr %31, align 4, !tbaa !9
  store i64 0, ptr %30, align 8, !tbaa !11
  br label %717

717:                                              ; preds = %780, %716
  %718 = load i64, ptr %30, align 8, !tbaa !11
  %719 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 8
  %720 = load i64, ptr %719, align 8, !tbaa !49
  %721 = icmp ne i64 %718, %720
  br i1 %721, label %722, label %783

722:                                              ; preds = %717
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  %723 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 9
  %724 = load ptr, ptr %723, align 8, !tbaa !50
  %725 = load i64, ptr %30, align 8, !tbaa !11
  %726 = getelementptr inbounds ptr, ptr %724, i64 %725
  %727 = load ptr, ptr %726, align 8, !tbaa !5
  store ptr %727, ptr %32, align 8, !tbaa !5
  %728 = load ptr, ptr %32, align 8, !tbaa !5
  %729 = getelementptr inbounds i8, ptr %728, i64 0
  %730 = load i8, ptr %729, align 1, !tbaa !56
  %731 = sext i8 %730 to i32
  %732 = icmp eq i32 %731, 76
  br i1 %732, label %733, label %776

733:                                              ; preds = %722
  %734 = load ptr, ptr %32, align 8, !tbaa !5
  %735 = getelementptr inbounds i8, ptr %734, i64 1
  %736 = load i8, ptr %735, align 1, !tbaa !56
  %737 = sext i8 %736 to i32
  %738 = icmp eq i32 %737, 111
  br i1 %738, label %739, label %776

739:                                              ; preds = %733
  %740 = load ptr, ptr %32, align 8, !tbaa !5
  %741 = getelementptr inbounds i8, ptr %740, i64 2
  %742 = load i8, ptr %741, align 1, !tbaa !56
  %743 = sext i8 %742 to i32
  %744 = icmp eq i32 %743, 100
  br i1 %744, label %745, label %776

745:                                              ; preds = %739
  %746 = load ptr, ptr %32, align 8, !tbaa !5
  %747 = getelementptr inbounds i8, ptr %746, i64 3
  %748 = load i8, ptr %747, align 1, !tbaa !56
  %749 = sext i8 %748 to i32
  %750 = icmp eq i32 %749, 101
  br i1 %750, label %751, label %776

751:                                              ; preds = %745
  %752 = load ptr, ptr %32, align 8, !tbaa !5
  %753 = getelementptr inbounds i8, ptr %752, i64 4
  %754 = load i8, ptr %753, align 1, !tbaa !56
  %755 = sext i8 %754 to i32
  %756 = icmp eq i32 %755, 80
  br i1 %756, label %757, label %776

757:                                              ; preds = %751
  %758 = load ptr, ptr %32, align 8, !tbaa !5
  %759 = getelementptr inbounds i8, ptr %758, i64 5
  %760 = load i8, ptr %759, align 1, !tbaa !56
  %761 = sext i8 %760 to i32
  %762 = icmp eq i32 %761, 78
  br i1 %762, label %763, label %776

763:                                              ; preds = %757
  %764 = load ptr, ptr %32, align 8, !tbaa !5
  %765 = getelementptr inbounds i8, ptr %764, i64 6
  %766 = load i8, ptr %765, align 1, !tbaa !56
  %767 = sext i8 %766 to i32
  %768 = icmp eq i32 %767, 71
  br i1 %768, label %769, label %776

769:                                              ; preds = %763
  %770 = load ptr, ptr %32, align 8, !tbaa !5
  %771 = getelementptr inbounds i8, ptr %770, i64 7
  %772 = load i8, ptr %771, align 1, !tbaa !56
  %773 = sext i8 %772 to i32
  %774 = icmp eq i32 %773, 0
  br i1 %774, label %775, label %776

775:                                              ; preds = %769
  store i32 1, ptr %31, align 4, !tbaa !9
  store i32 6, ptr %24, align 4
  br label %777

776:                                              ; preds = %769, %763, %757, %751, %745, %739, %733, %722
  store i32 0, ptr %24, align 4
  br label %777

777:                                              ; preds = %776, %775
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  %778 = load i32, ptr %24, align 4
  switch i32 %778, label %916 [
    i32 0, label %779
    i32 6, label %783
  ]

779:                                              ; preds = %777
  br label %780

780:                                              ; preds = %779
  %781 = load i64, ptr %30, align 8, !tbaa !11
  %782 = add i64 %781, 1
  store i64 %782, ptr %30, align 8, !tbaa !11
  br label %717, !llvm.loop !57

783:                                              ; preds = %777, %717
  %784 = load i32, ptr %31, align 4, !tbaa !9
  %785 = icmp eq i32 %784, 0
  br i1 %785, label %786, label %797

786:                                              ; preds = %783
  %787 = load ptr, ptr @LODEPNG_VERSION_STRING, align 8, !tbaa !5
  %788 = call noundef i32 @_ZL13addChunk_tEXtP8ucvectorPKcS2_(ptr noundef %16, ptr noundef @.str.15, ptr noundef %787)
  %789 = load ptr, ptr %13, align 8, !tbaa !5
  %790 = getelementptr inbounds %struct.LodePNGState, ptr %789, i32 0, i32 4
  store i32 %788, ptr %790, align 8, !tbaa !13
  %791 = load ptr, ptr %13, align 8, !tbaa !5
  %792 = getelementptr inbounds %struct.LodePNGState, ptr %791, i32 0, i32 4
  %793 = load i32, ptr %792, align 8, !tbaa !13
  %794 = icmp ne i32 %793, 0
  br i1 %794, label %795, label %796

795:                                              ; preds = %786
  store i32 2, ptr %24, align 4
  br label %798

796:                                              ; preds = %786
  br label %797

797:                                              ; preds = %796, %783
  store i32 0, ptr %24, align 4
  br label %798

798:                                              ; preds = %797, %795
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  %799 = load i32, ptr %24, align 4
  switch i32 %799, label %900 [
    i32 0, label %800
  ]

800:                                              ; preds = %798
  br label %801

801:                                              ; preds = %800, %710
  store i64 0, ptr %30, align 8, !tbaa !11
  br label %802

802:                                              ; preds = %866, %801
  %803 = load i64, ptr %30, align 8, !tbaa !11
  %804 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 11
  %805 = load i64, ptr %804, align 8, !tbaa !58
  %806 = icmp ne i64 %803, %805
  br i1 %806, label %807, label %869

807:                                              ; preds = %802
  %808 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 12
  %809 = load ptr, ptr %808, align 8, !tbaa !59
  %810 = load i64, ptr %30, align 8, !tbaa !11
  %811 = getelementptr inbounds ptr, ptr %809, i64 %810
  %812 = load ptr, ptr %811, align 8, !tbaa !5
  %813 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %812)
  %814 = icmp ugt i64 %813, 79
  br i1 %814, label %815, label %818

815:                                              ; preds = %807
  %816 = load ptr, ptr %13, align 8, !tbaa !5
  %817 = getelementptr inbounds %struct.LodePNGState, ptr %816, i32 0, i32 4
  store i32 66, ptr %817, align 8, !tbaa !13
  store i32 2, ptr %24, align 4
  br label %900

818:                                              ; preds = %807
  %819 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 12
  %820 = load ptr, ptr %819, align 8, !tbaa !59
  %821 = load i64, ptr %30, align 8, !tbaa !11
  %822 = getelementptr inbounds ptr, ptr %820, i64 %821
  %823 = load ptr, ptr %822, align 8, !tbaa !5
  %824 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %823)
  %825 = icmp ult i64 %824, 1
  br i1 %825, label %826, label %829

826:                                              ; preds = %818
  %827 = load ptr, ptr %13, align 8, !tbaa !5
  %828 = getelementptr inbounds %struct.LodePNGState, ptr %827, i32 0, i32 4
  store i32 67, ptr %828, align 8, !tbaa !13
  store i32 2, ptr %24, align 4
  br label %900

829:                                              ; preds = %818
  %830 = load ptr, ptr %13, align 8, !tbaa !5
  %831 = getelementptr inbounds %struct.LodePNGState, ptr %830, i32 0, i32 1
  %832 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %831, i32 0, i32 7
  %833 = load i32, ptr %832, align 8, !tbaa !51
  %834 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 12
  %835 = load ptr, ptr %834, align 8, !tbaa !59
  %836 = load i64, ptr %30, align 8, !tbaa !11
  %837 = getelementptr inbounds ptr, ptr %835, i64 %836
  %838 = load ptr, ptr %837, align 8, !tbaa !5
  %839 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 13
  %840 = load ptr, ptr %839, align 8, !tbaa !60
  %841 = load i64, ptr %30, align 8, !tbaa !11
  %842 = getelementptr inbounds ptr, ptr %840, i64 %841
  %843 = load ptr, ptr %842, align 8, !tbaa !5
  %844 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 14
  %845 = load ptr, ptr %844, align 8, !tbaa !61
  %846 = load i64, ptr %30, align 8, !tbaa !11
  %847 = getelementptr inbounds ptr, ptr %845, i64 %846
  %848 = load ptr, ptr %847, align 8, !tbaa !5
  %849 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 15
  %850 = load ptr, ptr %849, align 8, !tbaa !62
  %851 = load i64, ptr %30, align 8, !tbaa !11
  %852 = getelementptr inbounds ptr, ptr %850, i64 %851
  %853 = load ptr, ptr %852, align 8, !tbaa !5
  %854 = load ptr, ptr %13, align 8, !tbaa !5
  %855 = getelementptr inbounds %struct.LodePNGState, ptr %854, i32 0, i32 1
  %856 = getelementptr inbounds %struct.LodePNGEncoderSettings, ptr %855, i32 0, i32 0
  %857 = call noundef i32 @_ZL13addChunk_iTXtP8ucvectorjPKcS2_S2_S2_P23LodePNGCompressSettings(ptr noundef %16, i32 noundef %833, ptr noundef %838, ptr noundef %843, ptr noundef %848, ptr noundef %853, ptr noundef %856)
  %858 = load ptr, ptr %13, align 8, !tbaa !5
  %859 = getelementptr inbounds %struct.LodePNGState, ptr %858, i32 0, i32 4
  store i32 %857, ptr %859, align 8, !tbaa !13
  %860 = load ptr, ptr %13, align 8, !tbaa !5
  %861 = getelementptr inbounds %struct.LodePNGState, ptr %860, i32 0, i32 4
  %862 = load i32, ptr %861, align 8, !tbaa !13
  %863 = icmp ne i32 %862, 0
  br i1 %863, label %864, label %865

864:                                              ; preds = %829
  store i32 2, ptr %24, align 4
  br label %900

865:                                              ; preds = %829
  br label %866

866:                                              ; preds = %865
  %867 = load i64, ptr %30, align 8, !tbaa !11
  %868 = add i64 %867, 1
  store i64 %868, ptr %30, align 8, !tbaa !11
  br label %802, !llvm.loop !63

869:                                              ; preds = %802
  %870 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 39
  %871 = getelementptr inbounds [3 x ptr], ptr %870, i64 0, i64 2
  %872 = load ptr, ptr %871, align 8, !tbaa !5
  %873 = icmp ne ptr %872, null
  br i1 %873, label %874, label %890

874:                                              ; preds = %869
  %875 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 39
  %876 = getelementptr inbounds [3 x ptr], ptr %875, i64 0, i64 2
  %877 = load ptr, ptr %876, align 8, !tbaa !5
  %878 = getelementptr inbounds %struct.LodePNGInfo, ptr %17, i32 0, i32 40
  %879 = getelementptr inbounds [3 x i64], ptr %878, i64 0, i64 2
  %880 = load i64, ptr %879, align 8, !tbaa !11
  %881 = call noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef %16, ptr noundef %877, i64 noundef %880)
  %882 = load ptr, ptr %13, align 8, !tbaa !5
  %883 = getelementptr inbounds %struct.LodePNGState, ptr %882, i32 0, i32 4
  store i32 %881, ptr %883, align 8, !tbaa !13
  %884 = load ptr, ptr %13, align 8, !tbaa !5
  %885 = getelementptr inbounds %struct.LodePNGState, ptr %884, i32 0, i32 4
  %886 = load i32, ptr %885, align 8, !tbaa !13
  %887 = icmp ne i32 %886, 0
  br i1 %887, label %888, label %889

888:                                              ; preds = %874
  store i32 2, ptr %24, align 4
  br label %900

889:                                              ; preds = %874
  br label %890

890:                                              ; preds = %889, %869
  %891 = call noundef i32 @_ZL13addChunk_IENDP8ucvector(ptr noundef %16)
  %892 = load ptr, ptr %13, align 8, !tbaa !5
  %893 = getelementptr inbounds %struct.LodePNGState, ptr %892, i32 0, i32 4
  store i32 %891, ptr %893, align 8, !tbaa !13
  %894 = load ptr, ptr %13, align 8, !tbaa !5
  %895 = getelementptr inbounds %struct.LodePNGState, ptr %894, i32 0, i32 4
  %896 = load i32, ptr %895, align 8, !tbaa !13
  %897 = icmp ne i32 %896, 0
  br i1 %897, label %898, label %899

898:                                              ; preds = %890
  store i32 2, ptr %24, align 4
  br label %900

899:                                              ; preds = %890
  store i32 0, ptr %24, align 4
  br label %900

900:                                              ; preds = %899, %898, %888, %864, %826, %815, %798, %704, %684, %654, %643, %627, %613, %598, %577, %563, %550, %539, %512, %496, %482, %468, %454, %437, %417, %398
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  %901 = load i32, ptr %24, align 4
  switch i32 %901, label %914 [
    i32 0, label %902
    i32 2, label %903
  ]

902:                                              ; preds = %900
  br label %903

903:                                              ; preds = %902, %900, %388, %372, %303, %245, %116, %99, %80, %72, %62
  call void @_Z20lodepng_info_cleanupP11LodePNGInfo(ptr noundef %17)
  %904 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZL12lodepng_freePv(ptr noundef %904)
  %905 = getelementptr inbounds %struct.ucvector, ptr %16, i32 0, i32 0
  %906 = load ptr, ptr %905, align 8, !tbaa !64
  %907 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %906, ptr %907, align 8, !tbaa !5
  %908 = getelementptr inbounds %struct.ucvector, ptr %16, i32 0, i32 1
  %909 = load i64, ptr %908, align 8, !tbaa !66
  %910 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 %909, ptr %910, align 8, !tbaa !11
  %911 = load ptr, ptr %13, align 8, !tbaa !5
  %912 = getelementptr inbounds %struct.LodePNGState, ptr %911, i32 0, i32 4
  %913 = load i32, ptr %912, align 8, !tbaa !13
  store i32 %913, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %914

914:                                              ; preds = %903, %900, %372, %303, %245
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 312, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %915 = load i32, ptr %7, align 4
  ret i32 %915

916:                                              ; preds = %777
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL16isGrayICCProfilePKhj(ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL15isRGBICCProfilePKhj(ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL23lodepng_color_stats_addP17LodePNGColorStatsjjjj(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17auto_choose_colorP16LodePNGColorModePKS_PK17LodePNGColorStats(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19preProcessScanlinesPPhPmPKhjjPK11LodePNGInfoPK22LodePNGEncoderSettings(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL14writeSignatureP8ucvector(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_IHDRP8ucvectorjj16LodePNGColorTypejj(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_iCCPP8ucvectorPK11LodePNGInfoP23LodePNGCompressSettings(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_sRGBP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_gAMAP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_cHRMP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_PLTEP8ucvectorPK16LodePNGColorMode(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_tRNSP8ucvectorPK16LodePNGColorMode(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_bKGDP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_pHYsP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_IDATP8ucvectorPKhmP23LodePNGCompressSettings(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_tIMEP8ucvectorPK11LodePNGTime(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_zTXtP8ucvectorPKcS2_P23LodePNGCompressSettings(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_tEXtP8ucvectorPKcS2_(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_iTXtP8ucvectorjPKcS2_S2_S2_P23LodePNGCompressSettings(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_IENDP8ucvector(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = !{!14, !10, i64 496}
!14 = !{!"_ZTS12LodePNGState", !15, i64 0, !17, i64 56, !20, i64 144, !22, i64 184, !10, i64 496}
!15 = !{!"_ZTS22LodePNGDecoderSettings", !16, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52}
!16 = !{!"_ZTS25LodePNGDecompressSettings", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTS22LodePNGEncoderSettings", !18, i64 0, !10, i64 48, !10, i64 52, !19, i64 56, !6, i64 64, !10, i64 72, !10, i64 76, !10, i64 80}
!18 = !{!"_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}
!19 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!20 = !{!"_ZTS16LodePNGColorMode", !21, i64 0, !10, i64 4, !6, i64 8, !12, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36}
!21 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!22 = !{!"_ZTS11LodePNGInfo", !10, i64 0, !10, i64 4, !10, i64 8, !20, 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, !23, 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}
!23 = !{!"_ZTS11LodePNGTime", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!24 = !{!22, !21, i64 16}
!25 = !{!14, !10, i64 128}
!26 = !{!22, !12, i64 32}
!27 = !{!14, !10, i64 56}
!28 = !{!22, !10, i64 8}
!29 = !{!22, !10, i64 20}
!30 = !{!14, !21, i64 144}
!31 = !{!14, !10, i64 148}
!32 = !{!14, !10, i64 104}
!33 = !{!22, !10, i64 232}
!34 = !{!22, !6, i64 248}
!35 = !{!22, !10, i64 256}
!36 = !{!37, !10, i64 1064}
!37 = !{!"_ZTS17LodePNGColorStats", !10, i64 0, !10, i64 4, !38, i64 8, !38, i64 10, !38, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !10, i64 1048, !12, i64 1056, !10, i64 1064, !10, i64 1068}
!38 = !{!"short", !7, i64 0}
!39 = !{!37, !10, i64 1068}
!40 = !{!22, !10, i64 56}
!41 = !{!22, !10, i64 60}
!42 = !{!22, !10, i64 64}
!43 = !{!22, !10, i64 68}
!44 = !{!22, !10, i64 224}
!45 = !{!22, !10, i64 180}
!46 = !{!22, !10, i64 188}
!47 = !{!22, !10, i64 164}
!48 = !{!22, !10, i64 136}
!49 = !{!22, !12, i64 72}
!50 = !{!22, !6, i64 80}
!51 = !{!14, !10, i64 136}
!52 = !{!22, !6, i64 88}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}
!55 = !{!14, !10, i64 132}
!56 = !{!7, !7, i64 0}
!57 = distinct !{!57, !54}
!58 = !{!22, !12, i64 96}
!59 = !{!22, !6, i64 104}
!60 = !{!22, !6, i64 112}
!61 = !{!22, !6, i64 120}
!62 = !{!22, !6, i64 128}
!63 = distinct !{!63, !54}
!64 = !{!65, !6, i64 0}
!65 = !{!"_ZTS8ucvector", !6, i64 0, !12, i64 8, !12, i64 16}
!66 = !{!65, !12, i64 8}


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

%struct.ucvector = type { ptr, i64, i64 }
%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 }
%struct.LodePNGColorStats = type { i32, i32, i16, i16, i16, i32, i32, [1024 x i8], i32, i64, i32, i32 }

@LODEPNG_VERSION_STRING = external dso_local local_unnamed_addr global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [8 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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL14lodepng_mallocm(i64 noundef) local_unnamed_addr #1

; 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 nounwind uwtable
declare hidden void @_ZL12lodepng_freePv(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZL13ucvector_initPhm(ptr dead_on_unwind noalias writable sret(%struct.ucvector) align 8, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z23lodepng_color_mode_make16LodePNGColorTypej(ptr dead_on_unwind noalias writable sret(%struct.LodePNGColorMode) align 8, i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z19lodepng_convert_rgbPjS_S_jjjPK16LodePNGColorModeS2_(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL18checkColorValidity16LodePNGColorTypej(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z14lodepng_encodePPhPmPKhjjP12LodePNGState(ptr nocapture noundef writeonly %0, ptr nocapture noundef writeonly %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca %struct.ucvector, align 8
  %10 = alloca %struct.LodePNGInfo, align 8
  %11 = alloca %struct.LodePNGColorStats, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.LodePNGColorMode, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #3
  call void @_ZL13ucvector_initPhm(ptr dead_on_unwind nonnull writable sret(%struct.ucvector) align 8 %9, ptr noundef null, i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 312, ptr nonnull %10) #3
  %16 = getelementptr inbounds i8, ptr %5, i64 184
  call void @_Z17lodepng_info_initP11LodePNGInfo(ptr noundef nonnull %10)
  store ptr null, ptr %0, align 8, !tbaa !5
  store i64 0, ptr %1, align 8, !tbaa !9
  %17 = getelementptr inbounds i8, ptr %5, i64 496
  store i32 0, ptr %17, align 8, !tbaa !11
  %18 = getelementptr inbounds i8, ptr %5, i64 200
  %19 = load i32, ptr %18, align 8, !tbaa !23
  %20 = icmp eq i32 %19, 3
  br i1 %20, label %24, label %21

21:                                               ; preds = %6
  %22 = getelementptr inbounds i8, ptr %5, i64 128
  %23 = load i32, ptr %22, align 8, !tbaa !24
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %29, label %24

24:                                               ; preds = %21, %6
  %25 = getelementptr inbounds i8, ptr %5, i64 216
  %26 = load i64, ptr %25, align 8, !tbaa !25
  %27 = add i64 %26, -257
  %or.cond = icmp ult i64 %27, -256
  br i1 %or.cond, label %28, label %29

28:                                               ; preds = %24
  store i32 68, ptr %17, align 8, !tbaa !11
  br label %.thread280

29:                                               ; preds = %24, %21
  %30 = getelementptr inbounds i8, ptr %5, i64 56
  %31 = load i32, ptr %30, align 8, !tbaa !26
  %32 = icmp ugt i32 %31, 2
  br i1 %32, label %33, label %34

33:                                               ; preds = %29
  store i32 61, ptr %17, align 8, !tbaa !11
  br label %.thread280

34:                                               ; preds = %29
  %35 = getelementptr inbounds i8, ptr %5, i64 192
  %36 = load i32, ptr %35, align 8, !tbaa !27
  %37 = icmp ugt i32 %36, 1
  br i1 %37, label %38, label %39

38:                                               ; preds = %34
  store i32 71, ptr %17, align 8, !tbaa !11
  br label %.thread280

39:                                               ; preds = %34
  %40 = getelementptr inbounds i8, ptr %5, i64 204
  %41 = load i32, ptr %40, align 4, !tbaa !28
  %42 = call noundef i32 @_ZL18checkColorValidity16LodePNGColorTypej(i32 noundef %19, i32 noundef %41)
  store i32 %42, ptr %17, align 8, !tbaa !11
  %.not204 = icmp eq i32 %42, 0
  br i1 %.not204, label %43, label %.thread280

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %5, i64 144
  %45 = load i32, ptr %44, align 8, !tbaa !29
  %46 = getelementptr inbounds i8, ptr %5, i64 148
  %47 = load i32, ptr %46, align 4, !tbaa !30
  %48 = call noundef i32 @_ZL18checkColorValidity16LodePNGColorTypej(i32 noundef %45, i32 noundef %47)
  store i32 %48, ptr %17, align 8, !tbaa !11
  %.not205 = icmp eq i32 %48, 0
  br i1 %.not205, label %49, label %.thread280

49:                                               ; preds = %43
  %50 = call noundef i32 @_Z17lodepng_info_copyP11LodePNGInfoPKS_(ptr noundef nonnull %10, ptr noundef nonnull %16)
  %51 = getelementptr inbounds i8, ptr %5, i64 104
  %52 = load i32, ptr %51, align 8, !tbaa !31
  %.not206 = icmp eq i32 %52, 0
  br i1 %.not206, label %105, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 1072, ptr nonnull %11) #3
  call void @_Z24lodepng_color_stats_initP17LodePNGColorStats(ptr noundef nonnull %11)
  %54 = getelementptr inbounds i8, ptr %5, i64 416
  %55 = load i32, ptr %54, align 8, !tbaa !32
  %.not207 = icmp eq i32 %55, 0
  br i1 %.not207, label %.thread, label %56

56:                                               ; preds = %53
  %57 = getelementptr inbounds i8, ptr %5, i64 432
  %58 = load ptr, ptr %57, align 8, !tbaa !33
  %59 = getelementptr inbounds i8, ptr %5, i64 440
  %60 = load i32, ptr %59, align 8, !tbaa !34
  %61 = call noundef i32 @_ZL16isGrayICCProfilePKhj(ptr noundef %58, i32 noundef %60)
  %.not208 = icmp eq i32 %61, 0
  br i1 %.not208, label %64, label %62

62:                                               ; preds = %56
  %63 = getelementptr inbounds i8, ptr %11, i64 1064
  store i32 0, ptr %63, align 8, !tbaa !35
  br label %64

64:                                               ; preds = %62, %56
  %.pr = load i32, ptr %54, align 8, !tbaa !32
  %.not209 = icmp eq i32 %.pr, 0
  br i1 %.not209, label %.thread, label %65

65:                                               ; preds = %64
  %66 = load ptr, ptr %57, align 8, !tbaa !33
  %67 = load i32, ptr %59, align 8, !tbaa !34
  %68 = call noundef i32 @_ZL15isRGBICCProfilePKhj(ptr noundef %66, i32 noundef %67)
  %.not210 = icmp eq i32 %68, 0
  br i1 %.not210, label %.thread, label %69

69:                                               ; preds = %65
  %70 = getelementptr inbounds i8, ptr %11, i64 1068
  store i32 0, ptr %70, align 4, !tbaa !38
  br label %.thread

.thread:                                          ; preds = %53, %69, %65, %64
  %71 = call noundef i32 @_Z27lodepng_compute_color_statsP17LodePNGColorStatsPKhjjPK16LodePNGColorMode(ptr noundef nonnull %11, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef nonnull %44)
  store i32 %71, ptr %17, align 8, !tbaa !11
  %.not211 = icmp eq i32 %71, 0
  br i1 %.not211, label %72, label %.thread272

72:                                               ; preds = %.thread
  %73 = getelementptr inbounds i8, ptr %5, i64 240
  %74 = load i32, ptr %73, align 8, !tbaa !39
  %.not212 = icmp eq i32 %74, 0
  br i1 %.not212, label %87, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #3
  store i32 0, ptr %12, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #3
  store i32 0, ptr %13, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #3
  store i32 0, ptr %14, align 4, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #3
  call void @_Z23lodepng_color_mode_make16LodePNGColorTypej(ptr dead_on_unwind nonnull writable sret(%struct.LodePNGColorMode) align 8 %15, i32 noundef 2, i32 noundef 16)
  %76 = getelementptr inbounds i8, ptr %5, i64 244
  %77 = load i32, ptr %76, align 4, !tbaa !41
  %78 = getelementptr inbounds i8, ptr %5, i64 248
  %79 = load i32, ptr %78, align 8, !tbaa !42
  %80 = getelementptr inbounds i8, ptr %5, i64 252
  %81 = load i32, ptr %80, align 4, !tbaa !43
  %82 = call noundef i32 @_Z19lodepng_convert_rgbPjS_S_jjjPK16LodePNGColorModeS2_(ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull %14, i32 noundef %77, i32 noundef %79, i32 noundef %81, ptr noundef nonnull %15, ptr noundef nonnull %18)
  %83 = load i32, ptr %12, align 4, !tbaa !40
  %84 = load i32, ptr %13, align 4, !tbaa !40
  %85 = load i32, ptr %14, align 4, !tbaa !40
  %86 = call noundef i32 @_ZL23lodepng_color_stats_addP17LodePNGColorStatsjjjj(ptr noundef nonnull %11, i32 noundef %83, i32 noundef %84, i32 noundef %85, i32 noundef 65535)
  store i32 %86, ptr %17, align 8, !tbaa !11
  %.not213 = icmp eq i32 %86, 0
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #3
  br i1 %.not213, label %87, label %104

87:                                               ; preds = %75, %72
  %88 = getelementptr inbounds i8, ptr %10, i64 16
  %89 = call noundef i32 @_ZL17auto_choose_colorP16LodePNGColorModePKS_PK17LodePNGColorStats(ptr noundef nonnull %88, ptr noundef nonnull %44, ptr noundef nonnull %11)
  store i32 %89, ptr %17, align 8, !tbaa !11
  %.not214 = icmp eq i32 %89, 0
  br i1 %.not214, label %90, label %.thread272

90:                                               ; preds = %87
  %91 = load i32, ptr %73, align 8, !tbaa !39
  %.not215 = icmp eq i32 %91, 0
  br i1 %.not215, label %.thread276, label %92

92:                                               ; preds = %90
  %93 = getelementptr inbounds i8, ptr %10, i64 60
  %94 = getelementptr inbounds i8, ptr %10, i64 64
  %95 = getelementptr inbounds i8, ptr %10, i64 68
  %96 = getelementptr inbounds i8, ptr %5, i64 244
  %97 = load i32, ptr %96, align 4, !tbaa !41
  %98 = getelementptr inbounds i8, ptr %5, i64 248
  %99 = load i32, ptr %98, align 8, !tbaa !42
  %100 = getelementptr inbounds i8, ptr %5, i64 252
  %101 = load i32, ptr %100, align 4, !tbaa !43
  %102 = call noundef i32 @_Z19lodepng_convert_rgbPjS_S_jjjPK16LodePNGColorModeS2_(ptr noundef nonnull %93, ptr noundef nonnull %94, ptr noundef nonnull %95, i32 noundef %97, i32 noundef %99, i32 noundef %101, ptr noundef nonnull %88, ptr noundef nonnull %18)
  %.not216 = icmp eq i32 %102, 0
  br i1 %.not216, label %.thread276, label %103

103:                                              ; preds = %92
  store i32 104, ptr %17, align 8, !tbaa !11
  br label %.thread272

.thread272:                                       ; preds = %103, %.thread, %87
  call void @llvm.lifetime.end.p0(i64 1072, ptr nonnull %11) #3
  br label %.thread280

.thread276:                                       ; preds = %92, %90
  call void @llvm.lifetime.end.p0(i64 1072, ptr nonnull %11) #3
  br label %105

104:                                              ; preds = %75
  call void @llvm.lifetime.end.p0(i64 1072, ptr nonnull %11) #3
  br label %.thread280

105:                                              ; preds = %.thread276, %49
  %106 = getelementptr inbounds i8, ptr %5, i64 416
  %107 = load i32, ptr %106, align 8, !tbaa !32
  %.not217 = icmp eq i32 %107, 0
  br i1 %.not217, label %128, label %108

108:                                              ; preds = %105
  %109 = getelementptr inbounds i8, ptr %5, i64 432
  %110 = load ptr, ptr %109, align 8, !tbaa !33
  %111 = getelementptr inbounds i8, ptr %5, i64 440
  %112 = load i32, ptr %111, align 8, !tbaa !34
  %113 = call noundef i32 @_ZL16isGrayICCProfilePKhj(ptr noundef %110, i32 noundef %112)
  %114 = load ptr, ptr %109, align 8, !tbaa !33
  %115 = load i32, ptr %111, align 8, !tbaa !34
  %116 = call noundef i32 @_ZL15isRGBICCProfilePKhj(ptr noundef %114, i32 noundef %115)
  %117 = or i32 %116, %113
  %or.cond.not = icmp eq i32 %117, 0
  br i1 %or.cond.not, label %118, label %119

118:                                              ; preds = %108
  store i32 100, ptr %17, align 8, !tbaa !11
  br label %.thread280

119:                                              ; preds = %108
  %120 = getelementptr inbounds i8, ptr %10, i64 16
  %121 = load i32, ptr %120, align 8
  %122 = and i32 %121, -5
  %123 = icmp eq i32 %122, 0
  %124 = zext i1 %123 to i32
  %.not218 = icmp eq i32 %113, %124
  br i1 %.not218, label %128, label %125

125:                                              ; preds = %119
  %126 = load i32, ptr %51, align 8, !tbaa !31
  %.not219 = icmp eq i32 %126, 0
  %127 = select i1 %.not219, i32 101, i32 102
  store i32 %127, ptr %17, align 8, !tbaa !11
  br label %.thread280

128:                                              ; preds = %119, %105
  %129 = getelementptr inbounds i8, ptr %10, i64 16
  %130 = call noundef i32 @_ZL24lodepng_color_mode_equalPK16LodePNGColorModeS1_(ptr noundef nonnull %44, ptr noundef nonnull %129)
  %.not220 = icmp eq i32 %130, 0
  br i1 %.not220, label %131, label %149

131:                                              ; preds = %128
  %132 = zext i32 %3 to i64
  %133 = zext i32 %4 to i64
  %134 = mul nuw i64 %133, %132
  %135 = call noundef i32 @_Z15lodepng_get_bppPK16LodePNGColorMode(ptr noundef nonnull %129)
  %136 = zext i32 %135 to i64
  %137 = mul i64 %134, %136
  %138 = add i64 %137, 7
  %139 = lshr i64 %138, 3
  %140 = call noundef ptr @_ZL14lodepng_mallocm(i64 noundef %139)
  %141 = icmp eq ptr %140, null
  %142 = icmp ugt i64 %138, 7
  %or.cond4 = and i1 %141, %142
  br i1 %or.cond4, label %.thread288.sink.split, label %143

143:                                              ; preds = %131
  %.pr284 = load i32, ptr %17, align 8, !tbaa !11
  %.not221 = icmp eq i32 %.pr284, 0
  br i1 %.not221, label %144, label %.thread288

144:                                              ; preds = %143
  %145 = call noundef i32 @_Z15lodepng_convertPhPKhPK16LodePNGColorModeS4_jj(ptr noundef %140, ptr noundef %2, ptr noundef nonnull %129, ptr noundef nonnull %44, i32 noundef %3, i32 noundef %4)
  store i32 %145, ptr %17, align 8, !tbaa !11
  %.not222 = icmp eq i32 %145, 0
  br i1 %.not222, label %146, label %.thread288

146:                                              ; preds = %144
  %147 = call noundef i32 @_ZL19preProcessScanlinesPPhPmPKhjjPK11LodePNGInfoPK22LodePNGEncoderSettings(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %140, i32 noundef %3, i32 noundef %4, ptr noundef nonnull %10, ptr noundef nonnull %30)
  br label %.thread288.sink.split

.thread288.sink.split:                            ; preds = %131, %146
  %.sink = phi i32 [ %147, %146 ], [ 83, %131 ]
  store i32 %.sink, ptr %17, align 8, !tbaa !11
  br label %.thread288

.thread288:                                       ; preds = %.thread288.sink.split, %143, %144
  call void @_ZL12lodepng_freePv(ptr noundef %140)
  %148 = load i32, ptr %17, align 8, !tbaa !11
  %.not223 = icmp eq i32 %148, 0
  br i1 %.not223, label %151, label %.thread280

149:                                              ; preds = %128
  %150 = call noundef i32 @_ZL19preProcessScanlinesPPhPmPKhjjPK11LodePNGInfoPK22LodePNGEncoderSettings(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef nonnull %10, ptr noundef nonnull %30)
  store i32 %150, ptr %17, align 8, !tbaa !11
  %.not224 = icmp eq i32 %150, 0
  br i1 %.not224, label %151, label %.thread280

151:                                              ; preds = %.thread288, %149
  %152 = call noundef i32 @_ZL14writeSignatureP8ucvector(ptr noundef nonnull %9)
  store i32 %152, ptr %17, align 8, !tbaa !11
  %.not225 = icmp eq i32 %152, 0
  br i1 %.not225, label %153, label %.thread280

153:                                              ; preds = %151
  %154 = load i32, ptr %129, align 8, !tbaa !23
  %155 = getelementptr inbounds i8, ptr %10, i64 20
  %156 = load i32, ptr %155, align 4, !tbaa !28
  %157 = getelementptr inbounds i8, ptr %10, i64 8
  %158 = load i32, ptr %157, align 8, !tbaa !27
  %159 = call noundef i32 @_ZL13addChunk_IHDRP8ucvectorjj16LodePNGColorTypejj(ptr noundef nonnull %9, i32 noundef %3, i32 noundef %4, i32 noundef %154, i32 noundef %156, i32 noundef %158)
  store i32 %159, ptr %17, align 8, !tbaa !11
  %.not226 = icmp eq i32 %159, 0
  br i1 %.not226, label %160, label %.thread280

160:                                              ; preds = %153
  %161 = getelementptr inbounds i8, ptr %10, i64 264
  %162 = load ptr, ptr %161, align 8, !tbaa !5
  %.not227 = icmp eq ptr %162, null
  br i1 %.not227, label %167, label %163

163:                                              ; preds = %160
  %164 = getelementptr inbounds i8, ptr %10, i64 288
  %165 = load i64, ptr %164, align 8, !tbaa !9
  %166 = call noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef nonnull %9, ptr noundef nonnull %162, i64 noundef %165)
  store i32 %166, ptr %17, align 8, !tbaa !11
  %.not228 = icmp eq i32 %166, 0
  br i1 %.not228, label %167, label %.thread280

167:                                              ; preds = %163, %160
  %168 = getelementptr inbounds i8, ptr %10, i64 232
  %169 = load i32, ptr %168, align 8, !tbaa !32
  %.not229 = icmp eq i32 %169, 0
  br i1 %.not229, label %172, label %170

170:                                              ; preds = %167
  %171 = call noundef i32 @_ZL13addChunk_iCCPP8ucvectorPK11LodePNGInfoP23LodePNGCompressSettings(ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %30)
  store i32 %171, ptr %17, align 8, !tbaa !11
  %.not230 = icmp eq i32 %171, 0
  br i1 %.not230, label %172, label %.thread280

172:                                              ; preds = %170, %167
  %173 = getelementptr inbounds i8, ptr %10, i64 224
  %174 = load i32, ptr %173, align 8, !tbaa !44
  %.not231 = icmp eq i32 %174, 0
  br i1 %.not231, label %177, label %175

175:                                              ; preds = %172
  %176 = call noundef i32 @_ZL13addChunk_sRGBP8ucvectorPK11LodePNGInfo(ptr noundef nonnull %9, ptr noundef nonnull %10)
  store i32 %176, ptr %17, align 8, !tbaa !11
  %.not232 = icmp eq i32 %176, 0
  br i1 %.not232, label %177, label %.thread280

177:                                              ; preds = %175, %172
  %178 = getelementptr inbounds i8, ptr %10, i64 180
  %179 = load i32, ptr %178, align 4, !tbaa !45
  %.not233 = icmp eq i32 %179, 0
  br i1 %.not233, label %182, label %180

180:                                              ; preds = %177
  %181 = call noundef i32 @_ZL13addChunk_gAMAP8ucvectorPK11LodePNGInfo(ptr noundef nonnull %9, ptr noundef nonnull %10)
  store i32 %181, ptr %17, align 8, !tbaa !11
  %.not234 = icmp eq i32 %181, 0
  br i1 %.not234, label %182, label %.thread280

182:                                              ; preds = %180, %177
  %183 = getelementptr inbounds i8, ptr %10, i64 188
  %184 = load i32, ptr %183, align 4, !tbaa !46
  %.not235 = icmp eq i32 %184, 0
  br i1 %.not235, label %187, label %185

185:                                              ; preds = %182
  %186 = call noundef i32 @_ZL13addChunk_cHRMP8ucvectorPK11LodePNGInfo(ptr noundef nonnull %9, ptr noundef nonnull %10)
  store i32 %186, ptr %17, align 8, !tbaa !11
  %.not236 = icmp eq i32 %186, 0
  br i1 %.not236, label %187, label %.thread280

187:                                              ; preds = %185, %182
  %188 = load i32, ptr %129, align 8, !tbaa !23
  %189 = icmp eq i32 %188, 3
  br i1 %189, label %190, label %192

190:                                              ; preds = %187
  %191 = call noundef i32 @_ZL13addChunk_PLTEP8ucvectorPK16LodePNGColorMode(ptr noundef nonnull %9, ptr noundef nonnull %129)
  store i32 %191, ptr %17, align 8, !tbaa !11
  %.not237 = icmp eq i32 %191, 0
  br i1 %.not237, label %192, label %.thread280

192:                                              ; preds = %190, %187
  %193 = getelementptr inbounds i8, ptr %5, i64 128
  %194 = load i32, ptr %193, align 8, !tbaa !24
  %.not238 = icmp eq i32 %194, 0
  br i1 %.not238, label %200, label %195

195:                                              ; preds = %192
  %196 = load i32, ptr %129, align 8
  %197 = and i32 %196, -5
  %or.cond8 = icmp eq i32 %197, 2
  br i1 %or.cond8, label %198, label %200

198:                                              ; preds = %195
  %199 = call noundef i32 @_ZL13addChunk_PLTEP8ucvectorPK16LodePNGColorMode(ptr noundef nonnull %9, ptr noundef nonnull %129)
  store i32 %199, ptr %17, align 8, !tbaa !11
  %.not239 = icmp eq i32 %199, 0
  br i1 %.not239, label %200, label %.thread280

200:                                              ; preds = %198, %195, %192
  %201 = call noundef i32 @_ZL13addChunk_tRNSP8ucvectorPK16LodePNGColorMode(ptr noundef nonnull %9, ptr noundef nonnull %129)
  store i32 %201, ptr %17, align 8, !tbaa !11
  %.not240 = icmp eq i32 %201, 0
  br i1 %.not240, label %202, label %.thread280

202:                                              ; preds = %200
  %203 = getelementptr inbounds i8, ptr %10, i64 56
  %204 = load i32, ptr %203, align 8, !tbaa !39
  %.not241 = icmp eq i32 %204, 0
  br i1 %.not241, label %207, label %205

205:                                              ; preds = %202
  %206 = call noundef i32 @_ZL13addChunk_bKGDP8ucvectorPK11LodePNGInfo(ptr noundef nonnull %9, ptr noundef nonnull %10)
  store i32 %206, ptr %17, align 8, !tbaa !11
  %.not242 = icmp eq i32 %206, 0
  br i1 %.not242, label %207, label %.thread280

207:                                              ; preds = %205, %202
  %208 = getelementptr inbounds i8, ptr %10, i64 164
  %209 = load i32, ptr %208, align 4, !tbaa !47
  %.not243 = icmp eq i32 %209, 0
  br i1 %.not243, label %212, label %210

210:                                              ; preds = %207
  %211 = call noundef i32 @_ZL13addChunk_pHYsP8ucvectorPK11LodePNGInfo(ptr noundef nonnull %9, ptr noundef nonnull %10)
  store i32 %211, ptr %17, align 8, !tbaa !11
  %.not244 = icmp eq i32 %211, 0
  br i1 %.not244, label %212, label %.thread280

212:                                              ; preds = %210, %207
  %213 = getelementptr inbounds i8, ptr %10, i64 272
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %.not245 = icmp eq ptr %214, null
  br i1 %.not245, label %219, label %215

215:                                              ; preds = %212
  %216 = getelementptr inbounds i8, ptr %10, i64 296
  %217 = load i64, ptr %216, align 8, !tbaa !9
  %218 = call noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef nonnull %9, ptr noundef nonnull %214, i64 noundef %217)
  store i32 %218, ptr %17, align 8, !tbaa !11
  %.not246 = icmp eq i32 %218, 0
  br i1 %.not246, label %219, label %.thread280

219:                                              ; preds = %215, %212
  %220 = load ptr, ptr %7, align 8, !tbaa !5
  %221 = load i64, ptr %8, align 8, !tbaa !9
  %222 = call noundef i32 @_ZL13addChunk_IDATP8ucvectorPKhmP23LodePNGCompressSettings(ptr noundef nonnull %9, ptr noundef %220, i64 noundef %221, ptr noundef nonnull %30)
  store i32 %222, ptr %17, align 8, !tbaa !11
  %.not247 = icmp eq i32 %222, 0
  br i1 %.not247, label %223, label %.thread280

223:                                              ; preds = %219
  %224 = getelementptr inbounds i8, ptr %10, i64 136
  %225 = load i32, ptr %224, align 8, !tbaa !48
  %.not248 = icmp eq i32 %225, 0
  br i1 %.not248, label %229, label %226

226:                                              ; preds = %223
  %227 = getelementptr inbounds i8, ptr %10, i64 140
  %228 = call noundef i32 @_ZL13addChunk_tIMEP8ucvectorPK11LodePNGTime(ptr noundef nonnull %9, ptr noundef nonnull %227)
  store i32 %228, ptr %17, align 8, !tbaa !11
  %.not249 = icmp eq i32 %228, 0
  br i1 %.not249, label %229, label %.thread280

229:                                              ; preds = %226, %223
  %230 = getelementptr inbounds i8, ptr %10, i64 72
  %231 = load i64, ptr %230, align 8, !tbaa !49
  %.not250301 = icmp eq i64 %231, 0
  br i1 %.not250301, label %._crit_edge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %229
  %232 = getelementptr inbounds i8, ptr %10, i64 80
  %233 = getelementptr inbounds i8, ptr %5, i64 136
  %234 = getelementptr inbounds i8, ptr %10, i64 88
  br label %235

235:                                              ; preds = %.lr.ph, %261
  %.0194302 = phi i64 [ 0, %.lr.ph ], [ %262, %261 ]
  %236 = load ptr, ptr %232, align 8, !tbaa !50
  %237 = getelementptr inbounds ptr, ptr %236, i64 %.0194302
  %238 = load ptr, ptr %237, align 8, !tbaa !5
  %239 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %238)
  %240 = icmp ugt i64 %239, 79
  br i1 %240, label %241, label %242

241:                                              ; preds = %235
  store i32 66, ptr %17, align 8, !tbaa !11
  br label %.thread280

242:                                              ; preds = %235
  %243 = load ptr, ptr %232, align 8, !tbaa !50
  %244 = getelementptr inbounds ptr, ptr %243, i64 %.0194302
  %245 = load ptr, ptr %244, align 8, !tbaa !5
  %246 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %245)
  %247 = icmp eq i64 %246, 0
  br i1 %247, label %248, label %249

248:                                              ; preds = %242
  store i32 67, ptr %17, align 8, !tbaa !11
  br label %.thread280

249:                                              ; preds = %242
  %250 = load i32, ptr %233, align 8, !tbaa !51
  %.not259 = icmp eq i32 %250, 0
  %251 = load ptr, ptr %232, align 8, !tbaa !50
  %252 = getelementptr inbounds ptr, ptr %251, i64 %.0194302
  %253 = load ptr, ptr %252, align 8, !tbaa !5
  %254 = load ptr, ptr %234, align 8, !tbaa !52
  %255 = getelementptr inbounds ptr, ptr %254, i64 %.0194302
  %256 = load ptr, ptr %255, align 8, !tbaa !5
  br i1 %.not259, label %259, label %257

257:                                              ; preds = %249
  %258 = call noundef i32 @_ZL13addChunk_zTXtP8ucvectorPKcS2_P23LodePNGCompressSettings(ptr noundef nonnull %9, ptr noundef %253, ptr noundef %256, ptr noundef nonnull %30)
  store i32 %258, ptr %17, align 8, !tbaa !11
  %.not261 = icmp eq i32 %258, 0
  br i1 %.not261, label %261, label %.thread280

259:                                              ; preds = %249
  %260 = call noundef i32 @_ZL13addChunk_tEXtP8ucvectorPKcS2_(ptr noundef nonnull %9, ptr noundef %253, ptr noundef %256)
  store i32 %260, ptr %17, align 8, !tbaa !11
  %.not260 = icmp eq i32 %260, 0
  br i1 %.not260, label %261, label %.thread280

261:                                              ; preds = %257, %259
  %262 = add i64 %.0194302, 1
  %263 = load i64, ptr %230, align 8, !tbaa !49
  %.not250 = icmp eq i64 %262, %263
  br i1 %.not250, label %._crit_edge, label %235, !llvm.loop !53

._crit_edge:                                      ; preds = %261
  %264 = getelementptr inbounds i8, ptr %5, i64 132
  %265 = load i32, ptr %264, align 4, !tbaa !55
  %.not251 = icmp eq i32 %265, 0
  br i1 %.not251, label %.critedge, label %.preheader

._crit_edge.thread:                               ; preds = %229
  %266 = getelementptr inbounds i8, ptr %5, i64 132
  %267 = load i32, ptr %266, align 4, !tbaa !55
  %.not251314 = icmp eq i32 %267, 0
  br i1 %.not251314, label %.critedge, label %._crit_edge306

.preheader:                                       ; preds = %._crit_edge
  %.not252303 = icmp eq i64 %262, 0
  br i1 %.not252303, label %._crit_edge306, label %.lr.ph305

.lr.ph305:                                        ; preds = %.preheader
  %268 = getelementptr inbounds i8, ptr %10, i64 80
  %269 = load ptr, ptr %268, align 8, !tbaa !50
  br label %270

270:                                              ; preds = %.lr.ph305, %303
  %.1195304 = phi i64 [ 0, %.lr.ph305 ], [ %304, %303 ]
  %271 = getelementptr inbounds ptr, ptr %269, i64 %.1195304
  %272 = load ptr, ptr %271, align 8, !tbaa !5
  %273 = load i8, ptr %272, align 1, !tbaa !56
  %274 = icmp eq i8 %273, 76
  br i1 %274, label %275, label %303

275:                                              ; preds = %270
  %276 = getelementptr inbounds i8, ptr %272, i64 1
  %277 = load i8, ptr %276, align 1, !tbaa !56
  %278 = icmp eq i8 %277, 111
  br i1 %278, label %279, label %303

279:                                              ; preds = %275
  %280 = getelementptr inbounds i8, ptr %272, i64 2
  %281 = load i8, ptr %280, align 1, !tbaa !56
  %282 = icmp eq i8 %281, 100
  br i1 %282, label %283, label %303

283:                                              ; preds = %279
  %284 = getelementptr inbounds i8, ptr %272, i64 3
  %285 = load i8, ptr %284, align 1, !tbaa !56
  %286 = icmp eq i8 %285, 101
  br i1 %286, label %287, label %303

287:                                              ; preds = %283
  %288 = getelementptr inbounds i8, ptr %272, i64 4
  %289 = load i8, ptr %288, align 1, !tbaa !56
  %290 = icmp eq i8 %289, 80
  br i1 %290, label %291, label %303

291:                                              ; preds = %287
  %292 = getelementptr inbounds i8, ptr %272, i64 5
  %293 = load i8, ptr %292, align 1, !tbaa !56
  %294 = icmp eq i8 %293, 78
  br i1 %294, label %295, label %303

295:                                              ; preds = %291
  %296 = getelementptr inbounds i8, ptr %272, i64 6
  %297 = load i8, ptr %296, align 1, !tbaa !56
  %298 = icmp eq i8 %297, 71
  br i1 %298, label %299, label %303

299:                                              ; preds = %295
  %300 = getelementptr inbounds i8, ptr %272, i64 7
  %301 = load i8, ptr %300, align 1, !tbaa !56
  %302 = icmp eq i8 %301, 0
  br i1 %302, label %.critedge, label %303

303:                                              ; preds = %270, %275, %279, %283, %287, %291, %295, %299
  %304 = add nuw i64 %.1195304, 1
  %.not252 = icmp eq i64 %.1195304, %.0194302
  br i1 %.not252, label %._crit_edge306, label %270, !llvm.loop !57

._crit_edge306:                                   ; preds = %303, %._crit_edge.thread, %.preheader
  %305 = load ptr, ptr @LODEPNG_VERSION_STRING, align 8, !tbaa !5
  %306 = call noundef i32 @_ZL13addChunk_tEXtP8ucvectorPKcS2_(ptr noundef nonnull %9, ptr noundef nonnull @.str.15, ptr noundef %305)
  store i32 %306, ptr %17, align 8, !tbaa !11
  %.not253 = icmp eq i32 %306, 0
  br i1 %.not253, label %.critedge, label %.thread280

.critedge:                                        ; preds = %299, %._crit_edge.thread, %._crit_edge306, %._crit_edge
  %307 = getelementptr inbounds i8, ptr %10, i64 96
  %308 = load i64, ptr %307, align 8, !tbaa !58
  %.not254307 = icmp eq i64 %308, 0
  br i1 %.not254307, label %._crit_edge310, label %.lr.ph309

.lr.ph309:                                        ; preds = %.critedge
  %309 = getelementptr inbounds i8, ptr %10, i64 104
  %310 = getelementptr inbounds i8, ptr %5, i64 136
  %311 = getelementptr inbounds i8, ptr %10, i64 112
  %312 = getelementptr inbounds i8, ptr %10, i64 120
  %313 = getelementptr inbounds i8, ptr %10, i64 128
  br label %317

314:                                              ; preds = %331
  %315 = add i64 %.2196308, 1
  %316 = load i64, ptr %307, align 8, !tbaa !58
  %.not254 = icmp eq i64 %315, %316
  br i1 %.not254, label %._crit_edge310, label %317, !llvm.loop !59

317:                                              ; preds = %.lr.ph309, %314
  %.2196308 = phi i64 [ 0, %.lr.ph309 ], [ %315, %314 ]
  %318 = load ptr, ptr %309, align 8, !tbaa !60
  %319 = getelementptr inbounds ptr, ptr %318, i64 %.2196308
  %320 = load ptr, ptr %319, align 8, !tbaa !5
  %321 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %320)
  %322 = icmp ugt i64 %321, 79
  br i1 %322, label %323, label %324

323:                                              ; preds = %317
  store i32 66, ptr %17, align 8, !tbaa !11
  br label %.thread280

324:                                              ; preds = %317
  %325 = load ptr, ptr %309, align 8, !tbaa !60
  %326 = getelementptr inbounds ptr, ptr %325, i64 %.2196308
  %327 = load ptr, ptr %326, align 8, !tbaa !5
  %328 = call noundef i64 @_ZL14lodepng_strlenPKc(ptr noundef %327)
  %329 = icmp eq i64 %328, 0
  br i1 %329, label %330, label %331

330:                                              ; preds = %324
  store i32 67, ptr %17, align 8, !tbaa !11
  br label %.thread280

331:                                              ; preds = %324
  %332 = load i32, ptr %310, align 8, !tbaa !51
  %333 = load ptr, ptr %309, align 8, !tbaa !60
  %334 = getelementptr inbounds ptr, ptr %333, i64 %.2196308
  %335 = load ptr, ptr %334, align 8, !tbaa !5
  %336 = load ptr, ptr %311, align 8, !tbaa !61
  %337 = getelementptr inbounds ptr, ptr %336, i64 %.2196308
  %338 = load ptr, ptr %337, align 8, !tbaa !5
  %339 = load ptr, ptr %312, align 8, !tbaa !62
  %340 = getelementptr inbounds ptr, ptr %339, i64 %.2196308
  %341 = load ptr, ptr %340, align 8, !tbaa !5
  %342 = load ptr, ptr %313, align 8, !tbaa !63
  %343 = getelementptr inbounds ptr, ptr %342, i64 %.2196308
  %344 = load ptr, ptr %343, align 8, !tbaa !5
  %345 = call noundef i32 @_ZL13addChunk_iTXtP8ucvectorjPKcS2_S2_S2_P23LodePNGCompressSettings(ptr noundef nonnull %9, i32 noundef %332, ptr noundef %335, ptr noundef %338, ptr noundef %341, ptr noundef %344, ptr noundef nonnull %30)
  store i32 %345, ptr %17, align 8, !tbaa !11
  %.not258 = icmp eq i32 %345, 0
  br i1 %.not258, label %314, label %.thread280

._crit_edge310:                                   ; preds = %314, %.critedge
  %346 = getelementptr inbounds i8, ptr %10, i64 280
  %347 = load ptr, ptr %346, align 8, !tbaa !5
  %.not255 = icmp eq ptr %347, null
  br i1 %.not255, label %352, label %348

348:                                              ; preds = %._crit_edge310
  %349 = getelementptr inbounds i8, ptr %10, i64 304
  %350 = load i64, ptr %349, align 8, !tbaa !9
  %351 = call noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef nonnull %9, ptr noundef nonnull %347, i64 noundef %350)
  store i32 %351, ptr %17, align 8, !tbaa !11
  %.not256 = icmp eq i32 %351, 0
  br i1 %.not256, label %352, label %.thread280

352:                                              ; preds = %348, %._crit_edge310
  %353 = call noundef i32 @_ZL13addChunk_IENDP8ucvector(ptr noundef nonnull %9)
  store i32 %353, ptr %17, align 8, !tbaa !11
  br label %.thread280

.thread280:                                       ; preds = %257, %259, %331, %104, %118, %125, %.thread272, %._crit_edge306, %241, %248, %323, %330, %151, %153, %163, %170, %175, %180, %185, %190, %198, %200, %205, %210, %215, %219, %226, %348, %352, %.thread288, %149, %43, %39, %38, %33, %28
  call void @_Z20lodepng_info_cleanupP11LodePNGInfo(ptr noundef nonnull %10)
  %354 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZL12lodepng_freePv(ptr noundef %354)
  %355 = load ptr, ptr %9, align 8, !tbaa !64
  store ptr %355, ptr %0, align 8, !tbaa !5
  %356 = getelementptr inbounds i8, ptr %9, i64 8
  %357 = load i64, ptr %356, align 8, !tbaa !66
  store i64 %357, ptr %1, align 8, !tbaa !9
  %358 = load i32, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret i32 %358
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL16isGrayICCProfilePKhj(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL15isRGBICCProfilePKhj(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL23lodepng_color_stats_addP17LodePNGColorStatsjjjj(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL17auto_choose_colorP16LodePNGColorModePKS_PK17LodePNGColorStats(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL19preProcessScanlinesPPhPmPKhjjPK11LodePNGInfoPK22LodePNGEncoderSettings(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_IHDRP8ucvectorjj16LodePNGColorTypejj(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL16addUnknownChunksP8ucvectorPhm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_iCCPP8ucvectorPK11LodePNGInfoP23LodePNGCompressSettings(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_sRGBP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_gAMAP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_cHRMP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_PLTEP8ucvectorPK16LodePNGColorMode(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_tRNSP8ucvectorPK16LodePNGColorMode(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_bKGDP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_pHYsP8ucvectorPK11LodePNGInfo(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_IDATP8ucvectorPKhmP23LodePNGCompressSettings(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_tIMEP8ucvectorPK11LodePNGTime(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_zTXtP8ucvectorPKcS2_P23LodePNGCompressSettings(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_tEXtP8ucvectorPKcS2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL13addChunk_iTXtP8ucvectorjPKcS2_S2_S2_P23LodePNGCompressSettings(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !15, i64 496}
!12 = !{!"_ZTS12LodePNGState", !13, i64 0, !16, i64 56, !19, i64 144, !21, i64 184, !15, i64 496}
!13 = !{!"_ZTS22LodePNGDecoderSettings", !14, i64 0, !15, i64 32, !15, i64 36, !15, i64 40, !15, i64 44, !15, i64 48, !15, i64 52}
!14 = !{!"_ZTS25LodePNGDecompressSettings", !15, i64 0, !15, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS22LodePNGEncoderSettings", !17, i64 0, !15, i64 48, !15, i64 52, !18, i64 56, !6, i64 64, !15, i64 72, !15, i64 76, !15, i64 80}
!17 = !{!"_ZTS23LodePNGCompressSettings", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!"_ZTS21LodePNGFilterStrategy", !7, i64 0}
!19 = !{!"_ZTS16LodePNGColorMode", !20, i64 0, !15, i64 4, !6, i64 8, !10, i64 16, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36}
!20 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!21 = !{!"_ZTS11LodePNGInfo", !15, i64 0, !15, i64 4, !15, i64 8, !19, i64 16, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68, !10, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !15, i64 136, !22, i64 140, !15, i64 164, !15, i64 168, !15, i64 172, !15, i64 176, !15, i64 180, !15, i64 184, !15, i64 188, !15, i64 192, !15, i64 196, !15, i64 200, !15, i64 204, !15, i64 208, !15, i64 212, !15, i64 216, !15, i64 220, !15, i64 224, !15, i64 228, !15, i64 232, !6, i64 240, !6, i64 248, !15, i64 256, !7, i64 264, !7, i64 288}
!22 = !{!"_ZTS11LodePNGTime", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20}
!23 = !{!21, !20, i64 16}
!24 = !{!12, !15, i64 128}
!25 = !{!21, !10, i64 32}
!26 = !{!12, !15, i64 56}
!27 = !{!21, !15, i64 8}
!28 = !{!21, !15, i64 20}
!29 = !{!12, !20, i64 144}
!30 = !{!12, !15, i64 148}
!31 = !{!12, !15, i64 104}
!32 = !{!21, !15, i64 232}
!33 = !{!21, !6, i64 248}
!34 = !{!21, !15, i64 256}
!35 = !{!36, !15, i64 1064}
!36 = !{!"_ZTS17LodePNGColorStats", !15, i64 0, !15, i64 4, !37, i64 8, !37, i64 10, !37, i64 12, !15, i64 16, !15, i64 20, !7, i64 24, !15, i64 1048, !10, i64 1056, !15, i64 1064, !15, i64 1068}
!37 = !{!"short", !7, i64 0}
!38 = !{!36, !15, i64 1068}
!39 = !{!21, !15, i64 56}
!40 = !{!15, !15, i64 0}
!41 = !{!21, !15, i64 60}
!42 = !{!21, !15, i64 64}
!43 = !{!21, !15, i64 68}
!44 = !{!21, !15, i64 224}
!45 = !{!21, !15, i64 180}
!46 = !{!21, !15, i64 188}
!47 = !{!21, !15, i64 164}
!48 = !{!21, !15, i64 136}
!49 = !{!21, !10, i64 72}
!50 = !{!21, !6, i64 80}
!51 = !{!12, !15, i64 136}
!52 = !{!21, !6, i64 88}
!53 = distinct !{!53, !54}
!54 = !{!"llvm.loop.mustprogress"}
!55 = !{!12, !15, i64 132}
!56 = !{!7, !7, i64 0}
!57 = distinct !{!57, !54}
!58 = !{!21, !10, i64 96}
!59 = distinct !{!59, !54}
!60 = !{!21, !6, i64 104}
!61 = !{!21, !6, i64 112}
!62 = !{!21, !6, i64 120}
!63 = !{!21, !6, i64 128}
!64 = !{!65, !6, i64 0}
!65 = !{!"_ZTS8ucvector", !6, i64 0, !10, i64 8, !10, i64 16}
!66 = !{!65, !10, i64 8}


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