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

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

%struct.png_struct_def = type { [1 x %struct.__jmp_buf_tag], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, i64, i64, i64, %struct.z_stream_s, ptr, i64, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_row_info_struct, i64, i64, ptr, i16, i16, [5 x i8], i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i16, i8, float, %struct.png_color_16_struct, %struct.png_color_16_struct, ptr, i64, i64, i32, float, float, ptr, ptr, ptr, ptr, ptr, ptr, %struct.png_color_8_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i32, i32, i64, i64, ptr, ptr, ptr, ptr, ptr, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, i32, ptr, i8, i16, i16, i16, i64, i64, i8, i8, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i64, i64, %struct.png_unknown_chunk_t, i64, i64, ptr }
%struct.__jmp_buf_tag = type { [8 x i64], i32, %struct.__sigset_t }
%struct.__sigset_t = type { [16 x i64] }
%struct.z_stream_s = type { ptr, i32, i64, ptr, i32, i64, ptr, ptr, ptr, ptr, ptr, i32, i64, i64 }
%struct.png_row_info_struct = type { i64, i64, i8, i8, i8, i8 }
%struct.png_color_8_struct = type { i8, i8, i8, i8, i8 }
%struct.png_color_16_struct = type { i8, i16, i16, i16, i16 }
%struct.png_unknown_chunk_t = type { [5 x i8], ptr, i64, i8 }

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @png_get_uint_31(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

declare void @png_error(ptr noundef, ptr noundef) #2

; 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
declare dso_local void @png_crc_read(ptr noundef, ptr noundef, i64 noundef) #0

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

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

20:                                               ; preds = %3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %21, ptr noundef @.str.10)
  br label %22

22:                                               ; preds = %20, %3
  %23 = load i64, ptr %6, align 8, !tbaa !9
  %24 = icmp ne i64 %23, 13
  br i1 %24, label %25, label %27

25:                                               ; preds = %22
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  call void @png_error(ptr noundef %26, ptr noundef @.str.11)
  br label %27

27:                                               ; preds = %25, %22
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.png_struct_def, ptr %28, i32 0, i32 12
  %30 = load i64, ptr %29, align 8, !tbaa !11
  %31 = or i64 %30, 1
  store i64 %31, ptr %29, align 8, !tbaa !11
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 0
  call void @png_crc_read(ptr noundef %32, ptr noundef %33, i64 noundef 13)
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = call i32 @png_crc_finish(ptr noundef %34, i64 noundef 0)
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 0
  %38 = call i64 @png_get_uint_31(ptr noundef %36, ptr noundef %37)
  store i64 %38, ptr %8, align 8, !tbaa !9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 0
  %41 = getelementptr inbounds i8, ptr %40, i64 4
  %42 = call i64 @png_get_uint_31(ptr noundef %39, ptr noundef %41)
  store i64 %42, ptr %9, align 8, !tbaa !9
  %43 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 8
  %44 = load i8, ptr %43, align 1, !tbaa !21
  %45 = zext i8 %44 to i32
  store i32 %45, ptr %10, align 4, !tbaa !22
  %46 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 9
  %47 = load i8, ptr %46, align 1, !tbaa !21
  %48 = zext i8 %47 to i32
  store i32 %48, ptr %11, align 4, !tbaa !22
  %49 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 10
  %50 = load i8, ptr %49, align 1, !tbaa !21
  %51 = zext i8 %50 to i32
  store i32 %51, ptr %12, align 4, !tbaa !22
  %52 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 11
  %53 = load i8, ptr %52, align 1, !tbaa !21
  %54 = zext i8 %53 to i32
  store i32 %54, ptr %13, align 4, !tbaa !22
  %55 = getelementptr inbounds [13 x i8], ptr %7, i64 0, i64 12
  %56 = load i8, ptr %55, align 1, !tbaa !21
  %57 = zext i8 %56 to i32
  store i32 %57, ptr %14, align 4, !tbaa !22
  %58 = load i64, ptr %8, align 8, !tbaa !9
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.png_struct_def, ptr %59, i32 0, i32 23
  store i64 %58, ptr %60, align 8, !tbaa !23
  %61 = load i64, ptr %9, align 8, !tbaa !9
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.png_struct_def, ptr %62, i32 0, i32 24
  store i64 %61, ptr %63, align 8, !tbaa !24
  %64 = load i32, ptr %10, align 4, !tbaa !22
  %65 = trunc i32 %64 to i8
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.png_struct_def, ptr %66, i32 0, i32 50
  store i8 %65, ptr %67, align 1, !tbaa !25
  %68 = load i32, ptr %14, align 4, !tbaa !22
  %69 = trunc i32 %68 to i8
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.png_struct_def, ptr %70, i32 0, i32 46
  store i8 %69, ptr %71, align 1, !tbaa !26
  %72 = load i32, ptr %11, align 4, !tbaa !22
  %73 = trunc i32 %72 to i8
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.png_struct_def, ptr %74, i32 0, i32 49
  store i8 %73, ptr %75, align 2, !tbaa !27
  %76 = load i32, ptr %13, align 4, !tbaa !22
  %77 = trunc i32 %76 to i8
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.png_struct_def, ptr %78, i32 0, i32 120
  store i8 %77, ptr %79, align 8, !tbaa !28
  %80 = load i32, ptr %12, align 4, !tbaa !22
  %81 = trunc i32 %80 to i8
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.png_struct_def, ptr %82, i32 0, i32 131
  store i8 %81, ptr %83, align 8, !tbaa !29
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.png_struct_def, ptr %84, i32 0, i32 49
  %86 = load i8, ptr %85, align 2, !tbaa !27
  %87 = zext i8 %86 to i32
  switch i32 %87, label %100 [
    i32 0, label %88
    i32 3, label %88
    i32 2, label %91
    i32 4, label %94
    i32 6, label %97
  ]

88:                                               ; preds = %27, %27
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.png_struct_def, ptr %89, i32 0, i32 53
  store i8 1, ptr %90, align 2, !tbaa !30
  br label %100

91:                                               ; preds = %27
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.png_struct_def, ptr %92, i32 0, i32 53
  store i8 3, ptr %93, align 2, !tbaa !30
  br label %100

94:                                               ; preds = %27
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.png_struct_def, ptr %95, i32 0, i32 53
  store i8 2, ptr %96, align 2, !tbaa !30
  br label %100

97:                                               ; preds = %27
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.png_struct_def, ptr %98, i32 0, i32 53
  store i8 4, ptr %99, align 2, !tbaa !30
  br label %100

100:                                              ; preds = %97, %94, %91, %88, %27
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.png_struct_def, ptr %101, i32 0, i32 50
  %103 = load i8, ptr %102, align 1, !tbaa !25
  %104 = zext i8 %103 to i32
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.png_struct_def, ptr %105, i32 0, i32 53
  %107 = load i8, ptr %106, align 2, !tbaa !30
  %108 = zext i8 %107 to i32
  %109 = mul nsw i32 %104, %108
  %110 = trunc i32 %109 to i8
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.png_struct_def, ptr %111, i32 0, i32 52
  store i8 %110, ptr %112, align 1, !tbaa !31
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.png_struct_def, ptr %113, i32 0, i32 52
  %115 = load i8, ptr %114, align 1, !tbaa !31
  %116 = zext i8 %115 to i32
  %117 = icmp sge i32 %116, 8
  br i1 %117, label %118, label %128

118:                                              ; preds = %100
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.png_struct_def, ptr %119, i32 0, i32 23
  %121 = load i64, ptr %120, align 8, !tbaa !23
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.png_struct_def, ptr %122, i32 0, i32 52
  %124 = load i8, ptr %123, align 1, !tbaa !31
  %125 = zext i8 %124 to i64
  %126 = lshr i64 %125, 3
  %127 = mul i64 %121, %126
  br label %139

128:                                              ; preds = %100
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.png_struct_def, ptr %129, i32 0, i32 23
  %131 = load i64, ptr %130, align 8, !tbaa !23
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.png_struct_def, ptr %132, i32 0, i32 52
  %134 = load i8, ptr %133, align 1, !tbaa !31
  %135 = zext i8 %134 to i64
  %136 = mul i64 %131, %135
  %137 = add i64 %136, 7
  %138 = lshr i64 %137, 3
  br label %139

139:                                              ; preds = %128, %118
  %140 = phi i64 [ %127, %118 ], [ %138, %128 ]
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.png_struct_def, ptr %141, i32 0, i32 27
  store i64 %140, ptr %142, align 8, !tbaa !32
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = load i64, ptr %8, align 8, !tbaa !9
  %146 = load i64, ptr %9, align 8, !tbaa !9
  %147 = load i32, ptr %10, align 4, !tbaa !22
  %148 = load i32, ptr %11, align 4, !tbaa !22
  %149 = load i32, ptr %14, align 4, !tbaa !22
  %150 = load i32, ptr %12, align 4, !tbaa !22
  %151 = load i32, ptr %13, align 4, !tbaa !22
  call void @png_set_IHDR(ptr noundef %143, ptr noundef %144, i64 noundef %145, i64 noundef %146, i32 noundef %147, i32 noundef %148, i32 noundef %149, i32 noundef %150, i32 noundef %151)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 13, ptr %7) #3
  ret void
}

declare void @png_set_IHDR(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 280}
!12 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !7, i64 272, !7, i64 273, !10, i64 280, !10, i64 288, !10, i64 296, !13, i64 304, !6, i64 416, !10, i64 424, !14, i64 432, !14, i64 436, !14, i64 440, !14, i64 444, !14, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !15, i64 568, !10, i64 592, !10, i64 600, !6, i64 608, !16, i64 616, !16, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !16, i64 638, !7, i64 640, !17, i64 644, !18, i64 648, !18, i64 658, !6, i64 672, !10, i64 680, !10, i64 688, !14, i64 696, !17, i64 700, !17, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !19, i64 760, !19, i64 765, !6, i64 776, !18, i64 784, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !6, i64 840, !6, i64 848, !6, i64 856, !6, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !14, i64 920, !14, i64 924, !10, i64 928, !10, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !7, i64 984, !7, i64 985, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !10, i64 1040, !6, i64 1048, !6, i64 1056, !14, i64 1064, !6, i64 1072, !7, i64 1080, !16, i64 1082, !16, i64 1084, !16, i64 1086, !10, i64 1088, !10, i64 1096, !7, i64 1104, !7, i64 1105, !10, i64 1112, !10, i64 1120, !6, i64 1128, !6, i64 1136, !6, i64 1144, !6, i64 1152, !6, i64 1160, !6, i64 1168, !6, i64 1176, !7, i64 1184, !10, i64 1192, !10, i64 1200, !20, i64 1208, !10, i64 1240, !10, i64 1248, !6, i64 1256}
!13 = !{!"z_stream_s", !6, i64 0, !14, i64 8, !10, i64 16, !6, i64 24, !14, i64 32, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !14, i64 88, !10, i64 96, !10, i64 104}
!14 = !{!"int", !7, i64 0}
!15 = !{!"png_row_info_struct", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!16 = !{!"short", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"png_color_16_struct", !7, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8}
!19 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!20 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !10, i64 16, !7, i64 24}
!21 = !{!7, !7, i64 0}
!22 = !{!14, !14, i64 0}
!23 = !{!12, !10, i64 456}
!24 = !{!12, !10, i64 464}
!25 = !{!12, !7, i64 631}
!26 = !{!12, !7, i64 627}
!27 = !{!12, !7, i64 630}
!28 = !{!12, !7, i64 1104}
!29 = !{!12, !7, i64 1184}
!30 = !{!12, !7, i64 634}
!31 = !{!12, !7, i64 633}
!32 = !{!12, !10, i64 488}


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

; Function Attrs: nounwind uwtable
declare dso_local i64 @png_get_uint_31(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare void @png_error(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @png_crc_read(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

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

9:                                                ; preds = %8, %3
  %.not45 = icmp eq i64 %2, 13
  br i1 %.not45, label %11, label %10

10:                                               ; preds = %9
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.11) #3
  br label %11

11:                                               ; preds = %10, %9
  %12 = load i64, ptr %5, align 8, !tbaa !5
  %13 = or i64 %12, 1
  store i64 %13, ptr %5, align 8, !tbaa !5
  call void @png_crc_read(ptr noundef nonnull %0, ptr noundef nonnull %4, i64 noundef 13)
  %14 = call i32 @png_crc_finish(ptr noundef nonnull %0, i64 noundef 0)
  %15 = call i64 @png_get_uint_31(ptr noundef nonnull %0, ptr noundef nonnull %4)
  %16 = getelementptr inbounds i8, ptr %4, i64 4
  %17 = call i64 @png_get_uint_31(ptr noundef nonnull %0, ptr noundef nonnull %16)
  %18 = getelementptr inbounds i8, ptr %4, i64 8
  %19 = load i8, ptr %18, align 1, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %4, i64 9
  %21 = load i8, ptr %20, align 1, !tbaa !19
  %22 = getelementptr inbounds i8, ptr %4, i64 10
  %23 = load i8, ptr %22, align 1, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %4, i64 11
  %25 = load i8, ptr %24, align 1, !tbaa !19
  %26 = getelementptr inbounds i8, ptr %4, i64 12
  %27 = load i8, ptr %26, align 1, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %0, i64 456
  store i64 %15, ptr %28, align 8, !tbaa !20
  %29 = getelementptr inbounds i8, ptr %0, i64 464
  store i64 %17, ptr %29, align 8, !tbaa !21
  %30 = getelementptr inbounds i8, ptr %0, i64 631
  store i8 %19, ptr %30, align 1, !tbaa !22
  %31 = getelementptr inbounds i8, ptr %0, i64 627
  store i8 %27, ptr %31, align 1, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %0, i64 630
  store i8 %21, ptr %32, align 2, !tbaa !24
  %33 = getelementptr inbounds i8, ptr %0, i64 1104
  store i8 %25, ptr %33, align 8, !tbaa !25
  %34 = getelementptr inbounds i8, ptr %0, i64 1184
  store i8 %23, ptr %34, align 8, !tbaa !26
  switch i8 %21, label %._crit_edge [
    i8 0, label %35
    i8 3, label %35
    i8 2, label %37
    i8 4, label %39
    i8 6, label %41
  ]

._crit_edge:                                      ; preds = %11
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 634
  %.pre = load i8, ptr %.phi.trans.insert, align 2, !tbaa !27
  br label %43

35:                                               ; preds = %11, %11
  %36 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 1, ptr %36, align 2, !tbaa !27
  br label %43

37:                                               ; preds = %11
  %38 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 3, ptr %38, align 2, !tbaa !27
  br label %43

39:                                               ; preds = %11
  %40 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 2, ptr %40, align 2, !tbaa !27
  br label %43

41:                                               ; preds = %11
  %42 = getelementptr inbounds i8, ptr %0, i64 634
  store i8 4, ptr %42, align 2, !tbaa !27
  br label %43

43:                                               ; preds = %._crit_edge, %41, %39, %37, %35
  %44 = phi i8 [ %.pre, %._crit_edge ], [ 4, %41 ], [ 2, %39 ], [ 3, %37 ], [ 1, %35 ]
  %45 = mul i8 %44, %19
  %46 = getelementptr inbounds i8, ptr %0, i64 633
  store i8 %45, ptr %46, align 1, !tbaa !28
  %47 = icmp ugt i8 %45, 7
  br i1 %47, label %48, label %52

48:                                               ; preds = %43
  %49 = lshr i8 %45, 3
  %50 = zext nneg i8 %49 to i64
  %51 = mul i64 %15, %50
  br label %57

52:                                               ; preds = %43
  %53 = zext nneg i8 %45 to i64
  %54 = mul i64 %15, %53
  %55 = add i64 %54, 7
  %56 = lshr i64 %55, 3
  br label %57

57:                                               ; preds = %52, %48
  %58 = phi i64 [ %51, %48 ], [ %56, %52 ]
  %59 = zext i8 %27 to i32
  %60 = zext i8 %25 to i32
  %61 = zext i8 %23 to i32
  %62 = zext i8 %21 to i32
  %63 = zext i8 %19 to i32
  %64 = getelementptr inbounds i8, ptr %0, i64 488
  store i64 %58, ptr %64, align 8, !tbaa !29
  call void @png_set_IHDR(ptr noundef nonnull %0, ptr noundef %1, i64 noundef %15, i64 noundef %17, i32 noundef %63, i32 noundef %62, i32 noundef %59, i32 noundef %61, i32 noundef %60) #3
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %4) #3
  ret void
}

declare void @png_set_IHDR(ptr noundef, ptr noundef, i64 noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 280}
!6 = !{!"png_struct_def", !7, i64 0, !9, i64 200, !9, i64 208, !9, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !7, i64 272, !7, i64 273, !10, i64 280, !10, i64 288, !10, i64 296, !11, i64 304, !9, i64 416, !10, i64 424, !12, i64 432, !12, i64 436, !12, i64 440, !12, i64 444, !12, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !9, i64 520, !9, i64 528, !9, i64 536, !9, i64 544, !9, i64 552, !9, i64 560, !13, i64 568, !10, i64 592, !10, i64 600, !9, i64 608, !14, i64 616, !14, i64 618, !7, i64 620, !7, i64 625, !7, i64 626, !7, i64 627, !7, i64 628, !7, i64 629, !7, i64 630, !7, i64 631, !7, i64 632, !7, i64 633, !7, i64 634, !7, i64 635, !7, i64 636, !14, i64 638, !7, i64 640, !15, i64 644, !16, i64 648, !16, i64 658, !9, i64 672, !10, i64 680, !10, i64 688, !12, i64 696, !15, i64 700, !15, i64 704, !9, i64 712, !9, i64 720, !9, i64 728, !9, i64 736, !9, i64 744, !9, i64 752, !17, i64 760, !17, i64 765, !9, i64 776, !16, i64 784, !9, i64 800, !9, i64 808, !9, i64 816, !9, i64 824, !9, i64 832, !9, i64 840, !9, i64 848, !9, i64 856, !9, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !12, i64 920, !12, i64 924, !10, i64 928, !10, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !9, i64 968, !9, i64 976, !7, i64 984, !7, i64 985, !9, i64 992, !9, i64 1000, !9, i64 1008, !9, i64 1016, !9, i64 1024, !9, i64 1032, !10, i64 1040, !9, i64 1048, !9, i64 1056, !12, i64 1064, !9, i64 1072, !7, i64 1080, !14, i64 1082, !14, i64 1084, !14, i64 1086, !10, i64 1088, !10, i64 1096, !7, i64 1104, !7, i64 1105, !10, i64 1112, !10, i64 1120, !9, i64 1128, !9, i64 1136, !9, i64 1144, !9, i64 1152, !9, i64 1160, !9, i64 1168, !9, i64 1176, !7, i64 1184, !10, i64 1192, !10, i64 1200, !18, i64 1208, !10, i64 1240, !10, i64 1248, !9, i64 1256}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!"z_stream_s", !9, i64 0, !12, i64 8, !10, i64 16, !9, i64 24, !12, i64 32, !10, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !12, i64 88, !10, i64 96, !10, i64 104}
!12 = !{!"int", !7, i64 0}
!13 = !{!"png_row_info_struct", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!17 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!18 = !{!"png_unknown_chunk_t", !7, i64 0, !9, i64 8, !10, i64 16, !7, i64 24}
!19 = !{!7, !7, i64 0}
!20 = !{!6, !10, i64 456}
!21 = !{!6, !10, i64 464}
!22 = !{!6, !7, i64 631}
!23 = !{!6, !7, i64 627}
!24 = !{!6, !7, i64 630}
!25 = !{!6, !7, i64 1104}
!26 = !{!6, !7, i64 1184}
!27 = !{!6, !7, i64 634}
!28 = !{!6, !7, i64 633}
!29 = !{!6, !10, i64 488}


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