; LLVM IR from tangjz/acm-icpc :: codeforces/gym (100705B1)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local global [1500001 x i32], align 16
@tot = external dso_local global i32, align 4
@prime = external dso_local global [1500001 x i32], align 16
@fact = external dso_local global [1500001 x i32], align 16
@f = external dso_local global [2 x [21 x [21 x i64]]], align 16
@ans = external dso_local global i64, align 8
@e = external dso_local global [1500001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %29 = load i32, ptr @m, align 4, !tbaa !5
  %30 = srem i32 1425, %29
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr getelementptr inbounds ([1500001 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %54, %0
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = load i32, ptr @n, align 4, !tbaa !5
  %35 = icmp sle i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %57

37:                                               ; preds = %32
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1500001 x i32], ptr @a, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = mul nsw i64 1394, %43
  %45 = add nsw i64 %44, 2015
  %46 = load i32, ptr @m, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = srem i64 %45, %47
  %49 = add nsw i64 %48, 1
  %50 = trunc i64 %49 to i32
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1500001 x i32], ptr @a, i64 0, i64 %52
  store i32 %50, ptr %53, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %37
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %2, align 4, !tbaa !5
  br label %32, !llvm.loop !9

57:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 2, ptr %3, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %125, %57
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = load i32, ptr @m, align 4, !tbaa !5
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %128

63:                                               ; preds = %58
  %64 = load i32, ptr %3, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %78, label %69

69:                                               ; preds = %63
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = load i32, ptr @tot, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr @tot, align 4, !tbaa !5
  %73 = sext i32 %71 to i64
  %74 = getelementptr inbounds [1500001 x i32], ptr @prime, i64 0, i64 %73
  store i32 %70, ptr %74, align 4, !tbaa !5
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %76
  store i32 %70, ptr %77, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %69, %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %120, %78
  %80 = load i32, ptr %5, align 4, !tbaa !5
  %81 = load i32, ptr @tot, align 4, !tbaa !5
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %83, label %95

83:                                               ; preds = %79
  %84 = load i32, ptr %3, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1500001 x i32], ptr @prime, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = mul nsw i64 %85, %90
  %92 = load i32, ptr @m, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = icmp sle i64 %91, %93
  br label %95

95:                                               ; preds = %83, %79
  %96 = phi i1 [ false, %79 ], [ %94, %83 ]
  br i1 %96, label %98, label %97

97:                                               ; preds = %95
  store i32 8, ptr %4, align 4
  br label %123

98:                                               ; preds = %95
  %99 = load i32, ptr %5, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [1500001 x i32], ptr @prime, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = load i32, ptr %3, align 4, !tbaa !5
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [1500001 x i32], ptr @prime, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = mul nsw i32 %103, %107
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %109
  store i32 %102, ptr %110, align 4, !tbaa !5
  %111 = load i32, ptr %3, align 4, !tbaa !5
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [1500001 x i32], ptr @prime, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = srem i32 %111, %115
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %119

118:                                              ; preds = %98
  store i32 8, ptr %4, align 4
  br label %123

119:                                              ; preds = %98
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %5, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %5, align 4, !tbaa !5
  br label %79, !llvm.loop !11

123:                                              ; preds = %118, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %3, align 4, !tbaa !5
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %3, align 4, !tbaa !5
  br label %58, !llvm.loop !12

128:                                              ; preds = %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %168, %128
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = load i32, ptr @n, align 4, !tbaa !5
  %132 = icmp sle i32 %130, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %171

134:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %135 = load i32, ptr %6, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [1500001 x i32], ptr @a, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !5
  store i32 %138, ptr %7, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %162, %134
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = icmp sgt i32 %140, 1
  br i1 %141, label %143, label %142

142:                                              ; preds = %139
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %167

143:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %144 = load i32, ptr %7, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  store i32 %147, ptr %9, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %156, %143
  %149 = load i32, ptr %7, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = icmp eq i32 %152, %153
  br i1 %154, label %155, label %162

155:                                              ; preds = %148
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %9, align 4, !tbaa !5
  %158 = load i32, ptr %7, align 4, !tbaa !5
  %159 = sdiv i32 %158, %157
  store i32 %159, ptr %7, align 4, !tbaa !5
  %160 = load i32, ptr %8, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %8, align 4, !tbaa !5
  br label %148, !llvm.loop !13

162:                                              ; preds = %148
  %163 = load i32, ptr %9, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [1500001 x %"class.std::vector"], ptr @e, i64 0, i64 %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %166 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %166, ptr %10, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %165, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %139, !llvm.loop !14

167:                                              ; preds = %142
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %6, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %6, align 4, !tbaa !5
  br label %129, !llvm.loop !15

171:                                              ; preds = %133
  store i64 1, ptr @ans, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %346, %171
  %173 = load i32, ptr %11, align 4, !tbaa !5
  %174 = load i32, ptr @m, align 4, !tbaa !5
  %175 = icmp sle i32 %173, %174
  br i1 %175, label %177, label %176

176:                                              ; preds = %172
  store i32 19, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %349

177:                                              ; preds = %172
  %178 = load i32, ptr %11, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [1500001 x %"class.std::vector"], ptr @e, i64 0, i64 %179
  %181 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %180) #7
  %182 = icmp ne i64 %181, 0
  br i1 %182, label %184, label %183

183:                                              ; preds = %177
  br label %346

184:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 1, ptr %15, align 4, !tbaa !5
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %186
  %188 = getelementptr inbounds [21 x [21 x i64]], ptr %187, i64 0, i64 0
  %189 = getelementptr inbounds [21 x i64], ptr %188, i64 0, i64 0
  store i64 1, ptr %189, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %190 = load i32, ptr %11, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [1500001 x %"class.std::vector"], ptr @e, i64 0, i64 %191
  %193 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %192) #7
  %194 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %193, ptr %194, align 8
  br label %195

195:                                              ; preds = %321, %184
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %196 = load i32, ptr %11, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [1500001 x %"class.std::vector"], ptr @e, i64 0, i64 %197
  %199 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %198) #7
  %200 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %199, ptr %200, align 8
  %201 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br i1 %201, label %203, label %202

202:                                              ; preds = %195
  store i32 22, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %323

203:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %204 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %205 = getelementptr inbounds %"struct.std::pair", ptr %204, i32 0, i32 0
  %206 = load i32, ptr %205, align 4, !tbaa !18
  store i32 %206, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %207 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  %208 = getelementptr inbounds %"struct.std::pair", ptr %207, i32 0, i32 1
  %209 = load i32, ptr %208, align 4, !tbaa !20
  store i32 %209, ptr %19, align 4, !tbaa !5
  %210 = load i32, ptr %12, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  %212 = load i32, ptr %18, align 4, !tbaa !5
  %213 = icmp slt i32 %211, %212
  br i1 %213, label %214, label %239

214:                                              ; preds = %203
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  store i64 0, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %229, %214
  %216 = load i32, ptr %21, align 4, !tbaa !5
  %217 = load i32, ptr %13, align 4, !tbaa !5
  %218 = icmp sle i32 %216, %217
  br i1 %218, label %220, label %219

219:                                              ; preds = %215
  store i32 25, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %232

220:                                              ; preds = %215
  %221 = load i32, ptr %14, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %222
  %224 = getelementptr inbounds [21 x [21 x i64]], ptr %223, i64 0, i64 0
  %225 = load i32, ptr %21, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [21 x i64], ptr %224, i64 0, i64 %226
  %228 = load i64, ptr %227, align 8, !tbaa !16
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %20, i64 noundef %228)
  br label %229

229:                                              ; preds = %220
  %230 = load i32, ptr %21, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %21, align 4, !tbaa !5
  br label %215, !llvm.loop !21

232:                                              ; preds = %219
  %233 = load i64, ptr %20, align 8, !tbaa !16
  %234 = load i32, ptr %14, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %235
  %237 = getelementptr inbounds [21 x [21 x i64]], ptr %236, i64 0, i64 0
  %238 = getelementptr inbounds [21 x i64], ptr %237, i64 0, i64 0
  store i64 %233, ptr %238, align 8, !tbaa !16
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %239

239:                                              ; preds = %232, %203
  %240 = load i32, ptr %14, align 4, !tbaa !5
  %241 = xor i32 %240, 1
  store i32 %241, ptr %14, align 4, !tbaa !5
  %242 = load i32, ptr %15, align 4, !tbaa !5
  %243 = xor i32 %242, 1
  store i32 %243, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %244

244:                                              ; preds = %261, %239
  %245 = load i32, ptr %22, align 4, !tbaa !5
  %246 = load i32, ptr %19, align 4, !tbaa !5
  %247 = icmp sle i32 %245, %246
  br i1 %247, label %249, label %248

248:                                              ; preds = %244
  store i32 28, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  br label %264

249:                                              ; preds = %244
  %250 = load i32, ptr %14, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %251
  %253 = load i32, ptr %22, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds [21 x [21 x i64]], ptr %252, i64 0, i64 %254
  %256 = getelementptr inbounds [21 x i64], ptr %255, i64 0, i64 0
  %257 = load i32, ptr %19, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  %259 = sext i32 %258 to i64
  %260 = mul i64 %259, 8
  call void @llvm.memset.p0.i64(ptr align 8 %256, i8 0, i64 %260, i1 false)
  br label %261

261:                                              ; preds = %249
  %262 = load i32, ptr %22, align 4, !tbaa !5
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %22, align 4, !tbaa !5
  br label %244, !llvm.loop !22

264:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %265

265:                                              ; preds = %315, %264
  %266 = load i32, ptr %23, align 4, !tbaa !5
  %267 = load i32, ptr %13, align 4, !tbaa !5
  %268 = icmp sle i32 %266, %267
  br i1 %268, label %270, label %269

269:                                              ; preds = %265
  store i32 31, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  br label %318

270:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %271

271:                                              ; preds = %311, %270
  %272 = load i32, ptr %24, align 4, !tbaa !5
  %273 = load i32, ptr %13, align 4, !tbaa !5
  %274 = icmp sle i32 %272, %273
  br i1 %274, label %276, label %275

275:                                              ; preds = %271
  store i32 34, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  br label %314

276:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %277 = load i32, ptr %23, align 4, !tbaa !5
  store i32 %277, ptr %25, align 4, !tbaa !5
  br label %278

278:                                              ; preds = %307, %276
  %279 = load i32, ptr %25, align 4, !tbaa !5
  %280 = load i32, ptr %19, align 4, !tbaa !5
  %281 = icmp sle i32 %279, %280
  br i1 %281, label %283, label %282

282:                                              ; preds = %278
  store i32 37, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %310

283:                                              ; preds = %278
  %284 = load i32, ptr %14, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %285
  %287 = load i32, ptr %25, align 4, !tbaa !5
  %288 = load i32, ptr %23, align 4, !tbaa !5
  %289 = sub nsw i32 %287, %288
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [21 x [21 x i64]], ptr %286, i64 0, i64 %290
  %292 = load i32, ptr %19, align 4, !tbaa !5
  %293 = load i32, ptr %25, align 4, !tbaa !5
  %294 = sub nsw i32 %292, %293
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [21 x i64], ptr %291, i64 0, i64 %295
  %297 = load i32, ptr %15, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %298
  %300 = load i32, ptr %23, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [21 x [21 x i64]], ptr %299, i64 0, i64 %301
  %303 = load i32, ptr %24, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [21 x i64], ptr %302, i64 0, i64 %304
  %306 = load i64, ptr %305, align 8, !tbaa !16
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %296, i64 noundef %306)
  br label %307

307:                                              ; preds = %283
  %308 = load i32, ptr %25, align 4, !tbaa !5
  %309 = add nsw i32 %308, 1
  store i32 %309, ptr %25, align 4, !tbaa !5
  br label %278, !llvm.loop !23

310:                                              ; preds = %282
  br label %311

311:                                              ; preds = %310
  %312 = load i32, ptr %24, align 4, !tbaa !5
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %24, align 4, !tbaa !5
  br label %271, !llvm.loop !24

314:                                              ; preds = %275
  br label %315

315:                                              ; preds = %314
  %316 = load i32, ptr %23, align 4, !tbaa !5
  %317 = add nsw i32 %316, 1
  store i32 %317, ptr %23, align 4, !tbaa !5
  br label %265, !llvm.loop !25

318:                                              ; preds = %269
  %319 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %319, ptr %12, align 4, !tbaa !5
  %320 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %320, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %321

321:                                              ; preds = %318
  %322 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %195, !llvm.loop !26

323:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  store i64 0, ptr %26, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %324

324:                                              ; preds = %338, %323
  %325 = load i32, ptr %27, align 4, !tbaa !5
  %326 = load i32, ptr %13, align 4, !tbaa !5
  %327 = icmp sle i32 %325, %326
  br i1 %327, label %329, label %328

328:                                              ; preds = %324
  store i32 40, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  br label %341

329:                                              ; preds = %324
  %330 = load i32, ptr %14, align 4, !tbaa !5
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %331
  %333 = getelementptr inbounds [21 x [21 x i64]], ptr %332, i64 0, i64 0
  %334 = load i32, ptr %27, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [21 x i64], ptr %333, i64 0, i64 %335
  %337 = load i64, ptr %336, align 8, !tbaa !16
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %26, i64 noundef %337)
  br label %338

338:                                              ; preds = %329
  %339 = load i32, ptr %27, align 4, !tbaa !5
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %27, align 4, !tbaa !5
  br label %324, !llvm.loop !27

341:                                              ; preds = %328
  %342 = load i64, ptr @ans, align 8, !tbaa !16
  %343 = load i64, ptr %26, align 8, !tbaa !16
  %344 = mul nsw i64 %342, %343
  %345 = srem i64 %344, 1000000007
  store i64 %345, ptr @ans, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %346

346:                                              ; preds = %341, %183
  %347 = load i32, ptr %11, align 4, !tbaa !5
  %348 = add nsw i32 %347, 1
  store i32 %348, ptr %11, align 4, !tbaa !5
  br label %172, !llvm.loop !28

349:                                              ; preds = %176
  %350 = load i64, ptr @ans, align 8, !tbaa !16
  %351 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i64 noundef %350)
  ret i32 0
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

declare i32 @printf(ptr noundef, ...) #2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = 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}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!20 = !{!19, !6, i64 4}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !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<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@a = external dso_local local_unnamed_addr global [1500001 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@prime = external dso_local local_unnamed_addr global [1500001 x i32], align 16
@fact = external dso_local local_unnamed_addr global [1500001 x i32], align 16
@f = external dso_local global [2 x [21 x [21 x i64]]], align 16
@ans = external dso_local local_unnamed_addr global i64, align 8
@e = external dso_local global [1500001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %10 = srem i32 1425, %9
  %11 = add nuw nsw i32 %10, 1
  store i32 %11, ptr getelementptr inbounds (i8, ptr @a, i64 4), align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %.not107 = icmp slt i32 %12, 2
  br i1 %.not107, label %.preheader106, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %13 = sext i32 %9 to i64
  %14 = add nuw i32 %12, 1
  %wide.trip.count = zext i32 %14 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %15 = icmp eq i32 %14, 3
  br i1 %15, label %.preheader106.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %16 = and i64 %wide.trip.count, 4294967294
  %17 = add nsw i64 %16, -4
  br label %27

.preheader106.loopexit.unr-lcssa:                 ; preds = %27, %.lr.ph
  %.unr = phi i32 [ %11, %.lr.ph ], [ %41, %27 ]
  %indvars.iv.unr = phi i64 [ 2, %.lr.ph ], [ %indvars.iv.next.1, %27 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader106, label %.preheader106.loopexit.epilog-lcssa

.preheader106.loopexit.epilog-lcssa:              ; preds = %.preheader106.loopexit.unr-lcssa
  %18 = sext i32 %.unr to i64
  %19 = mul nsw i64 %18, 1394
  %20 = add nsw i64 %19, 2015
  %21 = srem i64 %20, %13
  %22 = trunc nsw i64 %21 to i32
  %23 = add i32 %22, 1
  %24 = getelementptr inbounds [1500001 x i32], ptr @a, i64 0, i64 %indvars.iv.unr
  store i32 %23, ptr %24, align 4, !tbaa !5
  br label %.preheader106

.preheader106:                                    ; preds = %.preheader106.loopexit.epilog-lcssa, %.preheader106.loopexit.unr-lcssa, %0
  %.not92113 = icmp slt i32 %9, 2
  br i1 %.not92113, label %._crit_edge, label %.lr.ph115

.lr.ph115:                                        ; preds = %.preheader106
  %tot.promoted = load i32, ptr @tot, align 4, !tbaa !5
  %25 = zext nneg i32 %9 to i64
  %26 = add nuw i32 %9, 1
  %wide.trip.count179 = zext i32 %26 to i64
  br label %43

27:                                               ; preds = %27, %.lr.ph.new
  %28 = phi i32 [ %11, %.lr.ph.new ], [ %41, %27 ]
  %indvars.iv = phi i64 [ 2, %.lr.ph.new ], [ %indvars.iv.next.1, %27 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %27 ]
  %29 = sext i32 %28 to i64
  %30 = mul nsw i64 %29, 1394
  %31 = add nsw i64 %30, 2015
  %32 = srem i64 %31, %13
  %33 = trunc nsw i64 %32 to i32
  %34 = add i32 %33, 1
  %35 = getelementptr inbounds [1500001 x i32], ptr @a, i64 0, i64 %indvars.iv
  store i32 %34, ptr %35, align 8, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %36 = sext i32 %34 to i64
  %37 = mul nsw i64 %36, 1394
  %38 = add nsw i64 %37, 2015
  %39 = srem i64 %38, %13
  %40 = trunc nsw i64 %39 to i32
  %41 = add i32 %40, 1
  %42 = getelementptr inbounds [1500001 x i32], ptr @a, i64 0, i64 %indvars.iv.next
  store i32 %41, ptr %42, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter, %17
  br i1 %niter.ncmp.1, label %.preheader106.loopexit.unr-lcssa, label %27, !llvm.loop !9

._crit_edge:                                      ; preds = %.critedge, %.preheader106
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 1, ptr %1, align 4, !tbaa !5
  %.not93124 = icmp slt i32 %12, 1
  br i1 %.not93124, label %._crit_edge128, label %.lr.ph127

43:                                               ; preds = %.lr.ph115, %.critedge
  %indvars.iv176 = phi i64 [ 2, %.lr.ph115 ], [ %indvars.iv.next177, %.critedge ]
  %44 = phi i32 [ %tot.promoted, %.lr.ph115 ], [ %53, %.critedge ]
  %45 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %indvars.iv176
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %.not102 = icmp eq i32 %46, 0
  br i1 %.not102, label %47, label %52

47:                                               ; preds = %43
  %48 = add nsw i32 %44, 1
  store i32 %48, ptr @tot, align 4, !tbaa !5
  %49 = sext i32 %44 to i64
  %50 = getelementptr inbounds [1500001 x i32], ptr @prime, i64 0, i64 %49
  %51 = trunc nuw nsw i64 %indvars.iv176 to i32
  store i32 %51, ptr %50, align 4, !tbaa !5
  store i32 %51, ptr %45, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %47, %43
  %53 = phi i32 [ %48, %47 ], [ %44, %43 ]
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph110.preheader, label %.critedge

.lr.ph110.preheader:                              ; preds = %52
  %55 = zext nneg i32 %53 to i64
  %56 = trunc nuw nsw i64 %indvars.iv176 to i32
  br label %.lr.ph110

.lr.ph110:                                        ; preds = %.lr.ph110.preheader, %61
  %indvars.iv173 = phi i64 [ 0, %.lr.ph110.preheader ], [ %indvars.iv.next174, %61 ]
  %57 = getelementptr inbounds [1500001 x i32], ptr @prime, i64 0, i64 %indvars.iv173
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = mul nsw i64 %indvars.iv176, %59
  %.not103 = icmp sgt i64 %60, %25
  br i1 %.not103, label %.critedge, label %61

61:                                               ; preds = %.lr.ph110
  %62 = mul nsw i32 %58, %56
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %63
  store i32 %58, ptr %64, align 4, !tbaa !5
  %65 = srem i32 %56, %58
  %66 = icmp ne i32 %65, 0
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  %67 = icmp ult i64 %indvars.iv.next174, %55
  %or.cond = select i1 %66, i1 %67, i1 false
  br i1 %or.cond, label %.lr.ph110, label %.critedge, !llvm.loop !11

.critedge:                                        ; preds = %.lr.ph110, %61, %52
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %exitcond180.not = icmp eq i64 %indvars.iv.next177, %wide.trip.count179
  br i1 %exitcond180.not, label %._crit_edge, label %43, !llvm.loop !12

._crit_edge128.loopexit:                          ; preds = %._crit_edge123
  %.pre215 = load i32, ptr @m, align 4, !tbaa !5
  br label %._crit_edge128

._crit_edge128:                                   ; preds = %._crit_edge128.loopexit, %._crit_edge
  %68 = phi i32 [ %.pre215, %._crit_edge128.loopexit ], [ %9, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  store i64 1, ptr @ans, align 8, !tbaa !13
  %.not94163 = icmp slt i32 %68, 1
  br i1 %.not94163, label %._crit_edge167, label %.lr.ph166

.lr.ph127:                                        ; preds = %._crit_edge, %._crit_edge123
  %69 = phi i32 [ %74, %._crit_edge123 ], [ %12, %._crit_edge ]
  %storemerge125 = phi i32 [ %76, %._crit_edge123 ], [ 1, %._crit_edge ]
  %70 = sext i32 %storemerge125 to i64
  %71 = getelementptr inbounds [1500001 x i32], ptr @a, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = icmp sgt i32 %72, 1
  br i1 %73, label %.lr.ph118.preheader, label %._crit_edge123

._crit_edge123.loopexit:                          ; preds = %87
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %.pre214 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge123

._crit_edge123:                                   ; preds = %._crit_edge123.loopexit, %.lr.ph127
  %74 = phi i32 [ %.pre214, %._crit_edge123.loopexit ], [ %69, %.lr.ph127 ]
  %75 = phi i32 [ %.pre, %._crit_edge123.loopexit ], [ %storemerge125, %.lr.ph127 ]
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %1, align 4, !tbaa !5
  %.not93.not = icmp slt i32 %75, %74
  br i1 %.not93.not, label %.lr.ph127, label %._crit_edge128.loopexit, !llvm.loop !15

.lr.ph118.preheader:                              ; preds = %.lr.ph127, %87
  %.084120 = phi i32 [ %81, %87 ], [ %72, %.lr.ph127 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %77 = zext nneg i32 %.084120 to i64
  %78 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  br label %.lr.ph118

.lr.ph118:                                        ; preds = %.lr.ph118.preheader, %.lr.ph118
  %.185116 = phi i32 [ %81, %.lr.ph118 ], [ %.084120, %.lr.ph118.preheader ]
  %80 = phi i32 [ %82, %.lr.ph118 ], [ 0, %.lr.ph118.preheader ]
  %81 = sdiv i32 %.185116, %79
  %82 = add nuw nsw i32 %80, 1
  %83 = sext i32 %81 to i64
  %84 = getelementptr inbounds [1500001 x i32], ptr @fact, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = icmp eq i32 %85, %79
  br i1 %86, label %.lr.ph118, label %87, !llvm.loop !16

87:                                               ; preds = %.lr.ph118
  store i32 %82, ptr %2, align 4, !tbaa !5
  %88 = sext i32 %79 to i64
  %89 = getelementptr inbounds [1500001 x %"class.std::vector"], ptr @e, i64 0, i64 %88
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %90 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i64 %90, ptr %3, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %89, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %91 = icmp sgt i32 %81, 1
  br i1 %91, label %.lr.ph118.preheader, label %._crit_edge123.loopexit, !llvm.loop !17

._crit_edge167.loopexit:                          ; preds = %157
  %.pre218 = load i64, ptr @ans, align 8, !tbaa !13
  br label %._crit_edge167

._crit_edge167:                                   ; preds = %._crit_edge167.loopexit, %._crit_edge128
  %92 = phi i64 [ %.pre218, %._crit_edge167.loopexit ], [ 1, %._crit_edge128 ]
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %92)
  ret i32 0

.lr.ph166:                                        ; preds = %._crit_edge128, %157
  %indvars.iv211 = phi i64 [ %indvars.iv.next212, %157 ], [ 1, %._crit_edge128 ]
  %94 = getelementptr inbounds [1500001 x %"class.std::vector"], ptr @e, i64 0, i64 %indvars.iv211
  %95 = call noundef i64 @_ZNKSt6vectorISt4pairIiiESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  %.not95 = icmp eq i64 %95, 0
  br i1 %.not95, label %157, label %96

96:                                               ; preds = %.lr.ph166
  store i64 1, ptr @f, align 16, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %97 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  store ptr %97, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %98 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  store ptr %98, ptr %5, align 8
  %99 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %99, label %.lr.ph154, label %._crit_edge155.thread

._crit_edge155.thread:                            ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 0, ptr %7, align 8, !tbaa !13
  br label %.lr.ph161

._crit_edge155:                                   ; preds = %._crit_edge148.split
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store i64 0, ptr %7, align 8, !tbaa !13
  %.not96158 = icmp slt i32 %107, 0
  br i1 %.not96158, label %._crit_edge162, label %.lr.ph161

.lr.ph161:                                        ; preds = %._crit_edge155.thread, %._crit_edge155
  %.080.lcssa224 = phi i32 [ 0, %._crit_edge155.thread ], [ %119, %._crit_edge155 ]
  %.081.lcssa223 = phi i32 [ 0, %._crit_edge155.thread ], [ %107, %._crit_edge155 ]
  %100 = zext nneg i32 %.080.lcssa224 to i64
  %101 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %100
  %102 = add nuw i32 %.081.lcssa223, 1
  %wide.trip.count209 = zext i32 %102 to i64
  br label %154

.lr.ph154:                                        ; preds = %96, %._crit_edge148.split
  %.079152 = phi i32 [ %120, %._crit_edge148.split ], [ 1, %96 ]
  %.080151 = phi i32 [ %119, %._crit_edge148.split ], [ 0, %96 ]
  %.081150 = phi i32 [ %107, %._crit_edge148.split ], [ 0, %96 ]
  %.082149 = phi i32 [ %104, %._crit_edge148.split ], [ 0, %96 ]
  %103 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %104 = load i32, ptr %103, align 4, !tbaa !18
  %105 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %106 = getelementptr inbounds i8, ptr %105, i64 4
  %107 = load i32, ptr %106, align 4, !tbaa !20
  %108 = add nsw i32 %.082149, 1
  %109 = icmp slt i32 %108, %104
  br i1 %109, label %110, label %118

110:                                              ; preds = %.lr.ph154
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store i64 0, ptr %6, align 8, !tbaa !13
  %.not97129 = icmp slt i32 %.081150, 0
  %.pre219 = zext nneg i32 %.080151 to i64
  br i1 %.not97129, label %._crit_edge133, label %.lr.ph132

.lr.ph132:                                        ; preds = %110
  %111 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %.pre219
  %112 = add nuw i32 %.081150, 1
  %wide.trip.count184 = zext i32 %112 to i64
  br label %115

._crit_edge133.loopexit:                          ; preds = %115
  %.pre216 = load i64, ptr %6, align 8, !tbaa !13
  br label %._crit_edge133

._crit_edge133:                                   ; preds = %110, %._crit_edge133.loopexit
  %113 = phi i64 [ %.pre216, %._crit_edge133.loopexit ], [ 0, %110 ]
  %114 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %.pre219
  store i64 %113, ptr %114, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %118

115:                                              ; preds = %.lr.ph132, %115
  %indvars.iv181 = phi i64 [ 0, %.lr.ph132 ], [ %indvars.iv.next182, %115 ]
  %116 = getelementptr inbounds [21 x i64], ptr %111, i64 0, i64 %indvars.iv181
  %117 = load i64, ptr %116, align 8, !tbaa !13
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef %117)
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %exitcond185.not = icmp eq i64 %indvars.iv.next182, %wide.trip.count184
  br i1 %exitcond185.not, label %._crit_edge133.loopexit, label %115, !llvm.loop !21

118:                                              ; preds = %._crit_edge133, %.lr.ph154
  %.1 = phi i32 [ 0, %._crit_edge133 ], [ %.081150, %.lr.ph154 ]
  %119 = xor i32 %.080151, 1
  %120 = xor i32 %.079152, 1
  %.not98134 = icmp slt i32 %107, 0
  br i1 %.not98134, label %.preheader105, label %.lr.ph137

.lr.ph137:                                        ; preds = %118
  %121 = zext nneg i32 %119 to i64
  %122 = add nuw i32 %107, 1
  %123 = zext i32 %122 to i64
  %124 = shl nuw nsw i64 %123, 3
  %xtraiter235 = and i64 %123, 7
  %125 = icmp ult i32 %107, 7
  br i1 %125, label %.preheader105.loopexit.unr-lcssa, label %.lr.ph137.new

.lr.ph137.new:                                    ; preds = %.lr.ph137
  %unroll_iter237 = and i64 %123, 4294967288
  br label %132

.preheader105.loopexit.unr-lcssa:                 ; preds = %132, %.lr.ph137
  %indvars.iv186.unr = phi i64 [ 0, %.lr.ph137 ], [ %indvars.iv.next187.7, %132 ]
  %lcmp.mod236.not = icmp eq i64 %xtraiter235, 0
  br i1 %lcmp.mod236.not, label %.preheader105, label %.epil.preheader234

.epil.preheader234:                               ; preds = %.preheader105.loopexit.unr-lcssa, %.epil.preheader234
  %indvars.iv186.epil = phi i64 [ %indvars.iv.next187.epil, %.epil.preheader234 ], [ %indvars.iv186.unr, %.preheader105.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader234 ], [ 0, %.preheader105.loopexit.unr-lcssa ]
  %126 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv186.epil
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %126, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.epil = add nuw nsw i64 %indvars.iv186.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter235
  br i1 %epil.iter.cmp.not, label %.preheader105, label %.epil.preheader234, !llvm.loop !22

.preheader105:                                    ; preds = %.preheader105.loopexit.unr-lcssa, %.epil.preheader234, %118
  %.not99145 = icmp slt i32 %.1, 0
  br i1 %.not99145, label %._crit_edge148.split, label %.preheader104.lr.ph

.preheader104.lr.ph:                              ; preds = %.preheader105
  %127 = zext nneg i32 %119 to i64
  %128 = zext nneg i32 %120 to i64
  %129 = sext i32 %107 to i64
  %130 = add i32 %107, 1
  %131 = add nuw i32 %.1, 1
  %wide.trip.count204 = zext i32 %131 to i64
  %wide.trip.count196 = zext i32 %130 to i64
  br label %.preheader104

132:                                              ; preds = %132, %.lr.ph137.new
  %indvars.iv186 = phi i64 [ 0, %.lr.ph137.new ], [ %indvars.iv.next187.7, %132 ]
  %niter238 = phi i64 [ 0, %.lr.ph137.new ], [ %niter238.next.7, %132 ]
  %133 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv186
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %133, i8 0, i64 %124, i1 false)
  %indvars.iv.next187 = or disjoint i64 %indvars.iv186, 1
  %134 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv.next187
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %134, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.1 = or disjoint i64 %indvars.iv186, 2
  %135 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv.next187.1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %135, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.2 = or disjoint i64 %indvars.iv186, 3
  %136 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv.next187.2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %136, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.3 = or disjoint i64 %indvars.iv186, 4
  %137 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv.next187.3
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %137, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.4 = or disjoint i64 %indvars.iv186, 5
  %138 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv.next187.4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %138, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.5 = or disjoint i64 %indvars.iv186, 6
  %139 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv.next187.5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %139, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.6 = or disjoint i64 %indvars.iv186, 7
  %140 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %121, i64 %indvars.iv.next187.6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %140, i8 0, i64 %124, i1 false)
  %indvars.iv.next187.7 = add nuw nsw i64 %indvars.iv186, 8
  %niter238.next.7 = add i64 %niter238, 8
  %niter238.ncmp.7 = icmp eq i64 %niter238.next.7, %unroll_iter237
  br i1 %niter238.ncmp.7, label %.preheader105.loopexit.unr-lcssa, label %132, !llvm.loop !24

.preheader104:                                    ; preds = %.preheader104.lr.ph, %._crit_edge144
  %indvars.iv191 = phi i64 [ 0, %.preheader104.lr.ph ], [ %indvars.iv.next192, %._crit_edge144 ]
  %.not101138 = icmp sgt i64 %indvars.iv191, %129
  br i1 %.not101138, label %._crit_edge144, label %.preheader

._crit_edge148.split:                             ; preds = %._crit_edge144, %.preheader105
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIiiESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %142 = call ptr @_ZNSt6vectorISt4pairIiiESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  store ptr %142, ptr %5, align 8
  %143 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIiiESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %143, label %.lr.ph154, label %._crit_edge155, !llvm.loop !25

.preheader:                                       ; preds = %.preheader104, %._crit_edge141
  %indvars.iv198 = phi i64 [ %indvars.iv.next199, %._crit_edge141 ], [ 0, %.preheader104 ]
  %144 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %128, i64 %indvars.iv191, i64 %indvars.iv198
  br label %145

._crit_edge144:                                   ; preds = %._crit_edge141, %.preheader104
  %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1
  %exitcond205.not = icmp eq i64 %indvars.iv.next192, %wide.trip.count204
  br i1 %exitcond205.not, label %._crit_edge148.split, label %.preheader104, !llvm.loop !26

._crit_edge141:                                   ; preds = %145
  %indvars.iv.next199 = add nuw nsw i64 %indvars.iv198, 1
  %exitcond202.not = icmp eq i64 %indvars.iv.next199, %wide.trip.count204
  br i1 %exitcond202.not, label %._crit_edge144, label %.preheader, !llvm.loop !27

145:                                              ; preds = %.preheader, %145
  %indvars.iv193 = phi i64 [ %indvars.iv191, %.preheader ], [ %indvars.iv.next194, %145 ]
  %146 = sub nuw nsw i64 %indvars.iv193, %indvars.iv191
  %147 = sub nsw i64 %129, %indvars.iv193
  %148 = getelementptr inbounds [2 x [21 x [21 x i64]]], ptr @f, i64 0, i64 %127, i64 %146, i64 %147
  %149 = load i64, ptr %144, align 8, !tbaa !13
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %148, i64 noundef %149)
  %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
  %exitcond197.not = icmp eq i64 %indvars.iv.next194, %wide.trip.count196
  br i1 %exitcond197.not, label %._crit_edge141, label %145, !llvm.loop !28

._crit_edge162.loopexit:                          ; preds = %154
  %.pre217 = load i64, ptr %7, align 8, !tbaa !13
  br label %._crit_edge162

._crit_edge162:                                   ; preds = %._crit_edge162.loopexit, %._crit_edge155
  %150 = phi i64 [ %.pre217, %._crit_edge162.loopexit ], [ 0, %._crit_edge155 ]
  %151 = load i64, ptr @ans, align 8, !tbaa !13
  %152 = mul nsw i64 %150, %151
  %153 = srem i64 %152, 1000000007
  store i64 %153, ptr @ans, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %157

154:                                              ; preds = %.lr.ph161, %154
  %indvars.iv206 = phi i64 [ 0, %.lr.ph161 ], [ %indvars.iv.next207, %154 ]
  %155 = getelementptr inbounds [21 x i64], ptr %101, i64 0, i64 %indvars.iv206
  %156 = load i64, ptr %155, align 8, !tbaa !13
  call void @_Z3updRxx(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %156)
  %indvars.iv.next207 = add nuw nsw i64 %indvars.iv206, 1
  %exitcond210.not = icmp eq i64 %indvars.iv.next207, %wide.trip.count209
  br i1 %exitcond210.not, label %._crit_edge162.loopexit, label %154, !llvm.loop !29

157:                                              ; preds = %.lr.ph166, %._crit_edge162
  %indvars.iv.next212 = add nuw nsw i64 %indvars.iv211, 1
  %158 = load i32, ptr @m, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %.not94.not = icmp slt i64 %indvars.iv211, %159
  br i1 %.not94.not, label %.lr.ph166, label %._crit_edge167.loopexit, !llvm.loop !30
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!20 = !{!19, !6, i64 4}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass