; LLVM IR from niessner/Matterport :: code/gaps/pkgs/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, ptr, i8, i8, i32, i32, i32, %struct.z_stream_s, ptr, i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_row_info_struct, i32, i32, 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, i32, i32, 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, i32, i32, i64, i64, i64, i64, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, ptr, i32, ptr, i8, i16, i16, i16, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, i32, i32, %struct.png_unknown_chunk_t, i32, i32, ptr, i32 }
%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 { i32, 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, i64, ptr, ptr }

@.str.120 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [40 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @png_decompress_chunk(ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

declare ptr @png_malloc_warn(ptr noundef, i64 noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @png_handle_iTXt(ptr noundef %0, ptr noundef %1, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  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 8, 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.png_struct_def, ptr %19, i32 0, i32 132
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %44

23:                                               ; preds = %3
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.png_struct_def, ptr %24, i32 0, i32 132
  %26 = load i32, ptr %25, align 4, !tbaa !11
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %32

28:                                               ; preds = %23
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = call i32 @png_crc_finish(ptr noundef %29, i32 noundef %30)
  store i32 1, ptr %18, align 4
  br label %300

32:                                               ; preds = %23
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.png_struct_def, ptr %33, i32 0, i32 132
  %35 = load i32, ptr %34, align 4, !tbaa !11
  %36 = add i32 %35, -1
  store i32 %36, ptr %34, align 4, !tbaa !11
  %37 = icmp eq i32 %36, 1
  br i1 %37, label %38, label %43

38:                                               ; preds = %32
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %39, ptr noundef @.str.120)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = call i32 @png_crc_finish(ptr noundef %40, i32 noundef %41)
  store i32 1, ptr %18, align 4
  br label %300

43:                                               ; preds = %32
  br label %44

44:                                               ; preds = %43, %3
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.png_struct_def, ptr %45, i32 0, i32 13
  %47 = load i32, ptr %46, align 4, !tbaa !21
  %48 = and i32 %47, 1
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %52, label %50

50:                                               ; preds = %44
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %51, ptr noundef @.str.121)
  br label %52

52:                                               ; preds = %50, %44
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.png_struct_def, ptr %53, i32 0, i32 13
  %55 = load i32, ptr %54, align 4, !tbaa !21
  %56 = and i32 %55, 4
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %63

58:                                               ; preds = %52
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.png_struct_def, ptr %59, i32 0, i32 13
  %61 = load i32, ptr %60, align 4, !tbaa !21
  %62 = or i32 %61, 8
  store i32 %62, ptr %60, align 4, !tbaa !21
  br label %63

63:                                               ; preds = %58, %52
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.png_struct_def, ptr %65, i32 0, i32 136
  %67 = load ptr, ptr %66, align 8, !tbaa !22
  call void @png_free(ptr noundef %64, ptr noundef %67)
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load i32, ptr %6, align 4, !tbaa !9
  %70 = add i32 %69, 1
  %71 = zext i32 %70 to i64
  %72 = call ptr @png_malloc_warn(ptr noundef %68, i64 noundef %71)
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.png_struct_def, ptr %73, i32 0, i32 136
  store ptr %72, ptr %74, align 8, !tbaa !22
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.png_struct_def, ptr %75, i32 0, i32 136
  %77 = load ptr, ptr %76, align 8, !tbaa !22
  %78 = icmp eq ptr %77, null
  br i1 %78, label %79, label %81

79:                                               ; preds = %63
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %80, ptr noundef @.str.122)
  store i32 1, ptr %18, align 4
  br label %300

81:                                               ; preds = %63
  %82 = load i32, ptr %6, align 4, !tbaa !9
  %83 = zext i32 %82 to i64
  store i64 %83, ptr %15, align 8, !tbaa !23
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.png_struct_def, ptr %85, i32 0, i32 136
  %87 = load ptr, ptr %86, align 8, !tbaa !22
  %88 = load i64, ptr %15, align 8, !tbaa !23
  call void @png_crc_read(ptr noundef %84, ptr noundef %87, i64 noundef %88)
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = call i32 @png_crc_finish(ptr noundef %89, i32 noundef 0)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %99

92:                                               ; preds = %81
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.png_struct_def, ptr %94, i32 0, i32 136
  %96 = load ptr, ptr %95, align 8, !tbaa !22
  call void @png_free(ptr noundef %93, ptr noundef %96)
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.png_struct_def, ptr %97, i32 0, i32 136
  store ptr null, ptr %98, align 8, !tbaa !22
  store i32 1, ptr %18, align 4
  br label %300

99:                                               ; preds = %81
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.png_struct_def, ptr %100, i32 0, i32 136
  %102 = load ptr, ptr %101, align 8, !tbaa !22
  %103 = load i64, ptr %15, align 8, !tbaa !23
  %104 = getelementptr inbounds i8, ptr %102, i64 %103
  store i8 0, ptr %104, align 1, !tbaa !24
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.png_struct_def, ptr %105, i32 0, i32 136
  %107 = load ptr, ptr %106, align 8, !tbaa !22
  store ptr %107, ptr %9, align 8, !tbaa !5
  br label %108

108:                                              ; preds = %113, %99
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = load i8, ptr %109, align 1, !tbaa !24
  %111 = icmp ne i8 %110, 0
  br i1 %111, label %112, label %116

112:                                              ; preds = %108
  br label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %114, i32 1
  store ptr %115, ptr %9, align 8, !tbaa !5
  br label %108, !llvm.loop !25

116:                                              ; preds = %108
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i32 1
  store ptr %118, ptr %9, align 8, !tbaa !5
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.png_struct_def, ptr %120, i32 0, i32 136
  %122 = load ptr, ptr %121, align 8, !tbaa !22
  %123 = load i64, ptr %15, align 8, !tbaa !23
  %124 = getelementptr inbounds i8, ptr %122, i64 %123
  %125 = getelementptr inbounds i8, ptr %124, i64 -3
  %126 = icmp uge ptr %119, %125
  br i1 %126, label %127, label %135

127:                                              ; preds = %116
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %128, ptr noundef @.str.123)
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.png_struct_def, ptr %130, i32 0, i32 136
  %132 = load ptr, ptr %131, align 8, !tbaa !22
  call void @png_free(ptr noundef %129, ptr noundef %132)
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.png_struct_def, ptr %133, i32 0, i32 136
  store ptr null, ptr %134, align 8, !tbaa !22
  store i32 1, ptr %18, align 4
  br label %300

135:                                              ; preds = %116
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i32 1
  store ptr %137, ptr %9, align 8, !tbaa !5
  %138 = load i8, ptr %136, align 1, !tbaa !24
  %139 = sext i8 %138 to i32
  store i32 %139, ptr %12, align 4, !tbaa !9
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = getelementptr inbounds i8, ptr %140, i32 1
  store ptr %141, ptr %9, align 8, !tbaa !5
  %142 = load i8, ptr %140, align 1, !tbaa !24
  %143 = sext i8 %142 to i32
  store i32 %143, ptr %13, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %135
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %145, ptr %11, align 8, !tbaa !5
  br label %146

146:                                              ; preds = %151, %144
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = load i8, ptr %147, align 1, !tbaa !24
  %149 = icmp ne i8 %148, 0
  br i1 %149, label %150, label %154

150:                                              ; preds = %146
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = getelementptr inbounds i8, ptr %152, i32 1
  store ptr %153, ptr %11, align 8, !tbaa !5
  br label %146, !llvm.loop !27

154:                                              ; preds = %146
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds i8, ptr %155, i32 1
  store ptr %156, ptr %11, align 8, !tbaa !5
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = load ptr, ptr %4, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.png_struct_def, ptr %158, i32 0, i32 136
  %160 = load ptr, ptr %159, align 8, !tbaa !22
  %161 = load i64, ptr %15, align 8, !tbaa !23
  %162 = getelementptr inbounds i8, ptr %160, i64 %161
  %163 = icmp uge ptr %157, %162
  br i1 %163, label %164, label %172

164:                                              ; preds = %154
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %165, ptr noundef @.str.123)
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.png_struct_def, ptr %167, i32 0, i32 136
  %169 = load ptr, ptr %168, align 8, !tbaa !22
  call void @png_free(ptr noundef %166, ptr noundef %169)
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.png_struct_def, ptr %170, i32 0, i32 136
  store ptr null, ptr %171, align 8, !tbaa !22
  store i32 1, ptr %18, align 4
  br label %300

172:                                              ; preds = %154
  %173 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %173, ptr %10, align 8, !tbaa !5
  br label %174

174:                                              ; preds = %179, %172
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = load i8, ptr %175, align 1, !tbaa !24
  %177 = icmp ne i8 %176, 0
  br i1 %177, label %178, label %182

178:                                              ; preds = %174
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  %181 = getelementptr inbounds i8, ptr %180, i32 1
  store ptr %181, ptr %10, align 8, !tbaa !5
  br label %174, !llvm.loop !28

182:                                              ; preds = %174
  %183 = load ptr, ptr %10, align 8, !tbaa !5
  %184 = getelementptr inbounds i8, ptr %183, i32 1
  store ptr %184, ptr %10, align 8, !tbaa !5
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = load ptr, ptr %4, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.png_struct_def, ptr %186, i32 0, i32 136
  %188 = load ptr, ptr %187, align 8, !tbaa !22
  %189 = load i64, ptr %15, align 8, !tbaa !23
  %190 = getelementptr inbounds i8, ptr %188, i64 %189
  %191 = icmp uge ptr %185, %190
  br i1 %191, label %192, label %200

192:                                              ; preds = %182
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %193, ptr noundef @.str.124)
  %194 = load ptr, ptr %4, align 8, !tbaa !5
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.png_struct_def, ptr %195, i32 0, i32 136
  %197 = load ptr, ptr %196, align 8, !tbaa !22
  call void @png_free(ptr noundef %194, ptr noundef %197)
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.png_struct_def, ptr %198, i32 0, i32 136
  store ptr null, ptr %199, align 8, !tbaa !22
  store i32 1, ptr %18, align 4
  br label %300

200:                                              ; preds = %182
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.png_struct_def, ptr %202, i32 0, i32 136
  %204 = load ptr, ptr %203, align 8, !tbaa !22
  %205 = ptrtoint ptr %201 to i64
  %206 = ptrtoint ptr %204 to i64
  %207 = sub i64 %205, %206
  store i64 %207, ptr %16, align 8, !tbaa !23
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.png_struct_def, ptr %208, i32 0, i32 136
  %210 = load ptr, ptr %209, align 8, !tbaa !22
  store ptr %210, ptr %8, align 8, !tbaa !5
  %211 = load i32, ptr %12, align 4, !tbaa !9
  %212 = icmp ne i32 %211, 0
  br i1 %212, label %213, label %219

213:                                              ; preds = %200
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = load i32, ptr %13, align 4, !tbaa !9
  %216 = load i32, ptr %6, align 4, !tbaa !9
  %217 = zext i32 %216 to i64
  %218 = load i64, ptr %16, align 8, !tbaa !23
  call void @png_decompress_chunk(ptr noundef %214, i32 noundef %215, i64 noundef %217, i64 noundef %218, ptr noundef %17)
  br label %226

219:                                              ; preds = %200
  %220 = load ptr, ptr %4, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.png_struct_def, ptr %220, i32 0, i32 136
  %222 = load ptr, ptr %221, align 8, !tbaa !22
  %223 = load i64, ptr %16, align 8, !tbaa !23
  %224 = getelementptr inbounds i8, ptr %222, i64 %223
  %225 = call i64 @strlen(ptr noundef %224) #5
  store i64 %225, ptr %17, align 8, !tbaa !23
  br label %226

226:                                              ; preds = %219, %213
  %227 = load ptr, ptr %4, align 8, !tbaa !5
  %228 = call ptr @png_malloc_warn(ptr noundef %227, i64 noundef 56)
  store ptr %228, ptr %7, align 8, !tbaa !5
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  %230 = icmp eq ptr %229, null
  br i1 %230, label %231, label %239

231:                                              ; preds = %226
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %232, ptr noundef @.str.125)
  %233 = load ptr, ptr %4, align 8, !tbaa !5
  %234 = load ptr, ptr %4, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.png_struct_def, ptr %234, i32 0, i32 136
  %236 = load ptr, ptr %235, align 8, !tbaa !22
  call void @png_free(ptr noundef %233, ptr noundef %236)
  %237 = load ptr, ptr %4, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.png_struct_def, ptr %237, i32 0, i32 136
  store ptr null, ptr %238, align 8, !tbaa !22
  store i32 1, ptr %18, align 4
  br label %300

239:                                              ; preds = %226
  %240 = load i32, ptr %12, align 4, !tbaa !9
  %241 = add nsw i32 %240, 1
  %242 = load ptr, ptr %7, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.png_text_struct, ptr %242, i32 0, i32 0
  store i32 %241, ptr %243, align 8, !tbaa !29
  %244 = load ptr, ptr %4, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.png_struct_def, ptr %244, i32 0, i32 136
  %246 = load ptr, ptr %245, align 8, !tbaa !22
  %247 = load ptr, ptr %11, align 8, !tbaa !5
  %248 = load ptr, ptr %8, align 8, !tbaa !5
  %249 = ptrtoint ptr %247 to i64
  %250 = ptrtoint ptr %248 to i64
  %251 = sub i64 %249, %250
  %252 = getelementptr inbounds i8, ptr %246, i64 %251
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.png_text_struct, ptr %253, i32 0, i32 6
  store ptr %252, ptr %254, align 8, !tbaa !31
  %255 = load ptr, ptr %4, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.png_struct_def, ptr %255, i32 0, i32 136
  %257 = load ptr, ptr %256, align 8, !tbaa !22
  %258 = load ptr, ptr %9, align 8, !tbaa !5
  %259 = load ptr, ptr %8, align 8, !tbaa !5
  %260 = ptrtoint ptr %258 to i64
  %261 = ptrtoint ptr %259 to i64
  %262 = sub i64 %260, %261
  %263 = getelementptr inbounds i8, ptr %257, i64 %262
  %264 = load ptr, ptr %7, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.png_text_struct, ptr %264, i32 0, i32 5
  store ptr %263, ptr %265, align 8, !tbaa !32
  %266 = load i64, ptr %17, align 8, !tbaa !23
  %267 = load ptr, ptr %7, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.png_text_struct, ptr %267, i32 0, i32 4
  store i64 %266, ptr %268, align 8, !tbaa !33
  %269 = load ptr, ptr %7, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.png_text_struct, ptr %269, i32 0, i32 3
  store i64 0, ptr %270, align 8, !tbaa !34
  %271 = load ptr, ptr %4, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.png_struct_def, ptr %271, i32 0, i32 136
  %273 = load ptr, ptr %272, align 8, !tbaa !22
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.png_text_struct, ptr %274, i32 0, i32 1
  store ptr %273, ptr %275, align 8, !tbaa !35
  %276 = load ptr, ptr %4, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.png_struct_def, ptr %276, i32 0, i32 136
  %278 = load ptr, ptr %277, align 8, !tbaa !22
  %279 = load i64, ptr %16, align 8, !tbaa !23
  %280 = getelementptr inbounds i8, ptr %278, i64 %279
  %281 = load ptr, ptr %7, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.png_text_struct, ptr %281, i32 0, i32 2
  store ptr %280, ptr %282, align 8, !tbaa !36
  %283 = load ptr, ptr %4, align 8, !tbaa !5
  %284 = load ptr, ptr %5, align 8, !tbaa !5
  %285 = load ptr, ptr %7, align 8, !tbaa !5
  %286 = call i32 @png_set_text_2(ptr noundef %283, ptr noundef %284, ptr noundef %285, i32 noundef 1)
  store i32 %286, ptr %14, align 4, !tbaa !9
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = load ptr, ptr %7, align 8, !tbaa !5
  call void @png_free(ptr noundef %287, ptr noundef %288)
  %289 = load ptr, ptr %4, align 8, !tbaa !5
  %290 = load ptr, ptr %4, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.png_struct_def, ptr %290, i32 0, i32 136
  %292 = load ptr, ptr %291, align 8, !tbaa !22
  call void @png_free(ptr noundef %289, ptr noundef %292)
  %293 = load ptr, ptr %4, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.png_struct_def, ptr %293, i32 0, i32 136
  store ptr null, ptr %294, align 8, !tbaa !22
  %295 = load i32, ptr %14, align 4, !tbaa !9
  %296 = icmp ne i32 %295, 0
  br i1 %296, label %297, label %299

297:                                              ; preds = %239
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %298, ptr noundef @.str.126)
  br label %299

299:                                              ; preds = %297, %239
  store i32 0, ptr %18, align 4
  br label %300

300:                                              ; preds = %299, %231, %192, %164, %127, %92, %79, %38, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  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 8, 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
  %301 = load i32, ptr %18, align 4
  switch i32 %301, label %303 [
    i32 0, label %302
    i32 1, label %302
  ]

302:                                              ; preds = %300, %300
  ret void

303:                                              ; preds = %300
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 1116}
!12 = !{!"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, !6, i64 272, !7, i64 280, !7, i64 281, !10, i64 284, !10, i64 288, !10, i64 292, !13, i64 296, !6, i64 408, !14, i64 416, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !14, i64 464, !14, i64 472, !10, i64 480, !10, i64 484, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !15, i64 536, !10, i64 560, !10, i64 564, !6, i64 568, !16, i64 576, !16, i64 578, !7, i64 580, !7, i64 585, !7, i64 586, !7, i64 587, !7, i64 588, !7, i64 589, !7, i64 590, !7, i64 591, !7, i64 592, !7, i64 593, !7, i64 594, !7, i64 595, !7, i64 596, !16, i64 598, !7, i64 600, !17, i64 604, !18, i64 608, !18, i64 618, !6, i64 632, !10, i64 640, !10, i64 644, !10, i64 648, !17, i64 652, !17, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !19, i64 712, !19, i64 717, !6, i64 728, !18, i64 736, !6, i64 752, !6, i64 760, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !10, i64 824, !10, i64 828, !14, i64 832, !14, i64 840, !14, i64 848, !14, i64 856, !10, i64 864, !10, i64 868, !14, i64 872, !14, i64 880, !6, i64 888, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !7, i64 928, !7, i64 929, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !10, i64 984, !6, i64 992, !6, i64 1000, !10, i64 1008, !6, i64 1016, !7, i64 1024, !16, i64 1026, !16, i64 1028, !16, i64 1030, !10, i64 1032, !10, i64 1036, !7, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !7, i64 1104, !10, i64 1108, !10, i64 1112, !10, i64 1116, !20, i64 1120, !10, i64 1152, !10, i64 1156, !6, i64 1160, !10, i64 1168}
!13 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !14, i64 16, !6, i64 24, !10, i64 32, !14, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !14, i64 96, !14, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!"png_row_info_struct", !10, i64 0, !14, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!16 = !{!"short", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"png_color_16_struct", !7, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8}
!19 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!20 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !14, i64 16, !7, i64 24}
!21 = !{!12, !10, i64 284}
!22 = !{!12, !6, i64 1160}
!23 = !{!14, !14, i64 0}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = !{!30, !10, i64 0}
!30 = !{!"png_text_struct", !10, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !14, i64 32, !6, i64 40, !6, i64 48}
!31 = !{!30, !6, i64 48}
!32 = !{!30, !6, i64 40}
!33 = !{!30, !14, i64 32}
!34 = !{!30, !14, i64 24}
!35 = !{!30, !6, i64 8}
!36 = !{!30, !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.120 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.121 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.122 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.123 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.124 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.125 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.126 = external hidden unnamed_addr constant [40 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @png_decompress_chunk(ptr noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local void @png_handle_iTXt(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %0, i64 1116
  %6 = load i32, ptr %5, align 4, !tbaa !5
  switch i32 %6, label %9 [
    i32 0, label %14
    i32 1, label %7
  ]

7:                                                ; preds = %3
  %8 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  br label %99

9:                                                ; preds = %3
  %10 = add i32 %6, -1
  store i32 %10, ptr %5, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 1
  br i1 %11, label %12, label %14

12:                                               ; preds = %9
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.120) #4
  %13 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  br label %99

14:                                               ; preds = %3, %9
  %15 = getelementptr inbounds i8, ptr %0, i64 284
  %16 = load i32, ptr %15, align 4, !tbaa !19
  %17 = and i32 %16, 1
  %.not114 = icmp eq i32 %17, 0
  br i1 %.not114, label %18, label %19

18:                                               ; preds = %14
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.121) #4
  %.pre = load i32, ptr %15, align 4, !tbaa !19
  br label %19

19:                                               ; preds = %18, %14
  %20 = phi i32 [ %.pre, %18 ], [ %16, %14 ]
  %21 = and i32 %20, 4
  %.not115 = icmp eq i32 %21, 0
  br i1 %.not115, label %24, label %22

22:                                               ; preds = %19
  %23 = or i32 %20, 8
  store i32 %23, ptr %15, align 4, !tbaa !19
  br label %24

24:                                               ; preds = %22, %19
  %25 = getelementptr inbounds i8, ptr %0, i64 1160
  %26 = load ptr, ptr %25, align 8, !tbaa !20
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %26) #4
  %27 = add i32 %2, 1
  %28 = zext i32 %27 to i64
  %29 = tail call ptr @png_malloc_warn(ptr noundef nonnull %0, i64 noundef %28) #4
  store ptr %29, ptr %25, align 8, !tbaa !20
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %32

31:                                               ; preds = %24
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.122) #4
  br label %99

32:                                               ; preds = %24
  %33 = zext i32 %2 to i64
  tail call void @png_crc_read(ptr noundef nonnull %0, ptr noundef nonnull %29, i64 noundef %33)
  %34 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef 0)
  %.not116 = icmp eq i32 %34, 0
  %35 = load ptr, ptr %25, align 8, !tbaa !20
  br i1 %.not116, label %37, label %36

36:                                               ; preds = %32
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %35) #4
  store ptr null, ptr %25, align 8, !tbaa !20
  br label %99

37:                                               ; preds = %32
  %38 = getelementptr inbounds i8, ptr %35, i64 %33
  store i8 0, ptr %38, align 1, !tbaa !21
  %39 = load ptr, ptr %25, align 8, !tbaa !20
  br label %40

40:                                               ; preds = %40, %37
  %.0 = phi ptr [ %39, %37 ], [ %42, %40 ]
  %41 = load i8, ptr %.0, align 1, !tbaa !21
  %.not117 = icmp eq i8 %41, 0
  %42 = getelementptr inbounds i8, ptr %.0, i64 1
  br i1 %.not117, label %43, label %40, !llvm.loop !22

43:                                               ; preds = %40
  %44 = getelementptr inbounds i8, ptr %39, i64 %33
  %45 = getelementptr inbounds i8, ptr %44, i64 -3
  %.not118 = icmp ult ptr %42, %45
  br i1 %.not118, label %48, label %46

46:                                               ; preds = %43
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.123) #4
  %47 = load ptr, ptr %25, align 8, !tbaa !20
  tail call void @png_free(ptr noundef %0, ptr noundef %47) #4
  store ptr null, ptr %25, align 8, !tbaa !20
  br label %99

48:                                               ; preds = %43
  %49 = getelementptr inbounds i8, ptr %.0, i64 2
  %50 = load i8, ptr %42, align 1, !tbaa !21
  %51 = getelementptr inbounds i8, ptr %.0, i64 3
  %52 = load i8, ptr %49, align 1, !tbaa !21
  br label %53

53:                                               ; preds = %53, %48
  %.0107 = phi ptr [ %51, %48 ], [ %55, %53 ]
  %54 = load i8, ptr %.0107, align 1, !tbaa !21
  %.not119 = icmp eq i8 %54, 0
  %55 = getelementptr inbounds i8, ptr %.0107, i64 1
  br i1 %.not119, label %56, label %53, !llvm.loop !24

56:                                               ; preds = %53
  %57 = sext i8 %50 to i32
  %58 = sext i8 %52 to i32
  %.not120 = icmp ult ptr %55, %44
  br i1 %.not120, label %.preheader, label %59

59:                                               ; preds = %56
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.123) #4
  %60 = load ptr, ptr %25, align 8, !tbaa !20
  tail call void @png_free(ptr noundef %0, ptr noundef %60) #4
  store ptr null, ptr %25, align 8, !tbaa !20
  br label %99

.preheader:                                       ; preds = %56, %.preheader
  %.0106 = phi ptr [ %62, %.preheader ], [ %55, %56 ]
  %61 = load i8, ptr %.0106, align 1, !tbaa !21
  %.not121 = icmp eq i8 %61, 0
  %62 = getelementptr inbounds i8, ptr %.0106, i64 1
  br i1 %.not121, label %63, label %.preheader, !llvm.loop !25

63:                                               ; preds = %.preheader
  %.not122 = icmp ult ptr %62, %44
  br i1 %.not122, label %66, label %64

64:                                               ; preds = %63
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.124) #4
  %65 = load ptr, ptr %25, align 8, !tbaa !20
  tail call void @png_free(ptr noundef %0, ptr noundef %65) #4
  store ptr null, ptr %25, align 8, !tbaa !20
  br label %99

66:                                               ; preds = %63
  %67 = ptrtoint ptr %62 to i64
  %68 = ptrtoint ptr %39 to i64
  %69 = sub i64 %67, %68
  %.not123 = icmp eq i8 %50, 0
  br i1 %.not123, label %71, label %70

70:                                               ; preds = %66
  call void @png_decompress_chunk(ptr noundef %0, i32 noundef %58, i64 noundef %33, i64 noundef %69, ptr noundef nonnull %4)
  br label %74

71:                                               ; preds = %66
  %72 = getelementptr inbounds i8, ptr %39, i64 %69
  %73 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %72) #5
  store i64 %73, ptr %4, align 8, !tbaa !26
  br label %74

74:                                               ; preds = %71, %70
  %75 = call ptr @png_malloc_warn(ptr noundef %0, i64 noundef 56) #4
  %76 = icmp eq ptr %75, null
  br i1 %76, label %77, label %79

77:                                               ; preds = %74
  call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.125) #4
  %78 = load ptr, ptr %25, align 8, !tbaa !20
  call void @png_free(ptr noundef %0, ptr noundef %78) #4
  store ptr null, ptr %25, align 8, !tbaa !20
  br label %99

79:                                               ; preds = %74
  %80 = add nsw i32 %57, 1
  store i32 %80, ptr %75, align 8, !tbaa !27
  %81 = load ptr, ptr %25, align 8, !tbaa !20
  %82 = ptrtoint ptr %55 to i64
  %83 = sub i64 %82, %68
  %84 = getelementptr inbounds i8, ptr %81, i64 %83
  %85 = getelementptr inbounds i8, ptr %75, i64 48
  store ptr %84, ptr %85, align 8, !tbaa !29
  %86 = ptrtoint ptr %51 to i64
  %87 = sub i64 %86, %68
  %88 = getelementptr inbounds i8, ptr %81, i64 %87
  %89 = getelementptr inbounds i8, ptr %75, i64 40
  store ptr %88, ptr %89, align 8, !tbaa !30
  %90 = load i64, ptr %4, align 8, !tbaa !26
  %91 = getelementptr inbounds i8, ptr %75, i64 32
  store i64 %90, ptr %91, align 8, !tbaa !31
  %92 = getelementptr inbounds i8, ptr %75, i64 24
  store i64 0, ptr %92, align 8, !tbaa !32
  %93 = getelementptr inbounds i8, ptr %75, i64 8
  store ptr %81, ptr %93, align 8, !tbaa !33
  %94 = getelementptr inbounds i8, ptr %81, i64 %69
  %95 = getelementptr inbounds i8, ptr %75, i64 16
  store ptr %94, ptr %95, align 8, !tbaa !34
  %96 = call i32 @png_set_text_2(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %75, i32 noundef 1) #4
  call void @png_free(ptr noundef %0, ptr noundef nonnull %75) #4
  %97 = load ptr, ptr %25, align 8, !tbaa !20
  call void @png_free(ptr noundef %0, ptr noundef %97) #4
  store ptr null, ptr %25, align 8, !tbaa !20
  %.not124 = icmp eq i32 %96, 0
  br i1 %.not124, label %99, label %98

98:                                               ; preds = %79
  call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.126) #4
  br label %99

99:                                               ; preds = %79, %98, %77, %64, %59, %46, %36, %31, %12, %7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: 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, !10, i64 1116}
!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, !9, i64 272, !7, i64 280, !7, i64 281, !10, i64 284, !10, i64 288, !10, i64 292, !11, i64 296, !9, i64 408, !12, i64 416, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !12, i64 464, !12, i64 472, !10, i64 480, !10, i64 484, !9, i64 488, !9, i64 496, !9, i64 504, !9, i64 512, !9, i64 520, !9, i64 528, !13, i64 536, !10, i64 560, !10, i64 564, !9, i64 568, !14, i64 576, !14, i64 578, !7, i64 580, !7, i64 585, !7, i64 586, !7, i64 587, !7, i64 588, !7, i64 589, !7, i64 590, !7, i64 591, !7, i64 592, !7, i64 593, !7, i64 594, !7, i64 595, !7, i64 596, !14, i64 598, !7, i64 600, !15, i64 604, !16, i64 608, !16, i64 618, !9, i64 632, !10, i64 640, !10, i64 644, !10, i64 648, !15, i64 652, !15, i64 656, !9, i64 664, !9, i64 672, !9, i64 680, !9, i64 688, !9, i64 696, !9, i64 704, !17, i64 712, !17, i64 717, !9, i64 728, !16, i64 736, !9, i64 752, !9, i64 760, !9, i64 768, !9, i64 776, !9, i64 784, !9, i64 792, !9, i64 800, !9, i64 808, !9, i64 816, !10, i64 824, !10, i64 828, !12, i64 832, !12, i64 840, !12, i64 848, !12, i64 856, !10, i64 864, !10, i64 868, !12, i64 872, !12, i64 880, !9, i64 888, !9, i64 896, !9, i64 904, !9, i64 912, !9, i64 920, !7, i64 928, !7, i64 929, !9, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !9, i64 968, !9, i64 976, !10, i64 984, !9, i64 992, !9, i64 1000, !10, i64 1008, !9, i64 1016, !7, i64 1024, !14, i64 1026, !14, i64 1028, !14, i64 1030, !10, i64 1032, !10, i64 1036, !7, i64 1040, !9, i64 1048, !9, i64 1056, !9, i64 1064, !9, i64 1072, !9, i64 1080, !9, i64 1088, !9, i64 1096, !7, i64 1104, !10, i64 1108, !10, i64 1112, !10, i64 1116, !18, i64 1120, !10, i64 1152, !10, i64 1156, !9, i64 1160, !10, i64 1168}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"z_stream_s", !9, i64 0, !10, i64 8, !12, i64 16, !9, i64 24, !10, i64 32, !12, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !10, i64 88, !12, i64 96, !12, i64 104}
!12 = !{!"long", !7, i64 0}
!13 = !{!"png_row_info_struct", !10, i64 0, !12, 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, !12, i64 16, !7, i64 24}
!19 = !{!6, !10, i64 284}
!20 = !{!6, !9, i64 1160}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = !{!12, !12, i64 0}
!27 = !{!28, !10, i64 0}
!28 = !{!"png_text_struct", !10, i64 0, !9, i64 8, !9, i64 16, !12, i64 24, !12, i64 32, !9, i64 40, !9, i64 48}
!29 = !{!28, !9, i64 48}
!30 = !{!28, !9, i64 40}
!31 = !{!28, !12, i64 32}
!32 = !{!28, !12, i64 24}
!33 = !{!28, !9, i64 8}
!34 = !{!28, !9, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass