; LLVM IR from kimwalisch/primesieve :: src (PrimeGenerator)

; 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.9 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.9 = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"class.primesieve::PrimeGenerator" = type { %"class.primesieve::Erat", i8, i64, i64, i64, %"class.primesieve::MemoryPool", %"class.primesieve::SievingPrimes" }
%"class.primesieve::Erat" = type { i64, i64, i64, i64, %"class.primesieve::Vector", i64, i64, %"class.primesieve::EratSmall", %"class.primesieve::EratBig", %"class.primesieve::EratMedium" }
%"class.primesieve::Vector" = type { ptr, ptr, ptr }
%"class.primesieve::EratSmall" = type { %"class.primesieve::Wheel", i64, i64, %"class.primesieve::Vector.0" }
%"class.primesieve::Wheel" = type { ptr, i64 }
%"class.primesieve::Vector.0" = type { ptr, ptr, ptr }
%"class.primesieve::EratBig" = type { %"class.primesieve::Wheel.1", i64, i64, i64, ptr, %"class.primesieve::Vector.2" }
%"class.primesieve::Wheel.1" = type { ptr, i64 }
%"class.primesieve::Vector.2" = type { ptr, ptr, ptr }
%"class.primesieve::EratMedium" = type { %"class.primesieve::Wheel", i64, ptr, %"class.primesieve::Vector.2", %"class.primesieve::Vector.2" }
%"class.primesieve::MemoryPool" = type { ptr, i64, %"class.primesieve::Vector.3" }
%"class.primesieve::Vector.3" = type { ptr, ptr, ptr }
%"class.primesieve::SievingPrimes" = type { %"class.primesieve::Erat", i64, i64, i64, i64, i64, %"class.primesieve::Array", %"class.primesieve::Vector.4" }
%"class.primesieve::Array" = type { [128 x i64] }
%"class.primesieve::Vector.4" = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@_ZTIN10primesieve16primesieve_errorE = external dso_local constant { ptr, ptr, ptr }, align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10primesieve14PrimeGenerator12sieveSegmentEv(ptr noundef nonnull align 8 dereferenceable(1720)) #1 align 2

declare noundef zeroext i1 @_ZNK10primesieve4Erat14hasNextSegmentEv(ptr noundef nonnull align 8 dereferenceable(280)) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10primesieve14PrimeGenerator15sieveNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i1, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8
  %14 = getelementptr inbounds %"class.primesieve::PrimeGenerator", ptr %13, i32 0, i32 1
  %15 = load i8, ptr %14, align 8, !tbaa !9, !range !27, !noundef !28
  %16 = trunc i8 %15 to i1
  br i1 %16, label %20, label %17

17:                                               ; preds = %3
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720) %13, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef %19)
  br label %20

20:                                               ; preds = %17, %3
  %21 = call noundef zeroext i1 @_ZNK10primesieve4Erat14hasNextSegmentEv(ptr noundef nonnull align 8 dereferenceable(280) %13)
  br i1 %21, label %22, label %23

22:                                               ; preds = %20
  call void @_ZN10primesieve14PrimeGenerator12sieveSegmentEv(ptr noundef nonnull align 8 dereferenceable(1720) %13)
  store i1 true, ptr %4, align 1
  br label %50

23:                                               ; preds = %20
  %24 = getelementptr inbounds %"class.primesieve::Erat", ptr %13, i32 0, i32 1
  %25 = load i64, ptr %24, align 8, !tbaa !29
  %26 = call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #6
  %27 = icmp uge i64 %25, %26
  %28 = xor i1 %27, true
  %29 = xor i1 %28, true
  %30 = zext i1 %29 to i64
  %31 = call i64 @llvm.expect.i64(i64 %30, i64 0)
  %32 = icmp ne i64 %31, 0
  br i1 %32, label %33, label %49

33:                                               ; preds = %23
  store i1 true, ptr %12, align 1
  %34 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %35 unwind label %37

35:                                               ; preds = %33
  invoke void @_ZN10primesieve16primesieve_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %36 unwind label %41

36:                                               ; preds = %35
  store i1 false, ptr %12, align 1
  invoke void @__cxa_throw(ptr %34, ptr @_ZTIN10primesieve16primesieve_errorE, ptr @_ZNSt13runtime_errorD2Ev) #7
          to label %57 unwind label %41

37:                                               ; preds = %33
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %10, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %11, align 4
  br label %45

41:                                               ; preds = %36, %35
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %10, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %45

45:                                               ; preds = %41, %37
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  %46 = load i1, ptr %12, align 1
  br i1 %46, label %47, label %48

47:                                               ; preds = %45
  call void @__cxa_free_exception(ptr %34) #6
  br label %48

48:                                               ; preds = %47, %45
  br label %52

49:                                               ; preds = %23
  store i1 false, ptr %4, align 1
  br label %50

50:                                               ; preds = %49, %22
  %51 = load i1, ptr %4, align 1
  ret i1 %51

52:                                               ; preds = %48
  %53 = load ptr, ptr %10, align 8
  %54 = load i32, ptr %11, align 4
  %55 = insertvalue { ptr, i32 } poison, ptr %53, 0
  %56 = insertvalue { ptr, i32 } %55, i32 %54, 1
  resume { ptr, i32 } %56

57:                                               ; preds = %36
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #4

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10primesieve16primesieve_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #5

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { "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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!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, !21, i64 280}
!10 = !{!"_ZTSN10primesieve14PrimeGeneratorE", !11, i64 0, !21, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !22, i64 312, !24, i64 352}
!11 = !{!"_ZTSN10primesieve4EratE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !12, i64 56, !12, i64 64, !14, i64 72, !17, i64 128, !20, i64 200}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN10primesieve6VectorIhSaIhEEE", !6, i64 0, !6, i64 8, !6, i64 16}
!14 = !{!"_ZTSN10primesieve9EratSmallE", !15, i64 0, !12, i64 16, !12, i64 24, !16, i64 32}
!15 = !{!"_ZTSN10primesieve5WheelILi30ELi8ELi6EXadsoKNS_9WheelInitEL_ZNS_11wheel30InitEEEEEE", !12, i64 8}
!16 = !{!"_ZTSN10primesieve6VectorINS_12SievingPrimeESaIS1_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSN10primesieve7EratBigE", !18, i64 0, !12, i64 16, !12, i64 24, !12, i64 32, !6, i64 40, !19, i64 48}
!18 = !{!"_ZTSN10primesieve5WheelILi210ELi48ELi10EXadsoKNS_9WheelInitEL_ZNS_12wheel210InitEEEEEE", !12, i64 8}
!19 = !{!"_ZTSN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSN10primesieve10EratMediumE", !15, i64 0, !12, i64 16, !6, i64 24, !19, i64 32, !19, i64 56}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSN10primesieve10MemoryPoolE", !6, i64 0, !12, i64 8, !23, i64 16}
!23 = !{!"_ZTSN10primesieve6VectorINS0_IcSaIcEEESaIS2_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSN10primesieve13SievingPrimesE", !11, i64 0, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312, !25, i64 320, !26, i64 1344}
!25 = !{!"_ZTSN10primesieve5ArrayImLm128EEE", !7, i64 0}
!26 = !{!"_ZTSN10primesieve6VectorIbSaIbEEE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!11, !12, i64 8}


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

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@_ZTIN10primesieve16primesieve_errorE = external dso_local constant { ptr, ptr, ptr }, align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10primesieve14PrimeGenerator12sieveSegmentEv(ptr noundef nonnull align 8 dereferenceable(1720)) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNK10primesieve4Erat14hasNextSegmentEv(ptr noundef nonnull align 8 dereferenceable(280)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10primesieve14PrimeGenerator15sieveNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = getelementptr inbounds i8, ptr %0, i64 280
  %7 = load i8, ptr %6, align 8, !tbaa !5, !range !26, !noundef !27
  %8 = trunc nuw i8 %7 to i1
  br i1 %8, label %10, label %9

9:                                                ; preds = %3
  tail call void @_ZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2)
  br label %10

10:                                               ; preds = %9, %3
  %11 = tail call noundef zeroext i1 @_ZNK10primesieve4Erat14hasNextSegmentEv(ptr noundef nonnull align 8 dereferenceable(280) %0)
  br i1 %11, label %12, label %13

12:                                               ; preds = %10
  tail call void @_ZN10primesieve14PrimeGenerator12sieveSegmentEv(ptr noundef nonnull align 8 dereferenceable(1720) %0)
  br label %25

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i64, ptr %14, align 8, !tbaa !28
  %16 = tail call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #5
  %.not = icmp ult i64 %15, %16
  br i1 %.not, label %25, label %17, !prof !29

17:                                               ; preds = %13
  %18 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %19 unwind label %.thread

19:                                               ; preds = %17
  invoke void @_ZN10primesieve16primesieve_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %20 unwind label %22

20:                                               ; preds = %19
  invoke void @__cxa_throw(ptr nonnull %18, ptr nonnull @_ZTIN10primesieve16primesieve_errorE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #6
          to label %27 unwind label %22

.thread:                                          ; preds = %17
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %24

22:                                               ; preds = %19, %20
  %.0 = phi i1 [ false, %20 ], [ true, %19 ]
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br i1 %.0, label %24, label %26

24:                                               ; preds = %.thread, %22
  %.pn13 = phi { ptr, i32 } [ %21, %.thread ], [ %23, %22 ]
  call void @__cxa_free_exception(ptr %18) #5
  br label %26

25:                                               ; preds = %13, %12
  ret i1 %11

26:                                               ; preds = %22, %24
  %.pn12 = phi { ptr, i32 } [ %23, %22 ], [ %.pn13, %24 ]
  resume { ptr, i32 } %.pn12

27:                                               ; preds = %20
  unreachable
}

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10primesieve16primesieve_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { "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 = { nounwind }
attributes #6 = { noreturn }

!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, !20, i64 280}
!6 = !{!"_ZTSN10primesieve14PrimeGeneratorE", !7, i64 0, !20, i64 280, !8, i64 288, !8, i64 296, !8, i64 304, !21, i64 312, !23, i64 352}
!7 = !{!"_ZTSN10primesieve4EratE", !8, i64 0, !8, i64 8, !8, i64 16, !8, i64 24, !11, i64 32, !8, i64 56, !8, i64 64, !13, i64 72, !16, i64 128, !19, i64 200}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN10primesieve6VectorIhSaIhEEE", !12, i64 0, !12, i64 8, !12, i64 16}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"_ZTSN10primesieve9EratSmallE", !14, i64 0, !8, i64 16, !8, i64 24, !15, i64 32}
!14 = !{!"_ZTSN10primesieve5WheelILi30ELi8ELi6EXadsoKNS_9WheelInitEL_ZNS_11wheel30InitEEEEEE", !8, i64 8}
!15 = !{!"_ZTSN10primesieve6VectorINS_12SievingPrimeESaIS1_EEE", !12, i64 0, !12, i64 8, !12, i64 16}
!16 = !{!"_ZTSN10primesieve7EratBigE", !17, i64 0, !8, i64 16, !8, i64 24, !8, i64 32, !12, i64 40, !18, i64 48}
!17 = !{!"_ZTSN10primesieve5WheelILi210ELi48ELi10EXadsoKNS_9WheelInitEL_ZNS_12wheel210InitEEEEEE", !8, i64 8}
!18 = !{!"_ZTSN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EEE", !12, i64 0, !12, i64 8, !12, i64 16}
!19 = !{!"_ZTSN10primesieve10EratMediumE", !14, i64 0, !8, i64 16, !12, i64 24, !18, i64 32, !18, i64 56}
!20 = !{!"bool", !9, i64 0}
!21 = !{!"_ZTSN10primesieve10MemoryPoolE", !12, i64 0, !8, i64 8, !22, i64 16}
!22 = !{!"_ZTSN10primesieve6VectorINS0_IcSaIcEEESaIS2_EEE", !12, i64 0, !12, i64 8, !12, i64 16}
!23 = !{!"_ZTSN10primesieve13SievingPrimesE", !7, i64 0, !8, i64 280, !8, i64 288, !8, i64 296, !8, i64 304, !8, i64 312, !24, i64 320, !25, i64 1344}
!24 = !{!"_ZTSN10primesieve5ArrayImLm128EEE", !9, i64 0}
!25 = !{!"_ZTSN10primesieve6VectorIbSaIbEEE", !12, i64 0, !12, i64 8, !12, i64 16}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!7, !8, i64 8}
!29 = !{!"branch_weights", !"expected", i32 2000, i32 1}


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