; LLVM IR from tangjz/acm-icpc :: codeforces/1190F.ll (Z4initv)

; 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::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i64, align 8
@sp = external dso_local global i64, align 8
@pr = external dso_local global i64, align 8
@ex = external dso_local global i64, align 8
@phi = external dso_local global i64, align 8
@ord = external dso_local global i64, align 8
@gen = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._Z4initv = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4initv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca i8, align 1
  %21 = alloca ptr, align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %24 = alloca %"struct.std::pair", align 8
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @sp)
  store i64 59, ptr @ex, align 8, !tbaa !5
  br label %26

26:                                               ; preds = %88, %0
  %27 = load i64, ptr @ex, align 8, !tbaa !5
  %28 = icmp sge i64 %27, 1
  br i1 %28, label %29, label %91

29:                                               ; preds = %26
  %30 = load i64, ptr @m, align 8, !tbaa !5
  %31 = load i64, ptr @ex, align 8, !tbaa !5
  %32 = shl i64 1, %31
  %33 = icmp slt i64 %30, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  br label %88

35:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #8
  store i64 2, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #8
  %36 = load i64, ptr %1, align 8, !tbaa !5
  %37 = shl i64 %36, 1
  store i64 %37, ptr %2, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %47, %35
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %40 = load i64, ptr @ex, align 8, !tbaa !5
  %41 = trunc i64 %40 to i32
  %42 = load i64, ptr @m, align 8, !tbaa !5
  %43 = call noundef i64 @_Z7int_powxix(i64 noundef %39, i32 noundef %41, i64 noundef %42)
  %44 = load i64, ptr @m, align 8, !tbaa !5
  %45 = icmp sle i64 %43, %44
  br i1 %45, label %46, label %50

46:                                               ; preds = %38
  br label %47

47:                                               ; preds = %46
  %48 = load i64, ptr %2, align 8, !tbaa !5
  %49 = shl i64 %48, 1
  store i64 %49, ptr %2, align 8, !tbaa !5
  br label %38, !llvm.loop !9

50:                                               ; preds = %38
  br label %51

51:                                               ; preds = %73, %50
  %52 = load i64, ptr %1, align 8, !tbaa !5
  %53 = load i64, ptr %2, align 8, !tbaa !5
  %54 = icmp slt i64 %52, %53
  br i1 %54, label %55, label %74

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %56 = load i64, ptr %1, align 8, !tbaa !5
  %57 = load i64, ptr %2, align 8, !tbaa !5
  %58 = add nsw i64 %56, %57
  %59 = add nsw i64 %58, 1
  %60 = ashr i64 %59, 1
  store i64 %60, ptr %3, align 8, !tbaa !5
  %61 = load i64, ptr %3, align 8, !tbaa !5
  %62 = load i64, ptr @ex, align 8, !tbaa !5
  %63 = trunc i64 %62 to i32
  %64 = load i64, ptr @m, align 8, !tbaa !5
  %65 = call noundef i64 @_Z7int_powxix(i64 noundef %61, i32 noundef %63, i64 noundef %64)
  %66 = load i64, ptr @m, align 8, !tbaa !5
  %67 = icmp sle i64 %65, %66
  br i1 %67, label %68, label %70

68:                                               ; preds = %55
  %69 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %69, ptr %1, align 8, !tbaa !5
  br label %73

70:                                               ; preds = %55
  %71 = load i64, ptr %3, align 8, !tbaa !5
  %72 = sub nsw i64 %71, 1
  store i64 %72, ptr %2, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %70, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %51, !llvm.loop !11

74:                                               ; preds = %51
  %75 = load i64, ptr %1, align 8, !tbaa !5
  %76 = load i64, ptr @ex, align 8, !tbaa !5
  %77 = trunc i64 %76 to i32
  %78 = load i64, ptr @m, align 8, !tbaa !5
  %79 = call noundef i64 @_Z7int_powxix(i64 noundef %75, i32 noundef %77, i64 noundef %78)
  %80 = load i64, ptr @m, align 8, !tbaa !5
  %81 = icmp eq i64 %79, %80
  br i1 %81, label %82, label %84

82:                                               ; preds = %74
  %83 = load i64, ptr %1, align 8, !tbaa !5
  store i64 %83, ptr @pr, align 8, !tbaa !5
  store i32 2, ptr %4, align 4
  br label %85

84:                                               ; preds = %74
  store i32 0, ptr %4, align 4
  br label %85

85:                                               ; preds = %84, %82
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #8
  %86 = load i32, ptr %4, align 4
  switch i32 %86, label %333 [
    i32 0, label %87
    i32 2, label %91
  ]

87:                                               ; preds = %85
  br label %88

88:                                               ; preds = %87, %34
  %89 = load i64, ptr @ex, align 8, !tbaa !5
  %90 = add nsw i64 %89, -1
  store i64 %90, ptr @ex, align 8, !tbaa !5
  br label %26, !llvm.loop !12

91:                                               ; preds = %85, %26
  %92 = load i64, ptr @ex, align 8, !tbaa !5
  %93 = icmp sge i64 %92, 1
  br i1 %93, label %94, label %97

94:                                               ; preds = %91
  %95 = load i64, ptr @pr, align 8, !tbaa !5
  %96 = call noundef zeroext i1 @_Z12miller_rabinx(i64 noundef %95)
  br label %97

97:                                               ; preds = %94, %91
  %98 = phi i1 [ false, %91 ], [ %96, %94 ]
  br i1 %98, label %99, label %100

99:                                               ; preds = %97
  br label %102

100:                                              ; preds = %97
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 149, ptr noundef @__PRETTY_FUNCTION__._Z4initv) #9
  unreachable

101:                                              ; No predecessors!
  br label %102

102:                                              ; preds = %101, %99
  %103 = load i64, ptr @m, align 8, !tbaa !5
  %104 = load i64, ptr @m, align 8, !tbaa !5
  %105 = load i64, ptr @pr, align 8, !tbaa !5
  %106 = sdiv i64 %104, %105
  %107 = sub nsw i64 %103, %106
  store i64 %107, ptr @phi, align 8, !tbaa !5
  %108 = load i64, ptr @sp, align 8, !tbaa !5
  %109 = load i64, ptr @pr, align 8, !tbaa !5
  %110 = srem i64 %108, %109
  %111 = icmp eq i64 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %102
  store i64 -1, ptr @gen, align 8, !tbaa !5
  store i64 -1, ptr @ord, align 8, !tbaa !5
  br label %326

113:                                              ; preds = %102
  %114 = load i64, ptr @phi, align 8, !tbaa !5
  store i64 %114, ptr @ord, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #8
  %115 = load i64, ptr @pr, align 8, !tbaa !5
  %116 = sub nsw i64 %115, 1
  call void @_Z9factorizex(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %5, i64 noundef %116)
  %117 = load i64, ptr @ex, align 8, !tbaa !5
  %118 = icmp sgt i64 %117, 1
  br i1 %118, label %119, label %133

119:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %120 = load i64, ptr @ex, align 8, !tbaa !5
  %121 = sub nsw i64 %120, 1
  store i64 %121, ptr %7, align 8, !tbaa !5
  %122 = invoke { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) @pr, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %123 unwind label %129

123:                                              ; preds = %119
  %124 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %125 = extractvalue { i64, i64 } %122, 0
  store i64 %125, ptr %124, align 8
  %126 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %127 = extractvalue { i64, i64 } %122, 1
  store i64 %127, ptr %126, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %128 unwind label %129

128:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #8
  br label %133

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

133:                                              ; preds = %128, %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  store ptr %5, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %134 = load ptr, ptr %10, align 8, !tbaa !13
  %135 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %134) #8
  %136 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %135, ptr %136, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %137 = load ptr, ptr %10, align 8, !tbaa !13
  %138 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %137) #8
  %139 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %138, ptr %139, align 8
  br label %140

140:                                              ; preds = %175, %133
  %141 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #8
  br i1 %141, label %143, label %142

142:                                              ; preds = %140
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %177

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %144 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %144, i64 16, i1 false)
  br label %145

145:                                              ; preds = %162, %143
  %146 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %147 = load i64, ptr %146, align 8, !tbaa !15
  %148 = icmp sgt i64 %147, 0
  br i1 %148, label %149, label %159

149:                                              ; preds = %145
  %150 = load i64, ptr @sp, align 8, !tbaa !5
  %151 = load i64, ptr @ord, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %153 = load i64, ptr %152, align 8, !tbaa !17
  %154 = sdiv i64 %151, %153
  %155 = load i64, ptr @m, align 8, !tbaa !5
  %156 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %150, i64 noundef %154, i64 noundef %155)
          to label %157 unwind label %170

157:                                              ; preds = %149
  %158 = icmp eq i64 %156, 1
  br label %159

159:                                              ; preds = %157, %145
  %160 = phi i1 [ false, %145 ], [ %158, %157 ]
  br i1 %160, label %161, label %174

161:                                              ; preds = %159
  br label %162

162:                                              ; preds = %161
  %163 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 1
  %164 = load i64, ptr %163, align 8, !tbaa !15
  %165 = add nsw i64 %164, -1
  store i64 %165, ptr %163, align 8, !tbaa !15
  %166 = getelementptr inbounds %"struct.std::pair", ptr %13, i32 0, i32 0
  %167 = load i64, ptr %166, align 8, !tbaa !17
  %168 = load i64, ptr @ord, align 8, !tbaa !5
  %169 = sdiv i64 %168, %167
  store i64 %169, ptr @ord, align 8, !tbaa !5
  br label %145, !llvm.loop !18

170:                                              ; preds = %149
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %8, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %327

174:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  br label %175

175:                                              ; preds = %174
  %176 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br label %140

177:                                              ; preds = %142
  %178 = load i64, ptr @pr, align 8, !tbaa !5
  %179 = icmp eq i64 %178, 2
  br i1 %179, label %180, label %262

180:                                              ; preds = %177
  %181 = load i64, ptr @m, align 8, !tbaa !5
  %182 = icmp sge i64 %181, 8
  br i1 %182, label %183, label %262

183:                                              ; preds = %180
  %184 = load i64, ptr @sp, align 8, !tbaa !5
  %185 = and i64 %184, 3
  %186 = icmp ne i64 %185, 3
  br i1 %186, label %192, label %187

187:                                              ; preds = %183
  %188 = load i64, ptr @ord, align 8, !tbaa !5
  %189 = and i64 %188, 1
  %190 = icmp ne i64 %189, 0
  %191 = xor i1 %190, true
  br label %192

192:                                              ; preds = %187, %183
  %193 = phi i1 [ true, %183 ], [ %191, %187 ]
  br i1 %193, label %194, label %195

194:                                              ; preds = %192
  br label %197

195:                                              ; preds = %192
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 162, ptr noundef @__PRETTY_FUNCTION__._Z4initv) #9
  unreachable

196:                                              ; No predecessors!
  br label %197

197:                                              ; preds = %196, %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %198 = load i64, ptr @phi, align 8, !tbaa !5
  %199 = sdiv i64 %198, 2
  store i64 %199, ptr %14, align 8, !tbaa !5
  store i64 1, ptr @gen, align 8, !tbaa !5
  br label %200

200:                                              ; preds = %257, %197
  %201 = load i64, ptr @gen, align 8, !tbaa !5
  %202 = load i64, ptr @m, align 8, !tbaa !5
  %203 = icmp slt i64 %201, %202
  br i1 %203, label %204, label %261

204:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  %205 = load i64, ptr @gen, align 8, !tbaa !5
  %206 = load i64, ptr %14, align 8, !tbaa !5
  %207 = load i64, ptr @m, align 8, !tbaa !5
  %208 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %205, i64 noundef %206, i64 noundef %207)
          to label %209 unwind label %221

209:                                              ; preds = %204
  %210 = icmp eq i64 %208, 1
  %211 = zext i1 %210 to i8
  store i8 %211, ptr %15, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store ptr %5, ptr %16, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %212 = load ptr, ptr %16, align 8, !tbaa !13
  %213 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %212) #8
  %214 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %213, ptr %214, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %215 = load ptr, ptr %16, align 8, !tbaa !13
  %216 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %215) #8
  %217 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %216, ptr %217, align 8
  br label %218

218:                                              ; preds = %243, %209
  %219 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %219, label %225, label %220

220:                                              ; preds = %218
  store i32 18, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %249

221:                                              ; preds = %204
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %8, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %9, align 4
  br label %260

225:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  %226 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %226, i64 16, i1 false)
  %227 = load i64, ptr @gen, align 8, !tbaa !5
  %228 = load i64, ptr %14, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.std::pair", ptr %19, i32 0, i32 0
  %230 = load i64, ptr %229, align 8, !tbaa !17
  %231 = sdiv i64 %228, %230
  %232 = load i64, ptr @m, align 8, !tbaa !5
  %233 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %227, i64 noundef %231, i64 noundef %232)
          to label %234 unwind label %245

234:                                              ; preds = %225
  %235 = icmp ne i64 %233, 1
  %236 = zext i1 %235 to i32
  %237 = load i8, ptr %15, align 1, !tbaa !19, !range !21, !noundef !22
  %238 = trunc i8 %237 to i1
  %239 = zext i1 %238 to i32
  %240 = and i32 %239, %236
  %241 = icmp ne i32 %240, 0
  %242 = zext i1 %241 to i8
  store i8 %242, ptr %15, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  br label %243

243:                                              ; preds = %234
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br label %218

245:                                              ; preds = %225
  %246 = landingpad { ptr, i32 }
          cleanup
  %247 = extractvalue { ptr, i32 } %246, 0
  store ptr %247, ptr %8, align 8
  %248 = extractvalue { ptr, i32 } %246, 1
  store i32 %248, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %260

249:                                              ; preds = %220
  %250 = load i8, ptr %15, align 1, !tbaa !19, !range !21, !noundef !22
  %251 = trunc i8 %250 to i1
  br i1 %251, label %252, label %253

252:                                              ; preds = %249
  store i32 15, ptr %4, align 4
  br label %254

253:                                              ; preds = %249
  store i32 0, ptr %4, align 4
  br label %254

254:                                              ; preds = %253, %252
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  %255 = load i32, ptr %4, align 4
  switch i32 %255, label %333 [
    i32 0, label %256
    i32 15, label %261
  ]

256:                                              ; preds = %254
  br label %257

257:                                              ; preds = %256
  %258 = load i64, ptr @gen, align 8, !tbaa !5
  %259 = add nsw i64 %258, 4
  store i64 %259, ptr @gen, align 8, !tbaa !5
  br label %200, !llvm.loop !23

260:                                              ; preds = %245, %221
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %327

261:                                              ; preds = %254, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %325

262:                                              ; preds = %180, %177
  store i64 0, ptr @gen, align 8, !tbaa !5
  br label %263

263:                                              ; preds = %320, %262
  %264 = load i64, ptr @gen, align 8, !tbaa !5
  %265 = load i64, ptr @m, align 8, !tbaa !5
  %266 = icmp slt i64 %264, %265
  br i1 %266, label %267, label %324

267:                                              ; preds = %263
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #8
  %268 = load i64, ptr @gen, align 8, !tbaa !5
  %269 = load i64, ptr @phi, align 8, !tbaa !5
  %270 = load i64, ptr @m, align 8, !tbaa !5
  %271 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %268, i64 noundef %269, i64 noundef %270)
          to label %272 unwind label %284

272:                                              ; preds = %267
  %273 = icmp eq i64 %271, 1
  %274 = zext i1 %273 to i8
  store i8 %274, ptr %20, align 1, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store ptr %5, ptr %21, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %275 = load ptr, ptr %21, align 8, !tbaa !13
  %276 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %275) #8
  %277 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %276, ptr %277, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %278 = load ptr, ptr %21, align 8, !tbaa !13
  %279 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %278) #8
  %280 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %279, ptr %280, align 8
  br label %281

281:                                              ; preds = %306, %272
  %282 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #8
  br i1 %282, label %288, label %283

283:                                              ; preds = %281
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %312

284:                                              ; preds = %267
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %8, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %9, align 4
  br label %323

288:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  %289 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %289, i64 16, i1 false)
  %290 = load i64, ptr @gen, align 8, !tbaa !5
  %291 = load i64, ptr @phi, align 8, !tbaa !5
  %292 = getelementptr inbounds %"struct.std::pair", ptr %24, i32 0, i32 0
  %293 = load i64, ptr %292, align 8, !tbaa !17
  %294 = sdiv i64 %291, %293
  %295 = load i64, ptr @m, align 8, !tbaa !5
  %296 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %290, i64 noundef %294, i64 noundef %295)
          to label %297 unwind label %308

297:                                              ; preds = %288
  %298 = icmp ne i64 %296, 1
  %299 = zext i1 %298 to i32
  %300 = load i8, ptr %20, align 1, !tbaa !19, !range !21, !noundef !22
  %301 = trunc i8 %300 to i1
  %302 = zext i1 %301 to i32
  %303 = and i32 %302, %299
  %304 = icmp ne i32 %303, 0
  %305 = zext i1 %304 to i8
  store i8 %305, ptr %20, align 1, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br label %306

306:                                              ; preds = %297
  %307 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %22) #8
  br label %281

308:                                              ; preds = %288
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %8, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %323

312:                                              ; preds = %283
  %313 = load i8, ptr %20, align 1, !tbaa !19, !range !21, !noundef !22
  %314 = trunc i8 %313 to i1
  br i1 %314, label %315, label %316

315:                                              ; preds = %312
  store i32 20, ptr %4, align 4
  br label %317

316:                                              ; preds = %312
  store i32 0, ptr %4, align 4
  br label %317

317:                                              ; preds = %316, %315
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  %318 = load i32, ptr %4, align 4
  switch i32 %318, label %333 [
    i32 0, label %319
    i32 20, label %324
  ]

319:                                              ; preds = %317
  br label %320

320:                                              ; preds = %319
  %321 = load i64, ptr @gen, align 8, !tbaa !5
  %322 = add nsw i64 %321, 1
  store i64 %322, ptr @gen, align 8, !tbaa !5
  br label %263, !llvm.loop !24

323:                                              ; preds = %308, %284
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #8
  br label %327

324:                                              ; preds = %317, %263
  br label %325

325:                                              ; preds = %324, %261
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  br label %326

326:                                              ; preds = %325, %112
  ret void

327:                                              ; preds = %323, %260, %170, %129
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  br label %328

328:                                              ; preds = %327
  %329 = load ptr, ptr %8, align 8
  %330 = load i32, ptr %9, align 4
  %331 = insertvalue { ptr, i32 } poison, ptr %329, 0
  %332 = insertvalue { ptr, i32 } %331, i32 %330, 1
  resume { ptr, i32 } %332

333:                                              ; preds = %317, %254, %85
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z7int_powxix(i64 noundef, i32 noundef, i64 noundef) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12miller_rabinx(i64 noundef) #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9factorizex(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_Z7mod_powxxx(i64 noundef, i64 noundef, i64 noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTSSt4pairIxxE", !6, i64 0, !6, i64 8}
!17 = !{!16, !6, i64 0}
!18 = distinct !{!18, !10}
!19 = !{!20, !20, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}


; 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::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<long long, long long>, std::allocator<std::pair<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i64, align 8
@sp = external dso_local global i64, align 8
@pr = external dso_local global i64, align 8
@ex = external dso_local local_unnamed_addr global i64, align 8
@phi = external dso_local local_unnamed_addr global i64, align 8
@ord = external dso_local local_unnamed_addr global i64, align 8
@gen = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [70 x i8], align 1
@__PRETTY_FUNCTION__._Z4initv = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4initv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @sp)
  store i64 59, ptr @ex, align 8, !tbaa !5
  %.pre = load i64, ptr @m, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %0, %.thread
  %12 = phi i64 [ %.pre, %0 ], [ %40, %.thread ]
  %storemerge74 = phi i64 [ 59, %0 ], [ %41, %.thread ]
  %13 = shl nuw i64 1, %storemerge74
  %14 = icmp slt i64 %12, %13
  br i1 %14, label %.thread, label %.preheader69

.preheader69:                                     ; preds = %11, %.preheader69
  %15 = phi i64 [ %19, %.preheader69 ], [ %12, %11 ]
  %.036 = phi i64 [ %20, %.preheader69 ], [ 4, %11 ]
  %16 = load i64, ptr @ex, align 8, !tbaa !5
  %17 = trunc i64 %16 to i32
  %18 = tail call noundef i64 @_Z7int_powxix(i64 noundef %.036, i32 noundef %17, i64 noundef %15)
  %19 = load i64, ptr @m, align 8, !tbaa !5
  %.not = icmp sgt i64 %18, %19
  %20 = shl i64 %.036, 1
  br i1 %.not, label %.preheader68, label %.preheader69, !llvm.loop !9

.preheader68:                                     ; preds = %.preheader69
  %21 = icmp sgt i64 %.036, 2
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader68, %.lr.ph
  %22 = phi i64 [ %29, %.lr.ph ], [ %19, %.preheader68 ]
  %.073 = phi i64 [ %.1, %.lr.ph ], [ 2, %.preheader68 ]
  %.13772 = phi i64 [ %.2, %.lr.ph ], [ %.036, %.preheader68 ]
  %23 = add i64 %.13772, 1
  %24 = add i64 %23, %.073
  %25 = ashr i64 %24, 1
  %26 = load i64, ptr @ex, align 8, !tbaa !5
  %27 = trunc i64 %26 to i32
  %28 = tail call noundef i64 @_Z7int_powxix(i64 noundef %25, i32 noundef %27, i64 noundef %22)
  %29 = load i64, ptr @m, align 8, !tbaa !5
  %.not62 = icmp sgt i64 %28, %29
  %30 = add nsw i64 %25, -1
  %.2 = select i1 %.not62, i64 %30, i64 %.13772
  %.1 = select i1 %.not62, i64 %.073, i64 %25
  %31 = icmp slt i64 %.1, %.2
  br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %.preheader68
  %32 = phi i64 [ %19, %.preheader68 ], [ %29, %.lr.ph ]
  %33 = phi i64 [ 2, %.preheader68 ], [ %.1, %.lr.ph ]
  %34 = load i64, ptr @ex, align 8, !tbaa !5
  %35 = trunc i64 %34 to i32
  %36 = tail call noundef i64 @_Z7int_powxix(i64 noundef %33, i32 noundef %35, i64 noundef %32)
  %37 = load i64, ptr @m, align 8, !tbaa !5
  %38 = icmp eq i64 %36, %37
  %.pre102 = load i64, ptr @ex, align 8, !tbaa !5
  br i1 %38, label %43, label %.thread

.thread:                                          ; preds = %._crit_edge, %11
  %39 = phi i64 [ %.pre102, %._crit_edge ], [ %storemerge74, %11 ]
  %40 = phi i64 [ %37, %._crit_edge ], [ %12, %11 ]
  %41 = add nsw i64 %39, -1
  store i64 %41, ptr @ex, align 8, !tbaa !5
  %42 = icmp sgt i64 %39, 1
  br i1 %42, label %11, label %.critedge, !llvm.loop !12

43:                                               ; preds = %._crit_edge
  store i64 %33, ptr @pr, align 8, !tbaa !5
  %44 = icmp sgt i64 %.pre102, 0
  br i1 %44, label %45, label %.critedge

45:                                               ; preds = %43
  %46 = tail call noundef zeroext i1 @_Z12miller_rabinx(i64 noundef %33)
  br i1 %46, label %47, label %.critedge

.critedge:                                        ; preds = %.thread, %43, %45
  tail call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 149, ptr noundef nonnull @__PRETTY_FUNCTION__._Z4initv) #7
  unreachable

47:                                               ; preds = %45
  %48 = load i64, ptr @m, align 8, !tbaa !5
  %49 = load i64, ptr @pr, align 8, !tbaa !5
  %50 = sdiv i64 %48, %49
  %51 = sub nsw i64 %48, %50
  store i64 %51, ptr @phi, align 8, !tbaa !5
  %52 = load i64, ptr @sp, align 8, !tbaa !5
  %53 = srem i64 %52, %49
  %54 = icmp eq i64 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %47
  store i64 -1, ptr @gen, align 8, !tbaa !5
  store i64 -1, ptr @ord, align 8, !tbaa !5
  br label %161

56:                                               ; preds = %47
  store i64 %51, ptr @ord, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #8
  %57 = add nsw i64 %49, -1
  call void @_Z9factorizex(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %1, i64 noundef %57)
  %58 = load i64, ptr @ex, align 8, !tbaa !5
  %59 = icmp sgt i64 %58, 1
  br i1 %59, label %60, label %70

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %61 = add nsw i64 %58, -1
  store i64 %61, ptr %3, align 8, !tbaa !5
  %62 = invoke { i64, i64 } @_ZSt9make_pairIRxxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) @pr, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %63 unwind label %68

63:                                               ; preds = %60
  %64 = extractvalue { i64, i64 } %62, 0
  store i64 %64, ptr %2, align 8
  %65 = getelementptr inbounds i8, ptr %2, i64 8
  %66 = extractvalue { i64, i64 } %62, 1
  store i64 %66, ptr %65, align 8
  invoke void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %67 unwind label %68

67:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  br label %70

68:                                               ; preds = %63, %60
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  br label %162

70:                                               ; preds = %67, %56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %71 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %71, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  %72 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %72, ptr %5, align 8
  %73 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %73, label %.lr.ph80, label %._crit_edge81

._crit_edge81:                                    ; preds = %.critedge2, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %74 = load i64, ptr @pr, align 8, !tbaa !5
  %75 = icmp eq i64 %74, 2
  %76 = load i64, ptr @m, align 8
  %77 = icmp sgt i64 %76, 7
  %or.cond = select i1 %75, i1 %77, i1 false
  br i1 %or.cond, label %97, label %.preheader

.preheader:                                       ; preds = %._crit_edge81
  store i64 0, ptr @gen, align 8, !tbaa !5
  %78 = icmp sgt i64 %76, 0
  br i1 %78, label %.lr.ph88, label %.loopexit

.lr.ph80:                                         ; preds = %70, %.critedge2
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %.sroa.014.0.copyload = load i64, ptr %79, align 8
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %79, i64 8
  %.sroa.6.0.copyload = load i64, ptr %.sroa.6.0..sroa_idx, align 8
  %80 = icmp sgt i64 %.sroa.6.0.copyload, 0
  br i1 %80, label %.lr.ph77.preheader, label %.critedge2

.lr.ph77.preheader:                               ; preds = %.lr.ph80
  %.pre101 = load i64, ptr @ord, align 8, !tbaa !5
  br label %.lr.ph77

.lr.ph77:                                         ; preds = %.lr.ph77.preheader, %88
  %81 = phi i64 [ %91, %88 ], [ %.pre101, %.lr.ph77.preheader ]
  %.sroa.6.075 = phi i64 [ %89, %88 ], [ %.sroa.6.0.copyload, %.lr.ph77.preheader ]
  %82 = load i64, ptr @sp, align 8, !tbaa !5
  %83 = sdiv i64 %81, %.sroa.014.0.copyload
  %84 = load i64, ptr @m, align 8, !tbaa !5
  %85 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %82, i64 noundef %83, i64 noundef %84)
          to label %86 unwind label %93

86:                                               ; preds = %.lr.ph77
  %87 = icmp eq i64 %85, 1
  br i1 %87, label %88, label %.critedge2

88:                                               ; preds = %86
  %89 = add nsw i64 %.sroa.6.075, -1
  %90 = load i64, ptr @ord, align 8, !tbaa !5
  %91 = sdiv i64 %90, %.sroa.014.0.copyload
  store i64 %91, ptr @ord, align 8, !tbaa !5
  %92 = icmp sgt i64 %.sroa.6.075, 1
  br i1 %92, label %.lr.ph77, label %.critedge2, !llvm.loop !13

93:                                               ; preds = %.lr.ph77
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %162

.critedge2:                                       ; preds = %86, %88, %.lr.ph80
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %96 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br i1 %96, label %.lr.ph80, label %._crit_edge81

97:                                               ; preds = %._crit_edge81
  %98 = load i64, ptr @sp, align 8, !tbaa !5
  %99 = and i64 %98, 3
  %100 = icmp ne i64 %99, 3
  %101 = load i64, ptr @ord, align 8
  %102 = and i64 %101, 1
  %.not56 = icmp eq i64 %102, 0
  %103 = select i1 %100, i1 true, i1 %.not56
  br i1 %103, label %.lr.ph97.preheader, label %104

104:                                              ; preds = %97
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2, i32 noundef 162, ptr noundef nonnull @__PRETTY_FUNCTION__._Z4initv) #7
  unreachable

.lr.ph97.preheader:                               ; preds = %97
  %105 = load i64, ptr @phi, align 8, !tbaa !5
  %106 = sdiv i64 %105, 2
  store i64 1, ptr @gen, align 8, !tbaa !5
  br label %.lr.ph97

.lr.ph97:                                         ; preds = %.lr.ph97.preheader, %128
  %107 = phi i64 [ %131, %128 ], [ %76, %.lr.ph97.preheader ]
  %storemerge5795 = phi i64 [ %130, %128 ], [ 1, %.lr.ph97.preheader ]
  %108 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %storemerge5795, i64 noundef %106, i64 noundef %107)
          to label %109 unwind label %114

109:                                              ; preds = %.lr.ph97
  %110 = icmp eq i64 %108, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %111 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %111, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %112 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %112, ptr %7, align 8
  %113 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %113, label %.lr.ph92, label %._crit_edge93

._crit_edge93:                                    ; preds = %121, %109
  %.048.in.lcssa = phi i1 [ %110, %109 ], [ %123, %121 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br i1 %.048.in.lcssa, label %.loopexit, label %128

114:                                              ; preds = %.lr.ph97
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %162

.lr.ph92:                                         ; preds = %109, %121
  %.048.in90 = phi i1 [ %123, %121 ], [ %110, %109 ]
  %116 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %.sroa.06.0.copyload = load i64, ptr %116, align 8
  %117 = load i64, ptr @gen, align 8, !tbaa !5
  %118 = sdiv i64 %106, %.sroa.06.0.copyload
  %119 = load i64, ptr @m, align 8, !tbaa !5
  %120 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %117, i64 noundef %118, i64 noundef %119)
          to label %121 unwind label %126

121:                                              ; preds = %.lr.ph92
  %122 = icmp ne i64 %120, 1
  %123 = and i1 %.048.in90, %122
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %125 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br i1 %125, label %.lr.ph92, label %._crit_edge93

126:                                              ; preds = %.lr.ph92
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %162

128:                                              ; preds = %._crit_edge93
  %129 = load i64, ptr @gen, align 8, !tbaa !5
  %130 = add nsw i64 %129, 4
  store i64 %130, ptr @gen, align 8, !tbaa !5
  %131 = load i64, ptr @m, align 8, !tbaa !5
  %132 = icmp slt i64 %130, %131
  br i1 %132, label %.lr.ph97, label %.loopexit, !llvm.loop !14

.lr.ph88:                                         ; preds = %.preheader, %156
  %133 = phi i64 [ %159, %156 ], [ %76, %.preheader ]
  %storemerge5487 = phi i64 [ %158, %156 ], [ 0, %.preheader ]
  %134 = load i64, ptr @phi, align 8, !tbaa !5
  %135 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %storemerge5487, i64 noundef %134, i64 noundef %133)
          to label %136 unwind label %141

136:                                              ; preds = %.lr.ph88
  %137 = icmp eq i64 %135, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %138 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %138, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %139 = call ptr @_ZNSt6vectorISt4pairIxxESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %139, ptr %9, align 8
  %140 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %140, label %.lr.ph84, label %._crit_edge85

._crit_edge85:                                    ; preds = %149, %136
  %.041.in.lcssa = phi i1 [ %137, %136 ], [ %151, %149 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %.041.in.lcssa, label %.loopexit, label %156

141:                                              ; preds = %.lr.ph88
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %162

.lr.ph84:                                         ; preds = %136, %149
  %.041.in82 = phi i1 [ %151, %149 ], [ %137, %136 ]
  %143 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %.sroa.0.0.copyload = load i64, ptr %143, align 8
  %144 = load i64, ptr @gen, align 8, !tbaa !5
  %145 = load i64, ptr @phi, align 8, !tbaa !5
  %146 = sdiv i64 %145, %.sroa.0.0.copyload
  %147 = load i64, ptr @m, align 8, !tbaa !5
  %148 = invoke noundef i64 @_Z7mod_powxxx(i64 noundef %144, i64 noundef %146, i64 noundef %147)
          to label %149 unwind label %154

149:                                              ; preds = %.lr.ph84
  %150 = icmp ne i64 %148, 1
  %151 = and i1 %.041.in82, %150
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIxxESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %153 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIxxESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br i1 %153, label %.lr.ph84, label %._crit_edge85

154:                                              ; preds = %.lr.ph84
  %155 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %162

156:                                              ; preds = %._crit_edge85
  %157 = load i64, ptr @gen, align 8, !tbaa !5
  %158 = add nsw i64 %157, 1
  store i64 %158, ptr @gen, align 8, !tbaa !5
  %159 = load i64, ptr @m, align 8, !tbaa !5
  %160 = icmp slt i64 %158, %159
  br i1 %160, label %.lr.ph88, label %.loopexit, !llvm.loop !15

.loopexit:                                        ; preds = %156, %._crit_edge85, %128, %._crit_edge93, %.preheader
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  br label %161

161:                                              ; preds = %.loopexit, %55
  ret void

162:                                              ; preds = %141, %154, %114, %126, %93, %68
  %.pn60 = phi { ptr, i32 } [ %94, %93 ], [ %69, %68 ], [ %127, %126 ], [ %115, %114 ], [ %155, %154 ], [ %142, %141 ]
  call void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn60
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_Z7int_powxix(i64 noundef, i32 noundef, i64 noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12miller_rabinx(i64 noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9factorizex(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxxESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_Z7mod_powxxx(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt4pairIxxESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #6 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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