; LLVM IR from rdguez-mariano/fast_imas_IPOL :: io_png/libs/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, 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 }
%struct.png_text_struct = type { i32, ptr, ptr, i64 }

@.str.14 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @png_push_read_tEXt(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %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
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.png_struct_def, ptr %11, i32 0, i32 90
  %13 = load i64, ptr %12, align 8, !tbaa !9
  %14 = icmp ne i64 %13, 0
  br i1 %14, label %15, label %52

15:                                               ; preds = %2
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 95
  %18 = load i64, ptr %17, align 8, !tbaa !20
  %19 = icmp ne i64 %18, 0
  br i1 %19, label %20, label %52

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.png_struct_def, ptr %21, i32 0, i32 90
  %23 = load i64, ptr %22, align 8, !tbaa !9
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.png_struct_def, ptr %24, i32 0, i32 95
  %26 = load i64, ptr %25, align 8, !tbaa !20
  %27 = icmp ult i64 %23, %26
  br i1 %27, label %28, label %32

28:                                               ; preds = %20
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.png_struct_def, ptr %29, i32 0, i32 90
  %31 = load i64, ptr %30, align 8, !tbaa !9
  store i64 %31, ptr %5, align 8, !tbaa !21
  br label %36

32:                                               ; preds = %20
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.png_struct_def, ptr %33, i32 0, i32 95
  %35 = load i64, ptr %34, align 8, !tbaa !20
  store i64 %35, ptr %5, align 8, !tbaa !21
  br label %36

36:                                               ; preds = %32, %28
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.png_struct_def, ptr %38, i32 0, i32 97
  %40 = load ptr, ptr %39, align 8, !tbaa !22
  %41 = load i64, ptr %5, align 8, !tbaa !21
  call void @png_crc_read(ptr noundef %37, ptr noundef %40, i64 noundef %41)
  %42 = load i64, ptr %5, align 8, !tbaa !21
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.png_struct_def, ptr %43, i32 0, i32 95
  %45 = load i64, ptr %44, align 8, !tbaa !20
  %46 = sub i64 %45, %42
  store i64 %46, ptr %44, align 8, !tbaa !20
  %47 = load i64, ptr %5, align 8, !tbaa !21
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.png_struct_def, ptr %48, i32 0, i32 97
  %50 = load ptr, ptr %49, align 8, !tbaa !22
  %51 = getelementptr inbounds i8, ptr %50, i64 %47
  store ptr %51, ptr %49, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %52

52:                                               ; preds = %36, %15, %2
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.png_struct_def, ptr %53, i32 0, i32 95
  %55 = load i64, ptr %54, align 8, !tbaa !20
  %56 = icmp ne i64 %55, 0
  br i1 %56, label %118, label %57

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %58 = load ptr, ptr %3, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.png_struct_def, ptr %58, i32 0, i32 90
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = icmp ult i64 %60, 4
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_push_save_buffer(ptr noundef %63)
  store i32 1, ptr %10, align 4
  br label %115

64:                                               ; preds = %57
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_push_crc_finish(ptr noundef %65)
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.png_struct_def, ptr %66, i32 0, i32 96
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  store ptr %68, ptr %8, align 8, !tbaa !5
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %69, ptr %7, align 8, !tbaa !5
  br label %70

70:                                               ; preds = %75, %64
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = load i8, ptr %71, align 1, !tbaa !24
  %73 = icmp ne i8 %72, 0
  br i1 %73, label %74, label %78

74:                                               ; preds = %70
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i32 1
  store ptr %77, ptr %7, align 8, !tbaa !5
  br label %70, !llvm.loop !25

78:                                               ; preds = %70
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.png_struct_def, ptr %81, i32 0, i32 94
  %83 = load i64, ptr %82, align 8, !tbaa !27
  %84 = getelementptr inbounds i8, ptr %80, i64 %83
  %85 = icmp ult ptr %79, %84
  br i1 %85, label %86, label %89

86:                                               ; preds = %78
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i32 1
  store ptr %88, ptr %7, align 8, !tbaa !5
  br label %89

89:                                               ; preds = %86, %78
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = call ptr @png_malloc(ptr noundef %90, i64 noundef 32)
  store ptr %91, ptr %6, align 8, !tbaa !5
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.png_text_struct, ptr %92, i32 0, i32 0
  store i32 -1, ptr %93, align 8, !tbaa !28
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.png_text_struct, ptr %95, i32 0, i32 1
  store ptr %94, ptr %96, align 8, !tbaa !30
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.png_text_struct, ptr %98, i32 0, i32 2
  store ptr %97, ptr %99, align 8, !tbaa !31
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = call i32 @png_set_text_2(ptr noundef %100, ptr noundef %101, ptr noundef %102, i32 noundef 1)
  store i32 %103, ptr %9, align 4, !tbaa !32
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  call void @png_free(ptr noundef %104, ptr noundef %105)
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_free(ptr noundef %106, ptr noundef %107)
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.png_struct_def, ptr %108, i32 0, i32 96
  store ptr null, ptr %109, align 8, !tbaa !23
  %110 = load i32, ptr %9, align 4, !tbaa !32
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %114

112:                                              ; preds = %89
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  call void @png_warning(ptr noundef %113, ptr noundef @.str.14)
  br label %114

114:                                              ; preds = %112, %89
  store i32 0, ptr %10, align 4
  br label %115

115:                                              ; preds = %114, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %116 = load i32, ptr %10, align 4
  switch i32 %116, label %119 [
    i32 0, label %117
    i32 1, label %118
  ]

117:                                              ; preds = %115
  br label %118

118:                                              ; preds = %117, %115, %52
  ret void

119:                                              ; preds = %115
  unreachable
}

; Function Attrs: nounwind uwtable
declare dso_local void @png_push_crc_finish(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @png_push_save_buffer(ptr noundef) #0

declare void @png_crc_read(ptr noundef, ptr noundef, i64 noundef) #2

declare ptr @png_malloc(ptr noundef, i64 noundef) #2

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

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

declare i32 @png_set_text_2(ptr noundef, ptr noundef, ptr 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, !11, i64 904}
!10 = !{!"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, !11, i64 280, !11, i64 288, !11, i64 296, !12, i64 304, !6, i64 416, !11, i64 424, !13, i64 432, !13, i64 436, !13, i64 440, !13, i64 444, !13, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !14, i64 568, !11, i64 592, !11, i64 600, !6, i64 608, !15, i64 616, !15, 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, !15, i64 638, !7, i64 640, !16, i64 644, !17, i64 648, !17, i64 658, !6, i64 672, !11, i64 680, !11, i64 688, !13, i64 696, !16, i64 700, !16, i64 704, !6, i64 712, !6, i64 720, !6, i64 728, !6, i64 736, !6, i64 744, !6, i64 752, !18, i64 760, !18, i64 765, !6, i64 776, !17, 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, !11, i64 872, !11, i64 880, !11, i64 888, !11, i64 896, !11, i64 904, !11, i64 912, !13, i64 920, !13, i64 924, !11, i64 928, !11, 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, !11, i64 1040, !6, i64 1048, !6, i64 1056, !13, i64 1064, !6, i64 1072, !7, i64 1080, !15, i64 1082, !15, i64 1084, !15, i64 1086, !11, i64 1088, !11, i64 1096, !7, i64 1104, !7, i64 1105, !11, i64 1112, !11, 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, !11, i64 1192, !11, i64 1200, !19, i64 1208, !11, i64 1240, !11, i64 1248, !6, i64 1256}
!11 = !{!"long", !7, i64 0}
!12 = !{!"z_stream_s", !6, i64 0, !13, i64 8, !11, i64 16, !6, i64 24, !13, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !13, i64 88, !11, i64 96, !11, i64 104}
!13 = !{!"int", !7, i64 0}
!14 = !{!"png_row_info_struct", !11, i64 0, !11, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19}
!15 = !{!"short", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"png_color_16_struct", !7, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !15, i64 8}
!18 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!19 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !11, i64 16, !7, i64 24}
!20 = !{!10, !11, i64 936}
!21 = !{!11, !11, i64 0}
!22 = !{!10, !6, i64 952}
!23 = !{!10, !6, i64 944}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !11, i64 928}
!28 = !{!29, !13, i64 0}
!29 = !{!"png_text_struct", !13, i64 0, !6, i64 8, !6, i64 16, !11, i64 24}
!30 = !{!29, !6, i64 8}
!31 = !{!29, !6, i64 16}
!32 = !{!13, !13, 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.14 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @png_push_read_tEXt(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 904
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %.not = icmp eq i64 %4, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 936
  %.pre = load i64, ptr %.phi.trans.insert, align 8, !tbaa !19
  br i1 %.not, label %._crit_edge, label %5

5:                                                ; preds = %2
  %.not43 = icmp eq i64 %.pre, 0
  br i1 %.not43, label %.thread, label %6

6:                                                ; preds = %5
  %. = tail call i64 @llvm.umin.i64(i64 %4, i64 %.pre)
  %7 = getelementptr inbounds i8, ptr %0, i64 952
  %8 = load ptr, ptr %7, align 8, !tbaa !20
  tail call void @png_crc_read(ptr noundef nonnull %0, ptr noundef %8, i64 noundef %.) #3
  %9 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !19
  %10 = sub i64 %9, %.
  store i64 %10, ptr %.phi.trans.insert, align 8, !tbaa !19
  %11 = load ptr, ptr %7, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %11, i64 %.
  store ptr %12, ptr %7, align 8, !tbaa !20
  br label %._crit_edge

._crit_edge:                                      ; preds = %2, %6
  %13 = phi i64 [ %10, %6 ], [ %.pre, %2 ]
  %.not44 = icmp eq i64 %13, 0
  br i1 %.not44, label %.thread, label %33

.thread:                                          ; preds = %5, %._crit_edge
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = icmp ult i64 %14, 4
  br i1 %15, label %16, label %17

16:                                               ; preds = %.thread
  tail call void @png_push_save_buffer(ptr noundef nonnull %0)
  br label %33

17:                                               ; preds = %.thread
  tail call void @png_push_crc_finish(ptr noundef nonnull %0)
  %18 = getelementptr inbounds i8, ptr %0, i64 944
  %19 = load ptr, ptr %18, align 8, !tbaa !21
  br label %20

20:                                               ; preds = %20, %17
  %.040 = phi ptr [ %19, %17 ], [ %22, %20 ]
  %21 = load i8, ptr %.040, align 1, !tbaa !22
  %.not45 = icmp eq i8 %21, 0
  %22 = getelementptr inbounds i8, ptr %.040, i64 1
  br i1 %.not45, label %23, label %20, !llvm.loop !23

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 928
  %25 = load i64, ptr %24, align 8, !tbaa !25
  %26 = getelementptr inbounds i8, ptr %19, i64 %25
  %27 = icmp ult ptr %.040, %26
  %spec.select.idx = zext i1 %27 to i64
  %spec.select = getelementptr inbounds i8, ptr %.040, i64 %spec.select.idx
  %28 = tail call ptr @png_malloc(ptr noundef %0, i64 noundef 32) #3
  store i32 -1, ptr %28, align 8, !tbaa !26
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  store ptr %19, ptr %29, align 8, !tbaa !28
  %30 = getelementptr inbounds i8, ptr %28, i64 16
  store ptr %spec.select, ptr %30, align 8, !tbaa !29
  %31 = tail call i32 @png_set_text_2(ptr noundef %0, ptr noundef %1, ptr noundef nonnull %28, i32 noundef 1) #3
  tail call void @png_free(ptr noundef %0, ptr noundef %19) #3
  tail call void @png_free(ptr noundef %0, ptr noundef nonnull %28) #3
  store ptr null, ptr %18, align 8, !tbaa !21
  %.not46 = icmp eq i32 %31, 0
  br i1 %.not46, label %33, label %32

32:                                               ; preds = %23
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #3
  br label %33

33:                                               ; preds = %16, %32, %23, %._crit_edge
  ret void
}

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

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

declare void @png_crc_read(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare ptr @png_malloc(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @png_free(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @png_set_text_2(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 904}
!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 = !{!6, !10, i64 936}
!20 = !{!6, !9, i64 952}
!21 = !{!6, !9, i64 944}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!6, !10, i64 928}
!26 = !{!27, !12, i64 0}
!27 = !{!"png_text_struct", !12, i64 0, !9, i64 8, !9, i64 16, !10, i64 24}
!28 = !{!27, !9, i64 8}
!29 = !{!27, !9, i64 16}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass