; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #771 (Div. 2)/A. Reverse.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 [2 x i8], align 1
@.str.1 = 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 ptr, 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
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %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
  %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 = load i64, ptr %1, align 8, !tbaa !5
  %15 = add nsw i64 %14, 1
  %16 = call ptr @llvm.stacksave.p0()
  store ptr %16, ptr %2, align 8
  %17 = alloca i64, i64 %15, align 16
  store i64 %15, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store i64 1, ptr %4, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %27, %0
  %19 = load i64, ptr %4, align 8, !tbaa !5
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %21 = icmp sle i64 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %30

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

27:                                               ; preds = %23
  %28 = load i64, ptr %4, align 8, !tbaa !5
  %29 = add nsw i64 %28, 1
  store i64 %29, ptr %4, align 8, !tbaa !5
  br label %18, !llvm.loop !9

30:                                               ; preds = %22
  %31 = getelementptr inbounds i64, ptr %17, i64 0
  store i64 0, ptr %31, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %32 = load i64, ptr %1, align 8, !tbaa !5
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %34 = load i64, ptr %1, align 8, !tbaa !5
  %35 = add nsw i64 %34, 1
  store i64 %35, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 1, ptr %7, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %83, %30
  %37 = load i64, ptr %7, align 8, !tbaa !5
  %38 = load i64, ptr %1, align 8, !tbaa !5
  %39 = icmp sle i64 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 5, ptr %8, align 4
  br label %86

41:                                               ; preds = %36
  %42 = load i64, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds i64, ptr %17, i64 %42
  %44 = load i64, ptr %43, align 8, !tbaa !5
  %45 = load i64, ptr %7, align 8, !tbaa !5
  %46 = icmp ne i64 %44, %45
  br i1 %46, label %47, label %49

47:                                               ; preds = %41
  %48 = load i64, ptr %7, align 8, !tbaa !5
  store i64 %48, ptr %5, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %47, %41
  %50 = load i64, ptr %5, align 8, !tbaa !5
  %51 = load i64, ptr %1, align 8, !tbaa !5
  %52 = add nsw i64 %51, 1
  %53 = icmp ne i64 %50, %52
  br i1 %53, label %54, label %82

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %55 = load i64, ptr %7, align 8, !tbaa !5
  %56 = add nsw i64 %55, 1
  store i64 %56, ptr %9, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %77, %54
  %58 = load i64, ptr %9, align 8, !tbaa !5
  %59 = load i64, ptr %1, align 8, !tbaa !5
  %60 = icmp sle i64 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 8, ptr %8, align 4
  br label %80

62:                                               ; preds = %57
  %63 = load i64, ptr %9, align 8, !tbaa !5
  %64 = getelementptr inbounds i64, ptr %17, i64 %63
  %65 = load i64, ptr %64, align 8, !tbaa !5
  %66 = load i64, ptr %7, align 8, !tbaa !5
  %67 = icmp eq i64 %65, %66
  br i1 %67, label %68, label %70

68:                                               ; preds = %62
  %69 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %69, ptr %6, align 8, !tbaa !5
  store i32 8, ptr %8, align 4
  br label %80

70:                                               ; preds = %62
  %71 = load i64, ptr %6, align 8, !tbaa !5
  %72 = load i64, ptr %1, align 8, !tbaa !5
  %73 = add nsw i64 %72, 1
  %74 = icmp ne i64 %71, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %70
  store i32 8, ptr %8, align 4
  br label %80

76:                                               ; preds = %70
  br label %77

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

80:                                               ; preds = %75, %68, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %81

81:                                               ; preds = %80
  store i32 5, ptr %8, align 4
  br label %86

82:                                               ; preds = %49
  br label %83

83:                                               ; preds = %82
  %84 = load i64, ptr %7, align 8, !tbaa !5
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %7, align 8, !tbaa !5
  br label %36, !llvm.loop !12

86:                                               ; preds = %81, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %87

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 1, ptr %10, align 8, !tbaa !5
  br label %88

88:                                               ; preds = %99, %87
  %89 = load i64, ptr %10, align 8, !tbaa !5
  %90 = load i64, ptr %5, align 8, !tbaa !5
  %91 = icmp slt i64 %89, %90
  br i1 %91, label %93, label %92

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

93:                                               ; preds = %88
  %94 = load i64, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds i64, ptr %17, i64 %94
  %96 = load i64, ptr %95, align 8, !tbaa !5
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %96)
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %97, ptr noundef @.str)
  br label %99

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

102:                                              ; preds = %92
  %103 = load i64, ptr %6, align 8, !tbaa !5
  %104 = load i64, ptr %1, align 8, !tbaa !5
  %105 = add nsw i64 %104, 1
  %106 = icmp ne i64 %103, %105
  br i1 %106, label %107, label %141

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %108 = load i64, ptr %6, align 8, !tbaa !5
  store i64 %108, ptr %11, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %120, %107
  %110 = load i64, ptr %11, align 8, !tbaa !5
  %111 = load i64, ptr %5, align 8, !tbaa !5
  %112 = icmp sge i64 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %123

114:                                              ; preds = %109
  %115 = load i64, ptr %11, align 8, !tbaa !5
  %116 = getelementptr inbounds i64, ptr %17, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %117)
  %119 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef @.str)
  br label %120

120:                                              ; preds = %114
  %121 = load i64, ptr %11, align 8, !tbaa !5
  %122 = add nsw i64 %121, -1
  store i64 %122, ptr %11, align 8, !tbaa !5
  br label %109, !llvm.loop !14

123:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %124 = load i64, ptr %6, align 8, !tbaa !5
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %12, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %137, %123
  %127 = load i64, ptr %12, align 8, !tbaa !5
  %128 = load i64, ptr %1, align 8, !tbaa !5
  %129 = icmp sle i64 %127, %128
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %140

131:                                              ; preds = %126
  %132 = load i64, ptr %12, align 8, !tbaa !5
  %133 = getelementptr inbounds i64, ptr %17, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !5
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %134)
  %136 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef @.str)
  br label %137

137:                                              ; preds = %131
  %138 = load i64, ptr %12, align 8, !tbaa !5
  %139 = add nsw i64 %138, 1
  store i64 %139, ptr %12, align 8, !tbaa !5
  br label %126, !llvm.loop !15

140:                                              ; preds = %130
  br label %141

141:                                              ; preds = %140, %102
  %142 = 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)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %143 = load ptr, ptr %2, align 8
  call void @llvm.stackrestore.p0(ptr %143)
  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}
!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 [2 x i8], align 1
@.str.1 = 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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %2 = 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)
  %3 = load i64, ptr %1, align 8, !tbaa !5
  %4 = add nsw i64 %3, 1
  %5 = call ptr @llvm.stacksave.p0()
  %6 = alloca i64, i64 %4, align 16
  %7 = load i64, ptr %1, align 8, !tbaa !5
  %.not54 = icmp slt i64 %7, 1
  br i1 %.not54, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  store i64 0, ptr %6, align 16, !tbaa !5
  br label %.loopexit

._crit_edge:                                      ; preds = %.lr.ph
  store i64 0, ptr %6, align 16, !tbaa !5
  %8 = add i64 %12, 1
  %.not4056 = icmp slt i64 %12, 1
  br i1 %.not4056, label %.loopexit, label %.lr.ph60

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.03755 = phi i64 [ %11, %.lr.ph ], [ 1, %0 ]
  %9 = getelementptr inbounds i64, ptr %6, i64 %.03755
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %11 = add nuw nsw i64 %.03755, 1
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.03755, %12
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph60:                                         ; preds = %._crit_edge, %19
  %.03358 = phi i64 [ %20, %19 ], [ 1, %._crit_edge ]
  %13 = getelementptr inbounds i64, ptr %6, i64 %.03358
  %14 = load i64, ptr %13, align 8, !tbaa !5
  %.not41 = icmp eq i64 %14, %.03358
  %.not4294 = icmp eq i64 %.03358, %8
  %.not42 = or i1 %.not41, %.not4294
  br i1 %.not42, label %19, label %.preheader49

.preheader49:                                     ; preds = %.lr.ph60, %15
  %.032.in = phi i64 [ %.032, %15 ], [ %.03358, %.lr.ph60 ]
  %.not43.not = icmp slt i64 %.032.in, %12
  br i1 %.not43.not, label %15, label %.loopexit50

15:                                               ; preds = %.preheader49
  %.032 = add nuw nsw i64 %.032.in, 1
  %16 = getelementptr inbounds i64, ptr %6, i64 %.032
  %17 = load i64, ptr %16, align 8, !tbaa !5
  %18 = icmp eq i64 %17, %.03358
  br i1 %18, label %.loopexit50, label %.preheader49, !llvm.loop !11

19:                                               ; preds = %.lr.ph60
  %20 = add nuw i64 %.03358, 1
  %exitcond.not = icmp eq i64 %.03358, %12
  br i1 %exitcond.not, label %.loopexit50, label %.lr.ph60, !llvm.loop !12

.loopexit50:                                      ; preds = %19, %.preheader49, %15
  %.2 = phi i64 [ %.03358, %15 ], [ %.03358, %.preheader49 ], [ %8, %19 ]
  %.1 = phi i64 [ %8, %.preheader49 ], [ %.032, %15 ], [ %8, %19 ]
  %21 = icmp sgt i64 %.2, 1
  br i1 %21, label %.lr.ph64, label %._crit_edge65

._crit_edge65.loopexit:                           ; preds = %.lr.ph64
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  %.pre78 = add nsw i64 %.pre, 1
  br label %._crit_edge65

._crit_edge65:                                    ; preds = %._crit_edge65.loopexit, %.loopexit50
  %.pre-phi = phi i64 [ %.pre78, %._crit_edge65.loopexit ], [ %8, %.loopexit50 ]
  %22 = phi i64 [ %.pre, %._crit_edge65.loopexit ], [ %12, %.loopexit50 ]
  %.not45 = icmp eq i64 %.1, %.pre-phi
  br i1 %.not45, label %.loopexit, label %.preheader48

.preheader48:                                     ; preds = %._crit_edge65
  %.not4666 = icmp slt i64 %.1, %.2
  br i1 %.not4666, label %.preheader, label %.lr.ph68

.lr.ph64:                                         ; preds = %.loopexit50, %.lr.ph64
  %.03162 = phi i64 [ %27, %.lr.ph64 ], [ 1, %.loopexit50 ]
  %23 = getelementptr inbounds i64, ptr %6, i64 %.03162
  %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)
  %27 = add nuw nsw i64 %.03162, 1
  %exitcond76.not = icmp eq i64 %27, %.2
  br i1 %exitcond76.not, label %._crit_edge65.loopexit, label %.lr.ph64, !llvm.loop !13

.preheader.loopexit:                              ; preds = %.lr.ph68
  %.pre77 = load i64, ptr %1, align 8, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %.preheader48
  %28 = phi i64 [ %.pre77, %.preheader.loopexit ], [ %22, %.preheader48 ]
  %.not47.not69 = icmp slt i64 %.1, %28
  br i1 %.not47.not69, label %.lr.ph71, label %.loopexit

.lr.ph68:                                         ; preds = %.preheader48, %.lr.ph68
  %.03067 = phi i64 [ %33, %.lr.ph68 ], [ %.1, %.preheader48 ]
  %29 = getelementptr inbounds i64, ptr %6, i64 %.03067
  %30 = load i64, ptr %29, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %30)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str)
  %33 = add nsw i64 %.03067, -1
  %.not46.not = icmp sgt i64 %.03067, %.2
  br i1 %.not46.not, label %.lr.ph68, label %.preheader.loopexit, !llvm.loop !14

.lr.ph71:                                         ; preds = %.preheader, %.lr.ph71
  %.0.in70 = phi i64 [ %.0, %.lr.ph71 ], [ %.1, %.preheader ]
  %.0 = add nsw i64 %.0.in70, 1
  %34 = getelementptr inbounds i64, ptr %6, i64 %.0
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str)
  %38 = load i64, ptr %1, align 8, !tbaa !5
  %.not47.not = icmp slt i64 %.0, %38
  br i1 %.not47.not, label %.lr.ph71, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %.lr.ph71, %._crit_edge, %._crit_edge.thread, %.preheader, %._crit_edge65
  %39 = 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)
  call void @llvm.stackrestore.p0(ptr %5)
  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}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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