; LLVM IR from abeaumont/competitive-programming :: kattis (tutorial)

; 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 [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 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 i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %9 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %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) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #6
  store i8 0, ptr %6, align 1, !tbaa !9
  %12 = load i64, ptr %4, align 8, !tbaa !5
  switch i64 %12, label %142 [
    i64 1, label %13
    i64 2, label %40
    i64 3, label %51
    i64 4, label %84
    i64 5, label %107
    i64 6, label %118
    i64 7, label %133
  ]

13:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !11
  br label %14

14:                                               ; preds = %30, %13
  %15 = load i32, ptr %7, align 4, !tbaa !11
  %16 = sext i32 %15 to i64
  %17 = load i64, ptr %3, align 8, !tbaa !5
  %18 = icmp sle i64 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %14
  store i32 3, ptr %8, align 4
  br label %33

20:                                               ; preds = %14
  %21 = load i32, ptr %7, align 4, !tbaa !11
  %22 = sext i32 %21 to i64
  %23 = load i64, ptr %5, align 8, !tbaa !5
  %24 = mul nsw i64 %23, %22
  store i64 %24, ptr %5, align 8, !tbaa !5
  %25 = load i64, ptr %5, align 8, !tbaa !5
  %26 = load i64, ptr %2, align 8, !tbaa !5
  %27 = icmp sgt i64 %25, %26
  br i1 %27, label %28, label %29

28:                                               ; preds = %20
  store i8 1, ptr %6, align 1, !tbaa !9
  store i32 3, ptr %8, align 4
  br label %33

29:                                               ; preds = %20
  br label %30

30:                                               ; preds = %29
  %31 = load i32, ptr %7, align 4, !tbaa !11
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %7, align 4, !tbaa !11
  br label %14, !llvm.loop !13

33:                                               ; preds = %28, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %34

34:                                               ; preds = %33
  %35 = load i8, ptr %6, align 1, !tbaa !9, !range !15, !noundef !16
  %36 = trunc i8 %35 to i1
  %37 = zext i1 %36 to i64
  %38 = select i1 %36, ptr @.str, ptr @.str.1
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %38)
  br label %142

40:                                               ; preds = %0
  %41 = load i64, ptr %3, align 8, !tbaa !5
  %42 = sitofp i64 %41 to double
  %43 = load i64, ptr %2, align 8, !tbaa !5
  %44 = call noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %43)
  %45 = fcmp ogt double %42, %44
  br i1 %45, label %46, label %48

46:                                               ; preds = %40
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %50

48:                                               ; preds = %40
  %49 = 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)
  br label %50

50:                                               ; preds = %48, %46
  br label %142

51:                                               ; preds = %0
  %52 = load i64, ptr %3, align 8, !tbaa !5
  %53 = load i64, ptr %2, align 8, !tbaa !5
  %54 = icmp sgt i64 %52, %53
  br i1 %54, label %79, label %55

55:                                               ; preds = %51
  %56 = load i64, ptr %3, align 8, !tbaa !5
  %57 = load i64, ptr %3, align 8, !tbaa !5
  %58 = mul nsw i64 %56, %57
  %59 = load i64, ptr %2, align 8, !tbaa !5
  %60 = icmp sgt i64 %58, %59
  br i1 %60, label %79, label %61

61:                                               ; preds = %55
  %62 = load i64, ptr %3, align 8, !tbaa !5
  %63 = load i64, ptr %3, align 8, !tbaa !5
  %64 = mul nsw i64 %62, %63
  %65 = load i64, ptr %3, align 8, !tbaa !5
  %66 = mul nsw i64 %64, %65
  %67 = load i64, ptr %2, align 8, !tbaa !5
  %68 = icmp sgt i64 %66, %67
  br i1 %68, label %79, label %69

69:                                               ; preds = %61
  %70 = load i64, ptr %3, align 8, !tbaa !5
  %71 = load i64, ptr %3, align 8, !tbaa !5
  %72 = mul nsw i64 %70, %71
  %73 = load i64, ptr %3, align 8, !tbaa !5
  %74 = mul nsw i64 %72, %73
  %75 = load i64, ptr %3, align 8, !tbaa !5
  %76 = mul nsw i64 %74, %75
  %77 = load i64, ptr %2, align 8, !tbaa !5
  %78 = icmp sgt i64 %76, %77
  br i1 %78, label %79, label %81

79:                                               ; preds = %69, %61, %55, %51
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %83

81:                                               ; preds = %69
  %82 = 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)
  br label %83

83:                                               ; preds = %81, %79
  br label %142

84:                                               ; preds = %0
  %85 = load i64, ptr %3, align 8, !tbaa !5
  %86 = load i64, ptr %2, align 8, !tbaa !5
  %87 = icmp sgt i64 %85, %86
  br i1 %87, label %102, label %88

88:                                               ; preds = %84
  %89 = load i64, ptr %3, align 8, !tbaa !5
  %90 = load i64, ptr %3, align 8, !tbaa !5
  %91 = mul nsw i64 %89, %90
  %92 = load i64, ptr %2, align 8, !tbaa !5
  %93 = icmp sgt i64 %91, %92
  br i1 %93, label %102, label %94

94:                                               ; preds = %88
  %95 = load i64, ptr %3, align 8, !tbaa !5
  %96 = load i64, ptr %3, align 8, !tbaa !5
  %97 = mul nsw i64 %95, %96
  %98 = load i64, ptr %3, align 8, !tbaa !5
  %99 = mul nsw i64 %97, %98
  %100 = load i64, ptr %2, align 8, !tbaa !5
  %101 = icmp sgt i64 %99, %100
  br i1 %101, label %102, label %104

102:                                              ; preds = %94, %88, %84
  %103 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %106

104:                                              ; preds = %94
  %105 = 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)
  br label %106

106:                                              ; preds = %104, %102
  br label %142

107:                                              ; preds = %0
  %108 = load i64, ptr %3, align 8, !tbaa !5
  %109 = load i64, ptr %3, align 8, !tbaa !5
  %110 = mul nsw i64 %108, %109
  %111 = load i64, ptr %2, align 8, !tbaa !5
  %112 = icmp sgt i64 %110, %111
  br i1 %112, label %113, label %115

113:                                              ; preds = %107
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %117

115:                                              ; preds = %107
  %116 = 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)
  br label %117

117:                                              ; preds = %115, %113
  br label %142

118:                                              ; preds = %0
  %119 = load i64, ptr %3, align 8, !tbaa !5
  %120 = sitofp i64 %119 to double
  %121 = load i64, ptr %3, align 8, !tbaa !5
  %122 = sitofp i64 %121 to double
  %123 = call double @log2(double noundef %122) #6
  %124 = fmul double %120, %123
  %125 = load i64, ptr %2, align 8, !tbaa !5
  %126 = sitofp i64 %125 to double
  %127 = fcmp ogt double %124, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %118
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %132

130:                                              ; preds = %118
  %131 = 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)
  br label %132

132:                                              ; preds = %130, %128
  br label %142

133:                                              ; preds = %0
  %134 = load i64, ptr %3, align 8, !tbaa !5
  %135 = load i64, ptr %2, align 8, !tbaa !5
  %136 = icmp sgt i64 %134, %135
  br i1 %136, label %137, label %139

137:                                              ; preds = %133
  %138 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %141

139:                                              ; preds = %133
  %140 = 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)
  br label %141

141:                                              ; preds = %139, %137
  br label %142

142:                                              ; preds = %141, %132, %117, %106, %83, %50, %34, %0
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  %143 = load i32, ptr %1, align 4
  ret i32 %143
}

; 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: 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 nounwind uwtable
declare dso_local noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) #4

; Function Attrs: nounwind
declare double @log2(double noundef) #5

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 = { 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 "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 #6 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i8 0, i8 2}
!16 = !{}


; 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 [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 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
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %4 = 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)
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %7 = load i64, ptr %3, align 8, !tbaa !5
  switch i64 %7, label %59 [
    i64 1, label %.preheader
    i64 2, label %14
    i64 3, label %20
    i64 4, label %32
    i64 5, label %41
    i64 6, label %46
    i64 7, label %54
  ]

.preheader:                                       ; preds = %0
  %8 = load i64, ptr %2, align 8, !tbaa !5
  %.not.not21 = icmp slt i64 %8, 1
  br i1 %.not.not21, label %.sink.split, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %9 = load i64, ptr %1, align 8, !tbaa !5
  br label %11

10:                                               ; preds = %11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %.not.not.not = icmp sgt i64 %8, %indvars.iv
  br i1 %.not.not.not, label %11, label %.sink.split, !llvm.loop !9

11:                                               ; preds = %.lr.ph, %10
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %10 ]
  %.0822 = phi i64 [ 1, %.lr.ph ], [ %12, %10 ]
  %12 = mul nuw nsw i64 %indvars.iv, %.0822
  %13 = icmp sgt i64 %12, %9
  br i1 %13, label %.sink.split, label %10

14:                                               ; preds = %0
  %15 = load i64, ptr %2, align 8, !tbaa !5
  %16 = sitofp i64 %15 to double
  %17 = load i64, ptr %1, align 8, !tbaa !5
  %18 = call noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %17)
  %19 = fcmp olt double %18, %16
  %.str..str.1 = select i1 %19, ptr @.str, ptr @.str.1
  br label %.sink.split

20:                                               ; preds = %0
  %21 = load i64, ptr %2, align 8, !tbaa !5
  %22 = load i64, ptr %1, align 8, !tbaa !5
  %23 = icmp sgt i64 %21, %22
  br i1 %23, label %.sink.split, label %24

24:                                               ; preds = %20
  %25 = mul nsw i64 %21, %21
  %26 = icmp sgt i64 %25, %22
  br i1 %26, label %.sink.split, label %27

27:                                               ; preds = %24
  %28 = mul nsw i64 %25, %21
  %29 = icmp sgt i64 %28, %22
  %30 = mul nsw i64 %28, %21
  %31 = icmp sgt i64 %30, %22
  %or.cond = select i1 %29, i1 true, i1 %31
  %spec.select = select i1 %or.cond, ptr @.str, ptr @.str.1
  br label %.sink.split

32:                                               ; preds = %0
  %33 = load i64, ptr %2, align 8, !tbaa !5
  %34 = load i64, ptr %1, align 8, !tbaa !5
  %35 = icmp sgt i64 %33, %34
  br i1 %35, label %.sink.split, label %36

36:                                               ; preds = %32
  %37 = mul nsw i64 %33, %33
  %38 = icmp sgt i64 %37, %34
  %39 = mul nsw i64 %37, %33
  %40 = icmp sgt i64 %39, %34
  %or.cond20 = select i1 %38, i1 true, i1 %40
  %spec.select30 = select i1 %or.cond20, ptr @.str, ptr @.str.1
  br label %.sink.split

41:                                               ; preds = %0
  %42 = load i64, ptr %2, align 8, !tbaa !5
  %43 = mul nsw i64 %42, %42
  %44 = load i64, ptr %1, align 8, !tbaa !5
  %45 = icmp sgt i64 %43, %44
  %.str..str.127 = select i1 %45, ptr @.str, ptr @.str.1
  br label %.sink.split

46:                                               ; preds = %0
  %47 = load i64, ptr %2, align 8, !tbaa !5
  %48 = sitofp i64 %47 to double
  %49 = call double @log2(double noundef %48) #6
  %50 = fmul double %49, %48
  %51 = load i64, ptr %1, align 8, !tbaa !5
  %52 = sitofp i64 %51 to double
  %53 = fcmp ogt double %50, %52
  %.str..str.128 = select i1 %53, ptr @.str, ptr @.str.1
  br label %.sink.split

54:                                               ; preds = %0
  %55 = load i64, ptr %2, align 8, !tbaa !5
  %56 = load i64, ptr %1, align 8, !tbaa !5
  %57 = icmp sgt i64 %55, %56
  %.str..str.129 = select i1 %57, ptr @.str, ptr @.str.1
  br label %.sink.split

.sink.split:                                      ; preds = %11, %10, %36, %27, %54, %46, %41, %32, %20, %24, %14, %.preheader
  %.str.sink = phi ptr [ @.str.1, %.preheader ], [ %.str..str.1, %14 ], [ @.str, %24 ], [ @.str, %20 ], [ @.str, %32 ], [ %.str..str.127, %41 ], [ %.str..str.128, %46 ], [ %.str..str.129, %54 ], [ %spec.select, %27 ], [ %spec.select30, %36 ], [ @.str, %11 ], [ @.str.1, %10 ]
  %58 = 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.sink)
  br label %59

59:                                               ; preds = %.sink.split, %0
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  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 @_ZNSirsERx(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 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 nounwind uwtable
declare dso_local noundef double @_ZSt4log2IxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log2(double noundef) local_unnamed_addr #5

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 = { 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 = { mustprogress nofree nounwind willreturn memory(write) "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 #6 = { 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"}


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