; LLVM IR from eyangch/competitive-programming :: CSES/Sorting_and_Searching (sliding_cost)

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

%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@x = external dso_local global [200000 x i32], align 16
@suml = external dso_local global i64, align 8
@sumr = external dso_local global i64, align 8
@l = external dso_local global %"class.std::multiset", align 8
@r = external dso_local global %"class.std::multiset", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3addi(i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2rmi(i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::reverse_iterator", align 8
  %8 = alloca i64, align 8
  %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 @K)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %11

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

15:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %24

16:                                               ; preds = %11
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %18
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %19)
  br label %21

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %2, align 4, !tbaa !5
  br label %11, !llvm.loop !9

24:                                               ; preds = %15
  %25 = call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @l, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %26 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %3, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  %27 = load i32, ptr @x, align 16, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = load i64, ptr @suml, align 8, !tbaa !11
  %30 = add nsw i64 %29, %28
  store i64 %30, ptr @suml, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %42, %24
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = load i32, ptr @K, align 4, !tbaa !5
  %34 = sub nsw i32 %33, 1
  %35 = icmp slt i32 %32, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %45

37:                                               ; preds = %31
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  call void @_Z3addi(i32 noundef %41)
  br label %42

42:                                               ; preds = %37
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %4, align 4, !tbaa !5
  br label %31, !llvm.loop !13

45:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %46 = load i32, ptr @K, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 1
  store i32 %47, ptr %5, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %90, %45
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = load i32, ptr @N, align 4, !tbaa !5
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %93

53:                                               ; preds = %48
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %61

56:                                               ; preds = %53
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  call void @_Z3addi(i32 noundef %60)
  br label %61

61:                                               ; preds = %56, %53
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = load i32, ptr @K, align 4, !tbaa !5
  %64 = icmp sge i32 %62, %63
  br i1 %64, label %65, label %72

65:                                               ; preds = %61
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = load i32, ptr @K, align 4, !tbaa !5
  %68 = sub nsw i32 %66, %67
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  call void @_Z2rmi(i32 noundef %71)
  br label %72

72:                                               ; preds = %65, %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind writable sret(%"class.std::reverse_iterator") align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) @l) #5
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  store i64 %75, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %76 = load i64, ptr %6, align 8, !tbaa !11
  %77 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @l) #5
  %78 = mul i64 %76, %77
  %79 = load i64, ptr @suml, align 8, !tbaa !11
  %80 = sub i64 %78, %79
  store i64 %80, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %81 = load i64, ptr @sumr, align 8, !tbaa !11
  %82 = load i64, ptr %6, align 8, !tbaa !11
  %83 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @r) #5
  %84 = mul i64 %82, %83
  %85 = sub i64 %81, %84
  store i64 %85, ptr %9, align 8, !tbaa !11
  %86 = load i64, ptr %8, align 8, !tbaa !11
  %87 = load i64, ptr %9, align 8, !tbaa !11
  %88 = add nsw i64 %86, %87
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i64 noundef %88)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %90

90:                                               ; preds = %72
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %5, align 4, !tbaa !5
  br label %48, !llvm.loop !14

93:                                               ; preds = %52
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %95 = load i32, ptr %1, align 4
  ret i32 %95
}

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

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

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

!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 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

%"class.std::multiset" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::reverse_iterator" = type { %"struct.std::_Rb_tree_const_iterator" }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

@N = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@x = external dso_local global [200000 x i32], align 16
@suml = external dso_local local_unnamed_addr global i64, align 8
@sumr = external dso_local local_unnamed_addr global i64, align 8
@l = external dso_local global %"class.std::multiset", align 8
@r = external dso_local global %"class.std::multiset", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind noalias writable sret(%"class.std::reverse_iterator") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3addi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2rmi(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca %"class.std::reverse_iterator", align 8
  %2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N, ptr noundef nonnull @K)
  %3 = load i32, ptr @N, align 4, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %5 = tail call ptr @_ZNSt8multisetIiSt4lessIiESaIiEE6insertERKi(ptr noundef nonnull align 8 dereferenceable(48) @l, ptr noundef nonnull align 4 dereferenceable(4) @x)
  %6 = load i32, ptr @x, align 16, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = load i64, ptr @suml, align 8, !tbaa !9
  %9 = add nsw i64 %8, %7
  store i64 %9, ptr @suml, align 8, !tbaa !9
  %10 = load i32, ptr @K, align 4, !tbaa !5
  %11 = add nsw i32 %10, -1
  %12 = icmp sgt i32 %10, 2
  br i1 %12, label %.lr.ph25, label %.preheader

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %13 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %indvars.iv
  %14 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %13)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %15 = load i32, ptr @N, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = icmp slt i64 %indvars.iv.next, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.preheader:                                       ; preds = %.lr.ph25, %._crit_edge
  %.lcssa = phi i32 [ %11, %._crit_edge ], [ %23, %.lr.ph25 ]
  %18 = load i32, ptr @N, align 4, !tbaa !5
  %19 = icmp slt i32 %.lcssa, %18
  br i1 %19, label %.lr.ph27, label %._crit_edge28

.lr.ph25:                                         ; preds = %._crit_edge, %.lr.ph25
  %indvars.iv31 = phi i64 [ %indvars.iv.next32, %.lr.ph25 ], [ 1, %._crit_edge ]
  %20 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %indvars.iv31
  %21 = load i32, ptr %20, align 4, !tbaa !5
  tail call void @_Z3addi(i32 noundef %21)
  %indvars.iv.next32 = add nuw nsw i64 %indvars.iv31, 1
  %22 = load i32, ptr @K, align 4, !tbaa !5
  %23 = add nsw i32 %22, -1
  %24 = sext i32 %23 to i64
  %25 = icmp slt i64 %indvars.iv.next32, %24
  br i1 %25, label %.lr.ph25, label %.preheader, !llvm.loop !13

._crit_edge28:                                    ; preds = %39, %.preheader
  %26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  ret i32 0

.lr.ph27:                                         ; preds = %.preheader, %39
  %.01826 = phi i32 [ %50, %39 ], [ %.lcssa, %.preheader ]
  %27 = icmp sgt i32 %.01826, 0
  br i1 %27, label %28, label %32

28:                                               ; preds = %.lr.ph27
  %29 = zext nneg i32 %.01826 to i64
  %30 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %29
  %31 = load i32, ptr %30, align 4, !tbaa !5
  call void @_Z3addi(i32 noundef %31)
  br label %32

32:                                               ; preds = %28, %.lr.ph27
  %33 = load i32, ptr @K, align 4, !tbaa !5
  %.not = icmp slt i32 %.01826, %33
  br i1 %.not, label %39, label %34

34:                                               ; preds = %32
  %35 = sub nsw i32 %.01826, %33
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [200000 x i32], ptr @x, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  call void @_Z2rmi(i32 noundef %38)
  br label %39

39:                                               ; preds = %34, %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @_ZNKSt8multisetIiSt4lessIiESaIiEE6rbeginEv(ptr dead_on_unwind nonnull writable sret(%"class.std::reverse_iterator") align 8 %1, ptr noundef nonnull align 8 dereferenceable(48) @l) #5
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt16reverse_iteratorISt23_Rb_tree_const_iteratorIiEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  %43 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @l) #5
  %44 = load i64, ptr @suml, align 8, !tbaa !9
  %45 = load i64, ptr @sumr, align 8, !tbaa !9
  %46 = call noundef i64 @_ZNKSt8multisetIiSt4lessIiESaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @r) #5
  %reass.add = sub i64 %43, %46
  %reass.mul = mul i64 %reass.add, %42
  %47 = sub i64 %45, %44
  %48 = add i64 %47, %reass.mul
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %48)
  %50 = add nsw i32 %.01826, 1
  %51 = load i32, ptr @N, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %.lr.ph27, label %._crit_edge28, !llvm.loop !14
}

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress 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 = { 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 #4 = { 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 #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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass