; LLVM IR from niessner/Matterport :: code/gaps/pkgs/png (pngwutil)

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

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

@__const.png_write_tRNS.png_tRNS = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @png_save_uint_16(ptr noundef, i32 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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_write_chunk(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local void @png_write_tRNS(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [5 x i8], align 1
  %12 = alloca [6 x i8], align 1
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 5, ptr %11) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %11, ptr align 1 @__const.png_write_tRNS.png_tRNS, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 6, ptr %12) #4
  %14 = load i32, ptr %10, align 4, !tbaa !9
  %15 = icmp eq i32 %14, 3
  br i1 %15, label %16, label %34

16:                                               ; preds = %5
  %17 = load i32, ptr %9, align 4, !tbaa !9
  %18 = icmp sle i32 %17, 0
  br i1 %18, label %26, label %19

19:                                               ; preds = %16
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.png_struct_def, ptr %21, i32 0, i32 42
  %23 = load i16, ptr %22, align 8, !tbaa !11
  %24 = zext i16 %23 to i32
  %25 = icmp sgt i32 %20, %24
  br i1 %25, label %26, label %28

26:                                               ; preds = %19, %16
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_warning(ptr noundef %27, ptr noundef @.str.23)
  store i32 1, ptr %13, align 4
  br label %109

28:                                               ; preds = %19
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds [5 x i8], ptr %11, i64 0, i64 0
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = sext i32 %32 to i64
  call void @png_write_chunk(ptr noundef %29, ptr noundef %30, ptr noundef %31, i64 noundef %33)
  br label %108

34:                                               ; preds = %5
  %35 = load i32, ptr %10, align 4, !tbaa !9
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %59

37:                                               ; preds = %34
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.png_color_16_struct, ptr %38, i32 0, i32 4
  %40 = load i16, ptr %39, align 2, !tbaa !21
  %41 = zext i16 %40 to i32
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.png_struct_def, ptr %42, i32 0, i32 51
  %44 = load i8, ptr %43, align 1, !tbaa !22
  %45 = zext i8 %44 to i32
  %46 = shl i32 1, %45
  %47 = icmp sge i32 %41, %46
  br i1 %47, label %48, label %50

48:                                               ; preds = %37
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_warning(ptr noundef %49, ptr noundef @.str.24)
  store i32 1, ptr %13, align 4
  br label %109

50:                                               ; preds = %37
  %51 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.png_color_16_struct, ptr %52, i32 0, i32 4
  %54 = load i16, ptr %53, align 2, !tbaa !21
  %55 = zext i16 %54 to i32
  call void @png_save_uint_16(ptr noundef %51, i32 noundef %55)
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds [5 x i8], ptr %11, i64 0, i64 0
  %58 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  call void @png_write_chunk(ptr noundef %56, ptr noundef %57, ptr noundef %58, i64 noundef 2)
  br label %107

59:                                               ; preds = %34
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = icmp eq i32 %60, 2
  br i1 %61, label %62, label %104

62:                                               ; preds = %59
  %63 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.png_color_16_struct, ptr %64, i32 0, i32 1
  %66 = load i16, ptr %65, align 2, !tbaa !23
  %67 = zext i16 %66 to i32
  call void @png_save_uint_16(ptr noundef %63, i32 noundef %67)
  %68 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  %69 = getelementptr inbounds i8, ptr %68, i64 2
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.png_color_16_struct, ptr %70, i32 0, i32 2
  %72 = load i16, ptr %71, align 2, !tbaa !24
  %73 = zext i16 %72 to i32
  call void @png_save_uint_16(ptr noundef %69, i32 noundef %73)
  %74 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  %75 = getelementptr inbounds i8, ptr %74, i64 4
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.png_color_16_struct, ptr %76, i32 0, i32 3
  %78 = load i16, ptr %77, align 2, !tbaa !25
  %79 = zext i16 %78 to i32
  call void @png_save_uint_16(ptr noundef %75, i32 noundef %79)
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.png_struct_def, ptr %80, i32 0, i32 51
  %82 = load i8, ptr %81, align 1, !tbaa !22
  %83 = zext i8 %82 to i32
  %84 = icmp eq i32 %83, 8
  br i1 %84, label %85, label %100

85:                                               ; preds = %62
  %86 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  %87 = load i8, ptr %86, align 1, !tbaa !26
  %88 = zext i8 %87 to i32
  %89 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 2
  %90 = load i8, ptr %89, align 1, !tbaa !26
  %91 = zext i8 %90 to i32
  %92 = or i32 %88, %91
  %93 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 4
  %94 = load i8, ptr %93, align 1, !tbaa !26
  %95 = zext i8 %94 to i32
  %96 = or i32 %92, %95
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %85
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_warning(ptr noundef %99, ptr noundef @.str.25)
  store i32 1, ptr %13, align 4
  br label %109

100:                                              ; preds = %85, %62
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds [5 x i8], ptr %11, i64 0, i64 0
  %103 = getelementptr inbounds [6 x i8], ptr %12, i64 0, i64 0
  call void @png_write_chunk(ptr noundef %101, ptr noundef %102, ptr noundef %103, i64 noundef 6)
  br label %106

104:                                              ; preds = %59
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_warning(ptr noundef %105, ptr noundef @.str.26)
  br label %106

106:                                              ; preds = %104, %100
  br label %107

107:                                              ; preds = %106, %50
  br label %108

108:                                              ; preds = %107, %28
  store i32 0, ptr %13, align 4
  br label %109

109:                                              ; preds = %108, %98, %48, %26
  call void @llvm.lifetime.end.p0(i64 6, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 5, ptr %11) #4
  %110 = load i32, ptr %13, align 4
  switch i32 %110, label %112 [
    i32 0, label %111
    i32 1, label %111
  ]

111:                                              ; preds = %109, %109
  ret void

112:                                              ; preds = %109
  unreachable
}

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

!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, !16, i64 576}
!12 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !7, i64 280, !7, i64 281, !10, i64 284, !10, i64 288, !10, i64 292, !13, i64 296, !6, i64 408, !14, i64 416, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !14, i64 464, !14, i64 472, !10, i64 480, !10, i64 484, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !15, i64 536, !10, i64 560, !10, i64 564, !6, i64 568, !16, i64 576, !16, i64 578, !7, i64 580, !7, i64 585, !7, i64 586, !7, i64 587, !7, i64 588, !7, i64 589, !7, i64 590, !7, i64 591, !7, i64 592, !7, i64 593, !7, i64 594, !7, i64 595, !7, i64 596, !16, i64 598, !7, i64 600, !17, i64 604, !18, i64 608, !18, i64 618, !6, i64 632, !10, i64 640, !10, i64 644, !10, i64 648, !17, i64 652, !17, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !19, i64 712, !19, i64 717, !6, i64 728, !18, i64 736, !6, i64 752, !6, i64 760, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !10, i64 824, !10, i64 828, !14, i64 832, !14, i64 840, !14, i64 848, !14, i64 856, !10, i64 864, !10, i64 868, !14, i64 872, !14, i64 880, !6, i64 888, !6, i64 896, !6, i64 904, !6, i64 912, !6, i64 920, !7, i64 928, !7, i64 929, !6, i64 936, !6, i64 944, !6, i64 952, !6, i64 960, !6, i64 968, !6, i64 976, !10, i64 984, !6, i64 992, !6, i64 1000, !10, i64 1008, !6, i64 1016, !7, i64 1024, !16, i64 1026, !16, i64 1028, !16, i64 1030, !10, i64 1032, !10, i64 1036, !7, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !6, i64 1088, !6, i64 1096, !7, i64 1104, !10, i64 1108, !10, i64 1112, !10, i64 1116, !20, i64 1120, !10, i64 1152, !10, i64 1156, !6, i64 1160, !10, i64 1168}
!13 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !14, i64 16, !6, i64 24, !10, i64 32, !14, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !14, i64 96, !14, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!"png_row_info_struct", !10, i64 0, !14, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!16 = !{!"short", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"png_color_16_struct", !7, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8}
!19 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!20 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !14, i64 16, !7, i64 24}
!21 = !{!18, !16, i64 8}
!22 = !{!12, !7, i64 591}
!23 = !{!18, !16, i64 2}
!24 = !{!18, !16, i64 4}
!25 = !{!18, !16, i64 6}
!26 = !{!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"

@__const.png_write_tRNS.png_tRNS = external hidden unnamed_addr constant [5 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @png_save_uint_16(ptr noundef, i32 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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #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_write_chunk(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @png_write_tRNS(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = alloca [5 x i8], align 1
  %7 = alloca [6 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %6) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(5) %6, ptr noundef nonnull align 1 dereferenceable(5) @__const.png_write_tRNS.png_tRNS, i64 5, i1 false)
  call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %7) #4
  switch i32 %4, label %51 [
    i32 3, label %8
    i32 0, label %18
    i32 2, label %28
  ]

8:                                                ; preds = %5
  %9 = icmp slt i32 %3, 1
  br i1 %9, label %15, label %10

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 576
  %12 = load i16, ptr %11, align 8, !tbaa !5
  %13 = zext i16 %12 to i32
  %14 = icmp ult i32 %13, %3
  br i1 %14, label %15, label %16

15:                                               ; preds = %10, %8
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.23) #4
  br label %52

16:                                               ; preds = %10
  %17 = zext nneg i32 %3 to i64
  call void @png_write_chunk(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef %1, i64 noundef %17)
  br label %52

18:                                               ; preds = %5
  %19 = getelementptr inbounds i8, ptr %2, i64 8
  %20 = load i16, ptr %19, align 2, !tbaa !19
  %21 = zext i16 %20 to i32
  %22 = getelementptr inbounds i8, ptr %0, i64 591
  %23 = load i8, ptr %22, align 1, !tbaa !20
  %24 = zext nneg i8 %23 to i32
  %25 = shl nuw i32 1, %24
  %.not23 = icmp sgt i32 %25, %21
  br i1 %.not23, label %27, label %26

26:                                               ; preds = %18
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.24) #4
  br label %52

27:                                               ; preds = %18
  call void @png_save_uint_16(ptr noundef nonnull %7, i32 noundef %21)
  call void @png_write_chunk(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef 2)
  br label %52

28:                                               ; preds = %5
  %29 = getelementptr inbounds i8, ptr %2, i64 2
  %30 = load i16, ptr %29, align 2, !tbaa !21
  %31 = zext i16 %30 to i32
  call void @png_save_uint_16(ptr noundef nonnull %7, i32 noundef %31)
  %32 = getelementptr inbounds i8, ptr %7, i64 2
  %33 = getelementptr inbounds i8, ptr %2, i64 4
  %34 = load i16, ptr %33, align 2, !tbaa !22
  %35 = zext i16 %34 to i32
  call void @png_save_uint_16(ptr noundef nonnull %32, i32 noundef %35)
  %36 = getelementptr inbounds i8, ptr %7, i64 4
  %37 = getelementptr inbounds i8, ptr %2, i64 6
  %38 = load i16, ptr %37, align 2, !tbaa !23
  %39 = zext i16 %38 to i32
  call void @png_save_uint_16(ptr noundef nonnull %36, i32 noundef %39)
  %40 = getelementptr inbounds i8, ptr %0, i64 591
  %41 = load i8, ptr %40, align 1, !tbaa !20
  %42 = icmp eq i8 %41, 8
  br i1 %42, label %43, label %50

43:                                               ; preds = %28
  %44 = load i8, ptr %7, align 1, !tbaa !24
  %45 = load i8, ptr %32, align 1, !tbaa !24
  %46 = or i8 %45, %44
  %47 = load i8, ptr %36, align 1, !tbaa !24
  %48 = or i8 %46, %47
  %.not = icmp eq i8 %48, 0
  br i1 %.not, label %50, label %49

49:                                               ; preds = %43
  call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.25) #4
  br label %52

50:                                               ; preds = %43, %28
  call void @png_write_chunk(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %7, i64 noundef 6)
  br label %52

51:                                               ; preds = %5
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.26) #4
  br label %52

52:                                               ; preds = %16, %50, %51, %27, %49, %26, %15
  call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %6) #4
  ret void
}

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

!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, !14, i64 576}
!6 = !{!"png_struct_def", !7, i64 0, !9, i64 200, !9, i64 208, !9, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !9, i64 272, !7, i64 280, !7, i64 281, !10, i64 284, !10, i64 288, !10, i64 292, !11, i64 296, !9, i64 408, !12, i64 416, !10, i64 424, !10, i64 428, !10, i64 432, !10, i64 436, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !12, i64 464, !12, i64 472, !10, i64 480, !10, i64 484, !9, i64 488, !9, i64 496, !9, i64 504, !9, i64 512, !9, i64 520, !9, i64 528, !13, i64 536, !10, i64 560, !10, i64 564, !9, i64 568, !14, i64 576, !14, i64 578, !7, i64 580, !7, i64 585, !7, i64 586, !7, i64 587, !7, i64 588, !7, i64 589, !7, i64 590, !7, i64 591, !7, i64 592, !7, i64 593, !7, i64 594, !7, i64 595, !7, i64 596, !14, i64 598, !7, i64 600, !15, i64 604, !16, i64 608, !16, i64 618, !9, i64 632, !10, i64 640, !10, i64 644, !10, i64 648, !15, i64 652, !15, i64 656, !9, i64 664, !9, i64 672, !9, i64 680, !9, i64 688, !9, i64 696, !9, i64 704, !17, i64 712, !17, i64 717, !9, i64 728, !16, i64 736, !9, i64 752, !9, i64 760, !9, i64 768, !9, i64 776, !9, i64 784, !9, i64 792, !9, i64 800, !9, i64 808, !9, i64 816, !10, i64 824, !10, i64 828, !12, i64 832, !12, i64 840, !12, i64 848, !12, i64 856, !10, i64 864, !10, i64 868, !12, i64 872, !12, i64 880, !9, i64 888, !9, i64 896, !9, i64 904, !9, i64 912, !9, i64 920, !7, i64 928, !7, i64 929, !9, i64 936, !9, i64 944, !9, i64 952, !9, i64 960, !9, i64 968, !9, i64 976, !10, i64 984, !9, i64 992, !9, i64 1000, !10, i64 1008, !9, i64 1016, !7, i64 1024, !14, i64 1026, !14, i64 1028, !14, i64 1030, !10, i64 1032, !10, i64 1036, !7, i64 1040, !9, i64 1048, !9, i64 1056, !9, i64 1064, !9, i64 1072, !9, i64 1080, !9, i64 1088, !9, i64 1096, !7, i64 1104, !10, i64 1108, !10, i64 1112, !10, i64 1116, !18, i64 1120, !10, i64 1152, !10, i64 1156, !9, i64 1160, !10, i64 1168}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"z_stream_s", !9, i64 0, !10, i64 8, !12, i64 16, !9, i64 24, !10, i64 32, !12, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !10, i64 88, !12, i64 96, !12, i64 104}
!12 = !{!"long", !7, i64 0}
!13 = !{!"png_row_info_struct", !10, i64 0, !12, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!17 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!18 = !{!"png_unknown_chunk_t", !7, i64 0, !9, i64 8, !12, i64 16, !7, i64 24}
!19 = !{!16, !14, i64 8}
!20 = !{!6, !7, i64 591}
!21 = !{!16, !14, i64 2}
!22 = !{!16, !14, i64 4}
!23 = !{!16, !14, i64 6}
!24 = !{!7, !7, i64 0}


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