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

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

%struct.png_struct_def = type { [1 x %struct.__jmp_buf_tag], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, 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 }
%struct.png_info_struct = type { i64, i64, i64, i64, ptr, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, [8 x i8], float, i8, i32, i32, ptr, %struct.png_time_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, %struct.png_color_16_struct, i64, i64, i8, i64, i64, i8, ptr, float, float, float, float, float, float, float, float, ptr, i64, i64, ptr, ptr, i8, i8, i64, ptr, i64, ptr, ptr, i64, i8, ptr, i64, i8, double, double, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.png_time_struct = type { i16, i8, i8, i8, i8, i8 }

@.str.27 = external hidden unnamed_addr constant [56 x i8], align 1
@stderr = external global ptr, align 8
@.str.39 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [29 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, i64 noundef) #2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
define dso_local void @png_handle_sRGB(ptr noundef %0, ptr noundef %1, i64 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca [1 x i8], align 1
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.png_struct_def, ptr %11, i32 0, i32 12
  %13 = load i64, ptr %12, align 8, !tbaa !11
  %14 = and i64 %13, 1
  %15 = icmp ne i64 %14, 0
  br i1 %15, label %18, label %16

16:                                               ; preds = %3
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %17, ptr noundef @.str.42)
  br label %39

18:                                               ; preds = %3
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.png_struct_def, ptr %19, i32 0, i32 12
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = and i64 %21, 4
  %23 = icmp ne i64 %22, 0
  br i1 %23, label %24, label %29

24:                                               ; preds = %18
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %25, ptr noundef @.str.43)
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = load i64, ptr %6, align 8, !tbaa !9
  %28 = call i32 @png_crc_finish(ptr noundef %26, i64 noundef %27)
  store i32 1, ptr %9, align 4
  br label %199

29:                                               ; preds = %18
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.png_struct_def, ptr %30, i32 0, i32 12
  %32 = load i64, ptr %31, align 8, !tbaa !11
  %33 = and i64 %32, 2
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %35, label %37

35:                                               ; preds = %29
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %36, ptr noundef @.str.44)
  br label %37

37:                                               ; preds = %35, %29
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38, %16
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %53

42:                                               ; preds = %39
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.png_info_struct, ptr %43, i32 0, i32 2
  %45 = load i64, ptr %44, align 8, !tbaa !21
  %46 = and i64 %45, 2048
  %47 = icmp ne i64 %46, 0
  br i1 %47, label %48, label %53

48:                                               ; preds = %42
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %49, ptr noundef @.str.45)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load i64, ptr %6, align 8, !tbaa !9
  %52 = call i32 @png_crc_finish(ptr noundef %50, i64 noundef %51)
  store i32 1, ptr %9, align 4
  br label %199

53:                                               ; preds = %42, %39
  %54 = load i64, ptr %6, align 8, !tbaa !9
  %55 = icmp ne i64 %54, 1
  br i1 %55, label %56, label %61

56:                                               ; preds = %53
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %57, ptr noundef @.str.46)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load i64, ptr %6, align 8, !tbaa !9
  %60 = call i32 @png_crc_finish(ptr noundef %58, i64 noundef %59)
  store i32 1, ptr %9, align 4
  br label %199

61:                                               ; preds = %53
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds [1 x i8], ptr %8, i64 0, i64 0
  call void @png_crc_read(ptr noundef %62, ptr noundef %63, i64 noundef 1)
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = call i32 @png_crc_finish(ptr noundef %64, i64 noundef 0)
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %61
  store i32 1, ptr %9, align 4
  br label %199

68:                                               ; preds = %61
  %69 = getelementptr inbounds [1 x i8], ptr %8, i64 0, i64 0
  %70 = load i8, ptr %69, align 1, !tbaa !25
  %71 = zext i8 %70 to i32
  store i32 %71, ptr %7, align 4, !tbaa !26
  %72 = load i32, ptr %7, align 4, !tbaa !26
  %73 = icmp sge i32 %72, 4
  br i1 %73, label %74, label %76

74:                                               ; preds = %68
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %75, ptr noundef @.str.47)
  store i32 1, ptr %9, align 4
  br label %199

76:                                               ; preds = %68
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %103

79:                                               ; preds = %76
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.png_info_struct, ptr %80, i32 0, i32 2
  %82 = load i64, ptr %81, align 8, !tbaa !21
  %83 = and i64 %82, 1
  %84 = icmp ne i64 %83, 0
  br i1 %84, label %85, label %103

85:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.png_info_struct, ptr %86, i32 0, i32 63
  %88 = load i64, ptr %87, align 8, !tbaa !27
  store i64 %88, ptr %10, align 8, !tbaa !9
  %89 = load i64, ptr %10, align 8, !tbaa !9
  %90 = icmp slt i64 %89, 45000
  br i1 %90, label %94, label %91

91:                                               ; preds = %85
  %92 = load i64, ptr %10, align 8, !tbaa !9
  %93 = icmp sgt i64 %92, 46000
  br i1 %93, label %94, label %102

94:                                               ; preds = %91, %85
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %95, ptr noundef @.str.27)
  %96 = load ptr, ptr @stderr, align 8, !tbaa !5
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.png_struct_def, ptr %97, i32 0, i32 119
  %99 = load i64, ptr %98, align 8, !tbaa !28
  %100 = trunc i64 %99 to i32
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.48, i32 noundef %100) #4
  br label %102

102:                                              ; preds = %94, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %103

103:                                              ; preds = %102, %79, %76
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = icmp ne ptr %104, null
  br i1 %105, label %106, label %195

106:                                              ; preds = %103
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.png_info_struct, ptr %107, i32 0, i32 2
  %109 = load i64, ptr %108, align 8, !tbaa !21
  %110 = and i64 %109, 4
  %111 = icmp ne i64 %110, 0
  br i1 %111, label %112, label %195

112:                                              ; preds = %106
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.png_info_struct, ptr %113, i32 0, i32 64
  %115 = load i64, ptr %114, align 8, !tbaa !29
  %116 = icmp slt i64 %115, 30270
  br i1 %116, label %192, label %117

117:                                              ; preds = %112
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.png_info_struct, ptr %118, i32 0, i32 64
  %120 = load i64, ptr %119, align 8, !tbaa !29
  %121 = icmp sgt i64 %120, 32270
  br i1 %121, label %192, label %122

122:                                              ; preds = %117
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.png_info_struct, ptr %123, i32 0, i32 65
  %125 = load i64, ptr %124, align 8, !tbaa !30
  %126 = icmp slt i64 %125, 31900
  br i1 %126, label %192, label %127

127:                                              ; preds = %122
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.png_info_struct, ptr %128, i32 0, i32 65
  %130 = load i64, ptr %129, align 8, !tbaa !30
  %131 = icmp sgt i64 %130, 33900
  br i1 %131, label %192, label %132

132:                                              ; preds = %127
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.png_info_struct, ptr %133, i32 0, i32 66
  %135 = load i64, ptr %134, align 8, !tbaa !31
  %136 = icmp slt i64 %135, 63000
  br i1 %136, label %192, label %137

137:                                              ; preds = %132
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.png_info_struct, ptr %138, i32 0, i32 66
  %140 = load i64, ptr %139, align 8, !tbaa !31
  %141 = icmp sgt i64 %140, 65000
  br i1 %141, label %192, label %142

142:                                              ; preds = %137
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.png_info_struct, ptr %143, i32 0, i32 67
  %145 = load i64, ptr %144, align 8, !tbaa !32
  %146 = icmp slt i64 %145, 32000
  br i1 %146, label %192, label %147

147:                                              ; preds = %142
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.png_info_struct, ptr %148, i32 0, i32 67
  %150 = load i64, ptr %149, align 8, !tbaa !32
  %151 = icmp sgt i64 %150, 34000
  br i1 %151, label %192, label %152

152:                                              ; preds = %147
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.png_info_struct, ptr %153, i32 0, i32 68
  %155 = load i64, ptr %154, align 8, !tbaa !33
  %156 = icmp slt i64 %155, 29000
  br i1 %156, label %192, label %157

157:                                              ; preds = %152
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.png_info_struct, ptr %158, i32 0, i32 68
  %160 = load i64, ptr %159, align 8, !tbaa !33
  %161 = icmp sgt i64 %160, 31000
  br i1 %161, label %192, label %162

162:                                              ; preds = %157
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.png_info_struct, ptr %163, i32 0, i32 69
  %165 = load i64, ptr %164, align 8, !tbaa !34
  %166 = icmp slt i64 %165, 59000
  br i1 %166, label %192, label %167

167:                                              ; preds = %162
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.png_info_struct, ptr %168, i32 0, i32 69
  %170 = load i64, ptr %169, align 8, !tbaa !34
  %171 = icmp sgt i64 %170, 61000
  br i1 %171, label %192, label %172

172:                                              ; preds = %167
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.png_info_struct, ptr %173, i32 0, i32 70
  %175 = load i64, ptr %174, align 8, !tbaa !35
  %176 = icmp slt i64 %175, 14000
  br i1 %176, label %192, label %177

177:                                              ; preds = %172
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.png_info_struct, ptr %178, i32 0, i32 70
  %180 = load i64, ptr %179, align 8, !tbaa !35
  %181 = icmp sgt i64 %180, 16000
  br i1 %181, label %192, label %182

182:                                              ; preds = %177
  %183 = load ptr, ptr %5, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.png_info_struct, ptr %183, i32 0, i32 71
  %185 = load i64, ptr %184, align 8, !tbaa !36
  %186 = icmp slt i64 %185, 5000
  br i1 %186, label %192, label %187

187:                                              ; preds = %182
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.png_info_struct, ptr %188, i32 0, i32 71
  %190 = load i64, ptr %189, align 8, !tbaa !36
  %191 = icmp sgt i64 %190, 7000
  br i1 %191, label %192, label %194

192:                                              ; preds = %187, %182, %177, %172, %167, %162, %157, %152, %147, %142, %137, %132, %127, %122, %117, %112
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %193, ptr noundef @.str.39)
  br label %194

194:                                              ; preds = %192, %187
  br label %195

195:                                              ; preds = %194, %106, %103
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = load ptr, ptr %5, align 8, !tbaa !5
  %198 = load i32, ptr %7, align 4, !tbaa !26
  call void @png_set_sRGB_gAMA_and_cHRM(ptr noundef %196, ptr noundef %197, i32 noundef %198)
  store i32 0, ptr %9, align 4
  br label %199

199:                                              ; preds = %195, %74, %67, %56, %48, %24
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %200 = load i32, ptr %9, align 4
  switch i32 %200, label %202 [
    i32 0, label %201
    i32 1, label %201
  ]

201:                                              ; preds = %199, %199
  ret void

202:                                              ; preds = %199
  unreachable
}

declare void @png_set_sRGB_gAMA_and_cHRM(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 "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 }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 280}
!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, !7, i64 272, !7, i64 273, !10, i64 280, !10, i64 288, !10, i64 296, !13, i64 304, !6, i64 416, !10, i64 424, !14, i64 432, !14, i64 436, !14, i64 440, !14, i64 444, !14, 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, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !15, i64 568, !10, i64 592, !10, i64 600, !6, i64 608, !16, i64 616, !16, 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, !16, i64 638, !7, i64 640, !17, i64 644, !18, i64 648, !18, i64 658, !6, i64 672, !10, i64 680, !10, i64 688, !14, i64 696, !17, i64 700, !17, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !19, i64 760, !19, i64 765, !6, i64 776, !18, 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, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !14, i64 920, !14, i64 924, !10, i64 928, !10, 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, !10, i64 1040, !6, i64 1048, !6, i64 1056, !14, i64 1064, !6, i64 1072, !7, i64 1080, !16, i64 1082, !16, i64 1084, !16, i64 1086, !10, i64 1088, !10, i64 1096, !7, i64 1104, !7, i64 1105, !10, i64 1112, !10, 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, !10, i64 1192, !10, i64 1200, !20, i64 1208, !10, i64 1240, !10, i64 1248, !6, i64 1256}
!13 = !{!"z_stream_s", !6, i64 0, !14, i64 8, !10, i64 16, !6, i64 24, !14, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !14, i64 88, !10, i64 96, !10, i64 104}
!14 = !{!"int", !7, i64 0}
!15 = !{!"png_row_info_struct", !10, i64 0, !10, 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, !10, i64 16, !7, i64 24}
!21 = !{!22, !10, i64 16}
!22 = !{!"png_info_struct", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !16, i64 40, !16, i64 42, !7, i64 44, !7, i64 45, !7, i64 46, !7, i64 47, !7, i64 48, !7, i64 49, !7, i64 50, !7, i64 51, !7, i64 52, !17, i64 60, !7, i64 64, !14, i64 68, !14, i64 72, !6, i64 80, !23, i64 88, !19, i64 96, !6, i64 104, !18, i64 112, !18, i64 122, !10, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 168, !7, i64 176, !6, i64 184, !17, i64 192, !17, i64 196, !17, i64 200, !17, i64 204, !17, i64 208, !17, i64 212, !17, i64 216, !17, i64 220, !6, i64 224, !10, i64 232, !10, i64 240, !6, i64 248, !6, i64 256, !7, i64 264, !7, i64 265, !10, i64 272, !6, i64 280, !10, i64 288, !6, i64 296, !6, i64 304, !10, i64 312, !7, i64 320, !6, i64 328, !10, i64 336, !7, i64 344, !24, i64 352, !24, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456}
!23 = !{!"png_time_struct", !16, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6}
!24 = !{!"double", !7, i64 0}
!25 = !{!7, !7, i64 0}
!26 = !{!14, !14, i64 0}
!27 = !{!22, !10, i64 392}
!28 = !{!12, !10, i64 1096}
!29 = !{!22, !10, i64 400}
!30 = !{!22, !10, i64 408}
!31 = !{!22, !10, i64 416}
!32 = !{!22, !10, i64 424}
!33 = !{!22, !10, i64 432}
!34 = !{!22, !10, i64 440}
!35 = !{!22, !10, i64 448}
!36 = !{!22, !10, i64 456}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.27 = external hidden unnamed_addr constant [56 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.39 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [29 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, i64 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @png_handle_sRGB(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca [1 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %0, i64 280
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = and i64 %6, 1
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %8, label %9

8:                                                ; preds = %3
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.42) #4
  br label %16

9:                                                ; preds = %3
  %10 = and i64 %6, 4
  %.not60 = icmp eq i64 %10, 0
  br i1 %.not60, label %13, label %11

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

13:                                               ; preds = %9
  %14 = and i64 %6, 2
  %.not61 = icmp eq i64 %14, 0
  br i1 %.not61, label %16, label %15

15:                                               ; preds = %13
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.44) #4
  br label %16

16:                                               ; preds = %15, %13, %8
  %.not62 = icmp eq ptr %1, null
  br i1 %.not62, label %23, label %17

17:                                               ; preds = %16
  %18 = getelementptr inbounds i8, ptr %1, i64 16
  %19 = load i64, ptr %18, align 8, !tbaa !19
  %20 = and i64 %19, 2048
  %.not63 = icmp eq i64 %20, 0
  br i1 %.not63, label %23, label %21

21:                                               ; preds = %17
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.45) #4
  %22 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i64 noundef %2)
  br label %84

23:                                               ; preds = %17, %16
  %.not64 = icmp eq i64 %2, 1
  br i1 %.not64, label %26, label %24

24:                                               ; preds = %23
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.46) #4
  %25 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i64 noundef %2)
  br label %84

26:                                               ; preds = %23
  call void @png_crc_read(ptr noundef nonnull %0, ptr noundef nonnull %4, i64 noundef 1)
  %27 = call i32 @png_crc_finish(ptr noundef nonnull %0, i64 noundef 0)
  %.not65 = icmp eq i32 %27, 0
  br i1 %.not65, label %28, label %84

28:                                               ; preds = %26
  %29 = load i8, ptr %4, align 1, !tbaa !23
  %30 = zext i8 %29 to i32
  %31 = icmp ugt i8 %29, 3
  br i1 %31, label %32, label %33

32:                                               ; preds = %28
  call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.47) #4
  br label %84

33:                                               ; preds = %28
  br i1 %.not62, label %.critedge, label %34

34:                                               ; preds = %33
  %35 = getelementptr inbounds i8, ptr %1, i64 16
  %36 = load i64, ptr %35, align 8, !tbaa !19
  %37 = and i64 %36, 1
  %.not66 = icmp eq i64 %37, 0
  br i1 %.not66, label %48, label %38

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %1, i64 392
  %40 = load i64, ptr %39, align 8, !tbaa !24
  %41 = add i64 %40, -46001
  %or.cond = icmp ult i64 %41, -1001
  br i1 %or.cond, label %42, label %48

42:                                               ; preds = %38
  call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.27) #4
  %43 = load ptr, ptr @stderr, align 8, !tbaa !25
  %44 = getelementptr inbounds i8, ptr %0, i64 1096
  %45 = load i64, ptr %44, align 8, !tbaa !26
  %46 = trunc i64 %45 to i32
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %43, ptr noundef nonnull @.str.48, i32 noundef %46) #5
  %.pre = load i64, ptr %35, align 8, !tbaa !19
  br label %48

48:                                               ; preds = %34, %38, %42
  %49 = phi i64 [ %36, %34 ], [ %36, %38 ], [ %.pre, %42 ]
  %50 = and i64 %49, 4
  %.not67 = icmp eq i64 %50, 0
  br i1 %.not67, label %.critedge, label %51

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %1, i64 400
  %53 = load i64, ptr %52, align 8, !tbaa !27
  %54 = add i64 %53, -32271
  %or.cond68 = icmp ult i64 %54, -2001
  br i1 %or.cond68, label %83, label %55

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %1, i64 408
  %57 = load i64, ptr %56, align 8, !tbaa !28
  %58 = add i64 %57, -33901
  %or.cond69 = icmp ult i64 %58, -2001
  br i1 %or.cond69, label %83, label %59

59:                                               ; preds = %55
  %60 = getelementptr inbounds i8, ptr %1, i64 416
  %61 = load i64, ptr %60, align 8, !tbaa !29
  %62 = add i64 %61, -65001
  %or.cond70 = icmp ult i64 %62, -2001
  br i1 %or.cond70, label %83, label %63

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %1, i64 424
  %65 = load i64, ptr %64, align 8, !tbaa !30
  %66 = add i64 %65, -34001
  %or.cond71 = icmp ult i64 %66, -2001
  br i1 %or.cond71, label %83, label %67

67:                                               ; preds = %63
  %68 = getelementptr inbounds i8, ptr %1, i64 432
  %69 = load i64, ptr %68, align 8, !tbaa !31
  %70 = add i64 %69, -31001
  %or.cond72 = icmp ult i64 %70, -2001
  br i1 %or.cond72, label %83, label %71

71:                                               ; preds = %67
  %72 = getelementptr inbounds i8, ptr %1, i64 440
  %73 = load i64, ptr %72, align 8, !tbaa !32
  %74 = add i64 %73, -61001
  %or.cond73 = icmp ult i64 %74, -2001
  br i1 %or.cond73, label %83, label %75

75:                                               ; preds = %71
  %76 = getelementptr inbounds i8, ptr %1, i64 448
  %77 = load i64, ptr %76, align 8, !tbaa !33
  %78 = add i64 %77, -16001
  %or.cond74 = icmp ult i64 %78, -2001
  br i1 %or.cond74, label %83, label %79

79:                                               ; preds = %75
  %80 = getelementptr inbounds i8, ptr %1, i64 456
  %81 = load i64, ptr %80, align 8, !tbaa !34
  %82 = add i64 %81, -7001
  %or.cond75 = icmp ult i64 %82, -2001
  br i1 %or.cond75, label %83, label %.critedge

83:                                               ; preds = %79, %75, %71, %67, %63, %59, %55, %51
  call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.39) #4
  br label %.critedge

.critedge:                                        ; preds = %33, %79, %83, %48
  call void @png_set_sRGB_gAMA_and_cHRM(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %30) #4
  br label %84

84:                                               ; preds = %26, %.critedge, %32, %24, %21, %11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  ret void
}

declare void @png_set_sRGB_gAMA_and_cHRM(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 = { nofree nounwind "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 = { cold 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 = !{!20, !10, i64 16}
!20 = !{!"png_info_struct", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !9, i64 32, !14, i64 40, !14, i64 42, !7, i64 44, !7, i64 45, !7, i64 46, !7, i64 47, !7, i64 48, !7, i64 49, !7, i64 50, !7, i64 51, !7, i64 52, !15, i64 60, !7, i64 64, !12, i64 68, !12, i64 72, !9, i64 80, !21, i64 88, !17, i64 96, !9, i64 104, !16, i64 112, !16, i64 122, !10, i64 136, !10, i64 144, !7, i64 152, !10, i64 160, !10, i64 168, !7, i64 176, !9, i64 184, !15, i64 192, !15, i64 196, !15, i64 200, !15, i64 204, !15, i64 208, !15, i64 212, !15, i64 216, !15, i64 220, !9, i64 224, !10, i64 232, !10, i64 240, !9, i64 248, !9, i64 256, !7, i64 264, !7, i64 265, !10, i64 272, !9, i64 280, !10, i64 288, !9, i64 296, !9, i64 304, !10, i64 312, !7, i64 320, !9, i64 328, !10, i64 336, !7, i64 344, !22, i64 352, !22, i64 360, !9, i64 368, !9, i64 376, !9, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456}
!21 = !{!"png_time_struct", !14, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6}
!22 = !{!"double", !7, i64 0}
!23 = !{!7, !7, i64 0}
!24 = !{!20, !10, i64 392}
!25 = !{!9, !9, i64 0}
!26 = !{!6, !10, i64 1096}
!27 = !{!20, !10, i64 400}
!28 = !{!20, !10, i64 408}
!29 = !{!20, !10, i64 416}
!30 = !{!20, !10, i64 424}
!31 = !{!20, !10, i64 432}
!32 = !{!20, !10, i64 440}
!33 = !{!20, !10, i64 448}
!34 = !{!20, !10, i64 456}


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