; 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.primesieve::Array" = type { [128 x i64] }
%class.anon.7 = type { i8 }
%"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" }

@_ZN12_GLOBAL__N_111smallPrimesE = external hidden constant %"class.primesieve::Array", align 8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK10primesieve14PrimeGenerator11getStartIdxEv(ptr noundef nonnull align 8 dereferenceable(1720)) #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK10primesieve14PrimeGenerator10getStopIdxEv(ptr noundef nonnull align 8 dereferenceable(1720)) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_115primeCountUpperEmm(i64 noundef, i64 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPKmPmET0_T_S4_S3_(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10primesieve5ArrayImLm128EE5beginEv(ptr noundef nonnull align 8 dereferenceable(1024)) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %class.anon.7, align 1
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 1024, ptr %8, align 8, !tbaa !9
  %16 = getelementptr inbounds %"class.primesieve::Erat", ptr %15, i32 0, i32 0
  %17 = load i64, ptr %16, align 8, !tbaa !11
  %18 = call noundef i64 @_ZN10primesieve14PrimeGenerator14maxCachedPrimeEv()
  %19 = icmp ule i64 %17, %18
  br i1 %19, label %20, label %65

20:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %21 = call noundef i64 @_ZNK10primesieve14PrimeGenerator11getStartIdxEv(ptr noundef nonnull align 8 dereferenceable(1720) %15)
  store i64 %21, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %22 = call noundef i64 @_ZNK10primesieve14PrimeGenerator10getStopIdxEv(ptr noundef nonnull align 8 dereferenceable(1720) %15)
  store i64 %22, ptr %10, align 8, !tbaa !9
  %23 = load i64, ptr %10, align 8, !tbaa !9
  %24 = load i64, ptr %9, align 8, !tbaa !9
  %25 = sub i64 %23, %24
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  store i64 %25, ptr %26, align 8, !tbaa !9
  %27 = getelementptr inbounds %"class.primesieve::Erat", ptr %15, i32 0, i32 1
  %28 = load i64, ptr %27, align 8, !tbaa !21
  %29 = call noundef i64 @_ZN10primesieve14PrimeGenerator14maxCachedPrimeEv()
  %30 = add i64 %29, 2
  %31 = icmp ult i64 %28, %30
  br i1 %31, label %32, label %36

32:                                               ; preds = %20
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load i64, ptr %34, align 8, !tbaa !9
  call void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %35)
  br label %55

36:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = add i64 %38, 64
  store i64 %39, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %40 = getelementptr inbounds %"class.primesieve::Erat", ptr %15, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds %"class.primesieve::Erat", ptr %15, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !21
  %44 = call noundef i64 @_ZN12_GLOBAL__N_115primeCountUpperEmm(i64 noundef %41, i64 noundef %43)
  %45 = add i64 %44, 64
  store i64 %45, ptr %12, align 8, !tbaa !9
  %46 = load i64, ptr %11, align 8, !tbaa !9
  %47 = load i64, ptr %12, align 8, !tbaa !9
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = call noundef i64 @_ZN12_GLOBAL__N_19inBetweenImmmEET0_T_S1_T1_(i64 noundef %46, i64 noundef %47, i64 noundef %48)
  store i64 %49, ptr %12, align 8, !tbaa !9
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %12)
  %52 = load i64, ptr %51, align 8, !tbaa !9
  store i64 %52, ptr %12, align 8, !tbaa !9
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = load i64, ptr %12, align 8, !tbaa !9
  call void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %55

55:                                               ; preds = %36, %32
  %56 = call noundef ptr @_ZNK10primesieve5ArrayImLm128EE5beginEv(ptr noundef nonnull align 8 dereferenceable(1024) @_ZN12_GLOBAL__N_111smallPrimesE) #5
  %57 = load i64, ptr %9, align 8, !tbaa !9
  %58 = getelementptr inbounds i64, ptr %56, i64 %57
  %59 = call noundef ptr @_ZNK10primesieve5ArrayImLm128EE5beginEv(ptr noundef nonnull align 8 dereferenceable(1024) @_ZN12_GLOBAL__N_111smallPrimesE) #5
  %60 = load i64, ptr %10, align 8, !tbaa !9
  %61 = getelementptr inbounds i64, ptr %59, i64 %60
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = call noundef ptr @_ZN10primesieve6VectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #5
  %64 = call noundef ptr @_ZSt4copyIPKmPmET0_T_S4_S3_(ptr noundef %58, ptr noundef %61, ptr noundef %63)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %78

65:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 64, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %66 = getelementptr inbounds %"class.primesieve::Erat", ptr %15, i32 0, i32 0
  %67 = load i64, ptr %66, align 8, !tbaa !11
  %68 = getelementptr inbounds %"class.primesieve::Erat", ptr %15, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !21
  %70 = call noundef i64 @_ZN12_GLOBAL__N_115primeCountUpperEmm(i64 noundef %67, i64 noundef %69)
  %71 = add i64 %70, 64
  store i64 %71, ptr %14, align 8, !tbaa !9
  %72 = load i64, ptr %13, align 8, !tbaa !9
  %73 = load i64, ptr %14, align 8, !tbaa !9
  %74 = load i64, ptr %8, align 8, !tbaa !9
  %75 = call noundef i64 @_ZN12_GLOBAL__N_19inBetweenImmmEET0_T_S1_T1_(i64 noundef %72, i64 noundef %73, i64 noundef %74)
  store i64 %75, ptr %14, align 8, !tbaa !9
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load i64, ptr %14, align 8, !tbaa !9
  call void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %77)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %78

78:                                               ; preds = %65, %55
  call void @_ZN10primesieve14PrimeGenerator8initEratEv(ptr noundef nonnull align 8 dereferenceable(1720) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_19inBetweenImmmEET0_T_S1_T1_(i64 noundef, i64 noundef, i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN10primesieve6VectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !10, i64 0}
!12 = !{!"_ZTSN10primesieve4EratE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !10, i64 56, !10, i64 64, !14, i64 72, !17, i64 128, !20, i64 200}
!13 = !{!"_ZTSN10primesieve6VectorIhSaIhEEE", !6, i64 0, !6, i64 8, !6, i64 16}
!14 = !{!"_ZTSN10primesieve9EratSmallE", !15, i64 0, !10, i64 16, !10, i64 24, !16, i64 32}
!15 = !{!"_ZTSN10primesieve5WheelILi30ELi8ELi6EXadsoKNS_9WheelInitEL_ZNS_11wheel30InitEEEEEE", !10, i64 8}
!16 = !{!"_ZTSN10primesieve6VectorINS_12SievingPrimeESaIS1_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSN10primesieve7EratBigE", !18, i64 0, !10, i64 16, !10, i64 24, !10, i64 32, !6, i64 40, !19, i64 48}
!18 = !{!"_ZTSN10primesieve5WheelILi210ELi48ELi10EXadsoKNS_9WheelInitEL_ZNS_12wheel210InitEEEEEE", !10, i64 8}
!19 = !{!"_ZTSN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSN10primesieve10EratMediumE", !15, i64 0, !10, i64 16, !6, i64 24, !19, i64 32, !19, i64 56}
!21 = !{!12, !10, 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.primesieve::Array" = type { [128 x i64] }
%class.anon.7 = type { i8 }

@_ZN12_GLOBAL__N_111smallPrimesE = external hidden constant %"class.primesieve::Array", align 8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK10primesieve14PrimeGenerator11getStartIdxEv(ptr noundef nonnull align 8 dereferenceable(1720)) 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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK10primesieve14PrimeGenerator10getStopIdxEv(ptr noundef nonnull align 8 dereferenceable(1720)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_115primeCountUpperEmm(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPKmPmET0_T_S4_S3_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK10primesieve5ArrayImLm128EE5beginEv(ptr noundef nonnull align 8 dereferenceable(1024)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPm(ptr noundef nonnull align 8 dereferenceable(1720) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) local_unnamed_addr #4 align 2 {
  %4 = alloca %class.anon.7, align 1
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #5
  %6 = load i64, ptr %0, align 8, !tbaa !5
  %7 = tail call noundef i64 @_ZN10primesieve14PrimeGenerator14maxCachedPrimeEv()
  %.not = icmp ugt i64 %6, %7
  br i1 %.not, label %35, label %8

8:                                                ; preds = %3
  %9 = tail call noundef i64 @_ZNK10primesieve14PrimeGenerator11getStartIdxEv(ptr noundef nonnull align 8 dereferenceable(1720) %0)
  %10 = tail call noundef i64 @_ZNK10primesieve14PrimeGenerator10getStopIdxEv(ptr noundef nonnull align 8 dereferenceable(1720) %0)
  %11 = sub i64 %10, %9
  store i64 %11, ptr %2, align 8, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !20
  %14 = tail call noundef i64 @_ZN10primesieve14PrimeGenerator14maxCachedPrimeEv()
  %15 = add i64 %14, 2
  %16 = icmp ult i64 %13, %15
  %17 = load i64, ptr %2, align 8, !tbaa !19
  br i1 %16, label %18, label %19

18:                                               ; preds = %8
  call void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %17)
  br label %28

19:                                               ; preds = %8
  %20 = add i64 %17, 64
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %21 = load i64, ptr %0, align 8, !tbaa !5
  %22 = load i64, ptr %12, align 8, !tbaa !20
  %23 = tail call noundef i64 @_ZN12_GLOBAL__N_115primeCountUpperEmm(i64 noundef %21, i64 noundef %22)
  %24 = add i64 %23, 64
  %25 = tail call noundef i64 @_ZN12_GLOBAL__N_19inBetweenImmmEET0_T_S1_T1_(i64 noundef %20, i64 noundef %24, i64 noundef 1024)
  store i64 %25, ptr %5, align 8, !tbaa !19
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %27 = load i64, ptr %26, align 8, !tbaa !19
  store i64 %27, ptr %5, align 8, !tbaa !19
  call void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %27)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %28

28:                                               ; preds = %19, %18
  %29 = call noundef ptr @_ZNK10primesieve5ArrayImLm128EE5beginEv(ptr noundef nonnull align 8 dereferenceable(1024) @_ZN12_GLOBAL__N_111smallPrimesE) #5
  %30 = getelementptr inbounds i64, ptr %29, i64 %9
  %31 = call noundef ptr @_ZNK10primesieve5ArrayImLm128EE5beginEv(ptr noundef nonnull align 8 dereferenceable(1024) @_ZN12_GLOBAL__N_111smallPrimesE) #5
  %32 = getelementptr inbounds i64, ptr %31, i64 %10
  %33 = call noundef ptr @_ZN10primesieve6VectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %34 = call noundef ptr @_ZSt4copyIPKmPmET0_T_S4_S3_(ptr noundef %30, ptr noundef %32, ptr noundef %33)
  br label %42

35:                                               ; preds = %3
  %36 = load i64, ptr %0, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %0, i64 8
  %38 = load i64, ptr %37, align 8, !tbaa !20
  %39 = tail call noundef i64 @_ZN12_GLOBAL__N_115primeCountUpperEmm(i64 noundef %36, i64 noundef %38)
  %40 = add i64 %39, 64
  %41 = tail call noundef i64 @_ZN12_GLOBAL__N_19inBetweenImmmEET0_T_S1_T1_(i64 noundef 64, i64 noundef %40, i64 noundef 1024)
  call void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %41)
  br label %42

42:                                               ; preds = %35, %28
  call void @_ZN10primesieve14PrimeGenerator8initEratEv(ptr noundef nonnull align 8 dereferenceable(1720) %0)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #5
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZZN10primesieve14PrimeGenerator14initNextPrimesERNS_6VectorImSaImEEEPmENK3$_0clES4_m"(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_19inBetweenImmmEET0_T_S1_T1_(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN10primesieve6VectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"_ZTSN10primesieve4EratE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 56, !7, i64 64, !12, i64 72, !15, i64 128, !18, i64 200}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN10primesieve6VectorIhSaIhEEE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSN10primesieve9EratSmallE", !13, i64 0, !7, i64 16, !7, i64 24, !14, i64 32}
!13 = !{!"_ZTSN10primesieve5WheelILi30ELi8ELi6EXadsoKNS_9WheelInitEL_ZNS_11wheel30InitEEEEEE", !7, i64 8}
!14 = !{!"_ZTSN10primesieve6VectorINS_12SievingPrimeESaIS1_EEE", !11, i64 0, !11, i64 8, !11, i64 16}
!15 = !{!"_ZTSN10primesieve7EratBigE", !16, i64 0, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !17, i64 48}
!16 = !{!"_ZTSN10primesieve5WheelILi210ELi48ELi10EXadsoKNS_9WheelInitEL_ZNS_12wheel210InitEEEEEE", !7, i64 8}
!17 = !{!"_ZTSN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EEE", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"_ZTSN10primesieve10EratMediumE", !13, i64 0, !7, i64 16, !11, i64 24, !17, i64 32, !17, i64 56}
!19 = !{!7, !7, i64 0}
!20 = !{!6, !7, i64 8}


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