; LLVM IR from VastoLorde95/Competitive-Programming :: SPOJ/Random/PRIC/p.ll (Z12sieve_atkinsi)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z12sieve_atkinsi(i32 noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"struct.std::_Bit_reference", align 8
  %18 = alloca %"struct.std::_Bit_reference", align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca i64, align 8
  %21 = alloca %"struct.std::_Bit_reference", align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.std::_Bit_reference", align 8
  %24 = alloca i64, align 8
  %25 = alloca %"struct.std::_Bit_reference", align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 0, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %4) #5
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  %28 = sext i32 %27 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %28, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %29 unwind label %50

29:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %30 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef 2)
          to label %31 unwind label %54

31:                                               ; preds = %29
  %32 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %33 = extractvalue { ptr, i64 } %30, 0
  store ptr %33, ptr %32, align 8
  %34 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %35 = extractvalue { ptr, i64 } %30, 1
  store i64 %35, ptr %34, align 8
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %37 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef 3)
          to label %38 unwind label %58

38:                                               ; preds = %31
  %39 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 0
  %40 = extractvalue { ptr, i64 } %37, 0
  store ptr %40, ptr %39, align 8
  %41 = getelementptr inbounds { ptr, i64 }, ptr %9, i32 0, i32 1
  %42 = extractvalue { ptr, i64 } %37, 1
  store i64 %42, ptr %41, align 8
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 5, ptr %10, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %71, %38
  %45 = load i64, ptr %10, align 8, !tbaa !9
  %46 = load i32, ptr %2, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = icmp sle i64 %45, %47
  br i1 %48, label %62, label %49

49:                                               ; preds = %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %78

50:                                               ; preds = %1
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  br label %291

54:                                               ; preds = %29
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br label %290

58:                                               ; preds = %31
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %6, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %290

62:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %63 = load i64, ptr %10, align 8, !tbaa !9
  %64 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %63)
          to label %65 unwind label %74

65:                                               ; preds = %62
  %66 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %67 = extractvalue { ptr, i64 } %64, 0
  store ptr %67, ptr %66, align 8
  %68 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %69 = extractvalue { ptr, i64 } %64, 1
  store i64 %69, ptr %68, align 8
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %71

71:                                               ; preds = %65
  %72 = load i64, ptr %10, align 8, !tbaa !9
  %73 = add nsw i64 %72, 1
  store i64 %73, ptr %10, align 8, !tbaa !9
  br label %44, !llvm.loop !11

74:                                               ; preds = %62
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %290

78:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = invoke noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %79)
          to label %81 unwind label %89

81:                                               ; preds = %78
  %82 = call double @llvm.ceil.f64(double %80)
  %83 = fptosi double %82 to i64
  store i64 %83, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 1, ptr %13, align 8, !tbaa !9
  br label %84

84:                                               ; preds = %204, %81
  %85 = load i64, ptr %13, align 8, !tbaa !9
  %86 = load i64, ptr %12, align 8, !tbaa !9
  %87 = icmp sle i64 %85, %86
  br i1 %87, label %93, label %88

88:                                               ; preds = %84
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %207

89:                                               ; preds = %78
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  br label %289

93:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 1, ptr %15, align 8, !tbaa !9
  br label %94

94:                                               ; preds = %199, %93
  %95 = load i64, ptr %15, align 8, !tbaa !9
  %96 = load i64, ptr %12, align 8, !tbaa !9
  %97 = icmp sle i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %203

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %100 = load i64, ptr %13, align 8, !tbaa !9
  %101 = mul nsw i64 4, %100
  %102 = load i64, ptr %13, align 8, !tbaa !9
  %103 = mul nsw i64 %101, %102
  %104 = load i64, ptr %15, align 8, !tbaa !9
  %105 = load i64, ptr %15, align 8, !tbaa !9
  %106 = mul nsw i64 %104, %105
  %107 = add nsw i64 %103, %106
  store i64 %107, ptr %16, align 8, !tbaa !9
  %108 = load i64, ptr %16, align 8, !tbaa !9
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = icmp sle i64 %108, %110
  br i1 %111, label %112, label %133

112:                                              ; preds = %99
  %113 = load i64, ptr %16, align 8, !tbaa !9
  %114 = srem i64 %113, 12
  %115 = icmp eq i64 %114, 1
  br i1 %115, label %120, label %116

116:                                              ; preds = %112
  %117 = load i64, ptr %16, align 8, !tbaa !9
  %118 = srem i64 %117, 12
  %119 = icmp eq i64 %118, 5
  br i1 %119, label %120, label %133

120:                                              ; preds = %116, %112
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %121 = load i64, ptr %16, align 8, !tbaa !9
  %122 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %121)
          to label %123 unwind label %129

123:                                              ; preds = %120
  %124 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %125 = extractvalue { ptr, i64 } %122, 0
  store ptr %125, ptr %124, align 8
  %126 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %127 = extractvalue { ptr, i64 } %122, 1
  store i64 %127, ptr %126, align 8
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %17, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %133

129:                                              ; preds = %120
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %6, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %202

133:                                              ; preds = %123, %116, %99
  %134 = load i64, ptr %13, align 8, !tbaa !9
  %135 = mul nsw i64 3, %134
  %136 = load i64, ptr %13, align 8, !tbaa !9
  %137 = mul nsw i64 %135, %136
  %138 = load i64, ptr %15, align 8, !tbaa !9
  %139 = load i64, ptr %15, align 8, !tbaa !9
  %140 = mul nsw i64 %138, %139
  %141 = add nsw i64 %137, %140
  store i64 %141, ptr %16, align 8, !tbaa !9
  %142 = load i64, ptr %16, align 8, !tbaa !9
  %143 = load i32, ptr %2, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = icmp sle i64 %142, %144
  br i1 %145, label %146, label %163

146:                                              ; preds = %133
  %147 = load i64, ptr %16, align 8, !tbaa !9
  %148 = srem i64 %147, 12
  %149 = icmp eq i64 %148, 7
  br i1 %149, label %150, label %163

150:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %151 = load i64, ptr %16, align 8, !tbaa !9
  %152 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %151)
          to label %153 unwind label %159

153:                                              ; preds = %150
  %154 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 0
  %155 = extractvalue { ptr, i64 } %152, 0
  store ptr %155, ptr %154, align 8
  %156 = getelementptr inbounds { ptr, i64 }, ptr %18, i32 0, i32 1
  %157 = extractvalue { ptr, i64 } %152, 1
  store i64 %157, ptr %156, align 8
  %158 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %18, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %163

159:                                              ; preds = %150
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %6, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %202

163:                                              ; preds = %153, %146, %133
  %164 = load i64, ptr %13, align 8, !tbaa !9
  %165 = load i64, ptr %15, align 8, !tbaa !9
  %166 = icmp sgt i64 %164, %165
  br i1 %166, label %167, label %198

167:                                              ; preds = %163
  %168 = load i64, ptr %13, align 8, !tbaa !9
  %169 = mul nsw i64 3, %168
  %170 = load i64, ptr %13, align 8, !tbaa !9
  %171 = mul nsw i64 %169, %170
  %172 = load i64, ptr %15, align 8, !tbaa !9
  %173 = load i64, ptr %15, align 8, !tbaa !9
  %174 = mul nsw i64 %172, %173
  %175 = sub nsw i64 %171, %174
  store i64 %175, ptr %16, align 8, !tbaa !9
  %176 = load i64, ptr %16, align 8, !tbaa !9
  %177 = load i32, ptr %2, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = icmp sle i64 %176, %178
  br i1 %179, label %180, label %197

180:                                              ; preds = %167
  %181 = load i64, ptr %16, align 8, !tbaa !9
  %182 = srem i64 %181, 12
  %183 = icmp eq i64 %182, 11
  br i1 %183, label %184, label %197

184:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %185 = load i64, ptr %16, align 8, !tbaa !9
  %186 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %185)
          to label %187 unwind label %193

187:                                              ; preds = %184
  %188 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %189 = extractvalue { ptr, i64 } %186, 0
  store ptr %189, ptr %188, align 8
  %190 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %191 = extractvalue { ptr, i64 } %186, 1
  store i64 %191, ptr %190, align 8
  %192 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %19, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %197

193:                                              ; preds = %184
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %6, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %202

197:                                              ; preds = %187, %180, %167
  br label %198

198:                                              ; preds = %197, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %199

199:                                              ; preds = %198
  %200 = load i64, ptr %15, align 8, !tbaa !9
  %201 = add nsw i64 %200, 1
  store i64 %201, ptr %15, align 8, !tbaa !9
  br label %94, !llvm.loop !13

202:                                              ; preds = %193, %159, %129
  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 %13) #5
  br label %289

203:                                              ; preds = %98
  br label %204

204:                                              ; preds = %203
  %205 = load i64, ptr %13, align 8, !tbaa !9
  %206 = add nsw i64 %205, 1
  store i64 %206, ptr %13, align 8, !tbaa !9
  br label %84, !llvm.loop !14

207:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 5, ptr %20, align 8, !tbaa !9
  br label %208

208:                                              ; preds = %255, %207
  %209 = load i64, ptr %20, align 8, !tbaa !9
  %210 = load i64, ptr %12, align 8, !tbaa !9
  %211 = icmp sle i64 %209, %210
  br i1 %211, label %213, label %212

212:                                              ; preds = %208
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %259

213:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %214 = load i64, ptr %20, align 8, !tbaa !9
  %215 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %214)
          to label %216 unwind label %232

216:                                              ; preds = %213
  %217 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %218 = extractvalue { ptr, i64 } %215, 0
  store ptr %218, ptr %217, align 8
  %219 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %220 = extractvalue { ptr, i64 } %215, 1
  store i64 %220, ptr %219, align 8
  %221 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br i1 %221, label %222, label %254

222:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %223 = load i64, ptr %20, align 8, !tbaa !9
  %224 = load i64, ptr %20, align 8, !tbaa !9
  %225 = mul nsw i64 %223, %224
  store i64 %225, ptr %22, align 8, !tbaa !9
  br label %226

226:                                              ; preds = %245, %222
  %227 = load i64, ptr %22, align 8, !tbaa !9
  %228 = load i32, ptr %2, align 4, !tbaa !5
  %229 = sext i32 %228 to i64
  %230 = icmp sle i64 %227, %229
  br i1 %230, label %236, label %231

231:                                              ; preds = %226
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %253

232:                                              ; preds = %213
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %6, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %258

236:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %237 = load i64, ptr %22, align 8, !tbaa !9
  %238 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %237)
          to label %239 unwind label %249

239:                                              ; preds = %236
  %240 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 0
  %241 = extractvalue { ptr, i64 } %238, 0
  store ptr %241, ptr %240, align 8
  %242 = getelementptr inbounds { ptr, i64 }, ptr %23, i32 0, i32 1
  %243 = extractvalue { ptr, i64 } %238, 1
  store i64 %243, ptr %242, align 8
  %244 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %23, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %245

245:                                              ; preds = %239
  %246 = load i64, ptr %20, align 8, !tbaa !9
  %247 = load i64, ptr %22, align 8, !tbaa !9
  %248 = add nsw i64 %247, %246
  store i64 %248, ptr %22, align 8, !tbaa !9
  br label %226, !llvm.loop !15

249:                                              ; preds = %236
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %6, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %258

253:                                              ; preds = %231
  br label %254

254:                                              ; preds = %253, %216
  br label %255

255:                                              ; preds = %254
  %256 = load i64, ptr %20, align 8, !tbaa !9
  %257 = add nsw i64 %256, 1
  store i64 %257, ptr %20, align 8, !tbaa !9
  br label %208, !llvm.loop !16

258:                                              ; preds = %249, %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %289

259:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  store i64 2, ptr %24, align 8, !tbaa !9
  br label %260

260:                                              ; preds = %284, %259
  %261 = load i64, ptr %24, align 8, !tbaa !9
  %262 = load i32, ptr %2, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = icmp sle i64 %261, %263
  br i1 %264, label %266, label %265

265:                                              ; preds = %260
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %287

266:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #5
  %267 = load i64, ptr %24, align 8, !tbaa !9
  %268 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %4, i64 noundef %267)
          to label %269 unwind label %279

269:                                              ; preds = %266
  %270 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %271 = extractvalue { ptr, i64 } %268, 0
  store ptr %271, ptr %270, align 8
  %272 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %273 = extractvalue { ptr, i64 } %268, 1
  store i64 %273, ptr %272, align 8
  %274 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  br i1 %274, label %275, label %283

275:                                              ; preds = %269
  %276 = load i64, ptr %24, align 8, !tbaa !9
  %277 = load i64, ptr %3, align 8, !tbaa !9
  %278 = add nsw i64 %277, %276
  store i64 %278, ptr %3, align 8, !tbaa !9
  br label %283

279:                                              ; preds = %266
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %6, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %289

283:                                              ; preds = %275, %269
  br label %284

284:                                              ; preds = %283
  %285 = load i64, ptr %24, align 8, !tbaa !9
  %286 = add nsw i64 %285, 1
  store i64 %286, ptr %24, align 8, !tbaa !9
  br label %260, !llvm.loop !17

287:                                              ; preds = %265
  %288 = load i64, ptr %3, align 8, !tbaa !9
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret i64 %288

289:                                              ; preds = %279, %258, %202, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %290

290:                                              ; preds = %289, %74, %58, %54
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  br label %291

291:                                              ; preds = %290, %50
  call void @llvm.lifetime.end.p0(i64 40, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %292

292:                                              ; preds = %291
  %293 = load ptr, ptr %6, align 8
  %294 = load i32, ptr %7, align 4
  %295 = insertvalue { ptr, i32 } poison, ptr %293, 0
  %296 = insertvalue { ptr, i32 } %295, i32 %294, 1
  resume { ptr, i32 } %296
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.0" = type { i8 }
%"struct.std::_Bit_reference" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_Z12sieve_atkinsi(i32 noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"struct.std::_Bit_reference", align 8
  %5 = alloca %"struct.std::_Bit_reference", align 8
  %6 = alloca %"struct.std::_Bit_reference", align 8
  %7 = alloca %"struct.std::_Bit_reference", align 8
  %8 = alloca %"struct.std::_Bit_reference", align 8
  %9 = alloca %"struct.std::_Bit_reference", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca %"struct.std::_Bit_reference", align 8
  %12 = alloca %"struct.std::_Bit_reference", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #5
  %13 = add nsw i32 %0, 1
  %14 = sext i32 %13 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %14, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %15 unwind label %36

15:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %16 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 2)
          to label %17 unwind label %38

17:                                               ; preds = %15
  %18 = extractvalue { ptr, i64 } %16, 0
  store ptr %18, ptr %4, align 8
  %19 = getelementptr inbounds i8, ptr %4, i64 8
  %20 = extractvalue { ptr, i64 } %16, 1
  store i64 %20, ptr %19, align 8
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %4, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %22 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef 3)
          to label %23 unwind label %40

23:                                               ; preds = %17
  %24 = extractvalue { ptr, i64 } %22, 0
  store ptr %24, ptr %5, align 8
  %25 = getelementptr inbounds i8, ptr %5, i64 8
  %26 = extractvalue { ptr, i64 } %22, 1
  store i64 %26, ptr %25, align 8
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %5, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  %28 = sext i32 %0 to i64
  %.not100 = icmp slt i32 %0, 5
  br i1 %.not100, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %23
  %29 = getelementptr inbounds i8, ptr %6, i64 8
  br label %42

._crit_edge:                                      ; preds = %44, %23
  %30 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %0)
  %31 = call double @llvm.ceil.f64(double %30)
  %32 = fptosi double %31 to i64
  %.not78108 = icmp slt i64 %32, 1
  br i1 %.not78108, label %.preheader, label %.preheader97.lr.ph

.preheader97.lr.ph:                               ; preds = %._crit_edge
  %33 = getelementptr inbounds i8, ptr %7, i64 8
  %34 = getelementptr inbounds i8, ptr %8, i64 8
  %35 = getelementptr inbounds i8, ptr %9, i64 8
  br label %.preheader97

36:                                               ; preds = %1
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %125

38:                                               ; preds = %15
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %124

40:                                               ; preds = %17
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %124

42:                                               ; preds = %.lr.ph, %44
  %.063101 = phi i64 [ 5, %.lr.ph ], [ %48, %44 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %43 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.063101)
          to label %44 unwind label %49

44:                                               ; preds = %42
  %45 = extractvalue { ptr, i64 } %43, 0
  store ptr %45, ptr %6, align 8
  %46 = extractvalue { ptr, i64 } %43, 1
  store i64 %46, ptr %29, align 8
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %6, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  %48 = add nuw nsw i64 %.063101, 1
  %exitcond.not = icmp eq i64 %.063101, %28
  br i1 %exitcond.not, label %._crit_edge, label %42, !llvm.loop !5

49:                                               ; preds = %42
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %124

.preheader97:                                     ; preds = %.preheader97.lr.ph, %._crit_edge107
  %.061109 = phi i64 [ 1, %.preheader97.lr.ph ], [ %53, %._crit_edge107 ]
  %factor.op.mul = mul i64 %.061109, %.061109
  %.reass = shl i64 %factor.op.mul, 2
  %.reass103 = mul i64 %factor.op.mul, 3
  br label %54

.preheader96:                                     ; preds = %._crit_edge107
  %.not79114 = icmp slt i64 %32, 5
  br i1 %.not79114, label %.preheader, label %.lr.ph117

.lr.ph117:                                        ; preds = %.preheader96
  %51 = getelementptr inbounds i8, ptr %10, i64 8
  %52 = getelementptr inbounds i8, ptr %11, i64 8
  br label %96

._crit_edge107:                                   ; preds = %93
  %53 = add nuw i64 %.061109, 1
  %exitcond127.not = icmp eq i64 %.061109, %32
  br i1 %exitcond127.not, label %.preheader96, label %.preheader97, !llvm.loop !7

54:                                               ; preds = %.preheader97, %93
  %.060105 = phi i64 [ 1, %.preheader97 ], [ %94, %93 ]
  %55 = mul nuw nsw i64 %.060105, %.060105
  %56 = add nuw nsw i64 %55, %.reass
  %.not84 = icmp sgt i64 %56, %28
  br i1 %.not84, label %67, label %57

57:                                               ; preds = %54
  %58 = urem i64 %56, 12
  switch i64 %58, label %67 [
    i64 1, label %59
    i64 5, label %59
  ]

59:                                               ; preds = %57, %57
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %60 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %56)
          to label %61 unwind label %65

61:                                               ; preds = %59
  %62 = extractvalue { ptr, i64 } %60, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i64 } %60, 1
  store i64 %63, ptr %33, align 8
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %7, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %67

65:                                               ; preds = %59
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %124

67:                                               ; preds = %57, %61, %54
  %68 = add nuw nsw i64 %55, %.reass103
  %.not85 = icmp sle i64 %68, %28
  %69 = urem i64 %68, 12
  %70 = icmp eq i64 %69, 7
  %or.cond = and i1 %.not85, %70
  br i1 %or.cond, label %71, label %79

71:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %72 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %68)
          to label %73 unwind label %77

73:                                               ; preds = %71
  %74 = extractvalue { ptr, i64 } %72, 0
  store ptr %74, ptr %8, align 8
  %75 = extractvalue { ptr, i64 } %72, 1
  store i64 %75, ptr %34, align 8
  %76 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %8, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %79

77:                                               ; preds = %71
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %124

79:                                               ; preds = %73, %67
  %80 = icmp ugt i64 %.061109, %.060105
  br i1 %80, label %81, label %93

81:                                               ; preds = %79
  %82 = sub nsw i64 %.reass103, %55
  %.not86 = icmp sle i64 %82, %28
  %83 = srem i64 %82, 12
  %84 = icmp eq i64 %83, 11
  %or.cond95 = and i1 %.not86, %84
  br i1 %or.cond95, label %85, label %93

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %86 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %82)
          to label %87 unwind label %91

87:                                               ; preds = %85
  %88 = extractvalue { ptr, i64 } %86, 0
  store ptr %88, ptr %9, align 8
  %89 = extractvalue { ptr, i64 } %86, 1
  store i64 %89, ptr %35, align 8
  %90 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %9, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %93

91:                                               ; preds = %85
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %124

93:                                               ; preds = %81, %87, %79
  %94 = add nuw i64 %.060105, 1
  %exitcond126.not = icmp eq i64 %.060105, %32
  br i1 %exitcond126.not, label %._crit_edge107, label %54, !llvm.loop !8

.preheader:                                       ; preds = %.loopexit, %._crit_edge, %.preheader96
  %.not80118 = icmp slt i32 %0, 2
  br i1 %.not80118, label %._crit_edge122, label %.lr.ph121

.lr.ph121:                                        ; preds = %.preheader
  %95 = getelementptr inbounds i8, ptr %12, i64 8
  br label %114

96:                                               ; preds = %.lr.ph117, %.loopexit
  %.059115 = phi i64 [ 5, %.lr.ph117 ], [ %113, %.loopexit ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %97 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.059115)
          to label %98 unwind label %103

98:                                               ; preds = %96
  %99 = extractvalue { ptr, i64 } %97, 0
  store ptr %99, ptr %10, align 8
  %100 = extractvalue { ptr, i64 } %97, 1
  store i64 %100, ptr %51, align 8
  %101 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  %102 = mul nuw nsw i64 %.059115, %.059115
  %.not81110 = icmp sle i64 %102, %28
  %or.cond125.not = select i1 %101, i1 %.not81110, i1 false
  br i1 %or.cond125.not, label %.lr.ph113, label %.loopexit

103:                                              ; preds = %96
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  br label %124

.lr.ph113:                                        ; preds = %98, %106
  %.058111 = phi i64 [ %110, %106 ], [ %102, %98 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %105 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.058111)
          to label %106 unwind label %111

106:                                              ; preds = %.lr.ph113
  %107 = extractvalue { ptr, i64 } %105, 0
  store ptr %107, ptr %11, align 8
  %108 = extractvalue { ptr, i64 } %105, 1
  store i64 %108, ptr %52, align 8
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %11, i1 noundef zeroext false) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  %110 = add nuw nsw i64 %.058111, %.059115
  %.not81 = icmp sgt i64 %110, %28
  br i1 %.not81, label %.loopexit, label %.lr.ph113, !llvm.loop !9

111:                                              ; preds = %.lr.ph113
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %124

.loopexit:                                        ; preds = %106, %98
  %113 = add nuw i64 %.059115, 1
  %exitcond128.not = icmp eq i64 %.059115, %32
  br i1 %exitcond128.not, label %.preheader, label %96, !llvm.loop !10

._crit_edge122:                                   ; preds = %116, %.preheader
  %.062.lcssa = phi i64 [ 0, %.preheader ], [ %spec.select, %116 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #5
  ret i64 %.062.lcssa

114:                                              ; preds = %.lr.ph121, %116
  %.0120 = phi i64 [ 2, %.lr.ph121 ], [ %121, %116 ]
  %.062119 = phi i64 [ 0, %.lr.ph121 ], [ %spec.select, %116 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  %115 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %.0120)
          to label %116 unwind label %122

116:                                              ; preds = %114
  %117 = extractvalue { ptr, i64 } %115, 0
  store ptr %117, ptr %12, align 8
  %118 = extractvalue { ptr, i64 } %115, 1
  store i64 %118, ptr %95, align 8
  %119 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  %120 = select i1 %119, i64 %.0120, i64 0
  %spec.select = add nuw nsw i64 %120, %.062119
  %121 = add nuw nsw i64 %.0120, 1
  %exitcond129.not = icmp eq i64 %.0120, %28
  br i1 %exitcond129.not, label %._crit_edge122, label %114, !llvm.loop !11

122:                                              ; preds = %114
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  br label %124

124:                                              ; preds = %122, %91, %77, %65, %111, %103, %49, %40, %38
  %.pn90 = phi { ptr, i32 } [ %50, %49 ], [ %41, %40 ], [ %39, %38 ], [ %123, %122 ], [ %92, %91 ], [ %78, %77 ], [ %66, %65 ], [ %112, %111 ], [ %104, %103 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #5
  br label %125

125:                                              ; preds = %124, %36
  %.pn90.pn = phi { ptr, i32 } [ %.pn90, %124 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn90.pn
}

; 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 nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; 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 uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}
!11 = distinct !{!11, !6}


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