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

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

@png_IDAT = external global [5 x i8], align 1
@png_pass_inc = external constant [7 x i32], align 16
@png_pass_start = external constant [7 x i32], align 16
@png_pass_yinc = external constant [7 x i32], align 16
@png_pass_ystart = external constant [7 x i32], align 16
@.str.122 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @png_get_uint_31(ptr noundef, ptr noundef) #0

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

declare void @png_error(ptr noundef, ptr noundef) #2

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

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

declare void @png_reset_crc(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @png_crc_read(ptr noundef, ptr noundef, i64 noundef) #0

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

declare i32 @inflate(ptr noundef, i32 noundef) #2

declare void @png_warning(ptr noundef, ptr noundef) #2

declare i32 @inflateReset(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local void @png_read_finish_row(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca [4 x i8], align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.png_struct_def, ptr %6, i32 0, i32 30
  %8 = load i64, ptr %7, align 8, !tbaa !9
  %9 = add i64 %8, 1
  store i64 %9, ptr %7, align 8, !tbaa !9
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.png_struct_def, ptr %10, i32 0, i32 30
  %12 = load i64, ptr %11, align 8, !tbaa !9
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.png_struct_def, ptr %13, i32 0, i32 25
  %15 = load i64, ptr %14, align 8, !tbaa !20
  %16 = icmp ult i64 %12, %15
  br i1 %16, label %17, label %18

17:                                               ; preds = %1
  br label %356

18:                                               ; preds = %1
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.png_struct_def, ptr %19, i32 0, i32 46
  %21 = load i8, ptr %20, align 1, !tbaa !21
  %22 = icmp ne i8 %21, 0
  br i1 %22, label %23, label %165

23:                                               ; preds = %18
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.png_struct_def, ptr %24, i32 0, i32 30
  store i64 0, ptr %25, align 8, !tbaa !9
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.png_struct_def, ptr %27, i32 0, i32 31
  %29 = load ptr, ptr %28, align 8, !tbaa !22
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.png_struct_def, ptr %30, i32 0, i32 27
  %32 = load i64, ptr %31, align 8, !tbaa !23
  %33 = add i64 %32, 1
  %34 = call ptr @png_memset_check(ptr noundef %26, ptr noundef %29, i32 noundef 0, i64 noundef %33)
  br label %35

35:                                               ; preds = %152, %23
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.png_struct_def, ptr %36, i32 0, i32 47
  %38 = load i8, ptr %37, align 4, !tbaa !24
  %39 = add i8 %38, 1
  store i8 %39, ptr %37, align 4, !tbaa !24
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.png_struct_def, ptr %40, i32 0, i32 47
  %42 = load i8, ptr %41, align 4, !tbaa !24
  %43 = zext i8 %42 to i32
  %44 = icmp sge i32 %43, 7
  br i1 %44, label %45, label %46

45:                                               ; preds = %35
  br label %157

46:                                               ; preds = %35
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.png_struct_def, ptr %47, i32 0, i32 23
  %49 = load i64, ptr %48, align 8, !tbaa !25
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.png_struct_def, ptr %50, i32 0, i32 47
  %52 = load i8, ptr %51, align 4, !tbaa !24
  %53 = zext i8 %52 to i64
  %54 = getelementptr inbounds [7 x i32], ptr @png_pass_inc, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !26
  %56 = sext i32 %55 to i64
  %57 = add i64 %49, %56
  %58 = sub i64 %57, 1
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.png_struct_def, ptr %59, i32 0, i32 47
  %61 = load i8, ptr %60, align 4, !tbaa !24
  %62 = zext i8 %61 to i64
  %63 = getelementptr inbounds [7 x i32], ptr @png_pass_start, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !26
  %65 = sext i32 %64 to i64
  %66 = sub i64 %58, %65
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.png_struct_def, ptr %67, i32 0, i32 47
  %69 = load i8, ptr %68, align 4, !tbaa !24
  %70 = zext i8 %69 to i64
  %71 = getelementptr inbounds [7 x i32], ptr @png_pass_inc, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !26
  %73 = sext i32 %72 to i64
  %74 = udiv i64 %66, %73
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.png_struct_def, ptr %75, i32 0, i32 29
  store i64 %74, ptr %76, align 8, !tbaa !27
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.png_struct_def, ptr %77, i32 0, i32 52
  %79 = load i8, ptr %78, align 1, !tbaa !28
  %80 = zext i8 %79 to i32
  %81 = icmp sge i32 %80, 8
  br i1 %81, label %82, label %92

82:                                               ; preds = %46
  %83 = load ptr, ptr %2, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.png_struct_def, ptr %83, i32 0, i32 29
  %85 = load i64, ptr %84, align 8, !tbaa !27
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.png_struct_def, ptr %86, i32 0, i32 52
  %88 = load i8, ptr %87, align 1, !tbaa !28
  %89 = zext i8 %88 to i64
  %90 = lshr i64 %89, 3
  %91 = mul i64 %85, %90
  br label %103

92:                                               ; preds = %46
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.png_struct_def, ptr %93, i32 0, i32 29
  %95 = load i64, ptr %94, align 8, !tbaa !27
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.png_struct_def, ptr %96, i32 0, i32 52
  %98 = load i8, ptr %97, align 1, !tbaa !28
  %99 = zext i8 %98 to i64
  %100 = mul i64 %95, %99
  %101 = add i64 %100, 7
  %102 = lshr i64 %101, 3
  br label %103

103:                                              ; preds = %92, %82
  %104 = phi i64 [ %91, %82 ], [ %102, %92 ]
  %105 = add i64 %104, 1
  %106 = load ptr, ptr %2, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.png_struct_def, ptr %106, i32 0, i32 28
  store i64 %105, ptr %107, align 8, !tbaa !29
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.png_struct_def, ptr %108, i32 0, i32 14
  %110 = load i64, ptr %109, align 8, !tbaa !30
  %111 = and i64 %110, 2
  %112 = icmp ne i64 %111, 0
  br i1 %112, label %150, label %113

113:                                              ; preds = %103
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.png_struct_def, ptr %114, i32 0, i32 24
  %116 = load i64, ptr %115, align 8, !tbaa !31
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.png_struct_def, ptr %117, i32 0, i32 47
  %119 = load i8, ptr %118, align 4, !tbaa !24
  %120 = zext i8 %119 to i64
  %121 = getelementptr inbounds [7 x i32], ptr @png_pass_yinc, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !26
  %123 = sext i32 %122 to i64
  %124 = add i64 %116, %123
  %125 = sub i64 %124, 1
  %126 = load ptr, ptr %2, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.png_struct_def, ptr %126, i32 0, i32 47
  %128 = load i8, ptr %127, align 4, !tbaa !24
  %129 = zext i8 %128 to i64
  %130 = getelementptr inbounds [7 x i32], ptr @png_pass_ystart, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !26
  %132 = sext i32 %131 to i64
  %133 = sub i64 %125, %132
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.png_struct_def, ptr %134, i32 0, i32 47
  %136 = load i8, ptr %135, align 4, !tbaa !24
  %137 = zext i8 %136 to i64
  %138 = getelementptr inbounds [7 x i32], ptr @png_pass_yinc, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !26
  %140 = sext i32 %139 to i64
  %141 = udiv i64 %133, %140
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.png_struct_def, ptr %142, i32 0, i32 25
  store i64 %141, ptr %143, align 8, !tbaa !20
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.png_struct_def, ptr %144, i32 0, i32 25
  %146 = load i64, ptr %145, align 8, !tbaa !20
  %147 = icmp ne i64 %146, 0
  br i1 %147, label %149, label %148

148:                                              ; preds = %113
  br label %152

149:                                              ; preds = %113
  br label %151

150:                                              ; preds = %103
  br label %157

151:                                              ; preds = %149
  br label %152

152:                                              ; preds = %151, %148
  %153 = load ptr, ptr %2, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.png_struct_def, ptr %153, i32 0, i32 29
  %155 = load i64, ptr %154, align 8, !tbaa !27
  %156 = icmp eq i64 %155, 0
  br i1 %156, label %35, label %157, !llvm.loop !32

157:                                              ; preds = %152, %150, %45
  %158 = load ptr, ptr %2, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.png_struct_def, ptr %158, i32 0, i32 47
  %160 = load i8, ptr %159, align 4, !tbaa !24
  %161 = zext i8 %160 to i32
  %162 = icmp slt i32 %161, 7
  br i1 %162, label %163, label %164

163:                                              ; preds = %157
  br label %356

164:                                              ; preds = %157
  br label %165

165:                                              ; preds = %164, %18
  %166 = load ptr, ptr %2, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.png_struct_def, ptr %166, i32 0, i32 13
  %168 = load i64, ptr %167, align 8, !tbaa !34
  %169 = and i64 %168, 32
  %170 = icmp ne i64 %169, 0
  br i1 %170, label %335, label %171

171:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.png_struct_def, ptr %172, i32 0, i32 15
  %174 = getelementptr inbounds %struct.z_stream_s, ptr %173, i32 0, i32 3
  store ptr %3, ptr %174, align 8, !tbaa !35
  %175 = load ptr, ptr %2, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.png_struct_def, ptr %175, i32 0, i32 15
  %177 = getelementptr inbounds %struct.z_stream_s, ptr %176, i32 0, i32 4
  store i32 1, ptr %177, align 8, !tbaa !36
  br label %178

178:                                              ; preds = %330, %171
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.png_struct_def, ptr %179, i32 0, i32 15
  %181 = getelementptr inbounds %struct.z_stream_s, ptr %180, i32 0, i32 1
  %182 = load i32, ptr %181, align 8, !tbaa !37
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %262, label %184

184:                                              ; preds = %178
  br label %185

185:                                              ; preds = %213, %184
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.png_struct_def, ptr %186, i32 0, i32 38
  %188 = load i64, ptr %187, align 8, !tbaa !38
  %189 = icmp ne i64 %188, 0
  %190 = xor i1 %189, true
  br i1 %190, label %191, label %214

191:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %192 = load ptr, ptr %2, align 8, !tbaa !5
  %193 = call i32 @png_crc_finish(ptr noundef %192, i64 noundef 0)
  %194 = load ptr, ptr %2, align 8, !tbaa !5
  %195 = getelementptr inbounds [4 x i8], ptr %5, i64 0, i64 0
  call void @png_read_data(ptr noundef %194, ptr noundef %195, i64 noundef 4)
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = getelementptr inbounds [4 x i8], ptr %5, i64 0, i64 0
  %198 = call i64 @png_get_uint_31(ptr noundef %196, ptr noundef %197)
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.png_struct_def, ptr %199, i32 0, i32 38
  store i64 %198, ptr %200, align 8, !tbaa !38
  %201 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_reset_crc(ptr noundef %201)
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = load ptr, ptr %2, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.png_struct_def, ptr %203, i32 0, i32 43
  %205 = getelementptr inbounds [5 x i8], ptr %204, i64 0, i64 0
  call void @png_crc_read(ptr noundef %202, ptr noundef %205, i64 noundef 4)
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.png_struct_def, ptr %206, i32 0, i32 43
  %208 = getelementptr inbounds [5 x i8], ptr %207, i64 0, i64 0
  %209 = call i32 @memcmp(ptr noundef %208, ptr noundef @png_IDAT, i64 noundef 4) #5
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %213

211:                                              ; preds = %191
  %212 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_error(ptr noundef %212, ptr noundef @.str.122)
  br label %213

213:                                              ; preds = %211, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %185, !llvm.loop !39

214:                                              ; preds = %185
  %215 = load ptr, ptr %2, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.png_struct_def, ptr %215, i32 0, i32 17
  %217 = load i64, ptr %216, align 8, !tbaa !40
  %218 = trunc i64 %217 to i32
  %219 = load ptr, ptr %2, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.png_struct_def, ptr %219, i32 0, i32 15
  %221 = getelementptr inbounds %struct.z_stream_s, ptr %220, i32 0, i32 1
  store i32 %218, ptr %221, align 8, !tbaa !37
  %222 = load ptr, ptr %2, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.png_struct_def, ptr %222, i32 0, i32 16
  %224 = load ptr, ptr %223, align 8, !tbaa !41
  %225 = load ptr, ptr %2, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.png_struct_def, ptr %225, i32 0, i32 15
  %227 = getelementptr inbounds %struct.z_stream_s, ptr %226, i32 0, i32 0
  store ptr %224, ptr %227, align 8, !tbaa !42
  %228 = load ptr, ptr %2, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.png_struct_def, ptr %228, i32 0, i32 17
  %230 = load i64, ptr %229, align 8, !tbaa !40
  %231 = load ptr, ptr %2, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.png_struct_def, ptr %231, i32 0, i32 38
  %233 = load i64, ptr %232, align 8, !tbaa !38
  %234 = icmp ugt i64 %230, %233
  br i1 %234, label %235, label %243

235:                                              ; preds = %214
  %236 = load ptr, ptr %2, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.png_struct_def, ptr %236, i32 0, i32 38
  %238 = load i64, ptr %237, align 8, !tbaa !38
  %239 = trunc i64 %238 to i32
  %240 = load ptr, ptr %2, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.png_struct_def, ptr %240, i32 0, i32 15
  %242 = getelementptr inbounds %struct.z_stream_s, ptr %241, i32 0, i32 1
  store i32 %239, ptr %242, align 8, !tbaa !37
  br label %243

243:                                              ; preds = %235, %214
  %244 = load ptr, ptr %2, align 8, !tbaa !5
  %245 = load ptr, ptr %2, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.png_struct_def, ptr %245, i32 0, i32 16
  %247 = load ptr, ptr %246, align 8, !tbaa !41
  %248 = load ptr, ptr %2, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.png_struct_def, ptr %248, i32 0, i32 15
  %250 = getelementptr inbounds %struct.z_stream_s, ptr %249, i32 0, i32 1
  %251 = load i32, ptr %250, align 8, !tbaa !37
  %252 = zext i32 %251 to i64
  call void @png_crc_read(ptr noundef %244, ptr noundef %247, i64 noundef %252)
  %253 = load ptr, ptr %2, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.png_struct_def, ptr %253, i32 0, i32 15
  %255 = getelementptr inbounds %struct.z_stream_s, ptr %254, i32 0, i32 1
  %256 = load i32, ptr %255, align 8, !tbaa !37
  %257 = zext i32 %256 to i64
  %258 = load ptr, ptr %2, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.png_struct_def, ptr %258, i32 0, i32 38
  %260 = load i64, ptr %259, align 8, !tbaa !38
  %261 = sub i64 %260, %257
  store i64 %261, ptr %259, align 8, !tbaa !38
  br label %262

262:                                              ; preds = %243, %178
  %263 = load ptr, ptr %2, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.png_struct_def, ptr %263, i32 0, i32 15
  %265 = call i32 @inflate(ptr noundef %264, i32 noundef 1)
  store i32 %265, ptr %4, align 4, !tbaa !26
  %266 = load i32, ptr %4, align 4, !tbaa !26
  %267 = icmp eq i32 %266, 1
  br i1 %267, label %268, label %296

268:                                              ; preds = %262
  %269 = load ptr, ptr %2, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.png_struct_def, ptr %269, i32 0, i32 15
  %271 = getelementptr inbounds %struct.z_stream_s, ptr %270, i32 0, i32 4
  %272 = load i32, ptr %271, align 8, !tbaa !36
  %273 = icmp ne i32 %272, 0
  br i1 %273, label %274, label %285

274:                                              ; preds = %268
  %275 = load ptr, ptr %2, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.png_struct_def, ptr %275, i32 0, i32 15
  %277 = getelementptr inbounds %struct.z_stream_s, ptr %276, i32 0, i32 1
  %278 = load i32, ptr %277, align 8, !tbaa !37
  %279 = icmp ne i32 %278, 0
  br i1 %279, label %285, label %280

280:                                              ; preds = %274
  %281 = load ptr, ptr %2, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.png_struct_def, ptr %281, i32 0, i32 38
  %283 = load i64, ptr %282, align 8, !tbaa !38
  %284 = icmp ne i64 %283, 0
  br i1 %284, label %285, label %287

285:                                              ; preds = %280, %274, %268
  %286 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_warning(ptr noundef %286, ptr noundef @.str.123)
  br label %287

287:                                              ; preds = %285, %280
  %288 = load ptr, ptr %2, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.png_struct_def, ptr %288, i32 0, i32 12
  %290 = load i64, ptr %289, align 8, !tbaa !43
  %291 = or i64 %290, 8
  store i64 %291, ptr %289, align 8, !tbaa !43
  %292 = load ptr, ptr %2, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.png_struct_def, ptr %292, i32 0, i32 13
  %294 = load i64, ptr %293, align 8, !tbaa !34
  %295 = or i64 %294, 32
  store i64 %295, ptr %293, align 8, !tbaa !34
  br label %331

296:                                              ; preds = %262
  %297 = load i32, ptr %4, align 4, !tbaa !26
  %298 = icmp ne i32 %297, 0
  br i1 %298, label %299, label %314

299:                                              ; preds = %296
  %300 = load ptr, ptr %2, align 8, !tbaa !5
  %301 = load ptr, ptr %2, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct.png_struct_def, ptr %301, i32 0, i32 15
  %303 = getelementptr inbounds %struct.z_stream_s, ptr %302, i32 0, i32 6
  %304 = load ptr, ptr %303, align 8, !tbaa !44
  %305 = icmp ne ptr %304, null
  br i1 %305, label %306, label %311

306:                                              ; preds = %299
  %307 = load ptr, ptr %2, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.png_struct_def, ptr %307, i32 0, i32 15
  %309 = getelementptr inbounds %struct.z_stream_s, ptr %308, i32 0, i32 6
  %310 = load ptr, ptr %309, align 8, !tbaa !44
  br label %312

311:                                              ; preds = %299
  br label %312

312:                                              ; preds = %311, %306
  %313 = phi ptr [ %310, %306 ], [ @.str.124, %311 ]
  call void @png_error(ptr noundef %300, ptr noundef %313)
  br label %314

314:                                              ; preds = %312, %296
  %315 = load ptr, ptr %2, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.png_struct_def, ptr %315, i32 0, i32 15
  %317 = getelementptr inbounds %struct.z_stream_s, ptr %316, i32 0, i32 4
  %318 = load i32, ptr %317, align 8, !tbaa !36
  %319 = icmp ne i32 %318, 0
  br i1 %319, label %330, label %320

320:                                              ; preds = %314
  %321 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_warning(ptr noundef %321, ptr noundef @.str.125)
  %322 = load ptr, ptr %2, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.png_struct_def, ptr %322, i32 0, i32 12
  %324 = load i64, ptr %323, align 8, !tbaa !43
  %325 = or i64 %324, 8
  store i64 %325, ptr %323, align 8, !tbaa !43
  %326 = load ptr, ptr %2, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.png_struct_def, ptr %326, i32 0, i32 13
  %328 = load i64, ptr %327, align 8, !tbaa !34
  %329 = or i64 %328, 32
  store i64 %329, ptr %327, align 8, !tbaa !34
  br label %331

330:                                              ; preds = %314
  br label %178

331:                                              ; preds = %320, %287
  %332 = load ptr, ptr %2, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.png_struct_def, ptr %332, i32 0, i32 15
  %334 = getelementptr inbounds %struct.z_stream_s, ptr %333, i32 0, i32 4
  store i32 0, ptr %334, align 8, !tbaa !36
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  br label %335

335:                                              ; preds = %331, %165
  %336 = load ptr, ptr %2, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.png_struct_def, ptr %336, i32 0, i32 38
  %338 = load i64, ptr %337, align 8, !tbaa !38
  %339 = icmp ne i64 %338, 0
  br i1 %339, label %346, label %340

340:                                              ; preds = %335
  %341 = load ptr, ptr %2, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct.png_struct_def, ptr %341, i32 0, i32 15
  %343 = getelementptr inbounds %struct.z_stream_s, ptr %342, i32 0, i32 1
  %344 = load i32, ptr %343, align 8, !tbaa !37
  %345 = icmp ne i32 %344, 0
  br i1 %345, label %346, label %348

346:                                              ; preds = %340, %335
  %347 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_warning(ptr noundef %347, ptr noundef @.str.126)
  br label %348

348:                                              ; preds = %346, %340
  %349 = load ptr, ptr %2, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.png_struct_def, ptr %349, i32 0, i32 15
  %351 = call i32 @inflateReset(ptr noundef %350)
  %352 = load ptr, ptr %2, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.png_struct_def, ptr %352, i32 0, i32 12
  %354 = load i64, ptr %353, align 8, !tbaa !43
  %355 = or i64 %354, 8
  store i64 %355, ptr %353, align 8, !tbaa !43
  br label %356

356:                                              ; preds = %348, %163, %17
  ret void
}

declare ptr @png_memset_check(ptr noundef, ptr noundef, i32 noundef, i64 noundef) #2

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" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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, !11, i64 512}
!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 = !{!10, !11, i64 472}
!21 = !{!10, !7, i64 627}
!22 = !{!10, !6, i64 520}
!23 = !{!10, !11, i64 488}
!24 = !{!10, !7, i64 628}
!25 = !{!10, !11, i64 456}
!26 = !{!13, !13, i64 0}
!27 = !{!10, !11, i64 504}
!28 = !{!10, !7, i64 633}
!29 = !{!10, !11, i64 496}
!30 = !{!10, !11, i64 296}
!31 = !{!10, !11, i64 464}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!10, !11, i64 288}
!35 = !{!10, !6, i64 328}
!36 = !{!10, !13, i64 336}
!37 = !{!10, !13, i64 312}
!38 = !{!10, !11, i64 592}
!39 = distinct !{!39, !33}
!40 = !{!10, !11, i64 424}
!41 = !{!10, !6, i64 416}
!42 = !{!10, !6, i64 304}
!43 = !{!10, !11, i64 280}
!44 = !{!10, !6, i64 352}


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

@png_IDAT = external global [5 x i8], align 1
@png_pass_inc = external local_unnamed_addr constant [7 x i32], align 16
@png_pass_start = external local_unnamed_addr constant [7 x i32], align 16
@png_pass_yinc = external local_unnamed_addr constant [7 x i32], align 16
@png_pass_ystart = external local_unnamed_addr constant [7 x i32], align 16
@.str.122 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [23 x i8], align 1

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

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

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

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

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

declare void @png_reset_crc(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @png_crc_read(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

declare i32 @inflate(ptr noundef, i32 noundef) local_unnamed_addr #2

declare void @png_warning(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @inflateReset(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @png_read_finish_row(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca i8, align 1
  %3 = alloca [4 x i8], align 1
  %4 = getelementptr inbounds i8, ptr %0, i64 512
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = add i64 %5, 1
  store i64 %6, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 472
  %8 = load i64, ptr %7, align 8, !tbaa !19
  %9 = icmp ult i64 %6, %8
  br i1 %9, label %.thread, label %10

10:                                               ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 627
  %12 = load i8, ptr %11, align 1, !tbaa !20
  %.not = icmp eq i8 %12, 0
  br i1 %.not, label %73, label %13

13:                                               ; preds = %10
  store i64 0, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 520
  %15 = load ptr, ptr %14, align 8, !tbaa !21
  %16 = getelementptr inbounds i8, ptr %0, i64 488
  %17 = load i64, ptr %16, align 8, !tbaa !22
  %18 = add i64 %17, 1
  %19 = tail call ptr @png_memset_check(ptr noundef nonnull %0, ptr noundef %15, i32 noundef 0, i64 noundef %18) #4
  %20 = getelementptr inbounds i8, ptr %0, i64 628
  %.promoted = load i8, ptr %20, align 4, !tbaa !23
  %21 = getelementptr inbounds i8, ptr %0, i64 456
  %22 = getelementptr inbounds i8, ptr %0, i64 504
  %23 = getelementptr inbounds i8, ptr %0, i64 633
  %24 = getelementptr inbounds i8, ptr %0, i64 496
  %25 = getelementptr inbounds i8, ptr %0, i64 296
  %26 = getelementptr inbounds i8, ptr %0, i64 464
  br label %27

27:                                               ; preds = %60, %13
  %28 = phi i8 [ %29, %60 ], [ %.promoted, %13 ]
  %29 = add i8 %28, 1
  %30 = icmp ugt i8 %29, 6
  br i1 %30, label %.loopexit, label %31

31:                                               ; preds = %27
  %32 = load i64, ptr %21, align 8, !tbaa !24
  %33 = zext nneg i8 %29 to i64
  %34 = getelementptr inbounds [7 x i32], ptr @png_pass_inc, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !25
  %36 = sext i32 %35 to i64
  %37 = add i64 %32, %36
  %38 = getelementptr inbounds [7 x i32], ptr @png_pass_start, i64 0, i64 %33
  %39 = load i32, ptr %38, align 4, !tbaa !25
  %40 = xor i32 %39, -1
  %41 = sext i32 %40 to i64
  %42 = add i64 %37, %41
  %43 = udiv i64 %42, %36
  store i64 %43, ptr %22, align 8, !tbaa !26
  %44 = load i8, ptr %23, align 1, !tbaa !27
  %45 = icmp ugt i8 %44, 7
  br i1 %45, label %46, label %50

46:                                               ; preds = %31
  %47 = lshr i8 %44, 3
  %48 = zext nneg i8 %47 to i64
  %49 = mul i64 %43, %48
  br label %55

50:                                               ; preds = %31
  %51 = zext nneg i8 %44 to i64
  %52 = mul i64 %43, %51
  %53 = add i64 %52, 7
  %54 = lshr i64 %53, 3
  br label %55

55:                                               ; preds = %50, %46
  %56 = phi i64 [ %49, %46 ], [ %54, %50 ]
  %57 = add i64 %56, 1
  store i64 %57, ptr %24, align 8, !tbaa !28
  %58 = load i64, ptr %25, align 8, !tbaa !29
  %59 = and i64 %58, 2
  %.not80 = icmp eq i64 %59, 0
  br i1 %.not80, label %60, label %.thread.loopexit

60:                                               ; preds = %55
  %61 = load i64, ptr %26, align 8, !tbaa !30
  %62 = getelementptr inbounds [7 x i32], ptr @png_pass_yinc, i64 0, i64 %33
  %63 = load i32, ptr %62, align 4, !tbaa !25
  %64 = sext i32 %63 to i64
  %65 = add i64 %61, %64
  %66 = getelementptr inbounds [7 x i32], ptr @png_pass_ystart, i64 0, i64 %33
  %67 = load i32, ptr %66, align 4, !tbaa !25
  %68 = xor i32 %67, -1
  %69 = sext i32 %68 to i64
  %70 = add i64 %65, %69
  %71 = udiv i64 %70, %64
  store i64 %71, ptr %7, align 8, !tbaa !19
  %72 = icmp ult i64 %42, %36
  br i1 %72, label %27, label %.thread.loopexit, !llvm.loop !31

.loopexit:                                        ; preds = %27
  store i8 %29, ptr %20, align 4, !tbaa !23
  br label %73

73:                                               ; preds = %.loopexit, %10
  %74 = getelementptr inbounds i8, ptr %0, i64 288
  %75 = load i64, ptr %74, align 8, !tbaa !33
  %76 = and i64 %75, 32
  %.not81 = icmp eq i64 %76, 0
  br i1 %.not81, label %77, label %124

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #4
  %78 = getelementptr inbounds i8, ptr %0, i64 304
  %79 = getelementptr inbounds i8, ptr %0, i64 328
  store ptr %2, ptr %79, align 8, !tbaa !34
  %80 = getelementptr inbounds i8, ptr %0, i64 336
  store i32 1, ptr %80, align 8, !tbaa !35
  %81 = getelementptr inbounds i8, ptr %0, i64 312
  %82 = getelementptr inbounds i8, ptr %0, i64 592
  %83 = getelementptr inbounds i8, ptr %0, i64 620
  %84 = getelementptr inbounds i8, ptr %0, i64 424
  %85 = getelementptr inbounds i8, ptr %0, i64 416
  %86 = getelementptr inbounds i8, ptr %0, i64 352
  br label %87

87:                                               ; preds = %118, %77
  %88 = load i32, ptr %81, align 8, !tbaa !36
  %.not82 = icmp eq i32 %88, 0
  br i1 %.not82, label %.preheader, label %108

.preheader:                                       ; preds = %87
  %89 = load i64, ptr %82, align 8, !tbaa !37
  %.not8398 = icmp eq i64 %89, 0
  br i1 %.not8398, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %93
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %90 = call i32 @png_crc_finish(ptr noundef nonnull %0, i64 noundef 0)
  call void @png_read_data(ptr noundef nonnull %0, ptr noundef nonnull %3, i64 noundef 4) #4
  %91 = call i64 @png_get_uint_31(ptr noundef nonnull %0, ptr noundef nonnull %3)
  store i64 %91, ptr %82, align 8, !tbaa !37
  call void @png_reset_crc(ptr noundef nonnull %0) #4
  call void @png_crc_read(ptr noundef nonnull %0, ptr noundef nonnull %83, i64 noundef 4)
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %83, ptr noundef nonnull dereferenceable(4) @png_IDAT, i64 4)
  %.not84 = icmp eq i32 %bcmp, 0
  br i1 %.not84, label %93, label %92

92:                                               ; preds = %.lr.ph
  call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.122) #4
  br label %93

93:                                               ; preds = %92, %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  %94 = load i64, ptr %82, align 8, !tbaa !37
  %.not83 = icmp eq i64 %94, 0
  br i1 %.not83, label %.lr.ph, label %._crit_edge, !llvm.loop !38

._crit_edge:                                      ; preds = %93, %.preheader
  %.lcssa = phi i64 [ %89, %.preheader ], [ %94, %93 ]
  %95 = load i64, ptr %84, align 8, !tbaa !39
  %96 = trunc i64 %95 to i32
  store i32 %96, ptr %81, align 8, !tbaa !36
  %97 = load ptr, ptr %85, align 8, !tbaa !40
  store ptr %97, ptr %78, align 8, !tbaa !41
  %98 = icmp ugt i64 %95, %.lcssa
  br i1 %98, label %99, label %101

99:                                               ; preds = %._crit_edge
  %100 = trunc i64 %.lcssa to i32
  store i32 %100, ptr %81, align 8, !tbaa !36
  br label %101

101:                                              ; preds = %99, %._crit_edge
  %102 = phi i64 [ %.lcssa, %99 ], [ %95, %._crit_edge ]
  %103 = and i64 %102, 4294967295
  call void @png_crc_read(ptr noundef nonnull %0, ptr noundef %97, i64 noundef %103)
  %104 = load i32, ptr %81, align 8, !tbaa !36
  %105 = zext i32 %104 to i64
  %106 = load i64, ptr %82, align 8, !tbaa !37
  %107 = sub i64 %106, %105
  store i64 %107, ptr %82, align 8, !tbaa !37
  br label %108

108:                                              ; preds = %101, %87
  %109 = call i32 @inflate(ptr noundef nonnull %78, i32 noundef 1) #4
  switch i32 %109, label %116 [
    i32 1, label %110
    i32 0, label %118
  ]

110:                                              ; preds = %108
  %111 = load i32, ptr %80, align 8, !tbaa !35
  %.not88 = icmp eq i32 %111, 0
  br i1 %.not88, label %.sink.split, label %112

112:                                              ; preds = %110
  %113 = load i32, ptr %81, align 8, !tbaa !36
  %.not89 = icmp eq i32 %113, 0
  br i1 %.not89, label %114, label %.sink.split

114:                                              ; preds = %112
  %115 = load i64, ptr %82, align 8, !tbaa !37
  %.not90 = icmp eq i64 %115, 0
  br i1 %.not90, label %120, label %.sink.split

116:                                              ; preds = %108
  %117 = load ptr, ptr %86, align 8, !tbaa !42
  %.not86 = icmp eq ptr %117, null
  %spec.select = select i1 %.not86, ptr @.str.124, ptr %117
  call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull %spec.select) #4
  br label %118

118:                                              ; preds = %108, %116
  %119 = load i32, ptr %80, align 8, !tbaa !35
  %.not87 = icmp eq i32 %119, 0
  br i1 %.not87, label %.sink.split, label %87

.sink.split:                                      ; preds = %118, %110, %112, %114
  %.str.123.sink = phi ptr [ @.str.123, %114 ], [ @.str.123, %112 ], [ @.str.123, %110 ], [ @.str.125, %118 ]
  call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull %.str.123.sink) #4
  br label %120

120:                                              ; preds = %.sink.split, %114
  %121 = getelementptr inbounds i8, ptr %0, i64 280
  %122 = load <2 x i64>, ptr %121, align 8, !tbaa !43
  %123 = or <2 x i64> %122, <i64 8, i64 32>
  store <2 x i64> %123, ptr %121, align 8, !tbaa !43
  store i32 0, ptr %80, align 8, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  br label %124

124:                                              ; preds = %120, %73
  %125 = getelementptr inbounds i8, ptr %0, i64 592
  %126 = load i64, ptr %125, align 8, !tbaa !37
  %.not91 = icmp eq i64 %126, 0
  br i1 %.not91, label %127, label %130

127:                                              ; preds = %124
  %128 = getelementptr inbounds i8, ptr %0, i64 312
  %129 = load i32, ptr %128, align 8, !tbaa !36
  %.not92 = icmp eq i32 %129, 0
  br i1 %.not92, label %131, label %130

130:                                              ; preds = %127, %124
  call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.126) #4
  br label %131

131:                                              ; preds = %130, %127
  %132 = getelementptr inbounds i8, ptr %0, i64 304
  %133 = call i32 @inflateReset(ptr noundef nonnull %132) #4
  %134 = getelementptr inbounds i8, ptr %0, i64 280
  %135 = load i64, ptr %134, align 8, !tbaa !44
  %136 = or i64 %135, 8
  store i64 %136, ptr %134, align 8, !tbaa !44
  br label %.thread

.thread.loopexit:                                 ; preds = %55, %60
  store i8 %29, ptr %20, align 4, !tbaa !23
  br label %.thread

.thread:                                          ; preds = %.thread.loopexit, %1, %131
  ret void
}

declare ptr @png_memset_check(ptr noundef, ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

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

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" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nofree nounwind willreturn memory(argmem: read) }
attributes #4 = { 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, !10, i64 512}
!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 472}
!20 = !{!6, !7, i64 627}
!21 = !{!6, !9, i64 520}
!22 = !{!6, !10, i64 488}
!23 = !{!6, !7, i64 628}
!24 = !{!6, !10, i64 456}
!25 = !{!12, !12, i64 0}
!26 = !{!6, !10, i64 504}
!27 = !{!6, !7, i64 633}
!28 = !{!6, !10, i64 496}
!29 = !{!6, !10, i64 296}
!30 = !{!6, !10, i64 464}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!6, !10, i64 288}
!34 = !{!6, !9, i64 328}
!35 = !{!6, !12, i64 336}
!36 = !{!6, !12, i64 312}
!37 = !{!6, !10, i64 592}
!38 = distinct !{!38, !32}
!39 = !{!6, !10, i64 424}
!40 = !{!6, !9, i64 416}
!41 = !{!6, !9, i64 304}
!42 = !{!6, !9, i64 352}
!43 = !{!10, !10, i64 0}
!44 = !{!6, !10, i64 280}


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