; LLVM IR from stillwater-sc/universal :: applications/reproducibility/cryptography (large_lcm)

; 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_ostream" = type { ptr, %"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 }

@_ZTIPKc = external constant ptr
@_ZTISt13runtime_error = external constant ptr
@_ZTIN2sw9universal30universal_arithmetic_exceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN2sw9universal28universal_internal_exceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  invoke void @_Z12calculateLCMILj512EEvjPKc(i32 noundef 10, ptr noundef @.str)
          to label %8 unwind label %10

8:                                                ; preds = %0
  invoke void @_Z12calculateLCMILj1024EEvjPKc(i32 noundef 100, ptr noundef @.str.1)
          to label %9 unwind label %10

9:                                                ; preds = %8
  store i32 0, ptr %1, align 4
  br label %110

10:                                               ; preds = %8, %0
  %11 = landingpad { ptr, i32 }
          catch ptr @_ZTIPKc
          catch ptr @_ZTIN2sw9universal30universal_arithmetic_exceptionE
          catch ptr @_ZTIN2sw9universal28universal_internal_exceptionE
          catch ptr @_ZTISt13runtime_error
          catch ptr null
  %12 = extractvalue { ptr, i32 } %11, 0
  store ptr %12, ptr %2, align 8
  %13 = extractvalue { ptr, i32 } %11, 1
  store i32 %13, ptr %3, align 4
  br label %14

14:                                               ; preds = %10
  %15 = load i32, ptr %3, align 4
  %16 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIPKc) #6
  %17 = icmp eq i32 %15, %16
  br i1 %17, label %18, label %28

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %19 = load ptr, ptr %2, align 8
  %20 = call ptr @__cxa_begin_catch(ptr %19) #6
  store ptr %20, ptr %7, align 8
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.6)
          to label %22 unwind label %106

22:                                               ; preds = %18
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef %23)
          to label %25 unwind label %106

25:                                               ; preds = %22
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %27 unwind label %106

27:                                               ; preds = %25
  store i32 1, ptr %1, align 4
  call void @__cxa_end_catch() #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %110

28:                                               ; preds = %14
  %29 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN2sw9universal30universal_arithmetic_exceptionE) #6
  %30 = icmp eq i32 %15, %29
  br i1 %30, label %31, label %45

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %32 = load ptr, ptr %2, align 8
  %33 = call ptr @__cxa_begin_catch(ptr %32) #6
  store ptr %33, ptr %6, align 8
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.5)
          to label %35 unwind label %101

35:                                               ; preds = %31
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds ptr, ptr %37, i64 2
  %39 = load ptr, ptr %38, align 8
  %40 = call noundef ptr %39(ptr noundef nonnull align 8 dereferenceable(16) %36) #6
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef %40)
          to label %42 unwind label %101

42:                                               ; preds = %35
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %44 unwind label %101

44:                                               ; preds = %42
  store i32 1, ptr %1, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %110

45:                                               ; preds = %28
  %46 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN2sw9universal28universal_internal_exceptionE) #6
  %47 = icmp eq i32 %15, %46
  br i1 %47, label %48, label %62

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %49 = load ptr, ptr %2, align 8
  %50 = call ptr @__cxa_begin_catch(ptr %49) #6
  store ptr %50, ptr %5, align 8
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.4)
          to label %52 unwind label %96

52:                                               ; preds = %48
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds ptr, ptr %54, i64 2
  %56 = load ptr, ptr %55, align 8
  %57 = call noundef ptr %56(ptr noundef nonnull align 8 dereferenceable(16) %53) #6
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef %57)
          to label %59 unwind label %96

59:                                               ; preds = %52
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %61 unwind label %96

61:                                               ; preds = %59
  store i32 1, ptr %1, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %110

62:                                               ; preds = %45
  %63 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt13runtime_error) #6
  %64 = icmp eq i32 %15, %63
  br i1 %64, label %65, label %79

65:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %66 = load ptr, ptr %2, align 8
  %67 = call ptr @__cxa_begin_catch(ptr %66) #6
  store ptr %67, ptr %4, align 8
  %68 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
          to label %69 unwind label %91

69:                                               ; preds = %65
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load ptr, ptr %70, align 8, !tbaa !9
  %72 = getelementptr inbounds ptr, ptr %71, i64 2
  %73 = load ptr, ptr %72, align 8
  %74 = call noundef ptr %73(ptr noundef nonnull align 8 dereferenceable(16) %70) #6
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef %74)
          to label %76 unwind label %91

76:                                               ; preds = %69
  %77 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %78 unwind label %91

78:                                               ; preds = %76
  store i32 1, ptr %1, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %110

79:                                               ; preds = %62
  %80 = load ptr, ptr %2, align 8
  %81 = call ptr @__cxa_begin_catch(ptr %80) #6
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.2)
          to label %83 unwind label %86

83:                                               ; preds = %79
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %82, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %85 unwind label %86

85:                                               ; preds = %83
  store i32 1, ptr %1, align 4
  call void @__cxa_end_catch()
  br label %110

86:                                               ; preds = %83, %79
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %2, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %3, align 4
  invoke void @__cxa_end_catch()
          to label %90 unwind label %117

90:                                               ; preds = %86
  br label %112

91:                                               ; preds = %76, %69, %65
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %2, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %3, align 4
  invoke void @__cxa_end_catch()
          to label %95 unwind label %117

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %112

96:                                               ; preds = %59, %52, %48
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %2, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %3, align 4
  invoke void @__cxa_end_catch()
          to label %100 unwind label %117

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %112

101:                                              ; preds = %42, %35, %31
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %2, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %3, align 4
  invoke void @__cxa_end_catch()
          to label %105 unwind label %117

105:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %112

106:                                              ; preds = %25, %22, %18
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %2, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %3, align 4
  call void @__cxa_end_catch() #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %112

110:                                              ; preds = %85, %78, %61, %44, %27, %9
  %111 = load i32, ptr %1, align 4
  ret i32 %111

112:                                              ; preds = %106, %105, %100, %95, %90
  %113 = load ptr, ptr %2, align 8
  %114 = load i32, ptr %3, align 4
  %115 = insertvalue { ptr, i32 } poison, ptr %113, 0
  %116 = insertvalue { ptr, i32 } %115, i32 %114, 1
  resume { ptr, i32 } %116

117:                                              ; preds = %101, %96, %91, %86
  %118 = landingpad { ptr, i32 }
          catch ptr null
  %119 = extractvalue { ptr, i32 } %118, 0
  call void @__clang_call_terminate(ptr %119) #7
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12calculateLCMILj512EEvjPKc(i32 noundef, ptr noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12calculateLCMILj1024EEvjPKc(i32 noundef, ptr noundef) #1

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare ptr @__cxa_begin_catch(ptr)

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1 align 2

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

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #4

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 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 = { nounwind memory(none) }
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 = { noinline noreturn nounwind uwtable "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}


; 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_ostream" = type { ptr, %"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 }

@_ZTIPKc = external constant ptr
@_ZTISt13runtime_error = external constant ptr
@_ZTIN2sw9universal30universal_arithmetic_exceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@_ZTIN2sw9universal28universal_internal_exceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.2 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  invoke void @_Z12calculateLCMILj512EEvjPKc(i32 noundef 10, ptr noundef nonnull @.str)
          to label %1 unwind label %2

1:                                                ; preds = %0
  invoke void @_Z12calculateLCMILj1024EEvjPKc(i32 noundef 100, ptr noundef nonnull @.str.1)
          to label %76 unwind label %2

2:                                                ; preds = %1, %0
  %3 = landingpad { ptr, i32 }
          catch ptr @_ZTIPKc
          catch ptr @_ZTIN2sw9universal30universal_arithmetic_exceptionE
          catch ptr @_ZTIN2sw9universal28universal_internal_exceptionE
          catch ptr @_ZTISt13runtime_error
          catch ptr null
  %4 = extractvalue { ptr, i32 } %3, 0
  %5 = extractvalue { ptr, i32 } %3, 1
  %6 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIPKc) #5
  %7 = icmp eq i32 %5, %6
  br i1 %7, label %8, label %16

8:                                                ; preds = %2
  %9 = tail call ptr @__cxa_begin_catch(ptr %4) #5
  %10 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.6)
          to label %11 unwind label %74

11:                                               ; preds = %8
  %12 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %9)
          to label %13 unwind label %74

13:                                               ; preds = %11
  %14 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %15 unwind label %74

15:                                               ; preds = %13
  tail call void @__cxa_end_catch() #5
  br label %76

16:                                               ; preds = %2
  %17 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2sw9universal30universal_arithmetic_exceptionE) #5
  %18 = icmp eq i32 %5, %17
  br i1 %18, label %19, label %31

19:                                               ; preds = %16
  %20 = tail call ptr @__cxa_begin_catch(ptr %4) #5
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.5)
          to label %22 unwind label %72

22:                                               ; preds = %19
  %23 = load ptr, ptr %20, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %25 = load ptr, ptr %24, align 8
  %26 = tail call noundef ptr %25(ptr noundef nonnull align 8 dereferenceable(16) %20) #5
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef %26)
          to label %28 unwind label %72

28:                                               ; preds = %22
  %29 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %30 unwind label %72

30:                                               ; preds = %28
  tail call void @__cxa_end_catch()
  br label %76

31:                                               ; preds = %16
  %32 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2sw9universal28universal_internal_exceptionE) #5
  %33 = icmp eq i32 %5, %32
  br i1 %33, label %34, label %46

34:                                               ; preds = %31
  %35 = tail call ptr @__cxa_begin_catch(ptr %4) #5
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.4)
          to label %37 unwind label %70

37:                                               ; preds = %34
  %38 = load ptr, ptr %35, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %40 = load ptr, ptr %39, align 8
  %41 = tail call noundef ptr %40(ptr noundef nonnull align 8 dereferenceable(16) %35) #5
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef %41)
          to label %43 unwind label %70

43:                                               ; preds = %37
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %45 unwind label %70

45:                                               ; preds = %43
  tail call void @__cxa_end_catch()
  br label %76

46:                                               ; preds = %31
  %47 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt13runtime_error) #5
  %48 = icmp eq i32 %5, %47
  %49 = tail call ptr @__cxa_begin_catch(ptr %4) #5
  br i1 %48, label %50, label %61

50:                                               ; preds = %46
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.3)
          to label %52 unwind label %68

52:                                               ; preds = %50
  %53 = load ptr, ptr %49, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 16
  %55 = load ptr, ptr %54, align 8
  %56 = tail call noundef ptr %55(ptr noundef nonnull align 8 dereferenceable(16) %49) #5
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef %56)
          to label %58 unwind label %68

58:                                               ; preds = %52
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %60 unwind label %68

60:                                               ; preds = %58
  tail call void @__cxa_end_catch()
  br label %76

61:                                               ; preds = %46
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.2)
          to label %63 unwind label %66

63:                                               ; preds = %61
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %65 unwind label %66

65:                                               ; preds = %63
  tail call void @__cxa_end_catch()
  br label %76

66:                                               ; preds = %63, %61
  %67 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %77 unwind label %78

68:                                               ; preds = %58, %52, %50
  %69 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %77 unwind label %78

70:                                               ; preds = %43, %37, %34
  %71 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %77 unwind label %78

72:                                               ; preds = %28, %22, %19
  %73 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %77 unwind label %78

74:                                               ; preds = %13, %11, %8
  %75 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_end_catch() #5
  br label %77

76:                                               ; preds = %1, %65, %60, %45, %30, %15
  %.0 = phi i32 [ 1, %15 ], [ 1, %30 ], [ 1, %45 ], [ 1, %60 ], [ 1, %65 ], [ 0, %1 ]
  ret i32 %.0

77:                                               ; preds = %72, %70, %68, %66, %74
  %.pn = phi { ptr, i32 } [ %75, %74 ], [ %67, %66 ], [ %69, %68 ], [ %71, %70 ], [ %73, %72 ]
  resume { ptr, i32 } %.pn

78:                                               ; preds = %72, %70, %68, %66
  %79 = landingpad { ptr, i32 }
          catch ptr null
  %80 = extractvalue { ptr, i32 } %79, 0
  tail call void @__clang_call_terminate(ptr %80) #6
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12calculateLCMILj512EEvjPKc(i32 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12calculateLCMILj1024EEvjPKc(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1 align 2

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

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #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 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 = { nofree nosync nounwind memory(none) }
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 = { noinline noreturn nounwind uwtable "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 }
attributes #6 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass