; LLVM IR from tangjz/acm-icpc :: codeforces/complete (722E)

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

%"struct.std::pair" = type { i32, i32 }

@r = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@fact = external dso_local global [200002 x i32], align 16
@iact = external dso_local global [100001 x i32], align 16
@f = external dso_local global [21 x [2010 x i32]], align 16
@g = external dso_local global [2010 x [2010 x i32]], align 16
@ans = external dso_local global i32, align 4
@p = external dso_local global [2010 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7mod_invi(i32 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 %"struct.std::pair", align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair", align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @r, ptr noundef @c, ptr noundef @n, ptr noundef @m)
  store i32 1, ptr @fact, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %44, %0
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = load i32, ptr @r, align 4, !tbaa !5
  %25 = load i32, ptr @c, align 4, !tbaa !5
  %26 = add nsw i32 %24, %25
  %27 = icmp sle i32 %23, %26
  br i1 %27, label %29, label %28

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

29:                                               ; preds = %22
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sub nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [200002 x i32], ptr @fact, i64 0, i64 %32
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = mul nsw i64 %35, %37
  %39 = srem i64 %38, 1000000007
  %40 = trunc i64 %39 to i32
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [200002 x i32], ptr @fact, i64 0, i64 %42
  store i32 %40, ptr %43, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %29
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !9

47:                                               ; preds = %28
  store i32 1, ptr getelementptr inbounds ([100001 x i32], ptr @iact, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 2, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @r, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %49 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %49, ptr %4, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %72, %47
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %75

55:                                               ; preds = %50
  %56 = load i32, ptr %3, align 4, !tbaa !5
  %57 = sdiv i32 1000000007, %56
  %58 = sext i32 %57 to i64
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = srem i32 1000000007, %59
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = mul nsw i64 %58, %64
  %66 = srem i64 %65, 1000000007
  %67 = sub nsw i64 1000000007, %66
  %68 = trunc i64 %67 to i32
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %70
  store i32 %68, ptr %71, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %55
  %73 = load i32, ptr %3, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %3, align 4, !tbaa !5
  br label %50, !llvm.loop !11

75:                                               ; preds = %54
  store i32 1, ptr @iact, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @r, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %77 = load i32, ptr %76, align 4, !tbaa !5
  store i32 %77, ptr %6, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %101, %75
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %104

83:                                               ; preds = %78
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sub nsw i32 %84, 1
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = mul nsw i64 %89, %94
  %96 = srem i64 %95, 1000000007
  %97 = trunc i64 %96 to i32
  %98 = load i32, ptr %5, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %99
  store i32 %97, ptr %100, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %83
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %5, align 4, !tbaa !5
  br label %78, !llvm.loop !12

104:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1, ptr %9, align 4, !tbaa !5
  %105 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store i64 %105, ptr %7, align 4
  %106 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @p, ptr noundef nonnull align 4 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %122, %104
  %108 = load i32, ptr %10, align 4, !tbaa !5
  %109 = load i32, ptr @n, align 4, !tbaa !5
  %110 = icmp sle i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %125

112:                                              ; preds = %107
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %114
  %116 = getelementptr inbounds %"struct.std::pair", ptr %115, i32 0, i32 0
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %118
  %120 = getelementptr inbounds %"struct.std::pair", ptr %119, i32 0, i32 1
  %121 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %116, ptr noundef %120)
  br label %122

122:                                              ; preds = %112
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %10, align 4, !tbaa !5
  br label %107, !llvm.loop !13

125:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %126 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @r, ptr noundef nonnull align 4 dereferenceable(4) @c)
  store i64 %126, ptr %11, align 4
  %127 = load i32, ptr @n, align 4, !tbaa !5
  %128 = add nsw i32 %127, 1
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %129
  %131 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %130, ptr noundef nonnull align 4 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  %132 = load i32, ptr @n, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds %"struct.std::pair", ptr @p, i64 %133
  %135 = getelementptr inbounds %"struct.std::pair", ptr %134, i64 1
  call void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef getelementptr inbounds (%"struct.std::pair", ptr @p, i64 1), ptr noundef %135)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %212, %125
  %137 = load i32, ptr %12, align 4, !tbaa !5
  %138 = load i32, ptr @n, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  %140 = icmp sle i32 %137, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %136
  store i32 14, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %215

142:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %208, %142
  %144 = load i32, ptr %14, align 4, !tbaa !5
  %145 = load i32, ptr %12, align 4, !tbaa !5
  %146 = icmp slt i32 %144, %145
  br i1 %146, label %148, label %147

147:                                              ; preds = %143
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %211

148:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %149 = load i32, ptr %12, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %150
  %152 = getelementptr inbounds %"struct.std::pair", ptr %151, i32 0, i32 0
  %153 = load i32, ptr %152, align 8, !tbaa !14
  %154 = load i32, ptr %14, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %155
  %157 = getelementptr inbounds %"struct.std::pair", ptr %156, i32 0, i32 0
  %158 = load i32, ptr %157, align 8, !tbaa !14
  %159 = sub nsw i32 %153, %158
  store i32 %159, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %160 = load i32, ptr %12, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %161
  %163 = getelementptr inbounds %"struct.std::pair", ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 4, !tbaa !16
  %165 = load i32, ptr %14, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %166
  %168 = getelementptr inbounds %"struct.std::pair", ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !16
  %170 = sub nsw i32 %164, %169
  store i32 %170, ptr %16, align 4, !tbaa !5
  %171 = load i32, ptr %15, align 4, !tbaa !5
  %172 = icmp slt i32 %171, 0
  br i1 %172, label %176, label %173

173:                                              ; preds = %148
  %174 = load i32, ptr %16, align 4, !tbaa !5
  %175 = icmp slt i32 %174, 0
  br i1 %175, label %176, label %177

176:                                              ; preds = %173, %148
  br label %199

177:                                              ; preds = %173
  %178 = load i32, ptr %15, align 4, !tbaa !5
  %179 = load i32, ptr %16, align 4, !tbaa !5
  %180 = add nsw i32 %178, %179
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [200002 x i32], ptr @fact, i64 0, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = load i32, ptr %15, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = mul nsw i64 %184, %189
  %191 = srem i64 %190, 1000000007
  %192 = load i32, ptr %16, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = mul nsw i64 %191, %196
  %198 = srem i64 %197, 1000000007
  br label %199

199:                                              ; preds = %177, %176
  %200 = phi i64 [ 0, %176 ], [ %198, %177 ]
  %201 = trunc i64 %200 to i32
  %202 = load i32, ptr %12, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %203
  %205 = load i32, ptr %14, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [2010 x i32], ptr %204, i64 0, i64 %206
  store i32 %201, ptr %207, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %208

208:                                              ; preds = %199
  %209 = load i32, ptr %14, align 4, !tbaa !5
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %14, align 4, !tbaa !5
  br label %143, !llvm.loop !17

211:                                              ; preds = %147
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %12, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %12, align 4, !tbaa !5
  br label %136, !llvm.loop !18

215:                                              ; preds = %141
  store i32 1, ptr @f, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %216

216:                                              ; preds = %322, %215
  %217 = load i32, ptr %17, align 4, !tbaa !5
  %218 = icmp slt i32 %217, 21
  br i1 %218, label %220, label %219

219:                                              ; preds = %216
  store i32 20, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %325

220:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %221

221:                                              ; preds = %318, %220
  %222 = load i32, ptr %18, align 4, !tbaa !5
  %223 = load i32, ptr @n, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  %225 = icmp sle i32 %222, %224
  br i1 %225, label %227, label %226

226:                                              ; preds = %221
  store i32 23, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %321

227:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %228

228:                                              ; preds = %314, %227
  %229 = load i32, ptr %19, align 4, !tbaa !5
  %230 = load i32, ptr %18, align 4, !tbaa !5
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %228
  store i32 26, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  br label %317

233:                                              ; preds = %228
  %234 = load i32, ptr %17, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %235
  %237 = load i32, ptr %18, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds [2010 x i32], ptr %236, i64 0, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = sext i32 %240 to i64
  %242 = load i32, ptr %17, align 4, !tbaa !5
  %243 = sub nsw i32 %242, 1
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %244
  %246 = load i32, ptr %19, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [2010 x i32], ptr %245, i64 0, i64 %247
  %249 = load i32, ptr %248, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = load i32, ptr %18, align 4, !tbaa !5
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %252
  %254 = load i32, ptr %19, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [2010 x i32], ptr %253, i64 0, i64 %255
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = mul nsw i64 %250, %258
  %260 = add nsw i64 %241, %259
  %261 = srem i64 %260, 1000000007
  %262 = trunc i64 %261 to i32
  %263 = load i32, ptr %17, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %264
  %266 = load i32, ptr %18, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [2010 x i32], ptr %265, i64 0, i64 %267
  store i32 %262, ptr %268, align 4, !tbaa !5
  %269 = load i32, ptr %17, align 4, !tbaa !5
  %270 = sext i32 %269 to i64
  %271 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %270
  %272 = load i32, ptr %18, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [2010 x i32], ptr %271, i64 0, i64 %273
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = load i32, ptr %17, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %278
  %280 = load i32, ptr %19, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [2010 x i32], ptr %279, i64 0, i64 %281
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = load i32, ptr %18, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %286
  %288 = load i32, ptr %19, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [2010 x i32], ptr %287, i64 0, i64 %289
  %291 = load i32, ptr %290, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = mul nsw i64 %284, %292
  %294 = sub nsw i64 %276, %293
  %295 = srem i64 %294, 1000000007
  %296 = trunc i64 %295 to i32
  %297 = load i32, ptr %17, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %298
  %300 = load i32, ptr %18, align 4, !tbaa !5
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [2010 x i32], ptr %299, i64 0, i64 %301
  store i32 %296, ptr %302, align 4, !tbaa !5
  %303 = icmp slt i32 %296, 0
  br i1 %303, label %304, label %313

304:                                              ; preds = %233
  %305 = load i32, ptr %17, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %306
  %308 = load i32, ptr %18, align 4, !tbaa !5
  %309 = sext i32 %308 to i64
  %310 = getelementptr inbounds [2010 x i32], ptr %307, i64 0, i64 %309
  %311 = load i32, ptr %310, align 4, !tbaa !5
  %312 = add nsw i32 %311, 1000000007
  store i32 %312, ptr %310, align 4, !tbaa !5
  br label %313

313:                                              ; preds = %304, %233
  br label %314

314:                                              ; preds = %313
  %315 = load i32, ptr %19, align 4, !tbaa !5
  %316 = add nsw i32 %315, 1
  store i32 %316, ptr %19, align 4, !tbaa !5
  br label %228, !llvm.loop !19

317:                                              ; preds = %232
  br label %318

318:                                              ; preds = %317
  %319 = load i32, ptr %18, align 4, !tbaa !5
  %320 = add nsw i32 %319, 1
  store i32 %320, ptr %18, align 4, !tbaa !5
  br label %221, !llvm.loop !20

321:                                              ; preds = %226
  br label %322

322:                                              ; preds = %321
  %323 = load i32, ptr %17, align 4, !tbaa !5
  %324 = add nsw i32 %323, 1
  store i32 %324, ptr %17, align 4, !tbaa !5
  br label %216, !llvm.loop !21

325:                                              ; preds = %219
  %326 = load i32, ptr @n, align 4, !tbaa !5
  %327 = add nsw i32 %326, 1
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %328
  %330 = getelementptr inbounds [2010 x i32], ptr %329, i64 0, i64 0
  %331 = load i32, ptr %330, align 8, !tbaa !5
  store i32 %331, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 1, ptr %20, align 4, !tbaa !5
  br label %332

332:                                              ; preds = %355, %325
  %333 = load i32, ptr %20, align 4, !tbaa !5
  %334 = icmp slt i32 %333, 21
  br i1 %334, label %336, label %335

335:                                              ; preds = %332
  store i32 29, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %361

336:                                              ; preds = %332
  %337 = load i32, ptr @ans, align 4, !tbaa !5
  %338 = sext i32 %337 to i64
  %339 = load i32, ptr @m, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = sub nsw i64 %340, 1
  %342 = load i32, ptr %20, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %343
  %345 = load i32, ptr @n, align 4, !tbaa !5
  %346 = add nsw i32 %345, 1
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [2010 x i32], ptr %344, i64 0, i64 %347
  %349 = load i32, ptr %348, align 4, !tbaa !5
  %350 = sext i32 %349 to i64
  %351 = mul nsw i64 %341, %350
  %352 = add nsw i64 %338, %351
  %353 = srem i64 %352, 1000000007
  %354 = trunc i64 %353 to i32
  store i32 %354, ptr @ans, align 4, !tbaa !5
  br label %355

355:                                              ; preds = %336
  %356 = load i32, ptr %20, align 4, !tbaa !5
  %357 = add nsw i32 %356, 1
  store i32 %357, ptr %20, align 4, !tbaa !5
  %358 = load i32, ptr @m, align 4, !tbaa !5
  %359 = add nsw i32 %358, 1
  %360 = ashr i32 %359, 1
  store i32 %360, ptr @m, align 4, !tbaa !5
  br label %332, !llvm.loop !22

361:                                              ; preds = %335
  %362 = load i32, ptr @ans, align 4, !tbaa !5
  %363 = sext i32 %362 to i64
  %364 = load i32, ptr @n, align 4, !tbaa !5
  %365 = add nsw i32 %364, 1
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %366
  %368 = getelementptr inbounds [2010 x i32], ptr %367, i64 0, i64 0
  %369 = load i32, ptr %368, align 8, !tbaa !5
  %370 = call noundef i32 @_Z7mod_invi(i32 noundef %369)
  %371 = sext i32 %370 to i64
  %372 = mul nsw i64 %363, %371
  %373 = srem i64 %372, 1000000007
  %374 = trunc i64 %373 to i32
  store i32 %374, ptr @ans, align 4, !tbaa !5
  %375 = load i32, ptr @ans, align 4, !tbaa !5
  %376 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %375)
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 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)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef, ptr noundef) #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { 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 #5 = { 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 = { 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 #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 = !{!15, !6, i64 0}
!15 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!16 = !{!15, !6, i64 4}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !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"

%"struct.std::pair" = type { i32, i32 }

@r = external dso_local global i32, align 4
@c = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@fact = external dso_local local_unnamed_addr global [200002 x i32], align 16
@iact = external dso_local local_unnamed_addr global [100001 x i32], align 16
@f = external dso_local local_unnamed_addr global [21 x [2010 x i32]], align 16
@g = external dso_local local_unnamed_addr global [2010 x [2010 x i32]], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local global [2010 x %"struct.std::pair"], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z7mod_invi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca %"struct.std::pair", align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", align 8
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @r, ptr noundef nonnull @c, ptr noundef nonnull @n, ptr noundef nonnull @m)
  store i32 1, ptr @fact, align 16, !tbaa !5
  %6 = load i32, ptr @r, align 4, !tbaa !5
  %7 = load i32, ptr @c, align 4, !tbaa !5
  %8 = add i32 %7, %6
  %.not86 = icmp slt i32 %8, 1
  br i1 %.not86, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %9 = zext nneg i32 %8 to i64
  %xtraiter = and i64 %9, 1
  %10 = icmp eq i32 %8, 1
  br i1 %10, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %9, 2147483646
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %24, %.lr.ph ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %11 = mul nsw i64 %.unr, %indvars.iv.unr
  %12 = srem i64 %11, 1000000007
  %13 = trunc nsw i64 %12 to i32
  %14 = getelementptr inbounds [200002 x i32], ptr @fact, i64 0, i64 %indvars.iv.unr
  store i32 %13, ptr %14, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa, %0
  store i32 1, ptr getelementptr inbounds (i8, ptr @iact, i64 4), align 4, !tbaa !5
  %15 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @r, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %.not7988 = icmp slt i32 %16, 2
  br i1 %.not7988, label %._crit_edge92, label %.lr.ph91.preheader

.lr.ph91.preheader:                               ; preds = %._crit_edge
  %17 = add nuw i32 %16, 1
  %wide.trip.count126 = zext i32 %17 to i64
  br label %.lr.ph91

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %18 = phi i64 [ 1, %.lr.ph.preheader.new ], [ %24, %.lr.ph ]
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %19 = mul nsw i64 %18, %indvars.iv
  %20 = srem i64 %19, 1000000007
  %21 = trunc nsw i64 %20 to i32
  %22 = getelementptr inbounds [200002 x i32], ptr @fact, i64 0, i64 %indvars.iv
  store i32 %21, ptr %22, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %23 = mul nsw i64 %20, %indvars.iv.next
  %24 = srem i64 %23, 1000000007
  %25 = trunc nsw i64 %24 to i32
  %26 = getelementptr inbounds [200002 x i32], ptr @fact, i64 0, i64 %indvars.iv.next
  store i32 %25, ptr %26, 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.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !9

._crit_edge92:                                    ; preds = %.lr.ph91, %._crit_edge
  store i32 1, ptr @iact, align 16, !tbaa !5
  %27 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @r, ptr noundef nonnull align 4 dereferenceable(4) @c)
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %.not8093 = icmp slt i32 %28, 1
  br i1 %.not8093, label %._crit_edge97, label %.lr.ph96.preheader

.lr.ph96.preheader:                               ; preds = %._crit_edge92
  %.pre = load i32, ptr @iact, align 16, !tbaa !5
  %29 = zext nneg i32 %28 to i64
  %xtraiter182 = and i64 %29, 1
  %30 = icmp eq i32 %28, 1
  br i1 %30, label %._crit_edge97.loopexit.unr-lcssa, label %.lr.ph96.preheader.new

.lr.ph96.preheader.new:                           ; preds = %.lr.ph96.preheader
  %unroll_iter185 = and i64 %29, 2147483646
  br label %.lr.ph96

.lr.ph91:                                         ; preds = %.lr.ph91.preheader, %.lr.ph91
  %indvars.iv123 = phi i64 [ 2, %.lr.ph91.preheader ], [ %indvars.iv.next124, %.lr.ph91 ]
  %31 = trunc nuw nsw i64 %indvars.iv123 to i32
  %32 = udiv i32 1000000007, %31
  %33 = zext nneg i32 %32 to i64
  %34 = urem i32 1000000007, %31
  %35 = zext nneg i32 %34 to i64
  %36 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = mul nsw i64 %38, %33
  %40 = srem i64 %39, 1000000007
  %41 = trunc nsw i64 %40 to i32
  %42 = sub nsw i32 1000000007, %41
  %43 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %indvars.iv123
  store i32 %42, ptr %43, align 4, !tbaa !5
  %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1
  %exitcond127.not = icmp eq i64 %indvars.iv.next124, %wide.trip.count126
  br i1 %exitcond127.not, label %._crit_edge92, label %.lr.ph91, !llvm.loop !11

._crit_edge97.loopexit.unr-lcssa:                 ; preds = %.lr.ph96, %.lr.ph96.preheader
  %.unr183 = phi i32 [ %.pre, %.lr.ph96.preheader ], [ %67, %.lr.ph96 ]
  %indvars.iv128.unr = phi i64 [ 1, %.lr.ph96.preheader ], [ %indvars.iv.next129.1, %.lr.ph96 ]
  %lcmp.mod184.not = icmp eq i64 %xtraiter182, 0
  br i1 %lcmp.mod184.not, label %._crit_edge97, label %.lr.ph96.epil

.lr.ph96.epil:                                    ; preds = %._crit_edge97.loopexit.unr-lcssa
  %44 = sext i32 %.unr183 to i64
  %45 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %indvars.iv128.unr
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = mul nsw i64 %47, %44
  %49 = srem i64 %48, 1000000007
  %50 = trunc nsw i64 %49 to i32
  store i32 %50, ptr %45, align 4, !tbaa !5
  br label %._crit_edge97

._crit_edge97:                                    ; preds = %.lr.ph96.epil, %._crit_edge97.loopexit.unr-lcssa, %._crit_edge92
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  %51 = call i64 @_ZSt9make_pairIiiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS1_INS2_IT0_E4typeEE6__typeEEOS3_OS8_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  store i64 %51, ptr %1, align 8
  %52 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) @p, ptr noundef nonnull align 4 dereferenceable(8) %1) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %.not8198 = icmp slt i32 %53, 1
  br i1 %.not8198, label %._crit_edge102, label %.lr.ph101

.lr.ph96:                                         ; preds = %.lr.ph96, %.lr.ph96.preheader.new
  %54 = phi i32 [ %.pre, %.lr.ph96.preheader.new ], [ %67, %.lr.ph96 ]
  %indvars.iv128 = phi i64 [ 1, %.lr.ph96.preheader.new ], [ %indvars.iv.next129.1, %.lr.ph96 ]
  %niter186 = phi i64 [ 0, %.lr.ph96.preheader.new ], [ %niter186.next.1, %.lr.ph96 ]
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %indvars.iv128
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = mul nsw i64 %58, %55
  %60 = srem i64 %59, 1000000007
  %61 = trunc nsw i64 %60 to i32
  store i32 %61, ptr %56, align 4, !tbaa !5
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %62 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %indvars.iv.next129
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = mul nsw i64 %60, %64
  %66 = srem i64 %65, 1000000007
  %67 = trunc nsw i64 %66 to i32
  store i32 %67, ptr %62, align 4, !tbaa !5
  %indvars.iv.next129.1 = add nuw nsw i64 %indvars.iv128, 2
  %niter186.next.1 = add i64 %niter186, 2
  %niter186.ncmp.1 = icmp eq i64 %niter186.next.1, %unroll_iter185
  br i1 %niter186.ncmp.1, label %._crit_edge97.loopexit.unr-lcssa, label %.lr.ph96, !llvm.loop !12

._crit_edge102:                                   ; preds = %.lr.ph101, %._crit_edge97
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %68 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @r, ptr noundef nonnull align 4 dereferenceable(4) @c)
  store i64 %68, ptr %4, align 8
  %69 = load i32, ptr @n, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %71
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8) %72, ptr noundef nonnull align 4 dereferenceable(8) %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds %"struct.std::pair", ptr @p, i64 %75
  %77 = getelementptr inbounds i8, ptr %76, i64 8
  call void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef nonnull getelementptr inbounds (i8, ptr @p, i64 8), ptr noundef nonnull %77)
  %78 = load i32, ptr @n, align 4, !tbaa !5
  %.not82104 = icmp slt i32 %78, 0
  br i1 %.not82104, label %._crit_edge106.thread, label %.preheader85.preheader

._crit_edge106.thread:                            ; preds = %._crit_edge102
  store i32 1, ptr @f, align 16, !tbaa !5
  br label %.split115.us

.preheader85.preheader:                           ; preds = %._crit_edge102
  %79 = add nuw i32 %78, 2
  %wide.trip.count144 = zext i32 %79 to i64
  br label %.preheader85

.lr.ph101:                                        ; preds = %._crit_edge97, %.lr.ph101
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %.lr.ph101 ], [ 1, %._crit_edge97 ]
  %80 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %indvars.iv133
  %81 = getelementptr inbounds i8, ptr %80, i64 4
  %82 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %80, ptr noundef nonnull %81)
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %83 = load i32, ptr @n, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %.not81.not = icmp slt i64 %indvars.iv133, %84
  br i1 %.not81.not, label %.lr.ph101, label %._crit_edge102, !llvm.loop !13

.preheader85:                                     ; preds = %.preheader85.preheader, %90
  %indvars.iv141 = phi i64 [ 1, %.preheader85.preheader ], [ %indvars.iv.next142, %90 ]
  %85 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %indvars.iv141
  %86 = load i32, ptr %85, align 8, !tbaa !14
  %87 = getelementptr inbounds i8, ptr %85, i64 4
  %88 = load i32, ptr %87, align 4, !tbaa !16
  br label %91

._crit_edge106:                                   ; preds = %90
  store i32 1, ptr @f, align 16, !tbaa !5
  br i1 %.not82104, label %.split115.us, label %.preheader84.preheader

.preheader84.preheader:                           ; preds = %._crit_edge106
  %89 = add nuw i32 %78, 2
  %wide.trip.count154 = zext i32 %89 to i64
  br label %.preheader84

90:                                               ; preds = %118
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %exitcond145 = icmp eq i64 %indvars.iv.next142, %wide.trip.count144
  br i1 %exitcond145, label %._crit_edge106, label %.preheader85, !llvm.loop !17

91:                                               ; preds = %.preheader85, %118
  %indvars.iv136 = phi i64 [ 0, %.preheader85 ], [ %indvars.iv.next137, %118 ]
  %92 = getelementptr inbounds [2010 x %"struct.std::pair"], ptr @p, i64 0, i64 %indvars.iv136
  %93 = load i32, ptr %92, align 8, !tbaa !14
  %94 = sub nsw i32 %86, %93
  %95 = getelementptr inbounds i8, ptr %92, i64 4
  %96 = load i32, ptr %95, align 4, !tbaa !16
  %97 = sub nsw i32 %88, %96
  %98 = icmp slt i32 %94, 0
  %99 = icmp slt i32 %97, 0
  %or.cond = select i1 %98, i1 true, i1 %99
  br i1 %or.cond, label %118, label %100

100:                                              ; preds = %91
  %101 = add nuw nsw i32 %97, %94
  %102 = zext nneg i32 %101 to i64
  %103 = getelementptr inbounds [200002 x i32], ptr @fact, i64 0, i64 %102
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = zext nneg i32 %94 to i64
  %107 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = mul nsw i64 %109, %105
  %111 = srem i64 %110, 1000000007
  %112 = zext nneg i32 %97 to i64
  %113 = getelementptr inbounds [100001 x i32], ptr @iact, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = mul nsw i64 %111, %115
  %117 = srem i64 %116, 1000000007
  br label %118

118:                                              ; preds = %91, %100
  %119 = phi i64 [ %117, %100 ], [ 0, %91 ]
  %120 = trunc nsw i64 %119 to i32
  %121 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %indvars.iv141, i64 %indvars.iv136
  store i32 %120, ptr %121, align 4, !tbaa !5
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond140.not = icmp eq i64 %indvars.iv.next137, %indvars.iv141
  br i1 %exitcond140.not, label %90, label %91, !llvm.loop !18

.preheader84:                                     ; preds = %.preheader84.preheader, %._crit_edge112
  %indvars.iv156 = phi i64 [ 1, %.preheader84.preheader ], [ %indvars.iv.next157, %._crit_edge112 ]
  %122 = add nsw i64 %indvars.iv156, -1
  br label %.preheader

.split115.us:                                     ; preds = %._crit_edge112, %._crit_edge106, %._crit_edge106.thread
  %123 = add nsw i32 %78, 1
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %124
  %126 = load i32, ptr %125, align 8, !tbaa !5
  %m.promoted = load i32, ptr @m, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = sext i32 %m.promoted to i64
  %129 = add nsw i64 %128, -1
  %130 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 1, i64 %124
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = mul nsw i64 %129, %132
  %134 = add nsw i64 %133, %127
  %135 = srem i64 %134, 1000000007
  %136 = add nsw i32 %m.promoted, 1
  %137 = ashr i32 %136, 1
  %narrow = add nsw i32 %137, -1
  %138 = sext i32 %narrow to i64
  %139 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 2, i64 %124
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = mul nsw i64 %138, %141
  %143 = add nsw i64 %142, %135
  %144 = srem i64 %143, 1000000007
  %145 = add nsw i32 %137, 1
  %146 = ashr i32 %145, 1
  %narrow164 = add nsw i32 %146, -1
  %147 = sext i32 %narrow164 to i64
  %148 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 3, i64 %124
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = mul nsw i64 %147, %150
  %152 = add nsw i64 %151, %144
  %153 = srem i64 %152, 1000000007
  %154 = add nsw i32 %146, 1
  %155 = ashr i32 %154, 1
  %narrow165 = add nsw i32 %155, -1
  %156 = sext i32 %narrow165 to i64
  %157 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 4, i64 %124
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = mul nsw i64 %156, %159
  %161 = add nsw i64 %160, %153
  %162 = srem i64 %161, 1000000007
  %163 = add nsw i32 %155, 1
  %164 = ashr i32 %163, 1
  %narrow166 = add nsw i32 %164, -1
  %165 = sext i32 %narrow166 to i64
  %166 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 5, i64 %124
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = mul nsw i64 %165, %168
  %170 = add nsw i64 %169, %162
  %171 = srem i64 %170, 1000000007
  %172 = add nsw i32 %164, 1
  %173 = ashr i32 %172, 1
  %narrow167 = add nsw i32 %173, -1
  %174 = sext i32 %narrow167 to i64
  %175 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 6, i64 %124
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = mul nsw i64 %174, %177
  %179 = add nsw i64 %178, %171
  %180 = srem i64 %179, 1000000007
  %181 = add nsw i32 %173, 1
  %182 = ashr i32 %181, 1
  %narrow168 = add nsw i32 %182, -1
  %183 = sext i32 %narrow168 to i64
  %184 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 7, i64 %124
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = mul nsw i64 %183, %186
  %188 = add nsw i64 %187, %180
  %189 = srem i64 %188, 1000000007
  %190 = add nsw i32 %182, 1
  %191 = ashr i32 %190, 1
  %narrow169 = add nsw i32 %191, -1
  %192 = sext i32 %narrow169 to i64
  %193 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 8, i64 %124
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = mul nsw i64 %192, %195
  %197 = add nsw i64 %196, %189
  %198 = srem i64 %197, 1000000007
  %199 = add nsw i32 %191, 1
  %200 = ashr i32 %199, 1
  %narrow170 = add nsw i32 %200, -1
  %201 = sext i32 %narrow170 to i64
  %202 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 9, i64 %124
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = mul nsw i64 %201, %204
  %206 = add nsw i64 %205, %198
  %207 = srem i64 %206, 1000000007
  %208 = add nsw i32 %200, 1
  %209 = ashr i32 %208, 1
  %narrow171 = add nsw i32 %209, -1
  %210 = sext i32 %narrow171 to i64
  %211 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 10, i64 %124
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = mul nsw i64 %210, %213
  %215 = add nsw i64 %214, %207
  %216 = srem i64 %215, 1000000007
  %217 = add nsw i32 %209, 1
  %218 = ashr i32 %217, 1
  %narrow172 = add nsw i32 %218, -1
  %219 = sext i32 %narrow172 to i64
  %220 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 11, i64 %124
  %221 = load i32, ptr %220, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = mul nsw i64 %219, %222
  %224 = add nsw i64 %223, %216
  %225 = srem i64 %224, 1000000007
  %226 = add nsw i32 %218, 1
  %227 = ashr i32 %226, 1
  %narrow173 = add nsw i32 %227, -1
  %228 = sext i32 %narrow173 to i64
  %229 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 12, i64 %124
  %230 = load i32, ptr %229, align 4, !tbaa !5
  %231 = sext i32 %230 to i64
  %232 = mul nsw i64 %228, %231
  %233 = add nsw i64 %232, %225
  %234 = srem i64 %233, 1000000007
  %235 = add nsw i32 %227, 1
  %236 = ashr i32 %235, 1
  %narrow174 = add nsw i32 %236, -1
  %237 = sext i32 %narrow174 to i64
  %238 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 13, i64 %124
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = mul nsw i64 %237, %240
  %242 = add nsw i64 %241, %234
  %243 = srem i64 %242, 1000000007
  %244 = add nsw i32 %236, 1
  %245 = ashr i32 %244, 1
  %narrow175 = add nsw i32 %245, -1
  %246 = sext i32 %narrow175 to i64
  %247 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 14, i64 %124
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = mul nsw i64 %246, %249
  %251 = add nsw i64 %250, %243
  %252 = srem i64 %251, 1000000007
  %253 = add nsw i32 %245, 1
  %254 = ashr i32 %253, 1
  %narrow176 = add nsw i32 %254, -1
  %255 = sext i32 %narrow176 to i64
  %256 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 15, i64 %124
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = mul nsw i64 %255, %258
  %260 = add nsw i64 %259, %252
  %261 = srem i64 %260, 1000000007
  %262 = add nsw i32 %254, 1
  %263 = ashr i32 %262, 1
  %narrow177 = add nsw i32 %263, -1
  %264 = sext i32 %narrow177 to i64
  %265 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 16, i64 %124
  %266 = load i32, ptr %265, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = mul nsw i64 %264, %267
  %269 = add nsw i64 %268, %261
  %270 = srem i64 %269, 1000000007
  %271 = add nsw i32 %263, 1
  %272 = ashr i32 %271, 1
  %narrow178 = add nsw i32 %272, -1
  %273 = sext i32 %narrow178 to i64
  %274 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 17, i64 %124
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = mul nsw i64 %273, %276
  %278 = add nsw i64 %277, %270
  %279 = srem i64 %278, 1000000007
  %280 = add nsw i32 %272, 1
  %281 = ashr i32 %280, 1
  %narrow179 = add nsw i32 %281, -1
  %282 = sext i32 %narrow179 to i64
  %283 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 18, i64 %124
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = mul nsw i64 %282, %285
  %287 = add nsw i64 %286, %279
  %288 = srem i64 %287, 1000000007
  %289 = add nsw i32 %281, 1
  %290 = ashr i32 %289, 1
  %narrow180 = add nsw i32 %290, -1
  %291 = sext i32 %narrow180 to i64
  %292 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 19, i64 %124
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = mul nsw i64 %291, %294
  %296 = add nsw i64 %295, %288
  %297 = srem i64 %296, 1000000007
  %298 = add nsw i32 %290, 1
  %299 = ashr i32 %298, 1
  %narrow181 = add nsw i32 %299, -1
  %300 = sext i32 %narrow181 to i64
  %301 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 20, i64 %124
  %302 = load i32, ptr %301, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = mul nsw i64 %300, %303
  %305 = add nsw i64 %304, %297
  %306 = srem i64 %305, 1000000007
  %307 = trunc nsw i64 %306 to i32
  %308 = add nsw i32 %299, 1
  %309 = ashr i32 %308, 1
  store i32 %307, ptr @ans, align 4, !tbaa !5
  store i32 %309, ptr @m, align 4, !tbaa !5
  %310 = call noundef i32 @_Z7mod_invi(i32 noundef %126)
  %311 = sext i32 %310 to i64
  %312 = mul nsw i64 %306, %311
  %313 = srem i64 %312, 1000000007
  %314 = trunc nsw i64 %313 to i32
  store i32 %314, ptr @ans, align 4, !tbaa !5
  %315 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %314)
  ret i32 0

.preheader:                                       ; preds = %.preheader84, %317
  %indvars.iv151 = phi i64 [ 1, %.preheader84 ], [ %indvars.iv.next152, %317 ]
  %316 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %indvars.iv156, i64 %indvars.iv151
  %.promoted = load i32, ptr %316, align 4, !tbaa !5
  br label %318

._crit_edge112:                                   ; preds = %317
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %exitcond159.not = icmp eq i64 %indvars.iv.next157, 21
  br i1 %exitcond159.not, label %.split115.us, label %.preheader84, !llvm.loop !19

317:                                              ; preds = %318
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155 = icmp eq i64 %indvars.iv.next152, %wide.trip.count154
  br i1 %exitcond155, label %._crit_edge112, label %.preheader, !llvm.loop !20

318:                                              ; preds = %.preheader, %318
  %indvars.iv146 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next147, %318 ]
  %spec.select107108 = phi i32 [ %.promoted, %.preheader ], [ %spec.select, %318 ]
  %319 = sext i32 %spec.select107108 to i64
  %320 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %122, i64 %indvars.iv146
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [2010 x [2010 x i32]], ptr @g, i64 0, i64 %indvars.iv151, i64 %indvars.iv146
  %324 = load i32, ptr %323, align 4, !tbaa !5
  %325 = sext i32 %324 to i64
  %326 = mul nsw i64 %325, %322
  %327 = add nsw i64 %326, %319
  %328 = srem i64 %327, 1000000007
  %329 = trunc nsw i64 %328 to i32
  store i32 %329, ptr %316, align 4, !tbaa !5
  %330 = getelementptr inbounds [21 x [2010 x i32]], ptr @f, i64 0, i64 %indvars.iv156, i64 %indvars.iv146
  %331 = load i32, ptr %330, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %333 = mul nsw i64 %332, %325
  %334 = sub nsw i64 %328, %333
  %335 = srem i64 %334, 1000000007
  %336 = trunc nsw i64 %335 to i32
  %337 = icmp slt i64 %335, 0
  %338 = add nsw i32 %336, 1000000007
  %spec.select = select i1 %337, i32 %338, i32 %336
  store i32 %spec.select, ptr %316, align 4, !tbaa !5
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %indvars.iv151
  br i1 %exitcond150.not, label %317, label %318, !llvm.loop !21
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSEOS0_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5 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 #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPSt4pairIiiEEvT_S3_(ptr noundef, ptr noundef) local_unnamed_addr #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { 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 #5 = { 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 = { 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 #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 = !{!15, !6, i64 0}
!15 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!16 = !{!15, !6, i64 4}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}


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