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

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

%struct.png_struct_def = type { [1 x %struct.__jmp_buf_tag], ptr, ptr, 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.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @png_process_IDAT_data(ptr noalias 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 i32, align 4
  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
  %9 = load i64, ptr %6, align 8, !tbaa !9
  %10 = icmp ugt i64 %9, 0
  br i1 %10, label %11, label %14

11:                                               ; preds = %3
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %16

14:                                               ; preds = %11, %3
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %15, ptr noundef @.str.10) #4
  unreachable

16:                                               ; preds = %11
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.png_struct_def, ptr %18, i32 0, i32 17
  %20 = getelementptr inbounds %struct.z_stream_s, ptr %19, i32 0, i32 0
  store ptr %17, ptr %20, align 8, !tbaa !11
  %21 = load i64, ptr %6, align 8, !tbaa !9
  %22 = trunc i64 %21 to i32
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.png_struct_def, ptr %23, i32 0, i32 17
  %25 = getelementptr inbounds %struct.z_stream_s, ptr %24, i32 0, i32 1
  store i32 %22, ptr %25, align 8, !tbaa !22
  br label %26

26:                                               ; preds = %173, %16
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.png_struct_def, ptr %27, i32 0, i32 17
  %29 = getelementptr inbounds %struct.z_stream_s, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 8, !tbaa !22
  %31 = icmp ugt i32 %30, 0
  br i1 %31, label %32, label %38

32:                                               ; preds = %26
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.png_struct_def, ptr %33, i32 0, i32 14
  %35 = load i32, ptr %34, align 8, !tbaa !23
  %36 = and i32 %35, 8
  %37 = icmp eq i32 %36, 0
  br label %38

38:                                               ; preds = %32, %26
  %39 = phi i1 [ false, %26 ], [ %37, %32 ]
  br i1 %39, label %40, label %174

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.png_struct_def, ptr %41, i32 0, i32 17
  %43 = getelementptr inbounds %struct.z_stream_s, ptr %42, i32 0, i32 4
  %44 = load i32, ptr %43, align 8, !tbaa !24
  %45 = icmp ugt i32 %44, 0
  br i1 %45, label %88, label %46

46:                                               ; preds = %40
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.png_struct_def, ptr %47, i32 0, i32 43
  %49 = load i8, ptr %48, align 2, !tbaa !25
  %50 = zext i8 %49 to i32
  %51 = icmp sge i32 %50, 8
  br i1 %51, label %52, label %63

52:                                               ; preds = %46
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.png_struct_def, ptr %53, i32 0, i32 23
  %55 = load i32, ptr %54, align 8, !tbaa !26
  %56 = zext i32 %55 to i64
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.png_struct_def, ptr %57, i32 0, i32 43
  %59 = load i8, ptr %58, align 2, !tbaa !25
  %60 = zext i8 %59 to i64
  %61 = lshr i64 %60, 3
  %62 = mul i64 %56, %61
  br label %75

63:                                               ; preds = %46
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.png_struct_def, ptr %64, i32 0, i32 23
  %66 = load i32, ptr %65, align 8, !tbaa !26
  %67 = zext i32 %66 to i64
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.png_struct_def, ptr %68, i32 0, i32 43
  %70 = load i8, ptr %69, align 2, !tbaa !25
  %71 = zext i8 %70 to i64
  %72 = mul i64 %67, %71
  %73 = add i64 %72, 7
  %74 = lshr i64 %73, 3
  br label %75

75:                                               ; preds = %63, %52
  %76 = phi i64 [ %62, %52 ], [ %74, %63 ]
  %77 = add i64 %76, 1
  %78 = trunc i64 %77 to i32
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.png_struct_def, ptr %79, i32 0, i32 17
  %81 = getelementptr inbounds %struct.z_stream_s, ptr %80, i32 0, i32 4
  store i32 %78, ptr %81, align 8, !tbaa !24
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.png_struct_def, ptr %82, i32 0, i32 27
  %84 = load ptr, ptr %83, align 8, !tbaa !27
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.png_struct_def, ptr %85, i32 0, i32 17
  %87 = getelementptr inbounds %struct.z_stream_s, ptr %86, i32 0, i32 3
  store ptr %84, ptr %87, align 8, !tbaa !28
  br label %88

88:                                               ; preds = %75, %40
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.png_struct_def, ptr %89, i32 0, i32 17
  %91 = call i32 @inflate(ptr noundef %90, i32 noundef 2)
  store i32 %91, ptr %7, align 4, !tbaa !29
  %92 = load i32, ptr %7, align 4, !tbaa !29
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %122

94:                                               ; preds = %88
  %95 = load i32, ptr %7, align 4, !tbaa !29
  %96 = icmp ne i32 %95, 1
  br i1 %96, label %97, label %122

97:                                               ; preds = %94
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.png_struct_def, ptr %98, i32 0, i32 14
  %100 = load i32, ptr %99, align 8, !tbaa !23
  %101 = or i32 %100, 8
  store i32 %101, ptr %99, align 8, !tbaa !23
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.png_struct_def, ptr %102, i32 0, i32 16
  store i32 0, ptr %103, align 8, !tbaa !30
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.png_struct_def, ptr %104, i32 0, i32 24
  %106 = load i32, ptr %105, align 4, !tbaa !31
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.png_struct_def, ptr %107, i32 0, i32 20
  %109 = load i32, ptr %108, align 8, !tbaa !32
  %110 = icmp uge i32 %106, %109
  br i1 %110, label %117, label %111

111:                                              ; preds = %97
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.png_struct_def, ptr %112, i32 0, i32 38
  %114 = load i8, ptr %113, align 1, !tbaa !33
  %115 = zext i8 %114 to i32
  %116 = icmp sgt i32 %115, 6
  br i1 %116, label %117, label %119

117:                                              ; preds = %111, %97
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  br label %121

119:                                              ; preds = %111
  %120 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %120, ptr noundef @.str.11) #4
  unreachable

121:                                              ; preds = %117
  store i32 1, ptr %8, align 4
  br label %171

122:                                              ; preds = %94, %88
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.png_struct_def, ptr %123, i32 0, i32 17
  %125 = getelementptr inbounds %struct.z_stream_s, ptr %124, i32 0, i32 3
  %126 = load ptr, ptr %125, align 8, !tbaa !28
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.png_struct_def, ptr %127, i32 0, i32 27
  %129 = load ptr, ptr %128, align 8, !tbaa !27
  %130 = icmp ne ptr %126, %129
  br i1 %130, label %131, label %162

131:                                              ; preds = %122
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.png_struct_def, ptr %132, i32 0, i32 24
  %134 = load i32, ptr %133, align 4, !tbaa !31
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.png_struct_def, ptr %135, i32 0, i32 20
  %137 = load i32, ptr %136, align 8, !tbaa !32
  %138 = icmp uge i32 %134, %137
  br i1 %138, label %145, label %139

139:                                              ; preds = %131
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.png_struct_def, ptr %140, i32 0, i32 38
  %142 = load i8, ptr %141, align 1, !tbaa !33
  %143 = zext i8 %142 to i32
  %144 = icmp sgt i32 %143, 6
  br i1 %144, label %145, label %153

145:                                              ; preds = %139, %131
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.png_struct_def, ptr %147, i32 0, i32 14
  %149 = load i32, ptr %148, align 8, !tbaa !23
  %150 = or i32 %149, 8
  store i32 %150, ptr %148, align 8, !tbaa !23
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.png_struct_def, ptr %151, i32 0, i32 16
  store i32 0, ptr %152, align 8, !tbaa !30
  store i32 1, ptr %8, align 4
  br label %171

153:                                              ; preds = %139
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.png_struct_def, ptr %154, i32 0, i32 17
  %156 = getelementptr inbounds %struct.z_stream_s, ptr %155, i32 0, i32 4
  %157 = load i32, ptr %156, align 8, !tbaa !24
  %158 = icmp eq i32 %157, 0
  br i1 %158, label %159, label %161

159:                                              ; preds = %153
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_push_process_row(ptr noundef %160)
  br label %161

161:                                              ; preds = %159, %153
  br label %162

162:                                              ; preds = %161, %122
  %163 = load i32, ptr %7, align 4, !tbaa !29
  %164 = icmp eq i32 %163, 1
  br i1 %164, label %165, label %170

165:                                              ; preds = %162
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.png_struct_def, ptr %166, i32 0, i32 14
  %168 = load i32, ptr %167, align 8, !tbaa !23
  %169 = or i32 %168, 8
  store i32 %169, ptr %167, align 8, !tbaa !23
  br label %170

170:                                              ; preds = %165, %162
  store i32 0, ptr %8, align 4
  br label %171

171:                                              ; preds = %170, %145, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  %172 = load i32, ptr %8, align 4
  switch i32 %172, label %183 [
    i32 0, label %173
    i32 1, label %182
  ]

173:                                              ; preds = %171
  br label %26, !llvm.loop !34

174:                                              ; preds = %38
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.png_struct_def, ptr %175, i32 0, i32 17
  %177 = getelementptr inbounds %struct.z_stream_s, ptr %176, i32 0, i32 1
  %178 = load i32, ptr %177, align 8, !tbaa !22
  %179 = icmp ugt i32 %178, 0
  br i1 %179, label %180, label %182

180:                                              ; preds = %174
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  br label %182

182:                                              ; preds = %180, %174, %171
  ret void

183:                                              ; preds = %171
  unreachable
}

declare i32 @inflate(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @png_push_process_row(ptr noalias noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = { noreturn }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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, !6, i64 304}
!12 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !10, 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, !13, i64 284, !13, i64 288, !13, i64 292, !13, i64 296, !14, i64 304, !13, i64 416, !13, i64 420, !13, i64 424, !13, i64 428, !10, i64 432, !13, i64 440, !13, i64 444, !13, i64 448, !6, i64 456, !6, i64 464, !10, i64 472, !13, i64 480, !13, i64 484, !6, i64 488, !15, i64 496, !13, 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, !13, i64 524, !16, i64 528, !16, i64 538, !13, i64 548, !13, 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, !13, i64 720, !13, i64 724, !10, i64 728, !10, i64 736, !10, i64 744, !10, i64 752, !13, i64 760, !13, i64 764, !6, i64 768, !6, i64 776, !7, i64 784, !7, i64 785, !13, i64 816, !6, i64 824, !6, i64 832, !13, i64 840, !13, i64 844, !6, i64 848, !7, i64 856, !7, i64 857, !15, i64 858, !15, i64 860, !13, 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, !13, i64 932, !13, i64 936, !13, i64 940, !10, i64 944, !18, i64 952, !10, i64 984, !6, i64 992, !10, i64 1000, !13, i64 1008, !13, i64 1012, !6, i64 1016, !7, i64 1024, !19, i64 1056}
!13 = !{!"int", !7, i64 0}
!14 = !{!"z_stream_s", !6, i64 0, !13, i64 8, !10, i64 16, !6, i64 24, !13, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !10, i64 96, !10, 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, !10, i64 16, !7, i64 24}
!19 = !{!"png_colorspace", !13, i64 0, !20, i64 4, !21, i64 36, !15, i64 72, !15, i64 74}
!20 = !{!"png_xy", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!21 = !{!"png_XYZ", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32}
!22 = !{!12, !13, i64 312}
!23 = !{!12, !13, i64 288}
!24 = !{!12, !13, i64 336}
!25 = !{!12, !7, i64 514}
!26 = !{!12, !13, i64 440}
!27 = !{!12, !6, i64 464}
!28 = !{!12, !6, i64 328}
!29 = !{!13, !13, i64 0}
!30 = !{!12, !13, i64 296}
!31 = !{!12, !13, i64 444}
!32 = !{!12, !13, i64 424}
!33 = !{!12, !7, i64 509}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


; 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.10 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [28 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_process_IDAT_data(ptr noalias noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #1 {
  %4 = icmp eq i64 %2, 0
  %5 = icmp eq ptr %1, null
  %or.cond = or i1 %5, %4
  br i1 %or.cond, label %6, label %7

6:                                                ; preds = %3
  tail call void @png_error(ptr noundef %0, ptr noundef nonnull @.str.10) #3
  unreachable

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 304
  store ptr %1, ptr %8, align 8, !tbaa !5
  %9 = trunc i64 %2 to i32
  %10 = getelementptr inbounds i8, ptr %0, i64 312
  store i32 %9, ptr %10, align 8, !tbaa !20
  %.not55 = icmp eq i32 %9, 0
  br i1 %.not55, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 288
  %12 = getelementptr inbounds i8, ptr %0, i64 336
  %13 = getelementptr inbounds i8, ptr %0, i64 514
  %14 = getelementptr inbounds i8, ptr %0, i64 440
  %15 = getelementptr inbounds i8, ptr %0, i64 464
  %16 = getelementptr inbounds i8, ptr %0, i64 328
  %17 = getelementptr inbounds i8, ptr %0, i64 444
  %18 = getelementptr inbounds i8, ptr %0, i64 424
  %19 = getelementptr inbounds i8, ptr %0, i64 509
  br label %20

thread-pre-split:                                 ; preds = %76, %74
  %.pr = load i32, ptr %10, align 8, !tbaa !20
  %.not = icmp eq i32 %.pr, 0
  br i1 %.not, label %.critedge, label %20

20:                                               ; preds = %.lr.ph, %thread-pre-split
  %21 = load i32, ptr %11, align 8, !tbaa !21
  %22 = and i32 %21, 8
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %.critedge

24:                                               ; preds = %20
  %25 = load i32, ptr %12, align 8, !tbaa !22
  %.not48 = icmp eq i32 %25, 0
  br i1 %.not48, label %26, label %45

26:                                               ; preds = %24
  %27 = load i8, ptr %13, align 2, !tbaa !23
  %28 = icmp ugt i8 %27, 7
  %29 = load i32, ptr %14, align 8, !tbaa !24
  %30 = zext i32 %29 to i64
  br i1 %28, label %31, label %35

31:                                               ; preds = %26
  %32 = lshr i8 %27, 3
  %33 = zext nneg i8 %32 to i64
  %34 = mul nuw nsw i64 %30, %33
  br label %40

35:                                               ; preds = %26
  %36 = zext nneg i8 %27 to i64
  %37 = mul nuw nsw i64 %30, %36
  %38 = add nuw nsw i64 %37, 7
  %39 = lshr i64 %38, 3
  br label %40

40:                                               ; preds = %35, %31
  %41 = phi i64 [ %34, %31 ], [ %39, %35 ]
  %42 = trunc i64 %41 to i32
  %43 = add i32 %42, 1
  store i32 %43, ptr %12, align 8, !tbaa !22
  %44 = load ptr, ptr %15, align 8, !tbaa !25
  store ptr %44, ptr %16, align 8, !tbaa !26
  br label %45

45:                                               ; preds = %40, %24
  %46 = tail call i32 @inflate(ptr noundef nonnull %8, i32 noundef 2) #4
  %or.cond3 = icmp ugt i32 %46, 1
  br i1 %or.cond3, label %47, label %57

47:                                               ; preds = %45
  %48 = load i32, ptr %11, align 8, !tbaa !21
  %49 = or i32 %48, 8
  store i32 %49, ptr %11, align 8, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %0, i64 296
  store i32 0, ptr %50, align 8, !tbaa !27
  %51 = load i32, ptr %17, align 4, !tbaa !28
  %52 = load i32, ptr %18, align 8, !tbaa !29
  %.not51 = icmp ult i32 %51, %52
  br i1 %.not51, label %53, label %.critedge

53:                                               ; preds = %47
  %54 = load i8, ptr %19, align 1, !tbaa !30
  %55 = icmp ugt i8 %54, 6
  br i1 %55, label %.critedge, label %56

56:                                               ; preds = %53
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.11) #3
  unreachable

57:                                               ; preds = %45
  %58 = load ptr, ptr %16, align 8, !tbaa !26
  %59 = load ptr, ptr %15, align 8, !tbaa !25
  %.not49 = icmp eq ptr %58, %59
  br i1 %.not49, label %74, label %60

60:                                               ; preds = %57
  %61 = load i32, ptr %17, align 4, !tbaa !28
  %62 = load i32, ptr %18, align 8, !tbaa !29
  %.not50 = icmp ult i32 %61, %62
  br i1 %.not50, label %63, label %66

63:                                               ; preds = %60
  %64 = load i8, ptr %19, align 1, !tbaa !30
  %65 = icmp ugt i8 %64, 6
  br i1 %65, label %66, label %70

66:                                               ; preds = %63, %60
  %67 = load i32, ptr %11, align 8, !tbaa !21
  %68 = or i32 %67, 8
  store i32 %68, ptr %11, align 8, !tbaa !21
  %69 = getelementptr inbounds i8, ptr %0, i64 296
  store i32 0, ptr %69, align 8, !tbaa !27
  br label %.critedge

70:                                               ; preds = %63
  %71 = load i32, ptr %12, align 8, !tbaa !22
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  tail call void @png_push_process_row(ptr noundef nonnull %0)
  br label %74

74:                                               ; preds = %70, %73, %57
  %75 = icmp eq i32 %46, 1
  br i1 %75, label %76, label %thread-pre-split

76:                                               ; preds = %74
  %77 = load i32, ptr %11, align 8, !tbaa !21
  %78 = or i32 %77, 8
  store i32 %78, ptr %11, align 8, !tbaa !21
  br label %thread-pre-split

.critedge:                                        ; preds = %thread-pre-split, %20, %7, %47, %53, %66
  ret void
}

declare i32 @inflate(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @png_push_process_row(ptr noalias 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 = { "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 = { noreturn nounwind }
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, !9, i64 304}
!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 312}
!21 = !{!6, !11, i64 288}
!22 = !{!6, !11, i64 336}
!23 = !{!6, !7, i64 514}
!24 = !{!6, !11, i64 440}
!25 = !{!6, !9, i64 464}
!26 = !{!6, !9, i64 328}
!27 = !{!6, !11, i64 296}
!28 = !{!6, !11, i64 444}
!29 = !{!6, !11, i64 424}
!30 = !{!6, !7, i64 509}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass