; 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_stPKS8_SB_P10bignum_ctxP14bn_mont_ctx_stERK6bignumSK_(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, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i64 %2, ptr %10, align 8, !tbaa !9
  store i64 %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = load ptr, ptr %14, 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 %15, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %21 = load i64, ptr %10, align 8, !tbaa !9
  %22 = load i64, ptr %11, align 8, !tbaa !9
  invoke void @_ZN5benchC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(72) %18, ptr noundef nonnull align 8 dereferenceable(32) %15, i64 noundef %21, i64 noundef %22)
          to label %23 unwind label %49

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

25:                                               ; preds = %23
  %26 = getelementptr inbounds %class.bench_math, ptr %18, i32 0, i32 2
  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 %18, i32 0, i32 4
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %30 unwind label %61

30:                                               ; preds = %27
  %31 = getelementptr inbounds %class.bench_math, ptr %18, i32 0, i32 5
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef null)
          to label %32 unwind label %65

32:                                               ; preds = %30
  %33 = getelementptr inbounds %class.bench_math, ptr %18, i32 0, i32 6
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %35 unwind label %69

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

48:                                               ; preds = %35
  ret void

49:                                               ; preds = %7
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %16, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %82

53:                                               ; preds = %23
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %16, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %17, align 4
  br label %81

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

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

65:                                               ; preds = %30
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %16, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %17, align 4
  br label %78

69:                                               ; preds = %32
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %16, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %17, align 4
  br label %77

73:                                               ; preds = %35
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %16, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %17, align 4
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  br label %77

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

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

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

80:                                               ; preds = %79, %57
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #6
  br label %81

81:                                               ; preds = %80, %53
  call void @_ZN5benchD2Ev(ptr noundef nonnull align 8 dereferenceable(72) %18) #6
  br label %82

82:                                               ; preds = %81, %49
  %83 = load ptr, ptr %16, align 8
  %84 = load i32, ptr %17, align 4
  %85 = insertvalue { ptr, i32 } poison, ptr %83, 0
  %86 = insertvalue { ptr, i32 } %85, i32 %84, 1
  resume { ptr, i32 } %86
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10bench_math26one_iteration_op1_mod_montEv(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, !6, i64 120}
!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 128}
!20 = !{!14, !6, i64 136}
!21 = !{!14, !6, i64 144}
!22 = !{!14, !6, i64 152}
!23 = !{!14, !6, i64 160}
!24 = !{!14, !6, i64 168}
!25 = !{!14, !6, i64 176}
!26 = !{!14, !6, i64 184}
!27 = !{!14, !6, i64 192}
!28 = !{!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_stPKS8_SB_P10bignum_ctxP14bn_mont_ctx_stERK6bignumSK_(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, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @_ZN10bench_math7name_ofERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK6bignum(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(8) %6)
  invoke void @_ZN5benchC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEll(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(32) %8, i64 noundef %2, i64 noundef %3)
          to label %9 unwind label %25

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

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

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 96
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %15 unwind label %31

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN6bignumC1EP9bignum_st(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef null)
          to label %17 unwind label %33

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %0, i64 112
  invoke void @_ZN6bignumC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %19 unwind label %35

19:                                               ; preds = %17
  %20 = getelementptr inbounds i8, ptr %0, i64 120
  %21 = getelementptr inbounds i8, ptr %0, i64 160
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %20, i8 0, i64 40, i1 false)
  store ptr %4, ptr %21, align 8, !tbaa !8
  %22 = getelementptr inbounds i8, ptr %0, i64 168
  %23 = getelementptr inbounds i8, ptr %0, i64 200
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %22, i8 0, i64 32, i1 false)
  store i64 ptrtoint (ptr @_ZN10bench_math26one_iteration_op1_mod_montEv to i64), ptr %23, align 8, !tbaa !17
  %.repack15 = getelementptr inbounds i8, ptr %0, i64 208
  store i64 0, ptr %.repack15, align 8, !tbaa !17
  invoke void @_ZN10bench_math15init_montgomeryEv(ptr noundef nonnull align 8 dereferenceable(216) %0)
          to label %24 unwind label %37

24:                                               ; preds = %19
  ret void

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

27:                                               ; preds = %9
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %43

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

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

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

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

37:                                               ; preds = %19
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6bignumD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br label %39

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

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

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

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

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

44:                                               ; preds = %43, %25
  %.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn.pn, %43 ], [ %26, %25 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10bench_math26one_iteration_op1_mod_montEv(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, !13, i64 160}
!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, !14, i64 200}


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