; LLVM IR from Try/Tempest :: Engine/thirdparty/libpng (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, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i32, i32, i32, i32, %struct.z_stream_s, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, ptr, ptr, ptr, ptr, i64, i32, i32, ptr, i16, i32, i16, i8, i8, 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, ptr, i32, i32, 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, i32, [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 }
%struct.png_info_def = type { i32, i32, i32, i64, ptr, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, [8 x i8], %struct.png_colorspace, ptr, ptr, i32, 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, i32, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i8, i8, i32, ptr, i32, ptr, i32, i8, ptr, ptr, ptr }
%struct.png_time_struct = type { i16, i8, i8, i8, i8, i8 }

@.str.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 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: nounwind uwtable
declare dso_local void @png_crc_read(ptr noalias noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @png_crc_finish(ptr noalias noundef, i32 noundef) #1

; Function Attrs: noreturn
declare void @png_chunk_error(ptr noundef, ptr noundef) #2

declare void @png_chunk_benign_error(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @png_handle_oFFs(ptr noalias noundef %0, ptr noalias noundef %1, i32 noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [9 x i8], align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = 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 9, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.png_struct_def, ptr %12, i32 0, i32 15
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = and i32 %14, 1
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %19

17:                                               ; preds = %3
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_chunk_error(ptr noundef %18, ptr noundef @.str.7) #5
  unreachable

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

25:                                               ; preds = %19
  %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)
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_chunk_benign_error(ptr noundef %29, ptr noundef @.str.5)
  store i32 1, ptr %11, align 4
  br label %189

30:                                               ; preds = %19
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %44

33:                                               ; preds = %30
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.png_info_def, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !22
  %37 = and i32 %36, 256
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %44

39:                                               ; preds = %33
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = call i32 @png_crc_finish(ptr noundef %40, i32 noundef %41)
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_chunk_benign_error(ptr noundef %43, ptr noundef @.str.8)
  store i32 1, ptr %11, align 4
  br label %189

44:                                               ; preds = %33, %30
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 9
  br i1 %48, label %49, label %54

49:                                               ; preds = %46
  %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)
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_chunk_benign_error(ptr noundef %53, ptr noundef @.str.6)
  store i32 1, ptr %11, align 4
  br label %189

54:                                               ; preds = %46
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  call void @png_crc_read(ptr noundef %55, ptr noundef %56, i32 noundef 9)
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = call i32 @png_crc_finish(ptr noundef %57, i32 noundef 0)
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %54
  store i32 1, ptr %11, align 4
  br label %189

61:                                               ; preds = %54
  %62 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %63 = load i8, ptr %62, align 1, !tbaa !25
  %64 = zext i8 %63 to i32
  %65 = and i32 %64, 128
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %93

67:                                               ; preds = %61
  %68 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %69 = load i8, ptr %68, align 1, !tbaa !25
  %70 = zext i8 %69 to i32
  %71 = shl i32 %70, 24
  %72 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %73 = getelementptr inbounds i8, ptr %72, i64 1
  %74 = load i8, ptr %73, align 1, !tbaa !25
  %75 = zext i8 %74 to i32
  %76 = shl i32 %75, 16
  %77 = add i32 %71, %76
  %78 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %79 = getelementptr inbounds i8, ptr %78, i64 2
  %80 = load i8, ptr %79, align 1, !tbaa !25
  %81 = zext i8 %80 to i32
  %82 = shl i32 %81, 8
  %83 = add i32 %77, %82
  %84 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %85 = getelementptr inbounds i8, ptr %84, i64 3
  %86 = load i8, ptr %85, align 1, !tbaa !25
  %87 = zext i8 %86 to i32
  %88 = add i32 %83, %87
  %89 = xor i32 %88, -1
  %90 = add i32 %89, 1
  %91 = and i32 %90, 2147483647
  %92 = sub nsw i32 0, %91
  br label %115

93:                                               ; preds = %61
  %94 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %95 = load i8, ptr %94, align 1, !tbaa !25
  %96 = zext i8 %95 to i32
  %97 = shl i32 %96, 24
  %98 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %99 = getelementptr inbounds i8, ptr %98, i64 1
  %100 = load i8, ptr %99, align 1, !tbaa !25
  %101 = zext i8 %100 to i32
  %102 = shl i32 %101, 16
  %103 = add i32 %97, %102
  %104 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %105 = getelementptr inbounds i8, ptr %104, i64 2
  %106 = load i8, ptr %105, align 1, !tbaa !25
  %107 = zext i8 %106 to i32
  %108 = shl i32 %107, 8
  %109 = add i32 %103, %108
  %110 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %111 = getelementptr inbounds i8, ptr %110, i64 3
  %112 = load i8, ptr %111, align 1, !tbaa !25
  %113 = zext i8 %112 to i32
  %114 = add i32 %109, %113
  br label %115

115:                                              ; preds = %93, %67
  %116 = phi i32 [ %92, %67 ], [ %114, %93 ]
  store i32 %116, ptr %8, align 4, !tbaa !9
  %117 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %118 = getelementptr inbounds i8, ptr %117, i64 4
  %119 = load i8, ptr %118, align 1, !tbaa !25
  %120 = zext i8 %119 to i32
  %121 = and i32 %120, 128
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %123, label %153

123:                                              ; preds = %115
  %124 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %125 = getelementptr inbounds i8, ptr %124, i64 4
  %126 = load i8, ptr %125, align 1, !tbaa !25
  %127 = zext i8 %126 to i32
  %128 = shl i32 %127, 24
  %129 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %130 = getelementptr inbounds i8, ptr %129, i64 4
  %131 = getelementptr inbounds i8, ptr %130, i64 1
  %132 = load i8, ptr %131, align 1, !tbaa !25
  %133 = zext i8 %132 to i32
  %134 = shl i32 %133, 16
  %135 = add i32 %128, %134
  %136 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %137 = getelementptr inbounds i8, ptr %136, i64 4
  %138 = getelementptr inbounds i8, ptr %137, i64 2
  %139 = load i8, ptr %138, align 1, !tbaa !25
  %140 = zext i8 %139 to i32
  %141 = shl i32 %140, 8
  %142 = add i32 %135, %141
  %143 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %144 = getelementptr inbounds i8, ptr %143, i64 4
  %145 = getelementptr inbounds i8, ptr %144, i64 3
  %146 = load i8, ptr %145, align 1, !tbaa !25
  %147 = zext i8 %146 to i32
  %148 = add i32 %142, %147
  %149 = xor i32 %148, -1
  %150 = add i32 %149, 1
  %151 = and i32 %150, 2147483647
  %152 = sub nsw i32 0, %151
  br label %179

153:                                              ; preds = %115
  %154 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %155 = getelementptr inbounds i8, ptr %154, i64 4
  %156 = load i8, ptr %155, align 1, !tbaa !25
  %157 = zext i8 %156 to i32
  %158 = shl i32 %157, 24
  %159 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %160 = getelementptr inbounds i8, ptr %159, i64 4
  %161 = getelementptr inbounds i8, ptr %160, i64 1
  %162 = load i8, ptr %161, align 1, !tbaa !25
  %163 = zext i8 %162 to i32
  %164 = shl i32 %163, 16
  %165 = add i32 %158, %164
  %166 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %167 = getelementptr inbounds i8, ptr %166, i64 4
  %168 = getelementptr inbounds i8, ptr %167, i64 2
  %169 = load i8, ptr %168, align 1, !tbaa !25
  %170 = zext i8 %169 to i32
  %171 = shl i32 %170, 8
  %172 = add i32 %165, %171
  %173 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 0
  %174 = getelementptr inbounds i8, ptr %173, i64 4
  %175 = getelementptr inbounds i8, ptr %174, i64 3
  %176 = load i8, ptr %175, align 1, !tbaa !25
  %177 = zext i8 %176 to i32
  %178 = add i32 %172, %177
  br label %179

179:                                              ; preds = %153, %123
  %180 = phi i32 [ %152, %123 ], [ %178, %153 ]
  store i32 %180, ptr %9, align 4, !tbaa !9
  %181 = getelementptr inbounds [9 x i8], ptr %7, i64 0, i64 8
  %182 = load i8, ptr %181, align 1, !tbaa !25
  %183 = zext i8 %182 to i32
  store i32 %183, ptr %10, align 4, !tbaa !9
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = load i32, ptr %8, align 4, !tbaa !9
  %187 = load i32, ptr %9, align 4, !tbaa !9
  %188 = load i32, ptr %10, align 4, !tbaa !9
  call void @png_set_oFFs(ptr noundef %184, ptr noundef %185, i32 noundef %186, i32 noundef %187, i32 noundef %188)
  store i32 0, ptr %11, align 4
  br label %189

189:                                              ; preds = %179, %60, %49, %39, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 9, ptr %7) #4
  %190 = load i32, ptr %11, align 4
  switch i32 %190, label %192 [
    i32 0, label %191
    i32 1, label %191
  ]

191:                                              ; preds = %189, %189
  ret void

192:                                              ; preds = %189
  unreachable
}

declare void @png_set_oFFs(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { nounwind }
attributes #5 = { 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 300}
!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, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !14, i64 320, !6, i64 432, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !10, i64 496, !10, i64 500, !10, i64 504, !10, i64 508, !10, i64 512, !10, i64 516, !13, i64 520, !10, i64 528, !10, i64 532, !10, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !13, i64 576, !10, i64 584, !10, i64 588, !6, i64 592, !15, i64 600, !10, i64 604, !15, i64 608, !7, i64 610, !7, i64 611, !7, i64 612, !7, i64 613, !7, i64 614, !7, i64 615, !7, i64 616, !7, i64 617, !7, i64 618, !7, i64 619, !7, i64 620, !7, i64 621, !7, i64 622, !7, i64 623, !7, i64 624, !15, i64 626, !7, i64 628, !10, i64 632, !16, i64 636, !16, i64 646, !6, i64 656, !10, i64 664, !10, i64 668, !10, i64 672, !10, i64 676, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !17, i64 728, !17, i64 733, !6, i64 744, !16, i64 752, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !10, i64 840, !10, i64 844, !13, i64 848, !13, i64 856, !13, i64 864, !13, i64 872, !10, i64 880, !10, i64 884, !6, i64 888, !6, i64 896, !10, i64 904, !7, i64 908, !10, i64 940, !6, i64 944, !6, i64 952, !10, i64 960, !10, i64 964, !6, i64 968, !7, i64 976, !7, i64 977, !15, i64 978, !15, i64 980, !10, i64 984, !7, i64 988, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !7, i64 1048, !10, i64 1052, !10, i64 1056, !10, i64 1060, !13, i64 1064, !18, i64 1072, !13, i64 1104, !6, i64 1112, !13, i64 1120, !10, i64 1128, !10, i64 1132, !6, i64 1136, !7, i64 1144, !19, i64 1176}
!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 = !{!23, !10, i64 8}
!23 = !{!"png_info_def", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !6, i64 24, !15, i64 32, !15, 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, !19, i64 52, !6, i64 128, !6, i64 136, !10, i64 144, !10, i64 148, !10, i64 152, !6, i64 160, !24, i64 168, !17, i64 176, !6, i64 184, !16, i64 192, !16, i64 202, !10, i64 212, !10, i64 216, !7, i64 220, !10, i64 224, !10, i64 228, !7, i64 232, !10, i64 236, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !10, i64 272, !10, i64 276, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !10, i64 300, !6, i64 304, !10, i64 312, !6, i64 320, !10, i64 328, !7, i64 332, !6, i64 336, !6, i64 344, !6, i64 352}
!24 = !{!"png_time_struct", !15, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6}
!25 = !{!7, !7, i64 0}


; 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.5 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [10 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

; 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 noalias noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @png_crc_finish(ptr noalias noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: noreturn
declare void @png_chunk_error(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @png_chunk_benign_error(ptr noundef, ptr noundef) local_unnamed_addr #3

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

9:                                                ; preds = %3
  tail call void @png_chunk_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.7) #5
  unreachable

10:                                               ; preds = %3
  %11 = and i32 %6, 4
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %14, label %12

12:                                               ; preds = %10
  %13 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  tail call void @png_chunk_benign_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.5) #4
  br label %103

14:                                               ; preds = %10
  %.not22 = icmp eq ptr %1, null
  br i1 %.not22, label %21, label %15

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

19:                                               ; preds = %15
  %20 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  tail call void @png_chunk_benign_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.8) #4
  br label %103

21:                                               ; preds = %15, %14
  %.not24 = icmp eq i32 %2, 9
  br i1 %.not24, label %24, label %22

22:                                               ; preds = %21
  %23 = tail call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef %2)
  tail call void @png_chunk_benign_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.6) #4
  br label %103

24:                                               ; preds = %21
  call void @png_crc_read(ptr noundef nonnull %0, ptr noundef nonnull %4, i32 noundef 9)
  %25 = call i32 @png_crc_finish(ptr noundef nonnull %0, i32 noundef 0)
  %.not25 = icmp eq i32 %25, 0
  br i1 %.not25, label %26, label %103

26:                                               ; preds = %24
  %27 = load i8, ptr %4, align 1, !tbaa !23
  %28 = zext i8 %27 to i32
  %.not26 = icmp sgt i8 %27, -1
  br i1 %.not26, label %45, label %29

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %4, i64 1
  %31 = load i8, ptr %30, align 1, !tbaa !23
  %32 = zext i8 %31 to i32
  %.neg27 = mul i32 %32, 2147418112
  %33 = shl nuw i32 %28, 24
  %34 = getelementptr inbounds i8, ptr %4, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !23
  %36 = zext i8 %35 to i32
  %37 = shl nuw nsw i32 %36, 8
  %38 = or disjoint i32 %37, %33
  %39 = getelementptr inbounds i8, ptr %4, i64 3
  %40 = load i8, ptr %39, align 1, !tbaa !23
  %41 = zext i8 %40 to i32
  %42 = or disjoint i32 %38, %41
  %.neg31 = sub i32 %.neg27, %42
  %43 = and i32 %.neg31, 2147483647
  %44 = sub nsw i32 0, %43
  br label %61

45:                                               ; preds = %26
  %46 = shl nuw nsw i32 %28, 24
  %47 = getelementptr inbounds i8, ptr %4, i64 1
  %48 = load i8, ptr %47, align 1, !tbaa !23
  %49 = zext i8 %48 to i32
  %50 = shl nuw nsw i32 %49, 16
  %51 = or disjoint i32 %50, %46
  %52 = getelementptr inbounds i8, ptr %4, i64 2
  %53 = load i8, ptr %52, align 1, !tbaa !23
  %54 = zext i8 %53 to i32
  %55 = shl nuw nsw i32 %54, 8
  %56 = or disjoint i32 %51, %55
  %57 = getelementptr inbounds i8, ptr %4, i64 3
  %58 = load i8, ptr %57, align 1, !tbaa !23
  %59 = zext i8 %58 to i32
  %60 = or disjoint i32 %56, %59
  br label %61

61:                                               ; preds = %45, %29
  %62 = phi i32 [ %44, %29 ], [ %60, %45 ]
  %63 = getelementptr inbounds i8, ptr %4, i64 4
  %64 = load i8, ptr %63, align 1, !tbaa !23
  %65 = zext i8 %64 to i32
  %.not32 = icmp sgt i8 %64, -1
  br i1 %.not32, label %82, label %66

66:                                               ; preds = %61
  %67 = getelementptr inbounds i8, ptr %4, i64 5
  %68 = load i8, ptr %67, align 1, !tbaa !23
  %69 = zext i8 %68 to i32
  %.neg33 = mul i32 %69, 2147418112
  %70 = shl nuw i32 %65, 24
  %71 = getelementptr inbounds i8, ptr %4, i64 6
  %72 = load i8, ptr %71, align 1, !tbaa !23
  %73 = zext i8 %72 to i32
  %74 = shl nuw nsw i32 %73, 8
  %75 = or disjoint i32 %74, %70
  %76 = getelementptr inbounds i8, ptr %4, i64 7
  %77 = load i8, ptr %76, align 1, !tbaa !23
  %78 = zext i8 %77 to i32
  %79 = or disjoint i32 %75, %78
  %.neg37 = sub i32 %.neg33, %79
  %80 = and i32 %.neg37, 2147483647
  %81 = sub nsw i32 0, %80
  br label %98

82:                                               ; preds = %61
  %83 = shl nuw nsw i32 %65, 24
  %84 = getelementptr inbounds i8, ptr %4, i64 5
  %85 = load i8, ptr %84, align 1, !tbaa !23
  %86 = zext i8 %85 to i32
  %87 = shl nuw nsw i32 %86, 16
  %88 = or disjoint i32 %87, %83
  %89 = getelementptr inbounds i8, ptr %4, i64 6
  %90 = load i8, ptr %89, align 1, !tbaa !23
  %91 = zext i8 %90 to i32
  %92 = shl nuw nsw i32 %91, 8
  %93 = or disjoint i32 %88, %92
  %94 = getelementptr inbounds i8, ptr %4, i64 7
  %95 = load i8, ptr %94, align 1, !tbaa !23
  %96 = zext i8 %95 to i32
  %97 = or disjoint i32 %93, %96
  br label %98

98:                                               ; preds = %82, %66
  %99 = phi i32 [ %81, %66 ], [ %97, %82 ]
  %100 = getelementptr inbounds i8, ptr %4, i64 8
  %101 = load i8, ptr %100, align 1, !tbaa !23
  %102 = zext i8 %101 to i32
  call void @png_set_oFFs(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %62, i32 noundef %99, i32 noundef %102) #4
  br label %103

103:                                              ; preds = %24, %98, %22, %19, %12
  call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %4) #4
  ret void
}

declare void @png_set_oFFs(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { nounwind }
attributes #5 = { 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 300}
!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, !9, i64 280, !9, i64 288, !7, i64 296, !7, i64 297, !11, i64 300, !11, i64 304, !11, i64 308, !11, i64 312, !12, i64 320, !9, i64 432, !11, i64 440, !11, i64 444, !11, i64 448, !11, i64 452, !11, i64 456, !11, i64 460, !11, i64 464, !11, i64 468, !11, i64 472, !11, i64 476, !11, i64 480, !11, i64 484, !11, i64 488, !11, i64 492, !11, i64 496, !11, i64 500, !11, i64 504, !11, i64 508, !11, i64 512, !11, i64 516, !10, i64 520, !11, i64 528, !11, i64 532, !11, i64 536, !9, i64 544, !9, i64 552, !9, i64 560, !9, i64 568, !10, i64 576, !11, i64 584, !11, i64 588, !9, i64 592, !13, i64 600, !11, i64 604, !13, i64 608, !7, i64 610, !7, i64 611, !7, i64 612, !7, i64 613, !7, i64 614, !7, i64 615, !7, i64 616, !7, i64 617, !7, i64 618, !7, i64 619, !7, i64 620, !7, i64 621, !7, i64 622, !7, i64 623, !7, i64 624, !13, i64 626, !7, i64 628, !11, i64 632, !14, i64 636, !14, i64 646, !9, i64 656, !11, i64 664, !11, i64 668, !11, i64 672, !11, i64 676, !9, i64 680, !9, i64 688, !9, i64 696, !9, i64 704, !9, i64 712, !9, i64 720, !15, i64 728, !15, i64 733, !9, i64 744, !14, i64 752, !9, i64 768, !9, i64 776, !9, i64 784, !9, i64 792, !9, i64 800, !9, i64 808, !9, i64 816, !9, i64 824, !9, i64 832, !11, i64 840, !11, i64 844, !10, i64 848, !10, i64 856, !10, i64 864, !10, i64 872, !11, i64 880, !11, i64 884, !9, i64 888, !9, i64 896, !11, i64 904, !7, i64 908, !11, i64 940, !9, i64 944, !9, i64 952, !11, i64 960, !11, i64 964, !9, i64 968, !7, i64 976, !7, i64 977, !13, i64 978, !13, i64 980, !11, i64 984, !7, i64 988, !9, i64 992, !9, i64 1000, !9, i64 1008, !9, i64 1016, !9, i64 1024, !9, i64 1032, !9, i64 1040, !7, i64 1048, !11, i64 1052, !11, i64 1056, !11, i64 1060, !10, i64 1064, !16, i64 1072, !10, i64 1104, !9, i64 1112, !10, i64 1120, !11, i64 1128, !11, i64 1132, !9, i64 1136, !7, i64 1144, !17, i64 1176}
!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 = !{!21, !11, i64 8}
!21 = !{!"png_info_def", !11, i64 0, !11, i64 4, !11, i64 8, !10, i64 16, !9, i64 24, !13, i64 32, !13, 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, !9, i64 128, !9, i64 136, !11, i64 144, !11, i64 148, !11, i64 152, !9, i64 160, !22, i64 168, !15, i64 176, !9, i64 184, !14, i64 192, !14, i64 202, !11, i64 212, !11, i64 216, !7, i64 220, !11, i64 224, !11, i64 228, !7, i64 232, !11, i64 236, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !11, i64 272, !11, i64 276, !9, i64 280, !9, i64 288, !7, i64 296, !7, i64 297, !11, i64 300, !9, i64 304, !11, i64 312, !9, i64 320, !11, i64 328, !7, i64 332, !9, i64 336, !9, i64 344, !9, i64 352}
!22 = !{!"png_time_struct", !13, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6}
!23 = !{!7, !7, i64 0}


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