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

; 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_text_struct = type { i32, ptr, ptr, i64 }

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

; Function Attrs: nounwind uwtable
define dso_local void @png_push_read_zTXt(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.png_struct_def, ptr %14, i32 0, i32 90
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = icmp ne i64 %16, 0
  br i1 %17, label %18, label %55

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

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.png_struct_def, ptr %24, i32 0, i32 90
  %26 = load i64, ptr %25, align 8, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.png_struct_def, ptr %27, i32 0, i32 95
  %29 = load i64, ptr %28, align 8, !tbaa !20
  %30 = icmp ult i64 %26, %29
  br i1 %30, label %31, label %35

31:                                               ; preds = %23
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.png_struct_def, ptr %32, i32 0, i32 90
  %34 = load i64, ptr %33, align 8, !tbaa !9
  store i64 %34, ptr %5, align 8, !tbaa !21
  br label %39

35:                                               ; preds = %23
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.png_struct_def, ptr %36, i32 0, i32 95
  %38 = load i64, ptr %37, align 8, !tbaa !20
  store i64 %38, ptr %5, align 8, !tbaa !21
  br label %39

39:                                               ; preds = %35, %31
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.png_struct_def, ptr %41, i32 0, i32 97
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  %44 = load i64, ptr %5, align 8, !tbaa !21
  call void @png_crc_read(ptr noundef %40, ptr noundef %43, i64 noundef %44)
  %45 = load i64, ptr %5, align 8, !tbaa !21
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.png_struct_def, ptr %46, i32 0, i32 95
  %48 = load i64, ptr %47, align 8, !tbaa !20
  %49 = sub i64 %48, %45
  store i64 %49, ptr %47, align 8, !tbaa !20
  %50 = load i64, ptr %5, align 8, !tbaa !21
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.png_struct_def, ptr %51, i32 0, i32 97
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  %54 = getelementptr inbounds i8, ptr %53, i64 %50
  store ptr %54, ptr %52, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %55

55:                                               ; preds = %39, %18, %2
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.png_struct_def, ptr %56, i32 0, i32 95
  %58 = load i64, ptr %57, align 8, !tbaa !20
  %59 = icmp ne i64 %58, 0
  br i1 %59, label %356, label %60

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.png_struct_def, ptr %61, i32 0, i32 90
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = icmp ult i64 %63, 4
  br i1 %64, label %65, label %67

65:                                               ; preds = %60
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_push_save_buffer(ptr noundef %66)
  store i32 1, ptr %12, align 4
  br label %353

67:                                               ; preds = %60
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_push_crc_finish(ptr noundef %68)
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.png_struct_def, ptr %69, i32 0, i32 96
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  store ptr %71, ptr %8, align 8, !tbaa !5
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %72, ptr %7, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %78, %67
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load i8, ptr %74, align 1, !tbaa !24
  %76 = icmp ne i8 %75, 0
  br i1 %76, label %77, label %81

77:                                               ; preds = %73
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds i8, ptr %79, i32 1
  store ptr %80, ptr %7, align 8, !tbaa !5
  br label %73, !llvm.loop !25

81:                                               ; preds = %73
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.png_struct_def, ptr %84, i32 0, i32 94
  %86 = load i64, ptr %85, align 8, !tbaa !27
  %87 = getelementptr inbounds i8, ptr %83, i64 %86
  %88 = icmp uge ptr %82, %87
  br i1 %88, label %89, label %94

89:                                               ; preds = %81
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.png_struct_def, ptr %90, i32 0, i32 96
  store ptr null, ptr %91, align 8, !tbaa !23
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  call void @png_free(ptr noundef %92, ptr noundef %93)
  store i32 1, ptr %12, align 4
  br label %353

94:                                               ; preds = %81
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds i8, ptr %95, i32 1
  store ptr %96, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = load i8, ptr %97, align 1, !tbaa !24
  %99 = sext i8 %98 to i32
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %106

101:                                              ; preds = %94
  %102 = load ptr, ptr %3, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.png_struct_def, ptr %102, i32 0, i32 96
  store ptr null, ptr %103, align 8, !tbaa !23
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  call void @png_free(ptr noundef %104, ptr noundef %105)
  store i32 1, ptr %12, align 4
  br label %353

106:                                              ; preds = %94
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i32 1
  store ptr %108, ptr %7, align 8, !tbaa !5
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.png_struct_def, ptr %110, i32 0, i32 15
  %112 = getelementptr inbounds %struct.z_stream_s, ptr %111, i32 0, i32 0
  store ptr %109, ptr %112, align 8, !tbaa !28
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.png_struct_def, ptr %113, i32 0, i32 94
  %115 = load i64, ptr %114, align 8, !tbaa !27
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = ptrtoint ptr %116 to i64
  %119 = ptrtoint ptr %117 to i64
  %120 = sub i64 %118, %119
  %121 = sub i64 %115, %120
  %122 = trunc i64 %121 to i32
  %123 = load ptr, ptr %3, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.png_struct_def, ptr %123, i32 0, i32 15
  %125 = getelementptr inbounds %struct.z_stream_s, ptr %124, i32 0, i32 1
  store i32 %122, ptr %125, align 8, !tbaa !29
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.png_struct_def, ptr %126, i32 0, i32 16
  %128 = load ptr, ptr %127, align 8, !tbaa !30
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.png_struct_def, ptr %129, i32 0, i32 15
  %131 = getelementptr inbounds %struct.z_stream_s, ptr %130, i32 0, i32 3
  store ptr %128, ptr %131, align 8, !tbaa !31
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.png_struct_def, ptr %132, i32 0, i32 17
  %134 = load i64, ptr %133, align 8, !tbaa !32
  %135 = trunc i64 %134 to i32
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.png_struct_def, ptr %136, i32 0, i32 15
  %138 = getelementptr inbounds %struct.z_stream_s, ptr %137, i32 0, i32 4
  store i32 %135, ptr %138, align 8, !tbaa !33
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = ptrtoint ptr %139 to i64
  %142 = ptrtoint ptr %140 to i64
  %143 = sub i64 %141, %142
  store i64 %143, ptr %11, align 8, !tbaa !21
  store i64 0, ptr %10, align 8, !tbaa !21
  store ptr null, ptr %7, align 8, !tbaa !5
  store i32 1, ptr %9, align 4, !tbaa !34
  br label %144

144:                                              ; preds = %304, %106
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.png_struct_def, ptr %145, i32 0, i32 15
  %147 = getelementptr inbounds %struct.z_stream_s, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 8, !tbaa !29
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %150, label %305

150:                                              ; preds = %144
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.png_struct_def, ptr %151, i32 0, i32 15
  %153 = call i32 @inflate(ptr noundef %152, i32 noundef 1)
  store i32 %153, ptr %9, align 4, !tbaa !34
  %154 = load i32, ptr %9, align 4, !tbaa !34
  %155 = icmp ne i32 %154, 0
  br i1 %155, label %156, label %172

156:                                              ; preds = %150
  %157 = load i32, ptr %9, align 4, !tbaa !34
  %158 = icmp ne i32 %157, 1
  br i1 %158, label %159, label %172

159:                                              ; preds = %156
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.png_struct_def, ptr %160, i32 0, i32 15
  %162 = call i32 @inflateReset(ptr noundef %161)
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.png_struct_def, ptr %163, i32 0, i32 15
  %165 = getelementptr inbounds %struct.z_stream_s, ptr %164, i32 0, i32 1
  store i32 0, ptr %165, align 8, !tbaa !29
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.png_struct_def, ptr %166, i32 0, i32 96
  store ptr null, ptr %167, align 8, !tbaa !23
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  call void @png_free(ptr noundef %168, ptr noundef %169)
  %170 = load ptr, ptr %3, align 8, !tbaa !5
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  call void @png_free(ptr noundef %170, ptr noundef %171)
  store i32 1, ptr %12, align 4
  br label %353

172:                                              ; preds = %156, %150
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.png_struct_def, ptr %173, i32 0, i32 15
  %175 = getelementptr inbounds %struct.z_stream_s, ptr %174, i32 0, i32 4
  %176 = load i32, ptr %175, align 8, !tbaa !33
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %181

178:                                              ; preds = %172
  %179 = load i32, ptr %9, align 4, !tbaa !34
  %180 = icmp eq i32 %179, 1
  br i1 %180, label %181, label %299

181:                                              ; preds = %178, %172
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = icmp eq ptr %182, null
  br i1 %183, label %184, label %231

184:                                              ; preds = %181
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.png_struct_def, ptr %186, i32 0, i32 17
  %188 = load i64, ptr %187, align 8, !tbaa !32
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.png_struct_def, ptr %189, i32 0, i32 15
  %191 = getelementptr inbounds %struct.z_stream_s, ptr %190, i32 0, i32 4
  %192 = load i32, ptr %191, align 8, !tbaa !33
  %193 = zext i32 %192 to i64
  %194 = sub i64 %188, %193
  %195 = load i64, ptr %11, align 8, !tbaa !21
  %196 = add i64 %194, %195
  %197 = add i64 %196, 1
  %198 = call ptr @png_malloc(ptr noundef %185, i64 noundef %197)
  store ptr %198, ptr %7, align 8, !tbaa !5
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = load i64, ptr %11, align 8, !tbaa !21
  %201 = getelementptr inbounds i8, ptr %199, i64 %200
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.png_struct_def, ptr %202, i32 0, i32 16
  %204 = load ptr, ptr %203, align 8, !tbaa !30
  %205 = load ptr, ptr %3, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.png_struct_def, ptr %205, i32 0, i32 17
  %207 = load i64, ptr %206, align 8, !tbaa !32
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.png_struct_def, ptr %208, i32 0, i32 15
  %210 = getelementptr inbounds %struct.z_stream_s, ptr %209, i32 0, i32 4
  %211 = load i32, ptr %210, align 8, !tbaa !33
  %212 = zext i32 %211 to i64
  %213 = sub i64 %207, %212
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %201, ptr align 1 %204, i64 %213, i1 false)
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = load ptr, ptr %8, align 8, !tbaa !5
  %216 = load i64, ptr %11, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %214, ptr align 1 %215, i64 %216, i1 false)
  %217 = load i64, ptr %11, align 8, !tbaa !21
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.png_struct_def, ptr %218, i32 0, i32 17
  %220 = load i64, ptr %219, align 8, !tbaa !32
  %221 = add i64 %217, %220
  %222 = load ptr, ptr %3, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.png_struct_def, ptr %222, i32 0, i32 15
  %224 = getelementptr inbounds %struct.z_stream_s, ptr %223, i32 0, i32 4
  %225 = load i32, ptr %224, align 8, !tbaa !33
  %226 = zext i32 %225 to i64
  %227 = sub i64 %221, %226
  store i64 %227, ptr %10, align 8, !tbaa !21
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = load i64, ptr %10, align 8, !tbaa !21
  %230 = getelementptr inbounds i8, ptr %228, i64 %229
  store i8 0, ptr %230, align 1, !tbaa !24
  br label %281

231:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %232 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %232, ptr %13, align 8, !tbaa !5
  %233 = load ptr, ptr %3, align 8, !tbaa !5
  %234 = load i64, ptr %10, align 8, !tbaa !21
  %235 = load ptr, ptr %3, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.png_struct_def, ptr %235, i32 0, i32 17
  %237 = load i64, ptr %236, align 8, !tbaa !32
  %238 = load ptr, ptr %3, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.png_struct_def, ptr %238, i32 0, i32 15
  %240 = getelementptr inbounds %struct.z_stream_s, ptr %239, i32 0, i32 4
  %241 = load i32, ptr %240, align 8, !tbaa !33
  %242 = zext i32 %241 to i64
  %243 = sub i64 %237, %242
  %244 = add i64 %243, 1
  %245 = add i64 %234, %244
  %246 = call ptr @png_malloc(ptr noundef %233, i64 noundef %245)
  store ptr %246, ptr %7, align 8, !tbaa !5
  %247 = load ptr, ptr %7, align 8, !tbaa !5
  %248 = load ptr, ptr %13, align 8, !tbaa !5
  %249 = load i64, ptr %10, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %247, ptr align 1 %248, i64 %249, i1 false)
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = load ptr, ptr %13, align 8, !tbaa !5
  call void @png_free(ptr noundef %250, ptr noundef %251)
  %252 = load ptr, ptr %7, align 8, !tbaa !5
  %253 = load i64, ptr %10, align 8, !tbaa !21
  %254 = getelementptr inbounds i8, ptr %252, i64 %253
  %255 = load ptr, ptr %3, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.png_struct_def, ptr %255, i32 0, i32 16
  %257 = load ptr, ptr %256, align 8, !tbaa !30
  %258 = load ptr, ptr %3, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.png_struct_def, ptr %258, i32 0, i32 17
  %260 = load i64, ptr %259, align 8, !tbaa !32
  %261 = load ptr, ptr %3, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.png_struct_def, ptr %261, i32 0, i32 15
  %263 = getelementptr inbounds %struct.z_stream_s, ptr %262, i32 0, i32 4
  %264 = load i32, ptr %263, align 8, !tbaa !33
  %265 = zext i32 %264 to i64
  %266 = sub i64 %260, %265
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %254, ptr align 1 %257, i64 %266, i1 false)
  %267 = load ptr, ptr %3, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.png_struct_def, ptr %267, i32 0, i32 17
  %269 = load i64, ptr %268, align 8, !tbaa !32
  %270 = load ptr, ptr %3, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.png_struct_def, ptr %270, i32 0, i32 15
  %272 = getelementptr inbounds %struct.z_stream_s, ptr %271, i32 0, i32 4
  %273 = load i32, ptr %272, align 8, !tbaa !33
  %274 = zext i32 %273 to i64
  %275 = sub i64 %269, %274
  %276 = load i64, ptr %10, align 8, !tbaa !21
  %277 = add i64 %276, %275
  store i64 %277, ptr %10, align 8, !tbaa !21
  %278 = load ptr, ptr %7, align 8, !tbaa !5
  %279 = load i64, ptr %10, align 8, !tbaa !21
  %280 = getelementptr inbounds i8, ptr %278, i64 %279
  store i8 0, ptr %280, align 1, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %281

281:                                              ; preds = %231, %184
  %282 = load i32, ptr %9, align 4, !tbaa !34
  %283 = icmp ne i32 %282, 1
  br i1 %283, label %284, label %298

284:                                              ; preds = %281
  %285 = load ptr, ptr %3, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.png_struct_def, ptr %285, i32 0, i32 16
  %287 = load ptr, ptr %286, align 8, !tbaa !30
  %288 = load ptr, ptr %3, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.png_struct_def, ptr %288, i32 0, i32 15
  %290 = getelementptr inbounds %struct.z_stream_s, ptr %289, i32 0, i32 3
  store ptr %287, ptr %290, align 8, !tbaa !31
  %291 = load ptr, ptr %3, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.png_struct_def, ptr %291, i32 0, i32 17
  %293 = load i64, ptr %292, align 8, !tbaa !32
  %294 = trunc i64 %293 to i32
  %295 = load ptr, ptr %3, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.png_struct_def, ptr %295, i32 0, i32 15
  %297 = getelementptr inbounds %struct.z_stream_s, ptr %296, i32 0, i32 4
  store i32 %294, ptr %297, align 8, !tbaa !33
  br label %298

298:                                              ; preds = %284, %281
  br label %300

299:                                              ; preds = %178
  br label %305

300:                                              ; preds = %298
  %301 = load i32, ptr %9, align 4, !tbaa !34
  %302 = icmp eq i32 %301, 1
  br i1 %302, label %303, label %304

303:                                              ; preds = %300
  br label %305

304:                                              ; preds = %300
  br label %144, !llvm.loop !35

305:                                              ; preds = %303, %299, %144
  %306 = load ptr, ptr %3, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.png_struct_def, ptr %306, i32 0, i32 15
  %308 = call i32 @inflateReset(ptr noundef %307)
  %309 = load ptr, ptr %3, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.png_struct_def, ptr %309, i32 0, i32 15
  %311 = getelementptr inbounds %struct.z_stream_s, ptr %310, i32 0, i32 1
  store i32 0, ptr %311, align 8, !tbaa !29
  %312 = load i32, ptr %9, align 4, !tbaa !34
  %313 = icmp ne i32 %312, 1
  br i1 %313, label %314, label %321

314:                                              ; preds = %305
  %315 = load ptr, ptr %3, align 8, !tbaa !5
  %316 = getelementptr inbounds %struct.png_struct_def, ptr %315, i32 0, i32 96
  store ptr null, ptr %316, align 8, !tbaa !23
  %317 = load ptr, ptr %3, align 8, !tbaa !5
  %318 = load ptr, ptr %8, align 8, !tbaa !5
  call void @png_free(ptr noundef %317, ptr noundef %318)
  %319 = load ptr, ptr %3, align 8, !tbaa !5
  %320 = load ptr, ptr %7, align 8, !tbaa !5
  call void @png_free(ptr noundef %319, ptr noundef %320)
  store i32 1, ptr %12, align 4
  br label %353

321:                                              ; preds = %305
  %322 = load ptr, ptr %3, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.png_struct_def, ptr %322, i32 0, i32 96
  store ptr null, ptr %323, align 8, !tbaa !23
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = load ptr, ptr %8, align 8, !tbaa !5
  call void @png_free(ptr noundef %324, ptr noundef %325)
  %326 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %326, ptr %8, align 8, !tbaa !5
  %327 = load i64, ptr %11, align 8, !tbaa !21
  %328 = load ptr, ptr %7, align 8, !tbaa !5
  %329 = getelementptr inbounds i8, ptr %328, i64 %327
  store ptr %329, ptr %7, align 8, !tbaa !5
  %330 = load ptr, ptr %3, align 8, !tbaa !5
  %331 = call ptr @png_malloc(ptr noundef %330, i64 noundef 32)
  store ptr %331, ptr %6, align 8, !tbaa !5
  %332 = load ptr, ptr %6, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.png_text_struct, ptr %332, i32 0, i32 0
  store i32 0, ptr %333, align 8, !tbaa !36
  %334 = load ptr, ptr %8, align 8, !tbaa !5
  %335 = load ptr, ptr %6, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.png_text_struct, ptr %335, i32 0, i32 1
  store ptr %334, ptr %336, align 8, !tbaa !38
  %337 = load ptr, ptr %7, align 8, !tbaa !5
  %338 = load ptr, ptr %6, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.png_text_struct, ptr %338, i32 0, i32 2
  store ptr %337, ptr %339, align 8, !tbaa !39
  %340 = load ptr, ptr %3, align 8, !tbaa !5
  %341 = load ptr, ptr %4, align 8, !tbaa !5
  %342 = load ptr, ptr %6, align 8, !tbaa !5
  %343 = call i32 @png_set_text_2(ptr noundef %340, ptr noundef %341, ptr noundef %342, i32 noundef 1)
  store i32 %343, ptr %9, align 4, !tbaa !34
  %344 = load ptr, ptr %3, align 8, !tbaa !5
  %345 = load ptr, ptr %8, align 8, !tbaa !5
  call void @png_free(ptr noundef %344, ptr noundef %345)
  %346 = load ptr, ptr %3, align 8, !tbaa !5
  %347 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_free(ptr noundef %346, ptr noundef %347)
  %348 = load i32, ptr %9, align 4, !tbaa !34
  %349 = icmp ne i32 %348, 0
  br i1 %349, label %350, label %352

350:                                              ; preds = %321
  %351 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_warning(ptr noundef %351, ptr noundef @.str.14)
  br label %352

352:                                              ; preds = %350, %321
  store i32 0, ptr %12, align 4
  br label %353

353:                                              ; preds = %352, %314, %159, %101, %89, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %354 = load i32, ptr %12, align 4
  switch i32 %354, label %357 [
    i32 0, label %355
    i32 1, label %356
  ]

355:                                              ; preds = %353
  br label %356

356:                                              ; preds = %355, %353, %55
  ret void

357:                                              ; preds = %353
  unreachable
}

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

declare ptr @png_malloc(ptr noundef, i64 noundef) #2

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

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

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

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

declare i32 @inflateReset(ptr 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 904}
!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 936}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !6, i64 952}
!23 = !{!10, !6, i64 944}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !11, i64 928}
!28 = !{!10, !6, i64 304}
!29 = !{!10, !13, i64 312}
!30 = !{!10, !6, i64 416}
!31 = !{!10, !6, i64 328}
!32 = !{!10, !11, i64 424}
!33 = !{!10, !13, i64 336}
!34 = !{!13, !13, i64 0}
!35 = distinct !{!35, !26}
!36 = !{!37, !13, i64 0}
!37 = !{!"png_text_struct", !13, i64 0, !6, i64 8, !6, i64 16, !11, i64 24}
!38 = !{!37, !6, i64 8}
!39 = !{!37, !6, i64 16}


; 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.14 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @png_push_read_zTXt(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 904
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %4, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 936
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !19
  br i1 %.not, label %._crit_edge181, label %5

5:                                                ; preds = %2
  %.not143 = icmp eq i64 %.pre, 0
  br i1 %.not143, label %.thread, label %6

6:                                                ; preds = %5
  %. = tail call i64 @llvm.umin.i64(i64 %4, i64 %.pre)
  %7 = getelementptr inbounds i8, ptr %0, i64 952
  %8 = load ptr, ptr %7, align 8, !tbaa !20
  tail call void @png_crc_read(ptr noundef nonnull %0, ptr noundef %8, i64 noundef %.) #4
  %9 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !19
  %10 = sub i64 %9, %.
  store i64 %10, ptr %.phi.trans.insert, align 8, !tbaa !19
  %11 = load ptr, ptr %7, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %11, i64 %.
  store ptr %12, ptr %7, align 8, !tbaa !20
  br label %._crit_edge181

._crit_edge181:                                   ; preds = %2, %6
  %13 = phi i64 [ %10, %6 ], [ %.pre, %2 ]
  %.not144 = icmp eq i64 %13, 0
  br i1 %.not144, label %.thread, label %105

.thread:                                          ; preds = %5, %._crit_edge181
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = icmp ult i64 %14, 4
  br i1 %15, label %16, label %17

16:                                               ; preds = %.thread
  tail call void @png_push_save_buffer(ptr noundef nonnull %0)
  br label %105

17:                                               ; preds = %.thread
  tail call void @png_push_crc_finish(ptr noundef nonnull %0)
  %18 = getelementptr inbounds i8, ptr %0, i64 944
  %19 = load ptr, ptr %18, align 8, !tbaa !21
  br label %20

20:                                               ; preds = %20, %17
  %.0133 = phi ptr [ %19, %17 ], [ %22, %20 ]
  %21 = load i8, ptr %.0133, align 1, !tbaa !22
  %.not145 = icmp eq i8 %21, 0
  %22 = getelementptr inbounds i8, ptr %.0133, i64 1
  br i1 %.not145, label %23, label %20, !llvm.loop !23

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 928
  %25 = load i64, ptr %24, align 8, !tbaa !25
  %26 = getelementptr inbounds i8, ptr %19, i64 %25
  %.not146 = icmp ult ptr %.0133, %26
  br i1 %.not146, label %28, label %27

27:                                               ; preds = %23
  store ptr null, ptr %18, align 8, !tbaa !21
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %19) #4
  br label %105

28:                                               ; preds = %23
  %29 = load i8, ptr %22, align 1, !tbaa !22
  %.not147 = icmp eq i8 %29, 0
  br i1 %.not147, label %31, label %30

30:                                               ; preds = %28
  store ptr null, ptr %18, align 8, !tbaa !21
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %19) #4
  br label %105

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %.0133, i64 2
  %33 = getelementptr inbounds i8, ptr %0, i64 304
  store ptr %32, ptr %33, align 8, !tbaa !26
  %34 = ptrtoint ptr %32 to i64
  %35 = ptrtoint ptr %19 to i64
  %36 = sub i64 %34, %35
  %37 = sub i64 %25, %36
  %38 = trunc i64 %37 to i32
  %39 = getelementptr inbounds i8, ptr %0, i64 312
  store i32 %38, ptr %39, align 8, !tbaa !27
  %40 = getelementptr inbounds i8, ptr %0, i64 416
  %41 = load ptr, ptr %40, align 8, !tbaa !28
  %42 = getelementptr inbounds i8, ptr %0, i64 328
  store ptr %41, ptr %42, align 8, !tbaa !29
  %43 = getelementptr inbounds i8, ptr %0, i64 424
  %44 = getelementptr inbounds i8, ptr %0, i64 336
  %storemerge.in171 = load i64, ptr %43, align 8, !tbaa !30
  %storemerge172 = trunc i64 %storemerge.in171 to i32
  store i32 %storemerge172, ptr %44, align 8, !tbaa !31
  %.not148173 = icmp eq i32 %38, 0
  br i1 %.not148173, label %.sink.split, label %.lr.ph

.lr.ph:                                           ; preds = %31
  %45 = add i64 %36, 1
  br label %46

46:                                               ; preds = %.lr.ph, %92
  %.1175 = phi ptr [ null, %.lr.ph ], [ %.2, %92 ]
  %.0134174 = phi i64 [ 0, %.lr.ph ], [ %.1135, %92 ]
  %47 = tail call i32 @inflate(ptr noundef nonnull %33, i32 noundef 1) #4
  %.not149 = icmp eq i32 %47, 1
  %or.cond = icmp ugt i32 %47, 1
  br i1 %or.cond, label %48, label %50

48:                                               ; preds = %46
  %49 = tail call i32 @inflateReset(ptr noundef nonnull %33) #4
  store i32 0, ptr %39, align 8, !tbaa !27
  store ptr null, ptr %18, align 8, !tbaa !21
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %19) #4
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %.1175) #4
  br label %105

50:                                               ; preds = %46
  %51 = load i32, ptr %44, align 8, !tbaa !31
  %52 = icmp eq i32 %51, 0
  %or.cond3 = or i1 %.not149, %52
  br i1 %or.cond3, label %54, label %.thread157

.thread157:                                       ; preds = %50
  %53 = tail call i32 @inflateReset(ptr noundef nonnull %33) #4
  store i32 0, ptr %39, align 8, !tbaa !27
  br label %96

54:                                               ; preds = %50
  %55 = icmp eq ptr %.1175, null
  %56 = load i64, ptr %43, align 8, !tbaa !30
  %57 = zext i32 %51 to i64
  br i1 %55, label %58, label %74

58:                                               ; preds = %54
  %59 = sub i64 %45, %57
  %60 = add i64 %59, %56
  %61 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef %60) #4
  %62 = getelementptr inbounds i8, ptr %61, i64 %36
  %63 = load ptr, ptr %40, align 8, !tbaa !28
  %64 = load i64, ptr %43, align 8, !tbaa !30
  %65 = load i32, ptr %44, align 8, !tbaa !31
  %66 = zext i32 %65 to i64
  %67 = sub i64 %64, %66
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %62, ptr align 1 %63, i64 %67, i1 false)
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %61, ptr align 1 %19, i64 %36, i1 false)
  %68 = load i64, ptr %43, align 8, !tbaa !30
  %69 = add i64 %68, %36
  %70 = load i32, ptr %44, align 8, !tbaa !31
  %71 = zext i32 %70 to i64
  %72 = sub i64 %69, %71
  %73 = getelementptr inbounds i8, ptr %61, i64 %72
  br label %91

74:                                               ; preds = %54
  %75 = add i64 %.0134174, 1
  %76 = sub i64 %75, %57
  %77 = add i64 %76, %56
  %78 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef %77) #4
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %78, ptr nonnull align 1 %.1175, i64 %.0134174, i1 false)
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef nonnull %.1175) #4
  %79 = getelementptr inbounds i8, ptr %78, i64 %.0134174
  %80 = load ptr, ptr %40, align 8, !tbaa !28
  %81 = load i64, ptr %43, align 8, !tbaa !30
  %82 = load i32, ptr %44, align 8, !tbaa !31
  %83 = zext i32 %82 to i64
  %84 = sub i64 %81, %83
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %79, ptr align 1 %80, i64 %84, i1 false)
  %85 = load i64, ptr %43, align 8, !tbaa !30
  %86 = load i32, ptr %44, align 8, !tbaa !31
  %87 = zext i32 %86 to i64
  %88 = sub i64 %85, %87
  %89 = add i64 %88, %.0134174
  %90 = getelementptr inbounds i8, ptr %78, i64 %89
  br label %91

91:                                               ; preds = %74, %58
  %.sink = phi ptr [ %90, %74 ], [ %73, %58 ]
  %.1135 = phi i64 [ %89, %74 ], [ %72, %58 ]
  %.2 = phi ptr [ %78, %74 ], [ %61, %58 ]
  store i8 0, ptr %.sink, align 1, !tbaa !22
  br i1 %.not149, label %.sink.split, label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %40, align 8, !tbaa !28
  store ptr %93, ptr %42, align 8, !tbaa !29
  %storemerge.in = load i64, ptr %43, align 8, !tbaa !30
  %storemerge = trunc i64 %storemerge.in to i32
  store i32 %storemerge, ptr %44, align 8, !tbaa !31
  %94 = load i32, ptr %39, align 8, !tbaa !27
  %.not148 = icmp eq i32 %94, 0
  br i1 %.not148, label %._crit_edge, label %46, !llvm.loop !32

._crit_edge:                                      ; preds = %92
  %95 = tail call i32 @inflateReset(ptr noundef nonnull %33) #4
  store i32 0, ptr %39, align 8, !tbaa !27
  br i1 %.not148173, label %98, label %96

96:                                               ; preds = %.thread157, %._crit_edge
  %.1167 = phi ptr [ %.1175, %.thread157 ], [ %.2, %._crit_edge ]
  store ptr null, ptr %18, align 8, !tbaa !21
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %19) #4
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %.1167) #4
  br label %105

.sink.split:                                      ; preds = %91, %31
  %.3156.ph = phi ptr [ null, %31 ], [ %.2, %91 ]
  %97 = tail call i32 @inflateReset(ptr noundef nonnull %33) #4
  store i32 0, ptr %39, align 8, !tbaa !27
  br label %98

98:                                               ; preds = %.sink.split, %._crit_edge
  %.3156 = phi ptr [ %.2, %._crit_edge ], [ %.3156.ph, %.sink.split ]
  store ptr null, ptr %18, align 8, !tbaa !21
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %19) #4
  %99 = getelementptr inbounds i8, ptr %.3156, i64 %36
  %100 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef 32) #4
  store i32 0, ptr %100, align 8, !tbaa !33
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  store ptr %.3156, ptr %101, align 8, !tbaa !35
  %102 = getelementptr inbounds i8, ptr %100, i64 16
  store ptr %99, ptr %102, align 8, !tbaa !36
  %103 = tail call i32 @png_set_text_2(ptr noundef nonnull %0, ptr noundef %1, ptr noundef nonnull %100, i32 noundef 1) #4
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %.3156) #4
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef nonnull %100) #4
  %.not151 = icmp eq i32 %103, 0
  br i1 %.not151, label %105, label %104

104:                                              ; preds = %98
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #4
  br label %105

105:                                              ; preds = %16, %27, %30, %48, %96, %104, %98, %._crit_edge181
  ret void
}

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

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

declare void @png_crc_read(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare ptr @png_malloc(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @png_free(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

declare i32 @png_set_text_2(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @inflateReset(ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 904}
!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 936}
!20 = !{!6, !9, i64 952}
!21 = !{!6, !9, i64 944}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !10, i64 928}
!26 = !{!6, !9, i64 304}
!27 = !{!6, !12, i64 312}
!28 = !{!6, !9, i64 416}
!29 = !{!6, !9, i64 328}
!30 = !{!6, !10, i64 424}
!31 = !{!6, !12, i64 336}
!32 = distinct !{!32, !24}
!33 = !{!34, !12, i64 0}
!34 = !{!"png_text_struct", !12, i64 0, !9, i64 8, !9, i64 16, !10, i64 24}
!35 = !{!34, !9, i64 8}
!36 = !{!34, !9, i64 16}


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