; LLVM IR from kimwalisch/primesieve :: src/CountPrintPrimes.ll (ZN10primesieve16CountPrintPrimes13countkTupletsEv)

; 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::CountPrintPrimes" = type { %"class.primesieve::Erat", i64, [6 x %"class.primesieve::Vector"], ptr, ptr, %"class.primesieve::MemoryPool" }
%"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 }

; 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 nounwind uwtable
declare dso_local noundef i64 @_ZNK10primesieve5ArrayImLm6EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

declare noundef zeroext i1 @_ZNK10primesieve10PrimeSieve7isCountEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10primesieve16CountPrintPrimes13countkTupletsEv(ptr noundef nonnull align 8 dereferenceable(488) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 1, ptr %3, align 4, !tbaa !9
  br label %9

9:                                                ; preds = %105, %1
  %10 = load i32, ptr %3, align 4, !tbaa !9
  %11 = zext i32 %10 to i64
  %12 = getelementptr inbounds %"class.primesieve::CountPrintPrimes", ptr %8, i32 0, i32 3
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = call noundef i64 @_ZNK10primesieve5ArrayImLm6EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %13) #4
  %15 = icmp ult i64 %11, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %9
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %108

17:                                               ; preds = %9
  %18 = getelementptr inbounds %"class.primesieve::CountPrintPrimes", ptr %8, i32 0, i32 4
  %19 = load ptr, ptr %18, align 8, !tbaa !25
  %20 = load i32, ptr %3, align 4, !tbaa !9
  %21 = call noundef zeroext i1 @_ZNK10primesieve10PrimeSieve7isCountEi(ptr noundef nonnull align 8 dereferenceable(120) %19, i32 noundef %20)
  br i1 %21, label %22, label %104

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %23 = getelementptr inbounds %"class.primesieve::Erat", ptr %8, i32 0, i32 4
  %24 = call noundef ptr @_ZN10primesieve6VectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  store ptr %24, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !26
  br label %25

25:                                               ; preds = %92, %22
  %26 = load i64, ptr %7, align 8, !tbaa !26
  %27 = getelementptr inbounds %"class.primesieve::Erat", ptr %8, i32 0, i32 4
  %28 = call noundef i64 @_ZNK10primesieve6VectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %29 = icmp ult i64 %26, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %25
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %95

31:                                               ; preds = %25
  %32 = getelementptr inbounds %"class.primesieve::CountPrintPrimes", ptr %8, i32 0, i32 2
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds [6 x %"class.primesieve::Vector"], ptr %32, i64 0, i64 %34
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load i64, ptr %7, align 8, !tbaa !26
  %38 = add i64 %37, 0
  %39 = getelementptr inbounds i8, ptr %36, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !27
  %41 = zext i8 %40 to i64
  %42 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %35, i64 noundef %41) #4
  %43 = load i8, ptr %42, align 1, !tbaa !27
  %44 = zext i8 %43 to i64
  %45 = load i64, ptr %6, align 8, !tbaa !26
  %46 = add i64 %45, %44
  store i64 %46, ptr %6, align 8, !tbaa !26
  %47 = getelementptr inbounds %"class.primesieve::CountPrintPrimes", ptr %8, i32 0, i32 2
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds [6 x %"class.primesieve::Vector"], ptr %47, i64 0, i64 %49
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load i64, ptr %7, align 8, !tbaa !26
  %53 = add i64 %52, 1
  %54 = getelementptr inbounds i8, ptr %51, i64 %53
  %55 = load i8, ptr %54, align 1, !tbaa !27
  %56 = zext i8 %55 to i64
  %57 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %56) #4
  %58 = load i8, ptr %57, align 1, !tbaa !27
  %59 = zext i8 %58 to i64
  %60 = load i64, ptr %6, align 8, !tbaa !26
  %61 = add i64 %60, %59
  store i64 %61, ptr %6, align 8, !tbaa !26
  %62 = getelementptr inbounds %"class.primesieve::CountPrintPrimes", ptr %8, i32 0, i32 2
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds [6 x %"class.primesieve::Vector"], ptr %62, i64 0, i64 %64
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = load i64, ptr %7, align 8, !tbaa !26
  %68 = add i64 %67, 2
  %69 = getelementptr inbounds i8, ptr %66, i64 %68
  %70 = load i8, ptr %69, align 1, !tbaa !27
  %71 = zext i8 %70 to i64
  %72 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %65, i64 noundef %71) #4
  %73 = load i8, ptr %72, align 1, !tbaa !27
  %74 = zext i8 %73 to i64
  %75 = load i64, ptr %6, align 8, !tbaa !26
  %76 = add i64 %75, %74
  store i64 %76, ptr %6, align 8, !tbaa !26
  %77 = getelementptr inbounds %"class.primesieve::CountPrintPrimes", ptr %8, i32 0, i32 2
  %78 = load i32, ptr %3, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds [6 x %"class.primesieve::Vector"], ptr %77, i64 0, i64 %79
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = load i64, ptr %7, align 8, !tbaa !26
  %83 = add i64 %82, 3
  %84 = getelementptr inbounds i8, ptr %81, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !27
  %86 = zext i8 %85 to i64
  %87 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %86) #4
  %88 = load i8, ptr %87, align 1, !tbaa !27
  %89 = zext i8 %88 to i64
  %90 = load i64, ptr %6, align 8, !tbaa !26
  %91 = add i64 %90, %89
  store i64 %91, ptr %6, align 8, !tbaa !26
  br label %92

92:                                               ; preds = %31
  %93 = load i64, ptr %7, align 8, !tbaa !26
  %94 = add i64 %93, 4
  store i64 %94, ptr %7, align 8, !tbaa !26
  br label %25, !llvm.loop !28

95:                                               ; preds = %30
  %96 = load i64, ptr %6, align 8, !tbaa !26
  %97 = getelementptr inbounds %"class.primesieve::CountPrintPrimes", ptr %8, i32 0, i32 3
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = load i32, ptr %3, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10primesieve5ArrayImLm6EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %98, i64 noundef %100) #4
  %102 = load i64, ptr %101, align 8, !tbaa !26
  %103 = add i64 %102, %96
  store i64 %103, ptr %101, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %104

104:                                              ; preds = %95, %17
  br label %105

105:                                              ; preds = %104
  %106 = load i32, ptr %3, align 4, !tbaa !9
  %107 = add i32 %106, 1
  store i32 %107, ptr %3, align 4, !tbaa !9
  br label %9, !llvm.loop !30

108:                                              ; preds = %16
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN10primesieve5ArrayImLm6EEixEm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) #1 align 2

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

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 432}
!12 = !{!"_ZTSN10primesieve16CountPrintPrimesE", !13, i64 0, !14, i64 280, !7, i64 288, !6, i64 432, !6, i64 440, !23, i64 448}
!13 = !{!"_ZTSN10primesieve4EratE", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !15, i64 32, !14, i64 56, !14, i64 64, !16, i64 72, !19, i64 128, !22, i64 200}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN10primesieve6VectorIhSaIhEEE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSN10primesieve9EratSmallE", !17, i64 0, !14, i64 16, !14, i64 24, !18, i64 32}
!17 = !{!"_ZTSN10primesieve5WheelILi30ELi8ELi6EXadsoKNS_9WheelInitEL_ZNS_11wheel30InitEEEEEE", !14, i64 8}
!18 = !{!"_ZTSN10primesieve6VectorINS_12SievingPrimeESaIS1_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSN10primesieve7EratBigE", !20, i64 0, !14, i64 16, !14, i64 24, !14, i64 32, !6, i64 40, !21, i64 48}
!20 = !{!"_ZTSN10primesieve5WheelILi210ELi48ELi10EXadsoKNS_9WheelInitEL_ZNS_12wheel210InitEEEEEE", !14, i64 8}
!21 = !{!"_ZTSN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSN10primesieve10EratMediumE", !17, i64 0, !14, i64 16, !6, i64 24, !21, i64 32, !21, i64 56}
!23 = !{!"_ZTSN10primesieve10MemoryPoolE", !6, i64 0, !14, i64 8, !24, i64 16}
!24 = !{!"_ZTSN10primesieve6VectorINS0_IcSaIcEEESaIS2_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!12, !6, i64 440}
!26 = !{!14, !14, i64 0}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


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

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

declare noundef zeroext i1 @_ZNK10primesieve10PrimeSieve7isCountEi(ptr noundef nonnull align 8 dereferenceable(120), i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10primesieve16CountPrintPrimes13countkTupletsEv(ptr noundef nonnull align 8 dereferenceable(488) %0) local_unnamed_addr #2 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 432
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = tail call noundef i64 @_ZNK10primesieve5ArrayImLm6EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %3) #3
  %5 = icmp ugt i64 %4, 1
  br i1 %5, label %.lr.ph30, label %._crit_edge31

.lr.ph30:                                         ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 440
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = getelementptr inbounds i8, ptr %0, i64 288
  br label %9

._crit_edge31:                                    ; preds = %56, %1
  ret void

9:                                                ; preds = %.lr.ph30, %56
  %10 = phi i64 [ 1, %.lr.ph30 ], [ %58, %56 ]
  %.02428 = phi i32 [ 1, %.lr.ph30 ], [ %57, %56 ]
  %11 = load ptr, ptr %6, align 8, !tbaa !22
  %12 = tail call noundef zeroext i1 @_ZNK10primesieve10PrimeSieve7isCountEi(ptr noundef nonnull align 8 dereferenceable(120) %11, i32 noundef %.02428)
  br i1 %12, label %13, label %56

13:                                               ; preds = %9
  %14 = tail call noundef ptr @_ZN10primesieve6VectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  %15 = tail call noundef i64 @_ZNK10primesieve6VectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %13
  %16 = getelementptr inbounds [6 x %"class.primesieve::Vector"], ptr %8, i64 0, i64 %10
  br label %21

._crit_edge:                                      ; preds = %21, %13
  %.023.lcssa = phi i64 [ 0, %13 ], [ %52, %21 ]
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN10primesieve5ArrayImLm6EEixEm(ptr noundef nonnull align 8 dereferenceable(48) %17, i64 noundef %10) #3
  %19 = load i64, ptr %18, align 8, !tbaa !23
  %20 = add i64 %19, %.023.lcssa
  store i64 %20, ptr %18, align 8, !tbaa !23
  br label %56

21:                                               ; preds = %.lr.ph, %21
  %.027 = phi i64 [ 0, %.lr.ph ], [ %53, %21 ]
  %.02326 = phi i64 [ 0, %.lr.ph ], [ %52, %21 ]
  %22 = getelementptr inbounds i8, ptr %14, i64 %.027
  %23 = load i8, ptr %22, align 1, !tbaa !24
  %24 = zext i8 %23 to i64
  %25 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %24) #3
  %26 = load i8, ptr %25, align 1, !tbaa !24
  %27 = zext i8 %26 to i64
  %28 = add i64 %.02326, %27
  %29 = or disjoint i64 %.027, 1
  %30 = getelementptr inbounds i8, ptr %14, i64 %29
  %31 = load i8, ptr %30, align 1, !tbaa !24
  %32 = zext i8 %31 to i64
  %33 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %32) #3
  %34 = load i8, ptr %33, align 1, !tbaa !24
  %35 = zext i8 %34 to i64
  %36 = add i64 %28, %35
  %37 = or disjoint i64 %.027, 2
  %38 = getelementptr inbounds i8, ptr %14, i64 %37
  %39 = load i8, ptr %38, align 1, !tbaa !24
  %40 = zext i8 %39 to i64
  %41 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %40) #3
  %42 = load i8, ptr %41, align 1, !tbaa !24
  %43 = zext i8 %42 to i64
  %44 = add i64 %36, %43
  %45 = or disjoint i64 %.027, 3
  %46 = getelementptr inbounds i8, ptr %14, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !24
  %48 = zext i8 %47 to i64
  %49 = tail call noundef nonnull align 1 dereferenceable(1) ptr @_ZN10primesieve6VectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %48) #3
  %50 = load i8, ptr %49, align 1, !tbaa !24
  %51 = zext i8 %50 to i64
  %52 = add i64 %44, %51
  %53 = add i64 %.027, 4
  %54 = tail call noundef i64 @_ZNK10primesieve6VectorIhSaIhEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %21, label %._crit_edge, !llvm.loop !25

56:                                               ; preds = %9, %._crit_edge
  %57 = add i32 %.02428, 1
  %58 = zext i32 %57 to i64
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = tail call noundef i64 @_ZNK10primesieve5ArrayImLm6EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %59) #3
  %61 = icmp ugt i64 %60, %58
  br i1 %61, label %9, label %._crit_edge31, !llvm.loop !27
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN10primesieve5ArrayImLm6EEixEm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef) 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 = { "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 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 = { 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, !12, i64 432}
!6 = !{!"_ZTSN10primesieve16CountPrintPrimesE", !7, i64 0, !8, i64 280, !9, i64 288, !12, i64 432, !12, i64 440, !20, i64 448}
!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 = !{!"_ZTSN10primesieve10MemoryPoolE", !12, i64 0, !8, i64 8, !21, i64 16}
!21 = !{!"_ZTSN10primesieve6VectorINS0_IcSaIcEEESaIS2_EEE", !12, i64 0, !12, i64 8, !12, i64 16}
!22 = !{!6, !12, i64 440}
!23 = !{!8, !8, i64 0}
!24 = !{!9, !9, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass