; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #770 (Div. 2)/C. OKEA.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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 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 i64, align 8
  %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
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %13 = 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)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = load i64, ptr %2, align 8, !tbaa !5
  %17 = call ptr @llvm.stacksave.p0()
  store ptr %17, ptr %3, align 8
  %18 = mul nuw i64 %15, %16
  %19 = alloca i64, i64 %18, align 16
  store i64 %15, ptr %4, align 8
  store i64 %16, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 1, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %20

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

24:                                               ; preds = %20
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %61

25:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %54, %25
  %27 = load i64, ptr %10, align 8, !tbaa !5
  %28 = load i64, ptr %2, align 8, !tbaa !5
  %29 = icmp slt i64 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %57

31:                                               ; preds = %26
  %32 = load i64, ptr %8, align 8, !tbaa !5
  %33 = and i64 %32, 1
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %35, label %44

35:                                               ; preds = %31
  %36 = load i64, ptr %7, align 8, !tbaa !5
  %37 = load i64, ptr %8, align 8, !tbaa !5
  %38 = mul nsw i64 %37, %16
  %39 = getelementptr inbounds i64, ptr %19, i64 %38
  %40 = load i64, ptr %10, align 8, !tbaa !5
  %41 = getelementptr inbounds i64, ptr %39, i64 %40
  store i64 %36, ptr %41, align 8, !tbaa !5
  %42 = load i64, ptr %7, align 8, !tbaa !5
  %43 = add nsw i64 %42, 2
  store i64 %43, ptr %7, align 8, !tbaa !5
  br label %53

44:                                               ; preds = %31
  %45 = load i64, ptr %6, align 8, !tbaa !5
  %46 = load i64, ptr %8, align 8, !tbaa !5
  %47 = mul nsw i64 %46, %16
  %48 = getelementptr inbounds i64, ptr %19, i64 %47
  %49 = load i64, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds i64, ptr %48, i64 %49
  store i64 %45, ptr %50, align 8, !tbaa !5
  %51 = load i64, ptr %6, align 8, !tbaa !5
  %52 = add nsw i64 %51, 2
  store i64 %52, ptr %6, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %44, %35
  br label %54

54:                                               ; preds = %53
  %55 = load i64, ptr %10, align 8, !tbaa !5
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %10, align 8, !tbaa !5
  br label %26, !llvm.loop !9

57:                                               ; preds = %30
  br label %58

58:                                               ; preds = %57
  %59 = load i64, ptr %8, align 8, !tbaa !5
  %60 = add nsw i64 %59, 1
  store i64 %60, ptr %8, align 8, !tbaa !5
  br label %20, !llvm.loop !11

61:                                               ; preds = %24
  %62 = load i64, ptr %1, align 8, !tbaa !5
  %63 = sub nsw i64 %62, 1
  %64 = mul nsw i64 %63, %16
  %65 = getelementptr inbounds i64, ptr %19, i64 %64
  %66 = load i64, ptr %2, align 8, !tbaa !5
  %67 = sub nsw i64 %66, 1
  %68 = getelementptr inbounds i64, ptr %65, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = load i64, ptr %1, align 8, !tbaa !5
  %71 = load i64, ptr %2, align 8, !tbaa !5
  %72 = mul nsw i64 %70, %71
  %73 = icmp eq i64 %69, %72
  br i1 %73, label %74, label %106

74:                                               ; preds = %61
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %102, %74
  %78 = load i64, ptr %11, align 8, !tbaa !5
  %79 = load i64, ptr %1, align 8, !tbaa !5
  %80 = icmp slt i64 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %105

82:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %97, %82
  %84 = load i64, ptr %12, align 8, !tbaa !5
  %85 = load i64, ptr %2, align 8, !tbaa !5
  %86 = icmp slt i64 %84, %85
  br i1 %86, label %88, label %87

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

88:                                               ; preds = %83
  %89 = load i64, ptr %11, align 8, !tbaa !5
  %90 = mul nsw i64 %89, %16
  %91 = getelementptr inbounds i64, ptr %19, i64 %90
  %92 = load i64, ptr %12, align 8, !tbaa !5
  %93 = getelementptr inbounds i64, ptr %91, i64 %92
  %94 = load i64, ptr %93, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %94)
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef @.str.2)
  br label %97

97:                                               ; preds = %88
  %98 = load i64, ptr %12, align 8, !tbaa !5
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %12, align 8, !tbaa !5
  br label %83, !llvm.loop !12

100:                                              ; preds = %87
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %102

102:                                              ; preds = %100
  %103 = load i64, ptr %11, align 8, !tbaa !5
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %11, align 8, !tbaa !5
  br label %77, !llvm.loop !13

105:                                              ; preds = %81
  br label %109

106:                                              ; preds = %61
  %107 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %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.1)
  br label %109

109:                                              ; preds = %106, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %110 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %110)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  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 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 = { 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
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %3 = 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)
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %5 = load i64, ptr %1, align 8, !tbaa !5
  %6 = load i64, ptr %2, align 8, !tbaa !5
  %7 = call ptr @llvm.stacksave.p0()
  %8 = mul nuw i64 %6, %5
  %9 = alloca i64, i64 %8, align 16
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp sgt i64 %10, 0
  %.pre = load i64, ptr %2, align 8, !tbaa !5
  %12 = icmp sgt i64 %.pre, 0
  %or.cond = select i1 %11, i1 %12, i1 false
  br i1 %or.cond, label %.preheader27.us.preheader, label %._crit_edge36

.preheader27.us.preheader:                        ; preds = %0
  %min.iters.check = icmp ult i64 %.pre, 4
  %n.vec60 = and i64 %.pre, 9223372036854775804
  %13 = shl nuw i64 %n.vec60, 1
  %cmp.n74 = icmp eq i64 %.pre, %n.vec60
  %n.vec = and i64 %.pre, 9223372036854775804
  %14 = shl nuw i64 %n.vec, 1
  %cmp.n = icmp eq i64 %.pre, %n.vec
  br label %.preheader27.us

.preheader27.us:                                  ; preds = %.preheader27.us.preheader, %._crit_edge.us
  %.02135.us = phi i64 [ %27, %._crit_edge.us ], [ 0, %.preheader27.us.preheader ]
  %.02234.us = phi i64 [ %.us-phi32.us, %._crit_edge.us ], [ 2, %.preheader27.us.preheader ]
  %.02333.us = phi i64 [ %.us-phi.us, %._crit_edge.us ], [ 1, %.preheader27.us.preheader ]
  %15 = and i64 %.02135.us, 1
  %.not.us = icmp eq i64 %15, 0
  %16 = mul nsw i64 %.02135.us, %6
  %17 = getelementptr inbounds i64, ptr %9, i64 %16
  br i1 %.not.us, label %.lr.ph.split.us.us.preheader, label %.lr.ph.split.us39.preheader

.lr.ph.split.us39.preheader:                      ; preds = %.preheader27.us
  br i1 %min.iters.check, label %.lr.ph.split.us39.preheader76, label %vector.ph58

.lr.ph.split.us39.preheader76:                    ; preds = %middle.block55, %.lr.ph.split.us39.preheader
  %.02030.us37.ph = phi i64 [ 0, %.lr.ph.split.us39.preheader ], [ %n.vec60, %middle.block55 ]
  %.129.us.ph = phi i64 [ %.02234.us, %.lr.ph.split.us39.preheader ], [ %ind.end62, %middle.block55 ]
  br label %.lr.ph.split.us39

vector.ph58:                                      ; preds = %.lr.ph.split.us39.preheader
  %ind.end62 = add i64 %.02234.us, %13
  %.splatinsert66 = insertelement <2 x i64> poison, i64 %.02234.us, i64 0
  %.splat67 = shufflevector <2 x i64> %.splatinsert66, <2 x i64> poison, <2 x i32> zeroinitializer
  %induction68 = add <2 x i64> %.splat67, <i64 0, i64 2>
  br label %vector.body64

vector.body64:                                    ; preds = %vector.body64, %vector.ph58
  %index65 = phi i64 [ 0, %vector.ph58 ], [ %index.next73, %vector.body64 ]
  %vec.ind69 = phi <2 x i64> [ %induction68, %vector.ph58 ], [ %vec.ind.next72, %vector.body64 ]
  %step.add70 = add <2 x i64> %vec.ind69, <i64 4, i64 4>
  %18 = getelementptr inbounds i64, ptr %17, i64 %index65
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <2 x i64> %vec.ind69, ptr %18, align 8, !tbaa !5
  store <2 x i64> %step.add70, ptr %19, align 8, !tbaa !5
  %index.next73 = add nuw i64 %index65, 4
  %vec.ind.next72 = add <2 x i64> %vec.ind69, <i64 8, i64 8>
  %20 = icmp eq i64 %index.next73, %n.vec60
  br i1 %20, label %middle.block55, label %vector.body64, !llvm.loop !9

middle.block55:                                   ; preds = %vector.body64
  br i1 %cmp.n74, label %._crit_edge.us, label %.lr.ph.split.us39.preheader76

.lr.ph.split.us.us.preheader:                     ; preds = %.preheader27.us
  br i1 %min.iters.check, label %.lr.ph.split.us.us.preheader75, label %vector.ph

.lr.ph.split.us.us.preheader75:                   ; preds = %middle.block, %.lr.ph.split.us.us.preheader
  %.02030.us.us.ph = phi i64 [ 0, %.lr.ph.split.us.us.preheader ], [ %n.vec, %middle.block ]
  %.12428.us.us.ph = phi i64 [ %.02333.us, %.lr.ph.split.us.us.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph.split.us.us

vector.ph:                                        ; preds = %.lr.ph.split.us.us.preheader
  %ind.end = add i64 %.02333.us, %14
  %.splatinsert = insertelement <2 x i64> poison, i64 %.02333.us, i64 0
  %.splat = shufflevector <2 x i64> %.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %induction = add <2 x i64> %.splat, <i64 0, i64 2>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %21 = getelementptr inbounds i64, ptr %17, i64 %index
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  store <2 x i64> %vec.ind, ptr %21, align 8, !tbaa !5
  store <2 x i64> %step.add, ptr %22, align 8, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 8, i64 8>
  %23 = icmp eq i64 %index.next, %n.vec
  br i1 %23, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %.lr.ph.split.us.us.preheader75

.lr.ph.split.us39:                                ; preds = %.lr.ph.split.us39.preheader76, %.lr.ph.split.us39
  %.02030.us37 = phi i64 [ %26, %.lr.ph.split.us39 ], [ %.02030.us37.ph, %.lr.ph.split.us39.preheader76 ]
  %.129.us = phi i64 [ %25, %.lr.ph.split.us39 ], [ %.129.us.ph, %.lr.ph.split.us39.preheader76 ]
  %24 = getelementptr inbounds i64, ptr %17, i64 %.02030.us37
  store i64 %.129.us, ptr %24, align 8, !tbaa !5
  %25 = add nsw i64 %.129.us, 2
  %26 = add nuw nsw i64 %.02030.us37, 1
  %exitcond.not = icmp eq i64 %26, %.pre
  br i1 %exitcond.not, label %._crit_edge.us, label %.lr.ph.split.us39, !llvm.loop !14

._crit_edge.us:                                   ; preds = %.lr.ph.split.us39, %.lr.ph.split.us.us, %middle.block55, %middle.block
  %.us-phi.us = phi i64 [ %ind.end, %middle.block ], [ %.02333.us, %middle.block55 ], [ %29, %.lr.ph.split.us.us ], [ %.02333.us, %.lr.ph.split.us39 ]
  %.us-phi32.us = phi i64 [ %.02234.us, %middle.block ], [ %ind.end62, %middle.block55 ], [ %.02234.us, %.lr.ph.split.us.us ], [ %25, %.lr.ph.split.us39 ]
  %27 = add nuw nsw i64 %.02135.us, 1
  %exitcond48.not = icmp eq i64 %27, %10
  br i1 %exitcond48.not, label %._crit_edge36, label %.preheader27.us, !llvm.loop !15

.lr.ph.split.us.us:                               ; preds = %.lr.ph.split.us.us.preheader75, %.lr.ph.split.us.us
  %.02030.us.us = phi i64 [ %30, %.lr.ph.split.us.us ], [ %.02030.us.us.ph, %.lr.ph.split.us.us.preheader75 ]
  %.12428.us.us = phi i64 [ %29, %.lr.ph.split.us.us ], [ %.12428.us.us.ph, %.lr.ph.split.us.us.preheader75 ]
  %28 = getelementptr inbounds i64, ptr %17, i64 %.02030.us.us
  store i64 %.12428.us.us, ptr %28, align 8, !tbaa !5
  %29 = add nsw i64 %.12428.us.us, 2
  %30 = add nuw nsw i64 %.02030.us.us, 1
  %exitcond47.not = icmp eq i64 %30, %.pre
  br i1 %exitcond47.not, label %._crit_edge.us, label %.lr.ph.split.us.us, !llvm.loop !16

._crit_edge36:                                    ; preds = %._crit_edge.us, %0
  %31 = add nsw i64 %10, -1
  %32 = mul nsw i64 %31, %6
  %33 = getelementptr inbounds i64, ptr %9, i64 %32
  %34 = getelementptr i64, ptr %33, i64 %.pre
  %35 = getelementptr i8, ptr %34, i64 -8
  %36 = load i64, ptr %35, align 8, !tbaa !5
  %37 = mul nsw i64 %.pre, %10
  %38 = icmp eq i64 %36, %37
  br i1 %38, label %39, label %60

39:                                               ; preds = %._crit_edge36
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @.str.1)
  %42 = load i64, ptr %1, align 8, !tbaa !5
  %43 = icmp sgt i64 %42, 0
  br i1 %43, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %39, %._crit_edge
  %.01943 = phi i64 [ %49, %._crit_edge ], [ 0, %39 ]
  %44 = load i64, ptr %2, align 8, !tbaa !5
  %45 = icmp sgt i64 %44, 0
  br i1 %45, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %46 = mul nsw i64 %.01943, %6
  %47 = getelementptr inbounds i64, ptr %9, i64 %46
  br label %52

._crit_edge:                                      ; preds = %52, %.preheader
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %49 = add nuw nsw i64 %.01943, 1
  %50 = load i64, ptr %1, align 8, !tbaa !5
  %51 = icmp slt i64 %49, %50
  br i1 %51, label %.preheader, label %.loopexit, !llvm.loop !17

52:                                               ; preds = %.lr.ph, %52
  %.042 = phi i64 [ 0, %.lr.ph ], [ %57, %52 ]
  %53 = getelementptr inbounds i64, ptr %47, i64 %.042
  %54 = load i64, ptr %53, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @.str.2)
  %57 = add nuw nsw i64 %.042, 1
  %58 = load i64, ptr %2, align 8, !tbaa !5
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %52, label %._crit_edge, !llvm.loop !18

60:                                               ; preds = %._crit_edge36
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull @.str.1)
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge, %39, %60
  call void @llvm.stackrestore.p0(ptr %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret void
}

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

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 = { 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, !11, !12}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.isvectorized", i32 1}
!12 = !{!"llvm.loop.unroll.runtime.disable"}
!13 = distinct !{!13, !10, !11, !12}
!14 = distinct !{!14, !10, !12, !11}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10, !12, !11}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}


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