; LLVM IR from EyalAr/lwip :: src/lib/png (png)

; 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, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i32, i32, i32, i32, %struct.z_stream_s, i32, i32, i32, i32, i64, i32, i32, i32, ptr, ptr, i64, i32, i32, ptr, i16, i32, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, i32, %struct.png_color_16_struct, %struct.png_color_16_struct, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_color_8_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i64, i64, i64, i32, i32, ptr, ptr, i8, [29 x i8], i32, ptr, ptr, i32, i32, ptr, i8, i8, i16, i16, i32, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, i32, i32, i64, %struct.png_unknown_chunk_t, i64, ptr, i64, i32, i32, ptr, [4 x ptr], %struct.png_colorspace }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }
%struct.png_color_8_struct = type { i8, i8, i8, i8, i8 }
%struct.png_color_16_struct = type { i8, i16, i16, i16, i16 }
%struct.png_unknown_chunk_t = type { [5 x i8], ptr, i64, i8 }
%struct.png_colorspace = type { i32, %struct.png_xy, %struct.png_XYZ, i16, i16 }
%struct.png_xy = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.png_XYZ = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }

@.str.46 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: noreturn
declare void @png_error(ptr noundef, ptr noundef) #0

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

; 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
define dso_local void @png_check_IHDR(ptr noalias noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7) #2 {
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store i32 %2, ptr %11, align 4, !tbaa !9
  store i32 %3, ptr %12, align 4, !tbaa !9
  store i32 %4, ptr %13, align 4, !tbaa !9
  store i32 %5, ptr %14, align 4, !tbaa !9
  store i32 %6, ptr %15, align 4, !tbaa !9
  store i32 %7, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  store i32 0, ptr %17, align 4, !tbaa !9
  %18 = load i32, ptr %10, align 4, !tbaa !9
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %22

20:                                               ; preds = %8
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %20, %8
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = icmp ugt i32 %23, 2147483647
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %25, %22
  %28 = load i32, ptr %10, align 4, !tbaa !9
  %29 = add i32 %28, 7
  %30 = and i32 %29, -8
  %31 = zext i32 %30 to i64
  %32 = call i32 @png_gt(i64 noundef %31, i64 noundef 2305843009213693944)
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %36

34:                                               ; preds = %27
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %36

36:                                               ; preds = %34, %27
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.png_struct_def, ptr %38, i32 0, i32 106
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = icmp ugt i32 %37, %40
  br i1 %41, label %42, label %44

42:                                               ; preds = %36
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %42, %36
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %49

47:                                               ; preds = %44
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %47, %44
  %50 = load i32, ptr %11, align 4, !tbaa !9
  %51 = icmp ugt i32 %50, 2147483647
  br i1 %51, label %52, label %54

52:                                               ; preds = %49
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %52, %49
  %55 = load i32, ptr %11, align 4, !tbaa !9
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.png_struct_def, ptr %56, i32 0, i32 107
  %58 = load i32, ptr %57, align 8, !tbaa !22
  %59 = icmp ugt i32 %55, %58
  br i1 %59, label %60, label %62

60:                                               ; preds = %54
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %60, %54
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = icmp ne i32 %63, 1
  br i1 %64, label %65, label %79

65:                                               ; preds = %62
  %66 = load i32, ptr %12, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 2
  br i1 %67, label %68, label %79

68:                                               ; preds = %65
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = icmp ne i32 %69, 4
  br i1 %70, label %71, label %79

71:                                               ; preds = %68
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = icmp ne i32 %72, 8
  br i1 %73, label %74, label %79

74:                                               ; preds = %71
  %75 = load i32, ptr %12, align 4, !tbaa !9
  %76 = icmp ne i32 %75, 16
  br i1 %76, label %77, label %79

77:                                               ; preds = %74
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %77, %74, %71, %68, %65, %62
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %91, label %82

82:                                               ; preds = %79
  %83 = load i32, ptr %13, align 4, !tbaa !9
  %84 = icmp eq i32 %83, 1
  br i1 %84, label %91, label %85

85:                                               ; preds = %82
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = icmp eq i32 %86, 5
  br i1 %87, label %91, label %88

88:                                               ; preds = %85
  %89 = load i32, ptr %13, align 4, !tbaa !9
  %90 = icmp sgt i32 %89, 6
  br i1 %90, label %91, label %93

91:                                               ; preds = %88, %85, %82, %79
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %91, %88
  %94 = load i32, ptr %13, align 4, !tbaa !9
  %95 = icmp eq i32 %94, 3
  br i1 %95, label %96, label %99

96:                                               ; preds = %93
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = icmp sgt i32 %97, 8
  br i1 %98, label %111, label %99

99:                                               ; preds = %96, %93
  %100 = load i32, ptr %13, align 4, !tbaa !9
  %101 = icmp eq i32 %100, 2
  br i1 %101, label %108, label %102

102:                                              ; preds = %99
  %103 = load i32, ptr %13, align 4, !tbaa !9
  %104 = icmp eq i32 %103, 4
  br i1 %104, label %108, label %105

105:                                              ; preds = %102
  %106 = load i32, ptr %13, align 4, !tbaa !9
  %107 = icmp eq i32 %106, 6
  br i1 %107, label %108, label %113

108:                                              ; preds = %105, %102, %99
  %109 = load i32, ptr %12, align 4, !tbaa !9
  %110 = icmp slt i32 %109, 8
  br i1 %110, label %111, label %113

111:                                              ; preds = %108, %96
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %111, %108, %105
  %114 = load i32, ptr %14, align 4, !tbaa !9
  %115 = icmp sge i32 %114, 2
  br i1 %115, label %116, label %118

116:                                              ; preds = %113
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %116, %113
  %119 = load i32, ptr %15, align 4, !tbaa !9
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %123

121:                                              ; preds = %118
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %121, %118
  %124 = load ptr, ptr %9, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.png_struct_def, ptr %124, i32 0, i32 13
  %126 = load i32, ptr %125, align 4, !tbaa !23
  %127 = and i32 %126, 4096
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %136

129:                                              ; preds = %123
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.png_struct_def, ptr %130, i32 0, i32 96
  %132 = load i32, ptr %131, align 8, !tbaa !24
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %136

134:                                              ; preds = %129
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  br label %136

136:                                              ; preds = %134, %129, %123
  %137 = load i32, ptr %16, align 4, !tbaa !9
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %171

139:                                              ; preds = %136
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.png_struct_def, ptr %140, i32 0, i32 96
  %142 = load i32, ptr %141, align 8, !tbaa !24
  %143 = and i32 %142, 4
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %160

145:                                              ; preds = %139
  %146 = load i32, ptr %16, align 4, !tbaa !9
  %147 = icmp eq i32 %146, 64
  br i1 %147, label %148, label %160

148:                                              ; preds = %145
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.png_struct_def, ptr %149, i32 0, i32 13
  %151 = load i32, ptr %150, align 4, !tbaa !23
  %152 = and i32 %151, 4096
  %153 = icmp eq i32 %152, 0
  br i1 %153, label %154, label %160

154:                                              ; preds = %148
  %155 = load i32, ptr %13, align 4, !tbaa !9
  %156 = icmp eq i32 %155, 2
  br i1 %156, label %162, label %157

157:                                              ; preds = %154
  %158 = load i32, ptr %13, align 4, !tbaa !9
  %159 = icmp eq i32 %158, 6
  br i1 %159, label %162, label %160

160:                                              ; preds = %157, %148, %145, %139
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %160, %157, %154
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.png_struct_def, ptr %163, i32 0, i32 13
  %165 = load i32, ptr %164, align 4, !tbaa !23
  %166 = and i32 %165, 4096
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %170

168:                                              ; preds = %162
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %168, %162
  br label %171

171:                                              ; preds = %170, %136
  %172 = load i32, ptr %17, align 4, !tbaa !9
  %173 = icmp eq i32 %172, 1
  br i1 %173, label %174, label %176

174:                                              ; preds = %171
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  call void @png_error(ptr noundef %175, ptr noundef @.str.46) #4
  unreachable

176:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #3
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden i32 @png_gt(i64 noundef, i64 noundef) #2

attributes #0 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }
attributes #4 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 932}
!12 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !13, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !7, i64 280, !7, i64 281, !10, i64 284, !10, i64 288, !10, i64 292, !10, i64 296, !14, i64 304, !10, i64 416, !10, i64 420, !10, i64 424, !10, i64 428, !13, i64 432, !10, i64 440, !10, i64 444, !10, i64 448, !6, i64 456, !6, i64 464, !13, i64 472, !10, i64 480, !10, i64 484, !6, i64 488, !15, i64 496, !10, i64 500, !15, i64 504, !7, i64 506, !7, i64 507, !7, i64 508, !7, i64 509, !7, i64 510, !7, i64 511, !7, i64 512, !7, i64 513, !7, i64 514, !7, i64 515, !7, i64 516, !7, i64 517, !7, i64 518, !15, i64 520, !7, i64 522, !10, i64 524, !16, i64 528, !16, i64 538, !10, i64 548, !10, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584, !6, i64 592, !6, i64 600, !17, i64 608, !17, i64 613, !6, i64 624, !16, i64 632, !6, i64 648, !6, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !10, i64 720, !10, i64 724, !13, i64 728, !13, i64 736, !13, i64 744, !13, i64 752, !10, i64 760, !10, i64 764, !6, i64 768, !6, i64 776, !7, i64 784, !7, i64 785, !10, i64 816, !6, i64 824, !6, i64 832, !10, i64 840, !10, i64 844, !6, i64 848, !7, i64 856, !7, i64 857, !15, i64 858, !15, i64 860, !10, i64 864, !7, i64 868, !6, i64 872, !6, i64 880, !6, i64 888, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !7, i64 928, !10, i64 932, !10, i64 936, !10, i64 940, !13, i64 944, !18, i64 952, !13, i64 984, !6, i64 992, !13, i64 1000, !10, i64 1008, !10, i64 1012, !6, i64 1016, !7, i64 1024, !19, i64 1056}
!13 = !{!"long", !7, i64 0}
!14 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !13, i64 16, !6, i64 24, !10, i64 32, !13, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !13, i64 96, !13, i64 104}
!15 = !{!"short", !7, i64 0}
!16 = !{!"png_color_16_struct", !7, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !15, i64 8}
!17 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!18 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !13, i64 16, !7, i64 24}
!19 = !{!"png_colorspace", !10, i64 0, !20, i64 4, !21, i64 36, !15, i64 72, !15, i64 74}
!20 = !{!"png_xy", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!21 = !{!"png_XYZ", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!22 = !{!12, !10, i64 936}
!23 = !{!12, !10, i64 284}
!24 = !{!12, !10, i64 864}


; 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.46 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: noreturn
declare void @png_error(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @png_check_IHDR(ptr noalias noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7) local_unnamed_addr #1 {
  %9 = add i32 %1, 7
  %10 = and i32 %9, -8
  %11 = zext i32 %10 to i64
  %12 = tail call i32 @png_gt(i64 noundef %11, i64 noundef 2305843009213693944)
  %13 = and i32 %4, -5
  %14 = icmp eq i32 %4, 3
  %15 = icmp sgt i32 %3, 8
  %or.cond15 = and i1 %15, %14
  br i1 %or.cond15, label %37, label %16

16:                                               ; preds = %8
  %17 = icmp ugt i32 %4, 6
  %18 = icmp eq i32 %13, 1
  %or.cond13 = or i1 %17, %18
  %.not = icmp ne i32 %12, 0
  %narrow = icmp slt i32 %1, 1
  %narrow91 = or i1 %narrow, %.not
  %19 = getelementptr inbounds i8, ptr %0, i64 932
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = icmp ult i32 %20, %1
  %22 = getelementptr inbounds i8, ptr %0, i64 936
  %23 = load i32, ptr %22, align 8, !tbaa !20
  %24 = icmp ult i32 %23, %2
  %25 = icmp slt i32 %2, 1
  %26 = or i1 %25, %24
  %27 = add i32 %3, -3
  %or.cond = icmp ult i32 %27, -2
  %28 = icmp ne i32 %3, 4
  %or.cond3 = and i1 %28, %or.cond
  %29 = icmp ne i32 %3, 8
  %or.cond5 = and i1 %29, %or.cond3
  %30 = icmp ne i32 %3, 16
  %or.cond7 = and i1 %30, %or.cond5
  %31 = or i1 %or.cond13, %or.cond7
  %32 = select i1 %31, i1 true, i1 %26
  %33 = select i1 %32, i1 true, i1 %21
  %narrow97 = select i1 %33, i1 true, i1 %narrow91
  %.6 = zext i1 %narrow97 to i32
  %34 = icmp eq i32 %4, 4
  %35 = icmp eq i32 %13, 2
  %or.cond19 = or i1 %34, %35
  %36 = icmp slt i32 %3, 8
  %or.cond21 = and i1 %36, %or.cond19
  br i1 %or.cond21, label %37, label %38

37:                                               ; preds = %16, %8
  br label %38

38:                                               ; preds = %16, %37
  %.7 = phi i32 [ 1, %37 ], [ %.6, %16 ]
  %39 = icmp sgt i32 %5, 1
  %spec.select81 = select i1 %39, i32 1, i32 %.7
  %.not76 = icmp eq i32 %6, 0
  %.9 = select i1 %.not76, i32 %spec.select81, i32 1
  %40 = getelementptr inbounds i8, ptr %0, i64 284
  %41 = load i32, ptr %40, align 4, !tbaa !21
  %42 = and i32 %41, 4096
  %.not79 = icmp eq i32 %7, 0
  br i1 %.not79, label %select.unfold, label %43

43:                                               ; preds = %38
  %44 = getelementptr inbounds i8, ptr %0, i64 864
  %45 = load i32, ptr %44, align 8, !tbaa !22
  %46 = and i32 %45, 4
  %47 = icmp ne i32 %46, 0
  %48 = icmp eq i32 %7, 64
  %or.cond23 = and i1 %48, %47
  br i1 %or.cond23, label %49, label %.thread

49:                                               ; preds = %43
  %50 = icmp ne i32 %42, 0
  %or.cond25 = icmp ne i32 %13, 2
  %or.cond82.not99 = or i1 %or.cond25, %50
  %51 = icmp ne i32 %.9, 0
  %or.cond90 = select i1 %or.cond82.not99, i1 true, i1 %51
  br i1 %or.cond90, label %.thread, label %52

select.unfold:                                    ; preds = %38
  %.old.not = icmp eq i32 %.9, 0
  br i1 %.old.not, label %52, label %.thread

.thread:                                          ; preds = %49, %43, %select.unfold
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.46) #2
  unreachable

52:                                               ; preds = %49, %select.unfold
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden i32 @png_gt(i64 noundef, i64 noundef) local_unnamed_addr #1

attributes #0 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 932}
!6 = !{!"png_struct_def", !7, i64 0, !9, i64 200, !9, i64 208, !10, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !9, i64 272, !7, i64 280, !7, i64 281, !11, i64 284, !11, i64 288, !11, i64 292, !11, i64 296, !12, i64 304, !11, i64 416, !11, i64 420, !11, i64 424, !11, i64 428, !10, i64 432, !11, i64 440, !11, i64 444, !11, i64 448, !9, i64 456, !9, i64 464, !10, i64 472, !11, i64 480, !11, i64 484, !9, i64 488, !13, i64 496, !11, i64 500, !13, i64 504, !7, i64 506, !7, i64 507, !7, i64 508, !7, i64 509, !7, i64 510, !7, i64 511, !7, i64 512, !7, i64 513, !7, i64 514, !7, i64 515, !7, i64 516, !7, i64 517, !7, i64 518, !13, i64 520, !7, i64 522, !11, i64 524, !14, i64 528, !14, i64 538, !11, i64 548, !11, i64 552, !9, i64 560, !9, i64 568, !9, i64 576, !9, i64 584, !9, i64 592, !9, i64 600, !15, i64 608, !15, i64 613, !9, i64 624, !14, i64 632, !9, i64 648, !9, i64 656, !9, i64 664, !9, i64 672, !9, i64 680, !9, i64 688, !9, i64 696, !9, i64 704, !9, i64 712, !11, i64 720, !11, i64 724, !10, i64 728, !10, i64 736, !10, i64 744, !10, i64 752, !11, i64 760, !11, i64 764, !9, i64 768, !9, i64 776, !7, i64 784, !7, i64 785, !11, i64 816, !9, i64 824, !9, i64 832, !11, i64 840, !11, i64 844, !9, i64 848, !7, i64 856, !7, i64 857, !13, i64 858, !13, i64 860, !11, i64 864, !7, i64 868, !9, i64 872, !9, i64 880, !9, i64 888, !9, i64 896, !9, i64 904, !9, i64 912, !9, i64 920, !7, i64 928, !11, i64 932, !11, i64 936, !11, i64 940, !10, i64 944, !16, i64 952, !10, i64 984, !9, i64 992, !10, i64 1000, !11, i64 1008, !11, i64 1012, !9, i64 1016, !7, i64 1024, !17, i64 1056}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!"z_stream_s", !9, i64 0, !11, i64 8, !10, i64 16, !9, i64 24, !11, i64 32, !10, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !11, i64 88, !10, i64 96, !10, i64 104}
!13 = !{!"short", !7, i64 0}
!14 = !{!"png_color_16_struct", !7, i64 0, !13, i64 2, !13, i64 4, !13, i64 6, !13, i64 8}
!15 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!16 = !{!"png_unknown_chunk_t", !7, i64 0, !9, i64 8, !10, i64 16, !7, i64 24}
!17 = !{!"png_colorspace", !11, i64 0, !18, i64 4, !19, i64 36, !13, i64 72, !13, i64 74}
!18 = !{!"png_xy", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!19 = !{!"png_XYZ", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!20 = !{!6, !11, i64 936}
!21 = !{!6, !11, i64 284}
!22 = !{!6, !11, i64 864}


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