; LLVM IR from kimwalisch/primesieve :: src/EratMedium.ll (ZN10primesieve10EratMedium11crossOff_11EPhmPNS_6BucketE)

; 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::EratMedium" = type { %"class.primesieve::Wheel", i64, ptr, %"class.primesieve::Vector", %"class.primesieve::Vector" }
%"class.primesieve::Wheel" = type { ptr, i64 }
%"class.primesieve::Vector" = type { ptr, ptr, ptr }
%"class.primesieve::SievingPrime" = type { i32, i32 }

; 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(none)
declare i64 @llvm.expect.i64(i64, i64) #1

; 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 zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef) #2 align 2

declare void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8), i64 noundef, i64 noundef, i64 noundef) #2 align 2

; Function Attrs: mustprogress noinline uwtable
define dso_local void @_ZN10primesieve10EratMedium11crossOff_11EPhmPNS_6BucketE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #4 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %22 = getelementptr inbounds %"class.primesieve::EratMedium", ptr %21, i32 0, i32 3
  %23 = call noundef ptr @_ZN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #5
  store ptr %23, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %24 = getelementptr inbounds %"class.primesieve::EratMedium", ptr %21, i32 0, i32 2
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  store ptr %25, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = call noundef ptr @_ZN10primesieve6Bucket5beginEv(ptr noundef nonnull align 8 dereferenceable(8192) %26)
  store ptr %27, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = call noundef ptr @_ZN10primesieve6Bucket3endEv(ptr noundef nonnull align 8 dereferenceable(8192) %28)
  store ptr %29, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNK10primesieve12SievingPrime13getWheelIndexEv(ptr noundef nonnull align 4 dereferenceable(8) %30)
  store i64 %31, ptr %13, align 8, !tbaa !9
  br label %32

32:                                               ; preds = %374, %4
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  %35 = icmp ne ptr %33, %34
  br i1 %35, label %36, label %377

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNK10primesieve12SievingPrime15getSievingPrimeEv(ptr noundef nonnull align 4 dereferenceable(8) %37)
  store i64 %38, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = call noundef i64 @_ZNK10primesieve12SievingPrime16getMultipleIndexEv(ptr noundef nonnull align 4 dereferenceable(8) %39)
  store i64 %40, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %41 = load i64, ptr %14, align 8, !tbaa !9
  %42 = mul i64 %41, 6
  %43 = add i64 %42, 2
  store i64 %43, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %44 = load i64, ptr %14, align 8, !tbaa !9
  %45 = mul i64 %44, 4
  %46 = add i64 %45, 1
  store i64 %46, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %47 = load i64, ptr %14, align 8, !tbaa !9
  %48 = mul i64 %47, 2
  %49 = add i64 %48, 1
  store i64 %49, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %50 = load i64, ptr %14, align 8, !tbaa !9
  %51 = mul i64 %50, 4
  %52 = add i64 %51, 2
  store i64 %52, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %53 = load i64, ptr %14, align 8, !tbaa !9
  %54 = mul i64 %53, 2
  %55 = add i64 %54, 0
  store i64 %55, ptr %20, align 8, !tbaa !9
  %56 = load i64, ptr %13, align 8, !tbaa !9
  switch i64 %56, label %57 [
    i64 8, label %60
    i64 9, label %99
    i64 10, label %138
    i64 11, label %177
    i64 12, label %216
    i64 13, label %255
    i64 14, label %294
    i64 15, label %333
  ]

57:                                               ; preds = %36
  unreachable

58:                                               ; No predecessors!
  br label %59

59:                                               ; preds = %361, %58
  br label %60

60:                                               ; preds = %59, %36
  %61 = load i64, ptr %15, align 8, !tbaa !9
  %62 = load i64, ptr %7, align 8, !tbaa !9
  %63 = icmp uge i64 %61, %62
  %64 = xor i1 %63, true
  %65 = xor i1 %64, true
  %66 = zext i1 %65 to i64
  %67 = call i64 @llvm.expect.i64(i64 %66, i64 0)
  %68 = icmp ne i64 %67, 0
  br i1 %68, label %69, label %88

69:                                               ; preds = %60
  %70 = load i64, ptr %7, align 8, !tbaa !9
  %71 = load i64, ptr %15, align 8, !tbaa !9
  %72 = sub i64 %71, %70
  store i64 %72, ptr %15, align 8, !tbaa !9
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = getelementptr inbounds ptr, ptr %73, i64 8
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %75)
  br i1 %76, label %77, label %81

77:                                               ; preds = %69
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds ptr, ptr %79, i64 8
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %78, ptr noundef nonnull align 8 dereferenceable(8) %80)
  br label %81

81:                                               ; preds = %77, %69
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds ptr, ptr %82, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %84, i32 1
  store ptr %85, ptr %83, align 8, !tbaa !5
  %86 = load i64, ptr %14, align 8, !tbaa !9
  %87 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %84, i64 noundef %86, i64 noundef %87, i64 noundef 8)
  br label %372

88:                                               ; preds = %60
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = load i64, ptr %15, align 8, !tbaa !9
  %91 = getelementptr inbounds i8, ptr %89, i64 %90
  %92 = load i8, ptr %91, align 1, !tbaa !15
  %93 = zext i8 %92 to i32
  %94 = and i32 %93, 253
  %95 = trunc i32 %94 to i8
  store i8 %95, ptr %91, align 1, !tbaa !15
  %96 = load i64, ptr %16, align 8, !tbaa !9
  %97 = load i64, ptr %15, align 8, !tbaa !9
  %98 = add i64 %97, %96
  store i64 %98, ptr %15, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %88, %36
  %100 = load i64, ptr %15, align 8, !tbaa !9
  %101 = load i64, ptr %7, align 8, !tbaa !9
  %102 = icmp uge i64 %100, %101
  %103 = xor i1 %102, true
  %104 = xor i1 %103, true
  %105 = zext i1 %104 to i64
  %106 = call i64 @llvm.expect.i64(i64 %105, i64 0)
  %107 = icmp ne i64 %106, 0
  br i1 %107, label %108, label %127

108:                                              ; preds = %99
  %109 = load i64, ptr %7, align 8, !tbaa !9
  %110 = load i64, ptr %15, align 8, !tbaa !9
  %111 = sub i64 %110, %109
  store i64 %111, ptr %15, align 8, !tbaa !9
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds ptr, ptr %112, i64 9
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %114)
  br i1 %115, label %116, label %120

116:                                              ; preds = %108
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds ptr, ptr %118, i64 9
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %117, ptr noundef nonnull align 8 dereferenceable(8) %119)
  br label %120

120:                                              ; preds = %116, %108
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds ptr, ptr %121, i64 9
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %123, i32 1
  store ptr %124, ptr %122, align 8, !tbaa !5
  %125 = load i64, ptr %14, align 8, !tbaa !9
  %126 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %123, i64 noundef %125, i64 noundef %126, i64 noundef 9)
  br label %372

127:                                              ; preds = %99
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load i64, ptr %15, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %128, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !15
  %132 = zext i8 %131 to i32
  %133 = and i32 %132, 247
  %134 = trunc i32 %133 to i8
  store i8 %134, ptr %130, align 1, !tbaa !15
  %135 = load i64, ptr %17, align 8, !tbaa !9
  %136 = load i64, ptr %15, align 8, !tbaa !9
  %137 = add i64 %136, %135
  store i64 %137, ptr %15, align 8, !tbaa !9
  br label %138

138:                                              ; preds = %127, %36
  %139 = load i64, ptr %15, align 8, !tbaa !9
  %140 = load i64, ptr %7, align 8, !tbaa !9
  %141 = icmp uge i64 %139, %140
  %142 = xor i1 %141, true
  %143 = xor i1 %142, true
  %144 = zext i1 %143 to i64
  %145 = call i64 @llvm.expect.i64(i64 %144, i64 0)
  %146 = icmp ne i64 %145, 0
  br i1 %146, label %147, label %166

147:                                              ; preds = %138
  %148 = load i64, ptr %7, align 8, !tbaa !9
  %149 = load i64, ptr %15, align 8, !tbaa !9
  %150 = sub i64 %149, %148
  store i64 %150, ptr %15, align 8, !tbaa !9
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = getelementptr inbounds ptr, ptr %151, i64 10
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %153)
  br i1 %154, label %155, label %159

155:                                              ; preds = %147
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds ptr, ptr %157, i64 10
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %156, ptr noundef nonnull align 8 dereferenceable(8) %158)
  br label %159

159:                                              ; preds = %155, %147
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds ptr, ptr %160, i64 10
  %162 = load ptr, ptr %161, align 8, !tbaa !5
  %163 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %162, i32 1
  store ptr %163, ptr %161, align 8, !tbaa !5
  %164 = load i64, ptr %14, align 8, !tbaa !9
  %165 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %162, i64 noundef %164, i64 noundef %165, i64 noundef 10)
  br label %372

166:                                              ; preds = %138
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = load i64, ptr %15, align 8, !tbaa !9
  %169 = getelementptr inbounds i8, ptr %167, i64 %168
  %170 = load i8, ptr %169, align 1, !tbaa !15
  %171 = zext i8 %170 to i32
  %172 = and i32 %171, 127
  %173 = trunc i32 %172 to i8
  store i8 %173, ptr %169, align 1, !tbaa !15
  %174 = load i64, ptr %18, align 8, !tbaa !9
  %175 = load i64, ptr %15, align 8, !tbaa !9
  %176 = add i64 %175, %174
  store i64 %176, ptr %15, align 8, !tbaa !9
  br label %177

177:                                              ; preds = %166, %36
  %178 = load i64, ptr %15, align 8, !tbaa !9
  %179 = load i64, ptr %7, align 8, !tbaa !9
  %180 = icmp uge i64 %178, %179
  %181 = xor i1 %180, true
  %182 = xor i1 %181, true
  %183 = zext i1 %182 to i64
  %184 = call i64 @llvm.expect.i64(i64 %183, i64 0)
  %185 = icmp ne i64 %184, 0
  br i1 %185, label %186, label %205

186:                                              ; preds = %177
  %187 = load i64, ptr %7, align 8, !tbaa !9
  %188 = load i64, ptr %15, align 8, !tbaa !9
  %189 = sub i64 %188, %187
  store i64 %189, ptr %15, align 8, !tbaa !9
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = getelementptr inbounds ptr, ptr %190, i64 11
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  %193 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %192)
  br i1 %193, label %194, label %198

194:                                              ; preds = %186
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  %197 = getelementptr inbounds ptr, ptr %196, i64 11
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %195, ptr noundef nonnull align 8 dereferenceable(8) %197)
  br label %198

198:                                              ; preds = %194, %186
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = getelementptr inbounds ptr, ptr %199, i64 11
  %201 = load ptr, ptr %200, align 8, !tbaa !5
  %202 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %201, i32 1
  store ptr %202, ptr %200, align 8, !tbaa !5
  %203 = load i64, ptr %14, align 8, !tbaa !9
  %204 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %201, i64 noundef %203, i64 noundef %204, i64 noundef 11)
  br label %372

205:                                              ; preds = %177
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = load i64, ptr %15, align 8, !tbaa !9
  %208 = getelementptr inbounds i8, ptr %206, i64 %207
  %209 = load i8, ptr %208, align 1, !tbaa !15
  %210 = zext i8 %209 to i32
  %211 = and i32 %210, 223
  %212 = trunc i32 %211 to i8
  store i8 %212, ptr %208, align 1, !tbaa !15
  %213 = load i64, ptr %19, align 8, !tbaa !9
  %214 = load i64, ptr %15, align 8, !tbaa !9
  %215 = add i64 %214, %213
  store i64 %215, ptr %15, align 8, !tbaa !9
  br label %216

216:                                              ; preds = %205, %36
  %217 = load i64, ptr %15, align 8, !tbaa !9
  %218 = load i64, ptr %7, align 8, !tbaa !9
  %219 = icmp uge i64 %217, %218
  %220 = xor i1 %219, true
  %221 = xor i1 %220, true
  %222 = zext i1 %221 to i64
  %223 = call i64 @llvm.expect.i64(i64 %222, i64 0)
  %224 = icmp ne i64 %223, 0
  br i1 %224, label %225, label %244

225:                                              ; preds = %216
  %226 = load i64, ptr %7, align 8, !tbaa !9
  %227 = load i64, ptr %15, align 8, !tbaa !9
  %228 = sub i64 %227, %226
  store i64 %228, ptr %15, align 8, !tbaa !9
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  %230 = getelementptr inbounds ptr, ptr %229, i64 12
  %231 = load ptr, ptr %230, align 8, !tbaa !5
  %232 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %231)
  br i1 %232, label %233, label %237

233:                                              ; preds = %225
  %234 = load ptr, ptr %10, align 8, !tbaa !5
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  %236 = getelementptr inbounds ptr, ptr %235, i64 12
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %234, ptr noundef nonnull align 8 dereferenceable(8) %236)
  br label %237

237:                                              ; preds = %233, %225
  %238 = load ptr, ptr %9, align 8, !tbaa !5
  %239 = getelementptr inbounds ptr, ptr %238, i64 12
  %240 = load ptr, ptr %239, align 8, !tbaa !5
  %241 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %240, i32 1
  store ptr %241, ptr %239, align 8, !tbaa !5
  %242 = load i64, ptr %14, align 8, !tbaa !9
  %243 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %240, i64 noundef %242, i64 noundef %243, i64 noundef 12)
  br label %372

244:                                              ; preds = %216
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = load i64, ptr %15, align 8, !tbaa !9
  %247 = getelementptr inbounds i8, ptr %245, i64 %246
  %248 = load i8, ptr %247, align 1, !tbaa !15
  %249 = zext i8 %248 to i32
  %250 = and i32 %249, 254
  %251 = trunc i32 %250 to i8
  store i8 %251, ptr %247, align 1, !tbaa !15
  %252 = load i64, ptr %20, align 8, !tbaa !9
  %253 = load i64, ptr %15, align 8, !tbaa !9
  %254 = add i64 %253, %252
  store i64 %254, ptr %15, align 8, !tbaa !9
  br label %255

255:                                              ; preds = %244, %36
  %256 = load i64, ptr %15, align 8, !tbaa !9
  %257 = load i64, ptr %7, align 8, !tbaa !9
  %258 = icmp uge i64 %256, %257
  %259 = xor i1 %258, true
  %260 = xor i1 %259, true
  %261 = zext i1 %260 to i64
  %262 = call i64 @llvm.expect.i64(i64 %261, i64 0)
  %263 = icmp ne i64 %262, 0
  br i1 %263, label %264, label %283

264:                                              ; preds = %255
  %265 = load i64, ptr %7, align 8, !tbaa !9
  %266 = load i64, ptr %15, align 8, !tbaa !9
  %267 = sub i64 %266, %265
  store i64 %267, ptr %15, align 8, !tbaa !9
  %268 = load ptr, ptr %9, align 8, !tbaa !5
  %269 = getelementptr inbounds ptr, ptr %268, i64 13
  %270 = load ptr, ptr %269, align 8, !tbaa !5
  %271 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %270)
  br i1 %271, label %272, label %276

272:                                              ; preds = %264
  %273 = load ptr, ptr %10, align 8, !tbaa !5
  %274 = load ptr, ptr %9, align 8, !tbaa !5
  %275 = getelementptr inbounds ptr, ptr %274, i64 13
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %273, ptr noundef nonnull align 8 dereferenceable(8) %275)
  br label %276

276:                                              ; preds = %272, %264
  %277 = load ptr, ptr %9, align 8, !tbaa !5
  %278 = getelementptr inbounds ptr, ptr %277, i64 13
  %279 = load ptr, ptr %278, align 8, !tbaa !5
  %280 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %279, i32 1
  store ptr %280, ptr %278, align 8, !tbaa !5
  %281 = load i64, ptr %14, align 8, !tbaa !9
  %282 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %279, i64 noundef %281, i64 noundef %282, i64 noundef 13)
  br label %372

283:                                              ; preds = %255
  %284 = load ptr, ptr %6, align 8, !tbaa !5
  %285 = load i64, ptr %15, align 8, !tbaa !9
  %286 = getelementptr inbounds i8, ptr %284, i64 %285
  %287 = load i8, ptr %286, align 1, !tbaa !15
  %288 = zext i8 %287 to i32
  %289 = and i32 %288, 191
  %290 = trunc i32 %289 to i8
  store i8 %290, ptr %286, align 1, !tbaa !15
  %291 = load i64, ptr %19, align 8, !tbaa !9
  %292 = load i64, ptr %15, align 8, !tbaa !9
  %293 = add i64 %292, %291
  store i64 %293, ptr %15, align 8, !tbaa !9
  br label %294

294:                                              ; preds = %283, %36
  %295 = load i64, ptr %15, align 8, !tbaa !9
  %296 = load i64, ptr %7, align 8, !tbaa !9
  %297 = icmp uge i64 %295, %296
  %298 = xor i1 %297, true
  %299 = xor i1 %298, true
  %300 = zext i1 %299 to i64
  %301 = call i64 @llvm.expect.i64(i64 %300, i64 0)
  %302 = icmp ne i64 %301, 0
  br i1 %302, label %303, label %322

303:                                              ; preds = %294
  %304 = load i64, ptr %7, align 8, !tbaa !9
  %305 = load i64, ptr %15, align 8, !tbaa !9
  %306 = sub i64 %305, %304
  store i64 %306, ptr %15, align 8, !tbaa !9
  %307 = load ptr, ptr %9, align 8, !tbaa !5
  %308 = getelementptr inbounds ptr, ptr %307, i64 14
  %309 = load ptr, ptr %308, align 8, !tbaa !5
  %310 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %309)
  br i1 %310, label %311, label %315

311:                                              ; preds = %303
  %312 = load ptr, ptr %10, align 8, !tbaa !5
  %313 = load ptr, ptr %9, align 8, !tbaa !5
  %314 = getelementptr inbounds ptr, ptr %313, i64 14
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %312, ptr noundef nonnull align 8 dereferenceable(8) %314)
  br label %315

315:                                              ; preds = %311, %303
  %316 = load ptr, ptr %9, align 8, !tbaa !5
  %317 = getelementptr inbounds ptr, ptr %316, i64 14
  %318 = load ptr, ptr %317, align 8, !tbaa !5
  %319 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %318, i32 1
  store ptr %319, ptr %317, align 8, !tbaa !5
  %320 = load i64, ptr %14, align 8, !tbaa !9
  %321 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %318, i64 noundef %320, i64 noundef %321, i64 noundef 14)
  br label %372

322:                                              ; preds = %294
  %323 = load ptr, ptr %6, align 8, !tbaa !5
  %324 = load i64, ptr %15, align 8, !tbaa !9
  %325 = getelementptr inbounds i8, ptr %323, i64 %324
  %326 = load i8, ptr %325, align 1, !tbaa !15
  %327 = zext i8 %326 to i32
  %328 = and i32 %327, 251
  %329 = trunc i32 %328 to i8
  store i8 %329, ptr %325, align 1, !tbaa !15
  %330 = load i64, ptr %16, align 8, !tbaa !9
  %331 = load i64, ptr %15, align 8, !tbaa !9
  %332 = add i64 %331, %330
  store i64 %332, ptr %15, align 8, !tbaa !9
  br label %333

333:                                              ; preds = %322, %36
  %334 = load i64, ptr %15, align 8, !tbaa !9
  %335 = load i64, ptr %7, align 8, !tbaa !9
  %336 = icmp uge i64 %334, %335
  %337 = xor i1 %336, true
  %338 = xor i1 %337, true
  %339 = zext i1 %338 to i64
  %340 = call i64 @llvm.expect.i64(i64 %339, i64 0)
  %341 = icmp ne i64 %340, 0
  br i1 %341, label %342, label %361

342:                                              ; preds = %333
  %343 = load i64, ptr %7, align 8, !tbaa !9
  %344 = load i64, ptr %15, align 8, !tbaa !9
  %345 = sub i64 %344, %343
  store i64 %345, ptr %15, align 8, !tbaa !9
  %346 = load ptr, ptr %9, align 8, !tbaa !5
  %347 = getelementptr inbounds ptr, ptr %346, i64 15
  %348 = load ptr, ptr %347, align 8, !tbaa !5
  %349 = call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %348)
  br i1 %349, label %350, label %354

350:                                              ; preds = %342
  %351 = load ptr, ptr %10, align 8, !tbaa !5
  %352 = load ptr, ptr %9, align 8, !tbaa !5
  %353 = getelementptr inbounds ptr, ptr %352, i64 15
  call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %351, ptr noundef nonnull align 8 dereferenceable(8) %353)
  br label %354

354:                                              ; preds = %350, %342
  %355 = load ptr, ptr %9, align 8, !tbaa !5
  %356 = getelementptr inbounds ptr, ptr %355, i64 15
  %357 = load ptr, ptr %356, align 8, !tbaa !5
  %358 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %357, i32 1
  store ptr %358, ptr %356, align 8, !tbaa !5
  %359 = load i64, ptr %14, align 8, !tbaa !9
  %360 = load i64, ptr %15, align 8, !tbaa !9
  call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %357, i64 noundef %359, i64 noundef %360, i64 noundef 15)
  br label %372

361:                                              ; preds = %333
  %362 = load ptr, ptr %6, align 8, !tbaa !5
  %363 = load i64, ptr %15, align 8, !tbaa !9
  %364 = getelementptr inbounds i8, ptr %362, i64 %363
  %365 = load i8, ptr %364, align 1, !tbaa !15
  %366 = zext i8 %365 to i32
  %367 = and i32 %366, 239
  %368 = trunc i32 %367 to i8
  store i8 %368, ptr %364, align 1, !tbaa !15
  %369 = load i64, ptr %18, align 8, !tbaa !9
  %370 = load i64, ptr %15, align 8, !tbaa !9
  %371 = add i64 %370, %369
  store i64 %371, ptr %15, align 8, !tbaa !9
  br label %59, !llvm.loop !16

372:                                              ; preds = %354, %315, %276, %237, %198, %159, %120, %81
  br label %373

373:                                              ; preds = %372
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %374

374:                                              ; preds = %373
  %375 = load ptr, ptr %11, align 8, !tbaa !5
  %376 = getelementptr inbounds %"class.primesieve::SievingPrime", ptr %375, i32 1
  store ptr %376, ptr %11, align 8, !tbaa !5
  br label %32, !llvm.loop !18

377:                                              ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void
}

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
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 = { mustprogress noinline 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, !6, i64 24}
!12 = !{!"_ZTSN10primesieve10EratMediumE", !13, i64 0, !10, i64 16, !6, i64 24, !14, i64 32, !14, i64 56}
!13 = !{!"_ZTSN10primesieve5WheelILi30ELi8ELi6EXadsoKNS_9WheelInitEL_ZNS_11wheel30InitEEEEEE", !10, i64 8}
!14 = !{!"_ZTSN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EEE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


; 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"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef) local_unnamed_addr #0 align 2

declare void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

; Function Attrs: mustprogress noinline uwtable
define dso_local void @_ZN10primesieve10EratMedium11crossOff_11EPhmPNS_6BucketE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr nocapture noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #2 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = tail call noundef ptr @_ZN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = tail call noundef ptr @_ZN10primesieve6Bucket5beginEv(ptr noundef nonnull align 8 dereferenceable(8192) %3)
  %10 = tail call noundef ptr @_ZN10primesieve6Bucket3endEv(ptr noundef nonnull align 8 dereferenceable(8192) %3)
  %11 = tail call noundef i64 @_ZNK10primesieve12SievingPrime13getWheelIndexEv(ptr noundef nonnull align 4 dereferenceable(8) %9)
  %.not143 = icmp eq ptr %9, %10
  br i1 %.not143, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %12 = getelementptr inbounds i8, ptr %6, i64 64
  %13 = getelementptr inbounds i8, ptr %6, i64 72
  %14 = getelementptr inbounds i8, ptr %6, i64 80
  %15 = getelementptr inbounds i8, ptr %6, i64 88
  %16 = getelementptr inbounds i8, ptr %6, i64 96
  %17 = getelementptr inbounds i8, ptr %6, i64 104
  %18 = getelementptr inbounds i8, ptr %6, i64 112
  %19 = getelementptr inbounds i8, ptr %6, i64 120
  br label %20

20:                                               ; preds = %.lr.ph, %143
  %.0144 = phi ptr [ %9, %.lr.ph ], [ %144, %143 ]
  %21 = tail call noundef i64 @_ZNK10primesieve12SievingPrime15getSievingPrimeEv(ptr noundef nonnull align 4 dereferenceable(8) %.0144)
  %22 = tail call noundef i64 @_ZNK10primesieve12SievingPrime16getMultipleIndexEv(ptr noundef nonnull align 4 dereferenceable(8) %.0144)
  %23 = mul i64 %21, 6
  %24 = add i64 %23, 2
  %25 = shl i64 %21, 2
  %26 = or disjoint i64 %25, 1
  %27 = shl i64 %21, 1
  %28 = or disjoint i64 %27, 1
  %29 = or disjoint i64 %25, 2
  switch i64 %11, label %30 [
    i64 8, label %31
    i64 9, label %45
    i64 10, label %59
    i64 11, label %73
    i64 12, label %87
    i64 13, label %101
    i64 14, label %115
    i64 15, label %129
  ]

30:                                               ; preds = %20
  unreachable

31:                                               ; preds = %138, %20
  %.0126 = phi i64 [ %142, %138 ], [ %22, %20 ]
  %.not135 = icmp ult i64 %.0126, %2
  br i1 %.not135, label %40, label %32, !prof !13

32:                                               ; preds = %31
  %33 = sub i64 %.0126, %2
  %34 = load ptr, ptr %12, align 8, !tbaa !14
  %35 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %34)
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %12)
  br label %37

37:                                               ; preds = %36, %32
  %38 = load ptr, ptr %12, align 8, !tbaa !14
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  store ptr %39, ptr %12, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %38, i64 noundef %21, i64 noundef %33, i64 noundef 8)
  br label %143

40:                                               ; preds = %31
  %41 = getelementptr inbounds i8, ptr %1, i64 %.0126
  %42 = load i8, ptr %41, align 1, !tbaa !15
  %43 = and i8 %42, -3
  store i8 %43, ptr %41, align 1, !tbaa !15
  %44 = add i64 %.0126, %24
  br label %45

45:                                               ; preds = %40, %20
  %.1 = phi i64 [ %44, %40 ], [ %22, %20 ]
  %.not136 = icmp ult i64 %.1, %2
  br i1 %.not136, label %54, label %46, !prof !13

46:                                               ; preds = %45
  %47 = sub i64 %.1, %2
  %48 = load ptr, ptr %13, align 8, !tbaa !14
  %49 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %48)
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %13)
  br label %51

51:                                               ; preds = %50, %46
  %52 = load ptr, ptr %13, align 8, !tbaa !14
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  store ptr %53, ptr %13, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %52, i64 noundef %21, i64 noundef %47, i64 noundef 9)
  br label %143

54:                                               ; preds = %45
  %55 = getelementptr inbounds i8, ptr %1, i64 %.1
  %56 = load i8, ptr %55, align 1, !tbaa !15
  %57 = and i8 %56, -9
  store i8 %57, ptr %55, align 1, !tbaa !15
  %58 = add i64 %26, %.1
  br label %59

59:                                               ; preds = %54, %20
  %.2 = phi i64 [ %58, %54 ], [ %22, %20 ]
  %.not137 = icmp ult i64 %.2, %2
  br i1 %.not137, label %68, label %60, !prof !13

60:                                               ; preds = %59
  %61 = sub i64 %.2, %2
  %62 = load ptr, ptr %14, align 8, !tbaa !14
  %63 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %62)
  br i1 %63, label %64, label %65

64:                                               ; preds = %60
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %14)
  br label %65

65:                                               ; preds = %64, %60
  %66 = load ptr, ptr %14, align 8, !tbaa !14
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  store ptr %67, ptr %14, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %66, i64 noundef %21, i64 noundef %61, i64 noundef 10)
  br label %143

68:                                               ; preds = %59
  %69 = getelementptr inbounds i8, ptr %1, i64 %.2
  %70 = load i8, ptr %69, align 1, !tbaa !15
  %71 = and i8 %70, 127
  store i8 %71, ptr %69, align 1, !tbaa !15
  %72 = add i64 %.2, %28
  br label %73

73:                                               ; preds = %68, %20
  %.3 = phi i64 [ %72, %68 ], [ %22, %20 ]
  %.not138 = icmp ult i64 %.3, %2
  br i1 %.not138, label %82, label %74, !prof !13

74:                                               ; preds = %73
  %75 = sub i64 %.3, %2
  %76 = load ptr, ptr %15, align 8, !tbaa !14
  %77 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %76)
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %15)
  br label %79

79:                                               ; preds = %78, %74
  %80 = load ptr, ptr %15, align 8, !tbaa !14
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  store ptr %81, ptr %15, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %80, i64 noundef %21, i64 noundef %75, i64 noundef 11)
  br label %143

82:                                               ; preds = %73
  %83 = getelementptr inbounds i8, ptr %1, i64 %.3
  %84 = load i8, ptr %83, align 1, !tbaa !15
  %85 = and i8 %84, -33
  store i8 %85, ptr %83, align 1, !tbaa !15
  %86 = add i64 %.3, %29
  br label %87

87:                                               ; preds = %82, %20
  %.4 = phi i64 [ %86, %82 ], [ %22, %20 ]
  %.not139 = icmp ult i64 %.4, %2
  br i1 %.not139, label %96, label %88, !prof !13

88:                                               ; preds = %87
  %89 = sub i64 %.4, %2
  %90 = load ptr, ptr %16, align 8, !tbaa !14
  %91 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %90)
  br i1 %91, label %92, label %93

92:                                               ; preds = %88
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %16)
  br label %93

93:                                               ; preds = %92, %88
  %94 = load ptr, ptr %16, align 8, !tbaa !14
  %95 = getelementptr inbounds i8, ptr %94, i64 8
  store ptr %95, ptr %16, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %94, i64 noundef %21, i64 noundef %89, i64 noundef 12)
  br label %143

96:                                               ; preds = %87
  %97 = getelementptr inbounds i8, ptr %1, i64 %.4
  %98 = load i8, ptr %97, align 1, !tbaa !15
  %99 = and i8 %98, -2
  store i8 %99, ptr %97, align 1, !tbaa !15
  %100 = add i64 %.4, %27
  br label %101

101:                                              ; preds = %96, %20
  %.5 = phi i64 [ %100, %96 ], [ %22, %20 ]
  %.not140 = icmp ult i64 %.5, %2
  br i1 %.not140, label %110, label %102, !prof !13

102:                                              ; preds = %101
  %103 = sub i64 %.5, %2
  %104 = load ptr, ptr %17, align 8, !tbaa !14
  %105 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %104)
  br i1 %105, label %106, label %107

106:                                              ; preds = %102
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %17)
  br label %107

107:                                              ; preds = %106, %102
  %108 = load ptr, ptr %17, align 8, !tbaa !14
  %109 = getelementptr inbounds i8, ptr %108, i64 8
  store ptr %109, ptr %17, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %108, i64 noundef %21, i64 noundef %103, i64 noundef 13)
  br label %143

110:                                              ; preds = %101
  %111 = getelementptr inbounds i8, ptr %1, i64 %.5
  %112 = load i8, ptr %111, align 1, !tbaa !15
  %113 = and i8 %112, -65
  store i8 %113, ptr %111, align 1, !tbaa !15
  %114 = add i64 %.5, %29
  br label %115

115:                                              ; preds = %110, %20
  %.6 = phi i64 [ %114, %110 ], [ %22, %20 ]
  %.not141 = icmp ult i64 %.6, %2
  br i1 %.not141, label %124, label %116, !prof !13

116:                                              ; preds = %115
  %117 = sub i64 %.6, %2
  %118 = load ptr, ptr %18, align 8, !tbaa !14
  %119 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %118)
  br i1 %119, label %120, label %121

120:                                              ; preds = %116
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %18)
  br label %121

121:                                              ; preds = %120, %116
  %122 = load ptr, ptr %18, align 8, !tbaa !14
  %123 = getelementptr inbounds i8, ptr %122, i64 8
  store ptr %123, ptr %18, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %122, i64 noundef %21, i64 noundef %117, i64 noundef 14)
  br label %143

124:                                              ; preds = %115
  %125 = getelementptr inbounds i8, ptr %1, i64 %.6
  %126 = load i8, ptr %125, align 1, !tbaa !15
  %127 = and i8 %126, -5
  store i8 %127, ptr %125, align 1, !tbaa !15
  %128 = add i64 %.6, %24
  br label %129

129:                                              ; preds = %124, %20
  %.7 = phi i64 [ %22, %20 ], [ %128, %124 ]
  %.not142 = icmp ult i64 %.7, %2
  br i1 %.not142, label %138, label %130, !prof !13

130:                                              ; preds = %129
  %131 = sub i64 %.7, %2
  %132 = load ptr, ptr %19, align 8, !tbaa !14
  %133 = tail call noundef zeroext i1 @_ZN10primesieve6Bucket6isFullEPNS_12SievingPrimeE(ptr noundef %132)
  br i1 %133, label %134, label %135

134:                                              ; preds = %130
  tail call void @_ZN10primesieve10MemoryPool9addBucketERPNS_12SievingPrimeE(ptr noundef nonnull align 8 dereferenceable(40) %8, ptr noundef nonnull align 8 dereferenceable(8) %19)
  br label %135

135:                                              ; preds = %134, %130
  %136 = load ptr, ptr %19, align 8, !tbaa !14
  %137 = getelementptr inbounds i8, ptr %136, i64 8
  store ptr %137, ptr %19, align 8, !tbaa !14
  tail call void @_ZN10primesieve12SievingPrime3setEmmm(ptr noundef nonnull align 4 dereferenceable(8) %136, i64 noundef %21, i64 noundef %131, i64 noundef 15)
  br label %143

138:                                              ; preds = %129
  %139 = getelementptr inbounds i8, ptr %1, i64 %.7
  %140 = load i8, ptr %139, align 1, !tbaa !15
  %141 = and i8 %140, -17
  store i8 %141, ptr %139, align 1, !tbaa !15
  %142 = add i64 %.7, %28
  br label %31

143:                                              ; preds = %37, %51, %65, %79, %93, %107, %121, %135
  %144 = getelementptr inbounds i8, ptr %.0144, i64 8
  %.not = icmp eq ptr %144, %10
  br i1 %.not, label %._crit_edge, label %20, !llvm.loop !16

._crit_edge:                                      ; preds = %143, %4
  ret void
}

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK10primesieve12SievingPrime16getMultipleIndexEv(ptr noundef nonnull align 4 dereferenceable(8)) 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 noinline 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, !11, i64 24}
!6 = !{!"_ZTSN10primesieve10EratMediumE", !7, i64 0, !8, i64 16, !11, i64 24, !12, i64 32, !12, i64 56}
!7 = !{!"_ZTSN10primesieve5WheelILi30ELi8ELi6EXadsoKNS_9WheelInitEL_ZNS_11wheel30InitEEEEEE", !8, i64 8}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTSN10primesieve6VectorIPNS_12SievingPrimeESaIS2_EEE", !11, i64 0, !11, i64 8, !11, i64 16}
!13 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!14 = !{!11, !11, i64 0}
!15 = !{!9, !9, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass