; LLVM IR from tangjz/acm-icpc :: codeforces/gym (102055J)

; 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.Hash = type { i32, i32 }

@pw = external dso_local global [300001 x %struct.Hash], align 16
@ipw = external dso_local global [300001 x %struct.Hash], align 16
@hh = external dso_local global [300001 x %struct.Hash], align 16
@ihh = external dso_local global [300001 x %struct.Hash], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@itot = external dso_local global i32, align 4
@a = external dso_local global [300001 x i32], align 16
@b = external dso_local global [300001 x i32], align 16
@que = external dso_local global [300001 x i32], align 16
@ique = external dso_local global [300001 x i32], align 16
@ban = external dso_local global [300001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Hash, align 4
  %3 = alloca %struct.Hash, align 4
  %4 = alloca %struct.Hash, align 4
  %5 = alloca i32, align 4
  %6 = alloca %struct.Hash, align 4
  %7 = alloca %struct.Hash, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.Hash, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.Hash, align 4
  %19 = alloca %struct.Hash, align 4
  %20 = alloca %struct.Hash, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.Hash, align 4
  %23 = alloca %struct.Hash, align 4
  %24 = alloca %struct.Hash, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.Hash, align 4
  %29 = alloca %struct.Hash, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #9
  %37 = getelementptr inbounds %struct.Hash, ptr %2, i32 0, i32 0
  store i32 1, ptr %37, align 4, !tbaa !5
  %38 = getelementptr inbounds %struct.Hash, ptr %2, i32 0, i32 1
  store i32 1, ptr %38, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @ipw, ptr align 4 %2, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @pw, ptr align 4 @ipw, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #9
  %39 = getelementptr inbounds %struct.Hash, ptr %3, i32 0, i32 0
  store i32 300017, ptr %39, align 4, !tbaa !5
  %40 = getelementptr inbounds %struct.Hash, ptr %3, i32 0, i32 1
  store i32 300017, ptr %40, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([300001 x %struct.Hash], ptr @pw, i64 0, i64 1), ptr align 4 %3, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #9
  %41 = getelementptr inbounds %struct.Hash, ptr %4, i32 0, i32 0
  %42 = call noundef i32 @_Z7mod_invii(i32 noundef 300017, i32 noundef 1000000007)
  store i32 %42, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds %struct.Hash, ptr %4, i32 0, i32 1
  %44 = call noundef i32 @_Z7mod_invii(i32 noundef 300017, i32 noundef 1000000009)
  store i32 %44, ptr %43, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([300001 x %struct.Hash], ptr @ipw, i64 0, i64 1), ptr align 4 %4, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  store i32 2, ptr %5, align 4, !tbaa !12
  br label %45

45:                                               ; preds = %66, %0
  %46 = load i32, ptr %5, align 4, !tbaa !12
  %47 = icmp slt i32 %46, 300001
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %69

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  %50 = load i32, ptr %5, align 4, !tbaa !12
  %51 = sub nsw i32 %50, 1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [300001 x %struct.Hash], ptr @pw, i64 0, i64 %52
  %54 = call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %53, ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds ([300001 x %struct.Hash], ptr @pw, i64 0, i64 1))
  store i64 %54, ptr %6, align 4
  %55 = load i32, ptr %5, align 4, !tbaa !12
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [300001 x %struct.Hash], ptr @pw, i64 0, i64 %56
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %57, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %58 = load i32, ptr %5, align 4, !tbaa !12
  %59 = sub nsw i32 %58, 1
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [300001 x %struct.Hash], ptr @ipw, i64 0, i64 %60
  %62 = call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %61, ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds ([300001 x %struct.Hash], ptr @ipw, i64 0, i64 1))
  store i64 %62, ptr %7, align 4
  %63 = load i32, ptr %5, align 4, !tbaa !12
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [300001 x %struct.Hash], ptr @ipw, i64 0, i64 %64
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %65, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %66

66:                                               ; preds = %49
  %67 = load i32, ptr %5, align 4, !tbaa !12
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %5, align 4, !tbaa !12
  br label %45, !llvm.loop !13

69:                                               ; preds = %48
  %70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 1, ptr %8, align 4, !tbaa !12
  br label %71

71:                                               ; preds = %404, %69
  %72 = load i32, ptr %8, align 4, !tbaa !12
  %73 = load i32, ptr @t, align 4, !tbaa !12
  %74 = icmp sle i32 %72, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %71
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %407

76:                                               ; preds = %71
  %77 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !12
  br label %78

78:                                               ; preds = %88, %76
  %79 = load i32, ptr %10, align 4, !tbaa !12
  %80 = load i32, ptr @n, align 4, !tbaa !12
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  br label %91

83:                                               ; preds = %78
  %84 = load i32, ptr %10, align 4, !tbaa !12
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr @a, i64 %85
  %87 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %86)
  br label %88

88:                                               ; preds = %83
  %89 = load i32, ptr %10, align 4, !tbaa !12
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %10, align 4, !tbaa !12
  br label %78, !llvm.loop !15

91:                                               ; preds = %82
  %92 = load i32, ptr @n, align 4, !tbaa !12
  %93 = sext i32 %92 to i64
  %94 = mul i64 %93, 1
  call void @llvm.memset.p0.i64(ptr align 16 @ban, i8 0, i64 %94, i1 false)
  br label %95

95:                                               ; preds = %99, %91
  %96 = load i32, ptr @m, align 4, !tbaa !12
  %97 = add nsw i32 %96, -1
  store i32 %97, ptr @m, align 4, !tbaa !12
  %98 = icmp ne i32 %96, 0
  br i1 %98, label %99, label %105

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  %100 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %11)
  %101 = load i32, ptr %11, align 4, !tbaa !12
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr %11, align 4, !tbaa !12
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [300001 x i8], ptr @ban, i64 0, i64 %103
  store i8 1, ptr %104, align 1, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %95, !llvm.loop !18

105:                                              ; preds = %95
  %106 = load i32, ptr @n, align 4, !tbaa !12
  %107 = sext i32 %106 to i64
  %108 = mul i64 %107, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @b, ptr align 16 @a, i64 %108, i1 false)
  %109 = load i32, ptr @n, align 4, !tbaa !12
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i32, ptr @b, i64 %110
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef @b, ptr noundef %111)
  %112 = load i32, ptr @n, align 4, !tbaa !12
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i32, ptr @b, i64 %113
  %115 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef @b, ptr noundef %114)
  %116 = ptrtoint ptr %115 to i64
  %117 = sub i64 %116, ptrtoint (ptr @b to i64)
  %118 = sdiv exact i64 %117, 4
  %119 = trunc i64 %118 to i32
  store i32 %119, ptr @m, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !12
  br label %120

120:                                              ; preds = %140, %105
  %121 = load i32, ptr %12, align 4, !tbaa !12
  %122 = load i32, ptr @n, align 4, !tbaa !12
  %123 = icmp slt i32 %121, %122
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %143

125:                                              ; preds = %120
  %126 = load i32, ptr @m, align 4, !tbaa !12
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds i32, ptr @b, i64 %127
  %129 = load i32, ptr %12, align 4, !tbaa !12
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %130
  %132 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef @b, ptr noundef %128, ptr noundef nonnull align 4 dereferenceable(4) %131)
  %133 = ptrtoint ptr %132 to i64
  %134 = sub i64 %133, ptrtoint (ptr @b to i64)
  %135 = sdiv exact i64 %134, 4
  %136 = trunc i64 %135 to i32
  %137 = load i32, ptr %12, align 4, !tbaa !12
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %138
  store i32 %136, ptr %139, align 4, !tbaa !12
  br label %140

140:                                              ; preds = %125
  %141 = load i32, ptr %12, align 4, !tbaa !12
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %12, align 4, !tbaa !12
  br label %120, !llvm.loop !19

143:                                              ; preds = %124
  store i32 0, ptr @itot, align 4, !tbaa !12
  store i32 0, ptr @tot, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %144 = getelementptr inbounds %struct.Hash, ptr %13, i32 0, i32 0
  store i32 0, ptr %144, align 4, !tbaa !5
  %145 = getelementptr inbounds %struct.Hash, ptr %13, i32 0, i32 1
  store i32 0, ptr %145, align 4, !tbaa !10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @ihh, ptr align 4 %13, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @hh, ptr align 4 @ihh, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !12
  br label %146

146:                                              ; preds = %349, %143
  %147 = load i32, ptr %14, align 4, !tbaa !12
  %148 = load i32, ptr @n, align 4, !tbaa !12
  %149 = icmp slt i32 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %146
  store i32 16, ptr %9, align 4
  br label %350

151:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %152 = load i32, ptr @tot, align 4, !tbaa !12
  store i32 %152, ptr %15, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %153 = load i32, ptr @itot, align 4, !tbaa !12
  store i32 %153, ptr %16, align 4, !tbaa !12
  br label %154

154:                                              ; preds = %182, %151
  %155 = load i32, ptr %14, align 4, !tbaa !12
  %156 = load i32, ptr @n, align 4, !tbaa !12
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %158, label %185

158:                                              ; preds = %154
  %159 = load i32, ptr %14, align 4, !tbaa !12
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !12
  %163 = load i32, ptr @tot, align 4, !tbaa !12
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr @tot, align 4, !tbaa !12
  %165 = sext i32 %163 to i64
  %166 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %165
  store i32 %162, ptr %166, align 4, !tbaa !12
  %167 = load i32, ptr %14, align 4, !tbaa !12
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !12
  %171 = load i32, ptr @itot, align 4, !tbaa !12
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr @itot, align 4, !tbaa !12
  %173 = sext i32 %171 to i64
  %174 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %173
  store i32 %170, ptr %174, align 4, !tbaa !12
  %175 = load i32, ptr %14, align 4, !tbaa !12
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [300001 x i8], ptr @ban, i64 0, i64 %176
  %178 = load i8, ptr %177, align 1, !tbaa !16, !range !20, !noundef !21
  %179 = trunc i8 %178 to i1
  br i1 %179, label %181, label %180

180:                                              ; preds = %158
  br label %185

181:                                              ; preds = %158
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %14, align 4, !tbaa !12
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %14, align 4, !tbaa !12
  br label %154, !llvm.loop !22

185:                                              ; preds = %180, %154
  %186 = load i32, ptr %14, align 4, !tbaa !12
  %187 = load i32, ptr @n, align 4, !tbaa !12
  %188 = icmp eq i32 %186, %187
  br i1 %188, label %189, label %191

189:                                              ; preds = %185
  %190 = load i32, ptr %16, align 4, !tbaa !12
  store i32 %190, ptr @itot, align 4, !tbaa !12
  store i32 16, ptr %9, align 4
  br label %347

191:                                              ; preds = %185
  %192 = load i32, ptr %14, align 4, !tbaa !12
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %14, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %194 = load i32, ptr %15, align 4, !tbaa !12
  store i32 %194, ptr %17, align 4, !tbaa !12
  br label %195

195:                                              ; preds = %225, %191
  %196 = load i32, ptr %17, align 4, !tbaa !12
  %197 = load i32, ptr @tot, align 4, !tbaa !12
  %198 = icmp slt i32 %196, %197
  br i1 %198, label %200, label %199

199:                                              ; preds = %195
  store i32 21, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %228

200:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %201 = load i32, ptr %17, align 4, !tbaa !12
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [300001 x %struct.Hash], ptr @hh, i64 0, i64 %202
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %204 = load i32, ptr %17, align 4, !tbaa !12
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [300001 x %struct.Hash], ptr @pw, i64 0, i64 %205
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %207 = getelementptr inbounds %struct.Hash, ptr %20, i32 0, i32 0
  %208 = load i32, ptr %17, align 4, !tbaa !12
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %209
  %211 = load i32, ptr %210, align 4, !tbaa !12
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %207, align 4, !tbaa !5
  %213 = getelementptr inbounds %struct.Hash, ptr %20, i32 0, i32 1
  %214 = load i32, ptr %17, align 4, !tbaa !12
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !12
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %213, align 4, !tbaa !10
  %219 = call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %206, ptr noundef nonnull align 4 dereferenceable(8) %20)
  store i64 %219, ptr %19, align 4
  %220 = call i64 @_ZNK4HashplERKS_(ptr noundef nonnull align 4 dereferenceable(8) %203, ptr noundef nonnull align 4 dereferenceable(8) %19)
  store i64 %220, ptr %18, align 4
  %221 = load i32, ptr %17, align 4, !tbaa !12
  %222 = add nsw i32 %221, 1
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [300001 x %struct.Hash], ptr @hh, i64 0, i64 %223
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %224, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %225

225:                                              ; preds = %200
  %226 = load i32, ptr %17, align 4, !tbaa !12
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr %17, align 4, !tbaa !12
  br label %195, !llvm.loop !23

228:                                              ; preds = %199
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #9
  %229 = load i32, ptr %16, align 4, !tbaa !12
  store i32 %229, ptr %21, align 4, !tbaa !12
  br label %230

230:                                              ; preds = %260, %228
  %231 = load i32, ptr %21, align 4, !tbaa !12
  %232 = load i32, ptr @itot, align 4, !tbaa !12
  %233 = icmp slt i32 %231, %232
  br i1 %233, label %235, label %234

234:                                              ; preds = %230
  store i32 24, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %263

235:                                              ; preds = %230
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  %236 = load i32, ptr %21, align 4, !tbaa !12
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [300001 x %struct.Hash], ptr @ihh, i64 0, i64 %237
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %239 = load i32, ptr %21, align 4, !tbaa !12
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [300001 x %struct.Hash], ptr @ipw, i64 0, i64 %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %242 = getelementptr inbounds %struct.Hash, ptr %24, i32 0, i32 0
  %243 = load i32, ptr %21, align 4, !tbaa !12
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !12
  %247 = add nsw i32 %246, 1
  store i32 %247, ptr %242, align 4, !tbaa !5
  %248 = getelementptr inbounds %struct.Hash, ptr %24, i32 0, i32 1
  %249 = load i32, ptr %21, align 4, !tbaa !12
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !12
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %248, align 4, !tbaa !10
  %254 = call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %241, ptr noundef nonnull align 4 dereferenceable(8) %24)
  store i64 %254, ptr %23, align 4
  %255 = call i64 @_ZNK4HashplERKS_(ptr noundef nonnull align 4 dereferenceable(8) %238, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store i64 %255, ptr %22, align 4
  %256 = load i32, ptr %21, align 4, !tbaa !12
  %257 = add nsw i32 %256, 1
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [300001 x %struct.Hash], ptr @ihh, i64 0, i64 %258
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %259, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %260

260:                                              ; preds = %235
  %261 = load i32, ptr %21, align 4, !tbaa !12
  %262 = add nsw i32 %261, 1
  store i32 %262, ptr %21, align 4, !tbaa !12
  br label %230, !llvm.loop !24

263:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  store i32 0, ptr %25, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %264 = load i32, ptr %15, align 4, !tbaa !12
  %265 = load i32, ptr @itot, align 4, !tbaa !12
  %266 = add nsw i32 %264, %265
  store i32 %266, ptr %26, align 4, !tbaa !12
  br label %267

267:                                              ; preds = %291, %263
  %268 = load i32, ptr %25, align 4, !tbaa !12
  %269 = load i32, ptr %26, align 4, !tbaa !12
  %270 = icmp slt i32 %268, %269
  br i1 %270, label %271, label %292

271:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  %272 = load i32, ptr %25, align 4, !tbaa !12
  %273 = load i32, ptr %26, align 4, !tbaa !12
  %274 = add nsw i32 %272, %273
  %275 = add nsw i32 %274, 1
  %276 = ashr i32 %275, 1
  store i32 %276, ptr %27, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %277 = load i32, ptr %15, align 4, !tbaa !12
  %278 = load i32, ptr @itot, align 4, !tbaa !12
  %279 = load i32, ptr %27, align 4, !tbaa !12
  %280 = call i64 @_Z13getPrefixHashiii(i32 noundef %277, i32 noundef %278, i32 noundef %279)
  store i64 %280, ptr %28, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %281 = load i32, ptr @tot, align 4, !tbaa !12
  %282 = load i32, ptr %16, align 4, !tbaa !12
  %283 = load i32, ptr %27, align 4, !tbaa !12
  %284 = call i64 @_Z13getPrefixHashiii(i32 noundef %281, i32 noundef %282, i32 noundef %283)
  store i64 %284, ptr %29, align 4
  %285 = call noundef zeroext i1 @_ZNK4HasheqERKS_(ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(8) %29)
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br i1 %285, label %286, label %288

286:                                              ; preds = %271
  %287 = load i32, ptr %27, align 4, !tbaa !12
  store i32 %287, ptr %25, align 4, !tbaa !12
  br label %291

288:                                              ; preds = %271
  %289 = load i32, ptr %27, align 4, !tbaa !12
  %290 = sub nsw i32 %289, 1
  store i32 %290, ptr %26, align 4, !tbaa !12
  br label %291

291:                                              ; preds = %288, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %267, !llvm.loop !25

292:                                              ; preds = %267
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #9
  %293 = load i32, ptr %25, align 4, !tbaa !12
  %294 = load i32, ptr @itot, align 4, !tbaa !12
  %295 = icmp slt i32 %293, %294
  br i1 %295, label %296, label %304

296:                                              ; preds = %292
  %297 = load i32, ptr @itot, align 4, !tbaa !12
  %298 = load i32, ptr %25, align 4, !tbaa !12
  %299 = sub nsw i32 %297, %298
  %300 = sub nsw i32 %299, 1
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %301
  %303 = load i32, ptr %302, align 4, !tbaa !12
  br label %311

304:                                              ; preds = %292
  %305 = load i32, ptr %25, align 4, !tbaa !12
  %306 = load i32, ptr @itot, align 4, !tbaa !12
  %307 = sub nsw i32 %305, %306
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !12
  br label %311

311:                                              ; preds = %304, %296
  %312 = phi i32 [ %303, %296 ], [ %310, %304 ]
  store i32 %312, ptr %30, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  %313 = load i32, ptr %25, align 4, !tbaa !12
  %314 = load i32, ptr %16, align 4, !tbaa !12
  %315 = icmp slt i32 %313, %314
  br i1 %315, label %316, label %324

316:                                              ; preds = %311
  %317 = load i32, ptr %16, align 4, !tbaa !12
  %318 = load i32, ptr %25, align 4, !tbaa !12
  %319 = sub nsw i32 %317, %318
  %320 = sub nsw i32 %319, 1
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %321
  %323 = load i32, ptr %322, align 4, !tbaa !12
  br label %331

324:                                              ; preds = %311
  %325 = load i32, ptr %25, align 4, !tbaa !12
  %326 = load i32, ptr %16, align 4, !tbaa !12
  %327 = sub nsw i32 %325, %326
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %328
  %330 = load i32, ptr %329, align 4, !tbaa !12
  br label %331

331:                                              ; preds = %324, %316
  %332 = phi i32 [ %323, %316 ], [ %330, %324 ]
  store i32 %332, ptr %31, align 4, !tbaa !12
  %333 = load i32, ptr %25, align 4, !tbaa !12
  %334 = load i32, ptr %15, align 4, !tbaa !12
  %335 = load i32, ptr @itot, align 4, !tbaa !12
  %336 = add nsw i32 %334, %335
  %337 = icmp eq i32 %333, %336
  br i1 %337, label %342, label %338

338:                                              ; preds = %331
  %339 = load i32, ptr %30, align 4, !tbaa !12
  %340 = load i32, ptr %31, align 4, !tbaa !12
  %341 = icmp sge i32 %339, %340
  br i1 %341, label %342, label %344

342:                                              ; preds = %338, %331
  %343 = load i32, ptr %16, align 4, !tbaa !12
  store i32 %343, ptr @itot, align 4, !tbaa !12
  br label %346

344:                                              ; preds = %338
  %345 = load i32, ptr %15, align 4, !tbaa !12
  store i32 %345, ptr @tot, align 4, !tbaa !12
  br label %346

346:                                              ; preds = %344, %342
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  store i32 0, ptr %9, align 4
  br label %347

347:                                              ; preds = %346, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  %348 = load i32, ptr %9, align 4
  switch i32 %348, label %350 [
    i32 0, label %349
  ]

349:                                              ; preds = %347
  br label %146, !llvm.loop !26

350:                                              ; preds = %347, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %351

351:                                              ; preds = %350
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  store i32 37, ptr %32, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  store i32 20181125, ptr %33, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #9
  store i32 0, ptr %34, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #9
  %352 = load i32, ptr @tot, align 4, !tbaa !12
  %353 = sub nsw i32 %352, 1
  store i32 %353, ptr %35, align 4, !tbaa !12
  br label %354

354:                                              ; preds = %373, %351
  %355 = load i32, ptr %35, align 4, !tbaa !12
  %356 = icmp sge i32 %355, 0
  br i1 %356, label %358, label %357

357:                                              ; preds = %354
  store i32 29, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #9
  br label %376

358:                                              ; preds = %354
  %359 = load i32, ptr %34, align 4, !tbaa !12
  %360 = sext i32 %359 to i64
  %361 = mul nsw i64 %360, 37
  %362 = load i32, ptr %35, align 4, !tbaa !12
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %363
  %365 = load i32, ptr %364, align 4, !tbaa !12
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %366
  %368 = load i32, ptr %367, align 4, !tbaa !12
  %369 = sext i32 %368 to i64
  %370 = add nsw i64 %361, %369
  %371 = srem i64 %370, 20181125
  %372 = trunc i64 %371 to i32
  store i32 %372, ptr %34, align 4, !tbaa !12
  br label %373

373:                                              ; preds = %358
  %374 = load i32, ptr %35, align 4, !tbaa !12
  %375 = add nsw i32 %374, -1
  store i32 %375, ptr %35, align 4, !tbaa !12
  br label %354, !llvm.loop !27

376:                                              ; preds = %357
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #9
  store i32 0, ptr %36, align 4, !tbaa !12
  br label %377

377:                                              ; preds = %397, %376
  %378 = load i32, ptr %36, align 4, !tbaa !12
  %379 = load i32, ptr @itot, align 4, !tbaa !12
  %380 = icmp slt i32 %378, %379
  br i1 %380, label %382, label %381

381:                                              ; preds = %377
  store i32 32, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #9
  br label %400

382:                                              ; preds = %377
  %383 = load i32, ptr %34, align 4, !tbaa !12
  %384 = sext i32 %383 to i64
  %385 = mul nsw i64 %384, 37
  %386 = load i32, ptr %36, align 4, !tbaa !12
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %387
  %389 = load i32, ptr %388, align 4, !tbaa !12
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %390
  %392 = load i32, ptr %391, align 4, !tbaa !12
  %393 = sext i32 %392 to i64
  %394 = add nsw i64 %385, %393
  %395 = srem i64 %394, 20181125
  %396 = trunc i64 %395 to i32
  store i32 %396, ptr %34, align 4, !tbaa !12
  br label %397

397:                                              ; preds = %382
  %398 = load i32, ptr %36, align 4, !tbaa !12
  %399 = add nsw i32 %398, 1
  store i32 %399, ptr %36, align 4, !tbaa !12
  br label %377, !llvm.loop !28

400:                                              ; preds = %381
  %401 = load i32, ptr %8, align 4, !tbaa !12
  %402 = load i32, ptr %34, align 4, !tbaa !12
  %403 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %401, i32 noundef %402)
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %404

404:                                              ; preds = %400
  %405 = load i32, ptr %8, align 4, !tbaa !12
  %406 = add nsw i32 %405, 1
  store i32 %406, ptr %8, align 4, !tbaa !12
  br label %71, !llvm.loop !29

407:                                              ; preds = %75
  ret i32 0
}

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z13getPrefixHashiii(i32 noundef, i32 noundef, i32 noundef) #7

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

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

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


; 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.Hash = type { i32, i32 }

@pw = external dso_local global [300001 x %struct.Hash], align 16
@ipw = external dso_local global [300001 x %struct.Hash], align 16
@hh = external dso_local global [300001 x %struct.Hash], align 16
@ihh = external dso_local global [300001 x %struct.Hash], align 16
@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@itot = external dso_local local_unnamed_addr global i32, align 4
@a = external dso_local global [300001 x i32], align 16
@b = external dso_local global [300001 x i32], align 16
@que = external dso_local local_unnamed_addr global [300001 x i32], align 16
@ique = external dso_local local_unnamed_addr global [300001 x i32], align 16
@ban = external dso_local local_unnamed_addr global [300001 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.Hash, align 8
  %3 = alloca %struct.Hash, align 4
  %4 = alloca %struct.Hash, align 8
  %5 = alloca %struct.Hash, align 4
  %6 = alloca %struct.Hash, align 8
  %7 = alloca %struct.Hash, align 8
  store i32 1, ptr @ipw, align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @ipw, i64 4), align 4, !tbaa !5
  %8 = load i64, ptr @ipw, align 16
  store i64 %8, ptr @pw, align 16
  store i32 300017, ptr getelementptr inbounds (i8, ptr @pw, i64 8), align 8, !tbaa !5
  store i32 300017, ptr getelementptr inbounds (i8, ptr @pw, i64 12), align 4, !tbaa !5
  %9 = tail call noundef i32 @_Z7mod_invii(i32 noundef 300017, i32 noundef 1000000007)
  %10 = tail call noundef i32 @_Z7mod_invii(i32 noundef 300017, i32 noundef 1000000009)
  store i32 %9, ptr getelementptr inbounds (i8, ptr @ipw, i64 8), align 8, !tbaa !5
  store i32 %10, ptr getelementptr inbounds (i8, ptr @ipw, i64 12), align 4, !tbaa !5
  br label %16

11:                                               ; preds = %16
  %12 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %13 = load i32, ptr @t, align 4, !tbaa !5
  %.not153 = icmp slt i32 %13, 1
  br i1 %.not153, label %._crit_edge157, label %.lr.ph156

.lr.ph156:                                        ; preds = %11
  %14 = getelementptr inbounds i8, ptr %3, i64 4
  %15 = getelementptr inbounds i8, ptr %5, i64 4
  br label %24

16:                                               ; preds = %0, %16
  %indvars.iv = phi i64 [ 2, %0 ], [ %indvars.iv.next, %16 ]
  %17 = add nsw i64 %indvars.iv, -1
  %18 = getelementptr inbounds [300001 x %struct.Hash], ptr @pw, i64 0, i64 %17
  %19 = tail call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @pw, i64 8))
  %20 = getelementptr inbounds [300001 x %struct.Hash], ptr @pw, i64 0, i64 %indvars.iv
  store i64 %19, ptr %20, align 8
  %21 = getelementptr inbounds [300001 x %struct.Hash], ptr @ipw, i64 0, i64 %17
  %22 = tail call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @ipw, i64 8))
  %23 = getelementptr inbounds [300001 x %struct.Hash], ptr @ipw, i64 0, i64 %indvars.iv
  store i64 %22, ptr %23, align 8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 300001
  br i1 %exitcond.not, label %11, label %16, !llvm.loop !9

._crit_edge157:                                   ; preds = %._crit_edge151, %11
  ret i32 0

24:                                               ; preds = %.lr.ph156, %._crit_edge151
  %.090154 = phi i32 [ 1, %.lr.ph156 ], [ %201, %._crit_edge151 ]
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %24
  %.pre201 = sext i32 %26 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi202 = phi i64 [ %.pre201, %.._crit_edge_crit_edge ], [ %33, %.lr.ph ]
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @ban, i8 0, i64 %.pre-phi202, i1 false)
  %28 = load i32, ptr @m, align 4, !tbaa !5
  %29 = add nsw i32 %28, -1
  store i32 %29, ptr @m, align 4, !tbaa !5
  %.not108119 = icmp eq i32 %28, 0
  br i1 %.not108119, label %._crit_edge122, label %.lr.ph121

.lr.ph:                                           ; preds = %24, %.lr.ph
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %.lr.ph ], [ 0, %24 ]
  %30 = getelementptr inbounds i32, ptr @a, i64 %indvars.iv166
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %30)
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = icmp slt i64 %indvars.iv.next167, %33
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !11

.lr.ph121:                                        ; preds = %._crit_edge, %.lr.ph121
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = add nsw i32 %36, -1
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [300001 x i8], ptr @ban, i64 0, i64 %38
  store i8 1, ptr %39, align 1, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  %40 = load i32, ptr @m, align 4, !tbaa !5
  %41 = add nsw i32 %40, -1
  store i32 %41, ptr @m, align 4, !tbaa !5
  %.not108 = icmp eq i32 %40, 0
  br i1 %.not108, label %._crit_edge122.loopexit, label %.lr.ph121, !llvm.loop !14

._crit_edge122.loopexit:                          ; preds = %.lr.ph121
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %.pre200 = sext i32 %.pre to i64
  br label %._crit_edge122

._crit_edge122:                                   ; preds = %._crit_edge122.loopexit, %._crit_edge
  %.pre-phi = phi i64 [ %.pre200, %._crit_edge122.loopexit ], [ %.pre-phi202, %._crit_edge ]
  %42 = shl nsw i64 %.pre-phi, 2
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @b, ptr nonnull align 16 @a, i64 %42, i1 false)
  %43 = getelementptr inbounds i32, ptr @b, i64 %.pre-phi
  call void @_ZSt4sortIPiEvT_S1_(ptr noundef nonnull @b, ptr noundef nonnull %43)
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr @b, i64 %45
  %47 = call noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef nonnull @b, ptr noundef nonnull %46)
  %48 = ptrtoint ptr %47 to i64
  %49 = sub i64 %48, ptrtoint (ptr @b to i64)
  %50 = lshr exact i64 %49, 2
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr @m, align 4, !tbaa !5
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.lr.ph125, label %._crit_edge126

._crit_edge126:                                   ; preds = %.lr.ph125, %._crit_edge122
  store i32 0, ptr @itot, align 4, !tbaa !5
  store i32 0, ptr @tot, align 4, !tbaa !5
  store i32 0, ptr @ihh, align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @ihh, i64 4), align 4, !tbaa !5
  %54 = load i64, ptr @ihh, align 16
  store i64 %54, ptr @hh, align 16
  %55 = load i32, ptr @n, align 4, !tbaa !5
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph245, label %.loopexit.loopexit

.lr.ph125:                                        ; preds = %._crit_edge122, %.lr.ph125
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %.lr.ph125 ], [ 0, %._crit_edge122 ]
  %57 = load i32, ptr @m, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr @b, i64 %58
  %60 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %indvars.iv169
  %61 = call noundef ptr @_ZSt11lower_boundIPiiET_S1_S1_RKT0_(ptr noundef nonnull @b, ptr noundef nonnull %59, ptr noundef nonnull align 4 dereferenceable(4) %60)
  %62 = ptrtoint ptr %61 to i64
  %63 = sub i64 %62, ptrtoint (ptr @b to i64)
  %64 = lshr exact i64 %63, 2
  %65 = trunc i64 %64 to i32
  store i32 %65, ptr %60, align 4, !tbaa !5
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = icmp slt i64 %indvars.iv.next170, %67
  br i1 %68, label %.lr.ph125, label %._crit_edge126, !llvm.loop !15

.lr.ph245:                                        ; preds = %._crit_edge126, %151
  %69 = phi i32 [ %153, %151 ], [ %55, %._crit_edge126 ]
  %.098244 = phi i32 [ %93, %151 ], [ 0, %._crit_edge126 ]
  %70 = phi i32 [ %152, %151 ], [ 0, %._crit_edge126 ]
  %71 = load i32, ptr @tot, align 4, !tbaa !5
  %72 = sext i32 %.098244 to i64
  %73 = sext i32 %69 to i64
  %74 = sext i32 %71 to i64
  %75 = sext i32 %70 to i64
  br label %76

76:                                               ; preds = %.lr.ph245, %84
  %indvars.iv176 = phi i64 [ %75, %.lr.ph245 ], [ %indvars.iv.next177, %84 ]
  %indvars.iv174 = phi i64 [ %74, %.lr.ph245 ], [ %indvars.iv.next175, %84 ]
  %indvars.iv172 = phi i64 [ %72, %.lr.ph245 ], [ %indvars.iv.next173, %84 ]
  %77 = getelementptr inbounds [300001 x i32], ptr @a, i64 0, i64 %indvars.iv172
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %indvars.iv.next175 = add nsw i64 %indvars.iv174, 1
  %79 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %indvars.iv174
  store i32 %78, ptr %79, align 4, !tbaa !5
  %indvars.iv.next177 = add nsw i64 %indvars.iv176, 1
  %80 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %indvars.iv176
  store i32 %78, ptr %80, align 4, !tbaa !5
  %81 = getelementptr inbounds [300001 x i8], ptr @ban, i64 0, i64 %indvars.iv172
  %82 = load i8, ptr %81, align 1, !tbaa !12, !range !16, !noundef !17
  %83 = trunc nuw i8 %82 to i1
  br i1 %83, label %84, label %87

84:                                               ; preds = %76
  %indvars.iv.next173 = add nsw i64 %indvars.iv172, 1
  %exitcond183.not = icmp eq i64 %indvars.iv.next173, %73
  br i1 %exitcond183.not, label %.thread203, label %76, !llvm.loop !18

.thread203:                                       ; preds = %84
  %85 = add i32 %71, %69
  %86 = sub i32 %85, %.098244
  store i32 %86, ptr @tot, align 4, !tbaa !5
  br label %.thread

87:                                               ; preds = %76
  %88 = trunc nsw i64 %indvars.iv172 to i32
  %89 = trunc nsw i64 %indvars.iv.next175 to i32
  %90 = trunc nsw i64 %indvars.iv.next177 to i32
  store i32 %89, ptr @tot, align 4, !tbaa !5
  store i32 %90, ptr @itot, align 4, !tbaa !5
  %.not111 = icmp eq i32 %69, %88
  br i1 %.not111, label %.thread, label %92

.thread:                                          ; preds = %87, %.thread203
  %91 = phi i32 [ %86, %.thread203 ], [ %89, %87 ]
  store i32 %70, ptr @itot, align 4, !tbaa !5
  br label %.loopexit

92:                                               ; preds = %87
  %93 = add nsw i32 %88, 1
  %94 = icmp slt i32 %71, %89
  br i1 %94, label %.lr.ph132, label %.preheader

.preheader.loopexit:                              ; preds = %.lr.ph132
  %.pre197 = load i32, ptr @itot, align 4, !tbaa !5
  br label %.preheader

.preheader:                                       ; preds = %.preheader.loopexit, %92
  %95 = phi i32 [ %.pre197, %.preheader.loopexit ], [ %90, %92 ]
  %96 = icmp slt i32 %70, %95
  br i1 %96, label %.lr.ph134, label %._crit_edge135

.lr.ph132:                                        ; preds = %92, %.lr.ph132
  %indvars.iv184 = phi i64 [ %indvars.iv.next185, %.lr.ph132 ], [ %74, %92 ]
  %97 = getelementptr inbounds [300001 x %struct.Hash], ptr @hh, i64 0, i64 %indvars.iv184
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #9
  %98 = getelementptr inbounds [300001 x %struct.Hash], ptr @pw, i64 0, i64 %indvars.iv184
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #9
  %99 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %indvars.iv184
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %3, align 4, !tbaa !19
  store i32 %101, ptr %14, align 4, !tbaa !21
  %102 = call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %98, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store i64 %102, ptr %2, align 8
  %103 = call i64 @_ZNK4HashplERKS_(ptr noundef nonnull align 4 dereferenceable(8) %97, ptr noundef nonnull align 4 dereferenceable(8) %2)
  %indvars.iv.next185 = add nsw i64 %indvars.iv184, 1
  %104 = getelementptr inbounds [300001 x %struct.Hash], ptr @hh, i64 0, i64 %indvars.iv.next185
  store i64 %103, ptr %104, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #9
  %105 = load i32, ptr @tot, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = icmp slt i64 %indvars.iv.next185, %106
  br i1 %107, label %.lr.ph132, label %.preheader.loopexit, !llvm.loop !22

._crit_edge135:                                   ; preds = %.lr.ph134, %.preheader
  %.lcssa115 = phi i32 [ %95, %.preheader ], [ %118, %.lr.ph134 ]
  %108 = add nsw i32 %.lcssa115, %71
  %109 = icmp sgt i32 %108, 0
  br i1 %109, label %.lr.ph140, label %._crit_edge141

.lr.ph134:                                        ; preds = %.preheader, %.lr.ph134
  %indvars.iv187 = phi i64 [ %indvars.iv.next188, %.lr.ph134 ], [ %75, %.preheader ]
  %110 = getelementptr inbounds [300001 x %struct.Hash], ptr @ihh, i64 0, i64 %indvars.iv187
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %111 = getelementptr inbounds [300001 x %struct.Hash], ptr @ipw, i64 0, i64 %indvars.iv187
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %112 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %indvars.iv187
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = add nsw i32 %113, 1
  store i32 %114, ptr %5, align 4, !tbaa !19
  store i32 %114, ptr %15, align 4, !tbaa !21
  %115 = call i64 @_ZNK4HashmlERKS_(ptr noundef nonnull align 4 dereferenceable(8) %111, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store i64 %115, ptr %4, align 8
  %116 = call i64 @_ZNK4HashplERKS_(ptr noundef nonnull align 4 dereferenceable(8) %110, ptr noundef nonnull align 4 dereferenceable(8) %4)
  %indvars.iv.next188 = add nsw i64 %indvars.iv187, 1
  %117 = getelementptr inbounds [300001 x %struct.Hash], ptr @ihh, i64 0, i64 %indvars.iv.next188
  store i64 %116, ptr %117, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  %118 = load i32, ptr @itot, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = icmp slt i64 %indvars.iv.next188, %119
  br i1 %120, label %.lr.ph134, label %._crit_edge135, !llvm.loop !23

.lr.ph140:                                        ; preds = %._crit_edge135, %.lr.ph140
  %.094138 = phi i32 [ %.195, %.lr.ph140 ], [ %108, %._crit_edge135 ]
  %.096137 = phi i32 [ %.197, %.lr.ph140 ], [ 0, %._crit_edge135 ]
  %121 = add nuw nsw i32 %.096137, 1
  %122 = add nuw nsw i32 %121, %.094138
  %123 = lshr i32 %122, 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %124 = load i32, ptr @itot, align 4, !tbaa !5
  %125 = call i64 @_Z13getPrefixHashiii(i32 noundef %71, i32 noundef %124, i32 noundef %123)
  store i64 %125, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %126 = load i32, ptr @tot, align 4, !tbaa !5
  %127 = call i64 @_Z13getPrefixHashiii(i32 noundef %126, i32 noundef %70, i32 noundef %123)
  store i64 %127, ptr %7, align 8
  %128 = call noundef zeroext i1 @_ZNK4HasheqERKS_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %129 = add nsw i32 %123, -1
  %.197 = select i1 %128, i32 %123, i32 %.096137
  %.195 = select i1 %128, i32 %.094138, i32 %129
  %130 = icmp slt i32 %.197, %.195
  br i1 %130, label %.lr.ph140, label %._crit_edge141.loopexit, !llvm.loop !24

._crit_edge141.loopexit:                          ; preds = %.lr.ph140
  %.pre198 = load i32, ptr @itot, align 4, !tbaa !5
  br label %._crit_edge141

._crit_edge141:                                   ; preds = %._crit_edge141.loopexit, %._crit_edge135
  %131 = phi i32 [ %.lcssa115, %._crit_edge135 ], [ %.pre198, %._crit_edge141.loopexit ]
  %.096.lcssa = phi i32 [ 0, %._crit_edge135 ], [ %.197, %._crit_edge141.loopexit ]
  %132 = add nsw i32 %131, %71
  %133 = icmp eq i32 %.096.lcssa, %132
  br i1 %133, label %149, label %134

134:                                              ; preds = %._crit_edge141
  %135 = icmp slt i32 %.096.lcssa, %70
  %que.sink225 = select i1 %135, ptr @ique, ptr @que
  %136 = xor i32 %.096.lcssa, -1
  %137 = add i32 %70, %136
  %138 = sub nsw i32 %.096.lcssa, %70
  %.sink226 = select i1 %135, i32 %137, i32 %138
  %139 = sext i32 %.sink226 to i64
  %140 = getelementptr inbounds [300001 x i32], ptr %que.sink225, i64 0, i64 %139
  %141 = icmp slt i32 %.096.lcssa, %131
  %que.sink = select i1 %141, ptr @ique, ptr @que
  %142 = xor i32 %.096.lcssa, -1
  %143 = add i32 %131, %142
  %144 = sub nsw i32 %.096.lcssa, %131
  %.sink224 = select i1 %141, i32 %143, i32 %144
  %145 = sext i32 %.sink224 to i64
  %146 = getelementptr inbounds [300001 x i32], ptr %que.sink, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = load i32, ptr %140, align 4, !tbaa !5
  %.not110 = icmp slt i32 %147, %148
  br i1 %.not110, label %150, label %149

149:                                              ; preds = %134, %._crit_edge141
  store i32 %70, ptr @itot, align 4, !tbaa !5
  br label %151

150:                                              ; preds = %134
  store i32 %71, ptr @tot, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %149, %150
  %152 = phi i32 [ %70, %149 ], [ %131, %150 ]
  %153 = load i32, ptr @n, align 4, !tbaa !5
  %154 = icmp slt i32 %93, %153
  br i1 %154, label %.lr.ph245, label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %151, %._crit_edge126
  %.lcssa237 = phi i32 [ 0, %._crit_edge126 ], [ %152, %151 ]
  %.pre199 = load i32, ptr @tot, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.thread
  %155 = phi i32 [ %.lcssa237, %.loopexit.loopexit ], [ %70, %.thread ]
  %156 = phi i32 [ %.pre199, %.loopexit.loopexit ], [ %91, %.thread ]
  %157 = icmp sgt i32 %156, 0
  br i1 %157, label %.lr.ph146.preheader, label %.preheader114

.lr.ph146.preheader:                              ; preds = %.loopexit
  %158 = zext nneg i32 %156 to i64
  %xtraiter = and i64 %158, 1
  %159 = icmp eq i32 %156, 1
  br i1 %159, label %.preheader114.loopexit.unr-lcssa, label %.lr.ph146.preheader.new

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

.preheader114.loopexit.unr-lcssa:                 ; preds = %.lr.ph146, %.lr.ph146.preheader
  %.lcssa264.ph = phi i64 [ poison, %.lr.ph146.preheader ], [ %189, %.lr.ph146 ]
  %indvars.iv190.unr = phi i64 [ %158, %.lr.ph146.preheader ], [ %indvars.iv.next191.1, %.lr.ph146 ]
  %.088143.unr = phi i64 [ 0, %.lr.ph146.preheader ], [ %189, %.lr.ph146 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader114.loopexit, label %.lr.ph146.epil

.lr.ph146.epil:                                   ; preds = %.preheader114.loopexit.unr-lcssa
  %indvars.iv.next191.epil = add nsw i64 %indvars.iv190.unr, -1
  %sext.epil = mul nsw i64 %.088143.unr, 158913789952
  %160 = ashr exact i64 %sext.epil, 32
  %161 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %indvars.iv.next191.epil
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = add nsw i64 %160, %166
  %168 = srem i64 %167, 20181125
  br label %.preheader114.loopexit

.preheader114.loopexit:                           ; preds = %.preheader114.loopexit.unr-lcssa, %.lr.ph146.epil
  %.lcssa264 = phi i64 [ %.lcssa264.ph, %.preheader114.loopexit.unr-lcssa ], [ %168, %.lr.ph146.epil ]
  %169 = trunc nsw i64 %.lcssa264 to i32
  br label %.preheader114

.preheader114:                                    ; preds = %.preheader114.loopexit, %.loopexit
  %.088.lcssa = phi i32 [ 0, %.loopexit ], [ %169, %.preheader114.loopexit ]
  %170 = icmp sgt i32 %155, 0
  br i1 %170, label %.lr.ph150.preheader, label %._crit_edge151

.lr.ph150.preheader:                              ; preds = %.preheader114
  %wide.trip.count = zext nneg i32 %155 to i64
  %xtraiter267 = and i64 %wide.trip.count, 1
  %171 = icmp eq i32 %155, 1
  br i1 %171, label %._crit_edge151.loopexit.unr-lcssa, label %.lr.ph150.preheader.new

.lr.ph150.preheader.new:                          ; preds = %.lr.ph150.preheader
  %unroll_iter270 = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph150

.lr.ph146:                                        ; preds = %.lr.ph146, %.lr.ph146.preheader.new
  %indvars.iv190 = phi i64 [ %158, %.lr.ph146.preheader.new ], [ %indvars.iv.next191.1, %.lr.ph146 ]
  %.088143 = phi i64 [ 0, %.lr.ph146.preheader.new ], [ %189, %.lr.ph146 ]
  %niter = phi i64 [ 0, %.lr.ph146.preheader.new ], [ %niter.next.1, %.lr.ph146 ]
  %indvars.iv.next191 = add nsw i64 %indvars.iv190, -1
  %sext = mul nsw i64 %.088143, 158913789952
  %172 = ashr exact i64 %sext, 32
  %173 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %indvars.iv.next191
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = add nsw i64 %172, %178
  %180 = srem i64 %179, 20181125
  %indvars.iv.next191.1 = add nsw i64 %indvars.iv190, -2
  %sext.1 = mul nsw i64 %180, 158913789952
  %181 = ashr exact i64 %sext.1, 32
  %182 = getelementptr inbounds [300001 x i32], ptr @que, i64 0, i64 %indvars.iv.next191.1
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = add nsw i64 %181, %187
  %189 = srem i64 %188, 20181125
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1.not = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1.not, label %.preheader114.loopexit.unr-lcssa, label %.lr.ph146, !llvm.loop !25

._crit_edge151.loopexit.unr-lcssa:                ; preds = %.lr.ph150, %.lr.ph150.preheader
  %.lcssa265.ph = phi i32 [ poison, %.lr.ph150.preheader ], [ %221, %.lr.ph150 ]
  %indvars.iv193.unr = phi i64 [ 0, %.lr.ph150.preheader ], [ %indvars.iv.next194.1, %.lr.ph150 ]
  %.1148.unr = phi i32 [ %.088.lcssa, %.lr.ph150.preheader ], [ %221, %.lr.ph150 ]
  %lcmp.mod268.not = icmp eq i64 %xtraiter267, 0
  br i1 %lcmp.mod268.not, label %._crit_edge151, label %.lr.ph150.epil

.lr.ph150.epil:                                   ; preds = %._crit_edge151.loopexit.unr-lcssa
  %narrow.epil = mul nsw i32 %.1148.unr, 37
  %190 = sext i32 %narrow.epil to i64
  %191 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %indvars.iv193.unr
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = add nsw i64 %196, %190
  %198 = srem i64 %197, 20181125
  %199 = trunc nsw i64 %198 to i32
  br label %._crit_edge151

._crit_edge151:                                   ; preds = %.lr.ph150.epil, %._crit_edge151.loopexit.unr-lcssa, %.preheader114
  %.1.lcssa = phi i32 [ %.088.lcssa, %.preheader114 ], [ %.lcssa265.ph, %._crit_edge151.loopexit.unr-lcssa ], [ %199, %.lr.ph150.epil ]
  %200 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.090154, i32 noundef %.1.lcssa)
  %201 = add nuw nsw i32 %.090154, 1
  %202 = load i32, ptr @t, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.090154, %202
  br i1 %.not.not, label %24, label %._crit_edge157, !llvm.loop !26

.lr.ph150:                                        ; preds = %.lr.ph150, %.lr.ph150.preheader.new
  %indvars.iv193 = phi i64 [ 0, %.lr.ph150.preheader.new ], [ %indvars.iv.next194.1, %.lr.ph150 ]
  %.1148 = phi i32 [ %.088.lcssa, %.lr.ph150.preheader.new ], [ %221, %.lr.ph150 ]
  %niter271 = phi i64 [ 0, %.lr.ph150.preheader.new ], [ %niter271.next.1, %.lr.ph150 ]
  %narrow = mul nsw i32 %.1148, 37
  %203 = sext i32 %narrow to i64
  %204 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %indvars.iv193
  %205 = load i32, ptr %204, align 8, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = add nsw i64 %209, %203
  %211 = srem i64 %210, 20181125
  %indvars.iv.next194 = or disjoint i64 %indvars.iv193, 1
  %sext272 = mul nsw i64 %211, 158913789952
  %212 = ashr exact i64 %sext272, 32
  %213 = getelementptr inbounds [300001 x i32], ptr @ique, i64 0, i64 %indvars.iv.next194
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [300001 x i32], ptr @b, i64 0, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = add nsw i64 %212, %218
  %220 = srem i64 %219, 20181125
  %221 = trunc nsw i64 %220 to i32
  %indvars.iv.next194.1 = add nuw nsw i64 %indvars.iv193, 2
  %niter271.next.1 = add i64 %niter271, 2
  %niter271.ncmp.1 = icmp eq i64 %niter271.next.1, %unroll_iter270
  br i1 %niter271.ncmp.1, label %._crit_edge151.loopexit.unr-lcssa, label %.lr.ph150, !llvm.loop !27
}

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6uniqueIPiET_S1_S1_(ptr noundef, ptr noundef) local_unnamed_addr #7

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_Z13getPrefixHashiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #7

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

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

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


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