; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Educational Codeforces Round 123 (Rated for Div. 2)/C. Increase Subarray_0f1861ae (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" }

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

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

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

; 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) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  %22 = 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)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %24 = load i64, ptr %1, align 8, !tbaa !5
  %25 = call ptr @llvm.stacksave.p0()
  store ptr %25, ptr %4, align 8
  %26 = alloca i64, i64 %24, align 16
  store i64 %24, ptr %5, align 8
  %27 = load i64, ptr %1, align 8, !tbaa !5
  %28 = add nsw i64 %27, 1
  %29 = alloca i64, i64 %28, align 16
  store i64 %28, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr %26, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %30 = load ptr, ptr %7, align 8, !tbaa !9
  store ptr %30, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = mul nuw i64 8, %24
  %33 = udiv i64 %32, 8
  %34 = getelementptr inbounds i64, ptr %31, i64 %33
  store ptr %34, ptr %9, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %44, %0
  %36 = load ptr, ptr %8, align 8, !tbaa !9
  %37 = load ptr, ptr %9, align 8, !tbaa !9
  %38 = icmp ne ptr %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  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 %7) #5
  br label %47

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %41 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %41, ptr %10, align 8, !tbaa !9
  %42 = load ptr, ptr %10, align 8, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %42)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %44

44:                                               ; preds = %40
  %45 = load ptr, ptr %8, align 8, !tbaa !9
  %46 = getelementptr inbounds i64, ptr %45, i32 1
  store ptr %46, ptr %8, align 8, !tbaa !9
  br label %35

47:                                               ; preds = %39
  %48 = load i64, ptr %1, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %29, i64 %48
  %50 = getelementptr inbounds i64, ptr %49, i64 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store i64 -2000000000000000000, ptr %11, align 8, !tbaa !5
  call void @_ZSt4fillIPllEvT_S1_RKT0_(ptr noundef %29, ptr noundef %50, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %51 = getelementptr inbounds i64, ptr %29, i64 0
  store i64 0, ptr %51, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %88, %47
  %53 = load i64, ptr %12, align 8, !tbaa !5
  %54 = load i64, ptr %1, align 8, !tbaa !5
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 4, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %91

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %58 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %58, ptr %15, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %84, %57
  %60 = load i64, ptr %15, align 8, !tbaa !5
  %61 = load i64, ptr %1, align 8, !tbaa !5
  %62 = icmp slt i64 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  store i32 7, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %87

64:                                               ; preds = %59
  %65 = load i64, ptr %15, align 8, !tbaa !5
  %66 = getelementptr inbounds i64, ptr %26, i64 %65
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = load i64, ptr %14, align 8, !tbaa !5
  %69 = add nsw i64 %68, %67
  store i64 %69, ptr %14, align 8, !tbaa !5
  %70 = load i64, ptr %15, align 8, !tbaa !5
  %71 = load i64, ptr %12, align 8, !tbaa !5
  %72 = sub nsw i64 %70, %71
  %73 = add nsw i64 %72, 1
  %74 = getelementptr inbounds i64, ptr %29, i64 %73
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = load i64, ptr %15, align 8, !tbaa !5
  %78 = load i64, ptr %12, align 8, !tbaa !5
  %79 = sub nsw i64 %77, %78
  %80 = add nsw i64 %79, 1
  %81 = getelementptr inbounds i64, ptr %29, i64 %80
  store i64 %76, ptr %81, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %83 = load i64, ptr %82, align 8, !tbaa !5
  store i64 %83, ptr %3, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %64
  %85 = load i64, ptr %15, align 8, !tbaa !5
  %86 = add nsw i64 %85, 1
  store i64 %86, ptr %15, align 8, !tbaa !5
  br label %59, !llvm.loop !11

87:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %88

88:                                               ; preds = %87
  %89 = load i64, ptr %12, align 8, !tbaa !5
  %90 = add nsw i64 %89, 1
  store i64 %90, ptr %12, align 8, !tbaa !5
  br label %52, !llvm.loop !13

91:                                               ; preds = %56
  %92 = load i64, ptr %3, align 8, !tbaa !5
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %92)
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 1, ptr %16, align 8, !tbaa !5
  br label %95

95:                                               ; preds = %146, %91
  %96 = load i64, ptr %16, align 8, !tbaa !5
  %97 = load i64, ptr %1, align 8, !tbaa !5
  %98 = icmp sle i64 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 10, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %149

100:                                              ; preds = %95
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %101 = load i64, ptr %16, align 8, !tbaa !5
  %102 = load i64, ptr %2, align 8, !tbaa !5
  %103 = mul nsw i64 %101, %102
  store i64 %103, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %104 = load i64, ptr %16, align 8, !tbaa !5
  store i64 %104, ptr %18, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %118, %100
  %106 = load i64, ptr %18, align 8, !tbaa !5
  %107 = load i64, ptr %1, align 8, !tbaa !5
  %108 = icmp sle i64 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 13, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %121

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %111 = load i64, ptr %18, align 8, !tbaa !5
  %112 = getelementptr inbounds i64, ptr %29, i64 %111
  %113 = load i64, ptr %112, align 8, !tbaa !5
  %114 = load i64, ptr %17, align 8, !tbaa !5
  %115 = add nsw i64 %113, %114
  store i64 %115, ptr %19, align 8, !tbaa !5
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %117 = load i64, ptr %116, align 8, !tbaa !5
  store i64 %117, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %118

118:                                              ; preds = %110
  %119 = load i64, ptr %18, align 8, !tbaa !5
  %120 = add nsw i64 %119, 1
  store i64 %120, ptr %18, align 8, !tbaa !5
  br label %105, !llvm.loop !14

121:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %122 = load i64, ptr %16, align 8, !tbaa !5
  %123 = sub nsw i64 %122, 1
  store i64 %123, ptr %20, align 8, !tbaa !5
  br label %124

124:                                              ; preds = %139, %121
  %125 = load i64, ptr %20, align 8, !tbaa !5
  %126 = icmp sge i64 %125, 0
  br i1 %126, label %128, label %127

127:                                              ; preds = %124
  store i32 16, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %142

128:                                              ; preds = %124
  %129 = load i64, ptr %20, align 8, !tbaa !5
  %130 = load i64, ptr %2, align 8, !tbaa !5
  %131 = mul nsw i64 %129, %130
  store i64 %131, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %132 = load i64, ptr %20, align 8, !tbaa !5
  %133 = getelementptr inbounds i64, ptr %29, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !5
  %135 = load i64, ptr %17, align 8, !tbaa !5
  %136 = add nsw i64 %134, %135
  store i64 %136, ptr %21, align 8, !tbaa !5
  %137 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %138 = load i64, ptr %137, align 8, !tbaa !5
  store i64 %138, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %139

139:                                              ; preds = %128
  %140 = load i64, ptr %20, align 8, !tbaa !5
  %141 = add nsw i64 %140, -1
  store i64 %141, ptr %20, align 8, !tbaa !5
  br label %124, !llvm.loop !15

142:                                              ; preds = %127
  %143 = load i64, ptr %3, align 8, !tbaa !5
  %144 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %143)
  %145 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef @.str.1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %146

146:                                              ; preds = %142
  %147 = load i64, ptr %16, align 8, !tbaa !5
  %148 = add nsw i64 %147, 1
  store i64 %148, ptr %16, align 8, !tbaa !5
  br label %95, !llvm.loop !16

149:                                              ; preds = %99
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %151 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %151)
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  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: 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)) #2 align 2

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 #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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 0, ptr %3, align 8, !tbaa !5
  %8 = 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)
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = call ptr @llvm.stacksave.p0()
  %12 = alloca i64, i64 %10, align 16
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = add nsw i64 %13, 1
  %15 = alloca i64, i64 %14, align 16
  %16 = getelementptr inbounds i64, ptr %12, i64 %10
  %.not38 = icmp eq i64 %10, 0
  br i1 %.not38, label %._crit_edge, label %.lr.ph

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %17 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %13, %0 ]
  %18 = getelementptr inbounds i64, ptr %15, i64 %17
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 -2000000000000000000, ptr %4, align 8, !tbaa !5
  call void @_ZSt4fillIPllEvT_S1_RKT0_(ptr noundef nonnull %15, ptr noundef nonnull %19, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  store i64 0, ptr %15, align 16, !tbaa !5
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %21 = icmp sgt i64 %20, 0
  br i1 %21, label %.lr.ph46, label %._crit_edge47

.lr.ph46:                                         ; preds = %._crit_edge
  %invariant.gep = getelementptr i8, ptr %15, i64 8
  br label %28

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.03539 = phi ptr [ %23, %.lr.ph ], [ %12, %0 ]
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %.03539)
  %23 = getelementptr inbounds i8, ptr %.03539, i64 8
  %.not = icmp eq ptr %23, %16
  br i1 %.not, label %._crit_edge.loopexit, label %.lr.ph

._crit_edge47:                                    ; preds = %._crit_edge43, %._crit_edge
  %24 = phi i64 [ 0, %._crit_edge ], [ %32, %._crit_edge43 ]
  %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.1)
  %27 = load i64, ptr %1, align 8, !tbaa !5
  %.not3653 = icmp slt i64 %27, 1
  br i1 %.not3653, label %._crit_edge57, label %.lr.ph56

28:                                               ; preds = %.lr.ph46, %._crit_edge43
  %29 = phi i64 [ 0, %.lr.ph46 ], [ %32, %._crit_edge43 ]
  %30 = phi i64 [ %20, %.lr.ph46 ], [ %33, %._crit_edge43 ]
  %.03444 = phi i64 [ 0, %.lr.ph46 ], [ %34, %._crit_edge43 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  %31 = icmp slt i64 %.03444, %30
  br i1 %31, label %.lr.ph42, label %._crit_edge43

._crit_edge43:                                    ; preds = %.lr.ph42, %28
  %32 = phi i64 [ %29, %28 ], [ %44, %.lr.ph42 ]
  %33 = phi i64 [ %30, %28 ], [ %46, %.lr.ph42 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %34 = add nuw nsw i64 %.03444, 1
  %35 = icmp slt i64 %34, %33
  br i1 %35, label %28, label %._crit_edge47, !llvm.loop !9

.lr.ph42:                                         ; preds = %28, %.lr.ph42
  %.03340 = phi i64 [ %45, %.lr.ph42 ], [ %.03444, %28 ]
  %36 = getelementptr inbounds i64, ptr %12, i64 %.03340
  %37 = load i64, ptr %36, align 8, !tbaa !5
  %38 = load i64, ptr %5, align 8, !tbaa !5
  %39 = add nsw i64 %38, %37
  store i64 %39, ptr %5, align 8, !tbaa !5
  %40 = sub nuw nsw i64 %.03340, %.03444
  %gep = getelementptr i64, ptr %invariant.gep, i64 %40
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %gep, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %42 = load i64, ptr %41, align 8, !tbaa !5
  store i64 %42, ptr %gep, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %44 = load i64, ptr %43, align 8, !tbaa !5
  store i64 %44, ptr %3, align 8, !tbaa !5
  %45 = add nuw nsw i64 %.03340, 1
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %.lr.ph42, label %._crit_edge43, !llvm.loop !11

._crit_edge57:                                    ; preds = %59, %._crit_edge47
  %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)
  call void @llvm.stackrestore.p0(ptr %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  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

.lr.ph56:                                         ; preds = %._crit_edge47, %59
  %49 = phi i64 [ %63, %59 ], [ %27, %._crit_edge47 ]
  %.03254 = phi i64 [ %62, %59 ], [ 1, %._crit_edge47 ]
  store i64 0, ptr %3, align 8, !tbaa !5
  %50 = load i64, ptr %2, align 8, !tbaa !5
  %51 = mul nsw i64 %50, %.03254
  %.not3748 = icmp sgt i64 %.03254, %49
  br i1 %.not3748, label %.preheader.preheader, label %.lr.ph51

.preheader.preheader:                             ; preds = %.lr.ph51, %.lr.ph56
  br label %.preheader

.lr.ph51:                                         ; preds = %.lr.ph56, %.lr.ph51
  %.03149 = phi i64 [ %57, %.lr.ph51 ], [ %.03254, %.lr.ph56 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %52 = getelementptr inbounds i64, ptr %15, i64 %.03149
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = add nsw i64 %53, %51
  store i64 %54, ptr %6, align 8, !tbaa !5
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %56 = load i64, ptr %55, align 8, !tbaa !5
  store i64 %56, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %57 = add nuw nsw i64 %.03149, 1
  %58 = load i64, ptr %1, align 8, !tbaa !5
  %.not37.not = icmp slt i64 %.03149, %58
  br i1 %.not37.not, label %.lr.ph51, label %.preheader.preheader, !llvm.loop !12

59:                                               ; preds = %.preheader
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %70)
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @.str.1)
  %62 = add nuw nsw i64 %.03254, 1
  %63 = load i64, ptr %1, align 8, !tbaa !5
  %.not36.not = icmp slt i64 %.03254, %63
  br i1 %.not36.not, label %.lr.ph56, label %._crit_edge57, !llvm.loop !13

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %.0.in52 = phi i64 [ %.0, %.preheader ], [ %.03254, %.preheader.preheader ]
  %.0 = add nsw i64 %.0.in52, -1
  %64 = load i64, ptr %2, align 8, !tbaa !5
  %65 = mul nsw i64 %64, %.0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %66 = getelementptr inbounds i64, ptr %15, i64 %.0
  %67 = load i64, ptr %66, align 8, !tbaa !5
  %68 = add nsw i64 %67, %65
  store i64 %68, ptr %7, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %70 = load i64, ptr %69, align 8, !tbaa !5
  store i64 %70, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %71 = icmp sgt i64 %.0.in52, 1
  br i1 %71, label %.preheader, label %59, !llvm.loop !14
}

; 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 #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) 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 #2 align 2

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

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


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