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

; 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_info_def = type { i32, i32, i32, i64, ptr, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, [8 x i8], %struct.png_colorspace, ptr, ptr, i32, i32, i32, ptr, %struct.png_time_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, %struct.png_color_16_struct, i32, i32, i8, i32, i32, i8, i32, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, i8, i8, i32, ptr, i32, ptr, i32, i8, ptr, ptr, ptr }
%struct.png_colorspace = type { i32, %struct.png_xy, %struct.png_XYZ, i16, i16 }
%struct.png_xy = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.png_XYZ = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.png_time_struct = type { i16, i8, 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_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_unknown_chunk_t = type { [5 x i8], ptr, i64, i8 }

@.str.29 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 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) #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

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

declare void @png_free_data(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

; Function Attrs: noreturn
declare void @png_error(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @png_set_PLTE(ptr noalias noundef %0, ptr noalias noundef %1, ptr noundef %2, i32 noundef %3) #4 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %16, label %13

13:                                               ; preds = %4
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %13, %4
  store i32 1, ptr %10, align 4
  br label %102

17:                                               ; preds = %13
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.png_info_def, ptr %18, i32 0, i32 8
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = zext i8 %20 to i32
  %22 = icmp eq i32 %21, 3
  br i1 %22, label %23, label %29

23:                                               ; preds = %17
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.png_info_def, ptr %24, i32 0, i32 7
  %26 = load i8, ptr %25, align 4, !tbaa !21
  %27 = zext i8 %26 to i32
  %28 = shl i32 1, %27
  br label %30

29:                                               ; preds = %17
  br label %30

30:                                               ; preds = %29, %23
  %31 = phi i32 [ %28, %23 ], [ 256, %29 ]
  store i32 %31, ptr %9, align 4, !tbaa !9
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %38, label %34

34:                                               ; preds = %30
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = icmp sgt i32 %35, %36
  br i1 %37, label %38, label %48

38:                                               ; preds = %34, %30
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.png_info_def, ptr %39, i32 0, i32 8
  %41 = load i8, ptr %40, align 1, !tbaa !11
  %42 = zext i8 %41 to i32
  %43 = icmp eq i32 %42, 3
  br i1 %43, label %44, label %46

44:                                               ; preds = %38
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_error(ptr noundef %45, ptr noundef @.str.29) #6
  unreachable

46:                                               ; preds = %38
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_warning(ptr noundef %47, ptr noundef @.str.29)
  store i32 1, ptr %10, align 4
  br label %102

48:                                               ; preds = %34
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %51, label %54

51:                                               ; preds = %48
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = icmp eq ptr %52, null
  br i1 %53, label %63, label %54

54:                                               ; preds = %51, %48
  %55 = load i32, ptr %8, align 4, !tbaa !9
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %65

57:                                               ; preds = %54
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.png_struct_def, ptr %58, i32 0, i32 122
  %60 = load i32, ptr %59, align 8, !tbaa !22
  %61 = and i32 %60, 1
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %65

63:                                               ; preds = %57, %51
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_error(ptr noundef %64, ptr noundef @.str.30) #6
  unreachable

65:                                               ; preds = %57, %54
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  call void @png_free_data(ptr noundef %66, ptr noundef %67, i32 noundef 4096, i32 noundef 0)
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = call noalias ptr @png_calloc(ptr noundef %68, i64 noundef 768)
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.png_struct_def, ptr %70, i32 0, i32 52
  store ptr %69, ptr %71, align 8, !tbaa !26
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %74, label %82

74:                                               ; preds = %65
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.png_struct_def, ptr %75, i32 0, i32 52
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = mul i64 %80, 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %77, ptr align 1 %78, i64 %81, i1 false)
  br label %82

82:                                               ; preds = %74, %65
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.png_struct_def, ptr %83, i32 0, i32 52
  %85 = load ptr, ptr %84, align 8, !tbaa !26
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.png_info_def, ptr %86, i32 0, i32 4
  store ptr %85, ptr %87, align 8, !tbaa !27
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = trunc i32 %88 to i16
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.png_struct_def, ptr %90, i32 0, i32 53
  store i16 %89, ptr %91, align 8, !tbaa !28
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.png_info_def, ptr %92, i32 0, i32 5
  store i16 %89, ptr %93, align 8, !tbaa !29
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.png_info_def, ptr %94, i32 0, i32 45
  %96 = load i32, ptr %95, align 4, !tbaa !30
  %97 = or i32 %96, 4096
  store i32 %97, ptr %95, align 4, !tbaa !30
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.png_info_def, ptr %98, i32 0, i32 2
  %100 = load i32, ptr %99, align 8, !tbaa !31
  %101 = or i32 %100, 8
  store i32 %101, ptr %99, align 8, !tbaa !31
  store i32 0, ptr %10, align 4
  br label %102

102:                                              ; preds = %82, %46, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %103 = load i32, ptr %10, align 4
  switch i32 %103, label %105 [
    i32 0, label %104
    i32 1, label %104
  ]

104:                                              ; preds = %102, %102
  ret void

105:                                              ; preds = %102
  unreachable
}

declare noalias ptr @png_calloc(ptr noundef, i64 noundef) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !7, i64 37}
!12 = !{!"png_info_def", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !6, i64 24, !14, i64 32, !14, i64 34, !7, i64 36, !7, i64 37, !7, i64 38, !7, i64 39, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 43, !7, i64 44, !15, i64 52, !6, i64 128, !6, i64 136, !10, i64 144, !10, i64 148, !10, i64 152, !6, i64 160, !18, i64 168, !19, i64 176, !6, i64 184, !20, i64 192, !20, i64 202, !10, i64 212, !10, i64 216, !7, i64 220, !10, i64 224, !10, i64 228, !7, i64 232, !10, i64 236, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !10, i64 272, !10, i64 276, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !10, i64 300, !6, i64 304, !10, i64 312, !6, i64 320, !10, i64 328, !7, i64 332, !6, i64 336, !6, i64 344, !6, i64 352}
!13 = !{!"long", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"png_colorspace", !10, i64 0, !16, i64 4, !17, i64 36, !14, i64 72, !14, i64 74}
!16 = !{!"png_xy", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!17 = !{!"png_XYZ", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!18 = !{!"png_time_struct", !14, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6}
!19 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!20 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!21 = !{!12, !7, i64 36}
!22 = !{!23, !10, i64 984}
!23 = !{!"png_struct_def", !7, i64 0, !6, i64 200, !6, i64 208, !13, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !10, i64 300, !10, i64 304, !10, i64 308, !10, i64 312, !24, i64 320, !6, i64 432, !10, i64 440, !10, i64 444, !10, i64 448, !10, i64 452, !10, i64 456, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !10, i64 488, !10, i64 492, !10, i64 496, !10, i64 500, !10, i64 504, !10, i64 508, !10, i64 512, !10, i64 516, !13, i64 520, !10, i64 528, !10, i64 532, !10, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !13, i64 576, !10, i64 584, !10, i64 588, !6, i64 592, !14, i64 600, !10, 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, !10, i64 632, !20, i64 636, !20, i64 646, !6, i64 656, !10, i64 664, !10, i64 668, !10, i64 672, !10, i64 676, !6, i64 680, !6, i64 688, !6, i64 696, !6, i64 704, !6, i64 712, !6, i64 720, !19, i64 728, !19, i64 733, !6, i64 744, !20, i64 752, !6, i64 768, !6, i64 776, !6, i64 784, !6, i64 792, !6, i64 800, !6, i64 808, !6, i64 816, !6, i64 824, !6, i64 832, !10, i64 840, !10, i64 844, !13, i64 848, !13, i64 856, !13, i64 864, !13, i64 872, !10, i64 880, !10, i64 884, !6, i64 888, !6, i64 896, !10, i64 904, !7, i64 908, !10, i64 940, !6, i64 944, !6, i64 952, !10, i64 960, !10, i64 964, !6, i64 968, !7, i64 976, !7, i64 977, !14, i64 978, !14, i64 980, !10, i64 984, !7, i64 988, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !6, i64 1024, !6, i64 1032, !6, i64 1040, !7, i64 1048, !10, i64 1052, !10, i64 1056, !10, i64 1060, !13, i64 1064, !25, i64 1072, !13, i64 1104, !6, i64 1112, !13, i64 1120, !10, i64 1128, !10, i64 1132, !6, i64 1136, !7, i64 1144, !15, i64 1176}
!24 = !{!"z_stream_s", !6, i64 0, !10, i64 8, !13, i64 16, !6, i64 24, !10, i64 32, !13, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !10, i64 88, !13, i64 96, !13, i64 104}
!25 = !{!"png_unknown_chunk_t", !7, i64 0, !6, i64 8, !13, i64 16, !7, i64 24}
!26 = !{!23, !6, i64 592}
!27 = !{!12, !6, i64 24}
!28 = !{!23, !14, i64 600}
!29 = !{!12, !14, i64 32}
!30 = !{!12, !10, i64 300}
!31 = !{!12, !10, i64 8}


; 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.29 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [16 x i8], align 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) #0

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

declare void @png_free_data(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local void @png_set_PLTE(ptr noalias noundef %0, ptr noalias noundef %1, ptr noundef readonly %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = icmp eq ptr %0, null
  %6 = icmp eq ptr %1, null
  %or.cond = or i1 %5, %6
  br i1 %or.cond, label %48, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %1, i64 37
  %9 = load i8, ptr %8, align 1, !tbaa !5
  %10 = icmp eq i8 %9, 3
  br i1 %10, label %11, label %.thread

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %1, i64 36
  %13 = load i8, ptr %12, align 4, !tbaa !19
  %14 = zext nneg i8 %13 to i32
  %15 = shl nuw i32 1, %14
  %16 = icmp slt i32 %3, 0
  %17 = icmp slt i32 %15, %3
  %or.cond34 = select i1 %16, i1 true, i1 %17
  br i1 %or.cond34, label %19, label %20

.thread:                                          ; preds = %7
  %18 = icmp ugt i32 %3, 256
  br i1 %18, label %.thread36, label %20

19:                                               ; preds = %11
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.29) #4
  unreachable

.thread36:                                        ; preds = %.thread
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.29) #5
  br label %48

20:                                               ; preds = %.thread, %11
  %21 = icmp ne i32 %3, 0
  %22 = icmp eq ptr %2, null
  %or.cond3 = and i1 %22, %21
  br i1 %or.cond3, label %30, label %23

23:                                               ; preds = %20
  %24 = icmp eq i32 %3, 0
  br i1 %24, label %25, label %31

25:                                               ; preds = %23
  %26 = getelementptr inbounds i8, ptr %0, i64 984
  %27 = load i32, ptr %26, align 8, !tbaa !20
  %28 = and i32 %27, 1
  %29 = icmp eq i32 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %20, %25
  tail call void @png_error(ptr noundef nonnull %0, ptr noundef nonnull @.str.30) #4
  unreachable

31:                                               ; preds = %25, %23
  tail call void @png_free_data(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef 4096, i32 noundef 0) #5
  %32 = tail call noalias ptr @png_calloc(ptr noundef nonnull %0, i64 noundef 768) #5
  %33 = getelementptr inbounds i8, ptr %0, i64 592
  store ptr %32, ptr %33, align 8, !tbaa !24
  br i1 %21, label %34, label %37

34:                                               ; preds = %31
  %35 = zext nneg i32 %3 to i64
  %36 = mul nuw nsw i64 %35, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %32, ptr align 1 %2, i64 %36, i1 false)
  br label %37

37:                                               ; preds = %34, %31
  %38 = getelementptr inbounds i8, ptr %1, i64 24
  store ptr %32, ptr %38, align 8, !tbaa !25
  %39 = trunc i32 %3 to i16
  %40 = getelementptr inbounds i8, ptr %0, i64 600
  store i16 %39, ptr %40, align 8, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %1, i64 32
  store i16 %39, ptr %41, align 8, !tbaa !27
  %42 = getelementptr inbounds i8, ptr %1, i64 300
  %43 = load i32, ptr %42, align 4, !tbaa !28
  %44 = or i32 %43, 4096
  store i32 %44, ptr %42, align 4, !tbaa !28
  %45 = getelementptr inbounds i8, ptr %1, i64 8
  %46 = load i32, ptr %45, align 8, !tbaa !29
  %47 = or i32 %46, 8
  store i32 %47, ptr %45, align 8, !tbaa !29
  br label %48

48:                                               ; preds = %4, %37, %.thread36
  ret void
}

declare noalias ptr @png_calloc(ptr noundef, i64 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { noreturn nounwind }
attributes #5 = { 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, !8, i64 37}
!6 = !{!"png_info_def", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !11, i64 24, !12, i64 32, !12, i64 34, !8, i64 36, !8, i64 37, !8, i64 38, !8, i64 39, !8, i64 40, !8, i64 41, !8, i64 42, !8, i64 43, !8, i64 44, !13, i64 52, !11, i64 128, !11, i64 136, !7, i64 144, !7, i64 148, !7, i64 152, !11, i64 160, !16, i64 168, !17, i64 176, !11, i64 184, !18, i64 192, !18, i64 202, !7, i64 212, !7, i64 216, !8, i64 220, !7, i64 224, !7, i64 228, !8, i64 232, !7, i64 236, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !7, i64 272, !7, i64 276, !11, i64 280, !11, i64 288, !8, i64 296, !8, i64 297, !7, i64 300, !11, i64 304, !7, i64 312, !11, i64 320, !7, i64 328, !8, i64 332, !11, i64 336, !11, i64 344, !11, i64 352}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"png_colorspace", !7, i64 0, !14, i64 4, !15, i64 36, !12, i64 72, !12, i64 74}
!14 = !{!"png_xy", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!15 = !{!"png_XYZ", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32}
!16 = !{!"png_time_struct", !12, i64 0, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6}
!17 = !{!"png_color_8_struct", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4}
!18 = !{!"png_color_16_struct", !8, i64 0, !12, i64 2, !12, i64 4, !12, i64 6, !12, i64 8}
!19 = !{!6, !8, i64 36}
!20 = !{!21, !7, i64 984}
!21 = !{!"png_struct_def", !8, i64 0, !11, i64 200, !11, i64 208, !10, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !8, i64 296, !8, i64 297, !7, i64 300, !7, i64 304, !7, i64 308, !7, i64 312, !22, i64 320, !11, i64 432, !7, i64 440, !7, i64 444, !7, i64 448, !7, i64 452, !7, i64 456, !7, i64 460, !7, i64 464, !7, i64 468, !7, i64 472, !7, i64 476, !7, i64 480, !7, i64 484, !7, i64 488, !7, i64 492, !7, i64 496, !7, i64 500, !7, i64 504, !7, i64 508, !7, i64 512, !7, i64 516, !10, i64 520, !7, i64 528, !7, i64 532, !7, i64 536, !11, i64 544, !11, i64 552, !11, i64 560, !11, i64 568, !10, i64 576, !7, i64 584, !7, i64 588, !11, i64 592, !12, i64 600, !7, i64 604, !12, i64 608, !8, i64 610, !8, i64 611, !8, i64 612, !8, i64 613, !8, i64 614, !8, i64 615, !8, i64 616, !8, i64 617, !8, i64 618, !8, i64 619, !8, i64 620, !8, i64 621, !8, i64 622, !8, i64 623, !8, i64 624, !12, i64 626, !8, i64 628, !7, i64 632, !18, i64 636, !18, i64 646, !11, i64 656, !7, i64 664, !7, i64 668, !7, i64 672, !7, i64 676, !11, i64 680, !11, i64 688, !11, i64 696, !11, i64 704, !11, i64 712, !11, i64 720, !17, i64 728, !17, i64 733, !11, i64 744, !18, i64 752, !11, i64 768, !11, i64 776, !11, i64 784, !11, i64 792, !11, i64 800, !11, i64 808, !11, i64 816, !11, i64 824, !11, i64 832, !7, i64 840, !7, i64 844, !10, i64 848, !10, i64 856, !10, i64 864, !10, i64 872, !7, i64 880, !7, i64 884, !11, i64 888, !11, i64 896, !7, i64 904, !8, i64 908, !7, i64 940, !11, i64 944, !11, i64 952, !7, i64 960, !7, i64 964, !11, i64 968, !8, i64 976, !8, i64 977, !12, i64 978, !12, i64 980, !7, i64 984, !8, i64 988, !11, i64 992, !11, i64 1000, !11, i64 1008, !11, i64 1016, !11, i64 1024, !11, i64 1032, !11, i64 1040, !8, i64 1048, !7, i64 1052, !7, i64 1056, !7, i64 1060, !10, i64 1064, !23, i64 1072, !10, i64 1104, !11, i64 1112, !10, i64 1120, !7, i64 1128, !7, i64 1132, !11, i64 1136, !8, i64 1144, !13, i64 1176}
!22 = !{!"z_stream_s", !11, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !7, i64 32, !10, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !7, i64 88, !10, i64 96, !10, i64 104}
!23 = !{!"png_unknown_chunk_t", !8, i64 0, !11, i64 8, !10, i64 16, !8, i64 24}
!24 = !{!21, !11, i64 592}
!25 = !{!6, !11, i64 24}
!26 = !{!21, !12, i64 600}
!27 = !{!6, !12, i64 32}
!28 = !{!6, !7, i64 300}
!29 = !{!6, !7, i64 8}


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