; LLVM IR from rdguez-mariano/fast_imas_IPOL :: io_png/libs/png (pngread)

; 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.png_struct_def = type { [1 x %struct.__jmp_buf_tag], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i64, i64, i64, %struct.z_stream_s, ptr, i64, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_row_info_struct, i64, i64, ptr, i16, i16, [5 x i8], i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, float, %struct.png_color_16_struct, %struct.png_color_16_struct, ptr, i64, i64, i32, float, float, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_color_8_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, i32, ptr, i8, i16, i16, i16, i64, i64, i8, i8, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i64, i64, %struct.png_unknown_chunk_t, i64, i64, ptr }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }
%struct.png_row_info_struct = type { i64, i64, i8, i8, i8, i8 }
%struct.png_color_8_struct = type { i8, i8, i8, i8, i8 }
%struct.png_color_16_struct = type { i8, i16, i16, i16, i16 }
%struct.png_unknown_chunk_t = type { [5 x i8], ptr, i64, i8 }
%struct.png_info_struct = type { i64, i64, i64, i64, ptr, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, [8 x i8], float, i8, i32, i32, ptr, %struct.png_time_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, %struct.png_color_16_struct, i64, i64, i8, i64, i64, i8, ptr, float, float, float, float, float, float, float, float, ptr, i64, i64, ptr, ptr, i8, i8, i64, ptr, i64, ptr, ptr, i64, i8, ptr, i64, i8, double, double, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.png_time_struct = type { i16, i8, i8, i8, i8, i8 }

@.str.13 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [39 x i8], align 1
@png_IDAT = external global [5 x i8], align 1
@png_IHDR = external global [5 x i8], align 1
@png_IEND = external global [5 x i8], align 1
@png_PLTE = external global [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@png_bKGD = external global [5 x i8], align 1
@png_cHRM = external global [5 x i8], align 1
@png_gAMA = external global [5 x i8], align 1
@png_hIST = external global [5 x i8], align 1
@png_oFFs = external global [5 x i8], align 1
@png_pCAL = external global [5 x i8], align 1
@png_sCAL = external global [5 x i8], align 1
@png_pHYs = external global [5 x i8], align 1
@png_sBIT = external global [5 x i8], align 1
@png_sRGB = external global [5 x i8], align 1
@png_iCCP = external global [5 x i8], align 1
@png_sPLT = external global [5 x i8], align 1
@png_tEXt = external global [5 x i8], align 1
@png_tIME = external global [5 x i8], align 1
@png_tRNS = external global [5 x i8], align 1
@png_zTXt = external global [5 x i8], align 1

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

declare void @png_error(ptr noundef, ptr 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: nounwind uwtable
define dso_local void @png_read_info(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %15, label %12

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %12, %2
  br label %363

16:                                               ; preds = %12
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.png_struct_def, ptr %17, i32 0, i32 55
  %19 = load i8, ptr %18, align 4, !tbaa !9
  %20 = zext i8 %19 to i32
  %21 = icmp slt i32 %20, 8
  br i1 %21, label %22, label %70

22:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.png_struct_def, ptr %23, i32 0, i32 55
  %25 = load i8, ptr %24, align 4, !tbaa !9
  %26 = zext i8 %25 to i64
  store i64 %26, ptr %5, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %27 = load i64, ptr %5, align 8, !tbaa !20
  %28 = sub i64 8, %27
  store i64 %28, ptr %6, align 8, !tbaa !20
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.png_info_struct, ptr %30, i32 0, i32 15
  %32 = load i64, ptr %5, align 8, !tbaa !20
  %33 = getelementptr inbounds [8 x i8], ptr %31, i64 0, i64 %32
  %34 = load i64, ptr %6, align 8, !tbaa !20
  call void @png_read_data(ptr noundef %29, ptr noundef %33, i64 noundef %34)
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.png_struct_def, ptr %35, i32 0, i32 55
  store i8 8, ptr %36, align 4, !tbaa !9
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.png_info_struct, ptr %37, i32 0, i32 15
  %39 = getelementptr inbounds [8 x i8], ptr %38, i64 0, i64 0
  %40 = load i64, ptr %5, align 8, !tbaa !20
  %41 = load i64, ptr %6, align 8, !tbaa !20
  %42 = call i32 @png_sig_cmp(ptr noundef %39, i64 noundef %40, i64 noundef %41)
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %61

44:                                               ; preds = %22
  %45 = load i64, ptr %5, align 8, !tbaa !20
  %46 = icmp ult i64 %45, 4
  br i1 %46, label %47, label %58

47:                                               ; preds = %44
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.png_info_struct, ptr %48, i32 0, i32 15
  %50 = getelementptr inbounds [8 x i8], ptr %49, i64 0, i64 0
  %51 = load i64, ptr %5, align 8, !tbaa !20
  %52 = load i64, ptr %6, align 8, !tbaa !20
  %53 = sub i64 %52, 4
  %54 = call i32 @png_sig_cmp(ptr noundef %50, i64 noundef %51, i64 noundef %53)
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %58

56:                                               ; preds = %47
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %57, ptr noundef @.str.13)
  br label %60

58:                                               ; preds = %47, %44
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %59, ptr noundef @.str.14)
  br label %60

60:                                               ; preds = %58, %56
  br label %61

61:                                               ; preds = %60, %22
  %62 = load i64, ptr %5, align 8, !tbaa !20
  %63 = icmp ult i64 %62, 3
  br i1 %63, label %64, label %69

64:                                               ; preds = %61
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.png_struct_def, ptr %65, i32 0, i32 12
  %67 = load i64, ptr %66, align 8, !tbaa !21
  %68 = or i64 %67, 4096
  store i64 %68, ptr %66, align 8, !tbaa !21
  br label %69

69:                                               ; preds = %64, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %70

70:                                               ; preds = %69, %16
  br label %71

71:                                               ; preds = %362, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = call i64 @png_read_chunk_header(ptr noundef %72)
  store i64 %73, ptr %7, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.png_struct_def, ptr %74, i32 0, i32 43
  %76 = getelementptr inbounds [5 x i8], ptr %75, i64 0, i64 0
  store ptr %76, ptr %8, align 8, !tbaa !5
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = call i32 @memcmp(ptr noundef %77, ptr noundef @png_IDAT, i64 noundef 4) #5
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %92, label %80

80:                                               ; preds = %71
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.png_struct_def, ptr %81, i32 0, i32 12
  %83 = load i64, ptr %82, align 8, !tbaa !21
  %84 = and i64 %83, 8
  %85 = icmp ne i64 %84, 0
  br i1 %85, label %86, label %91

86:                                               ; preds = %80
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.png_struct_def, ptr %87, i32 0, i32 12
  %89 = load i64, ptr %88, align 8, !tbaa !21
  %90 = or i64 %89, 8192
  store i64 %90, ptr %88, align 8, !tbaa !21
  br label %91

91:                                               ; preds = %86, %80
  br label %92

92:                                               ; preds = %91, %71
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  %94 = call i32 @memcmp(ptr noundef %93, ptr noundef @png_IHDR, i64 noundef 4) #5
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %100, label %96

96:                                               ; preds = %92
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_IHDR(ptr noundef %97, ptr noundef %98, i64 noundef %99)
  br label %359

100:                                              ; preds = %92
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call i32 @memcmp(ptr noundef %101, ptr noundef @png_IEND, i64 noundef 4) #5
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %108, label %104

104:                                              ; preds = %100
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_IEND(ptr noundef %105, ptr noundef %106, i64 noundef %107)
  br label %358

108:                                              ; preds = %100
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = call i32 @png_handle_as_unknown(ptr noundef %109, ptr noundef %110)
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %164

113:                                              ; preds = %108
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = call i32 @memcmp(ptr noundef %114, ptr noundef @png_IDAT, i64 noundef 4) #5
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %122, label %117

117:                                              ; preds = %113
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.png_struct_def, ptr %118, i32 0, i32 12
  %120 = load i64, ptr %119, align 8, !tbaa !21
  %121 = or i64 %120, 4
  store i64 %121, ptr %119, align 8, !tbaa !21
  br label %122

122:                                              ; preds = %117, %113
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_unknown(ptr noundef %123, ptr noundef %124, i64 noundef %125)
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = call i32 @memcmp(ptr noundef %126, ptr noundef @png_PLTE, i64 noundef 4) #5
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %134, label %129

129:                                              ; preds = %122
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.png_struct_def, ptr %130, i32 0, i32 12
  %132 = load i64, ptr %131, align 8, !tbaa !21
  %133 = or i64 %132, 2
  store i64 %133, ptr %131, align 8, !tbaa !21
  br label %163

134:                                              ; preds = %122
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = call i32 @memcmp(ptr noundef %135, ptr noundef @png_IDAT, i64 noundef 4) #5
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %162, label %138

138:                                              ; preds = %134
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.png_struct_def, ptr %139, i32 0, i32 12
  %141 = load i64, ptr %140, align 8, !tbaa !21
  %142 = and i64 %141, 1
  %143 = icmp ne i64 %142, 0
  br i1 %143, label %146, label %144

144:                                              ; preds = %138
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %145, ptr noundef @.str.15)
  br label %161

146:                                              ; preds = %138
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.png_struct_def, ptr %147, i32 0, i32 49
  %149 = load i8, ptr %148, align 2, !tbaa !22
  %150 = zext i8 %149 to i32
  %151 = icmp eq i32 %150, 3
  br i1 %151, label %152, label %160

152:                                              ; preds = %146
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.png_struct_def, ptr %153, i32 0, i32 12
  %155 = load i64, ptr %154, align 8, !tbaa !21
  %156 = and i64 %155, 2
  %157 = icmp ne i64 %156, 0
  br i1 %157, label %160, label %158

158:                                              ; preds = %152
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %159, ptr noundef @.str.16)
  br label %160

160:                                              ; preds = %158, %152, %146
  br label %161

161:                                              ; preds = %160, %144
  store i32 2, ptr %9, align 4
  br label %360

162:                                              ; preds = %134
  br label %163

163:                                              ; preds = %162, %129
  br label %357

164:                                              ; preds = %108
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = call i32 @memcmp(ptr noundef %165, ptr noundef @png_PLTE, i64 noundef 4) #5
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %172, label %168

168:                                              ; preds = %164
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_PLTE(ptr noundef %169, ptr noundef %170, i64 noundef %171)
  br label %356

172:                                              ; preds = %164
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = call i32 @memcmp(ptr noundef %173, ptr noundef @png_IDAT, i64 noundef 4) #5
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %207, label %176

176:                                              ; preds = %172
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.png_struct_def, ptr %177, i32 0, i32 12
  %179 = load i64, ptr %178, align 8, !tbaa !21
  %180 = and i64 %179, 1
  %181 = icmp ne i64 %180, 0
  br i1 %181, label %184, label %182

182:                                              ; preds = %176
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %183, ptr noundef @.str.15)
  br label %199

184:                                              ; preds = %176
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.png_struct_def, ptr %185, i32 0, i32 49
  %187 = load i8, ptr %186, align 2, !tbaa !22
  %188 = zext i8 %187 to i32
  %189 = icmp eq i32 %188, 3
  br i1 %189, label %190, label %198

190:                                              ; preds = %184
  %191 = load ptr, ptr %3, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.png_struct_def, ptr %191, i32 0, i32 12
  %193 = load i64, ptr %192, align 8, !tbaa !21
  %194 = and i64 %193, 2
  %195 = icmp ne i64 %194, 0
  br i1 %195, label %198, label %196

196:                                              ; preds = %190
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_error(ptr noundef %197, ptr noundef @.str.16)
  br label %198

198:                                              ; preds = %196, %190, %184
  br label %199

199:                                              ; preds = %198, %182
  %200 = load i64, ptr %7, align 8, !tbaa !20
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.png_struct_def, ptr %201, i32 0, i32 38
  store i64 %200, ptr %202, align 8, !tbaa !23
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.png_struct_def, ptr %203, i32 0, i32 12
  %205 = load i64, ptr %204, align 8, !tbaa !21
  %206 = or i64 %205, 4
  store i64 %206, ptr %204, align 8, !tbaa !21
  store i32 2, ptr %9, align 4
  br label %360

207:                                              ; preds = %172
  %208 = load ptr, ptr %8, align 8, !tbaa !5
  %209 = call i32 @memcmp(ptr noundef %208, ptr noundef @png_bKGD, i64 noundef 4) #5
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %215, label %211

211:                                              ; preds = %207
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_bKGD(ptr noundef %212, ptr noundef %213, i64 noundef %214)
  br label %354

215:                                              ; preds = %207
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  %217 = call i32 @memcmp(ptr noundef %216, ptr noundef @png_cHRM, i64 noundef 4) #5
  %218 = icmp ne i32 %217, 0
  br i1 %218, label %223, label %219

219:                                              ; preds = %215
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = load ptr, ptr %4, align 8, !tbaa !5
  %222 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_cHRM(ptr noundef %220, ptr noundef %221, i64 noundef %222)
  br label %353

223:                                              ; preds = %215
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  %225 = call i32 @memcmp(ptr noundef %224, ptr noundef @png_gAMA, i64 noundef 4) #5
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %231, label %227

227:                                              ; preds = %223
  %228 = load ptr, ptr %3, align 8, !tbaa !5
  %229 = load ptr, ptr %4, align 8, !tbaa !5
  %230 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_gAMA(ptr noundef %228, ptr noundef %229, i64 noundef %230)
  br label %352

231:                                              ; preds = %223
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  %233 = call i32 @memcmp(ptr noundef %232, ptr noundef @png_hIST, i64 noundef 4) #5
  %234 = icmp ne i32 %233, 0
  br i1 %234, label %239, label %235

235:                                              ; preds = %231
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_hIST(ptr noundef %236, ptr noundef %237, i64 noundef %238)
  br label %351

239:                                              ; preds = %231
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  %241 = call i32 @memcmp(ptr noundef %240, ptr noundef @png_oFFs, i64 noundef 4) #5
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %247, label %243

243:                                              ; preds = %239
  %244 = load ptr, ptr %3, align 8, !tbaa !5
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_oFFs(ptr noundef %244, ptr noundef %245, i64 noundef %246)
  br label %350

247:                                              ; preds = %239
  %248 = load ptr, ptr %8, align 8, !tbaa !5
  %249 = call i32 @memcmp(ptr noundef %248, ptr noundef @png_pCAL, i64 noundef 4) #5
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %255, label %251

251:                                              ; preds = %247
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = load ptr, ptr %4, align 8, !tbaa !5
  %254 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_pCAL(ptr noundef %252, ptr noundef %253, i64 noundef %254)
  br label %349

255:                                              ; preds = %247
  %256 = load ptr, ptr %8, align 8, !tbaa !5
  %257 = call i32 @memcmp(ptr noundef %256, ptr noundef @png_sCAL, i64 noundef 4) #5
  %258 = icmp ne i32 %257, 0
  br i1 %258, label %263, label %259

259:                                              ; preds = %255
  %260 = load ptr, ptr %3, align 8, !tbaa !5
  %261 = load ptr, ptr %4, align 8, !tbaa !5
  %262 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_sCAL(ptr noundef %260, ptr noundef %261, i64 noundef %262)
  br label %348

263:                                              ; preds = %255
  %264 = load ptr, ptr %8, align 8, !tbaa !5
  %265 = call i32 @memcmp(ptr noundef %264, ptr noundef @png_pHYs, i64 noundef 4) #5
  %266 = icmp ne i32 %265, 0
  br i1 %266, label %271, label %267

267:                                              ; preds = %263
  %268 = load ptr, ptr %3, align 8, !tbaa !5
  %269 = load ptr, ptr %4, align 8, !tbaa !5
  %270 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_pHYs(ptr noundef %268, ptr noundef %269, i64 noundef %270)
  br label %347

271:                                              ; preds = %263
  %272 = load ptr, ptr %8, align 8, !tbaa !5
  %273 = call i32 @memcmp(ptr noundef %272, ptr noundef @png_sBIT, i64 noundef 4) #5
  %274 = icmp ne i32 %273, 0
  br i1 %274, label %279, label %275

275:                                              ; preds = %271
  %276 = load ptr, ptr %3, align 8, !tbaa !5
  %277 = load ptr, ptr %4, align 8, !tbaa !5
  %278 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_sBIT(ptr noundef %276, ptr noundef %277, i64 noundef %278)
  br label %346

279:                                              ; preds = %271
  %280 = load ptr, ptr %8, align 8, !tbaa !5
  %281 = call i32 @memcmp(ptr noundef %280, ptr noundef @png_sRGB, i64 noundef 4) #5
  %282 = icmp ne i32 %281, 0
  br i1 %282, label %287, label %283

283:                                              ; preds = %279
  %284 = load ptr, ptr %3, align 8, !tbaa !5
  %285 = load ptr, ptr %4, align 8, !tbaa !5
  %286 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_sRGB(ptr noundef %284, ptr noundef %285, i64 noundef %286)
  br label %345

287:                                              ; preds = %279
  %288 = load ptr, ptr %8, align 8, !tbaa !5
  %289 = call i32 @memcmp(ptr noundef %288, ptr noundef @png_iCCP, i64 noundef 4) #5
  %290 = icmp ne i32 %289, 0
  br i1 %290, label %295, label %291

291:                                              ; preds = %287
  %292 = load ptr, ptr %3, align 8, !tbaa !5
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_iCCP(ptr noundef %292, ptr noundef %293, i64 noundef %294)
  br label %344

295:                                              ; preds = %287
  %296 = load ptr, ptr %8, align 8, !tbaa !5
  %297 = call i32 @memcmp(ptr noundef %296, ptr noundef @png_sPLT, i64 noundef 4) #5
  %298 = icmp ne i32 %297, 0
  br i1 %298, label %303, label %299

299:                                              ; preds = %295
  %300 = load ptr, ptr %3, align 8, !tbaa !5
  %301 = load ptr, ptr %4, align 8, !tbaa !5
  %302 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_sPLT(ptr noundef %300, ptr noundef %301, i64 noundef %302)
  br label %343

303:                                              ; preds = %295
  %304 = load ptr, ptr %8, align 8, !tbaa !5
  %305 = call i32 @memcmp(ptr noundef %304, ptr noundef @png_tEXt, i64 noundef 4) #5
  %306 = icmp ne i32 %305, 0
  br i1 %306, label %311, label %307

307:                                              ; preds = %303
  %308 = load ptr, ptr %3, align 8, !tbaa !5
  %309 = load ptr, ptr %4, align 8, !tbaa !5
  %310 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_tEXt(ptr noundef %308, ptr noundef %309, i64 noundef %310)
  br label %342

311:                                              ; preds = %303
  %312 = load ptr, ptr %8, align 8, !tbaa !5
  %313 = call i32 @memcmp(ptr noundef %312, ptr noundef @png_tIME, i64 noundef 4) #5
  %314 = icmp ne i32 %313, 0
  br i1 %314, label %319, label %315

315:                                              ; preds = %311
  %316 = load ptr, ptr %3, align 8, !tbaa !5
  %317 = load ptr, ptr %4, align 8, !tbaa !5
  %318 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_tIME(ptr noundef %316, ptr noundef %317, i64 noundef %318)
  br label %341

319:                                              ; preds = %311
  %320 = load ptr, ptr %8, align 8, !tbaa !5
  %321 = call i32 @memcmp(ptr noundef %320, ptr noundef @png_tRNS, i64 noundef 4) #5
  %322 = icmp ne i32 %321, 0
  br i1 %322, label %327, label %323

323:                                              ; preds = %319
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = load ptr, ptr %4, align 8, !tbaa !5
  %326 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_tRNS(ptr noundef %324, ptr noundef %325, i64 noundef %326)
  br label %340

327:                                              ; preds = %319
  %328 = load ptr, ptr %8, align 8, !tbaa !5
  %329 = call i32 @memcmp(ptr noundef %328, ptr noundef @png_zTXt, i64 noundef 4) #5
  %330 = icmp ne i32 %329, 0
  br i1 %330, label %335, label %331

331:                                              ; preds = %327
  %332 = load ptr, ptr %3, align 8, !tbaa !5
  %333 = load ptr, ptr %4, align 8, !tbaa !5
  %334 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_zTXt(ptr noundef %332, ptr noundef %333, i64 noundef %334)
  br label %339

335:                                              ; preds = %327
  %336 = load ptr, ptr %3, align 8, !tbaa !5
  %337 = load ptr, ptr %4, align 8, !tbaa !5
  %338 = load i64, ptr %7, align 8, !tbaa !20
  call void @png_handle_unknown(ptr noundef %336, ptr noundef %337, i64 noundef %338)
  br label %339

339:                                              ; preds = %335, %331
  br label %340

340:                                              ; preds = %339, %323
  br label %341

341:                                              ; preds = %340, %315
  br label %342

342:                                              ; preds = %341, %307
  br label %343

343:                                              ; preds = %342, %299
  br label %344

344:                                              ; preds = %343, %291
  br label %345

345:                                              ; preds = %344, %283
  br label %346

346:                                              ; preds = %345, %275
  br label %347

347:                                              ; preds = %346, %267
  br label %348

348:                                              ; preds = %347, %259
  br label %349

349:                                              ; preds = %348, %251
  br label %350

350:                                              ; preds = %349, %243
  br label %351

351:                                              ; preds = %350, %235
  br label %352

352:                                              ; preds = %351, %227
  br label %353

353:                                              ; preds = %352, %219
  br label %354

354:                                              ; preds = %353, %211
  br label %355

355:                                              ; preds = %354
  br label %356

356:                                              ; preds = %355, %168
  br label %357

357:                                              ; preds = %356, %163
  br label %358

358:                                              ; preds = %357, %104
  br label %359

359:                                              ; preds = %358, %96
  store i32 0, ptr %9, align 4
  br label %360

360:                                              ; preds = %359, %199, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %361 = load i32, ptr %9, align 4
  switch i32 %361, label %364 [
    i32 0, label %362
    i32 2, label %363
  ]

362:                                              ; preds = %360
  br label %71

363:                                              ; preds = %360, %15
  ret void

364:                                              ; preds = %360
  unreachable
}

declare void @png_read_data(ptr noundef, ptr noundef, i64 noundef) #1

declare i32 @png_sig_cmp(ptr noundef, i64 noundef, i64 noundef) #1

declare i64 @png_read_chunk_header(ptr noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #3

declare void @png_handle_IHDR(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_IEND(ptr noundef, ptr noundef, i64 noundef) #1

declare i32 @png_handle_as_unknown(ptr noundef, ptr noundef) #1

declare void @png_handle_unknown(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_PLTE(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_bKGD(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_cHRM(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_gAMA(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_hIST(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_oFFs(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_pCAL(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_sCAL(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_pHYs(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_sBIT(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_sRGB(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_iCCP(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_sPLT(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_tEXt(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_tIME(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_tRNS(ptr noundef, ptr noundef, i64 noundef) #1

declare void @png_handle_zTXt(ptr noundef, ptr noundef, i64 noundef) #1

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

!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, !7, i64 636}
!10 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !7, i64 272, !7, i64 273, !11, i64 280, !11, i64 288, !11, i64 296, !12, i64 304, !6, i64 416, !11, i64 424, !13, i64 432, !13, i64 436, !13, i64 440, !13, i64 444, !13, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !14, i64 568, !11, i64 592, !11, i64 600, !6, i64 608, !15, i64 616, !15, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !15, i64 638, !7, i64 640, !16, i64 644, !17, i64 648, !17, i64 658, !6, i64 672, !11, i64 680, !11, i64 688, !13, i64 696, !16, i64 700, !16, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !18, i64 760, !18, i64 765, !6, i64 776, !17, i64 784, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !6, i64 864, !11, i64 872, !11, i64 880, !11, i64 888, !11, i64 896, !11, i64 904, !11, i64 912, !13, i64 920, !13, i64 924, !11, i64 928, !11, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !7, i64 984, !7, i64 985, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !11, i64 1040, !6, i64 1048, !6, i64 1056, !13, i64 1064, !6, i64 1072, !7, i64 1080, !15, i64 1082, !15, i64 1084, !15, i64 1086, !11, i64 1088, !11, i64 1096, !7, i64 1104, !7, i64 1105, !11, i64 1112, !11, i64 1120, !6, i64 1128, !6, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !6, i64 1168, !6, i64 1176, !7, i64 1184, !11, i64 1192, !11, i64 1200, !19, i64 1208, !11, i64 1240, !11, i64 1248, !6, i64 1256}
!11 = !{!"long", !7, i64 0}
!12 = !{!"z_stream_s", !6, i64 0, !13, i64 8, !11, i64 16, !6, i64 24, !13, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !11, i64 96, !11, i64 104}
!13 = !{!"int", !7, i64 0}
!14 = !{!"png_row_info_struct", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!15 = !{!"short", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"png_color_16_struct", !7, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !15, i64 8}
!18 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!19 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !11, i64 16, !7, i64 24}
!20 = !{!11, !11, i64 0}
!21 = !{!10, !11, i64 280}
!22 = !{!10, !7, i64 630}
!23 = !{!10, !11, i64 592}


; 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.13 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [39 x i8], align 1
@png_IDAT = external global [5 x i8], align 1
@png_IHDR = external global [5 x i8], align 1
@png_IEND = external global [5 x i8], align 1
@png_PLTE = external global [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [25 x i8], align 1
@png_bKGD = external global [5 x i8], align 1
@png_cHRM = external global [5 x i8], align 1
@png_gAMA = external global [5 x i8], align 1
@png_hIST = external global [5 x i8], align 1
@png_oFFs = external global [5 x i8], align 1
@png_pCAL = external global [5 x i8], align 1
@png_sCAL = external global [5 x i8], align 1
@png_pHYs = external global [5 x i8], align 1
@png_sBIT = external global [5 x i8], align 1
@png_sRGB = external global [5 x i8], align 1
@png_iCCP = external global [5 x i8], align 1
@png_sPLT = external global [5 x i8], align 1
@png_tEXt = external global [5 x i8], align 1
@png_tIME = external global [5 x i8], align 1
@png_tRNS = external global [5 x i8], align 1
@png_zTXt = external global [5 x i8], align 1

declare void @png_error(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @png_read_info(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = icmp eq ptr %0, null
  %4 = icmp eq ptr %1, null
  %or.cond = or i1 %3, %4
  br i1 %or.cond, label %.thread, label %5

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 636
  %7 = load i8, ptr %6, align 4, !tbaa !5
  %8 = icmp ult i8 %7, 8
  br i1 %8, label %9, label %27

9:                                                ; preds = %5
  %10 = zext nneg i8 %7 to i64
  %11 = sub nuw nsw i64 8, %10
  %12 = getelementptr inbounds i8, ptr %1, i64 52
  %13 = getelementptr inbounds [8 x i8], ptr %12, i64 0, i64 %10
  tail call void @png_read_data(ptr noundef nonnull %0, ptr noundef nonnull %13, i64 noundef %11) #3
  store i8 8, ptr %6, align 4, !tbaa !5
  %14 = tail call i32 @png_sig_cmp(ptr noundef nonnull %12, i64 noundef %10, i64 noundef %11) #3
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %21, label %15

15:                                               ; preds = %9
  %16 = icmp ult i8 %7, 4
  br i1 %16, label %17, label %20

17:                                               ; preds = %15
  %18 = sub nuw nsw i64 4, %10
  %19 = tail call i32 @png_sig_cmp(ptr noundef nonnull %12, i64 noundef %10, i64 noundef %18) #3
  %.not133 = icmp eq i32 %19, 0
  br i1 %.not133, label %20, label %.sink.split

20:                                               ; preds = %17, %15
  br label %.sink.split

.sink.split:                                      ; preds = %17, %20
  %.str.13.sink = phi ptr [ @.str.14, %20 ], [ @.str.13, %17 ]
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull %.str.13.sink) #3
  br label %21

21:                                               ; preds = %.sink.split, %9
  %22 = icmp ult i8 %7, 3
  br i1 %22, label %23, label %27

23:                                               ; preds = %21
  %24 = getelementptr inbounds i8, ptr %0, i64 280
  %25 = load i64, ptr %24, align 8, !tbaa !19
  %26 = or i64 %25, 4096
  store i64 %26, ptr %24, align 8, !tbaa !19
  br label %27

27:                                               ; preds = %21, %23, %5
  %28 = getelementptr inbounds i8, ptr %0, i64 620
  %29 = getelementptr inbounds i8, ptr %0, i64 280
  br label %30

30:                                               ; preds = %.backedge, %27
  %31 = tail call i64 @png_read_chunk_header(ptr noundef %0) #3
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_IDAT, i64 4)
  %.not134 = icmp eq i32 %bcmp, 0
  br i1 %.not134, label %32, label %37

32:                                               ; preds = %30
  %33 = load i64, ptr %29, align 8, !tbaa !19
  %34 = and i64 %33, 8
  %.not135 = icmp eq i64 %34, 0
  br i1 %.not135, label %37, label %35

35:                                               ; preds = %32
  %36 = or i64 %33, 8192
  store i64 %36, ptr %29, align 8, !tbaa !19
  br label %37

37:                                               ; preds = %32, %35, %30
  %bcmp136 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_IHDR, i64 4)
  %.not137 = icmp eq i32 %bcmp136, 0
  br i1 %.not137, label %38, label %39

38:                                               ; preds = %37
  tail call void @png_handle_IHDR(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

.backedge:                                        ; preds = %38, %51, %48, %80, %84, %88, %92, %96, %100, %104, %108, %109, %106, %102, %98, %94, %90, %86, %82, %78, %63, %40
  br label %30

39:                                               ; preds = %37
  %bcmp138 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_IEND, i64 4)
  %.not139 = icmp eq i32 %bcmp138, 0
  br i1 %.not139, label %40, label %41

40:                                               ; preds = %39
  tail call void @png_handle_IEND(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

41:                                               ; preds = %39
  %42 = tail call i32 @png_handle_as_unknown(ptr noundef %0, ptr noundef nonnull %28) #3
  %.not140 = icmp eq i32 %42, 0
  br i1 %.not140, label %62, label %43

43:                                               ; preds = %41
  %bcmp179 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_IDAT, i64 4)
  %.not180 = icmp eq i32 %bcmp179, 0
  br i1 %.not180, label %44, label %47

44:                                               ; preds = %43
  %45 = load i64, ptr %29, align 8, !tbaa !19
  %46 = or i64 %45, 4
  store i64 %46, ptr %29, align 8, !tbaa !19
  br label %47

47:                                               ; preds = %44, %43
  tail call void @png_handle_unknown(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  %bcmp181 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_PLTE, i64 4)
  %.not182 = icmp eq i32 %bcmp181, 0
  br i1 %.not182, label %48, label %51

48:                                               ; preds = %47
  %49 = load i64, ptr %29, align 8, !tbaa !19
  %50 = or i64 %49, 2
  store i64 %50, ptr %29, align 8, !tbaa !19
  br label %.backedge

51:                                               ; preds = %47
  %bcmp183 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_IDAT, i64 4)
  %.not184 = icmp eq i32 %bcmp183, 0
  br i1 %.not184, label %52, label %.backedge

52:                                               ; preds = %51
  %53 = load i64, ptr %29, align 8, !tbaa !19
  %54 = and i64 %53, 1
  %.not185 = icmp eq i64 %54, 0
  br i1 %.not185, label %55, label %56

55:                                               ; preds = %52
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.15) #3
  br label %.thread

56:                                               ; preds = %52
  %57 = getelementptr inbounds i8, ptr %0, i64 630
  %58 = load i8, ptr %57, align 2, !tbaa !20
  %59 = icmp eq i8 %58, 3
  %60 = and i64 %53, 2
  %.not186 = icmp eq i64 %60, 0
  %or.cond187 = and i1 %.not186, %59
  br i1 %or.cond187, label %61, label %.thread

61:                                               ; preds = %56
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.16) #3
  br label %.thread

62:                                               ; preds = %41
  %bcmp141 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_PLTE, i64 4)
  %.not142 = icmp eq i32 %bcmp141, 0
  br i1 %.not142, label %63, label %64

63:                                               ; preds = %62
  tail call void @png_handle_PLTE(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

64:                                               ; preds = %62
  %bcmp143 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_IDAT, i64 4)
  %.not144 = icmp eq i32 %bcmp143, 0
  br i1 %.not144, label %65, label %77

65:                                               ; preds = %64
  %66 = load i64, ptr %29, align 8, !tbaa !19
  %67 = and i64 %66, 1
  %.not145 = icmp eq i64 %67, 0
  br i1 %.not145, label %.sink.split194, label %68

68:                                               ; preds = %65
  %69 = getelementptr inbounds i8, ptr %0, i64 630
  %70 = load i8, ptr %69, align 2, !tbaa !20
  %71 = icmp eq i8 %70, 3
  %72 = and i64 %66, 2
  %.not146 = icmp eq i64 %72, 0
  %or.cond188 = and i1 %.not146, %71
  br i1 %or.cond188, label %.sink.split194, label %73

.sink.split194:                                   ; preds = %68, %65
  %.str.16.sink = phi ptr [ @.str.15, %65 ], [ @.str.16, %68 ]
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull %.str.16.sink) #3
  br label %73

73:                                               ; preds = %.sink.split194, %68
  %74 = getelementptr inbounds i8, ptr %0, i64 592
  store i64 %31, ptr %74, align 8, !tbaa !21
  %75 = load i64, ptr %29, align 8, !tbaa !19
  %76 = or i64 %75, 4
  store i64 %76, ptr %29, align 8, !tbaa !19
  br label %.thread

77:                                               ; preds = %64
  %bcmp147 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_bKGD, i64 4)
  %.not148 = icmp eq i32 %bcmp147, 0
  br i1 %.not148, label %78, label %79

78:                                               ; preds = %77
  tail call void @png_handle_bKGD(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

79:                                               ; preds = %77
  %bcmp149 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_cHRM, i64 4)
  %.not150 = icmp eq i32 %bcmp149, 0
  br i1 %.not150, label %80, label %81

80:                                               ; preds = %79
  tail call void @png_handle_cHRM(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

81:                                               ; preds = %79
  %bcmp151 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_gAMA, i64 4)
  %.not152 = icmp eq i32 %bcmp151, 0
  br i1 %.not152, label %82, label %83

82:                                               ; preds = %81
  tail call void @png_handle_gAMA(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

83:                                               ; preds = %81
  %bcmp153 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_hIST, i64 4)
  %.not154 = icmp eq i32 %bcmp153, 0
  br i1 %.not154, label %84, label %85

84:                                               ; preds = %83
  tail call void @png_handle_hIST(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

85:                                               ; preds = %83
  %bcmp155 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_oFFs, i64 4)
  %.not156 = icmp eq i32 %bcmp155, 0
  br i1 %.not156, label %86, label %87

86:                                               ; preds = %85
  tail call void @png_handle_oFFs(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

87:                                               ; preds = %85
  %bcmp157 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_pCAL, i64 4)
  %.not158 = icmp eq i32 %bcmp157, 0
  br i1 %.not158, label %88, label %89

88:                                               ; preds = %87
  tail call void @png_handle_pCAL(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

89:                                               ; preds = %87
  %bcmp159 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_sCAL, i64 4)
  %.not160 = icmp eq i32 %bcmp159, 0
  br i1 %.not160, label %90, label %91

90:                                               ; preds = %89
  tail call void @png_handle_sCAL(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

91:                                               ; preds = %89
  %bcmp161 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_pHYs, i64 4)
  %.not162 = icmp eq i32 %bcmp161, 0
  br i1 %.not162, label %92, label %93

92:                                               ; preds = %91
  tail call void @png_handle_pHYs(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

93:                                               ; preds = %91
  %bcmp163 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_sBIT, i64 4)
  %.not164 = icmp eq i32 %bcmp163, 0
  br i1 %.not164, label %94, label %95

94:                                               ; preds = %93
  tail call void @png_handle_sBIT(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

95:                                               ; preds = %93
  %bcmp165 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_sRGB, i64 4)
  %.not166 = icmp eq i32 %bcmp165, 0
  br i1 %.not166, label %96, label %97

96:                                               ; preds = %95
  tail call void @png_handle_sRGB(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

97:                                               ; preds = %95
  %bcmp167 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_iCCP, i64 4)
  %.not168 = icmp eq i32 %bcmp167, 0
  br i1 %.not168, label %98, label %99

98:                                               ; preds = %97
  tail call void @png_handle_iCCP(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

99:                                               ; preds = %97
  %bcmp169 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_sPLT, i64 4)
  %.not170 = icmp eq i32 %bcmp169, 0
  br i1 %.not170, label %100, label %101

100:                                              ; preds = %99
  tail call void @png_handle_sPLT(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

101:                                              ; preds = %99
  %bcmp171 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_tEXt, i64 4)
  %.not172 = icmp eq i32 %bcmp171, 0
  br i1 %.not172, label %102, label %103

102:                                              ; preds = %101
  tail call void @png_handle_tEXt(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

103:                                              ; preds = %101
  %bcmp173 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_tIME, i64 4)
  %.not174 = icmp eq i32 %bcmp173, 0
  br i1 %.not174, label %104, label %105

104:                                              ; preds = %103
  tail call void @png_handle_tIME(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

105:                                              ; preds = %103
  %bcmp175 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_tRNS, i64 4)
  %.not176 = icmp eq i32 %bcmp175, 0
  br i1 %.not176, label %106, label %107

106:                                              ; preds = %105
  tail call void @png_handle_tRNS(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

107:                                              ; preds = %105
  %bcmp177 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %28, ptr noundef nonnull dereferenceable(4) @png_zTXt, i64 4)
  %.not178 = icmp eq i32 %bcmp177, 0
  br i1 %.not178, label %108, label %109

108:                                              ; preds = %107
  tail call void @png_handle_zTXt(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

109:                                              ; preds = %107
  tail call void @png_handle_unknown(ptr noundef %0, ptr noundef %1, i64 noundef %31) #3
  br label %.backedge

.thread:                                          ; preds = %55, %61, %56, %73, %2
  ret void
}

declare void @png_read_data(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare i32 @png_sig_cmp(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #0

declare i64 @png_read_chunk_header(ptr noundef) local_unnamed_addr #0

declare void @png_handle_IHDR(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_IEND(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare i32 @png_handle_as_unknown(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @png_handle_unknown(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_PLTE(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_bKGD(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_cHRM(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_gAMA(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_hIST(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_oFFs(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_pCAL(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_sCAL(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_pHYs(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_sBIT(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_sRGB(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_iCCP(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_sPLT(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_tEXt(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_tIME(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_tRNS(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare void @png_handle_zTXt(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #2

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { nofree nounwind willreturn memory(argmem: read) }
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, !7, i64 636}
!6 = !{!"png_struct_def", !7, i64 0, !9, i64 200, !9, i64 208, !9, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !7, i64 272, !7, i64 273, !10, i64 280, !10, i64 288, !10, i64 296, !11, i64 304, !9, i64 416, !10, i64 424, !12, i64 432, !12, i64 436, !12, i64 440, !12, i64 444, !12, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !9, i64 520, !9, i64 528, !9, i64 536, !9, i64 544, !9, i64 552, !9, i64 560, !13, i64 568, !10, i64 592, !10, i64 600, !9, i64 608, !14, i64 616, !14, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !14, i64 638, !7, i64 640, !15, i64 644, !16, i64 648, !16, i64 658, !9, i64 672, !10, i64 680, !10, i64 688, !12, i64 696, !15, i64 700, !15, i64 704, !9, i64 712, !9, i64 720, !9, i64 728, !9, i64 736, !9, i64 744, !9, i64 752, !17, i64 760, !17, i64 765, !9, i64 776, !16, i64 784, !9, i64 800, !9, i64 808, !9, i64 816, !9, i64 824, !9, i64 832, !9, i64 840, !9, i64 848, !9, i64 856, !9, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !12, i64 920, !12, i64 924, !10, i64 928, !10, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !9, i64 968, !9, i64 976, !7, i64 984, !7, i64 985, !9, i64 992, !9, i64 1000, !9, i64 1008, !9, i64 1016, !9, i64 1024, !9, i64 1032, !10, i64 1040, !9, i64 1048, !9, i64 1056, !12, i64 1064, !9, i64 1072, !7, i64 1080, !14, i64 1082, !14, i64 1084, !14, i64 1086, !10, i64 1088, !10, i64 1096, !7, i64 1104, !7, i64 1105, !10, i64 1112, !10, i64 1120, !9, i64 1128, !9, i64 1136, !9, i64 1144, !9, i64 1152, !9, i64 1160, !9, i64 1168, !9, i64 1176, !7, i64 1184, !10, i64 1192, !10, i64 1200, !18, i64 1208, !10, i64 1240, !10, i64 1248, !9, i64 1256}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!"z_stream_s", !9, i64 0, !12, i64 8, !10, i64 16, !9, i64 24, !12, i64 32, !10, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !12, i64 88, !10, i64 96, !10, i64 104}
!12 = !{!"int", !7, i64 0}
!13 = !{!"png_row_info_struct", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!17 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!18 = !{!"png_unknown_chunk_t", !7, i64 0, !9, i64 8, !10, i64 16, !7, i64 24}
!19 = !{!6, !10, i64 280}
!20 = !{!6, !7, i64 630}
!21 = !{!6, !10, i64 592}


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