; LLVM IR from Try/Tempest :: Engine/thirdparty/libpng (png)

; 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 }

; 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: 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) #1

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

declare noalias ptr @png_malloc_warn(ptr noundef, i64 noundef) #3

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

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

; Function Attrs: nounwind uwtable
define dso_local noalias ptr @png_create_png_struct(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.png_struct_def, align 8
  %17 = alloca [1 x %struct.__jmp_buf_tag], align 16
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1256, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 200, ptr %17) #7
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 1256, i1 false)
  %20 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 132
  store i32 1000000, ptr %20, align 4, !tbaa !9
  %21 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 133
  store i32 1000000, ptr %21, align 8, !tbaa !21
  %22 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 134
  store i32 1000, ptr %22, align 4, !tbaa !22
  %23 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 135
  store i64 8000000, ptr %23, align 8, !tbaa !23
  %24 = load ptr, ptr %13, align 8, !tbaa !5
  %25 = load ptr, ptr %14, align 8, !tbaa !5
  %26 = load ptr, ptr %15, align 8, !tbaa !5
  call void @png_set_mem_fn(ptr noundef %16, ptr noundef %24, ptr noundef %25, ptr noundef %26)
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  call void @png_set_error_fn(ptr noundef %16, ptr noundef %27, ptr noundef %28, ptr noundef %29)
  %30 = getelementptr inbounds [1 x %struct.__jmp_buf_tag], ptr %17, i64 0, i64 0
  %31 = call i32 @_setjmp(ptr noundef %30) #8
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %62, label %33

33:                                               ; preds = %7
  %34 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 2
  store ptr %17, ptr %34, align 8, !tbaa !24
  %35 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 3
  store i64 0, ptr %35, align 8, !tbaa !25
  %36 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 1
  store ptr @longjmp, ptr %36, align 8, !tbaa !26
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = call i32 @png_user_version_check(ptr noundef %16, ptr noundef %37)
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %61

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %41 = call noalias ptr @png_malloc_warn(ptr noundef %16, i64 noundef 1256)
  store ptr %41, ptr %18, align 8, !tbaa !5
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %57

44:                                               ; preds = %40
  %45 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 19
  %46 = getelementptr inbounds %struct.z_stream_s, ptr %45, i32 0, i32 8
  store ptr @png_zalloc, ptr %46, align 8, !tbaa !27
  %47 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 19
  %48 = getelementptr inbounds %struct.z_stream_s, ptr %47, i32 0, i32 9
  store ptr @png_zfree, ptr %48, align 8, !tbaa !28
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 19
  %51 = getelementptr inbounds %struct.z_stream_s, ptr %50, i32 0, i32 10
  store ptr %49, ptr %51, align 8, !tbaa !29
  %52 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 2
  store ptr null, ptr %52, align 8, !tbaa !24
  %53 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 3
  store i64 0, ptr %53, align 8, !tbaa !25
  %54 = getelementptr inbounds %struct.png_struct_def, ptr %16, i32 0, i32 1
  store ptr null, ptr %54, align 8, !tbaa !26
  %55 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %55, ptr align 8 %16, i64 1256, i1 false), !tbaa.struct !30
  %56 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %56, ptr %8, align 8
  store i32 1, ptr %19, align 4
  br label %58

57:                                               ; preds = %40
  store i32 0, ptr %19, align 4
  br label %58

58:                                               ; preds = %57, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %59 = load i32, ptr %19, align 4
  switch i32 %59, label %63 [
    i32 0, label %60
  ]

60:                                               ; preds = %58
  br label %61

61:                                               ; preds = %60, %33
  br label %62

62:                                               ; preds = %61, %7
  store ptr null, ptr %8, align 8
  store i32 1, ptr %19, align 4
  br label %63

63:                                               ; preds = %62, %58
  call void @llvm.lifetime.end.p0(i64 200, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1256, ptr %16) #7
  %64 = load ptr, ptr %8, align 8
  ret ptr %64
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) #5

; Function Attrs: noreturn nounwind
declare void @longjmp(ptr noundef, i32 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind returns_twice "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 #6 = { noreturn nounwind "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 #7 = { nounwind }
attributes #8 = { nounwind returns_twice }

!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, !12, i64 1052}
!10 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !11, 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, !12, i64 300, !12, i64 304, !12, i64 308, !12, i64 312, !13, i64 320, !6, i64 432, !12, i64 440, !12, i64 444, !12, i64 448, !12, i64 452, !12, i64 456, !12, i64 460, !12, i64 464, !12, i64 468, !12, i64 472, !12, i64 476, !12, i64 480, !12, i64 484, !12, i64 488, !12, i64 492, !12, i64 496, !12, i64 500, !12, i64 504, !12, i64 508, !12, i64 512, !12, i64 516, !11, i64 520, !12, i64 528, !12, i64 532, !12, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !11, i64 576, !12, i64 584, !12, i64 588, !6, i64 592, !14, i64 600, !12, i64 604, !14, 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, !14, i64 626, !7, i64 628, !12, i64 632, !15, i64 636, !15, i64 646, !6, i64 656, !12, i64 664, !12, i64 668, !12, i64 672, !12, i64 676, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !16, i64 728, !16, i64 733, !6, i64 744, !15, 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, !12, i64 840, !12, i64 844, !11, i64 848, !11, i64 856, !11, i64 864, !11, i64 872, !12, i64 880, !12, i64 884, !6, i64 888, !6, i64 896, !12, i64 904, !7, i64 908, !12, i64 940, !6, i64 944, !6, i64 952, !12, i64 960, !12, i64 964, !6, i64 968, !7, i64 976, !7, i64 977, !14, i64 978, !14, i64 980, !12, 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, !12, i64 1052, !12, i64 1056, !12, i64 1060, !11, i64 1064, !17, i64 1072, !11, i64 1104, !6, i64 1112, !11, i64 1120, !12, i64 1128, !12, i64 1132, !6, i64 1136, !7, i64 1144, !18, i64 1176}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"z_stream_s", !6, i64 0, !12, i64 8, !11, i64 16, !6, i64 24, !12, i64 32, !11, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !12, i64 88, !11, i64 96, !11, i64 104}
!14 = !{!"short", !7, i64 0}
!15 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!16 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!17 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !11, i64 16, !7, i64 24}
!18 = !{!"png_colorspace", !12, i64 0, !19, i64 4, !20, i64 36, !14, i64 72, !14, i64 74}
!19 = !{!"png_xy", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!20 = !{!"png_XYZ", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32}
!21 = !{!10, !12, i64 1056}
!22 = !{!10, !12, i64 1060}
!23 = !{!10, !11, i64 1064}
!24 = !{!10, !6, i64 208}
!25 = !{!10, !11, i64 216}
!26 = !{!10, !6, i64 200}
!27 = !{!10, !6, i64 384}
!28 = !{!10, !6, i64 392}
!29 = !{!10, !6, i64 400}
!30 = !{i64 0, i64 200, !31, i64 200, i64 8, !5, i64 208, i64 8, !5, i64 216, i64 8, !32, i64 224, i64 8, !5, i64 232, i64 8, !5, i64 240, i64 8, !5, i64 248, i64 8, !5, i64 256, i64 8, !5, i64 264, i64 8, !5, i64 272, i64 8, !5, i64 280, i64 8, !5, i64 288, i64 8, !5, i64 296, i64 1, !31, i64 297, i64 1, !31, i64 300, i64 4, !33, i64 304, i64 4, !33, i64 308, i64 4, !33, i64 312, i64 4, !33, i64 320, i64 8, !5, i64 328, i64 4, !33, i64 336, i64 8, !32, i64 344, i64 8, !5, i64 352, i64 4, !33, i64 360, i64 8, !32, i64 368, i64 8, !5, i64 376, i64 8, !5, i64 384, i64 8, !5, i64 392, i64 8, !5, i64 400, i64 8, !5, i64 408, i64 4, !33, i64 416, i64 8, !32, i64 424, i64 8, !32, i64 432, i64 8, !5, i64 440, i64 4, !33, i64 444, i64 4, !33, i64 448, i64 4, !33, i64 452, i64 4, !33, i64 456, i64 4, !33, i64 460, i64 4, !33, i64 464, i64 4, !33, i64 468, i64 4, !33, i64 472, i64 4, !33, i64 476, i64 4, !33, i64 480, i64 4, !33, i64 484, i64 4, !33, i64 488, i64 4, !33, i64 492, i64 4, !33, i64 496, i64 4, !33, i64 500, i64 4, !33, i64 504, i64 4, !33, i64 508, i64 4, !33, i64 512, i64 4, !33, i64 516, i64 4, !33, i64 520, i64 8, !32, i64 528, i64 4, !33, i64 532, i64 4, !33, i64 536, i64 4, !33, i64 544, i64 8, !5, i64 552, i64 8, !5, i64 560, i64 8, !5, i64 568, i64 8, !5, i64 576, i64 8, !32, i64 584, i64 4, !33, i64 588, i64 4, !33, i64 592, i64 8, !5, i64 600, i64 2, !34, i64 604, i64 4, !33, i64 608, i64 2, !34, i64 610, i64 1, !31, i64 611, i64 1, !31, i64 612, i64 1, !31, i64 613, i64 1, !31, i64 614, i64 1, !31, i64 615, i64 1, !31, i64 616, i64 1, !31, i64 617, i64 1, !31, i64 618, i64 1, !31, i64 619, i64 1, !31, i64 620, i64 1, !31, i64 621, i64 1, !31, i64 622, i64 1, !31, i64 623, i64 1, !31, i64 624, i64 1, !31, i64 626, i64 2, !34, i64 628, i64 1, !31, i64 632, i64 4, !33, i64 636, i64 1, !31, i64 638, i64 2, !34, i64 640, i64 2, !34, i64 642, i64 2, !34, i64 644, i64 2, !34, i64 646, i64 1, !31, i64 648, i64 2, !34, i64 650, i64 2, !34, i64 652, i64 2, !34, i64 654, i64 2, !34, i64 656, i64 8, !5, i64 664, i64 4, !33, i64 668, i64 4, !33, i64 672, i64 4, !33, i64 676, i64 4, !33, i64 680, i64 8, !5, i64 688, i64 8, !5, i64 696, i64 8, !5, i64 704, i64 8, !5, i64 712, i64 8, !5, i64 720, i64 8, !5, i64 728, i64 1, !31, i64 729, i64 1, !31, i64 730, i64 1, !31, i64 731, i64 1, !31, i64 732, i64 1, !31, i64 733, i64 1, !31, i64 734, i64 1, !31, i64 735, i64 1, !31, i64 736, i64 1, !31, i64 737, i64 1, !31, i64 744, i64 8, !5, i64 752, i64 1, !31, i64 754, i64 2, !34, i64 756, i64 2, !34, i64 758, i64 2, !34, i64 760, i64 2, !34, i64 768, i64 8, !5, i64 776, i64 8, !5, i64 784, i64 8, !5, i64 792, i64 8, !5, i64 800, i64 8, !5, i64 808, i64 8, !5, i64 816, i64 8, !5, i64 824, i64 8, !5, i64 832, i64 8, !5, i64 840, i64 4, !33, i64 844, i64 4, !33, i64 848, i64 8, !32, i64 856, i64 8, !32, i64 864, i64 8, !32, i64 872, i64 8, !32, i64 880, i64 4, !33, i64 884, i64 4, !33, i64 888, i64 8, !5, i64 896, i64 8, !5, i64 904, i64 4, !33, i64 908, i64 29, !31, i64 940, i64 4, !33, i64 944, i64 8, !5, i64 952, i64 8, !5, i64 960, i64 4, !33, i64 964, i64 4, !33, i64 968, i64 8, !5, i64 976, i64 1, !31, i64 977, i64 1, !31, i64 978, i64 2, !34, i64 980, i64 2, !34, i64 984, i64 4, !33, i64 988, i64 1, !31, i64 992, i64 8, !5, i64 1000, i64 8, !5, i64 1008, i64 8, !5, i64 1016, i64 8, !5, i64 1024, i64 8, !5, i64 1032, i64 8, !5, i64 1040, i64 8, !5, i64 1048, i64 1, !31, i64 1052, i64 4, !33, i64 1056, i64 4, !33, i64 1060, i64 4, !33, i64 1064, i64 8, !32, i64 1072, i64 5, !31, i64 1080, i64 8, !5, i64 1088, i64 8, !32, i64 1096, i64 1, !31, i64 1104, i64 8, !32, i64 1112, i64 8, !5, i64 1120, i64 8, !32, i64 1128, i64 4, !33, i64 1132, i64 4, !33, i64 1136, i64 8, !5, i64 1144, i64 32, !31, i64 1176, i64 4, !33, i64 1180, i64 4, !33, i64 1184, i64 4, !33, i64 1188, i64 4, !33, i64 1192, i64 4, !33, i64 1196, i64 4, !33, i64 1200, i64 4, !33, i64 1204, i64 4, !33, i64 1208, i64 4, !33, i64 1212, i64 4, !33, i64 1216, i64 4, !33, i64 1220, i64 4, !33, i64 1224, i64 4, !33, i64 1228, i64 4, !33, i64 1232, i64 4, !33, i64 1236, i64 4, !33, i64 1240, i64 4, !33, i64 1244, i64 4, !33, i64 1248, i64 2, !34, i64 1250, i64 2, !34}
!31 = !{!7, !7, i64 0}
!32 = !{!11, !11, i64 0}
!33 = !{!12, !12, i64 0}
!34 = !{!14, !14, 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"

%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 }

; 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: 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) #1

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

declare noalias ptr @png_malloc_warn(ptr noundef, i64 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
define dso_local noalias ptr @png_create_png_struct(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #2 {
  %8 = alloca %struct.png_struct_def, align 8
  %9 = alloca [1 x %struct.__jmp_buf_tag], align 16
  call void @llvm.lifetime.start.p0(i64 1256, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %9) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1256) %8, i8 0, i64 1256, i1 false)
  %10 = getelementptr inbounds i8, ptr %8, i64 1052
  store i32 1000000, ptr %10, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %8, i64 1056
  store i32 1000000, ptr %11, align 8, !tbaa !20
  %12 = getelementptr inbounds i8, ptr %8, i64 1060
  store i32 1000, ptr %12, align 4, !tbaa !21
  %13 = getelementptr inbounds i8, ptr %8, i64 1064
  store i64 8000000, ptr %13, align 8, !tbaa !22
  call void @png_set_mem_fn(ptr noundef nonnull %8, ptr noundef %4, ptr noundef %5, ptr noundef %6) #7
  call void @png_set_error_fn(ptr noundef nonnull %8, ptr noundef %1, ptr noundef %2, ptr noundef %3) #7
  %14 = call i32 @_setjmp(ptr noundef nonnull %9) #8
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %15, label %.critedge

15:                                               ; preds = %7
  %16 = getelementptr inbounds i8, ptr %8, i64 208
  store ptr %9, ptr %16, align 8, !tbaa !23
  %17 = getelementptr inbounds i8, ptr %8, i64 216
  store i64 0, ptr %17, align 8, !tbaa !24
  %18 = getelementptr inbounds i8, ptr %8, i64 200
  store ptr @longjmp, ptr %18, align 8, !tbaa !25
  %19 = call i32 @png_user_version_check(ptr noundef nonnull %8, ptr noundef %0)
  %.not14 = icmp eq i32 %19, 0
  br i1 %.not14, label %.critedge, label %20

20:                                               ; preds = %15
  %21 = call noalias ptr @png_malloc_warn(ptr noundef nonnull %8, i64 noundef 1256) #7
  %.not15 = icmp eq ptr %21, null
  br i1 %.not15, label %.critedge, label %22

22:                                               ; preds = %20
  %23 = getelementptr inbounds i8, ptr %8, i64 384
  store ptr @png_zalloc, ptr %23, align 8, !tbaa !26
  %24 = getelementptr inbounds i8, ptr %8, i64 392
  store ptr @png_zfree, ptr %24, align 8, !tbaa !27
  %25 = getelementptr inbounds i8, ptr %8, i64 400
  store ptr %21, ptr %25, align 8, !tbaa !28
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %18, i8 0, i64 24, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1256) %21, ptr noundef nonnull align 8 dereferenceable(1256) %8, i64 1256, i1 false), !tbaa.struct !29
  br label %.critedge

.critedge:                                        ; preds = %7, %15, %20, %22
  %.1 = phi ptr [ %21, %22 ], [ null, %20 ], [ null, %15 ], [ null, %7 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 1256, ptr nonnull %8) #7
  ret ptr %.1
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

; Function Attrs: nounwind returns_twice
declare i32 @_setjmp(ptr noundef) local_unnamed_addr #5

; Function Attrs: noreturn nounwind
declare void @longjmp(ptr noundef, i32 noundef) #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind returns_twice "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 #6 = { noreturn nounwind "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 #7 = { nounwind }
attributes #8 = { nounwind returns_twice }

!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 1052}
!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 = !{!6, !11, i64 1056}
!21 = !{!6, !11, i64 1060}
!22 = !{!6, !10, i64 1064}
!23 = !{!6, !9, i64 208}
!24 = !{!6, !10, i64 216}
!25 = !{!6, !9, i64 200}
!26 = !{!6, !9, i64 384}
!27 = !{!6, !9, i64 392}
!28 = !{!6, !9, i64 400}
!29 = !{i64 0, i64 200, !30, i64 200, i64 8, !31, i64 208, i64 8, !31, i64 216, i64 8, !32, i64 224, i64 8, !31, i64 232, i64 8, !31, i64 240, i64 8, !31, i64 248, i64 8, !31, i64 256, i64 8, !31, i64 264, i64 8, !31, i64 272, i64 8, !31, i64 280, i64 8, !31, i64 288, i64 8, !31, i64 296, i64 1, !30, i64 297, i64 1, !30, i64 300, i64 4, !33, i64 304, i64 4, !33, i64 308, i64 4, !33, i64 312, i64 4, !33, i64 320, i64 8, !31, i64 328, i64 4, !33, i64 336, i64 8, !32, i64 344, i64 8, !31, i64 352, i64 4, !33, i64 360, i64 8, !32, i64 368, i64 8, !31, i64 376, i64 8, !31, i64 384, i64 8, !31, i64 392, i64 8, !31, i64 400, i64 8, !31, i64 408, i64 4, !33, i64 416, i64 8, !32, i64 424, i64 8, !32, i64 432, i64 8, !31, i64 440, i64 4, !33, i64 444, i64 4, !33, i64 448, i64 4, !33, i64 452, i64 4, !33, i64 456, i64 4, !33, i64 460, i64 4, !33, i64 464, i64 4, !33, i64 468, i64 4, !33, i64 472, i64 4, !33, i64 476, i64 4, !33, i64 480, i64 4, !33, i64 484, i64 4, !33, i64 488, i64 4, !33, i64 492, i64 4, !33, i64 496, i64 4, !33, i64 500, i64 4, !33, i64 504, i64 4, !33, i64 508, i64 4, !33, i64 512, i64 4, !33, i64 516, i64 4, !33, i64 520, i64 8, !32, i64 528, i64 4, !33, i64 532, i64 4, !33, i64 536, i64 4, !33, i64 544, i64 8, !31, i64 552, i64 8, !31, i64 560, i64 8, !31, i64 568, i64 8, !31, i64 576, i64 8, !32, i64 584, i64 4, !33, i64 588, i64 4, !33, i64 592, i64 8, !31, i64 600, i64 2, !34, i64 604, i64 4, !33, i64 608, i64 2, !34, i64 610, i64 1, !30, i64 611, i64 1, !30, i64 612, i64 1, !30, i64 613, i64 1, !30, i64 614, i64 1, !30, i64 615, i64 1, !30, i64 616, i64 1, !30, i64 617, i64 1, !30, i64 618, i64 1, !30, i64 619, i64 1, !30, i64 620, i64 1, !30, i64 621, i64 1, !30, i64 622, i64 1, !30, i64 623, i64 1, !30, i64 624, i64 1, !30, i64 626, i64 2, !34, i64 628, i64 1, !30, i64 632, i64 4, !33, i64 636, i64 1, !30, i64 638, i64 2, !34, i64 640, i64 2, !34, i64 642, i64 2, !34, i64 644, i64 2, !34, i64 646, i64 1, !30, i64 648, i64 2, !34, i64 650, i64 2, !34, i64 652, i64 2, !34, i64 654, i64 2, !34, i64 656, i64 8, !31, i64 664, i64 4, !33, i64 668, i64 4, !33, i64 672, i64 4, !33, i64 676, i64 4, !33, i64 680, i64 8, !31, i64 688, i64 8, !31, i64 696, i64 8, !31, i64 704, i64 8, !31, i64 712, i64 8, !31, i64 720, i64 8, !31, i64 728, i64 1, !30, i64 729, i64 1, !30, i64 730, i64 1, !30, i64 731, i64 1, !30, i64 732, i64 1, !30, i64 733, i64 1, !30, i64 734, i64 1, !30, i64 735, i64 1, !30, i64 736, i64 1, !30, i64 737, i64 1, !30, i64 744, i64 8, !31, i64 752, i64 1, !30, i64 754, i64 2, !34, i64 756, i64 2, !34, i64 758, i64 2, !34, i64 760, i64 2, !34, i64 768, i64 8, !31, i64 776, i64 8, !31, i64 784, i64 8, !31, i64 792, i64 8, !31, i64 800, i64 8, !31, i64 808, i64 8, !31, i64 816, i64 8, !31, i64 824, i64 8, !31, i64 832, i64 8, !31, i64 840, i64 4, !33, i64 844, i64 4, !33, i64 848, i64 8, !32, i64 856, i64 8, !32, i64 864, i64 8, !32, i64 872, i64 8, !32, i64 880, i64 4, !33, i64 884, i64 4, !33, i64 888, i64 8, !31, i64 896, i64 8, !31, i64 904, i64 4, !33, i64 908, i64 29, !30, i64 940, i64 4, !33, i64 944, i64 8, !31, i64 952, i64 8, !31, i64 960, i64 4, !33, i64 964, i64 4, !33, i64 968, i64 8, !31, i64 976, i64 1, !30, i64 977, i64 1, !30, i64 978, i64 2, !34, i64 980, i64 2, !34, i64 984, i64 4, !33, i64 988, i64 1, !30, i64 992, i64 8, !31, i64 1000, i64 8, !31, i64 1008, i64 8, !31, i64 1016, i64 8, !31, i64 1024, i64 8, !31, i64 1032, i64 8, !31, i64 1040, i64 8, !31, i64 1048, i64 1, !30, i64 1052, i64 4, !33, i64 1056, i64 4, !33, i64 1060, i64 4, !33, i64 1064, i64 8, !32, i64 1072, i64 5, !30, i64 1080, i64 8, !31, i64 1088, i64 8, !32, i64 1096, i64 1, !30, i64 1104, i64 8, !32, i64 1112, i64 8, !31, i64 1120, i64 8, !32, i64 1128, i64 4, !33, i64 1132, i64 4, !33, i64 1136, i64 8, !31, i64 1144, i64 32, !30, i64 1176, i64 4, !33, i64 1180, i64 4, !33, i64 1184, i64 4, !33, i64 1188, i64 4, !33, i64 1192, i64 4, !33, i64 1196, i64 4, !33, i64 1200, i64 4, !33, i64 1204, i64 4, !33, i64 1208, i64 4, !33, i64 1212, i64 4, !33, i64 1216, i64 4, !33, i64 1220, i64 4, !33, i64 1224, i64 4, !33, i64 1228, i64 4, !33, i64 1232, i64 4, !33, i64 1236, i64 4, !33, i64 1240, i64 4, !33, i64 1244, i64 4, !33, i64 1248, i64 2, !34, i64 1250, i64 2, !34}
!30 = !{!7, !7, i64 0}
!31 = !{!9, !9, i64 0}
!32 = !{!10, !10, i64 0}
!33 = !{!11, !11, i64 0}
!34 = !{!13, !13, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass