; LLVM IR from rdguez-mariano/fast_imas_IPOL :: io_png/libs/png (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_struct = type { i64, i64, i64, i64, ptr, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, [8 x i8], float, i8, i32, i32, ptr, %struct.png_time_struct, %struct.png_color_8_struct, ptr, %struct.png_color_16_struct, %struct.png_color_16_struct, i64, i64, i8, i64, i64, i8, ptr, float, float, float, float, float, float, float, float, ptr, i64, i64, ptr, ptr, i8, i8, i64, ptr, i64, ptr, ptr, i64, i8, ptr, i64, i8, double, double, ptr, ptr, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%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_sPLT_struct = type { ptr, i8, ptr, i64 }

@.str.27 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [42 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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local void @png_set_sPLT(ptr noundef %0, ptr 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 ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  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 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %20, label %17

17:                                               ; preds = %4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %17, %4
  store i32 1, ptr %11, align 4
  br label %156

21:                                               ; preds = %17
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.png_info_struct, ptr %23, i32 0, i32 56
  %25 = load i64, ptr %24, align 8, !tbaa !11
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = add i64 %25, %27
  %29 = mul i64 %28, 32
  %30 = call ptr @png_malloc_warn(ptr noundef %22, i64 noundef %29)
  store ptr %30, ptr %9, align 8, !tbaa !5
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br i1 %32, label %33, label %35

33:                                               ; preds = %21
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_warning(ptr noundef %34, ptr noundef @.str.27)
  store i32 1, ptr %11, align 4
  br label %156

35:                                               ; preds = %21
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.png_info_struct, ptr %37, i32 0, i32 55
  %39 = load ptr, ptr %38, align 8, !tbaa !20
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.png_info_struct, ptr %40, i32 0, i32 56
  %42 = load i64, ptr %41, align 8, !tbaa !11
  %43 = mul i64 %42, 32
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %39, i64 %43, i1 false)
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.png_info_struct, ptr %45, i32 0, i32 55
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  call void @png_free(ptr noundef %44, ptr noundef %47)
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.png_info_struct, ptr %48, i32 0, i32 55
  store ptr null, ptr %49, align 8, !tbaa !20
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %135, %35
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %54, label %138

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.png_info_struct, ptr %56, i32 0, i32 56
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = getelementptr inbounds %struct.png_sPLT_struct, ptr %55, i64 %58
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %struct.png_sPLT_struct, ptr %59, i64 %61
  store ptr %62, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds %struct.png_sPLT_struct, ptr %63, i64 %65
  store ptr %66, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %67 = load ptr, ptr %13, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.png_sPLT_struct, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !21
  %70 = call i64 @strlen(ptr noundef %69) #6
  %71 = add i64 %70, 1
  store i64 %71, ptr %14, align 8, !tbaa !23
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = load i64, ptr %14, align 8, !tbaa !23
  %74 = call ptr @png_malloc_warn(ptr noundef %72, i64 noundef %73)
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.png_sPLT_struct, ptr %75, i32 0, i32 0
  store ptr %74, ptr %76, align 8, !tbaa !21
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.png_sPLT_struct, ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %83

81:                                               ; preds = %54
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_warning(ptr noundef %82, ptr noundef @.str.28)
  store i32 4, ptr %11, align 4
  br label %132

83:                                               ; preds = %54
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.png_sPLT_struct, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !21
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.png_sPLT_struct, ptr %87, i32 0, i32 0
  %89 = load ptr, ptr %88, align 8, !tbaa !21
  %90 = load i64, ptr %14, align 8, !tbaa !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %86, ptr align 1 %89, i64 %90, i1 false)
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.png_sPLT_struct, ptr %92, i32 0, i32 3
  %94 = load i64, ptr %93, align 8, !tbaa !24
  %95 = mul i64 %94, 10
  %96 = call ptr @png_malloc_warn(ptr noundef %91, i64 noundef %95)
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.png_sPLT_struct, ptr %97, i32 0, i32 2
  store ptr %96, ptr %98, align 8, !tbaa !25
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.png_sPLT_struct, ptr %99, i32 0, i32 2
  %101 = load ptr, ptr %100, align 8, !tbaa !25
  %102 = icmp eq ptr %101, null
  br i1 %102, label %103, label %111

103:                                              ; preds = %83
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  call void @png_warning(ptr noundef %104, ptr noundef @.str.28)
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.png_sPLT_struct, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !21
  call void @png_free(ptr noundef %105, ptr noundef %108)
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.png_sPLT_struct, ptr %109, i32 0, i32 0
  store ptr null, ptr %110, align 8, !tbaa !21
  store i32 4, ptr %11, align 4
  br label %132

111:                                              ; preds = %83
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.png_sPLT_struct, ptr %112, i32 0, i32 2
  %114 = load ptr, ptr %113, align 8, !tbaa !25
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.png_sPLT_struct, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !25
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.png_sPLT_struct, ptr %118, i32 0, i32 3
  %120 = load i64, ptr %119, align 8, !tbaa !24
  %121 = mul i64 %120, 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %114, ptr align 2 %117, i64 %121, i1 false)
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.png_sPLT_struct, ptr %122, i32 0, i32 3
  %124 = load i64, ptr %123, align 8, !tbaa !24
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.png_sPLT_struct, ptr %125, i32 0, i32 3
  store i64 %124, ptr %126, align 8, !tbaa !24
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.png_sPLT_struct, ptr %127, i32 0, i32 1
  %129 = load i8, ptr %128, align 8, !tbaa !26
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.png_sPLT_struct, ptr %130, i32 0, i32 1
  store i8 %129, ptr %131, align 8, !tbaa !26
  store i32 0, ptr %11, align 4
  br label %132

132:                                              ; preds = %111, %103, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %133 = load i32, ptr %11, align 4
  switch i32 %133, label %159 [
    i32 0, label %134
    i32 4, label %135
  ]

134:                                              ; preds = %132
  br label %135

135:                                              ; preds = %134, %132
  %136 = load i32, ptr %10, align 4, !tbaa !9
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %10, align 4, !tbaa !9
  br label %50, !llvm.loop !27

138:                                              ; preds = %50
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.png_info_struct, ptr %140, i32 0, i32 55
  store ptr %139, ptr %141, align 8, !tbaa !20
  %142 = load i32, ptr %8, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.png_info_struct, ptr %144, i32 0, i32 56
  %146 = load i64, ptr %145, align 8, !tbaa !11
  %147 = add i64 %146, %143
  store i64 %147, ptr %145, align 8, !tbaa !11
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.png_info_struct, ptr %148, i32 0, i32 2
  %150 = load i64, ptr %149, align 8, !tbaa !29
  %151 = or i64 %150, 8192
  store i64 %151, ptr %149, align 8, !tbaa !29
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.png_info_struct, ptr %152, i32 0, i32 48
  %154 = load i64, ptr %153, align 8, !tbaa !30
  %155 = or i64 %154, 32
  store i64 %155, ptr %153, align 8, !tbaa !30
  store i32 0, ptr %11, align 4
  br label %156

156:                                              ; preds = %138, %33, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %157 = load i32, ptr %11, align 4
  switch i32 %157, label %159 [
    i32 0, label %158
    i32 1, label %158
  ]

158:                                              ; preds = %156, %156
  ret void

159:                                              ; preds = %156, %132
  unreachable
}

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 = { nounwind willreturn memory(read) "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 = { nounwind willreturn memory(read) }

!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, !13, i64 336}
!12 = !{!"png_info_struct", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !6, i64 32, !14, i64 40, !14, i64 42, !7, i64 44, !7, i64 45, !7, i64 46, !7, i64 47, !7, i64 48, !7, i64 49, !7, i64 50, !7, i64 51, !7, i64 52, !15, i64 60, !7, i64 64, !10, i64 68, !10, i64 72, !6, i64 80, !16, i64 88, !17, i64 96, !6, i64 104, !18, i64 112, !18, i64 122, !13, i64 136, !13, i64 144, !7, i64 152, !13, i64 160, !13, i64 168, !7, i64 176, !6, i64 184, !15, i64 192, !15, i64 196, !15, i64 200, !15, i64 204, !15, i64 208, !15, i64 212, !15, i64 216, !15, i64 220, !6, i64 224, !13, i64 232, !13, i64 240, !6, i64 248, !6, i64 256, !7, i64 264, !7, i64 265, !13, i64 272, !6, i64 280, !13, i64 288, !6, i64 296, !6, i64 304, !13, i64 312, !7, i64 320, !6, i64 328, !13, i64 336, !7, i64 344, !19, i64 352, !19, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !13, i64 392, !13, i64 400, !13, i64 408, !13, i64 416, !13, i64 424, !13, i64 432, !13, i64 440, !13, i64 448, !13, i64 456}
!13 = !{!"long", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"png_time_struct", !14, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6}
!17 = !{!"png_color_8_struct", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4}
!18 = !{!"png_color_16_struct", !7, i64 0, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8}
!19 = !{!"double", !7, i64 0}
!20 = !{!12, !6, i64 328}
!21 = !{!22, !6, i64 0}
!22 = !{!"png_sPLT_struct", !6, i64 0, !7, i64 8, !6, i64 16, !13, i64 24}
!23 = !{!13, !13, i64 0}
!24 = !{!22, !13, i64 24}
!25 = !{!22, !6, i64 16}
!26 = !{!22, !7, i64 8}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!12, !13, i64 16}
!30 = !{!12, !13, i64 272}


; 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_sPLT_struct = type { ptr, i8, ptr, i64 }

@.str.27 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [42 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 ptr @png_malloc_warn(ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local void @png_set_sPLT(ptr noundef %0, ptr noundef %1, ptr nocapture 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 %62, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %1, i64 336
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %10 = sext i32 %3 to i64
  %11 = add i64 %9, %10
  %12 = shl i64 %11, 5
  %13 = tail call ptr @png_malloc_warn(ptr noundef nonnull %0, i64 noundef %12) #4
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %7
  tail call void @png_warning(ptr noundef nonnull %0, ptr noundef nonnull @.str.27) #4
  br label %62

16:                                               ; preds = %7
  %17 = getelementptr inbounds i8, ptr %1, i64 328
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = load i64, ptr %8, align 8, !tbaa !5
  %20 = shl i64 %19, 5
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %13, ptr align 8 %18, i64 %20, i1 false)
  %21 = load ptr, ptr %17, align 8, !tbaa !18
  tail call void @png_free(ptr noundef nonnull %0, ptr noundef %21) #4
  store ptr null, ptr %17, align 8, !tbaa !18
  %22 = icmp sgt i32 %3, 0
  br i1 %22, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %16
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %53
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %53 ]
  %23 = load i64, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.png_sPLT_struct, ptr %13, i64 %23
  %25 = getelementptr inbounds %struct.png_sPLT_struct, ptr %24, i64 %indvars.iv
  %26 = getelementptr inbounds %struct.png_sPLT_struct, ptr %2, i64 %indvars.iv
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  %28 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %27) #5
  %29 = add i64 %28, 1
  %30 = tail call ptr @png_malloc_warn(ptr noundef %0, i64 noundef %29) #4
  store ptr %30, ptr %25, align 8, !tbaa !19
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %33

32:                                               ; preds = %.lr.ph
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.28) #4
  br label %53

33:                                               ; preds = %.lr.ph
  %34 = load ptr, ptr %26, align 8, !tbaa !19
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %30, ptr align 1 %34, i64 %29, i1 false)
  %35 = getelementptr inbounds i8, ptr %26, i64 24
  %36 = load i64, ptr %35, align 8, !tbaa !21
  %37 = mul i64 %36, 10
  %38 = tail call ptr @png_malloc_warn(ptr noundef %0, i64 noundef %37) #4
  %39 = getelementptr inbounds i8, ptr %25, i64 16
  store ptr %38, ptr %39, align 8, !tbaa !22
  %40 = icmp eq ptr %38, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %33
  tail call void @png_warning(ptr noundef %0, ptr noundef nonnull @.str.28) #4
  %42 = load ptr, ptr %25, align 8, !tbaa !19
  tail call void @png_free(ptr noundef %0, ptr noundef %42) #4
  store ptr null, ptr %25, align 8, !tbaa !19
  br label %53

43:                                               ; preds = %33
  %44 = getelementptr inbounds i8, ptr %26, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = load i64, ptr %35, align 8, !tbaa !21
  %47 = mul i64 %46, 10
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 2 %38, ptr align 2 %45, i64 %47, i1 false)
  %48 = load i64, ptr %35, align 8, !tbaa !21
  %49 = getelementptr inbounds i8, ptr %25, i64 24
  store i64 %48, ptr %49, align 8, !tbaa !21
  %50 = getelementptr inbounds i8, ptr %26, i64 8
  %51 = load i8, ptr %50, align 8, !tbaa !23
  %52 = getelementptr inbounds i8, ptr %25, i64 8
  store i8 %51, ptr %52, align 8, !tbaa !23
  br label %53

53:                                               ; preds = %43, %41, %32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !24

._crit_edge:                                      ; preds = %53, %16
  store ptr %13, ptr %17, align 8, !tbaa !18
  %54 = load i64, ptr %8, align 8, !tbaa !5
  %55 = add i64 %54, %10
  store i64 %55, ptr %8, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %1, i64 16
  %57 = load i64, ptr %56, align 8, !tbaa !26
  %58 = or i64 %57, 8192
  store i64 %58, ptr %56, align 8, !tbaa !26
  %59 = getelementptr inbounds i8, ptr %1, i64 272
  %60 = load i64, ptr %59, align 8, !tbaa !27
  %61 = or i64 %60, 32
  store i64 %61, ptr %59, align 8, !tbaa !27
  br label %62

62:                                               ; preds = %4, %._crit_edge, %15
  ret void
}

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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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, !7, i64 336}
!6 = !{!"png_info_struct", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !11, i64 42, !8, i64 44, !8, i64 45, !8, i64 46, !8, i64 47, !8, i64 48, !8, i64 49, !8, i64 50, !8, i64 51, !8, i64 52, !12, i64 60, !8, i64 64, !13, i64 68, !13, i64 72, !10, i64 80, !14, i64 88, !15, i64 96, !10, i64 104, !16, i64 112, !16, i64 122, !7, i64 136, !7, i64 144, !8, i64 152, !7, i64 160, !7, i64 168, !8, i64 176, !10, i64 184, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !12, i64 212, !12, i64 216, !12, i64 220, !10, i64 224, !7, i64 232, !7, i64 240, !10, i64 248, !10, i64 256, !8, i64 264, !8, i64 265, !7, i64 272, !10, i64 280, !7, i64 288, !10, i64 296, !10, i64 304, !7, i64 312, !8, i64 320, !10, i64 328, !7, i64 336, !8, i64 344, !17, i64 352, !17, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"png_time_struct", !11, i64 0, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6}
!15 = !{!"png_color_8_struct", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4}
!16 = !{!"png_color_16_struct", !8, i64 0, !11, i64 2, !11, i64 4, !11, i64 6, !11, i64 8}
!17 = !{!"double", !8, i64 0}
!18 = !{!6, !10, i64 328}
!19 = !{!20, !10, i64 0}
!20 = !{!"png_sPLT_struct", !10, i64 0, !8, i64 8, !10, i64 16, !7, i64 24}
!21 = !{!20, !7, i64 24}
!22 = !{!20, !10, i64 16}
!23 = !{!20, !8, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!6, !7, i64 16}
!27 = !{!6, !7, i64 272}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass