; LLVM IR from afrozchakure/Competitive-Programming-Solutions :: CodeChefProblems/Problem (PrintPattern)

; 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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %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
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %12 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %12, ptr %4, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %136, %0
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = add i64 %14, -1
  store i64 %15, ptr %3, align 8, !tbaa !5
  %16 = icmp ne i64 %14, 0
  br i1 %16, label %17, label %137

17:                                               ; preds = %13
  %18 = load i64, ptr %4, align 8, !tbaa !5
  %19 = sub i64 %18, 1
  %20 = load i64, ptr %3, align 8, !tbaa !5
  %21 = icmp ne i64 %19, %20
  br i1 %21, label %22, label %24

22:                                               ; preds = %17
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %24

24:                                               ; preds = %22, %17
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store i64 1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 3, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %49, %24
  %27 = load i64, ptr %7, align 8, !tbaa !5
  %28 = load i64, ptr %2, align 8, !tbaa !5
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %31, label %30

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

31:                                               ; preds = %26
  %32 = load i64, ptr %7, align 8, !tbaa !5
  %33 = load i64, ptr %2, align 8, !tbaa !5
  %34 = sub i64 %33, 1
  %35 = icmp eq i64 %32, %34
  br i1 %35, label %36, label %39

36:                                               ; preds = %31
  %37 = load i64, ptr %5, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %37)
  br label %43

39:                                               ; preds = %31
  %40 = load i64, ptr %5, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %40)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef @.str)
  br label %43

43:                                               ; preds = %39, %36
  %44 = load i64, ptr %5, align 8, !tbaa !5
  %45 = load i64, ptr %6, align 8, !tbaa !5
  %46 = add i64 %44, %45
  store i64 %46, ptr %5, align 8, !tbaa !5
  %47 = load i64, ptr %6, align 8, !tbaa !5
  %48 = mul i64 2, %47
  store i64 %48, ptr %6, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %43
  %50 = load i64, ptr %7, align 8, !tbaa !5
  %51 = add i64 %50, 1
  store i64 %51, ptr %7, align 8, !tbaa !5
  br label %26, !llvm.loop !9

52:                                               ; preds = %30
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i64 2, ptr %5, align 8, !tbaa !5
  store i64 3, ptr %6, 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 %54

54:                                               ; preds = %77, %52
  %55 = load i64, ptr %8, align 8, !tbaa !5
  %56 = load i64, ptr %2, align 8, !tbaa !5
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %80

59:                                               ; preds = %54
  %60 = load i64, ptr %8, align 8, !tbaa !5
  %61 = load i64, ptr %2, align 8, !tbaa !5
  %62 = sub i64 %61, 1
  %63 = icmp eq i64 %60, %62
  br i1 %63, label %64, label %67

64:                                               ; preds = %59
  %65 = load i64, ptr %5, align 8, !tbaa !5
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %65)
  br label %71

67:                                               ; preds = %59
  %68 = load i64, ptr %5, align 8, !tbaa !5
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %68)
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef @.str)
  br label %71

71:                                               ; preds = %67, %64
  %72 = load i64, ptr %5, align 8, !tbaa !5
  %73 = load i64, ptr %6, align 8, !tbaa !5
  %74 = add i64 %72, %73
  store i64 %74, ptr %5, align 8, !tbaa !5
  %75 = load i64, ptr %6, align 8, !tbaa !5
  %76 = mul i64 2, %75
  store i64 %76, ptr %6, align 8, !tbaa !5
  br label %77

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

80:                                               ; preds = %58
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i64 4, ptr %5, align 8, !tbaa !5
  store i64 6, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %105, %80
  %83 = load i64, ptr %9, align 8, !tbaa !5
  %84 = load i64, ptr %2, align 8, !tbaa !5
  %85 = icmp ult i64 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %108

87:                                               ; preds = %82
  %88 = load i64, ptr %9, align 8, !tbaa !5
  %89 = load i64, ptr %2, align 8, !tbaa !5
  %90 = sub i64 %89, 1
  %91 = icmp eq i64 %88, %90
  br i1 %91, label %92, label %95

92:                                               ; preds = %87
  %93 = load i64, ptr %5, align 8, !tbaa !5
  %94 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %93)
  br label %99

95:                                               ; preds = %87
  %96 = load i64, ptr %5, align 8, !tbaa !5
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(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 = %95, %92
  %100 = load i64, ptr %5, align 8, !tbaa !5
  %101 = load i64, ptr %6, align 8, !tbaa !5
  %102 = add i64 %100, %101
  store i64 %102, ptr %5, align 8, !tbaa !5
  %103 = load i64, ptr %6, align 8, !tbaa !5
  %104 = mul i64 2, %103
  store i64 %104, ptr %6, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %99
  %106 = load i64, ptr %9, align 8, !tbaa !5
  %107 = add i64 %106, 1
  store i64 %107, ptr %9, align 8, !tbaa !5
  br label %82, !llvm.loop !12

108:                                              ; preds = %86
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i64 3, ptr %5, align 8, !tbaa !5
  store i64 3, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store i64 0, ptr %10, align 8, !tbaa !5
  br label %110

110:                                              ; preds = %133, %108
  %111 = load i64, ptr %10, align 8, !tbaa !5
  %112 = load i64, ptr %2, align 8, !tbaa !5
  %113 = icmp ult i64 %111, %112
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %136

115:                                              ; preds = %110
  %116 = load i64, ptr %10, align 8, !tbaa !5
  %117 = load i64, ptr %2, align 8, !tbaa !5
  %118 = sub i64 %117, 1
  %119 = icmp eq i64 %116, %118
  br i1 %119, label %120, label %123

120:                                              ; preds = %115
  %121 = load i64, ptr %5, align 8, !tbaa !5
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %121)
  br label %127

123:                                              ; preds = %115
  %124 = load i64, ptr %5, align 8, !tbaa !5
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %124)
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %125, ptr noundef @.str)
  br label %127

127:                                              ; preds = %123, %120
  %128 = load i64, ptr %5, align 8, !tbaa !5
  %129 = load i64, ptr %6, align 8, !tbaa !5
  %130 = add i64 %128, %129
  store i64 %130, ptr %5, align 8, !tbaa !5
  %131 = load i64, ptr %6, align 8, !tbaa !5
  %132 = mul i64 2, %131
  store i64 %132, ptr %6, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %127
  %134 = load i64, ptr %10, align 8, !tbaa !5
  %135 = add i64 %134, 1
  store i64 %135, ptr %10, align 8, !tbaa !5
  br label %110, !llvm.loop !13

136:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %13, !llvm.loop !14

137:                                              ; preds = %13
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  ret i32 0
}

; 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 @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { mustprogress norecurse 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 = { 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 = { 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 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}


; 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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() 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 @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %4 = load i64, ptr %2, align 8, !tbaa !5
  %5 = add i64 %4, -1
  store i64 %5, ptr %2, align 8, !tbaa !5
  %.not66 = icmp eq i64 %4, 0
  br i1 %.not66, label %._crit_edge69, label %.lr.ph68

thread-pre-split:                                 ; preds = %61, %._crit_edge60
  %.pr = load i64, ptr %2, align 8, !tbaa !5
  %6 = add i64 %.pr, -1
  store i64 %6, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i64 %.pr, 0
  br i1 %.not, label %._crit_edge69, label %.lr.ph68

.lr.ph68:                                         ; preds = %0, %thread-pre-split
  %7 = phi i64 [ %.pr, %thread-pre-split ], [ %4, %0 ]
  %.not45 = icmp eq i64 %4, %7
  br i1 %.not45, label %10, label %8

8:                                                ; preds = %.lr.ph68
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %10

10:                                               ; preds = %8, %.lr.ph68
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERy(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %12 = load i64, ptr %1, align 8, !tbaa !5
  %.not70 = icmp eq i64 %12, 0
  br i1 %.not70, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %21, %10
  %13 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %.not71 = icmp eq i64 %14, 0
  br i1 %.not71, label %._crit_edge54, label %.lr.ph53

.lr.ph:                                           ; preds = %10, %21
  %15 = phi i64 [ %25, %21 ], [ %12, %10 ]
  %.03548 = phi i64 [ %24, %21 ], [ 0, %10 ]
  %.03647 = phi i64 [ %23, %21 ], [ 3, %10 ]
  %.03746 = phi i64 [ %22, %21 ], [ 1, %10 ]
  %16 = add i64 %15, -1
  %17 = icmp eq i64 %.03548, %16
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.03746)
  br i1 %17, label %21, label %19

19:                                               ; preds = %.lr.ph
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str)
  br label %21

21:                                               ; preds = %.lr.ph, %19
  %22 = add i64 %.03647, %.03746
  %23 = shl i64 %.03647, 1
  %24 = add nuw i64 %.03548, 1
  %25 = load i64, ptr %1, align 8, !tbaa !5
  %26 = icmp ult i64 %24, %25
  br i1 %26, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge54:                                    ; preds = %35, %._crit_edge
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %28 = load i64, ptr %1, align 8, !tbaa !5
  %.not72 = icmp eq i64 %28, 0
  br i1 %.not72, label %._crit_edge60, label %.lr.ph59

.lr.ph53:                                         ; preds = %._crit_edge, %35
  %29 = phi i64 [ %39, %35 ], [ %14, %._crit_edge ]
  %.03451 = phi i64 [ %38, %35 ], [ 0, %._crit_edge ]
  %.150 = phi i64 [ %37, %35 ], [ 3, %._crit_edge ]
  %.13849 = phi i64 [ %36, %35 ], [ 2, %._crit_edge ]
  %30 = add i64 %29, -1
  %31 = icmp eq i64 %.03451, %30
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.13849)
  br i1 %31, label %35, label %33

33:                                               ; preds = %.lr.ph53
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str)
  br label %35

35:                                               ; preds = %.lr.ph53, %33
  %36 = add i64 %.150, %.13849
  %37 = shl i64 %.150, 1
  %38 = add nuw i64 %.03451, 1
  %39 = load i64, ptr %1, align 8, !tbaa !5
  %40 = icmp ult i64 %38, %39
  br i1 %40, label %.lr.ph53, label %._crit_edge54, !llvm.loop !11

._crit_edge60:                                    ; preds = %49, %._crit_edge54
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %42 = load i64, ptr %1, align 8, !tbaa !5
  %.not73 = icmp eq i64 %42, 0
  br i1 %.not73, label %thread-pre-split, label %.lr.ph65, !llvm.loop !12

.lr.ph59:                                         ; preds = %._crit_edge54, %49
  %43 = phi i64 [ %53, %49 ], [ %28, %._crit_edge54 ]
  %.03357 = phi i64 [ %52, %49 ], [ 0, %._crit_edge54 ]
  %.256 = phi i64 [ %51, %49 ], [ 6, %._crit_edge54 ]
  %.23955 = phi i64 [ %50, %49 ], [ 4, %._crit_edge54 ]
  %44 = add i64 %43, -1
  %45 = icmp eq i64 %.03357, %44
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.23955)
  br i1 %45, label %49, label %47

47:                                               ; preds = %.lr.ph59
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @.str)
  br label %49

49:                                               ; preds = %.lr.ph59, %47
  %50 = add i64 %.256, %.23955
  %51 = shl i64 %.256, 1
  %52 = add nuw i64 %.03357, 1
  %53 = load i64, ptr %1, align 8, !tbaa !5
  %54 = icmp ult i64 %52, %53
  br i1 %54, label %.lr.ph59, label %._crit_edge60, !llvm.loop !13

.lr.ph65:                                         ; preds = %._crit_edge60, %61
  %55 = phi i64 [ %65, %61 ], [ %42, %._crit_edge60 ]
  %.063 = phi i64 [ %64, %61 ], [ 0, %._crit_edge60 ]
  %.362 = phi i64 [ %63, %61 ], [ 3, %._crit_edge60 ]
  %.34061 = phi i64 [ %62, %61 ], [ 3, %._crit_edge60 ]
  %56 = add i64 %55, -1
  %57 = icmp eq i64 %.063, %56
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.34061)
  br i1 %57, label %61, label %59

59:                                               ; preds = %.lr.ph65
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @.str)
  br label %61

61:                                               ; preds = %.lr.ph65, %59
  %62 = add i64 %.362, %.34061
  %63 = shl i64 %.362, 1
  %64 = add nuw i64 %.063, 1
  %65 = load i64, ptr %1, align 8, !tbaa !5
  %66 = icmp ult i64 %64, %65
  br i1 %66, label %.lr.ph65, label %thread-pre-split, !llvm.loop !14

._crit_edge69:                                    ; preds = %thread-pre-split, %0
  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 i32 0
}

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

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

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

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

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { mustprogress norecurse 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 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 = { 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 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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass