; LLVM IR from Muhammad-Magdi/problem-solving :: Kadane Algorithm (2D-Kadane)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@A = external dso_local global [105 x [105 x i32]], align 16
@bestSum = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %11

11:                                               ; preds = %51, %0
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp sle i32 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %11
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %54

16:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %47, %16
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %50

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %24
  %26 = getelementptr inbounds [105 x i32], ptr %25, i64 0, i64 0
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr %26, i64 %28
  %30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29)
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sub nsw i32 %31, 1
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %33
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [105 x i32], ptr %34, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %40
  %42 = load i32, ptr %4, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [105 x i32], ptr %41, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = add nsw i32 %45, %38
  store i32 %46, ptr %44, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %22
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %4, align 4, !tbaa !5
  br label %17, !llvm.loop !9

50:                                               ; preds = %21
  br label %51

51:                                               ; preds = %50
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !11

54:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %105, %54
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %108

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %61 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %61, ptr %6, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %101, %60
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp sle i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %104

67:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %97, %67
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = load i32, ptr @m, align 4, !tbaa !5
  %71 = icmp sle i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %100

73:                                               ; preds = %68
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %75
  %77 = load i32, ptr %8, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [105 x i32], ptr %76, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = sub nsw i32 %81, 1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %83
  %85 = load i32, ptr %8, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [105 x i32], ptr %84, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sub nsw i32 %80, %88
  %90 = sext i32 %89 to i64
  %91 = load i64, ptr %7, align 8, !tbaa !12
  %92 = add nsw i64 %91, %90
  store i64 %92, ptr %7, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !12
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %94 = load i64, ptr %93, align 8, !tbaa !12
  store i64 %94, ptr %7, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @bestSum, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %96 = load i64, ptr %95, align 8, !tbaa !12
  store i64 %96, ptr @bestSum, align 8, !tbaa !12
  br label %97

97:                                               ; preds = %73
  %98 = load i32, ptr %8, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %8, align 4, !tbaa !5
  br label %68, !llvm.loop !14

100:                                              ; preds = %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %101

101:                                              ; preds = %100
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %6, align 4, !tbaa !5
  br label %62, !llvm.loop !15

104:                                              ; preds = %66
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %5, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %5, align 4, !tbaa !5
  br label %55, !llvm.loop !16

108:                                              ; preds = %59
  %109 = load i64, ptr @bestSum, align 8, !tbaa !12
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %109)
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare i32 @printf(ptr noundef, ...) #1

attributes #0 = { mustprogress norecurse 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 willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress 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 }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@A = external dso_local global [105 x [105 x i32]], align 16
@bestSum = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not33 = icmp slt i32 %4, 1
  br i1 %.not33, label %._crit_edge47, label %.preheader30.lr.ph

.preheader30.lr.ph:                               ; preds = %0
  %5 = load i32, ptr @m, align 4, !tbaa !5
  %6 = icmp slt i32 %5, 1
  br i1 %6, label %.preheader.preheader, label %.preheader30

.preheader30:                                     ; preds = %.preheader30.lr.ph, %._crit_edge
  %7 = phi i32 [ %11, %._crit_edge ], [ %4, %.preheader30.lr.ph ]
  %8 = phi i32 [ %12, %._crit_edge ], [ %5, %.preheader30.lr.ph ]
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %._crit_edge ], [ 1, %.preheader30.lr.ph ]
  %.not2831 = icmp slt i32 %8, 1
  br i1 %.not2831, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader30
  %9 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %indvars.iv51
  %10 = add nsw i64 %indvars.iv51, -1
  br label %14

.preheader29:                                     ; preds = %._crit_edge
  %.not2544 = icmp slt i32 %11, 1
  br i1 %.not2544, label %._crit_edge47, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader30.lr.ph, %.preheader29
  %.ph = phi i32 [ %4, %.preheader30.lr.ph ], [ %11, %.preheader29 ]
  br label %.preheader

._crit_edge.loopexit:                             ; preds = %14
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader30
  %11 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %7, %.preheader30 ]
  %12 = phi i32 [ %22, %._crit_edge.loopexit ], [ %8, %.preheader30 ]
  %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1
  %13 = sext i32 %11 to i64
  %.not.not = icmp slt i64 %indvars.iv51, %13
  br i1 %.not.not, label %.preheader30, label %.preheader29, !llvm.loop !9

14:                                               ; preds = %.lr.ph, %14
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %14 ]
  %15 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv
  %16 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %15)
  %17 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %10, i64 %indvars.iv
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %indvars.iv51, i64 %indvars.iv
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = add nsw i32 %20, %18
  store i32 %21, ptr %19, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @m, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %.not28.not = icmp slt i64 %indvars.iv, %23
  br i1 %.not28.not, label %14, label %._crit_edge.loopexit, !llvm.loop !12

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge43
  %24 = phi i32 [ %31, %._crit_edge43 ], [ %.ph, %.preheader.preheader ]
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %._crit_edge43 ], [ 1, %.preheader.preheader ]
  %25 = sext i32 %24 to i64
  %.not2640 = icmp sgt i64 %indvars.iv57, %25
  br i1 %.not2640, label %._crit_edge43, label %.lr.ph42

.lr.ph42:                                         ; preds = %.preheader
  %26 = add nsw i64 %indvars.iv57, -1
  %27 = load i32, ptr @m, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 1
  br i1 %28, label %._crit_edge43, label %.lr.ph42.split

._crit_edge47:                                    ; preds = %._crit_edge43, %0, %.preheader29
  %29 = load i64, ptr @bestSum, align 8, !tbaa !13
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %29)
  ret i32 0

._crit_edge43.loopexit48:                         ; preds = %._crit_edge39
  %.pre64 = sext i32 %35 to i64
  br label %._crit_edge43

._crit_edge43:                                    ; preds = %.lr.ph42, %._crit_edge43.loopexit48, %.preheader
  %.pre-phi = phi i64 [ %.pre64, %._crit_edge43.loopexit48 ], [ %25, %.preheader ], [ %25, %.lr.ph42 ]
  %31 = phi i32 [ %35, %._crit_edge43.loopexit48 ], [ %24, %.preheader ], [ %24, %.lr.ph42 ]
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %.not25.not = icmp slt i64 %indvars.iv57, %.pre-phi
  br i1 %.not25.not, label %.preheader, label %._crit_edge47, !llvm.loop !15

.lr.ph42.split:                                   ; preds = %.lr.ph42, %._crit_edge39
  %32 = phi i32 [ %35, %._crit_edge39 ], [ %24, %.lr.ph42 ]
  %33 = phi i32 [ %36, %._crit_edge39 ], [ %24, %.lr.ph42 ]
  %34 = phi i32 [ %37, %._crit_edge39 ], [ %27, %.lr.ph42 ]
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %._crit_edge39 ], [ %indvars.iv57, %.lr.ph42 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  store i64 0, ptr %1, align 8, !tbaa !13
  %.not2735 = icmp slt i32 %34, 1
  br i1 %.not2735, label %._crit_edge39, label %.lr.ph38

._crit_edge39.loopexit:                           ; preds = %.lr.ph38
  %.pre63 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge39

._crit_edge39:                                    ; preds = %._crit_edge39.loopexit, %.lr.ph42.split
  %35 = phi i32 [ %.pre63, %._crit_edge39.loopexit ], [ %32, %.lr.ph42.split ]
  %36 = phi i32 [ %.pre63, %._crit_edge39.loopexit ], [ %33, %.lr.ph42.split ]
  %37 = phi i32 [ %51, %._crit_edge39.loopexit ], [ %34, %.lr.ph42.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %38 = sext i32 %36 to i64
  %.not26.not = icmp slt i64 %indvars.iv59, %38
  br i1 %.not26.not, label %.lr.ph42.split, label %._crit_edge43.loopexit48, !llvm.loop !16

.lr.ph38:                                         ; preds = %.lr.ph42.split, %.lr.ph38
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.lr.ph38 ], [ 1, %.lr.ph42.split ]
  %39 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %indvars.iv59, i64 %indvars.iv54
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds [105 x [105 x i32]], ptr @A, i64 0, i64 %26, i64 %indvars.iv54
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = sub nsw i32 %40, %42
  %44 = sext i32 %43 to i64
  %45 = load i64, ptr %1, align 8, !tbaa !13
  %46 = add nsw i64 %45, %44
  store i64 %46, ptr %1, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  store i64 0, ptr %2, align 8, !tbaa !13
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %48 = load i64, ptr %47, align 8, !tbaa !13
  store i64 %48, ptr %1, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @bestSum, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %50 = load i64, ptr %49, align 8, !tbaa !13
  store i64 %50, ptr @bestSum, align 8, !tbaa !13
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %51 = load i32, ptr @m, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %.not27.not = icmp slt i64 %indvars.iv54, %52
  br i1 %.not27.not, label %.lr.ph38, label %._crit_edge39.loopexit, !llvm.loop !17
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress norecurse 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 = { nofree 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress 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 }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !11}
!17 = distinct !{!17, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass