; LLVM IR from Try/Tempest :: Engine/thirdparty/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, i64, i32, i32, ptr, i16, i32, i16, i8, 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, i32, [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.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = 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 134
  %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 134
  %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 %290

31:                                               ; preds = %22
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.png_struct_def, ptr %32, i32 0, i32 134
  %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 %290

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.7) #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.5)
  store i32 1, ptr %17, align 4
  br label %290

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.17)
  store i32 1, ptr %17, align 4
  br label %290

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 %290

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 i32, ptr %6, align 4, !tbaa !9
  %103 = icmp ult i32 %102, 2
  br i1 %103, label %112, label %104

104:                                              ; preds = %99
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = load i32, ptr %6, align 4, !tbaa !9
  %108 = sub i32 %107, 2
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds i8, ptr %106, i64 %109
  %111 = icmp ugt ptr %105, %110
  br i1 %111, label %112, label %114

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

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

137:                                              ; preds = %114
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %138, ptr noundef @.str.22)
  store i32 1, ptr %17, align 4
  br label %290

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

147:                                              ; preds = %139
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %148, ptr noundef @.str.23)
  store i32 1, ptr %17, align 4
  br label %290

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

164:                                              ; preds = %149
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %165, ptr noundef @.str.24)
  store i32 1, ptr %17, align 4
  br label %290

166:                                              ; preds = %149
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %167

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

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

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

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

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

279:                                              ; preds = %264
  %280 = load i32, ptr %13, align 4, !tbaa !9
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %13, align 4, !tbaa !9
  br label %167, !llvm.loop !37

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

290:                                              ; preds = %282, %164, %147, %137, %112, %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
  %291 = load i32, ptr %17, align 4
  switch i32 %291, label %293 [
    i32 0, label %292
    i32 1, label %292
  ]

292:                                              ; preds = %290, %290
  ret void

293:                                              ; preds = %290
  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 1060}
!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, !13, i64 576, !10, i64 584, !10, i64 588, !6, i64 592, !15, i64 600, !10, i64 604, !15, i64 608, !7, i64 610, !7, i64 611, !7, i64 612, !7, i64 613, !7, i64 614, !7, i64 615, !7, i64 616, !7, i64 617, !7, i64 618, !7, i64 619, !7, i64 620, !7, i64 621, !7, i64 622, !7, i64 623, !7, i64 624, !15, i64 626, !7, i64 628, !10, i64 632, !16, i64 636, !16, i64 646, !6, i64 656, !10, i64 664, !10, i64 668, !10, i64 672, !10, i64 676, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !17, i64 728, !17, i64 733, !6, i64 744, !16, i64 752, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !10, i64 840, !10, i64 844, !13, i64 848, !13, i64 856, !13, i64 864, !13, i64 872, !10, i64 880, !10, i64 884, !6, i64 888, !6, i64 896, !10, i64 904, !7, i64 908, !10, i64 940, !6, i64 944, !6, i64 952, !10, i64 960, !10, i64 964, !6, i64 968, !7, i64 976, !7, i64 977, !15, i64 978, !15, i64 980, !10, i64 984, !7, i64 988, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !7, i64 1048, !10, i64 1052, !10, i64 1056, !10, i64 1060, !13, i64 1064, !18, i64 1072, !13, i64 1104, !6, i64 1112, !13, i64 1120, !10, i64 1128, !10, i64 1132, !6, i64 1136, !7, i64 1144, !19, i64 1176}
!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.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = 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 1060
  %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 %137

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 %137

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.7) #5
  unreachable

20:                                               ; preds = %14
  %21 = and i32 %16, 4
  %.not91 = icmp eq i32 %21, 0
  br i1 %.not91, 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.5) #4
  br label %137

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.17) #4
  br label %137

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)
  %.not92 = icmp eq i32 %32, 0
  br i1 %.not92, label %33, label %137

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
  %.not93 = icmp eq i8 %37, 0
  %38 = getelementptr inbounds i8, ptr %.0, i64 1
  br i1 %.not93, label %39, label %36, !llvm.loop !22

39:                                               ; preds = %36
  %40 = icmp ult i32 %2, 2
  %41 = add i32 %2, -2
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %27, i64 %42
  %44 = icmp ugt ptr %38, %43
  %or.cond = select i1 %40, i1 true, i1 %44
  br i1 %or.cond, label %45, label %46

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

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

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

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

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

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

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

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

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph.split ], [ 0, %.lr.ph ]
  %.1100 = phi ptr [ %135, %.lr.ph.split ], [ %47, %.lr.ph ]
  %91 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %62, i64 %indvars.iv
  %92 = load i8, ptr %.1100, align 1, !tbaa !21
  %93 = zext i8 %92 to i16
  %94 = shl nuw i16 %93, 8
  %95 = getelementptr inbounds i8, ptr %.1100, i64 1
  %96 = load i8, ptr %95, align 1, !tbaa !21
  %97 = zext i8 %96 to i16
  %98 = or disjoint i16 %94, %97
  store i16 %98, ptr %91, align 2, !tbaa !28
  %99 = getelementptr inbounds i8, ptr %.1100, i64 2
  %100 = load i8, ptr %99, align 1, !tbaa !21
  %101 = zext i8 %100 to i16
  %102 = shl nuw i16 %101, 8
  %103 = getelementptr inbounds i8, ptr %.1100, i64 3
  %104 = load i8, ptr %103, align 1, !tbaa !21
  %105 = zext i8 %104 to i16
  %106 = or disjoint i16 %102, %105
  %107 = getelementptr inbounds i8, ptr %91, i64 2
  store i16 %106, ptr %107, align 2, !tbaa !30
  %108 = getelementptr inbounds i8, ptr %.1100, i64 4
  %109 = load i8, ptr %108, align 1, !tbaa !21
  %110 = zext i8 %109 to i16
  %111 = shl nuw i16 %110, 8
  %112 = getelementptr inbounds i8, ptr %.1100, i64 5
  %113 = load i8, ptr %112, align 1, !tbaa !21
  %114 = zext i8 %113 to i16
  %115 = or disjoint i16 %111, %114
  %116 = getelementptr inbounds i8, ptr %91, i64 4
  store i16 %115, ptr %116, align 2, !tbaa !31
  %117 = getelementptr inbounds i8, ptr %.1100, i64 6
  %118 = load i8, ptr %117, align 1, !tbaa !21
  %119 = zext i8 %118 to i16
  %120 = shl nuw i16 %119, 8
  %121 = getelementptr inbounds i8, ptr %.1100, i64 7
  %122 = load i8, ptr %121, align 1, !tbaa !21
  %123 = zext i8 %122 to i16
  %124 = or disjoint i16 %120, %123
  %125 = getelementptr inbounds i8, ptr %91, i64 6
  store i16 %124, ptr %125, align 2, !tbaa !32
  %126 = getelementptr inbounds i8, ptr %.1100, i64 8
  %127 = load i8, ptr %126, align 1, !tbaa !21
  %128 = zext i8 %127 to i16
  %129 = shl nuw i16 %128, 8
  %130 = getelementptr inbounds i8, ptr %.1100, i64 9
  %131 = load i8, ptr %130, align 1, !tbaa !21
  %132 = zext i8 %131 to i16
  %133 = or disjoint i16 %129, %132
  %134 = getelementptr inbounds i8, ptr %91, i64 8
  store i16 %133, ptr %134, align 2, !tbaa !33
  %135 = getelementptr inbounds i8, ptr %.1100, i64 10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %60
  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
  %136 = load ptr, ptr %63, align 8, !tbaa !27
  call void @png_free(ptr noundef %0, ptr noundef %136) #4
  br label %137

137:                                              ; preds = %31, %._crit_edge, %90, %57, %45, %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 1060}
!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, !10, i64 576, !11, i64 584, !11, i64 588, !9, i64 592, !13, i64 600, !11, i64 604, !13, i64 608, !7, i64 610, !7, i64 611, !7, i64 612, !7, i64 613, !7, i64 614, !7, i64 615, !7, i64 616, !7, i64 617, !7, i64 618, !7, i64 619, !7, i64 620, !7, i64 621, !7, i64 622, !7, i64 623, !7, i64 624, !13, i64 626, !7, i64 628, !11, i64 632, !14, i64 636, !14, i64 646, !9, i64 656, !11, i64 664, !11, i64 668, !11, i64 672, !11, i64 676, !9, i64 680, !9, i64 688, !9, i64 696, !9, i64 704, !9, i64 712, !9, i64 720, !15, i64 728, !15, i64 733, !9, i64 744, !14, i64 752, !9, i64 768, !9, i64 776, !9, i64 784, !9, i64 792, !9, i64 800, !9, i64 808, !9, i64 816, !9, i64 824, !9, i64 832, !11, i64 840, !11, i64 844, !10, i64 848, !10, i64 856, !10, i64 864, !10, i64 872, !11, i64 880, !11, i64 884, !9, i64 888, !9, i64 896, !11, i64 904, !7, i64 908, !11, i64 940, !9, i64 944, !9, i64 952, !11, i64 960, !11, i64 964, !9, i64 968, !7, i64 976, !7, i64 977, !13, i64 978, !13, i64 980, !11, i64 984, !7, i64 988, !9, i64 992, !9, i64 1000, !9, i64 1008, !9, i64 1016, !9, i64 1024, !9, i64 1032, !9, i64 1040, !7, i64 1048, !11, i64 1052, !11, i64 1056, !11, i64 1060, !10, i64 1064, !16, i64 1072, !10, i64 1104, !9, i64 1112, !10, i64 1120, !11, i64 1128, !11, i64 1132, !9, i64 1136, !7, i64 1144, !17, i64 1176}
!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