; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #804 (Div. 2)/B. Almost Ternary Matrix.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 [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 i64, align 8
  %10 = alloca i32, align 4
  %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) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  %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 = load i64, ptr %2, align 8, !tbaa !5
  %18 = call ptr @llvm.stacksave.p0()
  store ptr %18, ptr %3, align 8
  %19 = mul nuw i64 %16, %17
  %20 = alloca i64, i64 %19, align 16
  store i64 %16, ptr %4, align 8
  store i64 %17, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 1, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %21

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

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %41

26:                                               ; preds = %21
  %27 = load i64, ptr %6, align 8, !tbaa !5
  %28 = load i64, ptr %8, align 8, !tbaa !5
  %29 = mul nsw i64 %28, %17
  %30 = getelementptr inbounds i64, ptr %20, i64 %29
  %31 = getelementptr inbounds i64, ptr %30, i64 0
  store i64 %27, ptr %31, align 8, !tbaa !5
  %32 = load i64, ptr %7, align 8, !tbaa !5
  %33 = load i64, ptr %8, align 8, !tbaa !5
  %34 = add nsw i64 %33, 1
  %35 = mul nsw i64 %34, %17
  %36 = getelementptr inbounds i64, ptr %20, i64 %35
  %37 = getelementptr inbounds i64, ptr %36, i64 0
  store i64 %32, ptr %37, align 8, !tbaa !5
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br label %38

38:                                               ; preds = %26
  %39 = load i64, ptr %8, align 8, !tbaa !5
  %40 = add nsw i64 %39, 2
  store i64 %40, ptr %8, align 8, !tbaa !5
  br label %21, !llvm.loop !9

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

42:                                               ; preds = %79, %41
  %43 = load i64, ptr %9, align 8, !tbaa !5
  %44 = load i64, ptr %1, align 8, !tbaa !5
  %45 = icmp slt i64 %43, %44
  br i1 %45, label %47, label %46

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

47:                                               ; preds = %42
  store i64 0, ptr %6, align 8, !tbaa !5
  store i64 1, ptr %7, align 8, !tbaa !5
  %48 = load i64, ptr %9, align 8, !tbaa !5
  %49 = mul nsw i64 %48, %17
  %50 = getelementptr inbounds i64, ptr %20, i64 %49
  %51 = getelementptr inbounds i64, ptr %50, i64 0
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = icmp eq i64 %52, 1
  br i1 %53, label %54, label %55

54:                                               ; preds = %47
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br label %55

55:                                               ; preds = %54, %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 0, ptr %11, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %75, %55
  %57 = load i64, ptr %11, align 8, !tbaa !5
  %58 = load i64, ptr %2, align 8, !tbaa !5
  %59 = icmp slt i64 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %78

61:                                               ; preds = %56
  %62 = load i64, ptr %6, align 8, !tbaa !5
  %63 = load i64, ptr %9, align 8, !tbaa !5
  %64 = mul nsw i64 %63, %17
  %65 = getelementptr inbounds i64, ptr %20, i64 %64
  %66 = load i64, ptr %11, align 8, !tbaa !5
  %67 = getelementptr inbounds i64, ptr %65, i64 %66
  store i64 %62, ptr %67, align 8, !tbaa !5
  %68 = load i64, ptr %7, align 8, !tbaa !5
  %69 = load i64, ptr %9, align 8, !tbaa !5
  %70 = mul nsw i64 %69, %17
  %71 = getelementptr inbounds i64, ptr %20, i64 %70
  %72 = load i64, ptr %11, align 8, !tbaa !5
  %73 = add nsw i64 %72, 1
  %74 = getelementptr inbounds i64, ptr %71, i64 %73
  store i64 %68, ptr %74, align 8, !tbaa !5
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  br label %75

75:                                               ; preds = %61
  %76 = load i64, ptr %11, align 8, !tbaa !5
  %77 = add nsw i64 %76, 2
  store i64 %77, ptr %11, align 8, !tbaa !5
  br label %56, !llvm.loop !11

78:                                               ; preds = %60
  br label %79

79:                                               ; preds = %78
  %80 = load i64, ptr %9, align 8, !tbaa !5
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr %9, align 8, !tbaa !5
  br label %42, !llvm.loop !12

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

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

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

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

89:                                               ; preds = %110, %88
  %90 = load i64, ptr %13, align 8, !tbaa !5
  %91 = load i64, ptr %2, align 8, !tbaa !5
  %92 = icmp slt i64 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  store i32 14, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %113

94:                                               ; preds = %89
  %95 = load i64, ptr %12, align 8, !tbaa !5
  %96 = mul nsw i64 %95, %17
  %97 = getelementptr inbounds i64, ptr %20, i64 %96
  %98 = load i64, ptr %13, align 8, !tbaa !5
  %99 = getelementptr inbounds i64, ptr %97, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !5
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %100)
  %102 = load i64, ptr %13, align 8, !tbaa !5
  %103 = load i64, ptr %2, align 8, !tbaa !5
  %104 = sub nsw i64 %103, 1
  %105 = icmp eq i64 %102, %104
  %106 = zext i1 %105 to i64
  %107 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %106
  %108 = load i8, ptr %107, align 1, !tbaa !13
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %101, i8 noundef signext %108)
  br label %110

110:                                              ; preds = %94
  %111 = load i64, ptr %13, align 8, !tbaa !5
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %13, align 8, !tbaa !5
  br label %89, !llvm.loop !14

113:                                              ; preds = %93
  br label %114

114:                                              ; preds = %113
  %115 = load i64, ptr %12, align 8, !tbaa !5
  %116 = add nsw i64 %115, 1
  store i64 %116, ptr %12, align 8, !tbaa !5
  br label %83, !llvm.loop !15

117:                                              ; preds = %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %118 = load ptr, ptr %3, align 8
  call void @llvm.stackrestore.p0(ptr %118)
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #5
  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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; 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_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

; 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 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 = { 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 #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 = !{!"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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !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 [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
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %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 = load i64, ptr %2, align 8, !tbaa !5
  %9 = call ptr @llvm.stacksave.p0()
  %10 = mul nuw i64 %8, %7
  %11 = alloca i64, i64 %10, align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 1, ptr %4, align 8, !tbaa !5
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %13 = icmp sgt i64 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge35

.preheader25:                                     ; preds = %.lr.ph
  %14 = icmp sgt i64 %23, 0
  br i1 %14, label %.lr.ph30, label %._crit_edge35

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02326 = phi i64 [ %22, %.lr.ph ], [ 0, %0 ]
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = mul nsw i64 %.02326, %8
  %17 = getelementptr inbounds i64, ptr %11, i64 %16
  store i64 %15, ptr %17, align 16, !tbaa !5
  %18 = load i64, ptr %4, align 8, !tbaa !5
  %19 = or disjoint i64 %.02326, 1
  %20 = mul nsw i64 %19, %8
  %21 = getelementptr inbounds i64, ptr %11, i64 %20
  store i64 %18, ptr %21, align 8, !tbaa !5
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %22 = add nuw nsw i64 %.02326, 2
  %23 = load i64, ptr %1, align 8, !tbaa !5
  %24 = icmp slt i64 %22, %23
  br i1 %24, label %.lr.ph, label %.preheader25, !llvm.loop !9

.preheader24:                                     ; preds = %._crit_edge
  %25 = icmp sgt i64 %37, 0
  %26 = load i64, ptr %2, align 8
  %27 = icmp sgt i64 %26, 0
  %or.cond = select i1 %25, i1 %27, i1 false
  br i1 %or.cond, label %.preheader, label %._crit_edge35

.lr.ph30:                                         ; preds = %.preheader25, %._crit_edge
  %.02229 = phi i64 [ %36, %._crit_edge ], [ 0, %.preheader25 ]
  store i64 0, ptr %3, align 8, !tbaa !5
  store i64 1, ptr %4, align 8, !tbaa !5
  %28 = mul nsw i64 %.02229, %8
  %29 = getelementptr inbounds i64, ptr %11, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = icmp eq i64 %30, 1
  br i1 %31, label %32, label %33

32:                                               ; preds = %.lr.ph30
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %33

33:                                               ; preds = %32, %.lr.ph30
  %34 = load i64, ptr %2, align 8, !tbaa !5
  %35 = icmp sgt i64 %34, 0
  br i1 %35, label %.lr.ph28, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph28, %33
  %36 = add nuw nsw i64 %.02229, 1
  %37 = load i64, ptr %1, align 8, !tbaa !5
  %38 = icmp slt i64 %36, %37
  br i1 %38, label %.lr.ph30, label %.preheader24, !llvm.loop !11

.lr.ph28:                                         ; preds = %33, %.lr.ph28
  %.02127 = phi i64 [ %44, %.lr.ph28 ], [ 0, %33 ]
  %39 = load i64, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds i64, ptr %29, i64 %.02127
  store i64 %39, ptr %40, align 8, !tbaa !5
  %41 = load i64, ptr %4, align 8, !tbaa !5
  %42 = or disjoint i64 %.02127, 1
  %43 = getelementptr inbounds i64, ptr %29, i64 %42
  store i64 %41, ptr %43, align 8, !tbaa !5
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %44 = add nuw nsw i64 %.02127, 2
  %45 = load i64, ptr %2, align 8, !tbaa !5
  %46 = icmp slt i64 %44, %45
  br i1 %46, label %.lr.ph28, label %._crit_edge, !llvm.loop !12

.preheader:                                       ; preds = %.preheader24, %._crit_edge33
  %47 = phi i64 [ %52, %._crit_edge33 ], [ %37, %.preheader24 ]
  %48 = phi i64 [ %53, %._crit_edge33 ], [ %26, %.preheader24 ]
  %.02034 = phi i64 [ %54, %._crit_edge33 ], [ 0, %.preheader24 ]
  %49 = icmp sgt i64 %48, 0
  br i1 %49, label %.lr.ph32, label %._crit_edge33

.lr.ph32:                                         ; preds = %.preheader
  %50 = mul nsw i64 %.02034, %8
  %51 = getelementptr inbounds i64, ptr %11, i64 %50
  br label %56

._crit_edge35:                                    ; preds = %._crit_edge33, %0, %.preheader25, %.preheader24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.stackrestore.p0(ptr %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

._crit_edge33.loopexit:                           ; preds = %56
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge33

._crit_edge33:                                    ; preds = %._crit_edge33.loopexit, %.preheader
  %52 = phi i64 [ %.pre, %._crit_edge33.loopexit ], [ %47, %.preheader ]
  %53 = phi i64 [ %68, %._crit_edge33.loopexit ], [ %48, %.preheader ]
  %54 = add nuw nsw i64 %.02034, 1
  %55 = icmp slt i64 %54, %52
  br i1 %55, label %.preheader, label %._crit_edge35, !llvm.loop !13

56:                                               ; preds = %.lr.ph32, %56
  %.031 = phi i64 [ 0, %.lr.ph32 ], [ %67, %56 ]
  %57 = getelementptr inbounds i64, ptr %51, i64 %.031
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %58)
  %60 = load i64, ptr %2, align 8, !tbaa !5
  %61 = add nsw i64 %60, -1
  %62 = icmp eq i64 %.031, %61
  %63 = zext i1 %62 to i64
  %64 = getelementptr inbounds [3 x i8], ptr @.str, i64 0, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !15
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %59, i8 noundef signext %65)
  %67 = add nuw nsw i64 %.031, 1
  %68 = load i64, ptr %2, align 8, !tbaa !5
  %69 = icmp slt i64 %67, %68
  br i1 %69, label %56, label %._crit_edge33.loopexit, !llvm.loop !16
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; 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_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #4

; 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 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 = { 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 #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 = !{!"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, !14}
!14 = !{!"llvm.loop.unswitch.partial.disable"}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !10}


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