; 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_sPLT_struct = type { ptr, i8, ptr, i32 }
%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_sPLT_entry_struct = type { i16, i16, i16, i16, i16 }

@.str.56 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.62 = 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

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

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

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

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

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

25:                                               ; preds = %20
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load i32, ptr %6, align 4, !tbaa !9
  %28 = call i32 @png_crc_finish(ptr noundef %26, i32 noundef %27)
  store i32 1, ptr %15, align 4
  br label %315

29:                                               ; preds = %20
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.png_struct_def, ptr %30, i32 0, i32 132
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = add i32 %32, -1
  store i32 %33, ptr %31, align 4, !tbaa !11
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %40

35:                                               ; preds = %29
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %36, ptr noundef @.str.56)
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = load i32, ptr %6, align 4, !tbaa !9
  %39 = call i32 @png_crc_finish(ptr noundef %37, i32 noundef %38)
  store i32 1, ptr %15, align 4
  br label %315

40:                                               ; preds = %29
  br label %41

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

47:                                               ; preds = %41
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %48, ptr noundef @.str.57)
  br label %61

49:                                               ; preds = %41
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.png_struct_def, ptr %50, i32 0, i32 13
  %52 = load i32, ptr %51, align 4, !tbaa !21
  %53 = and i32 %52, 4
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %60

55:                                               ; preds = %49
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %56, ptr noundef @.str.58)
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = load i32, ptr %6, align 4, !tbaa !9
  %59 = call i32 @png_crc_finish(ptr noundef %57, i32 noundef %58)
  store i32 1, ptr %15, align 4
  br label %315

60:                                               ; preds = %49
  br label %61

61:                                               ; preds = %60, %47
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.png_struct_def, ptr %63, i32 0, i32 136
  %65 = load ptr, ptr %64, align 8, !tbaa !22
  call void @png_free(ptr noundef %62, ptr noundef %65)
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = add i32 %67, 1
  %69 = zext i32 %68 to i64
  %70 = call ptr @png_malloc(ptr noundef %66, i64 noundef %69)
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.png_struct_def, ptr %71, i32 0, i32 136
  store ptr %70, ptr %72, align 8, !tbaa !22
  %73 = load i32, ptr %6, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  store i64 %74, ptr %14, align 8, !tbaa !23
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.png_struct_def, ptr %76, i32 0, i32 136
  %78 = load ptr, ptr %77, align 8, !tbaa !22
  %79 = load i64, ptr %14, align 8, !tbaa !23
  call void @png_crc_read(ptr noundef %75, ptr noundef %78, i64 noundef %79)
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load i32, ptr %13, 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 %91

84:                                               ; preds = %61
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.png_struct_def, ptr %86, i32 0, i32 136
  %88 = load ptr, ptr %87, align 8, !tbaa !22
  call void @png_free(ptr noundef %85, ptr noundef %88)
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.png_struct_def, ptr %89, i32 0, i32 136
  store ptr null, ptr %90, align 8, !tbaa !22
  store i32 1, ptr %15, align 4
  br label %315

91:                                               ; preds = %61
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.png_struct_def, ptr %92, i32 0, i32 136
  %94 = load ptr, ptr %93, align 8, !tbaa !22
  %95 = load i64, ptr %14, align 8, !tbaa !23
  %96 = getelementptr inbounds i8, ptr %94, i64 %95
  store i8 0, ptr %96, align 1, !tbaa !24
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.png_struct_def, ptr %97, i32 0, i32 136
  %99 = load ptr, ptr %98, align 8, !tbaa !22
  store ptr %99, ptr %7, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %105, %91
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = load i8, ptr %101, align 1, !tbaa !24
  %103 = icmp ne i8 %102, 0
  br i1 %103, label %104, label %108

104:                                              ; preds = %100
  br label %105

105:                                              ; preds = %104
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i32 1
  store ptr %107, ptr %7, align 8, !tbaa !5
  br label %100, !llvm.loop !25

108:                                              ; preds = %100
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i32 1
  store ptr %110, ptr %7, align 8, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.png_struct_def, ptr %112, i32 0, i32 136
  %114 = load ptr, ptr %113, align 8, !tbaa !22
  %115 = load i64, ptr %14, align 8, !tbaa !23
  %116 = getelementptr inbounds i8, ptr %114, i64 %115
  %117 = getelementptr inbounds i8, ptr %116, i64 -2
  %118 = icmp ugt ptr %111, %117
  br i1 %118, label %119, label %127

119:                                              ; preds = %108
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.png_struct_def, ptr %121, i32 0, i32 136
  %123 = load ptr, ptr %122, align 8, !tbaa !22
  call void @png_free(ptr noundef %120, ptr noundef %123)
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.png_struct_def, ptr %124, i32 0, i32 136
  store ptr null, ptr %125, align 8, !tbaa !22
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %126, ptr noundef @.str.59)
  store i32 1, ptr %15, align 4
  br label %315

127:                                              ; preds = %108
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds i8, ptr %128, i32 1
  store ptr %129, ptr %7, align 8, !tbaa !5
  %130 = load i8, ptr %128, align 1, !tbaa !24
  %131 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 1
  store i8 %130, ptr %131, align 8, !tbaa !27
  %132 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 1
  %133 = load i8, ptr %132, align 8, !tbaa !27
  %134 = zext i8 %133 to i32
  %135 = icmp eq i32 %134, 8
  %136 = zext i1 %135 to i64
  %137 = select i1 %135, i32 6, i32 10
  store i32 %137, ptr %11, align 4, !tbaa !9
  %138 = load i64, ptr %14, align 8, !tbaa !23
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.png_struct_def, ptr %140, i32 0, i32 136
  %142 = load ptr, ptr %141, align 8, !tbaa !22
  %143 = ptrtoint ptr %139 to i64
  %144 = ptrtoint ptr %142 to i64
  %145 = sub i64 %143, %144
  %146 = sub i64 %138, %145
  %147 = trunc i64 %146 to i32
  store i32 %147, ptr %10, align 4, !tbaa !9
  %148 = load i32, ptr %10, align 4, !tbaa !9
  %149 = load i32, ptr %11, align 4, !tbaa !9
  %150 = srem i32 %148, %149
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %160

152:                                              ; preds = %127
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.png_struct_def, ptr %154, i32 0, i32 136
  %156 = load ptr, ptr %155, align 8, !tbaa !22
  call void @png_free(ptr noundef %153, ptr noundef %156)
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.png_struct_def, ptr %157, i32 0, i32 136
  store ptr null, ptr %158, align 8, !tbaa !22
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %159, ptr noundef @.str.60)
  store i32 1, ptr %15, align 4
  br label %315

160:                                              ; preds = %127
  %161 = load i32, ptr %10, align 4, !tbaa !9
  %162 = load i32, ptr %11, align 4, !tbaa !9
  %163 = sdiv i32 %161, %162
  %164 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 3
  store i32 %163, ptr %164, align 8, !tbaa !29
  %165 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 3
  %166 = load i32, ptr %165, align 8, !tbaa !29
  %167 = icmp ugt i32 %166, -1717986919
  br i1 %167, label %168, label %170

168:                                              ; preds = %160
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %169, ptr noundef @.str.61)
  store i32 1, ptr %15, align 4
  br label %315

170:                                              ; preds = %160
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 3
  %173 = load i32, ptr %172, align 8, !tbaa !29
  %174 = sext i32 %173 to i64
  %175 = mul i64 %174, 10
  %176 = call ptr @png_malloc_warn(ptr noundef %171, i64 noundef %175)
  %177 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 2
  store ptr %176, ptr %177, align 8, !tbaa !30
  %178 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 2
  %179 = load ptr, ptr %178, align 8, !tbaa !30
  %180 = icmp eq ptr %179, null
  br i1 %180, label %181, label %183

181:                                              ; preds = %170
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %182, ptr noundef @.str.62)
  store i32 1, ptr %15, align 4
  br label %315

183:                                              ; preds = %170
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %296, %183
  %185 = load i32, ptr %12, align 4, !tbaa !9
  %186 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 3
  %187 = load i32, ptr %186, align 8, !tbaa !29
  %188 = icmp slt i32 %185, %187
  br i1 %188, label %189, label %299

189:                                              ; preds = %184
  %190 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 2
  %191 = load ptr, ptr %190, align 8, !tbaa !30
  %192 = load i32, ptr %12, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %191, i64 %193
  store ptr %194, ptr %9, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 1
  %196 = load i8, ptr %195, align 8, !tbaa !27
  %197 = zext i8 %196 to i32
  %198 = icmp eq i32 %197, 8
  br i1 %198, label %199, label %224

199:                                              ; preds = %189
  %200 = load ptr, ptr %7, align 8, !tbaa !5
  %201 = getelementptr inbounds i8, ptr %200, i32 1
  store ptr %201, ptr %7, align 8, !tbaa !5
  %202 = load i8, ptr %200, align 1, !tbaa !24
  %203 = zext i8 %202 to i16
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %204, i32 0, i32 0
  store i16 %203, ptr %205, align 2, !tbaa !31
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = getelementptr inbounds i8, ptr %206, i32 1
  store ptr %207, ptr %7, align 8, !tbaa !5
  %208 = load i8, ptr %206, align 1, !tbaa !24
  %209 = zext i8 %208 to i16
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %210, i32 0, i32 1
  store i16 %209, ptr %211, align 2, !tbaa !33
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = getelementptr inbounds i8, ptr %212, i32 1
  store ptr %213, ptr %7, align 8, !tbaa !5
  %214 = load i8, ptr %212, align 1, !tbaa !24
  %215 = zext i8 %214 to i16
  %216 = load ptr, ptr %9, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %216, i32 0, i32 2
  store i16 %215, ptr %217, align 2, !tbaa !34
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = getelementptr inbounds i8, ptr %218, i32 1
  store ptr %219, ptr %7, align 8, !tbaa !5
  %220 = load i8, ptr %218, align 1, !tbaa !24
  %221 = zext i8 %220 to i16
  %222 = load ptr, ptr %9, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %222, i32 0, i32 3
  store i16 %221, ptr %223, align 2, !tbaa !35
  br label %281

224:                                              ; preds = %189
  %225 = load ptr, ptr %7, align 8, !tbaa !5
  %226 = load i8, ptr %225, align 1, !tbaa !24
  %227 = zext i8 %226 to i32
  %228 = shl i32 %227, 8
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  %230 = getelementptr inbounds i8, ptr %229, i64 1
  %231 = load i8, ptr %230, align 1, !tbaa !24
  %232 = zext i8 %231 to i32
  %233 = add i32 %228, %232
  %234 = trunc i32 %233 to i16
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %235, i32 0, i32 0
  store i16 %234, ptr %236, align 2, !tbaa !31
  %237 = load ptr, ptr %7, align 8, !tbaa !5
  %238 = getelementptr inbounds i8, ptr %237, i64 2
  store ptr %238, ptr %7, align 8, !tbaa !5
  %239 = load ptr, ptr %7, align 8, !tbaa !5
  %240 = load i8, ptr %239, align 1, !tbaa !24
  %241 = zext i8 %240 to i32
  %242 = shl i32 %241, 8
  %243 = load ptr, ptr %7, align 8, !tbaa !5
  %244 = getelementptr inbounds i8, ptr %243, i64 1
  %245 = load i8, ptr %244, align 1, !tbaa !24
  %246 = zext i8 %245 to i32
  %247 = add i32 %242, %246
  %248 = trunc i32 %247 to i16
  %249 = load ptr, ptr %9, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %249, i32 0, i32 1
  store i16 %248, ptr %250, align 2, !tbaa !33
  %251 = load ptr, ptr %7, align 8, !tbaa !5
  %252 = getelementptr inbounds i8, ptr %251, i64 2
  store ptr %252, ptr %7, align 8, !tbaa !5
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  %254 = load i8, ptr %253, align 1, !tbaa !24
  %255 = zext i8 %254 to i32
  %256 = shl i32 %255, 8
  %257 = load ptr, ptr %7, align 8, !tbaa !5
  %258 = getelementptr inbounds i8, ptr %257, i64 1
  %259 = load i8, ptr %258, align 1, !tbaa !24
  %260 = zext i8 %259 to i32
  %261 = add i32 %256, %260
  %262 = trunc i32 %261 to i16
  %263 = load ptr, ptr %9, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %263, i32 0, i32 2
  store i16 %262, ptr %264, align 2, !tbaa !34
  %265 = load ptr, ptr %7, align 8, !tbaa !5
  %266 = getelementptr inbounds i8, ptr %265, i64 2
  store ptr %266, ptr %7, align 8, !tbaa !5
  %267 = load ptr, ptr %7, align 8, !tbaa !5
  %268 = load i8, ptr %267, align 1, !tbaa !24
  %269 = zext i8 %268 to i32
  %270 = shl i32 %269, 8
  %271 = load ptr, ptr %7, align 8, !tbaa !5
  %272 = getelementptr inbounds i8, ptr %271, i64 1
  %273 = load i8, ptr %272, align 1, !tbaa !24
  %274 = zext i8 %273 to i32
  %275 = add i32 %270, %274
  %276 = trunc i32 %275 to i16
  %277 = load ptr, ptr %9, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %277, i32 0, i32 3
  store i16 %276, ptr %278, align 2, !tbaa !35
  %279 = load ptr, ptr %7, align 8, !tbaa !5
  %280 = getelementptr inbounds i8, ptr %279, i64 2
  store ptr %280, ptr %7, align 8, !tbaa !5
  br label %281

281:                                              ; preds = %224, %199
  %282 = load ptr, ptr %7, align 8, !tbaa !5
  %283 = load i8, ptr %282, align 1, !tbaa !24
  %284 = zext i8 %283 to i32
  %285 = shl i32 %284, 8
  %286 = load ptr, ptr %7, align 8, !tbaa !5
  %287 = getelementptr inbounds i8, ptr %286, i64 1
  %288 = load i8, ptr %287, align 1, !tbaa !24
  %289 = zext i8 %288 to i32
  %290 = add i32 %285, %289
  %291 = trunc i32 %290 to i16
  %292 = load ptr, ptr %9, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.png_sPLT_entry_struct, ptr %292, i32 0, i32 4
  store i16 %291, ptr %293, align 2, !tbaa !36
  %294 = load ptr, ptr %7, align 8, !tbaa !5
  %295 = getelementptr inbounds i8, ptr %294, i64 2
  store ptr %295, ptr %7, align 8, !tbaa !5
  br label %296

296:                                              ; preds = %281
  %297 = load i32, ptr %12, align 4, !tbaa !9
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %12, align 4, !tbaa !9
  br label %184, !llvm.loop !37

299:                                              ; preds = %184
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.png_struct_def, ptr %300, i32 0, i32 136
  %302 = load ptr, ptr %301, align 8, !tbaa !22
  %303 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 0
  store ptr %302, ptr %303, align 8, !tbaa !38
  %304 = load ptr, ptr %4, align 8, !tbaa !5
  %305 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_set_sPLT(ptr noundef %304, ptr noundef %305, ptr noundef %8, i32 noundef 1)
  %306 = load ptr, ptr %4, align 8, !tbaa !5
  %307 = load ptr, ptr %4, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.png_struct_def, ptr %307, i32 0, i32 136
  %309 = load ptr, ptr %308, align 8, !tbaa !22
  call void @png_free(ptr noundef %306, ptr noundef %309)
  %310 = load ptr, ptr %4, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.png_struct_def, ptr %310, i32 0, i32 136
  store ptr null, ptr %311, align 8, !tbaa !22
  %312 = load ptr, ptr %4, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.png_sPLT_struct, ptr %8, i32 0, i32 2
  %314 = load ptr, ptr %313, align 8, !tbaa !30
  call void @png_free(ptr noundef %312, ptr noundef %314)
  store i32 0, ptr %15, align 4
  br label %315

315:                                              ; preds = %299, %181, %168, %152, %119, %84, %55, %35, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  %316 = load i32, ptr %15, align 4
  switch i32 %316, label %318 [
    i32 0, label %317
    i32 1, label %317
  ]

317:                                              ; preds = %315, %315
  ret void

318:                                              ; preds = %315
  unreachable
}

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

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 }

!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 = !{!28, !7, i64 8}
!28 = !{!"png_sPLT_struct", !6, i64 0, !7, i64 8, !6, i64 16, !10, i64 24}
!29 = !{!28, !10, i64 24}
!30 = !{!28, !6, i64 16}
!31 = !{!32, !16, i64 0}
!32 = !{!"png_sPLT_entry_struct", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8}
!33 = !{!32, !16, i64 2}
!34 = !{!32, !16, i64 4}
!35 = !{!32, !16, i64 6}
!36 = !{!32, !16, i64 8}
!37 = distinct !{!37, !26}
!38 = !{!28, !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.56 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.62 = 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

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

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

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

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

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

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
  %.not97 = icmp eq i32 %17, 0
  br i1 %.not97, label %18, label %19

18:                                               ; preds = %14
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.57) #3
  br label %23

19:                                               ; preds = %14
  %20 = and i32 %16, 4
  %.not98 = icmp eq i32 %20, 0
  br i1 %.not98, label %23, label %21

21:                                               ; preds = %19
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.58) #3
  %22 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  br label %141

23:                                               ; preds = %19, %18
  %24 = getelementptr inbounds i8, ptr %0, i64 1160
  %25 = load ptr, ptr %24, align 8, !tbaa !20
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %25) #3
  %26 = add i32 %2, 1
  %27 = zext i32 %26 to i64
  %28 = tail call ptr @png_malloc(ptr noundef nonnull %0, i64 noundef %27) #3
  store ptr %28, ptr %24, align 8, !tbaa !20
  %29 = zext i32 %2 to i64
  tail call void @png_crc_read(ptr noundef nonnull %0, ptr noundef %28, i64 noundef %29)
  %30 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef 0)
  %.not99 = icmp eq i32 %30, 0
  %31 = load ptr, ptr %24, align 8, !tbaa !20
  br i1 %.not99, label %33, label %32

32:                                               ; preds = %23
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %31) #3
  store ptr null, ptr %24, align 8, !tbaa !20
  br label %141

33:                                               ; preds = %23
  %34 = getelementptr inbounds i8, ptr %31, i64 %29
  store i8 0, ptr %34, align 1, !tbaa !21
  %35 = load ptr, ptr %24, align 8, !tbaa !20
  br label %36

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

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

43:                                               ; preds = %39
  tail call void @png_free(ptr noundef %0, ptr noundef %35) #3
  store ptr null, ptr %24, align 8, !tbaa !20
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.59) #3
  br label %141

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

56:                                               ; preds = %44
  tail call void @png_free(ptr noundef %0, ptr noundef %35) #3
  store ptr null, ptr %24, align 8, !tbaa !20
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.60) #3
  br label %141

57:                                               ; preds = %44
  %58 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 %55, ptr %58, align 8, !tbaa !26
  %59 = icmp ugt i32 %55, -1717986919
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.61) #3
  br label %141

61:                                               ; preds = %57
  %62 = zext nneg i32 %55 to i64
  %63 = mul nuw nsw i64 %62, 10
  %64 = tail call ptr @png_malloc_warn(ptr noundef %0, i64 noundef %63) #3
  %65 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %64, ptr %65, align 8, !tbaa !27
  %66 = icmp eq ptr %64, null
  br i1 %66, label %92, label %.preheader

.preheader:                                       ; preds = %61
  %.not = icmp eq i32 %55, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

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

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

92:                                               ; preds = %61
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.62) #3
  br label %141

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

141:                                              ; preds = %._crit_edge, %92, %60, %56, %43, %32, %21, %12, %7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  ret void
}

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

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 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 = !{!25, !7, i64 8}
!25 = !{!"png_sPLT_struct", !9, i64 0, !7, i64 8, !9, i64 16, !10, i64 24}
!26 = !{!25, !10, i64 24}
!27 = !{!25, !9, i64 16}
!28 = !{!29, !14, i64 0}
!29 = !{!"png_sPLT_entry_struct", !14, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!30 = !{!29, !14, i64 2}
!31 = !{!29, !14, i64 4}
!32 = !{!29, !14, i64 6}
!33 = !{!29, !14, 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,SROAPass,SimplifyCFGPass,TailCallElimPass