; LLVM IR from ChaCheeChoo/GAAS-Engine :: source/lodepng (lodepng)

; 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.LodePNGState = type { %struct.LodePNGDecoderSettings, %struct.LodePNGEncoderSettings, %struct.LodePNGColorMode, %struct.LodePNGInfo, i32 }
%struct.LodePNGDecoderSettings = type { %struct.LodePNGDecompressSettings, i32, i32, i32, i32, i32, i32, i64, i64 }
%struct.LodePNGDecompressSettings = type { i32, i32, i64, ptr, ptr, ptr }
%struct.LodePNGEncoderSettings = type { %struct.LodePNGCompressSettings, i32, i32, i32, ptr, i32, i32, i32 }
%struct.LodePNGCompressSettings = type { i32, i32, i32, i32, i32, i32, ptr, ptr, ptr }
%struct.LodePNGColorMode = type { i32, i32, ptr, i64, i32, i32, i32, i32 }
%struct.LodePNGInfo = type { i32, i32, i32, %struct.LodePNGColorMode, i32, i32, i32, i32, i64, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, %struct.LodePNGTime, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, i32, i32, i32, i32, i32, i32, [3 x ptr], [3 x i64] }
%struct.LodePNGTime = type { i32, i32, i32, i32, i32, i32 }

@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @lodepng_chunk_type_equals(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @lodepng_chunk_data_const(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @lodepng_inspect_chunk(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = load i64, ptr %7, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %16, i64 %17
  store ptr %18, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  store i32 0, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  store i32 0, ptr %14, align 4, !tbaa !11
  %19 = load i64, ptr %7, align 8, !tbaa !9
  %20 = add i64 %19, 4
  %21 = load i64, ptr %9, align 8, !tbaa !9
  %22 = icmp ugt i64 %20, %21
  br i1 %22, label %23, label %24

23:                                               ; preds = %4
  store i32 30, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %225

24:                                               ; preds = %4
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = call i32 @lodepng_chunk_length(ptr noundef %25)
  store i32 %26, ptr %11, align 4, !tbaa !11
  %27 = load i32, ptr %11, align 4, !tbaa !11
  %28 = icmp ugt i32 %27, 2147483647
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  store i32 63, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %225

30:                                               ; preds = %24
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = call ptr @lodepng_chunk_data_const(ptr noundef %31)
  store ptr %32, ptr %12, align 8, !tbaa !5
  %33 = load i32, ptr %11, align 4, !tbaa !11
  %34 = add i32 %33, 12
  %35 = zext i32 %34 to i64
  %36 = load i64, ptr %9, align 8, !tbaa !9
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = sub i64 %36, %37
  %39 = icmp ugt i64 %35, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %30
  store i32 30, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %225

41:                                               ; preds = %30
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %42, ptr noundef @.str.3)
  %44 = icmp ne i8 %43, 0
  br i1 %44, label %45, label %53

45:                                               ; preds = %41
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.LodePNGState, ptr %46, i32 0, i32 3
  %48 = getelementptr inbounds %struct.LodePNGInfo, ptr %47, i32 0, i32 3
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = load i32, ptr %11, align 4, !tbaa !11
  %51 = zext i32 %50 to i64
  %52 = call i32 @readChunk_PLTE(ptr noundef %48, ptr noundef %49, i64 noundef %51)
  store i32 %52, ptr %14, align 4, !tbaa !11
  br label %205

53:                                               ; preds = %41
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %54, ptr noundef @.str.4)
  %56 = icmp ne i8 %55, 0
  br i1 %56, label %57, label %65

57:                                               ; preds = %53
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.LodePNGState, ptr %58, i32 0, i32 3
  %60 = getelementptr inbounds %struct.LodePNGInfo, ptr %59, i32 0, i32 3
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load i32, ptr %11, align 4, !tbaa !11
  %63 = zext i32 %62 to i64
  %64 = call i32 @readChunk_tRNS(ptr noundef %60, ptr noundef %61, i64 noundef %63)
  store i32 %64, ptr %14, align 4, !tbaa !11
  br label %204

65:                                               ; preds = %53
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %66, ptr noundef @.str.5)
  %68 = icmp ne i8 %67, 0
  br i1 %68, label %69, label %76

69:                                               ; preds = %65
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.LodePNGState, ptr %70, i32 0, i32 3
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = load i32, ptr %11, align 4, !tbaa !11
  %74 = zext i32 %73 to i64
  %75 = call i32 @readChunk_bKGD(ptr noundef %71, ptr noundef %72, i64 noundef %74)
  store i32 %75, ptr %14, align 4, !tbaa !11
  br label %203

76:                                               ; preds = %65
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %77, ptr noundef @.str.6)
  %79 = icmp ne i8 %78, 0
  br i1 %79, label %80, label %87

80:                                               ; preds = %76
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.LodePNGState, ptr %81, i32 0, i32 3
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = load i32, ptr %11, align 4, !tbaa !11
  %85 = zext i32 %84 to i64
  %86 = call i32 @readChunk_tEXt(ptr noundef %82, ptr noundef %83, i64 noundef %85)
  store i32 %86, ptr %14, align 4, !tbaa !11
  br label %202

87:                                               ; preds = %76
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %88, ptr noundef @.str.7)
  %90 = icmp ne i8 %89, 0
  br i1 %90, label %91, label %100

91:                                               ; preds = %87
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.LodePNGState, ptr %92, i32 0, i32 3
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.LodePNGState, ptr %94, i32 0, i32 0
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = load i32, ptr %11, align 4, !tbaa !11
  %98 = zext i32 %97 to i64
  %99 = call i32 @readChunk_zTXt(ptr noundef %93, ptr noundef %95, ptr noundef %96, i64 noundef %98)
  store i32 %99, ptr %14, align 4, !tbaa !11
  br label %201

100:                                              ; preds = %87
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %101, ptr noundef @.str.8)
  %103 = icmp ne i8 %102, 0
  br i1 %103, label %104, label %113

104:                                              ; preds = %100
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.LodePNGState, ptr %105, i32 0, i32 3
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.LodePNGState, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = load i32, ptr %11, align 4, !tbaa !11
  %111 = zext i32 %110 to i64
  %112 = call i32 @readChunk_iTXt(ptr noundef %106, ptr noundef %108, ptr noundef %109, i64 noundef %111)
  store i32 %112, ptr %14, align 4, !tbaa !11
  br label %200

113:                                              ; preds = %100
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %114, ptr noundef @.str.9)
  %116 = icmp ne i8 %115, 0
  br i1 %116, label %117, label %124

117:                                              ; preds = %113
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.LodePNGState, ptr %118, i32 0, i32 3
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !11
  %122 = zext i32 %121 to i64
  %123 = call i32 @readChunk_tIME(ptr noundef %119, ptr noundef %120, i64 noundef %122)
  store i32 %123, ptr %14, align 4, !tbaa !11
  br label %199

124:                                              ; preds = %113
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %125, ptr noundef @.str.10)
  %127 = icmp ne i8 %126, 0
  br i1 %127, label %128, label %135

128:                                              ; preds = %124
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.LodePNGState, ptr %129, i32 0, i32 3
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !11
  %133 = zext i32 %132 to i64
  %134 = call i32 @readChunk_pHYs(ptr noundef %130, ptr noundef %131, i64 noundef %133)
  store i32 %134, ptr %14, align 4, !tbaa !11
  br label %198

135:                                              ; preds = %124
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %136, ptr noundef @.str.11)
  %138 = icmp ne i8 %137, 0
  br i1 %138, label %139, label %146

139:                                              ; preds = %135
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.LodePNGState, ptr %140, i32 0, i32 3
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = load i32, ptr %11, align 4, !tbaa !11
  %144 = zext i32 %143 to i64
  %145 = call i32 @readChunk_gAMA(ptr noundef %141, ptr noundef %142, i64 noundef %144)
  store i32 %145, ptr %14, align 4, !tbaa !11
  br label %197

146:                                              ; preds = %135
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %147, ptr noundef @.str.12)
  %149 = icmp ne i8 %148, 0
  br i1 %149, label %150, label %157

150:                                              ; preds = %146
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.LodePNGState, ptr %151, i32 0, i32 3
  %153 = load ptr, ptr %12, align 8, !tbaa !5
  %154 = load i32, ptr %11, align 4, !tbaa !11
  %155 = zext i32 %154 to i64
  %156 = call i32 @readChunk_cHRM(ptr noundef %152, ptr noundef %153, i64 noundef %155)
  store i32 %156, ptr %14, align 4, !tbaa !11
  br label %196

157:                                              ; preds = %146
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %158, ptr noundef @.str.13)
  %160 = icmp ne i8 %159, 0
  br i1 %160, label %161, label %168

161:                                              ; preds = %157
  %162 = load ptr, ptr %6, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.LodePNGState, ptr %162, i32 0, i32 3
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !11
  %166 = zext i32 %165 to i64
  %167 = call i32 @readChunk_sRGB(ptr noundef %163, ptr noundef %164, i64 noundef %166)
  store i32 %167, ptr %14, align 4, !tbaa !11
  br label %195

168:                                              ; preds = %157
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %169, ptr noundef @.str.14)
  %171 = icmp ne i8 %170, 0
  br i1 %171, label %172, label %181

172:                                              ; preds = %168
  %173 = load ptr, ptr %6, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.LodePNGState, ptr %173, i32 0, i32 3
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.LodePNGState, ptr %175, i32 0, i32 0
  %177 = load ptr, ptr %12, align 8, !tbaa !5
  %178 = load i32, ptr %11, align 4, !tbaa !11
  %179 = zext i32 %178 to i64
  %180 = call i32 @readChunk_iCCP(ptr noundef %174, ptr noundef %176, ptr noundef %177, i64 noundef %179)
  store i32 %180, ptr %14, align 4, !tbaa !11
  br label %194

181:                                              ; preds = %168
  %182 = load ptr, ptr %10, align 8, !tbaa !5
  %183 = call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %182, ptr noundef @.str.15)
  %184 = icmp ne i8 %183, 0
  br i1 %184, label %185, label %192

185:                                              ; preds = %181
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.LodePNGState, ptr %186, i32 0, i32 3
  %188 = load ptr, ptr %12, align 8, !tbaa !5
  %189 = load i32, ptr %11, align 4, !tbaa !11
  %190 = zext i32 %189 to i64
  %191 = call i32 @readChunk_sBIT(ptr noundef %187, ptr noundef %188, i64 noundef %190)
  store i32 %191, ptr %14, align 4, !tbaa !11
  br label %193

192:                                              ; preds = %181
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %193

193:                                              ; preds = %192, %185
  br label %194

194:                                              ; preds = %193, %172
  br label %195

195:                                              ; preds = %194, %161
  br label %196

196:                                              ; preds = %195, %150
  br label %197

197:                                              ; preds = %196, %139
  br label %198

198:                                              ; preds = %197, %128
  br label %199

199:                                              ; preds = %198, %117
  br label %200

200:                                              ; preds = %199, %104
  br label %201

201:                                              ; preds = %200, %91
  br label %202

202:                                              ; preds = %201, %80
  br label %203

203:                                              ; preds = %202, %69
  br label %204

204:                                              ; preds = %203, %57
  br label %205

205:                                              ; preds = %204, %45
  %206 = load i32, ptr %14, align 4, !tbaa !11
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %223, label %208

208:                                              ; preds = %205
  %209 = load i32, ptr %13, align 4, !tbaa !11
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %223, label %211

211:                                              ; preds = %208
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.LodePNGState, ptr %212, i32 0, i32 0
  %214 = getelementptr inbounds %struct.LodePNGDecoderSettings, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 8, !tbaa !13
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %223, label %217

217:                                              ; preds = %211
  %218 = load ptr, ptr %10, align 8, !tbaa !5
  %219 = call i32 @lodepng_chunk_check_crc(ptr noundef %218)
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %222

221:                                              ; preds = %217
  store i32 57, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %225

222:                                              ; preds = %217
  br label %223

223:                                              ; preds = %222, %211, %208, %205
  %224 = load i32, ptr %14, align 4, !tbaa !11
  store i32 %224, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %225

225:                                              ; preds = %223, %221, %40, %29, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  %226 = load i32, ptr %5, align 4
  ret i32 %226
}

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 40}
!14 = !{!"LodePNGState", !15, i64 0, !17, i64 80, !19, i64 168, !20, i64 208, !12, i64 536}
!15 = !{!"LodePNGDecoderSettings", !16, i64 0, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !10, i64 64, !10, i64 72}
!16 = !{!"LodePNGDecompressSettings", !12, i64 0, !12, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!17 = !{!"LodePNGEncoderSettings", !18, i64 0, !12, i64 48, !12, i64 52, !12, i64 56, !6, i64 64, !12, i64 72, !12, i64 76, !12, i64 80}
!18 = !{!"LodePNGCompressSettings", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!19 = !{!"LodePNGColorMode", !12, i64 0, !12, i64 4, !6, i64 8, !10, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36}
!20 = !{!"LodePNGInfo", !12, i64 0, !12, i64 4, !12, i64 8, !19, i64 16, !12, i64 56, !12, i64 60, !12, i64 64, !12, 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, !12, i64 136, !21, i64 140, !12, i64 164, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !12, i64 212, !12, i64 216, !12, i64 220, !12, i64 224, !12, i64 228, !12, i64 232, !6, i64 240, !6, i64 248, !12, i64 256, !12, i64 260, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !7, i64 280, !7, i64 304}
!21 = !{!"LodePNGTime", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}


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

@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @lodepng_chunk_length(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @lodepng_chunk_type_equals(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @lodepng_chunk_data_const(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @lodepng_chunk_check_crc(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @lodepng_inspect_chunk(ptr noundef %0, i64 noundef %1, ptr noundef %2, i64 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %2, i64 %1
  %6 = add i64 %1, 4
  %7 = icmp ugt i64 %6, %3
  br i1 %7, label %.thread, label %8

8:                                                ; preds = %4
  %9 = tail call i32 @lodepng_chunk_length(ptr noundef %5)
  %10 = icmp slt i32 %9, 0
  br i1 %10, label %.thread, label %11

11:                                               ; preds = %8
  %12 = tail call ptr @lodepng_chunk_data_const(ptr noundef %5)
  %13 = add nuw i32 %9, 12
  %14 = zext i32 %13 to i64
  %15 = sub i64 %3, %1
  %16 = icmp ult i64 %15, %14
  br i1 %16, label %.thread, label %17

17:                                               ; preds = %11
  %18 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.3)
  %.not = icmp eq i8 %18, 0
  br i1 %.not, label %23, label %19

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %0, i64 224
  %21 = zext nneg i32 %9 to i64
  %22 = tail call i32 @readChunk_PLTE(ptr noundef nonnull %20, ptr noundef %12, i64 noundef %21)
  br label %95

23:                                               ; preds = %17
  %24 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.4)
  %.not75 = icmp eq i8 %24, 0
  br i1 %.not75, label %29, label %25

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %0, i64 224
  %27 = zext nneg i32 %9 to i64
  %28 = tail call i32 @readChunk_tRNS(ptr noundef nonnull %26, ptr noundef %12, i64 noundef %27)
  br label %95

29:                                               ; preds = %23
  %30 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.5)
  %.not76 = icmp eq i8 %30, 0
  br i1 %.not76, label %35, label %31

31:                                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %0, i64 208
  %33 = zext nneg i32 %9 to i64
  %34 = tail call i32 @readChunk_bKGD(ptr noundef nonnull %32, ptr noundef %12, i64 noundef %33)
  br label %95

35:                                               ; preds = %29
  %36 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.6)
  %.not77 = icmp eq i8 %36, 0
  br i1 %.not77, label %41, label %37

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %0, i64 208
  %39 = zext nneg i32 %9 to i64
  %40 = tail call i32 @readChunk_tEXt(ptr noundef nonnull %38, ptr noundef %12, i64 noundef %39)
  br label %95

41:                                               ; preds = %35
  %42 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.7)
  %.not78 = icmp eq i8 %42, 0
  br i1 %.not78, label %47, label %43

43:                                               ; preds = %41
  %44 = getelementptr inbounds i8, ptr %0, i64 208
  %45 = zext nneg i32 %9 to i64
  %46 = tail call i32 @readChunk_zTXt(ptr noundef nonnull %44, ptr noundef %0, ptr noundef %12, i64 noundef %45)
  br label %95

47:                                               ; preds = %41
  %48 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.8)
  %.not79 = icmp eq i8 %48, 0
  br i1 %.not79, label %53, label %49

49:                                               ; preds = %47
  %50 = getelementptr inbounds i8, ptr %0, i64 208
  %51 = zext nneg i32 %9 to i64
  %52 = tail call i32 @readChunk_iTXt(ptr noundef nonnull %50, ptr noundef %0, ptr noundef %12, i64 noundef %51)
  br label %95

53:                                               ; preds = %47
  %54 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.9)
  %.not80 = icmp eq i8 %54, 0
  br i1 %.not80, label %59, label %55

55:                                               ; preds = %53
  %56 = getelementptr inbounds i8, ptr %0, i64 208
  %57 = zext nneg i32 %9 to i64
  %58 = tail call i32 @readChunk_tIME(ptr noundef nonnull %56, ptr noundef %12, i64 noundef %57)
  br label %95

59:                                               ; preds = %53
  %60 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.10)
  %.not81 = icmp eq i8 %60, 0
  br i1 %.not81, label %65, label %61

61:                                               ; preds = %59
  %62 = getelementptr inbounds i8, ptr %0, i64 208
  %63 = zext nneg i32 %9 to i64
  %64 = tail call i32 @readChunk_pHYs(ptr noundef nonnull %62, ptr noundef %12, i64 noundef %63)
  br label %95

65:                                               ; preds = %59
  %66 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.11)
  %.not82 = icmp eq i8 %66, 0
  br i1 %.not82, label %71, label %67

67:                                               ; preds = %65
  %68 = getelementptr inbounds i8, ptr %0, i64 208
  %69 = zext nneg i32 %9 to i64
  %70 = tail call i32 @readChunk_gAMA(ptr noundef nonnull %68, ptr noundef %12, i64 noundef %69)
  br label %95

71:                                               ; preds = %65
  %72 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.12)
  %.not83 = icmp eq i8 %72, 0
  br i1 %.not83, label %77, label %73

73:                                               ; preds = %71
  %74 = getelementptr inbounds i8, ptr %0, i64 208
  %75 = zext nneg i32 %9 to i64
  %76 = tail call i32 @readChunk_cHRM(ptr noundef nonnull %74, ptr noundef %12, i64 noundef %75)
  br label %95

77:                                               ; preds = %71
  %78 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.13)
  %.not84 = icmp eq i8 %78, 0
  br i1 %.not84, label %83, label %79

79:                                               ; preds = %77
  %80 = getelementptr inbounds i8, ptr %0, i64 208
  %81 = zext nneg i32 %9 to i64
  %82 = tail call i32 @readChunk_sRGB(ptr noundef nonnull %80, ptr noundef %12, i64 noundef %81)
  br label %95

83:                                               ; preds = %77
  %84 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.14)
  %.not85 = icmp eq i8 %84, 0
  br i1 %.not85, label %89, label %85

85:                                               ; preds = %83
  %86 = getelementptr inbounds i8, ptr %0, i64 208
  %87 = zext nneg i32 %9 to i64
  %88 = tail call i32 @readChunk_iCCP(ptr noundef nonnull %86, ptr noundef %0, ptr noundef %12, i64 noundef %87)
  br label %95

89:                                               ; preds = %83
  %90 = tail call zeroext i8 @lodepng_chunk_type_equals(ptr noundef %5, ptr noundef nonnull @.str.15)
  %.not86 = icmp eq i8 %90, 0
  br i1 %.not86, label %.thread, label %91

91:                                               ; preds = %89
  %92 = getelementptr inbounds i8, ptr %0, i64 208
  %93 = zext nneg i32 %9 to i64
  %94 = tail call i32 @readChunk_sBIT(ptr noundef nonnull %92, ptr noundef %12, i64 noundef %93)
  br label %95

95:                                               ; preds = %25, %37, %49, %61, %73, %85, %91, %79, %67, %55, %43, %31, %19
  %.0 = phi i32 [ %22, %19 ], [ %28, %25 ], [ %34, %31 ], [ %40, %37 ], [ %46, %43 ], [ %52, %49 ], [ %58, %55 ], [ %64, %61 ], [ %70, %67 ], [ %76, %73 ], [ %82, %79 ], [ %88, %85 ], [ %94, %91 ]
  %.not92 = icmp eq i32 %.0, 0
  br i1 %.not92, label %96, label %.thread

96:                                               ; preds = %95
  %97 = getelementptr inbounds i8, ptr %0, i64 40
  %98 = load i32, ptr %97, align 8, !tbaa !5
  %.not87 = icmp eq i32 %98, 0
  br i1 %.not87, label %99, label %.thread

99:                                               ; preds = %96
  %100 = tail call i32 @lodepng_chunk_check_crc(ptr noundef %5)
  %.not88 = icmp eq i32 %100, 0
  %spec.select = select i1 %.not88, i32 0, i32 57
  br label %.thread

.thread:                                          ; preds = %99, %89, %95, %96, %11, %8, %4
  %.072 = phi i32 [ 30, %4 ], [ 63, %8 ], [ 30, %11 ], [ 0, %96 ], [ %.0, %95 ], [ 0, %89 ], [ %spec.select, %99 ]
  ret i32 %.072
}

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_PLTE(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_tRNS(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_bKGD(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_tEXt(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_zTXt(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_iTXt(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_tIME(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_pHYs(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_gAMA(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_cHRM(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_sRGB(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_iCCP(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden i32 @readChunk_sBIT(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

attributes #0 = { 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" }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !9, i64 40}
!6 = !{!"LodePNGState", !7, i64 0, !14, i64 80, !16, i64 168, !17, i64 208, !9, i64 536}
!7 = !{!"LodePNGDecoderSettings", !8, i64 0, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52, !9, i64 56, !9, i64 60, !12, i64 64, !12, i64 72}
!8 = !{!"LodePNGDecompressSettings", !9, i64 0, !9, i64 4, !12, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"any pointer", !10, i64 0}
!14 = !{!"LodePNGEncoderSettings", !15, i64 0, !9, i64 48, !9, i64 52, !9, i64 56, !13, i64 64, !9, i64 72, !9, i64 76, !9, i64 80}
!15 = !{!"LodePNGCompressSettings", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !13, i64 24, !13, i64 32, !13, i64 40}
!16 = !{!"LodePNGColorMode", !9, i64 0, !9, i64 4, !13, i64 8, !12, i64 16, !9, i64 24, !9, i64 28, !9, i64 32, !9, i64 36}
!17 = !{!"LodePNGInfo", !9, i64 0, !9, i64 4, !9, i64 8, !16, i64 16, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68, !12, i64 72, !13, i64 80, !13, i64 88, !12, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !9, i64 136, !18, i64 140, !9, i64 164, !9, i64 168, !9, i64 172, !9, i64 176, !9, i64 180, !9, i64 184, !9, i64 188, !9, i64 192, !9, i64 196, !9, i64 200, !9, i64 204, !9, i64 208, !9, i64 212, !9, i64 216, !9, i64 220, !9, i64 224, !9, i64 228, !9, i64 232, !13, i64 240, !13, i64 248, !9, i64 256, !9, i64 260, !9, i64 264, !9, i64 268, !9, i64 272, !9, i64 276, !10, i64 280, !10, i64 304}
!18 = !{!"LodePNGTime", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass