; LLVM IR from AdarshGaur/Competitive-Programming :: Codechef/Random Problems/Chef and Wedding Arrangements.ll (Z5solvev)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL3INF = external hidden constant i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca [101 x i64], align 16
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %16 = load i64, ptr %1, align 8, !tbaa !5
  %17 = call ptr @llvm.stacksave.p0()
  store ptr %17, ptr %3, align 8
  %18 = alloca i64, i64 %16, align 16
  store i64 %16, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %28, %0
  %20 = load i64, ptr %5, align 8, !tbaa !5
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %31

24:                                               ; preds = %19
  %25 = load i64, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds i64, ptr %18, i64 %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %26)
  br label %28

28:                                               ; preds = %24
  %29 = load i64, ptr %5, align 8, !tbaa !5
  %30 = add nsw i64 %29, 1
  store i64 %30, ptr %5, align 8, !tbaa !5
  br label %19, !llvm.loop !9

31:                                               ; preds = %23
  %32 = load i64, ptr %1, align 8, !tbaa !5
  %33 = add nsw i64 %32, 1
  %34 = alloca i64, i64 %33, align 16
  store i64 %33, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 808, ptr %7) #6
  %35 = load i64, ptr %1, align 8, !tbaa !5
  %36 = getelementptr inbounds i64, ptr %34, i64 %35
  %37 = getelementptr inbounds i64, ptr %36, i64 1
  call void @_ZSt4fillIPllEvT_S1_RKT0_(ptr noundef %34, ptr noundef %37, ptr noundef nonnull align 8 dereferenceable(8) @_ZL3INF)
  %38 = getelementptr inbounds i64, ptr %34, i64 0
  store i64 0, ptr %38, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %100, %31
  %40 = load i64, ptr %8, align 8, !tbaa !5
  %41 = load i64, ptr %1, align 8, !tbaa !5
  %42 = icmp slt i64 %40, %41
  br i1 %42, label %44, label %43

43:                                               ; preds = %39
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %103

44:                                               ; preds = %39
  %45 = getelementptr inbounds [101 x i64], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %45, i8 0, i64 808, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %46 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %46, ptr %10, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %96, %44
  %48 = load i64, ptr %10, align 8, !tbaa !5
  %49 = load i64, ptr %1, align 8, !tbaa !5
  %50 = icmp slt i64 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %99

52:                                               ; preds = %47
  %53 = load i64, ptr %10, align 8, !tbaa !5
  %54 = getelementptr inbounds i64, ptr %18, i64 %53
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds [101 x i64], ptr %7, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = add nsw i64 %57, 1
  store i64 %58, ptr %56, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 1, ptr %12, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %77, %52
  %60 = load i64, ptr %12, align 8, !tbaa !5
  %61 = icmp slt i64 %60, 101
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %80

63:                                               ; preds = %59
  %64 = load i64, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds [101 x i64], ptr %7, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !5
  %67 = icmp sle i64 %66, 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  br label %73

69:                                               ; preds = %63
  %70 = load i64, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds [101 x i64], ptr %7, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %69, %68
  %74 = phi i64 [ 0, %68 ], [ %72, %69 ]
  %75 = load i64, ptr %11, align 8, !tbaa !5
  %76 = add nsw i64 %75, %74
  store i64 %76, ptr %11, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %73
  %78 = load i64, ptr %12, align 8, !tbaa !5
  %79 = add nsw i64 %78, 1
  store i64 %79, ptr %12, align 8, !tbaa !5
  br label %59, !llvm.loop !11

80:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %81 = load i64, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds i64, ptr %34, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !5
  %84 = load i64, ptr %2, align 8, !tbaa !5
  %85 = add nsw i64 %83, %84
  %86 = load i64, ptr %11, align 8, !tbaa !5
  %87 = add nsw i64 %85, %86
  store i64 %87, ptr %13, align 8, !tbaa !5
  %88 = load i64, ptr %10, align 8, !tbaa !5
  %89 = add nsw i64 %88, 1
  %90 = getelementptr inbounds i64, ptr %34, i64 %89
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %90)
  %92 = load i64, ptr %91, align 8, !tbaa !5
  %93 = load i64, ptr %10, align 8, !tbaa !5
  %94 = add nsw i64 %93, 1
  %95 = getelementptr inbounds i64, ptr %34, i64 %94
  store i64 %92, ptr %95, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %96

96:                                               ; preds = %80
  %97 = load i64, ptr %10, align 8, !tbaa !5
  %98 = add nsw i64 %97, 1
  store i64 %98, ptr %10, align 8, !tbaa !5
  br label %47, !llvm.loop !12

99:                                               ; preds = %51
  br label %100

100:                                              ; preds = %99
  %101 = load i64, ptr %8, align 8, !tbaa !5
  %102 = add nsw i64 %101, 1
  store i64 %102, ptr %8, align 8, !tbaa !5
  br label %39, !llvm.loop !13

103:                                              ; preds = %43
  %104 = load i64, ptr %1, align 8, !tbaa !5
  %105 = getelementptr inbounds i64, ptr %34, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !5
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %106)
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 808, ptr %7) #6
  %109 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %109)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn }
attributes #3 = { inlinehint 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 = !{!"long", !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 = distinct !{!12, !10}
!13 = distinct !{!13, !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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZL3INF = external hidden constant i64, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca [101 x i64], align 16
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %7 = load i64, ptr %1, align 8, !tbaa !5
  %8 = call ptr @llvm.stacksave.p0()
  %9 = alloca i64, i64 %7, align 16
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp sgt i64 %10, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.lcssa25 = phi i64 [ %10, %0 ], [ %21, %.lr.ph ]
  %12 = add nsw i64 %.lcssa25, 1
  %13 = alloca i64, i64 %12, align 16
  call void @llvm.lifetime.start.p0(i64 808, ptr nonnull %3) #7
  %14 = getelementptr inbounds i64, ptr %13, i64 %.lcssa25
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  call void @_ZSt4fillIPllEvT_S1_RKT0_(ptr noundef nonnull %13, ptr noundef nonnull %15, ptr noundef nonnull align 8 dereferenceable(8) @_ZL3INF)
  store i64 0, ptr %13, align 16, !tbaa !5
  %16 = load i64, ptr %1, align 8, !tbaa !5
  %17 = icmp sgt i64 %16, 0
  br i1 %17, label %.lr.ph35, label %._crit_edge36

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02126 = phi i64 [ %20, %.lr.ph ], [ 0, %0 ]
  %18 = getelementptr inbounds i64, ptr %9, i64 %.02126
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %20 = add nuw nsw i64 %.02126, 1
  %21 = load i64, ptr %1, align 8, !tbaa !5
  %22 = icmp slt i64 %20, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge36:                                    ; preds = %._crit_edge32, %._crit_edge
  %.lcssa = phi i64 [ %16, %._crit_edge ], [ %30, %._crit_edge32 ]
  %23 = getelementptr inbounds i64, ptr %13, i64 %.lcssa
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %24)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str)
  call void @llvm.lifetime.end.p0(i64 808, ptr nonnull %3) #7
  call void @llvm.stackrestore.p0(ptr %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret void

.lr.ph35:                                         ; preds = %._crit_edge, %._crit_edge32
  %27 = phi i64 [ %30, %._crit_edge32 ], [ %16, %._crit_edge ]
  %.02033 = phi i64 [ %31, %._crit_edge32 ], [ 0, %._crit_edge ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(808) %3, i8 0, i64 808, i1 false)
  %28 = icmp slt i64 %.02033, %27
  br i1 %28, label %.lr.ph31, label %._crit_edge32

.lr.ph31:                                         ; preds = %.lr.ph35
  %29 = getelementptr inbounds i64, ptr %13, i64 %.02033
  br label %vector.ph

._crit_edge32:                                    ; preds = %middle.block, %.lr.ph35
  %30 = phi i64 [ %27, %.lr.ph35 ], [ %56, %middle.block ]
  %31 = add nuw nsw i64 %.02033, 1
  %32 = icmp slt i64 %31, %30
  br i1 %32, label %.lr.ph35, label %._crit_edge36, !llvm.loop !11

vector.ph:                                        ; preds = %.lr.ph31, %middle.block
  %.01929 = phi i64 [ %.02033, %.lr.ph31 ], [ %52, %middle.block ]
  %33 = getelementptr inbounds i64, ptr %9, i64 %.01929
  %34 = load i64, ptr %33, align 8, !tbaa !5
  %35 = getelementptr inbounds [101 x i64], ptr %3, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = add nsw i64 %36, 1
  store i64 %37, ptr %35, align 8, !tbaa !5
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %44, %vector.body ]
  %vec.phi49 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %45, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %38 = getelementptr inbounds [101 x i64], ptr %3, i64 0, i64 %offset.idx
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %wide.load = load <2 x i64>, ptr %38, align 8, !tbaa !5
  %wide.load50 = load <2 x i64>, ptr %39, align 8, !tbaa !5
  %40 = icmp slt <2 x i64> %wide.load, <i64 2, i64 2>
  %41 = icmp slt <2 x i64> %wide.load50, <i64 2, i64 2>
  %42 = select <2 x i1> %40, <2 x i64> zeroinitializer, <2 x i64> %wide.load
  %43 = select <2 x i1> %41, <2 x i64> zeroinitializer, <2 x i64> %wide.load50
  %44 = add <2 x i64> %42, %vec.phi
  %45 = add <2 x i64> %43, %vec.phi49
  %index.next = add nuw i64 %index, 4
  %46 = icmp eq i64 %index.next, 100
  br i1 %46, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %45, %44
  %47 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %48 = load i64, ptr %29, align 8, !tbaa !5
  %49 = load i64, ptr %2, align 8, !tbaa !5
  %50 = add i64 %48, %47
  %51 = add i64 %50, %49
  store i64 %51, ptr %4, align 8, !tbaa !5
  %52 = add nuw nsw i64 %.01929, 1
  %53 = getelementptr inbounds i64, ptr %13, i64 %52
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %53)
  %55 = load i64, ptr %54, align 8, !tbaa !5
  store i64 %55, ptr %53, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %56 = load i64, ptr %1, align 8, !tbaa !5
  %57 = icmp slt i64 %52, %56
  br i1 %57, label %vector.ph, label %._crit_edge32, !llvm.loop !15
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4fillIPllEvT_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #3 = { inlinehint 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"long", !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 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10}


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