; LLVM IR from ravireddy07/cpp-book :: src/Hacker-Rank (bitset-1)

; 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 i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %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 i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %18 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef 2, i32 noundef 31)
  %19 = fptoui double %18 to i64
  store i64 %19, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = load i64, ptr %6, align 8, !tbaa !5
  %23 = urem i64 %21, %22
  store i64 %23, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 1, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %24 = load i64, ptr %7, align 8, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = mul i64 %24, %26
  %28 = load i32, ptr %5, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = add i64 %27, %29
  %31 = load i64, ptr %6, align 8, !tbaa !5
  %32 = urem i64 %30, %31
  store i64 %32, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %33 = load i64, ptr %7, align 8, !tbaa !5
  %34 = load i32, ptr %4, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = mul i64 %33, %35
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = add i64 %36, %38
  %40 = load i64, ptr %6, align 8, !tbaa !5
  %41 = urem i64 %39, %40
  store i64 %41, ptr %10, align 8, !tbaa !5
  %42 = load i64, ptr %10, align 8, !tbaa !5
  %43 = load i32, ptr %4, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = mul i64 %42, %44
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = sext i32 %46 to i64
  %48 = add i64 %45, %47
  %49 = load i64, ptr %6, align 8, !tbaa !5
  %50 = urem i64 %48, %49
  store i64 %50, ptr %10, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %67, %0
  %52 = load i64, ptr %9, align 8, !tbaa !5
  %53 = load i64, ptr %10, align 8, !tbaa !5
  %54 = icmp ne i64 %52, %53
  br i1 %54, label %55, label %95

55:                                               ; preds = %51
  %56 = load i64, ptr %8, align 8, !tbaa !5
  %57 = load i32, ptr %2, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = icmp uge i64 %56, %58
  br i1 %59, label %60, label %64

60:                                               ; preds = %55
  %61 = load i64, ptr %8, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %61)
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  br label %154

64:                                               ; preds = %55
  %65 = load i64, ptr %8, align 8, !tbaa !5
  %66 = add i64 %65, 1
  store i64 %66, ptr %8, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %64
  %68 = load i64, ptr %9, align 8, !tbaa !5
  %69 = load i32, ptr %4, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = mul i64 %68, %70
  %72 = load i32, ptr %5, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = add i64 %71, %73
  %75 = load i64, ptr %6, align 8, !tbaa !5
  %76 = urem i64 %74, %75
  store i64 %76, ptr %9, align 8, !tbaa !5
  %77 = load i64, ptr %10, align 8, !tbaa !5
  %78 = load i32, ptr %4, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = mul i64 %77, %79
  %81 = load i32, ptr %5, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = add i64 %80, %82
  %84 = load i64, ptr %6, align 8, !tbaa !5
  %85 = urem i64 %83, %84
  store i64 %85, ptr %10, align 8, !tbaa !5
  %86 = load i64, ptr %10, align 8, !tbaa !5
  %87 = load i32, ptr %4, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = mul i64 %86, %88
  %90 = load i32, ptr %5, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = add i64 %89, %91
  %93 = load i64, ptr %6, align 8, !tbaa !5
  %94 = urem i64 %92, %93
  store i64 %94, ptr %10, align 8, !tbaa !5
  br label %51, !llvm.loop !11

95:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i64 0, ptr %12, align 8, !tbaa !5
  %96 = load i64, ptr %7, align 8, !tbaa !5
  store i64 %96, ptr %9, align 8, !tbaa !5
  br label %97

97:                                               ; preds = %101, %95
  %98 = load i64, ptr %9, align 8, !tbaa !5
  %99 = load i64, ptr %10, align 8, !tbaa !5
  %100 = icmp ne i64 %98, %99
  br i1 %100, label %101, label %122

101:                                              ; preds = %97
  %102 = load i64, ptr %9, align 8, !tbaa !5
  %103 = load i32, ptr %4, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = mul i64 %102, %104
  %106 = load i32, ptr %5, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = add i64 %105, %107
  %109 = load i64, ptr %6, align 8, !tbaa !5
  %110 = urem i64 %108, %109
  store i64 %110, ptr %9, align 8, !tbaa !5
  %111 = load i64, ptr %10, align 8, !tbaa !5
  %112 = load i32, ptr %4, align 4, !tbaa !9
  %113 = sext i32 %112 to i64
  %114 = mul i64 %111, %113
  %115 = load i32, ptr %5, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = add i64 %114, %116
  %118 = load i64, ptr %6, align 8, !tbaa !5
  %119 = urem i64 %117, %118
  store i64 %119, ptr %10, align 8, !tbaa !5
  %120 = load i64, ptr %12, align 8, !tbaa !5
  %121 = add i64 %120, 1
  store i64 %121, ptr %12, align 8, !tbaa !5
  br label %97, !llvm.loop !13

122:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 1, ptr %13, align 8, !tbaa !5
  %123 = load i64, ptr %9, align 8, !tbaa !5
  %124 = load i32, ptr %4, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = mul i64 %123, %125
  %127 = load i32, ptr %5, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = add i64 %126, %128
  %130 = load i64, ptr %6, align 8, !tbaa !5
  %131 = urem i64 %129, %130
  store i64 %131, ptr %10, align 8, !tbaa !5
  br label %132

132:                                              ; preds = %136, %122
  %133 = load i64, ptr %9, align 8, !tbaa !5
  %134 = load i64, ptr %10, align 8, !tbaa !5
  %135 = icmp ne i64 %133, %134
  br i1 %135, label %136, label %148

136:                                              ; preds = %132
  %137 = load i64, ptr %10, align 8, !tbaa !5
  %138 = load i32, ptr %4, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = mul i64 %137, %139
  %141 = load i32, ptr %5, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = add i64 %140, %142
  %144 = load i64, ptr %6, align 8, !tbaa !5
  %145 = urem i64 %143, %144
  store i64 %145, ptr %10, align 8, !tbaa !5
  %146 = load i64, ptr %13, align 8, !tbaa !5
  %147 = add i64 %146, 1
  store i64 %147, ptr %13, align 8, !tbaa !5
  br label %132, !llvm.loop !14

148:                                              ; preds = %132
  %149 = load i64, ptr %13, align 8, !tbaa !5
  %150 = load i64, ptr %12, align 8, !tbaa !5
  %151 = add i64 %149, %150
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %151)
  %153 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %152, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %154

154:                                              ; preds = %148, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %155 = load i32, ptr %1, align 4
  ret i32 %155
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) #3

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

; 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 = { "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 = { 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 = { 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 #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 = !{!"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 i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %9 = call noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef 2, i32 noundef 31)
  %10 = fptoui double %9 to i64
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = urem i64 %12, %10
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = mul i64 %13, %15
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = add i64 %16, %18
  %20 = urem i64 %19, %10
  %.pn4652 = mul i64 %20, %15
  %.pn53 = add i64 %.pn4652, %18
  %.03754 = urem i64 %.pn53, %10
  %.not55 = icmp eq i64 %20, %.03754
  br i1 %.not55, label %.preheader49, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = call i32 @llvm.umax.i32(i32 %21, i32 1)
  %umax = sext i32 %22 to i64
  br label %23

.preheader49:                                     ; preds = %24, %0
  %.037.lcssa = phi i64 [ %20, %0 ], [ %28, %24 ]
  %.not4259 = icmp eq i64 %13, %.037.lcssa
  br i1 %.not4259, label %.preheader, label %.lr.ph63

23:                                               ; preds = %.lr.ph, %24
  %.03758 = phi i64 [ %.03754, %.lr.ph ], [ %.037, %24 ]
  %.03857 = phi i64 [ %20, %.lr.ph ], [ %28, %24 ]
  %.04056 = phi i64 [ 1, %.lr.ph ], [ %25, %24 ]
  %exitcond.not = icmp eq i64 %.04056, %umax
  br i1 %exitcond.not, label %.loopexit, label %24

24:                                               ; preds = %23
  %25 = add i64 %.04056, 1
  %26 = mul i64 %.03857, %15
  %27 = add i64 %26, %18
  %28 = urem i64 %27, %10
  %29 = mul i64 %.03758, %15
  %30 = add i64 %29, %18
  %31 = urem i64 %30, %10
  %.pn46 = mul i64 %31, %15
  %.pn = add i64 %.pn46, %18
  %.037 = urem i64 %.pn, %10
  %.not = icmp eq i64 %28, %.037
  br i1 %.not, label %.preheader49, label %23, !llvm.loop !9

.preheader:                                       ; preds = %.lr.ph63, %.preheader49
  %.139.lcssa = phi i64 [ %13, %.preheader49 ], [ %34, %.lr.ph63 ]
  %.036.lcssa = phi i64 [ 0, %.preheader49 ], [ %38, %.lr.ph63 ]
  br label %39

.lr.ph63:                                         ; preds = %.preheader49, %.lr.ph63
  %.03662 = phi i64 [ %38, %.lr.ph63 ], [ 0, %.preheader49 ]
  %.161 = phi i64 [ %37, %.lr.ph63 ], [ %.037.lcssa, %.preheader49 ]
  %.13960 = phi i64 [ %34, %.lr.ph63 ], [ %13, %.preheader49 ]
  %32 = mul i64 %.13960, %15
  %33 = add i64 %32, %18
  %34 = urem i64 %33, %10
  %35 = mul i64 %.161, %15
  %36 = add i64 %35, %18
  %37 = urem i64 %36, %10
  %38 = add i64 %.03662, 1
  %.not42 = icmp eq i64 %34, %37
  br i1 %.not42, label %.preheader, label %.lr.ph63, !llvm.loop !11

39:                                               ; preds = %39, %.preheader
  %.139.pn = phi i64 [ %.2, %39 ], [ %.139.lcssa, %.preheader ]
  %.0 = phi i64 [ %40, %39 ], [ 1, %.preheader ]
  %.pn48 = mul i64 %.139.pn, %15
  %.pn43 = add i64 %.pn48, %18
  %.2 = urem i64 %.pn43, %10
  %.not44 = icmp eq i64 %.139.lcssa, %.2
  %40 = add i64 %.0, 1
  br i1 %.not44, label %41, label %39, !llvm.loop !12

41:                                               ; preds = %39
  %42 = add i64 %.0, %.036.lcssa
  br label %.loopexit

.loopexit:                                        ; preds = %23, %41
  %.sink71 = phi i64 [ %42, %41 ], [ %umax, %23 ]
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEy(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.sink71)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIiiEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i32 noundef, i32 noundef) local_unnamed_addr #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 #4 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 #4 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)) #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #6

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 = { "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 = { 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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"int", !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}


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