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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.png_struct_def = type { [1 x %struct.__jmp_buf_tag], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i64, i64, i64, %struct.z_stream_s, ptr, i64, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_row_info_struct, i64, i64, ptr, i16, i16, [5 x i8], i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, float, %struct.png_color_16_struct, %struct.png_color_16_struct, ptr, i64, i64, i32, float, float, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_color_8_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, i32, ptr, i8, i16, i16, i16, i64, i64, i8, i8, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i64, i64, %struct.png_unknown_chunk_t, i64, i64, ptr }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }
%struct.png_row_info_struct = type { i64, i64, i8, i8, i8, i8 }
%struct.png_color_8_struct = type { i8, i8, i8, i8, i8 }
%struct.png_color_16_struct = type { i8, i16, i16, i16, i16 }
%struct.png_unknown_chunk_t = type { [5 x i8], ptr, i64, i8 }

@png_IDAT = external global [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @png_push_read_IDAT(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca [4 x i8], align 1
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.png_struct_def, ptr %7, i32 0, i32 12
  %9 = load i64, ptr %8, align 8, !tbaa !9
  %10 = and i64 %9, 256
  %11 = icmp ne i64 %10, 0
  br i1 %11, label %61, label %12

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.png_struct_def, ptr %13, i32 0, i32 90
  %15 = load i64, ptr %14, align 8, !tbaa !20
  %16 = icmp ult i64 %15, 8
  br i1 %16, label %17, label %19

17:                                               ; preds = %12
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_push_save_buffer(ptr noundef %18)
  store i32 1, ptr %4, align 4
  br label %58

19:                                               ; preds = %12
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds [4 x i8], ptr %3, i64 0, i64 0
  call void @png_push_fill_buffer(ptr noundef %20, ptr noundef %21, i64 noundef 4)
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds [4 x i8], ptr %3, i64 0, i64 0
  %24 = call i64 @png_get_uint_31(ptr noundef %22, ptr noundef %23)
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.png_struct_def, ptr %25, i32 0, i32 86
  store i64 %24, ptr %26, align 8, !tbaa !21
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_reset_crc(ptr noundef %27)
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.png_struct_def, ptr %29, i32 0, i32 43
  %31 = getelementptr inbounds [5 x i8], ptr %30, i64 0, i64 0
  call void @png_crc_read(ptr noundef %28, ptr noundef %31, i64 noundef 4)
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.png_struct_def, ptr %32, i32 0, i32 12
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = or i64 %34, 256
  store i64 %35, ptr %33, align 8, !tbaa !9
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.png_struct_def, ptr %36, i32 0, i32 43
  %38 = getelementptr inbounds [5 x i8], ptr %37, i64 0, i64 0
  %39 = call i32 @memcmp(ptr noundef %38, ptr noundef @png_IDAT, i64 noundef 4) #5
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %52

41:                                               ; preds = %19
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.png_struct_def, ptr %42, i32 0, i32 92
  store i32 1, ptr %43, align 8, !tbaa !22
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.png_struct_def, ptr %44, i32 0, i32 13
  %46 = load i64, ptr %45, align 8, !tbaa !23
  %47 = and i64 %46, 32
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %51, label %49

49:                                               ; preds = %41
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_error(ptr noundef %50, ptr noundef @.str.7)
  br label %51

51:                                               ; preds = %49, %41
  store i32 1, ptr %4, align 4
  br label %58

52:                                               ; preds = %19
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.png_struct_def, ptr %53, i32 0, i32 86
  %55 = load i64, ptr %54, align 8, !tbaa !21
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.png_struct_def, ptr %56, i32 0, i32 38
  store i64 %55, ptr %57, align 8, !tbaa !24
  store i32 0, ptr %4, align 4
  br label %58

58:                                               ; preds = %52, %51, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  %59 = load i32, ptr %4, align 4
  switch i32 %59, label %229 [
    i32 0, label %60
    i32 1, label %228
  ]

60:                                               ; preds = %58
  br label %61

61:                                               ; preds = %60, %1
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.png_struct_def, ptr %62, i32 0, i32 38
  %64 = load i64, ptr %63, align 8, !tbaa !24
  %65 = icmp ne i64 %64, 0
  br i1 %65, label %66, label %133

66:                                               ; preds = %61
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.png_struct_def, ptr %67, i32 0, i32 88
  %69 = load i64, ptr %68, align 8, !tbaa !25
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %71, label %133

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.png_struct_def, ptr %72, i32 0, i32 38
  %74 = load i64, ptr %73, align 8, !tbaa !24
  %75 = load ptr, ptr %2, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.png_struct_def, ptr %75, i32 0, i32 88
  %77 = load i64, ptr %76, align 8, !tbaa !25
  %78 = icmp ult i64 %74, %77
  br i1 %78, label %79, label %91

79:                                               ; preds = %71
  %80 = load ptr, ptr %2, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.png_struct_def, ptr %80, i32 0, i32 38
  %82 = load i64, ptr %81, align 8, !tbaa !24
  store i64 %82, ptr %5, align 8, !tbaa !26
  %83 = load i64, ptr %5, align 8, !tbaa !26
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.png_struct_def, ptr %84, i32 0, i32 38
  %86 = load i64, ptr %85, align 8, !tbaa !24
  %87 = icmp ne i64 %83, %86
  br i1 %87, label %88, label %90

88:                                               ; preds = %79
  %89 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_error(ptr noundef %89, ptr noundef @.str.8)
  br label %90

90:                                               ; preds = %88, %79
  br label %95

91:                                               ; preds = %71
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.png_struct_def, ptr %92, i32 0, i32 88
  %94 = load i64, ptr %93, align 8, !tbaa !25
  store i64 %94, ptr %5, align 8, !tbaa !26
  br label %95

95:                                               ; preds = %91, %90
  %96 = load ptr, ptr %2, align 8, !tbaa !5
  %97 = load ptr, ptr %2, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.png_struct_def, ptr %97, i32 0, i32 82
  %99 = load ptr, ptr %98, align 8, !tbaa !27
  %100 = load i64, ptr %5, align 8, !tbaa !26
  call void @png_calculate_crc(ptr noundef %96, ptr noundef %99, i64 noundef %100)
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.png_struct_def, ptr %101, i32 0, i32 13
  %103 = load i64, ptr %102, align 8, !tbaa !23
  %104 = and i64 %103, 32
  %105 = icmp ne i64 %104, 0
  br i1 %105, label %112, label %106

106:                                              ; preds = %95
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.png_struct_def, ptr %108, i32 0, i32 82
  %110 = load ptr, ptr %109, align 8, !tbaa !27
  %111 = load i64, ptr %5, align 8, !tbaa !26
  call void @png_process_IDAT_data(ptr noundef %107, ptr noundef %110, i64 noundef %111)
  br label %112

112:                                              ; preds = %106, %95
  %113 = load i64, ptr %5, align 8, !tbaa !26
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.png_struct_def, ptr %114, i32 0, i32 38
  %116 = load i64, ptr %115, align 8, !tbaa !24
  %117 = sub i64 %116, %113
  store i64 %117, ptr %115, align 8, !tbaa !24
  %118 = load i64, ptr %5, align 8, !tbaa !26
  %119 = load ptr, ptr %2, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.png_struct_def, ptr %119, i32 0, i32 90
  %121 = load i64, ptr %120, align 8, !tbaa !20
  %122 = sub i64 %121, %118
  store i64 %122, ptr %120, align 8, !tbaa !20
  %123 = load i64, ptr %5, align 8, !tbaa !26
  %124 = load ptr, ptr %2, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.png_struct_def, ptr %124, i32 0, i32 88
  %126 = load i64, ptr %125, align 8, !tbaa !25
  %127 = sub i64 %126, %123
  store i64 %127, ptr %125, align 8, !tbaa !25
  %128 = load i64, ptr %5, align 8, !tbaa !26
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.png_struct_def, ptr %129, i32 0, i32 82
  %131 = load ptr, ptr %130, align 8, !tbaa !27
  %132 = getelementptr inbounds i8, ptr %131, i64 %128
  store ptr %132, ptr %130, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %133

133:                                              ; preds = %112, %66, %61
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.png_struct_def, ptr %134, i32 0, i32 38
  %136 = load i64, ptr %135, align 8, !tbaa !24
  %137 = icmp ne i64 %136, 0
  br i1 %137, label %138, label %205

138:                                              ; preds = %133
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.png_struct_def, ptr %139, i32 0, i32 91
  %141 = load i64, ptr %140, align 8, !tbaa !28
  %142 = icmp ne i64 %141, 0
  br i1 %142, label %143, label %205

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.png_struct_def, ptr %144, i32 0, i32 38
  %146 = load i64, ptr %145, align 8, !tbaa !24
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.png_struct_def, ptr %147, i32 0, i32 91
  %149 = load i64, ptr %148, align 8, !tbaa !28
  %150 = icmp ult i64 %146, %149
  br i1 %150, label %151, label %163

151:                                              ; preds = %143
  %152 = load ptr, ptr %2, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.png_struct_def, ptr %152, i32 0, i32 38
  %154 = load i64, ptr %153, align 8, !tbaa !24
  store i64 %154, ptr %6, align 8, !tbaa !26
  %155 = load i64, ptr %6, align 8, !tbaa !26
  %156 = load ptr, ptr %2, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.png_struct_def, ptr %156, i32 0, i32 38
  %158 = load i64, ptr %157, align 8, !tbaa !24
  %159 = icmp ne i64 %155, %158
  br i1 %159, label %160, label %162

160:                                              ; preds = %151
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_error(ptr noundef %161, ptr noundef @.str.8)
  br label %162

162:                                              ; preds = %160, %151
  br label %167

163:                                              ; preds = %143
  %164 = load ptr, ptr %2, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.png_struct_def, ptr %164, i32 0, i32 91
  %166 = load i64, ptr %165, align 8, !tbaa !28
  store i64 %166, ptr %6, align 8, !tbaa !26
  br label %167

167:                                              ; preds = %163, %162
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = load ptr, ptr %2, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.png_struct_def, ptr %169, i32 0, i32 84
  %171 = load ptr, ptr %170, align 8, !tbaa !29
  %172 = load i64, ptr %6, align 8, !tbaa !26
  call void @png_calculate_crc(ptr noundef %168, ptr noundef %171, i64 noundef %172)
  %173 = load ptr, ptr %2, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.png_struct_def, ptr %173, i32 0, i32 13
  %175 = load i64, ptr %174, align 8, !tbaa !23
  %176 = and i64 %175, 32
  %177 = icmp ne i64 %176, 0
  br i1 %177, label %184, label %178

178:                                              ; preds = %167
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = load ptr, ptr %2, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.png_struct_def, ptr %180, i32 0, i32 84
  %182 = load ptr, ptr %181, align 8, !tbaa !29
  %183 = load i64, ptr %6, align 8, !tbaa !26
  call void @png_process_IDAT_data(ptr noundef %179, ptr noundef %182, i64 noundef %183)
  br label %184

184:                                              ; preds = %178, %167
  %185 = load i64, ptr %6, align 8, !tbaa !26
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.png_struct_def, ptr %186, i32 0, i32 38
  %188 = load i64, ptr %187, align 8, !tbaa !24
  %189 = sub i64 %188, %185
  store i64 %189, ptr %187, align 8, !tbaa !24
  %190 = load i64, ptr %6, align 8, !tbaa !26
  %191 = load ptr, ptr %2, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.png_struct_def, ptr %191, i32 0, i32 90
  %193 = load i64, ptr %192, align 8, !tbaa !20
  %194 = sub i64 %193, %190
  store i64 %194, ptr %192, align 8, !tbaa !20
  %195 = load i64, ptr %6, align 8, !tbaa !26
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.png_struct_def, ptr %196, i32 0, i32 91
  %198 = load i64, ptr %197, align 8, !tbaa !28
  %199 = sub i64 %198, %195
  store i64 %199, ptr %197, align 8, !tbaa !28
  %200 = load i64, ptr %6, align 8, !tbaa !26
  %201 = load ptr, ptr %2, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.png_struct_def, ptr %201, i32 0, i32 84
  %203 = load ptr, ptr %202, align 8, !tbaa !29
  %204 = getelementptr inbounds i8, ptr %203, i64 %200
  store ptr %204, ptr %202, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %205

205:                                              ; preds = %184, %138, %133
  %206 = load ptr, ptr %2, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.png_struct_def, ptr %206, i32 0, i32 38
  %208 = load i64, ptr %207, align 8, !tbaa !24
  %209 = icmp ne i64 %208, 0
  br i1 %209, label %228, label %210

210:                                              ; preds = %205
  %211 = load ptr, ptr %2, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.png_struct_def, ptr %211, i32 0, i32 90
  %213 = load i64, ptr %212, align 8, !tbaa !20
  %214 = icmp ult i64 %213, 4
  br i1 %214, label %215, label %217

215:                                              ; preds = %210
  %216 = load ptr, ptr %2, align 8, !tbaa !5
  call void @png_push_save_buffer(ptr noundef %216)
  br label %228

217:                                              ; preds = %210
  %218 = load ptr, ptr %2, align 8, !tbaa !5
  %219 = call i32 @png_crc_finish(ptr noundef %218, i64 noundef 0)
  %220 = load ptr, ptr %2, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.png_struct_def, ptr %220, i32 0, i32 12
  %222 = load i64, ptr %221, align 8, !tbaa !9
  %223 = and i64 %222, -257
  store i64 %223, ptr %221, align 8, !tbaa !9
  %224 = load ptr, ptr %2, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.png_struct_def, ptr %224, i32 0, i32 12
  %226 = load i64, ptr %225, align 8, !tbaa !9
  %227 = or i64 %226, 8
  store i64 %227, ptr %225, align 8, !tbaa !9
  br label %228

228:                                              ; preds = %217, %215, %205, %58
  ret void

229:                                              ; preds = %58
  unreachable
}

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

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

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

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

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

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

declare void @png_reset_crc(ptr noundef) #2

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

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

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

declare i32 @png_crc_finish(ptr noundef, i64 noundef) #2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 280}
!10 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !7, i64 272, !7, i64 273, !11, i64 280, !11, i64 288, !11, i64 296, !12, i64 304, !6, i64 416, !11, i64 424, !13, i64 432, !13, i64 436, !13, i64 440, !13, i64 444, !13, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !14, i64 568, !11, i64 592, !11, i64 600, !6, i64 608, !15, i64 616, !15, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !15, i64 638, !7, i64 640, !16, i64 644, !17, i64 648, !17, i64 658, !6, i64 672, !11, i64 680, !11, i64 688, !13, i64 696, !16, i64 700, !16, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !18, i64 760, !18, i64 765, !6, i64 776, !17, i64 784, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !6, i64 864, !11, i64 872, !11, i64 880, !11, i64 888, !11, i64 896, !11, i64 904, !11, i64 912, !13, i64 920, !13, i64 924, !11, i64 928, !11, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !7, i64 984, !7, i64 985, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !11, i64 1040, !6, i64 1048, !6, i64 1056, !13, i64 1064, !6, i64 1072, !7, i64 1080, !15, i64 1082, !15, i64 1084, !15, i64 1086, !11, i64 1088, !11, i64 1096, !7, i64 1104, !7, i64 1105, !11, i64 1112, !11, i64 1120, !6, i64 1128, !6, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !6, i64 1168, !6, i64 1176, !7, i64 1184, !11, i64 1192, !11, i64 1200, !19, i64 1208, !11, i64 1240, !11, i64 1248, !6, i64 1256}
!11 = !{!"long", !7, i64 0}
!12 = !{!"z_stream_s", !6, i64 0, !13, i64 8, !11, i64 16, !6, i64 24, !13, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !11, i64 96, !11, i64 104}
!13 = !{!"int", !7, i64 0}
!14 = !{!"png_row_info_struct", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!15 = !{!"short", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"png_color_16_struct", !7, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !15, i64 8}
!18 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!19 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !11, i64 16, !7, i64 24}
!20 = !{!10, !11, i64 904}
!21 = !{!10, !11, i64 872}
!22 = !{!10, !13, i64 920}
!23 = !{!10, !11, i64 288}
!24 = !{!10, !11, i64 592}
!25 = !{!10, !11, i64 888}
!26 = !{!11, !11, i64 0}
!27 = !{!10, !6, i64 840}
!28 = !{!10, !11, i64 912}
!29 = !{!10, !6, i64 856}


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

@png_IDAT = external global [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @png_push_read_IDAT(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [4 x i8], align 1
  %3 = getelementptr inbounds i8, ptr %0, i64 280
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = and i64 %4, 256
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %6, label %._crit_edge

._crit_edge:                                      ; preds = %1
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 592
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !19
  br label %26

6:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 904
  %8 = load i64, ptr %7, align 8, !tbaa !20
  %9 = icmp ult i64 %8, 8
  br i1 %9, label %10, label %11

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

11:                                               ; preds = %6
  call void @png_push_fill_buffer(ptr noundef nonnull %0, ptr noundef nonnull %2, i64 noundef 4)
  %12 = call i64 @png_get_uint_31(ptr noundef nonnull %0, ptr noundef nonnull %2) #5
  %13 = getelementptr inbounds i8, ptr %0, i64 872
  store i64 %12, ptr %13, align 8, !tbaa !21
  call void @png_reset_crc(ptr noundef nonnull %0) #5
  %14 = getelementptr inbounds i8, ptr %0, i64 620
  call void @png_crc_read(ptr noundef nonnull %0, ptr noundef nonnull %14, i64 noundef 4) #5
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = or i64 %15, 256
  store i64 %16, ptr %3, align 8, !tbaa !5
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(4) %14, ptr noundef nonnull dereferenceable(4) @png_IDAT, i64 4)
  %.not76 = icmp eq i32 %bcmp, 0
  br i1 %.not76, label %23, label %17

17:                                               ; preds = %11
  %18 = getelementptr inbounds i8, ptr %0, i64 920
  store i32 1, ptr %18, align 8, !tbaa !22
  %19 = getelementptr inbounds i8, ptr %0, i64 288
  %20 = load i64, ptr %19, align 8, !tbaa !23
  %21 = and i64 %20, 32
  %.not77 = icmp eq i64 %21, 0
  br i1 %.not77, label %22, label %.thread

22:                                               ; preds = %17
  call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.7) #5
  br label %.thread

.thread:                                          ; preds = %10, %22, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %.thread101

23:                                               ; preds = %11
  %24 = load i64, ptr %13, align 8, !tbaa !21
  %25 = getelementptr inbounds i8, ptr %0, i64 592
  store i64 %24, ptr %25, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  br label %26

26:                                               ; preds = %._crit_edge, %23
  %27 = phi i64 [ %.pre, %._crit_edge ], [ %24, %23 ]
  %28 = getelementptr inbounds i8, ptr %0, i64 592
  %.not78 = icmp eq i64 %27, 0
  br i1 %.not78, label %.thread93, label %29

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 888
  %31 = load i64, ptr %30, align 8, !tbaa !24
  %.not79 = icmp eq i64 %31, 0
  br i1 %.not79, label %.thread97, label %32

32:                                               ; preds = %29
  %. = call i64 @llvm.umin.i64(i64 %27, i64 %31)
  %33 = getelementptr inbounds i8, ptr %0, i64 840
  %34 = load ptr, ptr %33, align 8, !tbaa !25
  call void @png_calculate_crc(ptr noundef nonnull %0, ptr noundef %34, i64 noundef %.) #5
  %35 = getelementptr inbounds i8, ptr %0, i64 288
  %36 = load i64, ptr %35, align 8, !tbaa !23
  %37 = and i64 %36, 32
  %.not80 = icmp eq i64 %37, 0
  br i1 %.not80, label %38, label %40

38:                                               ; preds = %32
  %39 = load ptr, ptr %33, align 8, !tbaa !25
  call void @png_process_IDAT_data(ptr noundef nonnull %0, ptr noundef %39, i64 noundef %.)
  br label %40

40:                                               ; preds = %32, %38
  %41 = load i64, ptr %28, align 8, !tbaa !19
  %42 = sub i64 %41, %.
  store i64 %42, ptr %28, align 8, !tbaa !19
  %43 = getelementptr inbounds i8, ptr %0, i64 904
  %44 = load i64, ptr %43, align 8, !tbaa !20
  %45 = sub i64 %44, %.
  store i64 %45, ptr %43, align 8, !tbaa !20
  %46 = load i64, ptr %30, align 8, !tbaa !24
  %47 = sub i64 %46, %.
  store i64 %47, ptr %30, align 8, !tbaa !24
  %48 = load ptr, ptr %33, align 8, !tbaa !25
  %49 = getelementptr inbounds i8, ptr %48, i64 %.
  store ptr %49, ptr %33, align 8, !tbaa !25
  %.not81 = icmp eq i64 %42, 0
  br i1 %.not81, label %.thread93, label %.thread97

.thread97:                                        ; preds = %29, %40
  %.pr100 = phi i64 [ %42, %40 ], [ %27, %29 ]
  %50 = getelementptr inbounds i8, ptr %0, i64 912
  %51 = load i64, ptr %50, align 8, !tbaa !26
  %.not82 = icmp eq i64 %51, 0
  br i1 %.not82, label %.thread101, label %52

52:                                               ; preds = %.thread97
  %.85 = call i64 @llvm.umin.i64(i64 %.pr100, i64 %51)
  %53 = getelementptr inbounds i8, ptr %0, i64 856
  %54 = load ptr, ptr %53, align 8, !tbaa !27
  call void @png_calculate_crc(ptr noundef nonnull %0, ptr noundef %54, i64 noundef %.85) #5
  %55 = getelementptr inbounds i8, ptr %0, i64 288
  %56 = load i64, ptr %55, align 8, !tbaa !23
  %57 = and i64 %56, 32
  %.not83 = icmp eq i64 %57, 0
  br i1 %.not83, label %58, label %60

58:                                               ; preds = %52
  %59 = load ptr, ptr %53, align 8, !tbaa !27
  call void @png_process_IDAT_data(ptr noundef nonnull %0, ptr noundef %59, i64 noundef %.85)
  br label %60

60:                                               ; preds = %52, %58
  %61 = load i64, ptr %28, align 8, !tbaa !19
  %62 = sub i64 %61, %.85
  store i64 %62, ptr %28, align 8, !tbaa !19
  %63 = getelementptr inbounds i8, ptr %0, i64 904
  %64 = load <2 x i64>, ptr %63, align 8, !tbaa !28
  %65 = insertelement <2 x i64> poison, i64 %.85, i64 0
  %66 = shufflevector <2 x i64> %65, <2 x i64> poison, <2 x i32> zeroinitializer
  %67 = sub <2 x i64> %64, %66
  store <2 x i64> %67, ptr %63, align 8, !tbaa !28
  %68 = load ptr, ptr %53, align 8, !tbaa !27
  %69 = getelementptr inbounds i8, ptr %68, i64 %.85
  store ptr %69, ptr %53, align 8, !tbaa !27
  %70 = icmp eq i64 %61, %.85
  br i1 %70, label %.thread93, label %.thread101

.thread93:                                        ; preds = %26, %40, %60
  %71 = getelementptr inbounds i8, ptr %0, i64 904
  %72 = load i64, ptr %71, align 8, !tbaa !20
  %73 = icmp ult i64 %72, 4
  br i1 %73, label %74, label %75

74:                                               ; preds = %.thread93
  call void @png_push_save_buffer(ptr noundef nonnull %0)
  br label %.thread101

75:                                               ; preds = %.thread93
  %76 = call i32 @png_crc_finish(ptr noundef nonnull %0, i64 noundef 0) #5
  %77 = load i64, ptr %3, align 8, !tbaa !5
  %78 = and i64 %77, -265
  %79 = or disjoint i64 %78, 8
  store i64 %79, ptr %3, align 8, !tbaa !5
  br label %.thread101

.thread101:                                       ; preds = %.thread97, %.thread, %75, %74, %60
  ret void
}

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

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

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

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

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

declare i64 @png_get_uint_31(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @png_reset_crc(ptr noundef) local_unnamed_addr #2

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

declare void @png_calculate_crc(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @png_crc_finish(ptr noundef, i64 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #4

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind willreturn memory(argmem: read) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 280}
!6 = !{!"png_struct_def", !7, i64 0, !9, i64 200, !9, i64 208, !9, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !7, i64 272, !7, i64 273, !10, i64 280, !10, i64 288, !10, i64 296, !11, i64 304, !9, i64 416, !10, i64 424, !12, i64 432, !12, i64 436, !12, i64 440, !12, i64 444, !12, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !9, i64 520, !9, i64 528, !9, i64 536, !9, i64 544, !9, i64 552, !9, i64 560, !13, i64 568, !10, i64 592, !10, i64 600, !9, i64 608, !14, i64 616, !14, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !14, i64 638, !7, i64 640, !15, i64 644, !16, i64 648, !16, i64 658, !9, i64 672, !10, i64 680, !10, i64 688, !12, i64 696, !15, i64 700, !15, i64 704, !9, i64 712, !9, i64 720, !9, i64 728, !9, i64 736, !9, i64 744, !9, i64 752, !17, i64 760, !17, i64 765, !9, i64 776, !16, i64 784, !9, i64 800, !9, i64 808, !9, i64 816, !9, i64 824, !9, i64 832, !9, i64 840, !9, i64 848, !9, i64 856, !9, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !12, i64 920, !12, i64 924, !10, i64 928, !10, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !9, i64 968, !9, i64 976, !7, i64 984, !7, i64 985, !9, i64 992, !9, i64 1000, !9, i64 1008, !9, i64 1016, !9, i64 1024, !9, i64 1032, !10, i64 1040, !9, i64 1048, !9, i64 1056, !12, i64 1064, !9, i64 1072, !7, i64 1080, !14, i64 1082, !14, i64 1084, !14, i64 1086, !10, i64 1088, !10, i64 1096, !7, i64 1104, !7, i64 1105, !10, i64 1112, !10, i64 1120, !9, i64 1128, !9, i64 1136, !9, i64 1144, !9, i64 1152, !9, i64 1160, !9, i64 1168, !9, i64 1176, !7, i64 1184, !10, i64 1192, !10, i64 1200, !18, i64 1208, !10, i64 1240, !10, i64 1248, !9, i64 1256}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!"z_stream_s", !9, i64 0, !12, i64 8, !10, i64 16, !9, i64 24, !12, i64 32, !10, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !12, i64 88, !10, i64 96, !10, i64 104}
!12 = !{!"int", !7, i64 0}
!13 = !{!"png_row_info_struct", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!17 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!18 = !{!"png_unknown_chunk_t", !7, i64 0, !9, i64 8, !10, i64 16, !7, i64 24}
!19 = !{!6, !10, i64 592}
!20 = !{!6, !10, i64 904}
!21 = !{!6, !10, i64 872}
!22 = !{!6, !12, i64 920}
!23 = !{!6, !10, i64 288}
!24 = !{!6, !10, i64 888}
!25 = !{!6, !9, i64 840}
!26 = !{!6, !10, i64 912}
!27 = !{!6, !9, i64 856}
!28 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass