; LLVM IR from reyadussalahin/problem-solving :: hashing/string_hashing/codeforces/F727E (Solution)

; 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 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair.0" = type { i64, i64 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@gn = external dso_local global i32, align 4
@ans = external dso_local global [100010 x i32], align 16
@acnt = external dso_local global i32, align 4
@s = external dso_local global [2000200 x %"struct.std::pair"], align 16
@seen = external dso_local global [100010 x i8], align 16
@cd = external dso_local global [2000200 x i8], align 16
@g = external dso_local global [100010 x i8], align 16
@gmp = external dso_local global %"class.std::map", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [117 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair.0", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca %"struct.std::pair.0", align 8
  %20 = alloca i32, align 4
  %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 i32, align 4
  store i32 0, ptr %1, align 4
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @k)
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef @cd)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = load i32, ptr @k, align 4, !tbaa !5
  %31 = mul nsw i32 %29, %30
  store i32 %31, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %47, %0
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

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

37:                                               ; preds = %32
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = add nsw i32 %42, %43
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %45
  store i8 %41, ptr %46, align 1, !tbaa !9
  br label %47

47:                                               ; preds = %37
  %48 = load i32, ptr %3, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %3, align 4, !tbaa !5
  br label %32, !llvm.loop !10

50:                                               ; preds = %36
  %51 = load i32, ptr %2, align 4, !tbaa !5
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = add nsw i32 %52, %51
  store i32 %53, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 1, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 1, ptr %7, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 647, ptr %8, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 2797, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %54

54:                                               ; preds = %68, %50
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = load i32, ptr @k, align 4, !tbaa !5
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %59, label %58

58:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %71

59:                                               ; preds = %54
  %60 = load i64, ptr %6, align 8, !tbaa !12
  %61 = load i64, ptr %8, align 8, !tbaa !12
  %62 = mul nsw i64 %60, %61
  %63 = srem i64 %62, 1000000007
  store i64 %63, ptr %6, align 8, !tbaa !12
  %64 = load i64, ptr %7, align 8, !tbaa !12
  %65 = load i64, ptr %9, align 8, !tbaa !12
  %66 = mul nsw i64 %64, %65
  %67 = srem i64 %66, 1000000009
  store i64 %67, ptr %7, align 8, !tbaa !12
  br label %68

68:                                               ; preds = %59
  %69 = load i32, ptr %10, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %10, align 4, !tbaa !5
  br label %54, !llvm.loop !14

71:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %161, %71
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = icmp slt i32 %73, %74
  br i1 %75, label %77, label %76

76:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %164

77:                                               ; preds = %72
  %78 = load i64, ptr %4, align 8, !tbaa !12
  %79 = load i64, ptr %8, align 8, !tbaa !12
  %80 = mul nsw i64 %78, %79
  %81 = load i32, ptr %11, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %82
  %84 = load i8, ptr %83, align 1, !tbaa !9
  %85 = sext i8 %84 to i32
  %86 = sub nsw i32 %85, 97
  %87 = add nsw i32 %86, 1
  %88 = sext i32 %87 to i64
  %89 = add nsw i64 %80, %88
  %90 = srem i64 %89, 1000000007
  store i64 %90, ptr %4, align 8, !tbaa !12
  %91 = load i64, ptr %5, align 8, !tbaa !12
  %92 = load i64, ptr %9, align 8, !tbaa !12
  %93 = mul nsw i64 %91, %92
  %94 = load i32, ptr %11, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !9
  %98 = sext i8 %97 to i32
  %99 = sub nsw i32 %98, 97
  %100 = add nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = add nsw i64 %93, %101
  %103 = srem i64 %102, 1000000009
  store i64 %103, ptr %5, align 8, !tbaa !12
  %104 = load i32, ptr %11, align 4, !tbaa !5
  %105 = load i32, ptr @k, align 4, !tbaa !5
  %106 = icmp sge i32 %104, %105
  br i1 %106, label %107, label %142

107:                                              ; preds = %77
  %108 = load i64, ptr %4, align 8, !tbaa !12
  %109 = load i32, ptr %11, align 4, !tbaa !5
  %110 = load i32, ptr @k, align 4, !tbaa !5
  %111 = sub nsw i32 %109, %110
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %112
  %114 = load i8, ptr %113, align 1, !tbaa !9
  %115 = sext i8 %114 to i32
  %116 = sub nsw i32 %115, 97
  %117 = add nsw i32 %116, 1
  %118 = sext i32 %117 to i64
  %119 = load i64, ptr %6, align 8, !tbaa !12
  %120 = mul nsw i64 %118, %119
  %121 = srem i64 %120, 1000000007
  %122 = sub nsw i64 %108, %121
  %123 = add nsw i64 %122, 1000000007
  %124 = srem i64 %123, 1000000007
  store i64 %124, ptr %4, align 8, !tbaa !12
  %125 = load i64, ptr %5, align 8, !tbaa !12
  %126 = load i32, ptr %11, align 4, !tbaa !5
  %127 = load i32, ptr @k, align 4, !tbaa !5
  %128 = sub nsw i32 %126, %127
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !9
  %132 = sext i8 %131 to i32
  %133 = sub nsw i32 %132, 97
  %134 = add nsw i32 %133, 1
  %135 = sext i32 %134 to i64
  %136 = load i64, ptr %7, align 8, !tbaa !12
  %137 = mul nsw i64 %135, %136
  %138 = srem i64 %137, 1000000009
  %139 = sub nsw i64 %125, %138
  %140 = add nsw i64 %139, 1000000009
  %141 = srem i64 %140, 1000000009
  store i64 %141, ptr %5, align 8, !tbaa !12
  br label %142

142:                                              ; preds = %107, %77
  %143 = load i32, ptr %11, align 4, !tbaa !5
  %144 = load i32, ptr @k, align 4, !tbaa !5
  %145 = sub nsw i32 %144, 1
  %146 = icmp sge i32 %143, %145
  br i1 %146, label %147, label %160

147:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %148 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %149 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %150 = extractvalue { i64, i64 } %148, 0
  store i64 %150, ptr %149, align 8
  %151 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %152 = extractvalue { i64, i64 } %148, 1
  store i64 %152, ptr %151, align 8
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = load i32, ptr @k, align 4, !tbaa !5
  %155 = sub nsw i32 %153, %154
  %156 = add nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [2000200 x %"struct.std::pair"], ptr @s, i64 0, i64 %157
  %159 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSIxxEENSt9enable_ifIXsr6__and_ISt13is_assignableIRiOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 4 dereferenceable(8) %158, ptr noundef nonnull align 8 dereferenceable(16) %12)
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  br label %160

160:                                              ; preds = %147, %142
  br label %161

161:                                              ; preds = %160
  %162 = load i32, ptr %11, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %11, align 4, !tbaa !5
  br label %72, !llvm.loop !15

164:                                              ; preds = %76
  %165 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef @gn)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %216, %164
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = load i32, ptr @gn, align 4, !tbaa !5
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %171, label %170

170:                                              ; preds = %166
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %219

171:                                              ; preds = %166
  %172 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef @g)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i64 0, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %173

173:                                              ; preds = %205, %171
  %174 = load i32, ptr %17, align 4, !tbaa !5
  %175 = load i32, ptr @k, align 4, !tbaa !5
  %176 = icmp slt i32 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 14, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %208

178:                                              ; preds = %173
  %179 = load i64, ptr %15, align 8, !tbaa !12
  %180 = load i64, ptr %8, align 8, !tbaa !12
  %181 = mul nsw i64 %179, %180
  %182 = load i32, ptr %17, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100010 x i8], ptr @g, i64 0, i64 %183
  %185 = load i8, ptr %184, align 1, !tbaa !9
  %186 = sext i8 %185 to i32
  %187 = sub nsw i32 %186, 97
  %188 = add nsw i32 %187, 1
  %189 = sext i32 %188 to i64
  %190 = add nsw i64 %181, %189
  %191 = srem i64 %190, 1000000007
  store i64 %191, ptr %15, align 8, !tbaa !12
  %192 = load i64, ptr %16, align 8, !tbaa !12
  %193 = load i64, ptr %9, align 8, !tbaa !12
  %194 = mul nsw i64 %192, %193
  %195 = load i32, ptr %17, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100010 x i8], ptr @g, i64 0, i64 %196
  %198 = load i8, ptr %197, align 1, !tbaa !9
  %199 = sext i8 %198 to i32
  %200 = sub nsw i32 %199, 97
  %201 = add nsw i32 %200, 1
  %202 = sext i32 %201 to i64
  %203 = add nsw i64 %194, %202
  %204 = srem i64 %203, 1000000009
  store i64 %204, ptr %16, align 8, !tbaa !12
  br label %205

205:                                              ; preds = %178
  %206 = load i32, ptr %17, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %17, align 4, !tbaa !5
  br label %173, !llvm.loop !16

208:                                              ; preds = %177
  %209 = load i32, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %210 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %211 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %212 = extractvalue { i64, i64 } %210, 0
  store i64 %212, ptr %211, align 8
  %213 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %214 = extractvalue { i64, i64 } %210, 1
  store i64 %214, ptr %213, align 8
  call void @_ZNSt4pairIiiEC2IxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(16) %19)
  %215 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @gmp, ptr noundef nonnull align 4 dereferenceable(8) %18)
  store i32 %209, ptr %215, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %216

216:                                              ; preds = %208
  %217 = load i32, ptr %13, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %13, align 4, !tbaa !5
  br label %166, !llvm.loop !17

219:                                              ; preds = %170
  %220 = call noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @gmp) #6
  %221 = load i32, ptr @gn, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = icmp eq i64 %220, %222
  br i1 %223, label %224, label %225

224:                                              ; preds = %219
  br label %227

225:                                              ; preds = %219
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 64, ptr noundef @__PRETTY_FUNCTION__.main) #7
  unreachable

226:                                              ; No predecessors!
  br label %227

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

228:                                              ; preds = %237, %227
  %229 = load i32, ptr %20, align 4, !tbaa !5
  %230 = load i32, ptr @gn, align 4, !tbaa !5
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %228
  store i32 17, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %240

233:                                              ; preds = %228
  %234 = load i32, ptr %20, align 4, !tbaa !5
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %235
  store i8 0, ptr %236, align 1, !tbaa !18
  br label %237

237:                                              ; preds = %233
  %238 = load i32, ptr %20, align 4, !tbaa !5
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %20, align 4, !tbaa !5
  br label %228, !llvm.loop !20

240:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %314, %240
  %242 = load i32, ptr %21, align 4, !tbaa !5
  %243 = load i32, ptr @k, align 4, !tbaa !5
  %244 = icmp slt i32 %242, %243
  br i1 %244, label %246, label %245

245:                                              ; preds = %241
  store i32 20, ptr %14, align 4
  br label %317

246:                                              ; preds = %241
  store i32 0, ptr @acnt, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %247 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %247, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %248

248:                                              ; preds = %285, %246
  %249 = load i32, ptr %23, align 4, !tbaa !5
  %250 = load i32, ptr @n, align 4, !tbaa !5
  %251 = icmp slt i32 %249, %250
  br i1 %251, label %253, label %252

252:                                              ; preds = %248
  store i32 23, ptr %14, align 4
  br label %291

253:                                              ; preds = %248
  %254 = load i32, ptr %22, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [2000200 x %"struct.std::pair"], ptr @s, i64 0, i64 %255
  %257 = call noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) @gmp, ptr noundef nonnull align 4 dereferenceable(8) %256)
  %258 = icmp ne i64 %257, 0
  br i1 %258, label %259, label %283

259:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %260 = load i32, ptr %22, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [2000200 x %"struct.std::pair"], ptr @s, i64 0, i64 %261
  %263 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @gmp, ptr noundef nonnull align 4 dereferenceable(8) %262)
  %264 = load i32, ptr %263, align 4, !tbaa !5
  store i32 %264, ptr %24, align 4, !tbaa !5
  %265 = load i32, ptr %24, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %266
  %268 = load i8, ptr %267, align 1, !tbaa !18, !range !21, !noundef !22
  %269 = trunc i8 %268 to i1
  br i1 %269, label %270, label %271

270:                                              ; preds = %259
  store i32 23, ptr %14, align 4
  br label %280

271:                                              ; preds = %259
  %272 = load i32, ptr %24, align 4, !tbaa !5
  %273 = load i32, ptr @acnt, align 4, !tbaa !5
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr @acnt, align 4, !tbaa !5
  %275 = sext i32 %273 to i64
  %276 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %275
  store i32 %272, ptr %276, align 4, !tbaa !5
  %277 = load i32, ptr %24, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %278
  store i8 1, ptr %279, align 1, !tbaa !18
  store i32 0, ptr %14, align 4
  br label %280

280:                                              ; preds = %271, %270
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  %281 = load i32, ptr %14, align 4
  switch i32 %281, label %291 [
    i32 0, label %282
  ]

282:                                              ; preds = %280
  br label %284

283:                                              ; preds = %253
  store i32 23, ptr %14, align 4
  br label %291

284:                                              ; preds = %282
  br label %285

285:                                              ; preds = %284
  %286 = load i32, ptr %23, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %23, align 4, !tbaa !5
  %288 = load i32, ptr @k, align 4, !tbaa !5
  %289 = load i32, ptr %22, align 4, !tbaa !5
  %290 = add nsw i32 %289, %288
  store i32 %290, ptr %22, align 4, !tbaa !5
  br label %248, !llvm.loop !23

291:                                              ; preds = %283, %280, %252
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %292

292:                                              ; preds = %291
  %293 = load i32, ptr @acnt, align 4, !tbaa !5
  %294 = load i32, ptr @n, align 4, !tbaa !5
  %295 = icmp eq i32 %293, %294
  br i1 %295, label %296, label %297

296:                                              ; preds = %292
  store i32 20, ptr %14, align 4
  br label %317

297:                                              ; preds = %292
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %298

298:                                              ; preds = %310, %297
  %299 = load i32, ptr %25, align 4, !tbaa !5
  %300 = load i32, ptr @acnt, align 4, !tbaa !5
  %301 = icmp slt i32 %299, %300
  br i1 %301, label %303, label %302

302:                                              ; preds = %298
  store i32 26, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %313

303:                                              ; preds = %298
  %304 = load i32, ptr %25, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %305
  %307 = load i32, ptr %306, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %308
  store i8 0, ptr %309, align 1, !tbaa !18
  br label %310

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

313:                                              ; preds = %302
  br label %314

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

317:                                              ; preds = %296, %245
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %318

318:                                              ; preds = %317
  %319 = load i32, ptr @acnt, align 4, !tbaa !5
  %320 = load i32, ptr @n, align 4, !tbaa !5
  %321 = icmp eq i32 %319, %320
  br i1 %321, label %322, label %341

322:                                              ; preds = %318
  %323 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %324

324:                                              ; preds = %336, %322
  %325 = load i32, ptr %26, align 4, !tbaa !5
  %326 = load i32, ptr @acnt, align 4, !tbaa !5
  %327 = icmp slt i32 %325, %326
  br i1 %327, label %329, label %328

328:                                              ; preds = %324
  store i32 29, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %339

329:                                              ; preds = %324
  %330 = load i32, ptr %26, align 4, !tbaa !5
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %331
  %333 = load i32, ptr %332, align 4, !tbaa !5
  %334 = add nsw i32 %333, 1
  %335 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, i32 noundef %334)
  br label %336

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

339:                                              ; preds = %328
  %340 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %343

341:                                              ; preds = %318
  %342 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  br label %343

343:                                              ; preds = %341, %339
  store i32 0, ptr %1, align 4
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %344 = load i32, ptr %1, align 4
  ret i32 %344
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) #3 align 2

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

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = distinct !{!20, !11}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = distinct !{!23, !11}
!24 = distinct !{!24, !11}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !11}


; 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 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<int, int>, std::pair<const std::pair<int, int>, int>, std::_Select1st<std::pair<const std::pair<int, int>, int>>, std::less<std::pair<int, int>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::pair.0" = type { i64, i64 }

@n = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@gn = external dso_local global i32, align 4
@ans = external dso_local local_unnamed_addr global [100010 x i32], align 16
@acnt = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local global [2000200 x %"struct.std::pair"], align 16
@seen = external dso_local local_unnamed_addr global [100010 x i8], align 16
@cd = external dso_local global [2000200 x i8], align 16
@g = external dso_local global [100010 x i8], align 16
@gmp = external dso_local global %"class.std::map", align 8
@.str = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [117 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca %"struct.std::pair.0", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::pair", align 4
  %7 = alloca %"struct.std::pair.0", align 8
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @k)
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull @cd)
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = load i32, ptr @k, align 4, !tbaa !5
  %12 = mul nsw i32 %11, %10
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %iter.check, label %._crit_edge

iter.check:                                       ; preds = %0
  %14 = zext nneg i32 %12 to i64
  %min.iters.check = icmp ult i32 %12, 8
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check164 = icmp ult i32 %12, 32
  br i1 %min.iters.check164, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %14, 2147483616
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %15 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %index
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %wide.load = load <16 x i8>, ptr %15, align 16, !tbaa !9
  %wide.load165 = load <16 x i8>, ptr %16, align 16, !tbaa !9
  %17 = add nuw nsw i64 %index, %14
  %18 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %17
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  store <16 x i8> %wide.load, ptr %18, align 1, !tbaa !9
  store <16 x i8> %wide.load165, ptr %19, align 1, !tbaa !9
  %index.next = add nuw i64 %index, 32
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !10

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %14
  br i1 %cmp.n, label %._crit_edge, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %n.vec.remaining = and i64 %14, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph.preheader, label %vec.epilog.ph

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec167, %vec.epilog.middle.block ]
  br label %.lr.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec167 = and i64 %14, 2147483640
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index168 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next170, %vec.epilog.vector.body ]
  %21 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %index168
  %wide.load169 = load <8 x i8>, ptr %21, align 8, !tbaa !9
  %22 = add nuw nsw i64 %index168, %14
  %23 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %22
  store <8 x i8> %wide.load169, ptr %23, align 1, !tbaa !9
  %index.next170 = add nuw i64 %index168, 8
  %24 = icmp eq i64 %index.next170, %n.vec167
  br i1 %24, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !14

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n171 = icmp eq i64 %n.vec167, %14
  br i1 %cmp.n171, label %._crit_edge, label %.lr.ph.preheader

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %vec.epilog.middle.block, %0
  %25 = shl i32 %12, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  store i64 0, ptr %1, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  store i64 0, ptr %2, align 8, !tbaa !15
  %26 = icmp sgt i32 %11, 0
  br i1 %26, label %.lr.ph86.preheader, label %.preheader80

.lr.ph86.preheader:                               ; preds = %._crit_edge
  %xtraiter = and i32 %11, 1
  %27 = icmp eq i32 %11, 1
  br i1 %27, label %.preheader80.loopexit.unr-lcssa, label %.lr.ph86.preheader.new

.lr.ph86.preheader.new:                           ; preds = %.lr.ph86.preheader
  %unroll_iter = and i32 %11, 2147483646
  br label %.lr.ph86

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %28 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %indvars.iv
  %29 = load i8, ptr %28, align 1, !tbaa !9
  %30 = add nuw nsw i64 %indvars.iv, %14
  %31 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %30
  store i8 %29, ptr %31, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %14
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

.preheader80.loopexit.unr-lcssa.loopexit:         ; preds = %.lr.ph86
  %32 = mul nsw i64 %42, 647
  %33 = srem i64 %32, 1000000007
  %34 = mul nsw i64 %44, 2797
  %35 = srem i64 %34, 1000000009
  br label %.preheader80.loopexit.unr-lcssa

.preheader80.loopexit.unr-lcssa:                  ; preds = %.preheader80.loopexit.unr-lcssa.loopexit, %.lr.ph86.preheader
  %.lcssa175.ph = phi i64 [ poison, %.lr.ph86.preheader ], [ %42, %.preheader80.loopexit.unr-lcssa.loopexit ]
  %.lcssa174.ph = phi i64 [ poison, %.lr.ph86.preheader ], [ %44, %.preheader80.loopexit.unr-lcssa.loopexit ]
  %.07083.unr = phi i64 [ 2797, %.lr.ph86.preheader ], [ %35, %.preheader80.loopexit.unr-lcssa.loopexit ]
  %.07182.unr = phi i64 [ 647, %.lr.ph86.preheader ], [ %33, %.preheader80.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  %.lcssa175 = select i1 %lcmp.mod.not, i64 %.lcssa175.ph, i64 %.07182.unr
  %.lcssa174 = select i1 %lcmp.mod.not, i64 %.lcssa174.ph, i64 %.07083.unr
  br label %.preheader80

.preheader80:                                     ; preds = %.preheader80.loopexit.unr-lcssa, %._crit_edge
  %.071.lcssa = phi i64 [ 1, %._crit_edge ], [ %.lcssa175, %.preheader80.loopexit.unr-lcssa ]
  %.070.lcssa = phi i64 [ 1, %._crit_edge ], [ %.lcssa174, %.preheader80.loopexit.unr-lcssa ]
  br i1 %13, label %.lr.ph89, label %._crit_edge90

.lr.ph89:                                         ; preds = %.preheader80
  %36 = getelementptr inbounds i8, ptr %3, i64 8
  %smax = tail call i32 @llvm.smax.i32(i32 %25, i32 1)
  %wide.trip.count127 = zext nneg i32 %smax to i64
  br label %49

.lr.ph86:                                         ; preds = %.lr.ph86, %.lr.ph86.preheader.new
  %.07083 = phi i64 [ 1, %.lr.ph86.preheader.new ], [ %44, %.lr.ph86 ]
  %.07182 = phi i64 [ 1, %.lr.ph86.preheader.new ], [ %42, %.lr.ph86 ]
  %niter = phi i32 [ 0, %.lr.ph86.preheader.new ], [ %niter.next.1, %.lr.ph86 ]
  %37 = mul nsw i64 %.07182, 647
  %38 = srem i64 %37, 1000000007
  %39 = mul nsw i64 %.07083, 2797
  %40 = srem i64 %39, 1000000009
  %41 = mul nsw i64 %38, 647
  %42 = srem i64 %41, 1000000007
  %43 = mul nsw i64 %40, 2797
  %44 = srem i64 %43, 1000000009
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader80.loopexit.unr-lcssa.loopexit, label %.lr.ph86, !llvm.loop !18

._crit_edge90:                                    ; preds = %96, %.preheader80
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull @gn)
  %46 = load i32, ptr @gn, align 4, !tbaa !5
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %.lr.ph99, label %._crit_edge100

.lr.ph99:                                         ; preds = %._crit_edge90
  %48 = getelementptr inbounds i8, ptr %7, i64 8
  br label %104

49:                                               ; preds = %.lr.ph89, %96
  %50 = phi i32 [ %11, %.lr.ph89 ], [ %97, %96 ]
  %indvars.iv124 = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next125.pre-phi, %96 ]
  %51 = load i64, ptr %1, align 8, !tbaa !15
  %52 = mul nsw i64 %51, 647
  %53 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %indvars.iv124
  %54 = load i8, ptr %53, align 1, !tbaa !9
  %55 = sext i8 %54 to i64
  %56 = add nsw i64 %55, -96
  %57 = add nsw i64 %56, %52
  %58 = srem i64 %57, 1000000007
  store i64 %58, ptr %1, align 8, !tbaa !15
  %59 = load i64, ptr %2, align 8, !tbaa !15
  %60 = mul nsw i64 %59, 2797
  %61 = add nsw i64 %60, %56
  %62 = srem i64 %61, 1000000009
  store i64 %62, ptr %2, align 8, !tbaa !15
  %63 = sext i32 %50 to i64
  %.not74 = icmp slt i64 %indvars.iv124, %63
  br i1 %.not74, label %82, label %64

64:                                               ; preds = %49
  %65 = trunc nuw nsw i64 %indvars.iv124 to i32
  %66 = sub nsw i32 %65, %50
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2000200 x i8], ptr @cd, i64 0, i64 %67
  %69 = load i8, ptr %68, align 1, !tbaa !9
  %70 = sext i8 %69 to i64
  %71 = add nsw i64 %70, -96
  %72 = mul nsw i64 %71, %.071.lcssa
  %73 = srem i64 %72, 1000000007
  %74 = add nsw i64 %58, 1000000007
  %75 = sub nsw i64 %74, %73
  %76 = srem i64 %75, 1000000007
  store i64 %76, ptr %1, align 8, !tbaa !15
  %77 = mul nsw i64 %71, %.070.lcssa
  %78 = srem i64 %77, 1000000009
  %79 = add nsw i64 %62, 1000000009
  %80 = sub nsw i64 %79, %78
  %81 = srem i64 %80, 1000000009
  store i64 %81, ptr %2, align 8, !tbaa !15
  br label %82

82:                                               ; preds = %64, %49
  %83 = add nsw i32 %50, -1
  %84 = sext i32 %83 to i64
  %.not75 = icmp slt i64 %indvars.iv124, %84
  br i1 %.not75, label %._crit_edge154, label %85

._crit_edge154:                                   ; preds = %82
  %.pre155 = add nuw nsw i64 %indvars.iv124, 1
  br label %96

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #8
  %86 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %87 = extractvalue { i64, i64 } %86, 0
  store i64 %87, ptr %3, align 8
  %88 = extractvalue { i64, i64 } %86, 1
  store i64 %88, ptr %36, align 8
  %89 = load i32, ptr @k, align 4, !tbaa !5
  %90 = add nuw nsw i64 %indvars.iv124, 1
  %91 = trunc nuw nsw i64 %90 to i32
  %92 = sub i32 %91, %89
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [2000200 x %"struct.std::pair"], ptr @s, i64 0, i64 %93
  %95 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt4pairIiiEaSIxxEENSt9enable_ifIXsr6__and_ISt13is_assignableIRiOT_ES3_IS4_OT0_EEE5valueERS0_E4typeEOS_IS5_S8_E(ptr noundef nonnull align 4 dereferenceable(8) %94, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #8
  %.pre = load i32, ptr @k, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %._crit_edge154, %85
  %indvars.iv.next125.pre-phi = phi i64 [ %.pre155, %._crit_edge154 ], [ %90, %85 ]
  %97 = phi i32 [ %50, %._crit_edge154 ], [ %.pre, %85 ]
  %exitcond128.not = icmp eq i64 %indvars.iv.next125.pre-phi, %wide.trip.count127
  br i1 %exitcond128.not, label %._crit_edge90, label %49, !llvm.loop !19

._crit_edge100:                                   ; preds = %108, %._crit_edge90
  %98 = call noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) @gmp) #8
  %99 = load i32, ptr @gn, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = icmp eq i64 %98, %100
  br i1 %101, label %.preheader79, label %128

.preheader79:                                     ; preds = %._crit_edge100
  %102 = icmp sgt i32 %99, 0
  br i1 %102, label %.lr.ph102.preheader, label %.preheader78

.lr.ph102.preheader:                              ; preds = %.preheader79
  %103 = zext nneg i32 %99 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @seen, i8 0, i64 %103, i1 false), !tbaa !20
  br label %.preheader78

104:                                              ; preds = %.lr.ph99, %108
  %.06697 = phi i32 [ 0, %.lr.ph99 ], [ %113, %108 ]
  %105 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull @g)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store i64 0, ptr %4, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store i64 0, ptr %5, align 8, !tbaa !15
  %106 = load i32, ptr @k, align 4, !tbaa !5
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %.lr.ph94.preheader, label %108

.lr.ph94.preheader:                               ; preds = %104
  %wide.trip.count132 = zext nneg i32 %106 to i64
  br label %.lr.ph94

._crit_edge95:                                    ; preds = %.lr.ph94
  store i64 %124, ptr %4, align 8, !tbaa !15
  store i64 %127, ptr %5, align 8, !tbaa !15
  br label %108

108:                                              ; preds = %._crit_edge95, %104
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %109 = call { i64, i64 } @_ZSt9make_pairIRxS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %110 = extractvalue { i64, i64 } %109, 0
  store i64 %110, ptr %7, align 8
  %111 = extractvalue { i64, i64 } %109, 1
  store i64 %111, ptr %48, align 8
  call void @_ZNSt4pairIiiEC2IxxTnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE22_MoveConstructiblePairIS3_S4_EEclsr6_PCCFPIS3_S4_EE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS_IS3_S4_E(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48) @gmp, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store i32 %.06697, ptr %112, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %113 = add nuw nsw i32 %.06697, 1
  %114 = load i32, ptr @gn, align 4, !tbaa !5
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %104, label %._crit_edge100, !llvm.loop !22

.lr.ph94:                                         ; preds = %.lr.ph94.preheader, %.lr.ph94
  %indvars.iv129 = phi i64 [ 0, %.lr.ph94.preheader ], [ %indvars.iv.next130, %.lr.ph94 ]
  %116 = phi i64 [ 0, %.lr.ph94.preheader ], [ %124, %.lr.ph94 ]
  %117 = phi i64 [ 0, %.lr.ph94.preheader ], [ %127, %.lr.ph94 ]
  %118 = mul nsw i64 %116, 647
  %119 = getelementptr inbounds [100010 x i8], ptr @g, i64 0, i64 %indvars.iv129
  %120 = load i8, ptr %119, align 1, !tbaa !9
  %121 = sext i8 %120 to i64
  %122 = add nsw i64 %121, -96
  %123 = add nsw i64 %122, %118
  %124 = srem i64 %123, 1000000007
  %125 = mul nsw i64 %117, 2797
  %126 = add nsw i64 %125, %122
  %127 = srem i64 %126, 1000000009
  %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1
  %exitcond133.not = icmp eq i64 %indvars.iv.next130, %wide.trip.count132
  br i1 %exitcond133.not, label %._crit_edge95, label %.lr.ph94, !llvm.loop !23

128:                                              ; preds = %._crit_edge100
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 64, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

.preheader78:                                     ; preds = %.lr.ph102.preheader, %.preheader79
  %129 = load i32, ptr @k, align 4, !tbaa !5
  %130 = icmp sgt i32 %129, 0
  br i1 %130, label %.lr.ph113.preheader, label %.preheader78..critedge._crit_edge_crit_edge

.preheader78..critedge._crit_edge_crit_edge:      ; preds = %.preheader78
  %.pre149 = load i32, ptr @acnt, align 4, !tbaa !5
  %.pre150 = load i32, ptr @n, align 4, !tbaa !5
  br label %.critedge._crit_edge

.lr.ph113.preheader:                              ; preds = %.preheader78
  %.pre146 = load i32, ptr @n, align 4, !tbaa !5
  br label %.lr.ph113

.lr.ph113:                                        ; preds = %.lr.ph113.preheader, %._crit_edge111
  %131 = phi i32 [ %160, %._crit_edge111 ], [ %.pre146, %.lr.ph113.preheader ]
  %.062112 = phi i32 [ %162, %._crit_edge111 ], [ 0, %.lr.ph113.preheader ]
  store i32 0, ptr @acnt, align 4, !tbaa !5
  %132 = icmp sgt i32 %131, 0
  br i1 %132, label %.lr.ph106, label %.critedge.thread

.lr.ph106:                                        ; preds = %.lr.ph113, %143
  %.060104 = phi i32 [ %147, %143 ], [ 0, %.lr.ph113 ]
  %.061103 = phi i32 [ %149, %143 ], [ %.062112, %.lr.ph113 ]
  %133 = sext i32 %.061103 to i64
  %134 = getelementptr inbounds [2000200 x %"struct.std::pair"], ptr @s, i64 0, i64 %133
  %135 = call noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48) @gmp, ptr noundef nonnull align 4 dereferenceable(8) %134)
  %.not = icmp eq i64 %135, 0
  br i1 %.not, label %.lr.ph106..critedge.loopexit_crit_edge, label %136

.lr.ph106..critedge.loopexit_crit_edge:           ; preds = %.lr.ph106
  %.pre147.pre = load i32, ptr @acnt, align 4, !tbaa !5
  br label %.critedge

136:                                              ; preds = %.lr.ph106
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) @gmp, ptr noundef nonnull align 4 dereferenceable(8) %134)
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %139
  %141 = load i8, ptr %140, align 1, !tbaa !20, !range !24, !noundef !25
  %142 = trunc nuw i8 %141 to i1
  %.pre147.pre151 = load i32, ptr @acnt, align 4, !tbaa !5
  br i1 %142, label %.critedge, label %143

143:                                              ; preds = %136
  %144 = add nsw i32 %.pre147.pre151, 1
  store i32 %144, ptr @acnt, align 4, !tbaa !5
  %145 = sext i32 %.pre147.pre151 to i64
  %146 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %145
  store i32 %138, ptr %146, align 4, !tbaa !5
  store i8 1, ptr %140, align 1, !tbaa !20
  %147 = add nuw nsw i32 %.060104, 1
  %148 = load i32, ptr @k, align 4, !tbaa !5
  %149 = add nsw i32 %148, %.061103
  %150 = load i32, ptr @n, align 4, !tbaa !5
  %151 = icmp slt i32 %147, %150
  br i1 %151, label %.lr.ph106, label %.critedge, !llvm.loop !26

.critedge:                                        ; preds = %143, %136, %.lr.ph106..critedge.loopexit_crit_edge
  %.pre147 = phi i32 [ %.pre147.pre, %.lr.ph106..critedge.loopexit_crit_edge ], [ %.pre147.pre151, %136 ], [ %144, %143 ]
  %.pre148 = load i32, ptr @n, align 4, !tbaa !5
  %152 = icmp eq i32 %.pre147, %.pre148
  br i1 %152, label %.critedge._crit_edge, label %.preheader

.critedge.thread:                                 ; preds = %.lr.ph113
  %153 = icmp eq i32 %131, 0
  br i1 %153, label %.critedge._crit_edge, label %._crit_edge111

.preheader:                                       ; preds = %.critedge
  %154 = icmp sgt i32 %.pre147, 0
  br i1 %154, label %.lr.ph110.preheader, label %._crit_edge111

.lr.ph110.preheader:                              ; preds = %.preheader
  %wide.trip.count140 = zext nneg i32 %.pre147 to i64
  %xtraiter178 = and i64 %wide.trip.count140, 3
  %155 = icmp ult i32 %.pre147, 4
  br i1 %155, label %._crit_edge111.loopexit.unr-lcssa, label %.lr.ph110.preheader.new

.lr.ph110.preheader.new:                          ; preds = %.lr.ph110.preheader
  %unroll_iter180 = and i64 %wide.trip.count140, 2147483644
  br label %.lr.ph110

._crit_edge111.loopexit.unr-lcssa:                ; preds = %.lr.ph110, %.lr.ph110.preheader
  %indvars.iv137.unr = phi i64 [ 0, %.lr.ph110.preheader ], [ %indvars.iv.next138.3, %.lr.ph110 ]
  %lcmp.mod179.not = icmp eq i64 %xtraiter178, 0
  br i1 %lcmp.mod179.not, label %._crit_edge111, label %.lr.ph110.epil

.lr.ph110.epil:                                   ; preds = %._crit_edge111.loopexit.unr-lcssa, %.lr.ph110.epil
  %indvars.iv137.epil = phi i64 [ %indvars.iv.next138.epil, %.lr.ph110.epil ], [ %indvars.iv137.unr, %._crit_edge111.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph110.epil ], [ 0, %._crit_edge111.loopexit.unr-lcssa ]
  %156 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %indvars.iv137.epil
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %158
  store i8 0, ptr %159, align 1, !tbaa !20
  %indvars.iv.next138.epil = add nuw nsw i64 %indvars.iv137.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter178
  br i1 %epil.iter.cmp.not, label %._crit_edge111, label %.lr.ph110.epil, !llvm.loop !27

._crit_edge111:                                   ; preds = %._crit_edge111.loopexit.unr-lcssa, %.lr.ph110.epil, %.critedge.thread, %.preheader
  %160 = phi i32 [ %.pre148, %.preheader ], [ %131, %.critedge.thread ], [ %.pre148, %.lr.ph110.epil ], [ %.pre148, %._crit_edge111.loopexit.unr-lcssa ]
  %161 = phi i32 [ %.pre147, %.preheader ], [ 0, %.critedge.thread ], [ %.pre147, %.lr.ph110.epil ], [ %.pre147, %._crit_edge111.loopexit.unr-lcssa ]
  %162 = add nuw nsw i32 %.062112, 1
  %163 = load i32, ptr @k, align 4, !tbaa !5
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %.lr.ph113, label %.critedge._crit_edge, !llvm.loop !29

.lr.ph110:                                        ; preds = %.lr.ph110, %.lr.ph110.preheader.new
  %indvars.iv137 = phi i64 [ 0, %.lr.ph110.preheader.new ], [ %indvars.iv.next138.3, %.lr.ph110 ]
  %niter181 = phi i64 [ 0, %.lr.ph110.preheader.new ], [ %niter181.next.3, %.lr.ph110 ]
  %165 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %indvars.iv137
  %166 = load i32, ptr %165, align 16, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %167
  store i8 0, ptr %168, align 1, !tbaa !20
  %indvars.iv.next138 = or disjoint i64 %indvars.iv137, 1
  %169 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %indvars.iv.next138
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %171
  store i8 0, ptr %172, align 1, !tbaa !20
  %indvars.iv.next138.1 = or disjoint i64 %indvars.iv137, 2
  %173 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %indvars.iv.next138.1
  %174 = load i32, ptr %173, align 8, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %175
  store i8 0, ptr %176, align 1, !tbaa !20
  %indvars.iv.next138.2 = or disjoint i64 %indvars.iv137, 3
  %177 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %indvars.iv.next138.2
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100010 x i8], ptr @seen, i64 0, i64 %179
  store i8 0, ptr %180, align 1, !tbaa !20
  %indvars.iv.next138.3 = add nuw nsw i64 %indvars.iv137, 4
  %niter181.next.3 = add i64 %niter181, 4
  %niter181.ncmp.3 = icmp eq i64 %niter181.next.3, %unroll_iter180
  br i1 %niter181.ncmp.3, label %._crit_edge111.loopexit.unr-lcssa, label %.lr.ph110, !llvm.loop !30

.critedge._crit_edge:                             ; preds = %._crit_edge111, %.critedge, %.critedge.thread, %.preheader78..critedge._crit_edge_crit_edge
  %181 = phi i32 [ %.pre150, %.preheader78..critedge._crit_edge_crit_edge ], [ %160, %._crit_edge111 ], [ %.pre148, %.critedge ], [ 0, %.critedge.thread ]
  %182 = phi i32 [ %.pre149, %.preheader78..critedge._crit_edge_crit_edge ], [ %161, %._crit_edge111 ], [ %.pre147, %.critedge ], [ 0, %.critedge.thread ]
  %183 = icmp eq i32 %182, %181
  br i1 %183, label %184, label %._crit_edge118

184:                                              ; preds = %.critedge._crit_edge
  %185 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %186 = load i32, ptr @acnt, align 4, !tbaa !5
  %187 = icmp sgt i32 %186, 0
  br i1 %187, label %.lr.ph117, label %._crit_edge118

.lr.ph117:                                        ; preds = %184, %.lr.ph117
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %.lr.ph117 ], [ 0, %184 ]
  %188 = getelementptr inbounds [100010 x i32], ptr @ans, i64 0, i64 %indvars.iv142
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  %191 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, i32 noundef %190)
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %192 = load i32, ptr @acnt, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = icmp slt i64 %indvars.iv.next143, %193
  br i1 %194, label %.lr.ph117, label %._crit_edge118, !llvm.loop !31

._crit_edge118:                                   ; preds = %.lr.ph117, %.critedge._crit_edge, %184
  %.str.10.sink = phi ptr [ @.str.9, %184 ], [ @.str.10, %.critedge._crit_edge ], [ @.str.9, %.lr.ph117 ]
  %195 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.10.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  ret i32 0
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixEOS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEE5countERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapISt4pairIiiEiSt4lessIS1_ESaIS0_IKS1_iEEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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

attributes #0 = { 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 #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11, !12, !13}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !11, !12, !13}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = distinct !{!17, !11, !13, !12}
!18 = distinct !{!18, !11}
!19 = distinct !{!19, !11}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = distinct !{!22, !11}
!23 = distinct !{!23, !11}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = distinct !{!26, !11}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !11}
!30 = distinct !{!30, !11}
!31 = distinct !{!31, !11}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass