; LLVM IR from AdarshGaur/Competitive-Programming :: Codeforces/Codeforces Round #306 (Div. 2)/B. Preparing Olympiad.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" }

@.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

; 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 i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, 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
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !5
  %19 = 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)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %23 = load i64, ptr %1, align 8, !tbaa !5
  %24 = call ptr @llvm.stacksave.p0()
  store ptr %24, ptr %6, align 8
  %25 = alloca i64, i64 %23, align 16
  store i64 %23, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr %25, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %26 = load ptr, ptr %8, align 8, !tbaa !9
  store ptr %26, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %27 = load ptr, ptr %8, align 8, !tbaa !9
  %28 = mul nuw i64 8, %23
  %29 = udiv i64 %28, 8
  %30 = getelementptr inbounds i64, ptr %27, i64 %29
  store ptr %30, ptr %10, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %40, %0
  %32 = load ptr, ptr %9, align 8, !tbaa !9
  %33 = load ptr, ptr %10, align 8, !tbaa !9
  %34 = icmp ne ptr %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  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
  br label %43

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %37 = load ptr, ptr %9, align 8, !tbaa !9
  store ptr %37, ptr %11, align 8, !tbaa !9
  %38 = load ptr, ptr %11, align 8, !tbaa !9
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %38)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %40

40:                                               ; preds = %36
  %41 = load ptr, ptr %9, align 8, !tbaa !9
  %42 = getelementptr inbounds i64, ptr %41, i32 1
  store ptr %42, ptr %9, align 8, !tbaa !9
  br label %31

43:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 2, ptr %12, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %107, %43
  %45 = load i64, ptr %12, align 8, !tbaa !5
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = trunc i64 %46 to i32
  %48 = shl i32 1, %47
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %45, %49
  br i1 %50, label %52, label %51

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

52:                                               ; preds = %44
  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
  store i64 2000000000000000000, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 0, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 0, ptr %18, align 8, !tbaa !5
  br label %53

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

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

58:                                               ; preds = %53
  %59 = load i64, ptr %12, align 8, !tbaa !5
  %60 = load i64, ptr %18, align 8, !tbaa !5
  %61 = trunc i64 %60 to i32
  %62 = shl i32 1, %61
  %63 = sext i32 %62 to i64
  %64 = and i64 %59, %63
  %65 = icmp ne i64 %64, 0
  br i1 %65, label %66, label %82

66:                                               ; preds = %58
  %67 = load i64, ptr %14, align 8, !tbaa !5
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %14, align 8, !tbaa !5
  %69 = load i64, ptr %18, align 8, !tbaa !5
  %70 = getelementptr inbounds i64, ptr %25, i64 %69
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %70)
  %72 = load i64, ptr %71, align 8, !tbaa !5
  store i64 %72, ptr %15, align 8, !tbaa !5
  %73 = load i64, ptr %18, align 8, !tbaa !5
  %74 = getelementptr inbounds i64, ptr %25, i64 %73
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %74)
  %76 = load i64, ptr %75, align 8, !tbaa !5
  store i64 %76, ptr %16, align 8, !tbaa !5
  %77 = load i64, ptr %18, align 8, !tbaa !5
  %78 = getelementptr inbounds i64, ptr %25, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !5
  %80 = load i64, ptr %17, align 8, !tbaa !5
  %81 = add nsw i64 %80, %79
  store i64 %81, ptr %17, align 8, !tbaa !5
  br label %82

82:                                               ; preds = %66, %58
  br label %83

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

86:                                               ; preds = %57
  %87 = load i64, ptr %14, align 8, !tbaa !5
  %88 = icmp sge i64 %87, 2
  br i1 %88, label %89, label %106

89:                                               ; preds = %86
  %90 = load i64, ptr %17, align 8, !tbaa !5
  %91 = load i64, ptr %2, align 8, !tbaa !5
  %92 = icmp sge i64 %90, %91
  br i1 %92, label %93, label %106

93:                                               ; preds = %89
  %94 = load i64, ptr %17, align 8, !tbaa !5
  %95 = load i64, ptr %3, align 8, !tbaa !5
  %96 = icmp sle i64 %94, %95
  br i1 %96, label %97, label %106

97:                                               ; preds = %93
  %98 = load i64, ptr %16, align 8, !tbaa !5
  %99 = load i64, ptr %15, align 8, !tbaa !5
  %100 = sub nsw i64 %98, %99
  %101 = load i64, ptr %4, align 8, !tbaa !5
  %102 = icmp sge i64 %100, %101
  br i1 %102, label %103, label %106

103:                                              ; preds = %97
  %104 = load i64, ptr %5, align 8, !tbaa !5
  %105 = add nsw i64 %104, 1
  store i64 %105, ptr %5, align 8, !tbaa !5
  br label %106

106:                                              ; preds = %103, %97, %93, %89, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %12, align 8, !tbaa !5
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %12, align 8, !tbaa !5
  br label %44, !llvm.loop !13

110:                                              ; preds = %51
  %111 = load i64, ptr %5, align 8, !tbaa !5
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %111)
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef @.str)
  %114 = load ptr, ptr %6, align 8
  call void @llvm.stackrestore.p0(ptr %114)
  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 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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


; 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

; 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
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %7 = 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)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %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) %3)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %11 = load i64, ptr %1, align 8, !tbaa !5
  %12 = call ptr @llvm.stacksave.p0()
  %13 = alloca i64, i64 %11, align 16
  %14 = getelementptr inbounds i64, ptr %13, i64 %11
  %.not35 = icmp eq i64 %11, 0
  br i1 %.not35, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %0
  %15 = load i64, ptr %1, align 8, !tbaa !5
  %16 = trunc i64 %15 to i32
  %17 = shl nuw i32 1, %16
  %18 = icmp sgt i32 %17, 2
  %19 = icmp sgt i64 %15, 0
  %or.cond52 = and i1 %18, %19
  br i1 %or.cond52, label %.lr.ph44.split, label %._crit_edge45

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.02936 = phi ptr [ %21, %.lr.ph ], [ %13, %0 ]
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERl(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %.02936)
  %21 = getelementptr inbounds i8, ptr %.02936, i64 8
  %.not = icmp eq ptr %21, %14
  br i1 %.not, label %.preheader, label %.lr.ph

._crit_edge45:                                    ; preds = %58, %.preheader
  %.027.lcssa = phi i64 [ 0, %.preheader ], [ %.128, %58 ]
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEl(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.027.lcssa)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @.str)
  call void @llvm.stackrestore.p0(ptr %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret void

.lr.ph44.split:                                   ; preds = %.preheader, %58
  %24 = phi i64 [ %26, %58 ], [ %15, %.preheader ]
  %.02643 = phi i64 [ %59, %58 ], [ 2, %.preheader ]
  %.02742 = phi i64 [ %.128, %58 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store i64 2000000000000000000, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store i64 0, ptr %6, align 8, !tbaa !5
  %25 = icmp sgt i64 %24, 0
  br i1 %25, label %.lr.ph40, label %._crit_edge

._crit_edge:                                      ; preds = %47, %.lr.ph44.split
  %26 = phi i64 [ %24, %.lr.ph44.split ], [ %48, %47 ]
  %27 = phi i64 [ 0, %.lr.ph44.split ], [ %49, %47 ]
  %.024.lcssa = phi i64 [ 0, %.lr.ph44.split ], [ %.125, %47 ]
  %.023.lcssa = phi i64 [ 0, %.lr.ph44.split ], [ %.1, %47 ]
  %28 = icmp slt i64 %.024.lcssa, 2
  %29 = load i64, ptr %2, align 8
  %.not30 = icmp slt i64 %.023.lcssa, %29
  %or.cond = select i1 %28, i1 true, i1 %.not30
  %30 = load i64, ptr %3, align 8
  %.not31 = icmp sgt i64 %.023.lcssa, %30
  %or.cond34 = select i1 %or.cond, i1 true, i1 %.not31
  br i1 %or.cond34, label %58, label %53

.lr.ph40:                                         ; preds = %.lr.ph44.split, %47
  %31 = phi i64 [ %48, %47 ], [ %24, %.lr.ph44.split ]
  %32 = phi i64 [ %49, %47 ], [ 0, %.lr.ph44.split ]
  %33 = phi i64 [ %50, %47 ], [ %24, %.lr.ph44.split ]
  %.039 = phi i64 [ %51, %47 ], [ 0, %.lr.ph44.split ]
  %.02338 = phi i64 [ %.1, %47 ], [ 0, %.lr.ph44.split ]
  %.02437 = phi i64 [ %.125, %47 ], [ 0, %.lr.ph44.split ]
  %34 = trunc i64 %.039 to i32
  %35 = shl nuw i32 1, %34
  %36 = sext i32 %35 to i64
  %37 = and i64 %.02643, %36
  %.not33 = icmp eq i64 %37, 0
  br i1 %.not33, label %47, label %38

38:                                               ; preds = %.lr.ph40
  %39 = add nsw i64 %.02437, 1
  %40 = getelementptr inbounds i64, ptr %13, i64 %.039
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %40)
  %42 = load i64, ptr %41, align 8, !tbaa !5
  store i64 %42, ptr %5, align 8, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %40)
  %44 = load i64, ptr %43, align 8, !tbaa !5
  store i64 %44, ptr %6, align 8, !tbaa !5
  %45 = load i64, ptr %40, align 8, !tbaa !5
  %46 = add nsw i64 %45, %.02338
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %.lr.ph40, %38
  %48 = phi i64 [ %.pre, %38 ], [ %31, %.lr.ph40 ]
  %49 = phi i64 [ %44, %38 ], [ %32, %.lr.ph40 ]
  %50 = phi i64 [ %.pre, %38 ], [ %33, %.lr.ph40 ]
  %.125 = phi i64 [ %39, %38 ], [ %.02437, %.lr.ph40 ]
  %.1 = phi i64 [ %46, %38 ], [ %.02338, %.lr.ph40 ]
  %51 = add nuw nsw i64 %.039, 1
  %52 = icmp slt i64 %51, %50
  br i1 %52, label %.lr.ph40, label %._crit_edge, !llvm.loop !9

53:                                               ; preds = %._crit_edge
  %54 = load i64, ptr %5, align 8, !tbaa !5
  %55 = sub nsw i64 %27, %54
  %56 = load i64, ptr %4, align 8, !tbaa !5
  %.not32 = icmp sge i64 %55, %56
  %57 = zext i1 %.not32 to i64
  %spec.select = add nsw i64 %.02742, %57
  br label %58

58:                                               ; preds = %53, %._crit_edge
  %.128 = phi i64 [ %.02742, %._crit_edge ], [ %spec.select, %53 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %59 = add nuw nsw i64 %.02643, 1
  %60 = trunc i64 %26 to i32
  %61 = shl nuw i32 1, %60
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %59, %62
  br i1 %63, label %.lr.ph44.split, label %._crit_edge45, !llvm.loop !11
}

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; 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}
!12 = !{!"llvm.loop.unswitch.partial.disable"}


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