; LLVM IR from lelegard/cryptobench :: src (bench_math)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%class.bench_math = type { %class.bench, %class.bignum, %class.bignum, i64, %class.bignum, %class.bignum, %class.bignum, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, { i64, i64 } }
%class.bench = type { ptr, %"class.std::__cxx11::basic_string", i64, i64, i64, i64 }
%class.bignum = type { ptr }

@_ZTV10bench_math = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10bench_math7name_ofERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6bignum(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

declare void @_ZN5benchC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

declare void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2

declare void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5benchD2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10bench_math15init_montgomeryEv(ptr noundef nonnull align 8 dereferenceable(216)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10bench_mathC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEllPFiP9bignum_stmPKS8_SB_P10bignum_ctxP14bn_mont_ctx_stEmRK6bignumSK_(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  store i64 %3, ptr %12, align 8, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store i64 %5, ptr %14, align 8, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  %20 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN10bench_math7name_ofERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6bignum(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %23 = load i64, ptr %11, align 8, !tbaa !9
  %24 = load i64, ptr %12, align 8, !tbaa !9
  invoke void @_ZN5benchC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(72) %20, ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %23, i64 noundef %24)
          to label %25 unwind label %53

25:                                               ; preds = %8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  store ptr getelementptr inbounds inrange(-16, 24) ({ [5 x ptr] }, ptr @_ZTV10bench_math, i32 0, i32 0, i32 2), ptr %20, align 8, !tbaa !11
  %26 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 1
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef null)
          to label %27 unwind label %57

27:                                               ; preds = %25
  %28 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 2
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef null)
          to label %29 unwind label %61

29:                                               ; preds = %27
  %30 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 3
  %31 = load i64, ptr %14, align 8, !tbaa !9
  store i64 %31, ptr %30, align 8, !tbaa !13
  %32 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 4
  %33 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %34 unwind label %65

34:                                               ; preds = %29
  %35 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 5
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef null)
          to label %36 unwind label %69

36:                                               ; preds = %34
  %37 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 6
  %38 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %39 unwind label %73

39:                                               ; preds = %36
  %40 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 7
  store ptr null, ptr %40, align 8, !tbaa !19
  %41 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 8
  store ptr null, ptr %41, align 8, !tbaa !20
  %42 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 9
  store ptr null, ptr %42, align 8, !tbaa !21
  %43 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 10
  store ptr null, ptr %43, align 8, !tbaa !22
  %44 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 11
  store ptr null, ptr %44, align 8, !tbaa !23
  %45 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 12
  store ptr null, ptr %45, align 8, !tbaa !24
  %46 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 13
  store ptr null, ptr %46, align 8, !tbaa !25
  %47 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 14
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %48, ptr %47, align 8, !tbaa !26
  %49 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 15
  store ptr null, ptr %49, align 8, !tbaa !27
  %50 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 16
  store ptr null, ptr %50, align 8, !tbaa !28
  %51 = getelementptr inbounds %class.bench_math, ptr %20, i32 0, i32 17
  store { i64, i64 } { i64 ptrtoint (ptr @_ZN10bench_math31one_iteration_op1_mod_mont_wordEv to i64), i64 0 }, ptr %51, align 8, !tbaa !29
  invoke void @_ZN10bench_math15init_montgomeryEv(ptr noundef nonnull align 8 dereferenceable(216) %20)
          to label %52 unwind label %77

52:                                               ; preds = %39
  ret void

53:                                               ; preds = %8
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %18, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %19, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  br label %86

57:                                               ; preds = %25
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %18, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %19, align 4
  br label %85

61:                                               ; preds = %27
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %18, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %19, align 4
  br label %84

65:                                               ; preds = %29
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %18, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %19, align 4
  br label %83

69:                                               ; preds = %34
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %18, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %19, align 4
  br label %82

73:                                               ; preds = %36
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %18, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %19, align 4
  br label %81

77:                                               ; preds = %39
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %18, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %19, align 4
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %37) #6
  br label %81

81:                                               ; preds = %77, %73
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %35) #6
  br label %82

82:                                               ; preds = %81, %69
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %32) #6
  br label %83

83:                                               ; preds = %82, %65
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #6
  br label %84

84:                                               ; preds = %83, %61
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #6
  br label %85

85:                                               ; preds = %84, %57
  call void @_ZN5benchD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %20) #6
  br label %86

86:                                               ; preds = %85, %53
  %87 = load ptr, ptr %18, align 8
  %88 = load i32, ptr %19, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10bench_math31one_iteration_op1_mod_mont_wordEv(ptr noundef nonnull align 8 dereferenceable(216)) #0 align 2

attributes #0 = { 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 #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 = { 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 = { 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 #5 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !10, i64 88}
!14 = !{!"_ZTS10bench_math", !15, i64 0, !18, i64 72, !18, i64 80, !10, i64 88, !18, i64 96, !18, i64 104, !18, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !7, i64 200}
!15 = !{!"_ZTS5bench", !16, i64 8, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !10, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"_ZTS6bignum", !6, i64 0}
!19 = !{!14, !6, i64 120}
!20 = !{!14, !6, i64 128}
!21 = !{!14, !6, i64 136}
!22 = !{!14, !6, i64 144}
!23 = !{!14, !6, i64 152}
!24 = !{!14, !6, i64 160}
!25 = !{!14, !6, i64 168}
!26 = !{!14, !6, i64 176}
!27 = !{!14, !6, i64 184}
!28 = !{!14, !6, i64 192}
!29 = !{!14, !7, i64 200}


; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZTV10bench_math = external dso_local unnamed_addr constant { [5 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10bench_math7name_ofERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6bignum(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

declare void @_ZN5benchC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i64 noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

declare void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #2

declare void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5benchD2Ev(ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10bench_math15init_montgomeryEv(ptr noundef nonnull align 8 dereferenceable(216)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10bench_mathC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEllPFiP9bignum_stmPKS8_SB_P10bignum_ctxP14bn_mont_ctx_stEmRK6bignumSK_(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %2, i64 noundef %3, ptr noundef %4, i64 noundef %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @_ZN10bench_math7name_ofERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6bignum(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(8) %7)
  invoke void @_ZN5benchC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %2, i64 noundef %3)
          to label %10 unwind label %27

10:                                               ; preds = %8
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  store ptr getelementptr inbounds inrange(-16, 24) (i8, ptr @_ZTV10bench_math, i64 16), ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef null)
          to label %12 unwind label %29

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %0, i64 80
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef null)
          to label %14 unwind label %31

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 88
  store i64 %5, ptr %15, align 8, !tbaa !8
  %16 = getelementptr inbounds i8, ptr %0, i64 96
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %17 unwind label %33

17:                                               ; preds = %14
  %18 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef null)
          to label %19 unwind label %35

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %0, i64 112
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %21 unwind label %37

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %0, i64 120
  %23 = getelementptr inbounds i8, ptr %0, i64 176
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %22, i8 0, i64 56, i1 false)
  store ptr %4, ptr %23, align 8, !tbaa !17
  %24 = getelementptr inbounds i8, ptr %0, i64 184
  %25 = getelementptr inbounds i8, ptr %0, i64 200
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %24, i8 0, i64 16, i1 false)
  store i64 ptrtoint (ptr @_ZN10bench_math31one_iteration_op1_mod_mont_wordEv to i64), ptr %25, align 8, !tbaa !18
  %.repack16 = getelementptr inbounds i8, ptr %0, i64 208
  store i64 0, ptr %.repack16, align 8, !tbaa !18
  invoke void @_ZN10bench_math15init_montgomeryEv(ptr noundef nonnull align 8 dereferenceable(216) %0)
          to label %26 unwind label %39

26:                                               ; preds = %21
  ret void

27:                                               ; preds = %8
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %46

29:                                               ; preds = %10
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %45

31:                                               ; preds = %12
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %44

33:                                               ; preds = %14
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %43

35:                                               ; preds = %17
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %42

37:                                               ; preds = %19
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %21
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #7
  br label %41

41:                                               ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br label %42

42:                                               ; preds = %41, %35
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %36, %35 ]
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %43

43:                                               ; preds = %42, %33
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %42 ], [ %34, %33 ]
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %44

44:                                               ; preds = %43, %31
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %43 ], [ %32, %31 ]
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %45

45:                                               ; preds = %44, %29
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %44 ], [ %30, %29 ]
  call void @_ZN5benchD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %0) #7
  br label %46

46:                                               ; preds = %45, %27
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %45 ], [ %28, %27 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10bench_math31one_iteration_op1_mod_mont_wordEv(ptr noundef nonnull align 8 dereferenceable(216)) #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

attributes #0 = { 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 #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 = { 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 = { 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !15, i64 88}
!9 = !{!"_ZTS10bench_math", !10, i64 0, !16, i64 72, !16, i64 80, !15, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !14, i64 200}
!10 = !{!"_ZTS5bench", !11, i64 8, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !15, i64 8, !14, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!13 = !{!"any pointer", !14, i64 0}
!14 = !{!"omnipotent char", !7, i64 0}
!15 = !{!"long", !14, i64 0}
!16 = !{!"_ZTS6bignum", !13, i64 0}
!17 = !{!9, !13, i64 176}
!18 = !{!9, !14, i64 200}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass