; 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_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_info_struct = type { i32, i32, i32, 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, i32, i32, i8, i32, i32, i8, ptr, float, float, float, float, float, float, float, float, ptr, i32, i32, ptr, ptr, i8, i8, i32, ptr, i64, ptr, ptr, i32, i8, ptr, i32, i8, double, double, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.png_time_struct = type { i16, i8, i8, i8, i8, i8 }

@.str.24 = external hidden unnamed_addr constant [56 x i8], align 1
@stderr = external global ptr, align 8
@.str.36 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.45 = 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, i32 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, i32 noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca [1 x i8], align 1
  %9 = alloca i32, align 4
  %10 = 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 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 13
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %14 = and i32 %13, 1
  %15 = icmp ne i32 %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.39)
  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 13
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = and i32 %21, 4
  %23 = icmp ne i32 %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.40)
  %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 %9, align 4
  br label %204

29:                                               ; preds = %18
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.png_struct_def, ptr %30, i32 0, i32 13
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = and i32 %32, 2
  %34 = icmp ne i32 %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.41)
  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 i32, ptr %44, align 8, !tbaa !21
  %46 = and i32 %45, 2048
  %47 = icmp ne i32 %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.42)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = call i32 @png_crc_finish(ptr noundef %50, i32 noundef %51)
  store i32 1, ptr %9, align 4
  br label %204

53:                                               ; preds = %42, %39
  %54 = load i32, ptr %6, align 4, !tbaa !9
  %55 = icmp ne i32 %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.43)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = call i32 @png_crc_finish(ptr noundef %58, i32 noundef %59)
  store i32 1, ptr %9, align 4
  br label %204

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, i32 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 %204

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 !9
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %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.44)
  store i32 1, ptr %9, align 4
  br label %204

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

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 i32, ptr %81, align 8, !tbaa !21
  %83 = and i32 %82, 1
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %104

85:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, 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 i32, ptr %87, align 8, !tbaa !26
  store i32 %88, ptr %10, align 4, !tbaa !9
  %89 = load i32, ptr %10, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = icmp slt i64 %90, 45000
  br i1 %91, label %96, label %92

92:                                               ; preds = %85
  %93 = load i32, ptr %10, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = icmp sgt i64 %94, 46000
  br i1 %95, label %96, label %103

96:                                               ; preds = %92, %85
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %97, ptr noundef @.str.24)
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.png_struct_def, ptr %99, i32 0, i32 120
  %101 = load i32, ptr %100, align 4, !tbaa !27
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %98, ptr noundef @.str.45, i32 noundef %101) #4
  br label %103

103:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %104

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

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

113:                                              ; preds = %107
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.png_info_struct, ptr %114, i32 0, i32 64
  %116 = load i32, ptr %115, align 4, !tbaa !28
  %117 = icmp slt i32 %116, 30270
  br i1 %117, label %197, label %118

118:                                              ; preds = %113
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.png_info_struct, ptr %119, i32 0, i32 64
  %121 = load i32, ptr %120, align 4, !tbaa !28
  %122 = icmp sgt i32 %121, 32270
  br i1 %122, label %197, label %123

123:                                              ; preds = %118
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.png_info_struct, ptr %124, i32 0, i32 65
  %126 = load i32, ptr %125, align 8, !tbaa !29
  %127 = icmp slt i32 %126, 31900
  br i1 %127, label %197, label %128

128:                                              ; preds = %123
  %129 = load ptr, ptr %5, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.png_info_struct, ptr %129, i32 0, i32 65
  %131 = load i32, ptr %130, align 8, !tbaa !29
  %132 = icmp sgt i32 %131, 33900
  br i1 %132, label %197, label %133

133:                                              ; preds = %128
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.png_info_struct, ptr %134, i32 0, i32 66
  %136 = load i32, ptr %135, align 4, !tbaa !30
  %137 = sext i32 %136 to i64
  %138 = icmp slt i64 %137, 63000
  br i1 %138, label %197, label %139

139:                                              ; preds = %133
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.png_info_struct, ptr %140, i32 0, i32 66
  %142 = load i32, ptr %141, align 4, !tbaa !30
  %143 = sext i32 %142 to i64
  %144 = icmp sgt i64 %143, 65000
  br i1 %144, label %197, label %145

145:                                              ; preds = %139
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.png_info_struct, ptr %146, i32 0, i32 67
  %148 = load i32, ptr %147, align 8, !tbaa !31
  %149 = icmp slt i32 %148, 32000
  br i1 %149, label %197, label %150

150:                                              ; preds = %145
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.png_info_struct, ptr %151, i32 0, i32 67
  %153 = load i32, ptr %152, align 8, !tbaa !31
  %154 = icmp sgt i32 %153, 34000
  br i1 %154, label %197, label %155

155:                                              ; preds = %150
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.png_info_struct, ptr %156, i32 0, i32 68
  %158 = load i32, ptr %157, align 4, !tbaa !32
  %159 = icmp slt i32 %158, 29000
  br i1 %159, label %197, label %160

160:                                              ; preds = %155
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.png_info_struct, ptr %161, i32 0, i32 68
  %163 = load i32, ptr %162, align 4, !tbaa !32
  %164 = icmp sgt i32 %163, 31000
  br i1 %164, label %197, label %165

165:                                              ; preds = %160
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.png_info_struct, ptr %166, i32 0, i32 69
  %168 = load i32, ptr %167, align 8, !tbaa !33
  %169 = sext i32 %168 to i64
  %170 = icmp slt i64 %169, 59000
  br i1 %170, label %197, label %171

171:                                              ; preds = %165
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.png_info_struct, ptr %172, i32 0, i32 69
  %174 = load i32, ptr %173, align 8, !tbaa !33
  %175 = sext i32 %174 to i64
  %176 = icmp sgt i64 %175, 61000
  br i1 %176, label %197, label %177

177:                                              ; preds = %171
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.png_info_struct, ptr %178, i32 0, i32 70
  %180 = load i32, ptr %179, align 4, !tbaa !34
  %181 = icmp slt i32 %180, 14000
  br i1 %181, label %197, 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 70
  %185 = load i32, ptr %184, align 4, !tbaa !34
  %186 = icmp sgt i32 %185, 16000
  br i1 %186, label %197, 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 i32, ptr %189, align 8, !tbaa !35
  %191 = icmp slt i32 %190, 5000
  br i1 %191, label %197, label %192

192:                                              ; preds = %187
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.png_info_struct, ptr %193, i32 0, i32 71
  %195 = load i32, ptr %194, align 8, !tbaa !35
  %196 = icmp sgt i32 %195, 7000
  br i1 %196, label %197, label %199

197:                                              ; preds = %192, %187, %182, %177, %171, %165, %160, %155, %150, %145, %139, %133, %128, %123, %118, %113
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_warning(ptr noundef %198, ptr noundef @.str.36)
  br label %199

199:                                              ; preds = %197, %192
  br label %200

200:                                              ; preds = %199, %107, %104
  %201 = load ptr, ptr %4, align 8, !tbaa !5
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = load i32, ptr %7, align 4, !tbaa !9
  call void @png_set_sRGB_gAMA_and_cHRM(ptr noundef %201, ptr noundef %202, i32 noundef %203)
  store i32 0, ptr %9, align 4
  br label %204

204:                                              ; preds = %200, %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
  %205 = load i32, ptr %9, align 4
  switch i32 %205, label %207 [
    i32 0, label %206
    i32 1, label %206
  ]

206:                                              ; preds = %204, %204
  ret void

207:                                              ; preds = %204
  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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 284}
!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 = !{!22, !10, i64 8}
!22 = !{!"png_info_struct", !10, i64 0, !10, i64 4, !10, i64 8, !14, i64 16, !6, i64 24, !16, i64 32, !16, i64 34, !7, i64 36, !7, i64 37, !7, i64 38, !7, i64 39, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 43, !7, i64 44, !17, i64 52, !7, i64 56, !10, i64 60, !10, i64 64, !6, i64 72, !23, i64 80, !19, i64 88, !6, i64 96, !18, i64 104, !18, i64 114, !10, i64 124, !10, i64 128, !7, i64 132, !10, i64 136, !10, i64 140, !7, i64 144, !6, i64 152, !17, i64 160, !17, i64 164, !17, i64 168, !17, i64 172, !17, i64 176, !17, i64 180, !17, i64 184, !17, i64 188, !6, i64 192, !10, i64 200, !10, i64 204, !6, i64 208, !6, i64 216, !7, i64 224, !7, i64 225, !10, i64 228, !6, i64 232, !14, i64 240, !6, i64 248, !6, i64 256, !10, i64 264, !7, i64 268, !6, i64 272, !10, i64 280, !7, i64 284, !24, i64 288, !24, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360}
!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 = !{!22, !10, i64 328}
!27 = !{!12, !10, i64 1036}
!28 = !{!22, !10, i64 332}
!29 = !{!22, !10, i64 336}
!30 = !{!22, !10, i64 340}
!31 = !{!22, !10, i64 344}
!32 = !{!22, !10, i64 348}
!33 = !{!22, !10, i64 352}
!34 = !{!22, !10, i64 356}
!35 = !{!22, !10, i64 360}


; 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.24 = external hidden unnamed_addr constant [56 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.36 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.45 = 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, i32 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, i32 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 284
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %7 = and i32 %6, 1
  %.not = icmp eq i32 %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.39) #4
  br label %16

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

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

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

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

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

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

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

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

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

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, i32 noundef 0)
  %.not66 = icmp eq i32 %27, 0
  br i1 %.not66, label %28, label %83

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.44) #4
  br label %83

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

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

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

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

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

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %1, i64 332
  %52 = load i32, ptr %51, align 4, !tbaa !27
  %53 = add i32 %52, -32271
  %or.cond69 = icmp ult i32 %53, -2001
  br i1 %or.cond69, label %82, label %54

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %1, i64 336
  %56 = load i32, ptr %55, align 8, !tbaa !28
  %57 = add i32 %56, -33901
  %or.cond70 = icmp ult i32 %57, -2001
  br i1 %or.cond70, label %82, label %58

58:                                               ; preds = %54
  %59 = getelementptr inbounds i8, ptr %1, i64 340
  %60 = load i32, ptr %59, align 4, !tbaa !29
  %61 = add i32 %60, -65001
  %or.cond71 = icmp ult i32 %61, -2001
  br i1 %or.cond71, label %82, label %62

62:                                               ; preds = %58
  %63 = getelementptr inbounds i8, ptr %1, i64 344
  %64 = load i32, ptr %63, align 8, !tbaa !30
  %65 = add i32 %64, -34001
  %or.cond72 = icmp ult i32 %65, -2001
  br i1 %or.cond72, label %82, label %66

66:                                               ; preds = %62
  %67 = getelementptr inbounds i8, ptr %1, i64 348
  %68 = load i32, ptr %67, align 4, !tbaa !31
  %69 = add i32 %68, -31001
  %or.cond73 = icmp ult i32 %69, -2001
  br i1 %or.cond73, label %82, label %70

70:                                               ; preds = %66
  %71 = getelementptr inbounds i8, ptr %1, i64 352
  %72 = load i32, ptr %71, align 8, !tbaa !32
  %73 = add i32 %72, -61001
  %or.cond74 = icmp ult i32 %73, -2001
  br i1 %or.cond74, label %82, label %74

74:                                               ; preds = %70
  %75 = getelementptr inbounds i8, ptr %1, i64 356
  %76 = load i32, ptr %75, align 4, !tbaa !33
  %77 = add i32 %76, -16001
  %or.cond75 = icmp ult i32 %77, -2001
  br i1 %or.cond75, label %82, label %78

78:                                               ; preds = %74
  %79 = getelementptr inbounds i8, ptr %1, i64 360
  %80 = load i32, ptr %79, align 8, !tbaa !34
  %81 = add i32 %80, -7001
  %or.cond76 = icmp ult i32 %81, -2001
  br i1 %or.cond76, label %82, label %.critedge

82:                                               ; preds = %78, %74, %70, %66, %62, %58, %54, %50
  call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.36) #4
  br label %.critedge

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

83:                                               ; 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 284}
!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 = !{!20, !10, i64 8}
!20 = !{!"png_info_struct", !10, i64 0, !10, i64 4, !10, i64 8, !12, i64 16, !9, i64 24, !14, i64 32, !14, i64 34, !7, i64 36, !7, i64 37, !7, i64 38, !7, i64 39, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 43, !7, i64 44, !15, i64 52, !7, i64 56, !10, i64 60, !10, i64 64, !9, i64 72, !21, i64 80, !17, i64 88, !9, i64 96, !16, i64 104, !16, i64 114, !10, i64 124, !10, i64 128, !7, i64 132, !10, i64 136, !10, i64 140, !7, i64 144, !9, i64 152, !15, i64 160, !15, i64 164, !15, i64 168, !15, i64 172, !15, i64 176, !15, i64 180, !15, i64 184, !15, i64 188, !9, i64 192, !10, i64 200, !10, i64 204, !9, i64 208, !9, i64 216, !7, i64 224, !7, i64 225, !10, i64 228, !9, i64 232, !12, i64 240, !9, i64 248, !9, i64 256, !10, i64 264, !7, i64 268, !9, i64 272, !10, i64 280, !7, i64 284, !22, i64 288, !22, i64 296, !9, i64 304, !9, i64 312, !9, i64 320, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360}
!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 328}
!25 = !{!9, !9, i64 0}
!26 = !{!6, !10, i64 1036}
!27 = !{!20, !10, i64 332}
!28 = !{!20, !10, i64 336}
!29 = !{!20, !10, i64 340}
!30 = !{!20, !10, i64 344}
!31 = !{!20, !10, i64 348}
!32 = !{!20, !10, i64 352}
!33 = !{!20, !10, i64 356}
!34 = !{!20, !10, i64 360}


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