; LLVM IR from corentinartaud/graphics :: ThirdParty/FreeImage-3170/Source/LibPNG (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_sPLT_struct = type { ptr, i8, ptr, i32 }
%struct.png_struct_def = type { [1 x %struct.__jmp_buf_tag], ptr, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i32, i32, i32, i32, %struct.z_stream_s, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i64, i32, i32, ptr, i16, i32, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, i32, %struct.png_color_16_struct, %struct.png_color_16_struct, ptr, i32, i32, i32, i32, 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, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, i8, [29 x i8], i32, ptr, ptr, i32, i32, ptr, i8, i8, i16, i16, i32, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, i32, i32, i64, %struct.png_unknown_chunk_t, i64, ptr, i64, i32, i32, ptr, [4 x ptr], %struct.png_colorspace }
%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_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_colorspace = type { i32, %struct.png_xy, %struct.png_XYZ, i16, i16 }
%struct.png_xy = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.png_XYZ = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.png_sPLT_entry_struct = type { i16, i16, i16, i16, i16 }

@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [36 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @png_crc_read(ptr noalias noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: noreturn
declare void @png_chunk_error(ptr noundef, ptr noundef) #2

declare void @png_chunk_benign_error(ptr noundef, ptr noundef) #3

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

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

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

27:                                               ; preds = %22
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = call i32 @png_crc_finish(ptr noundef %28, i32 noundef %29)
  store i32 1, ptr %17, align 4
  br label %287

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

37:                                               ; preds = %31
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %38, ptr noundef @.str.20)
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = call i32 @png_crc_finish(ptr noundef %39, i32 noundef %40)
  store i32 1, ptr %17, align 4
  br label %287

42:                                               ; preds = %31
  br label %43

43:                                               ; preds = %42, %3
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.png_struct_def, ptr %44, i32 0, i32 15
  %46 = load i32, ptr %45, align 4, !tbaa !22
  %47 = and i32 %46, 1
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %43
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_chunk_error(ptr noundef %50, ptr noundef @.str.6) #5
  unreachable

51:                                               ; preds = %43
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.png_struct_def, ptr %52, i32 0, i32 15
  %54 = load i32, ptr %53, align 4, !tbaa !22
  %55 = and i32 %54, 4
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %62

57:                                               ; preds = %51
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = call i32 @png_crc_finish(ptr noundef %58, i32 noundef %59)
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_chunk_benign_error(ptr noundef %61, ptr noundef @.str.4)
  store i32 1, ptr %17, align 4
  br label %287

62:                                               ; preds = %51
  br label %63

63:                                               ; preds = %62
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = add i32 %65, 1
  %67 = zext i32 %66 to i64
  %68 = call ptr @png_read_buffer(ptr noundef %64, i64 noundef %67, i32 noundef 2)
  store ptr %68, ptr %8, align 8, !tbaa !5
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = icmp eq ptr %69, null
  br i1 %70, label %71, label %76

71:                                               ; preds = %63
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !9
  %74 = call i32 @png_crc_finish(ptr noundef %72, i32 noundef %73)
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_chunk_benign_error(ptr noundef %75, ptr noundef @.str.16)
  store i32 1, ptr %17, align 4
  br label %287

76:                                               ; preds = %63
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !9
  call void @png_crc_read(ptr noundef %77, ptr noundef %78, i32 noundef %79)
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load i32, ptr %14, align 4, !tbaa !9
  %82 = call i32 @png_crc_finish(ptr noundef %80, i32 noundef %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %85

84:                                               ; preds = %76
  store i32 1, ptr %17, align 4
  br label %287

85:                                               ; preds = %76
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = zext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %86, i64 %88
  store i8 0, ptr %89, align 1, !tbaa !23
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %90, ptr %7, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %96, %85
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i8, ptr %92, align 1, !tbaa !23
  %94 = icmp ne i8 %93, 0
  br i1 %94, label %95, label %99

95:                                               ; preds = %91
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i32 1
  store ptr %98, ptr %7, align 8, !tbaa !5
  br label %91, !llvm.loop !24

99:                                               ; preds = %91
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i32 1
  store ptr %101, ptr %7, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = zext i32 %104 to i64
  %106 = getelementptr inbounds i8, ptr %103, i64 %105
  %107 = getelementptr inbounds i8, ptr %106, i64 -2
  %108 = icmp ugt ptr %102, %107
  br i1 %108, label %109, label %111

109:                                              ; preds = %99
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %110, ptr noundef @.str.21)
  store i32 1, ptr %17, align 4
  br label %287

111:                                              ; preds = %99
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i32 1
  store ptr %113, ptr %7, align 8, !tbaa !5
  %114 = load i8, ptr %112, align 1, !tbaa !23
  %115 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 1
  store i8 %114, ptr %115, align 8, !tbaa !26
  %116 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 1
  %117 = load i8, ptr %116, align 8, !tbaa !26
  %118 = zext i8 %117 to i32
  %119 = icmp eq i32 %118, 8
  %120 = zext i1 %119 to i64
  %121 = select i1 %119, i32 6, i32 10
  store i32 %121, ptr %12, align 4, !tbaa !9
  %122 = load i32, ptr %6, align 4, !tbaa !9
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = ptrtoint ptr %123 to i64
  %126 = ptrtoint ptr %124 to i64
  %127 = sub i64 %125, %126
  %128 = trunc i64 %127 to i32
  %129 = sub i32 %122, %128
  store i32 %129, ptr %11, align 4, !tbaa !9
  %130 = load i32, ptr %11, align 4, !tbaa !9
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = urem i32 %130, %131
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %136

134:                                              ; preds = %111
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %135, ptr noundef @.str.22)
  store i32 1, ptr %17, align 4
  br label %287

136:                                              ; preds = %111
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = load i32, ptr %12, align 4, !tbaa !9
  %139 = udiv i32 %137, %138
  store i32 %139, ptr %15, align 4, !tbaa !9
  store i64 1844674407370955161, ptr %16, align 8, !tbaa !28
  %140 = load i32, ptr %15, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = load i64, ptr %16, align 8, !tbaa !28
  %143 = icmp ugt i64 %141, %142
  br i1 %143, label %144, label %146

144:                                              ; preds = %136
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %145, ptr noundef @.str.23)
  store i32 1, ptr %17, align 4
  br label %287

146:                                              ; preds = %136
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = load i32, ptr %12, align 4, !tbaa !9
  %149 = udiv i32 %147, %148
  %150 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 3
  store i32 %149, ptr %150, align 8, !tbaa !29
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 3
  %153 = load i32, ptr %152, align 8, !tbaa !29
  %154 = sext i32 %153 to i64
  %155 = mul i64 %154, 10
  %156 = call noalias ptr @png_malloc_warn(ptr noundef %151, i64 noundef %155)
  %157 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 2
  store ptr %156, ptr %157, align 8, !tbaa !30
  %158 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 2
  %159 = load ptr, ptr %158, align 8, !tbaa !30
  %160 = icmp eq ptr %159, null
  br i1 %160, label %161, label %163

161:                                              ; preds = %146
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %162, ptr noundef @.str.24)
  store i32 1, ptr %17, align 4
  br label %287

163:                                              ; preds = %146
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %164

164:                                              ; preds = %276, %163
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 3
  %167 = load i32, ptr %166, align 8, !tbaa !29
  %168 = icmp slt i32 %165, %167
  br i1 %168, label %169, label %279

169:                                              ; preds = %164
  %170 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 2
  %171 = load ptr, ptr %170, align 8, !tbaa !30
  %172 = load i32, ptr %13, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %171, i64 %173
  store ptr %174, ptr %10, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 1
  %176 = load i8, ptr %175, align 8, !tbaa !26
  %177 = zext i8 %176 to i32
  %178 = icmp eq i32 %177, 8
  br i1 %178, label %179, label %204

179:                                              ; preds = %169
  %180 = load ptr, ptr %7, align 8, !tbaa !5
  %181 = getelementptr inbounds i8, ptr %180, i32 1
  store ptr %181, ptr %7, align 8, !tbaa !5
  %182 = load i8, ptr %180, align 1, !tbaa !23
  %183 = zext i8 %182 to i16
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %184, i32 0, i32 0
  store i16 %183, ptr %185, align 2, !tbaa !31
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  %187 = getelementptr inbounds i8, ptr %186, i32 1
  store ptr %187, ptr %7, align 8, !tbaa !5
  %188 = load i8, ptr %186, align 1, !tbaa !23
  %189 = zext i8 %188 to i16
  %190 = load ptr, ptr %10, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %190, i32 0, i32 1
  store i16 %189, ptr %191, align 2, !tbaa !33
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = getelementptr inbounds i8, ptr %192, i32 1
  store ptr %193, ptr %7, align 8, !tbaa !5
  %194 = load i8, ptr %192, align 1, !tbaa !23
  %195 = zext i8 %194 to i16
  %196 = load ptr, ptr %10, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %196, i32 0, i32 2
  store i16 %195, ptr %197, align 2, !tbaa !34
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = getelementptr inbounds i8, ptr %198, i32 1
  store ptr %199, ptr %7, align 8, !tbaa !5
  %200 = load i8, ptr %198, align 1, !tbaa !23
  %201 = zext i8 %200 to i16
  %202 = load ptr, ptr %10, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %202, i32 0, i32 3
  store i16 %201, ptr %203, align 2, !tbaa !35
  br label %261

204:                                              ; preds = %169
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = load i8, ptr %205, align 1, !tbaa !23
  %207 = zext i8 %206 to i32
  %208 = shl i32 %207, 8
  %209 = load ptr, ptr %7, align 8, !tbaa !5
  %210 = getelementptr inbounds i8, ptr %209, i64 1
  %211 = load i8, ptr %210, align 1, !tbaa !23
  %212 = zext i8 %211 to i32
  %213 = add i32 %208, %212
  %214 = trunc i32 %213 to i16
  %215 = load ptr, ptr %10, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %215, i32 0, i32 0
  store i16 %214, ptr %216, align 2, !tbaa !31
  %217 = load ptr, ptr %7, align 8, !tbaa !5
  %218 = getelementptr inbounds i8, ptr %217, i64 2
  store ptr %218, ptr %7, align 8, !tbaa !5
  %219 = load ptr, ptr %7, align 8, !tbaa !5
  %220 = load i8, ptr %219, align 1, !tbaa !23
  %221 = zext i8 %220 to i32
  %222 = shl i32 %221, 8
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = getelementptr inbounds i8, ptr %223, i64 1
  %225 = load i8, ptr %224, align 1, !tbaa !23
  %226 = zext i8 %225 to i32
  %227 = add i32 %222, %226
  %228 = trunc i32 %227 to i16
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %229, i32 0, i32 1
  store i16 %228, ptr %230, align 2, !tbaa !33
  %231 = load ptr, ptr %7, align 8, !tbaa !5
  %232 = getelementptr inbounds i8, ptr %231, i64 2
  store ptr %232, ptr %7, align 8, !tbaa !5
  %233 = load ptr, ptr %7, align 8, !tbaa !5
  %234 = load i8, ptr %233, align 1, !tbaa !23
  %235 = zext i8 %234 to i32
  %236 = shl i32 %235, 8
  %237 = load ptr, ptr %7, align 8, !tbaa !5
  %238 = getelementptr inbounds i8, ptr %237, i64 1
  %239 = load i8, ptr %238, align 1, !tbaa !23
  %240 = zext i8 %239 to i32
  %241 = add i32 %236, %240
  %242 = trunc i32 %241 to i16
  %243 = load ptr, ptr %10, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %243, i32 0, i32 2
  store i16 %242, ptr %244, align 2, !tbaa !34
  %245 = load ptr, ptr %7, align 8, !tbaa !5
  %246 = getelementptr inbounds i8, ptr %245, i64 2
  store ptr %246, ptr %7, align 8, !tbaa !5
  %247 = load ptr, ptr %7, align 8, !tbaa !5
  %248 = load i8, ptr %247, align 1, !tbaa !23
  %249 = zext i8 %248 to i32
  %250 = shl i32 %249, 8
  %251 = load ptr, ptr %7, align 8, !tbaa !5
  %252 = getelementptr inbounds i8, ptr %251, i64 1
  %253 = load i8, ptr %252, align 1, !tbaa !23
  %254 = zext i8 %253 to i32
  %255 = add i32 %250, %254
  %256 = trunc i32 %255 to i16
  %257 = load ptr, ptr %10, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %257, i32 0, i32 3
  store i16 %256, ptr %258, align 2, !tbaa !35
  %259 = load ptr, ptr %7, align 8, !tbaa !5
  %260 = getelementptr inbounds i8, ptr %259, i64 2
  store ptr %260, ptr %7, align 8, !tbaa !5
  br label %261

261:                                              ; preds = %204, %179
  %262 = load ptr, ptr %7, align 8, !tbaa !5
  %263 = load i8, ptr %262, align 1, !tbaa !23
  %264 = zext i8 %263 to i32
  %265 = shl i32 %264, 8
  %266 = load ptr, ptr %7, align 8, !tbaa !5
  %267 = getelementptr inbounds i8, ptr %266, i64 1
  %268 = load i8, ptr %267, align 1, !tbaa !23
  %269 = zext i8 %268 to i32
  %270 = add i32 %265, %269
  %271 = trunc i32 %270 to i16
  %272 = load ptr, ptr %10, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %272, i32 0, i32 4
  store i16 %271, ptr %273, align 2, !tbaa !36
  %274 = load ptr, ptr %7, align 8, !tbaa !5
  %275 = getelementptr inbounds i8, ptr %274, i64 2
  store ptr %275, ptr %7, align 8, !tbaa !5
  br label %276

276:                                              ; preds = %261
  %277 = load i32, ptr %13, align 4, !tbaa !9
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %13, align 4, !tbaa !9
  br label %164, !llvm.loop !37

279:                                              ; preds = %164
  %280 = load ptr, ptr %8, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 0
  store ptr %280, ptr %281, align 8, !tbaa !38
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_set_sPLT(ptr noundef %282, ptr noundef %283, ptr noundef %9, i32 noundef 1)
  %284 = load ptr, ptr %4, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.png_sPLT_struct, ptr %9, i32 0, i32 2
  %286 = load ptr, ptr %285, align 8, !tbaa !30
  call void @png_free(ptr noundef %284, ptr noundef %286)
  store i32 0, ptr %17, align 4
  br label %287

287:                                              ; preds = %279, %161, %144, %134, %109, %84, %71, %57, %37, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, 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
  %288 = load i32, ptr %17, align 4
  switch i32 %288, label %290 [
    i32 0, label %289
    i32 1, label %289
  ]

289:                                              ; preds = %287, %287
  ret void

290:                                              ; preds = %287
  unreachable
}

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

declare noalias ptr @png_malloc_warn(ptr noundef, i64 noundef) #3

declare void @png_set_sPLT(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

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

!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 1124}
!12 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !13, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !14, i64 320, !6, i64 432, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !10, i64 496, !10, i64 500, !10, i64 504, !10, i64 508, !10, i64 512, !10, i64 516, !13, i64 520, !10, i64 528, !10, i64 532, !10, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !13, i64 592, !10, i64 600, !10, i64 604, !6, i64 608, !15, i64 616, !10, i64 620, !15, i64 624, !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, !7, i64 637, !7, i64 638, !7, i64 639, !15, i64 640, !7, i64 642, !10, i64 644, !16, i64 648, !16, i64 658, !6, i64 672, !10, i64 680, !10, i64 684, !10, i64 688, !10, i64 692, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !17, i64 744, !17, i64 749, !6, i64 760, !16, i64 768, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !6, i64 848, !10, i64 856, !10, i64 860, !13, i64 864, !13, i64 872, !13, i64 880, !13, i64 888, !10, i64 896, !10, i64 900, !6, i64 904, !6, i64 912, !7, i64 920, !7, i64 921, !6, i64 928, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !7, i64 968, !7, i64 969, !10, i64 1000, !6, i64 1008, !6, i64 1016, !10, i64 1024, !10, i64 1028, !6, i64 1032, !7, i64 1040, !7, i64 1041, !15, i64 1042, !15, i64 1044, !10, i64 1048, !7, i64 1052, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !6, i64 1104, !7, i64 1112, !10, i64 1116, !10, i64 1120, !10, i64 1124, !13, i64 1128, !18, i64 1136, !13, i64 1168, !6, i64 1176, !13, i64 1184, !10, i64 1192, !10, i64 1196, !6, i64 1200, !7, i64 1208, !19, i64 1240}
!13 = !{!"long", !7, i64 0}
!14 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !13, i64 16, !6, i64 24, !10, i64 32, !13, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !13, i64 96, !13, i64 104}
!15 = !{!"short", !7, i64 0}
!16 = !{!"png_color_16_struct", !7, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !15, 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, !6, i64 8, !13, i64 16, !7, i64 24}
!19 = !{!"png_colorspace", !10, i64 0, !20, i64 4, !21, i64 36, !15, i64 72, !15, i64 74}
!20 = !{!"png_xy", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!21 = !{!"png_XYZ", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!22 = !{!12, !10, i64 300}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!27, !7, i64 8}
!27 = !{!"png_sPLT_struct", !6, i64 0, !7, i64 8, !6, i64 16, !10, i64 24}
!28 = !{!13, !13, i64 0}
!29 = !{!27, !10, i64 24}
!30 = !{!27, !6, i64 16}
!31 = !{!32, !15, i64 0}
!32 = !{!"png_sPLT_entry_struct", !15, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !15, i64 8}
!33 = !{!32, !15, i64 2}
!34 = !{!32, !15, i64 4}
!35 = !{!32, !15, i64 6}
!36 = !{!32, !15, i64 8}
!37 = distinct !{!37, !25}
!38 = !{!27, !6, i64 0}


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

%struct.png_sPLT_struct = type { ptr, i8, ptr, i32 }
%struct.png_sPLT_entry_struct = type { i16, i16, i16, i16, i16 }

@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [36 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

; 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 noalias noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: noreturn
declare void @png_chunk_error(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @png_chunk_benign_error(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local void @png_handle_sPLT(ptr noalias noundef %0, ptr noalias noundef %1, i32 noundef %2) local_unnamed_addr #1 {
  %4 = alloca %struct.png_sPLT_struct, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %0, i64 1124
  %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 %134

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.20) #4
  %13 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  br label %134

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

19:                                               ; preds = %14
  tail call void @png_chunk_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.6) #5
  unreachable

20:                                               ; preds = %14
  %21 = and i32 %16, 4
  %.not89 = icmp eq i32 %21, 0
  br i1 %.not89, label %24, label %22

22:                                               ; preds = %20
  %23 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  tail call void @png_chunk_benign_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.4) #4
  br label %134

24:                                               ; preds = %20
  %25 = add i32 %2, 1
  %26 = zext i32 %25 to i64
  %27 = tail call ptr @png_read_buffer(ptr noundef nonnull %0, i64 noundef %26, i32 noundef 2)
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %31

29:                                               ; preds = %24
  %30 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  tail call void @png_chunk_benign_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.16) #4
  br label %134

31:                                               ; preds = %24
  tail call void @png_crc_read(ptr noundef nonnull %0, ptr noundef nonnull %27, i32 noundef %2)
  %32 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef 0)
  %.not90 = icmp eq i32 %32, 0
  br i1 %.not90, label %33, label %134

33:                                               ; preds = %31
  %34 = zext i32 %2 to i64
  %35 = getelementptr inbounds i8, ptr %27, i64 %34
  store i8 0, ptr %35, align 1, !tbaa !21
  br label %36

36:                                               ; preds = %36, %33
  %.0 = phi ptr [ %27, %33 ], [ %38, %36 ]
  %37 = load i8, ptr %.0, align 1, !tbaa !21
  %.not91 = icmp eq i8 %37, 0
  %38 = getelementptr inbounds i8, ptr %.0, i64 1
  br i1 %.not91, label %39, label %36, !llvm.loop !22

39:                                               ; preds = %36
  %40 = getelementptr inbounds i8, ptr %35, i64 -2
  %41 = icmp ugt ptr %38, %40
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.21) #4
  br label %134

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %.0, i64 2
  %45 = load i8, ptr %38, align 1, !tbaa !21
  %46 = getelementptr inbounds i8, ptr %4, i64 8
  store i8 %45, ptr %46, align 8, !tbaa !24
  %47 = icmp eq i8 %45, 8
  %48 = select i1 %47, i32 6, i32 10
  %49 = ptrtoint ptr %44 to i64
  %50 = ptrtoint ptr %27 to i64
  %.neg = sub i64 %50, %49
  %.neg92 = trunc i64 %.neg to i32
  %51 = add i32 %.neg92, %2
  %52 = urem i32 %51, %48
  %53 = udiv i32 %51, %48
  %.not93 = icmp eq i32 %52, 0
  br i1 %.not93, label %55, label %54

54:                                               ; preds = %43
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.22) #4
  br label %134

55:                                               ; preds = %43
  %56 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 %53, ptr %56, align 8, !tbaa !26
  %57 = zext nneg i32 %53 to i64
  %58 = mul nuw nsw i64 %57, 10
  %59 = tail call noalias ptr @png_malloc_warn(ptr noundef %0, i64 noundef %58) #4
  %60 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %59, ptr %60, align 8, !tbaa !27
  %61 = icmp eq ptr %59, null
  br i1 %61, label %87, label %.preheader

.preheader:                                       ; preds = %55
  %.not = icmp ugt i32 %48, %51
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  br i1 %47, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %.lr.ph.split.us
  %indvars.iv98 = phi i64 [ %indvars.iv.next99, %.lr.ph.split.us ], [ 0, %.lr.ph ]
  %.195.us = phi ptr [ %86, %.lr.ph.split.us ], [ %44, %.lr.ph ]
  %62 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %59, i64 %indvars.iv98
  %63 = getelementptr inbounds i8, ptr %.195.us, i64 1
  %64 = load i8, ptr %.195.us, align 1, !tbaa !21
  %65 = zext i8 %64 to i16
  store i16 %65, ptr %62, align 2, !tbaa !28
  %66 = getelementptr inbounds i8, ptr %.195.us, i64 2
  %67 = load i8, ptr %63, align 1, !tbaa !21
  %68 = zext i8 %67 to i16
  %69 = getelementptr inbounds i8, ptr %62, i64 2
  store i16 %68, ptr %69, align 2, !tbaa !30
  %70 = getelementptr inbounds i8, ptr %.195.us, i64 3
  %71 = load i8, ptr %66, align 1, !tbaa !21
  %72 = zext i8 %71 to i16
  %73 = getelementptr inbounds i8, ptr %62, i64 4
  store i16 %72, ptr %73, align 2, !tbaa !31
  %74 = getelementptr inbounds i8, ptr %.195.us, i64 4
  %75 = load i8, ptr %70, align 1, !tbaa !21
  %76 = zext i8 %75 to i16
  %77 = getelementptr inbounds i8, ptr %62, i64 6
  store i16 %76, ptr %77, align 2, !tbaa !32
  %78 = load i8, ptr %74, align 1, !tbaa !21
  %79 = zext i8 %78 to i16
  %80 = shl nuw i16 %79, 8
  %81 = getelementptr inbounds i8, ptr %.195.us, i64 5
  %82 = load i8, ptr %81, align 1, !tbaa !21
  %83 = zext i8 %82 to i16
  %84 = or disjoint i16 %80, %83
  %85 = getelementptr inbounds i8, ptr %62, i64 8
  store i16 %84, ptr %85, align 2, !tbaa !33
  %86 = getelementptr inbounds i8, ptr %.195.us, i64 6
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %57
  br i1 %exitcond102.not, label %._crit_edge, label %.lr.ph.split.us, !llvm.loop !34

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

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split ], [ 0, %.lr.ph ]
  %.195 = phi ptr [ %132, %.lr.ph.split ], [ %44, %.lr.ph ]
  %88 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %59, i64 %indvars.iv
  %89 = load i8, ptr %.195, align 1, !tbaa !21
  %90 = zext i8 %89 to i16
  %91 = shl nuw i16 %90, 8
  %92 = getelementptr inbounds i8, ptr %.195, i64 1
  %93 = load i8, ptr %92, align 1, !tbaa !21
  %94 = zext i8 %93 to i16
  %95 = or disjoint i16 %91, %94
  store i16 %95, ptr %88, align 2, !tbaa !28
  %96 = getelementptr inbounds i8, ptr %.195, i64 2
  %97 = load i8, ptr %96, align 1, !tbaa !21
  %98 = zext i8 %97 to i16
  %99 = shl nuw i16 %98, 8
  %100 = getelementptr inbounds i8, ptr %.195, i64 3
  %101 = load i8, ptr %100, align 1, !tbaa !21
  %102 = zext i8 %101 to i16
  %103 = or disjoint i16 %99, %102
  %104 = getelementptr inbounds i8, ptr %88, i64 2
  store i16 %103, ptr %104, align 2, !tbaa !30
  %105 = getelementptr inbounds i8, ptr %.195, i64 4
  %106 = load i8, ptr %105, align 1, !tbaa !21
  %107 = zext i8 %106 to i16
  %108 = shl nuw i16 %107, 8
  %109 = getelementptr inbounds i8, ptr %.195, i64 5
  %110 = load i8, ptr %109, align 1, !tbaa !21
  %111 = zext i8 %110 to i16
  %112 = or disjoint i16 %108, %111
  %113 = getelementptr inbounds i8, ptr %88, i64 4
  store i16 %112, ptr %113, align 2, !tbaa !31
  %114 = getelementptr inbounds i8, ptr %.195, i64 6
  %115 = load i8, ptr %114, align 1, !tbaa !21
  %116 = zext i8 %115 to i16
  %117 = shl nuw i16 %116, 8
  %118 = getelementptr inbounds i8, ptr %.195, i64 7
  %119 = load i8, ptr %118, align 1, !tbaa !21
  %120 = zext i8 %119 to i16
  %121 = or disjoint i16 %117, %120
  %122 = getelementptr inbounds i8, ptr %88, i64 6
  store i16 %121, ptr %122, align 2, !tbaa !32
  %123 = getelementptr inbounds i8, ptr %.195, i64 8
  %124 = load i8, ptr %123, align 1, !tbaa !21
  %125 = zext i8 %124 to i16
  %126 = shl nuw i16 %125, 8
  %127 = getelementptr inbounds i8, ptr %.195, i64 9
  %128 = load i8, ptr %127, align 1, !tbaa !21
  %129 = zext i8 %128 to i16
  %130 = or disjoint i16 %126, %129
  %131 = getelementptr inbounds i8, ptr %88, i64 8
  store i16 %130, ptr %131, align 2, !tbaa !33
  %132 = getelementptr inbounds i8, ptr %.195, i64 10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %57
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph.split, !llvm.loop !34

._crit_edge:                                      ; preds = %.lr.ph.split, %.lr.ph.split.us, %.preheader
  store ptr %27, ptr %4, align 8, !tbaa !35
  call void @png_set_sPLT(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %4, i32 noundef 1) #4
  %133 = load ptr, ptr %60, align 8, !tbaa !27
  call void @png_free(ptr noundef %0, ptr noundef %133) #4
  br label %134

134:                                              ; preds = %31, %._crit_edge, %87, %54, %42, %29, %22, %12, %7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  ret void
}

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

declare noalias ptr @png_malloc_warn(ptr noundef, i64 noundef) local_unnamed_addr #3

declare void @png_set_sPLT(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn "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 = { "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 = { noreturn 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, !11, i64 1124}
!6 = !{!"png_struct_def", !7, i64 0, !9, i64 200, !9, i64 208, !10, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !9, i64 272, !9, i64 280, !9, i64 288, !7, i64 296, !7, i64 297, !11, i64 300, !11, i64 304, !11, i64 308, !11, i64 312, !12, i64 320, !9, i64 432, !11, i64 440, !11, i64 444, !11, i64 448, !11, i64 452, !11, i64 456, !11, i64 460, !11, i64 464, !11, i64 468, !11, i64 472, !11, i64 476, !11, i64 480, !11, i64 484, !11, i64 488, !11, i64 492, !11, i64 496, !11, i64 500, !11, i64 504, !11, i64 508, !11, i64 512, !11, i64 516, !10, i64 520, !11, i64 528, !11, i64 532, !11, i64 536, !9, i64 544, !9, i64 552, !9, i64 560, !9, i64 568, !9, i64 576, !9, i64 584, !10, i64 592, !11, i64 600, !11, i64 604, !9, i64 608, !13, i64 616, !11, i64 620, !13, i64 624, !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, !7, i64 637, !7, i64 638, !7, i64 639, !13, i64 640, !7, i64 642, !11, i64 644, !14, i64 648, !14, i64 658, !9, i64 672, !11, i64 680, !11, i64 684, !11, i64 688, !11, i64 692, !9, i64 696, !9, i64 704, !9, i64 712, !9, i64 720, !9, i64 728, !9, i64 736, !15, i64 744, !15, i64 749, !9, i64 760, !14, i64 768, !9, i64 784, !9, i64 792, !9, i64 800, !9, i64 808, !9, i64 816, !9, i64 824, !9, i64 832, !9, i64 840, !9, i64 848, !11, i64 856, !11, i64 860, !10, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !11, i64 896, !11, i64 900, !9, i64 904, !9, i64 912, !7, i64 920, !7, i64 921, !9, i64 928, !9, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !7, i64 968, !7, i64 969, !11, i64 1000, !9, i64 1008, !9, i64 1016, !11, i64 1024, !11, i64 1028, !9, i64 1032, !7, i64 1040, !7, i64 1041, !13, i64 1042, !13, i64 1044, !11, i64 1048, !7, i64 1052, !9, i64 1056, !9, i64 1064, !9, i64 1072, !9, i64 1080, !9, i64 1088, !9, i64 1096, !9, i64 1104, !7, i64 1112, !11, i64 1116, !11, i64 1120, !11, i64 1124, !10, i64 1128, !16, i64 1136, !10, i64 1168, !9, i64 1176, !10, i64 1184, !11, i64 1192, !11, i64 1196, !9, i64 1200, !7, i64 1208, !17, i64 1240}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!"z_stream_s", !9, i64 0, !11, i64 8, !10, i64 16, !9, i64 24, !11, i64 32, !10, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !11, i64 88, !10, i64 96, !10, i64 104}
!13 = !{!"short", !7, i64 0}
!14 = !{!"png_color_16_struct", !7, i64 0, !13, i64 2, !13, i64 4, !13, i64 6, !13, i64 8}
!15 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!16 = !{!"png_unknown_chunk_t", !7, i64 0, !9, i64 8, !10, i64 16, !7, i64 24}
!17 = !{!"png_colorspace", !11, i64 0, !18, i64 4, !19, i64 36, !13, i64 72, !13, i64 74}
!18 = !{!"png_xy", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!19 = !{!"png_XYZ", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!20 = !{!6, !11, i64 300}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !7, i64 8}
!25 = !{!"png_sPLT_struct", !9, i64 0, !7, i64 8, !9, i64 16, !11, i64 24}
!26 = !{!25, !11, i64 24}
!27 = !{!25, !9, i64 16}
!28 = !{!29, !13, i64 0}
!29 = !{!"png_sPLT_entry_struct", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6, !13, i64 8}
!30 = !{!29, !13, i64 2}
!31 = !{!29, !13, i64 4}
!32 = !{!29, !13, i64 6}
!33 = !{!29, !13, i64 8}
!34 = distinct !{!34, !23}
!35 = !{!25, !9, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,DivRemPairsPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass