; LLVM IR from VastoLorde95/Competitive-Programming :: CodeChef/LONG/FEB15/XRMTRX (xr)

; 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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %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
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 1000000007, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i32 1, ptr %2, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %161, %0
  %23 = load i32, ptr %2, align 4, !tbaa !9
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr %2, align 4, !tbaa !9
  %25 = icmp ne i32 %23, 0
  br i1 %25, label %26, label %165

26:                                               ; preds = %22
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %4)
  store i64 1, ptr %6, align 8, !tbaa !5
  %29 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %29, ptr %7, align 8, !tbaa !5
  %30 = load i64, ptr %7, align 8, !tbaa !5
  %31 = srem i64 %30, 2
  %32 = icmp eq i64 %31, 1
  br i1 %32, label %33, label %36

33:                                               ; preds = %26
  %34 = load i64, ptr %7, align 8, !tbaa !5
  %35 = add nsw i64 %34, 1
  store i64 %35, ptr %7, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %33, %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 1, ptr %13, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %158, %36
  %38 = load i64, ptr %13, align 8, !tbaa !5
  %39 = shl i64 1, %38
  %40 = load i64, ptr %4, align 8, !tbaa !5
  %41 = icmp slt i64 %39, %40
  br i1 %41, label %42, label %46

42:                                               ; preds = %37
  %43 = load i64, ptr %13, align 8, !tbaa !5
  %44 = shl i64 1, %43
  %45 = icmp sgt i64 %44, 0
  br label %46

46:                                               ; preds = %42, %37
  %47 = phi i1 [ false, %37 ], [ %45, %42 ]
  br i1 %47, label %49, label %48

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

49:                                               ; preds = %46
  %50 = load i64, ptr %7, align 8, !tbaa !5
  %51 = load i64, ptr %13, align 8, !tbaa !5
  %52 = shl i64 1, %51
  %53 = and i64 %50, %52
  %54 = icmp eq i64 %53, 0
  br i1 %54, label %55, label %60

55:                                               ; preds = %49
  %56 = load i64, ptr %7, align 8, !tbaa !5
  %57 = load i64, ptr %13, align 8, !tbaa !5
  %58 = shl i64 1, %57
  %59 = or i64 %56, %58
  store i64 %59, ptr %5, align 8, !tbaa !5
  br label %69

60:                                               ; preds = %49
  %61 = load i64, ptr %7, align 8, !tbaa !5
  %62 = load i64, ptr %13, align 8, !tbaa !5
  %63 = shl i64 1, %62
  %64 = xor i64 %61, %63
  store i64 %64, ptr %7, align 8, !tbaa !5
  %65 = load i64, ptr %7, align 8, !tbaa !5
  %66 = load i64, ptr %13, align 8, !tbaa !5
  %67 = shl i64 1, %66
  %68 = or i64 %65, %67
  store i64 %68, ptr %5, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %60, %55
  %70 = load i64, ptr %3, align 8, !tbaa !5
  %71 = load i64, ptr %5, align 8, !tbaa !5
  %72 = icmp sle i64 %70, %71
  br i1 %72, label %73, label %157

73:                                               ; preds = %69
  %74 = load i64, ptr %5, align 8, !tbaa !5
  %75 = load i64, ptr %4, align 8, !tbaa !5
  %76 = icmp sle i64 %74, %75
  br i1 %76, label %77, label %157

77:                                               ; preds = %73
  %78 = load i64, ptr %13, align 8, !tbaa !5
  %79 = shl i64 1, %78
  %80 = sub nsw i64 %79, 1
  store i64 %80, ptr %9, align 8, !tbaa !5
  %81 = load i64, ptr %5, align 8, !tbaa !5
  %82 = load i64, ptr %9, align 8, !tbaa !5
  %83 = add nsw i64 %81, %82
  %84 = icmp sle i64 0, %83
  br i1 %84, label %85, label %109

85:                                               ; preds = %77
  %86 = load i64, ptr %5, align 8, !tbaa !5
  %87 = load i64, ptr %9, align 8, !tbaa !5
  %88 = add nsw i64 %86, %87
  %89 = load i64, ptr %4, align 8, !tbaa !5
  %90 = icmp sle i64 %88, %89
  br i1 %90, label %91, label %109

91:                                               ; preds = %85
  %92 = load i64, ptr %5, align 8, !tbaa !5
  %93 = load i64, ptr %3, align 8, !tbaa !5
  %94 = icmp eq i64 %92, %93
  br i1 %94, label %95, label %101

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %96 = load i64, ptr %13, align 8, !tbaa !5
  %97 = shl i64 1, %96
  %98 = sub nsw i64 %97, 1
  store i64 %98, ptr %15, align 8, !tbaa !5
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %100 = load i64, ptr %99, align 8, !tbaa !5
  store i64 %100, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %108

101:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %102 = load i64, ptr %13, align 8, !tbaa !5
  %103 = add nsw i64 %102, 1
  %104 = shl i64 1, %103
  %105 = sub nsw i64 %104, 1
  store i64 %105, ptr %16, align 8, !tbaa !5
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %107 = load i64, ptr %106, align 8, !tbaa !5
  store i64 %107, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %108

108:                                              ; preds = %101, %95
  br label %156

109:                                              ; preds = %85, %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %110 = load i64, ptr %4, align 8, !tbaa !5
  %111 = load i64, ptr %5, align 8, !tbaa !5
  %112 = sub nsw i64 %110, %111
  store i64 %112, ptr %17, align 8, !tbaa !5
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %114 = load i64, ptr %113, align 8, !tbaa !5
  store i64 %114, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %115 = load i64, ptr %13, align 8, !tbaa !5
  %116 = sub nsw i64 %115, 1
  %117 = trunc i64 %116 to i32
  store i32 %117, ptr %18, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %152, %109
  %119 = load i32, ptr %18, align 4, !tbaa !9
  %120 = icmp sge i32 %119, 1
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 7, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %155

122:                                              ; preds = %118
  %123 = load i64, ptr %5, align 8, !tbaa !5
  %124 = load i32, ptr %18, align 4, !tbaa !9
  %125 = zext i32 %124 to i64
  %126 = shl i64 1, %125
  %127 = add nsw i64 %123, %126
  store i64 %127, ptr %9, align 8, !tbaa !5
  %128 = load i64, ptr %3, align 8, !tbaa !5
  %129 = load i64, ptr %9, align 8, !tbaa !5
  %130 = icmp sle i64 %128, %129
  br i1 %130, label %131, label %151

131:                                              ; preds = %122
  %132 = load i64, ptr %4, align 8, !tbaa !5
  %133 = load i64, ptr %9, align 8, !tbaa !5
  %134 = icmp sge i64 %132, %133
  br i1 %134, label %135, label %151

135:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %136 = load i32, ptr %18, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = shl i64 1, %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %139 = load i64, ptr %4, align 8, !tbaa !5
  %140 = load i64, ptr %5, align 8, !tbaa !5
  %141 = sub nsw i64 %139, %140
  store i64 %141, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %142 = load i32, ptr %18, align 4, !tbaa !9
  %143 = zext i32 %142 to i64
  %144 = shl i64 1, %143
  %145 = sub nsw i64 %144, 1
  store i64 %145, ptr %21, align 8, !tbaa !5
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %147 = load i64, ptr %146, align 8, !tbaa !5
  %148 = add nsw i64 %138, %147
  store i64 %148, ptr %19, align 8, !tbaa !5
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %150 = load i64, ptr %149, align 8, !tbaa !5
  store i64 %150, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %151

151:                                              ; preds = %135, %131, %122
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %18, align 4, !tbaa !9
  %154 = add nsw i32 %153, -1
  store i32 %154, ptr %18, align 4, !tbaa !9
  br label %118, !llvm.loop !11

155:                                              ; preds = %121
  br label %156

156:                                              ; preds = %155, %108
  br label %157

157:                                              ; preds = %156, %73, %69
  br label %158

158:                                              ; preds = %157
  %159 = load i64, ptr %13, align 8, !tbaa !5
  %160 = add nsw i64 %159, 1
  store i64 %160, ptr %13, align 8, !tbaa !5
  br label %37, !llvm.loop !13

161:                                              ; preds = %48
  %162 = load i64, ptr %6, align 8, !tbaa !5
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %162)
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %22, !llvm.loop !14

165:                                              ; preds = %22
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  %166 = load i32, ptr %1, align 4
  ret i32 %166
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #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)) #4

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 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 long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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
  %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
  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
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 1, ptr %3, align 8, !tbaa !5
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = icmp sgt i64 %12, 2
  br i1 %13, label %.lr.ph56.preheader, label %._crit_edge

.lr.ph56.preheader:                               ; preds = %0
  %14 = load i64, ptr %1, align 8, !tbaa !5
  %15 = and i64 %14, -9223372036854775807
  %16 = icmp eq i64 %15, 1
  %17 = zext i1 %16 to i64
  %spec.select = add nuw nsw i64 %14, %17
  br label %.lr.ph56

._crit_edge:                                      ; preds = %.loopexit, %0
  %18 = phi i64 [ 1, %0 ], [ %64, %.loopexit ]
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %18)
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  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 i32 0

.lr.ph56:                                         ; preds = %.lr.ph56.preheader, %.loopexit
  %21 = phi i64 [ 1, %.lr.ph56.preheader ], [ %64, %.loopexit ]
  %indvars.iv = phi i64 [ 0, %.lr.ph56.preheader ], [ %indvars.iv.next, %.loopexit ]
  %22 = phi i64 [ %12, %.lr.ph56.preheader ], [ %67, %.loopexit ]
  %23 = phi i64 [ 2, %.lr.ph56.preheader ], [ %66, %.loopexit ]
  %.03655 = phi i64 [ 1, %.lr.ph56.preheader ], [ %65, %.loopexit ]
  %.154 = phi i64 [ %spec.select, %.lr.ph56.preheader ], [ %.2, %.loopexit ]
  %24 = and i64 %23, %.154
  %25 = icmp eq i64 %24, 0
  %26 = select i1 %25, i64 0, i64 %23
  %.2 = xor i64 %26, %.154
  %.038 = or i64 %23, %.154
  %27 = load i64, ptr %1, align 8, !tbaa !5
  %.not45 = icmp sgt i64 %27, %.038
  %.not46 = icmp sgt i64 %.038, %22
  %or.cond51 = or i1 %.not46, %.not45
  br i1 %or.cond51, label %.loopexit, label %28

28:                                               ; preds = %.lr.ph56
  %29 = add nsw i64 %23, -1
  %30 = add nsw i64 %.038, %29
  %31 = icmp slt i64 %30, 0
  %.not47 = icmp sgt i64 %30, %22
  %or.cond = or i1 %31, %.not47
  br i1 %or.cond, label %42, label %32

32:                                               ; preds = %28
  %33 = icmp eq i64 %.038, %27
  br i1 %33, label %34, label %37

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  store i64 %29, ptr %4, align 8, !tbaa !5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %36 = load i64, ptr %35, align 8, !tbaa !5
  store i64 %36, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %.loopexit

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %38 = shl nuw i64 2, %.03655
  %39 = add nsw i64 %38, -1
  store i64 %39, ptr %5, align 8, !tbaa !5
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %41 = load i64, ptr %40, align 8, !tbaa !5
  store i64 %41, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %.loopexit

42:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %43 = sub nsw i64 %22, %.038
  store i64 %43, ptr %6, align 8, !tbaa !5
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %45 = load i64, ptr %44, align 8, !tbaa !5
  store i64 %45, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %46 = trunc i64 %.03655 to i32
  %.052 = add i32 %46, -1
  %47 = icmp sgt i32 %.052, 0
  br i1 %47, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %42, %61
  %48 = phi i64 [ %62, %61 ], [ %45, %42 ]
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %61 ], [ %indvars.iv, %42 ]
  %49 = shl nuw i64 1, %indvars.iv57
  %50 = add nsw i64 %49, %.038
  %51 = load i64, ptr %1, align 8, !tbaa !5
  %.not48 = icmp sgt i64 %51, %50
  %52 = load i64, ptr %2, align 8
  %.not49 = icmp slt i64 %52, %50
  %or.cond50 = select i1 %.not48, i1 true, i1 %.not49
  br i1 %or.cond50, label %61, label %53

53:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %54 = sub nsw i64 %52, %.038
  store i64 %54, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %55 = add nsw i64 %49, -1
  store i64 %55, ptr %9, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %57 = load i64, ptr %56, align 8, !tbaa !5
  %58 = add nsw i64 %57, %49
  store i64 %58, ptr %7, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %60 = load i64, ptr %59, align 8, !tbaa !5
  store i64 %60, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %61

61:                                               ; preds = %.lr.ph, %53
  %62 = phi i64 [ %48, %.lr.ph ], [ %60, %53 ]
  %indvars.iv.next58 = add nsw i64 %indvars.iv57, -1
  %63 = icmp sgt i64 %indvars.iv57, 1
  br i1 %63, label %.lr.ph, label %.loopexit, !llvm.loop !9

.loopexit:                                        ; preds = %61, %42, %.lr.ph56, %34, %37
  %64 = phi i64 [ %45, %42 ], [ %21, %.lr.ph56 ], [ %36, %34 ], [ %41, %37 ], [ %62, %61 ]
  %65 = add nuw nsw i64 %.03655, 1
  %66 = shl nuw i64 2, %.03655
  %67 = load i64, ptr %2, align 8, !tbaa !5
  %68 = icmp slt i64 %66, %67
  %69 = icmp ne i64 %65, 63
  %70 = and i1 %69, %68
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  br i1 %70, label %.lr.ph56, label %._crit_edge, !llvm.loop !11
}

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) 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)) #4

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


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