; LLVM IR from tangjz/acm-icpc :: codeforces/complete (1043G)

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

@buf = external dso_local global [200001 x i8], align 16
@n = external dso_local global i32, align 4
@rk = external dso_local global [200001 x i32], align 16
@ht = external dso_local global [200001 x i32], align 16
@Log = external dso_local global [200001 x i32], align 16
@st = external dso_local global [19 x [200001 x i32]], align 16
@rk2 = external dso_local global [200001 x i32], align 16
@st2 = external dso_local global [19 x [200001 x i32]], align 16
@c = external dso_local global [27 x [200001 x i32]], align 16
@pL = external dso_local global [200001 x i32], align 16
@pR = external dso_local global [200001 x i32], align 16
@st3 = external dso_local global [19 x [200001 x i32]], align 16
@dsuL = external dso_local global [200001 x i32], align 16
@dsuR = external dso_local global [200001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11SuffixArrayv() #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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @buf)
  store i32 -1, ptr @Log, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %38, %0
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = ashr i32 %29, 1
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %36
  store i32 %34, ptr %37, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %28
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !5
  br label %23, !llvm.loop !9

41:                                               ; preds = %27
  %42 = load i32, ptr @n, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr @buf, i64 %43
  call void @_ZSt7reverseIPcEvT_S1_(ptr noundef @buf, ptr noundef %44)
  call void @_Z11SuffixArrayv()
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = mul i64 %46, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @rk2, ptr align 16 @rk, i64 %47, i1 false)
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = mul i64 %49, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @st2, ptr align 16 @ht, i64 %50, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %100, %41
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = sub nsw i32 %53, 1
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = icmp sle i32 %52, %57
  br i1 %58, label %60, label %59

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

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

61:                                               ; preds = %96, %60
  %62 = load i32, ptr %5, align 4, !tbaa !5
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = shl i32 1, %63
  %65 = add nsw i32 %62, %64
  %66 = load i32, ptr @n, align 4, !tbaa !5
  %67 = icmp sle i32 %65, %66
  br i1 %67, label %69, label %68

68:                                               ; preds = %61
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %99

69:                                               ; preds = %61
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = sub nsw i32 %70, 1
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [19 x [200001 x i32]], ptr @st2, i64 0, i64 %72
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [200001 x i32], ptr %73, i64 0, i64 %75
  %77 = load i32, ptr %3, align 4, !tbaa !5
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [19 x [200001 x i32]], ptr @st2, i64 0, i64 %79
  %81 = load i32, ptr %5, align 4, !tbaa !5
  %82 = load i32, ptr %3, align 4, !tbaa !5
  %83 = sub nsw i32 %82, 1
  %84 = shl i32 1, %83
  %85 = add nsw i32 %81, %84
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [200001 x i32], ptr %80, i64 0, i64 %86
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %76, ptr noundef nonnull align 4 dereferenceable(4) %87)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = load i32, ptr %3, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [19 x [200001 x i32]], ptr @st2, i64 0, i64 %91
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [200001 x i32], ptr %92, i64 0, i64 %94
  store i32 %89, ptr %95, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %69
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %5, align 4, !tbaa !5
  br label %61, !llvm.loop !11

99:                                               ; preds = %68
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %3, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %3, align 4, !tbaa !5
  br label %51, !llvm.loop !12

103:                                              ; preds = %59
  %104 = load i32, ptr @n, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i8, ptr @buf, i64 %105
  call void @_ZSt7reverseIPcEvT_S1_(ptr noundef @buf, ptr noundef %106)
  call void @_Z11SuffixArrayv()
  %107 = load i32, ptr @n, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = mul i64 %108, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @st, ptr align 16 @ht, i64 %109, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %110

110:                                              ; preds = %159, %103
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = load i32, ptr @n, align 4, !tbaa !5
  %113 = sub nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = icmp sle i32 %111, %116
  br i1 %117, label %119, label %118

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

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

120:                                              ; preds = %155, %119
  %121 = load i32, ptr %7, align 4, !tbaa !5
  %122 = load i32, ptr %6, align 4, !tbaa !5
  %123 = shl i32 1, %122
  %124 = add nsw i32 %121, %123
  %125 = load i32, ptr @n, align 4, !tbaa !5
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %128, label %127

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

128:                                              ; preds = %120
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = sub nsw i32 %129, 1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [19 x [200001 x i32]], ptr @st, i64 0, i64 %131
  %133 = load i32, ptr %7, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [200001 x i32], ptr %132, i64 0, i64 %134
  %136 = load i32, ptr %6, align 4, !tbaa !5
  %137 = sub nsw i32 %136, 1
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [19 x [200001 x i32]], ptr @st, i64 0, i64 %138
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = load i32, ptr %6, align 4, !tbaa !5
  %142 = sub nsw i32 %141, 1
  %143 = shl i32 1, %142
  %144 = add nsw i32 %140, %143
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [200001 x i32], ptr %139, i64 0, i64 %145
  %147 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %135, ptr noundef nonnull align 4 dereferenceable(4) %146)
  %148 = load i32, ptr %147, align 4, !tbaa !5
  %149 = load i32, ptr %6, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [19 x [200001 x i32]], ptr @st, i64 0, i64 %150
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [200001 x i32], ptr %151, i64 0, i64 %153
  store i32 %148, ptr %154, align 4, !tbaa !5
  br label %155

155:                                              ; preds = %128
  %156 = load i32, ptr %7, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %7, align 4, !tbaa !5
  br label %120, !llvm.loop !13

158:                                              ; preds = %127
  br label %159

159:                                              ; preds = %158
  %160 = load i32, ptr %6, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %6, align 4, !tbaa !5
  br label %110, !llvm.loop !14

162:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %163

163:                                              ; preds = %216, %162
  %164 = load i32, ptr %8, align 4, !tbaa !5
  %165 = load i32, ptr @n, align 4, !tbaa !5
  %166 = icmp slt i32 %164, %165
  br i1 %166, label %168, label %167

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

168:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %169

169:                                              ; preds = %198, %168
  %170 = load i32, ptr %9, align 4, !tbaa !5
  %171 = icmp slt i32 %170, 26
  br i1 %171, label %173, label %172

172:                                              ; preds = %169
  store i32 20, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %201

173:                                              ; preds = %169
  %174 = load i32, ptr %9, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 %175
  %177 = load i32, ptr %8, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [200001 x i32], ptr %176, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = load i32, ptr %8, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [200001 x i8], ptr @buf, i64 0, i64 %182
  %184 = load i8, ptr %183, align 1, !tbaa !15
  %185 = sext i8 %184 to i32
  %186 = load i32, ptr %9, align 4, !tbaa !5
  %187 = add nsw i32 97, %186
  %188 = icmp eq i32 %185, %187
  %189 = zext i1 %188 to i32
  %190 = add nsw i32 %180, %189
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 %192
  %194 = load i32, ptr %8, align 4, !tbaa !5
  %195 = add nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [200001 x i32], ptr %193, i64 0, i64 %196
  store i32 %190, ptr %197, align 4, !tbaa !5
  br label %198

198:                                              ; preds = %173
  %199 = load i32, ptr %9, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %9, align 4, !tbaa !5
  br label %169, !llvm.loop !16

201:                                              ; preds = %172
  %202 = load i32, ptr %8, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [200001 x i32], ptr @pL, i64 0, i64 %203
  store i32 -1, ptr %204, align 4, !tbaa !5
  %205 = load i32, ptr @n, align 4, !tbaa !5
  %206 = load i32, ptr %8, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [200001 x i32], ptr @pR, i64 0, i64 %207
  store i32 %205, ptr %208, align 4, !tbaa !5
  %209 = load i32, ptr %8, align 4, !tbaa !5
  %210 = load i32, ptr %8, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [200001 x i32], ptr @dsuR, i64 0, i64 %211
  store i32 %209, ptr %212, align 4, !tbaa !5
  %213 = load i32, ptr %8, align 4, !tbaa !5
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [200001 x i32], ptr @dsuL, i64 0, i64 %214
  store i32 %209, ptr %215, align 4, !tbaa !5
  br label %216

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

219:                                              ; preds = %167
  %220 = load i32, ptr @n, align 4, !tbaa !5
  %221 = load i32, ptr @n, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [200001 x i32], ptr @dsuR, i64 0, i64 %222
  store i32 %220, ptr %223, align 4, !tbaa !5
  %224 = load i32, ptr @n, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [200001 x i32], ptr @dsuL, i64 0, i64 %225
  store i32 %220, ptr %226, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %333, %219
  %228 = load i32, ptr %10, align 4, !tbaa !5
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = add nsw i32 %228, %229
  %231 = load i32, ptr @n, align 4, !tbaa !5
  %232 = icmp sle i32 %230, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %227
  store i32 23, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %336

234:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %235 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %235, ptr %12, align 4, !tbaa !5
  br label %236

236:                                              ; preds = %327, %234
  %237 = load i32, ptr %12, align 4, !tbaa !5
  %238 = load i32, ptr @n, align 4, !tbaa !5
  %239 = icmp slt i32 %237, %238
  br i1 %239, label %241, label %240

240:                                              ; preds = %236
  store i32 26, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %332

241:                                              ; preds = %236
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %242 = load i32, ptr %11, align 4, !tbaa !5
  %243 = load i32, ptr %11, align 4, !tbaa !5
  %244 = sub nsw i32 %243, 1
  %245 = load i32, ptr %12, align 4, !tbaa !5
  %246 = sub nsw i32 %245, 1
  %247 = call noundef i32 @_Z3lcsii(i32 noundef %244, i32 noundef %246)
  %248 = sub nsw i32 %242, %247
  store i32 %248, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %249 = load i32, ptr %12, align 4, !tbaa !5
  %250 = load i32, ptr %11, align 4, !tbaa !5
  %251 = load i32, ptr %12, align 4, !tbaa !5
  %252 = call noundef i32 @_Z3lcpii(i32 noundef %250, i32 noundef %251)
  %253 = add nsw i32 %249, %252
  store i32 %253, ptr %14, align 4, !tbaa !5
  %254 = load i32, ptr %14, align 4, !tbaa !5
  %255 = load i32, ptr %13, align 4, !tbaa !5
  %256 = sub nsw i32 %254, %255
  %257 = load i32, ptr %10, align 4, !tbaa !5
  %258 = load i32, ptr %10, align 4, !tbaa !5
  %259 = add nsw i32 %257, %258
  %260 = icmp slt i32 %256, %259
  br i1 %260, label %261, label %262

261:                                              ; preds = %241
  store i32 28, ptr %4, align 4
  br label %324

262:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %263 = load i32, ptr %13, align 4, !tbaa !5
  %264 = call noundef i32 @_Z7dsuFindPii(ptr noundef @dsuL, i32 noundef %263)
  store i32 %264, ptr %15, align 4, !tbaa !5
  br label %265

265:                                              ; preds = %289, %262
  %266 = load i32, ptr %15, align 4, !tbaa !5
  %267 = load i32, ptr %10, align 4, !tbaa !5
  %268 = add nsw i32 %266, %267
  %269 = load i32, ptr %10, align 4, !tbaa !5
  %270 = add nsw i32 %268, %269
  %271 = load i32, ptr %14, align 4, !tbaa !5
  %272 = icmp sle i32 %270, %271
  br i1 %272, label %274, label %273

273:                                              ; preds = %265
  store i32 29, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %292

274:                                              ; preds = %265
  %275 = load i32, ptr %15, align 4, !tbaa !5
  %276 = load i32, ptr %10, align 4, !tbaa !5
  %277 = add nsw i32 %275, %276
  %278 = load i32, ptr %10, align 4, !tbaa !5
  %279 = add nsw i32 %277, %278
  %280 = sub nsw i32 %279, 1
  %281 = load i32, ptr %15, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [200001 x i32], ptr @pR, i64 0, i64 %282
  store i32 %280, ptr %283, align 4, !tbaa !5
  %284 = load i32, ptr %15, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  %286 = load i32, ptr %15, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [200001 x i32], ptr @dsuL, i64 0, i64 %287
  store i32 %285, ptr %288, align 4, !tbaa !5
  br label %289

289:                                              ; preds = %274
  %290 = load i32, ptr %15, align 4, !tbaa !5
  %291 = call noundef i32 @_Z7dsuFindPii(ptr noundef @dsuL, i32 noundef %290)
  store i32 %291, ptr %15, align 4, !tbaa !5
  br label %265, !llvm.loop !18

292:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %293 = load i32, ptr %13, align 4, !tbaa !5
  %294 = load i32, ptr %10, align 4, !tbaa !5
  %295 = add nsw i32 %293, %294
  %296 = load i32, ptr %10, align 4, !tbaa !5
  %297 = add nsw i32 %295, %296
  %298 = sub nsw i32 %297, 1
  %299 = call noundef i32 @_Z7dsuFindPii(ptr noundef @dsuR, i32 noundef %298)
  store i32 %299, ptr %16, align 4, !tbaa !5
  br label %300

300:                                              ; preds = %320, %292
  %301 = load i32, ptr %16, align 4, !tbaa !5
  %302 = load i32, ptr %14, align 4, !tbaa !5
  %303 = icmp slt i32 %301, %302
  br i1 %303, label %305, label %304

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

305:                                              ; preds = %300
  %306 = load i32, ptr %16, align 4, !tbaa !5
  %307 = load i32, ptr %10, align 4, !tbaa !5
  %308 = sub nsw i32 %306, %307
  %309 = load i32, ptr %10, align 4, !tbaa !5
  %310 = sub nsw i32 %308, %309
  %311 = add nsw i32 %310, 1
  %312 = load i32, ptr %16, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [200001 x i32], ptr @pL, i64 0, i64 %313
  store i32 %311, ptr %314, align 4, !tbaa !5
  %315 = load i32, ptr %16, align 4, !tbaa !5
  %316 = add nsw i32 %315, 1
  %317 = load i32, ptr %16, align 4, !tbaa !5
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [200001 x i32], ptr @dsuR, i64 0, i64 %318
  store i32 %316, ptr %319, align 4, !tbaa !5
  br label %320

320:                                              ; preds = %305
  %321 = load i32, ptr %16, align 4, !tbaa !5
  %322 = call noundef i32 @_Z7dsuFindPii(ptr noundef @dsuR, i32 noundef %321)
  store i32 %322, ptr %16, align 4, !tbaa !5
  br label %300, !llvm.loop !19

323:                                              ; preds = %304
  store i32 0, ptr %4, align 4
  br label %324

324:                                              ; preds = %323, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  %325 = load i32, ptr %4, align 4
  switch i32 %325, label %407 [
    i32 0, label %326
    i32 28, label %327
  ]

326:                                              ; preds = %324
  br label %327

327:                                              ; preds = %326, %324
  %328 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %328, ptr %11, align 4, !tbaa !5
  %329 = load i32, ptr %10, align 4, !tbaa !5
  %330 = load i32, ptr %12, align 4, !tbaa !5
  %331 = add nsw i32 %330, %329
  store i32 %331, ptr %12, align 4, !tbaa !5
  br label %236, !llvm.loop !20

332:                                              ; preds = %240
  br label %333

333:                                              ; preds = %332
  %334 = load i32, ptr %10, align 4, !tbaa !5
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %10, align 4, !tbaa !5
  br label %227, !llvm.loop !21

336:                                              ; preds = %233
  %337 = load i32, ptr @n, align 4, !tbaa !5
  %338 = sext i32 %337 to i64
  %339 = mul i64 %338, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 @st3, ptr align 16 @pR, i64 %339, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 1, ptr %17, align 4, !tbaa !5
  br label %340

340:                                              ; preds = %388, %336
  %341 = load i32, ptr %17, align 4, !tbaa !5
  %342 = load i32, ptr @n, align 4, !tbaa !5
  %343 = sext i32 %342 to i64
  %344 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %343
  %345 = load i32, ptr %344, align 4, !tbaa !5
  %346 = icmp sle i32 %341, %345
  br i1 %346, label %348, label %347

347:                                              ; preds = %340
  store i32 35, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %391

348:                                              ; preds = %340
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %349

349:                                              ; preds = %384, %348
  %350 = load i32, ptr %18, align 4, !tbaa !5
  %351 = load i32, ptr %17, align 4, !tbaa !5
  %352 = shl i32 1, %351
  %353 = add nsw i32 %350, %352
  %354 = load i32, ptr @n, align 4, !tbaa !5
  %355 = icmp sle i32 %353, %354
  br i1 %355, label %357, label %356

356:                                              ; preds = %349
  store i32 38, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %387

357:                                              ; preds = %349
  %358 = load i32, ptr %17, align 4, !tbaa !5
  %359 = sub nsw i32 %358, 1
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds [19 x [200001 x i32]], ptr @st3, i64 0, i64 %360
  %362 = load i32, ptr %18, align 4, !tbaa !5
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [200001 x i32], ptr %361, i64 0, i64 %363
  %365 = load i32, ptr %17, align 4, !tbaa !5
  %366 = sub nsw i32 %365, 1
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [19 x [200001 x i32]], ptr @st3, i64 0, i64 %367
  %369 = load i32, ptr %18, align 4, !tbaa !5
  %370 = load i32, ptr %17, align 4, !tbaa !5
  %371 = sub nsw i32 %370, 1
  %372 = shl i32 1, %371
  %373 = add nsw i32 %369, %372
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds [200001 x i32], ptr %368, i64 0, i64 %374
  %376 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %364, ptr noundef nonnull align 4 dereferenceable(4) %375)
  %377 = load i32, ptr %376, align 4, !tbaa !5
  %378 = load i32, ptr %17, align 4, !tbaa !5
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [19 x [200001 x i32]], ptr @st3, i64 0, i64 %379
  %381 = load i32, ptr %18, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [200001 x i32], ptr %380, i64 0, i64 %382
  store i32 %377, ptr %383, align 4, !tbaa !5
  br label %384

384:                                              ; preds = %357
  %385 = load i32, ptr %18, align 4, !tbaa !5
  %386 = add nsw i32 %385, 1
  store i32 %386, ptr %18, align 4, !tbaa !5
  br label %349, !llvm.loop !22

387:                                              ; preds = %356
  br label %388

388:                                              ; preds = %387
  %389 = load i32, ptr %17, align 4, !tbaa !5
  %390 = add nsw i32 %389, 1
  store i32 %390, ptr %17, align 4, !tbaa !5
  br label %340, !llvm.loop !23

391:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %392 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %19)
  br label %393

393:                                              ; preds = %397, %391
  %394 = load i32, ptr %19, align 4, !tbaa !5
  %395 = add nsw i32 %394, -1
  store i32 %395, ptr %19, align 4, !tbaa !5
  %396 = icmp ne i32 %394, 0
  br i1 %396, label %397, label %405

397:                                              ; preds = %393
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %398 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %20, ptr noundef %21)
  %399 = load i32, ptr %20, align 4, !tbaa !5
  %400 = add nsw i32 %399, -1
  store i32 %400, ptr %20, align 4, !tbaa !5
  %401 = load i32, ptr %21, align 4, !tbaa !5
  %402 = add nsw i32 %401, -1
  store i32 %402, ptr %21, align 4, !tbaa !5
  %403 = call noundef i32 @_Z5solveii(i32 noundef %400, i32 noundef %402)
  %404 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %403)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br label %393, !llvm.loop !24

405:                                              ; preds = %393
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  %406 = load i32, ptr %1, align 4
  ret i32 %406

407:                                              ; preds = %324
  unreachable
}

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

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

; 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) #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7dsuFindPii(ptr noundef, i32 noundef) #4

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

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

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@buf = external dso_local global [200001 x i8], align 16
@n = external dso_local global i32, align 4
@rk = external dso_local local_unnamed_addr global [200001 x i32], align 16
@ht = external dso_local local_unnamed_addr global [200001 x i32], align 16
@Log = external dso_local local_unnamed_addr global [200001 x i32], align 16
@st = external dso_local global [19 x [200001 x i32]], align 16
@rk2 = external dso_local local_unnamed_addr global [200001 x i32], align 16
@st2 = external dso_local global [19 x [200001 x i32]], align 16
@c = external dso_local local_unnamed_addr global [27 x [200001 x i32]], align 16
@pL = external dso_local local_unnamed_addr global [200001 x i32], align 16
@pR = external dso_local local_unnamed_addr global [200001 x i32], align 16
@st3 = external dso_local global [19 x [200001 x i32]], align 16
@dsuL = external dso_local global [200001 x i32], align 16
@dsuR = external dso_local global [200001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z11SuffixArrayv() local_unnamed_addr #0

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @buf)
  store i32 -1, ptr @Log, align 16, !tbaa !5
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not135 = icmp slt i32 %5, 1
  br i1 %.not135, label %._crit_edge, label %.lr.ph.preheader

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

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

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

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa
  %8 = lshr i64 %indvars.iv.unr, 1
  %9 = and i64 %8, 2147483647
  %10 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %9
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = add nsw i32 %11, 1
  %13 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %indvars.iv.unr
  store i32 %12, ptr %13, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.epil, %._crit_edge.loopexit.unr-lcssa, %0
  %14 = sext i32 %5 to i64
  %15 = getelementptr inbounds i8, ptr @buf, i64 %14
  tail call void @_ZSt7reverseIPcEvT_S1_(ptr noundef nonnull @buf, ptr noundef nonnull %15)
  tail call void @_Z11SuffixArrayv()
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = shl nsw i64 %17, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @rk2, ptr nonnull align 16 @rk, i64 %18, i1 false)
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @st2, ptr nonnull align 16 @ht, i64 %18, i1 false)
  %19 = add nsw i32 %16, -1
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %20
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %.not117141 = icmp slt i32 %22, 1
  br i1 %.not117141, label %._crit_edge143, label %.preheader131

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %23 = lshr i64 %indvars.iv, 1
  %24 = and i64 %23, 2147483647
  %25 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  %28 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %indvars.iv
  store i32 %27, ptr %28, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %29 = lshr i64 %indvars.iv.next, 1
  %30 = and i64 %29, 2147483647
  %31 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  %34 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %indvars.iv.next
  store i32 %33, ptr %34, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !9

.preheader131:                                    ; preds = %._crit_edge, %._crit_edge140
  %35 = phi i32 [ %51, %._crit_edge140 ], [ %16, %._crit_edge ]
  %indvars.iv189 = phi i64 [ %indvars.iv.next190, %._crit_edge140 ], [ 1, %._crit_edge ]
  %36 = trunc nuw nsw i64 %indvars.iv189 to i32
  %37 = shl nuw i32 1, %36
  %.not126137.not = icmp slt i32 %37, %35
  br i1 %.not126137.not, label %.lr.ph139, label %._crit_edge140

.lr.ph139:                                        ; preds = %.preheader131
  %38 = add nsw i64 %indvars.iv189, -1
  %39 = trunc nuw nsw i64 %38 to i32
  %40 = shl nuw i32 1, %39
  %41 = sext i32 %37 to i64
  %42 = sext i32 %40 to i64
  br label %57

._crit_edge143.loopexit:                          ; preds = %._crit_edge140
  %.pre214 = sext i32 %51 to i64
  br label %._crit_edge143

._crit_edge143:                                   ; preds = %._crit_edge143.loopexit, %._crit_edge
  %.pre-phi = phi i64 [ %.pre214, %._crit_edge143.loopexit ], [ %17, %._crit_edge ]
  %43 = getelementptr inbounds i8, ptr @buf, i64 %.pre-phi
  tail call void @_ZSt7reverseIPcEvT_S1_(ptr noundef nonnull @buf, ptr noundef nonnull %43)
  tail call void @_Z11SuffixArrayv()
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = shl nsw i64 %45, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @st, ptr nonnull align 16 @ht, i64 %46, i1 false)
  %47 = add nsw i32 %44, -1
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %.not118149 = icmp slt i32 %50, 1
  br i1 %.not118149, label %.preheader129, label %.preheader130

._crit_edge140:                                   ; preds = %57, %.preheader131
  %51 = phi i32 [ %35, %.preheader131 ], [ %65, %57 ]
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %52 = add nsw i32 %51, -1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %.not117.not = icmp slt i64 %indvars.iv189, %56
  br i1 %.not117.not, label %.preheader131, label %._crit_edge143.loopexit, !llvm.loop !11

57:                                               ; preds = %.lr.ph139, %57
  %indvars.iv186 = phi i64 [ 1, %.lr.ph139 ], [ %indvars.iv.next187, %57 ]
  %58 = getelementptr inbounds [19 x [200001 x i32]], ptr @st2, i64 0, i64 %38, i64 %indvars.iv186
  %59 = add nuw nsw i64 %indvars.iv186, %42
  %60 = getelementptr inbounds [19 x [200001 x i32]], ptr @st2, i64 0, i64 %38, i64 %59
  %61 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %58, ptr noundef nonnull align 4 dereferenceable(4) %60)
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = getelementptr inbounds [19 x [200001 x i32]], ptr @st2, i64 0, i64 %indvars.iv189, i64 %indvars.iv186
  store i32 %62, ptr %63, align 4, !tbaa !5
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %64 = add nuw nsw i64 %indvars.iv.next187, %41
  %65 = load i32, ptr @n, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %.not126 = icmp sgt i64 %64, %66
  br i1 %.not126, label %._crit_edge140, label %57, !llvm.loop !12

.preheader130:                                    ; preds = %._crit_edge143, %._crit_edge148
  %67 = phi i32 [ %81, %._crit_edge148 ], [ %44, %._crit_edge143 ]
  %indvars.iv195 = phi i64 [ %indvars.iv.next196, %._crit_edge148 ], [ 1, %._crit_edge143 ]
  %68 = trunc nuw nsw i64 %indvars.iv195 to i32
  %69 = shl nuw i32 1, %68
  %.not125145.not = icmp slt i32 %69, %67
  br i1 %.not125145.not, label %.lr.ph147, label %._crit_edge148

.lr.ph147:                                        ; preds = %.preheader130
  %70 = add nsw i64 %indvars.iv195, -1
  %71 = trunc nuw nsw i64 %70 to i32
  %72 = shl nuw i32 1, %71
  %73 = sext i32 %69 to i64
  %74 = sext i32 %72 to i64
  br label %87

.preheader129:                                    ; preds = %._crit_edge148, %._crit_edge143
  %.lcssa132 = phi i32 [ %44, %._crit_edge143 ], [ %81, %._crit_edge148 ]
  %75 = icmp sgt i32 %.lcssa132, 0
  br i1 %75, label %.preheader128.preheader, label %._crit_edge154.thread

._crit_edge154.thread:                            ; preds = %.preheader129
  %76 = sext i32 %.lcssa132 to i64
  %77 = getelementptr inbounds [200001 x i32], ptr @dsuR, i64 0, i64 %76
  store i32 %.lcssa132, ptr %77, align 4, !tbaa !5
  %78 = getelementptr inbounds [200001 x i32], ptr @dsuL, i64 0, i64 %76
  store i32 %.lcssa132, ptr %78, align 4, !tbaa !5
  br label %._crit_edge169

.preheader128.preheader:                          ; preds = %.preheader129
  %79 = zext nneg i32 %.lcssa132 to i64
  %80 = shl nuw nsw i64 %79, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @pL, i8 -1, i64 %80, i1 false), !tbaa !5
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 10400052), align 4, !tbaa !5
  br label %.preheader128

._crit_edge148:                                   ; preds = %87, %.preheader130
  %81 = phi i32 [ %67, %.preheader130 ], [ %95, %87 ]
  %indvars.iv.next196 = add nuw nsw i64 %indvars.iv195, 1
  %82 = add nsw i32 %81, -1
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %83
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %.not118.not = icmp slt i64 %indvars.iv195, %86
  br i1 %.not118.not, label %.preheader130, label %.preheader129, !llvm.loop !13

87:                                               ; preds = %.lr.ph147, %87
  %indvars.iv192 = phi i64 [ 1, %.lr.ph147 ], [ %indvars.iv.next193, %87 ]
  %88 = getelementptr inbounds [19 x [200001 x i32]], ptr @st, i64 0, i64 %70, i64 %indvars.iv192
  %89 = add nuw nsw i64 %indvars.iv192, %74
  %90 = getelementptr inbounds [19 x [200001 x i32]], ptr @st, i64 0, i64 %70, i64 %89
  %91 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %88, ptr noundef nonnull align 4 dereferenceable(4) %90)
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = getelementptr inbounds [19 x [200001 x i32]], ptr @st, i64 0, i64 %indvars.iv195, i64 %indvars.iv192
  store i32 %92, ptr %93, align 4, !tbaa !5
  %indvars.iv.next193 = add nuw nsw i64 %indvars.iv192, 1
  %94 = add nuw nsw i64 %indvars.iv.next193, %73
  %95 = load i32, ptr @n, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %.not125 = icmp sgt i64 %94, %96
  br i1 %.not125, label %._crit_edge148, label %87, !llvm.loop !14

.preheader128:                                    ; preds = %.preheader128.preheader, %.preheader128
  %97 = phi i32 [ %.pre, %.preheader128.preheader ], [ %182, %.preheader128 ]
  %indvars.iv202 = phi i64 [ 0, %.preheader128.preheader ], [ %indvars.iv.next203, %.preheader128 ]
  %98 = getelementptr inbounds [200001 x i8], ptr @buf, i64 0, i64 %indvars.iv202
  %99 = load i8, ptr %98, align 1, !tbaa !15
  %100 = sext i8 %99 to i64
  %indvars.iv.next203 = add nuw nsw i64 %indvars.iv202, 1
  %101 = and i64 %100, 4294967295
  %102 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 0, i64 %indvars.iv202
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = icmp eq i64 %101, 97
  %105 = zext i1 %104 to i32
  %106 = add nsw i32 %103, %105
  %107 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 0, i64 %indvars.iv.next203
  store i32 %106, ptr %107, align 4, !tbaa !5
  %108 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 1, i64 %indvars.iv202
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = icmp eq i64 %101, 98
  %111 = zext i1 %110 to i32
  %112 = add nsw i32 %109, %111
  %113 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 1, i64 %indvars.iv.next203
  store i32 %112, ptr %113, align 4, !tbaa !5
  %114 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 2, i64 %indvars.iv202
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = icmp eq i64 %101, 99
  %117 = zext i1 %116 to i32
  %118 = add nsw i32 %115, %117
  %119 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 2, i64 %indvars.iv.next203
  store i32 %118, ptr %119, align 4, !tbaa !5
  %120 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 3, i64 %indvars.iv202
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = icmp eq i64 %101, 100
  %123 = zext i1 %122 to i32
  %124 = add nsw i32 %121, %123
  %125 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 3, i64 %indvars.iv.next203
  store i32 %124, ptr %125, align 4, !tbaa !5
  %126 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 4, i64 %indvars.iv202
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = icmp eq i64 %101, 101
  %129 = zext i1 %128 to i32
  %130 = add nsw i32 %127, %129
  %131 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 4, i64 %indvars.iv.next203
  store i32 %130, ptr %131, align 4, !tbaa !5
  %132 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 5, i64 %indvars.iv202
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = icmp eq i64 %101, 102
  %135 = zext i1 %134 to i32
  %136 = add nsw i32 %133, %135
  %137 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 5, i64 %indvars.iv.next203
  store i32 %136, ptr %137, align 4, !tbaa !5
  %138 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 6, i64 %indvars.iv202
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = icmp eq i64 %101, 103
  %141 = zext i1 %140 to i32
  %142 = add nsw i32 %139, %141
  %143 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 6, i64 %indvars.iv.next203
  store i32 %142, ptr %143, align 4, !tbaa !5
  %144 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 7, i64 %indvars.iv202
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = icmp eq i64 %101, 104
  %147 = zext i1 %146 to i32
  %148 = add nsw i32 %145, %147
  %149 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 7, i64 %indvars.iv.next203
  store i32 %148, ptr %149, align 4, !tbaa !5
  %150 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 8, i64 %indvars.iv202
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = icmp eq i64 %101, 105
  %153 = zext i1 %152 to i32
  %154 = add nsw i32 %151, %153
  %155 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 8, i64 %indvars.iv.next203
  store i32 %154, ptr %155, align 4, !tbaa !5
  %156 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 9, i64 %indvars.iv202
  %157 = load i32, ptr %156, align 4, !tbaa !5
  %158 = icmp eq i64 %101, 106
  %159 = zext i1 %158 to i32
  %160 = add nsw i32 %157, %159
  %161 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 9, i64 %indvars.iv.next203
  store i32 %160, ptr %161, align 4, !tbaa !5
  %162 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 10, i64 %indvars.iv202
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = icmp eq i64 %101, 107
  %165 = zext i1 %164 to i32
  %166 = add nsw i32 %163, %165
  %167 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 10, i64 %indvars.iv.next203
  store i32 %166, ptr %167, align 4, !tbaa !5
  %168 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 11, i64 %indvars.iv202
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = icmp eq i64 %101, 108
  %171 = zext i1 %170 to i32
  %172 = add nsw i32 %169, %171
  %173 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 11, i64 %indvars.iv.next203
  store i32 %172, ptr %173, align 4, !tbaa !5
  %174 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 12, i64 %indvars.iv202
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = icmp eq i64 %101, 109
  %177 = zext i1 %176 to i32
  %178 = add nsw i32 %175, %177
  %179 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 12, i64 %indvars.iv.next203
  store i32 %178, ptr %179, align 4, !tbaa !5
  %180 = icmp eq i64 %101, 110
  %181 = zext i1 %180 to i32
  %182 = add nsw i32 %97, %181
  %183 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 13, i64 %indvars.iv.next203
  store i32 %182, ptr %183, align 4, !tbaa !5
  %184 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 14, i64 %indvars.iv202
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = icmp eq i64 %101, 111
  %187 = zext i1 %186 to i32
  %188 = add nsw i32 %185, %187
  %189 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 14, i64 %indvars.iv.next203
  store i32 %188, ptr %189, align 4, !tbaa !5
  %190 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 15, i64 %indvars.iv202
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = icmp eq i64 %101, 112
  %193 = zext i1 %192 to i32
  %194 = add nsw i32 %191, %193
  %195 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 15, i64 %indvars.iv.next203
  store i32 %194, ptr %195, align 4, !tbaa !5
  %196 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 16, i64 %indvars.iv202
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = icmp eq i64 %101, 113
  %199 = zext i1 %198 to i32
  %200 = add nsw i32 %197, %199
  %201 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 16, i64 %indvars.iv.next203
  store i32 %200, ptr %201, align 4, !tbaa !5
  %202 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 17, i64 %indvars.iv202
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = icmp eq i64 %101, 114
  %205 = zext i1 %204 to i32
  %206 = add nsw i32 %203, %205
  %207 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 17, i64 %indvars.iv.next203
  store i32 %206, ptr %207, align 4, !tbaa !5
  %208 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 18, i64 %indvars.iv202
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = icmp eq i64 %101, 115
  %211 = zext i1 %210 to i32
  %212 = add nsw i32 %209, %211
  %213 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 18, i64 %indvars.iv.next203
  store i32 %212, ptr %213, align 4, !tbaa !5
  %214 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 19, i64 %indvars.iv202
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = icmp eq i64 %101, 116
  %217 = zext i1 %216 to i32
  %218 = add nsw i32 %215, %217
  %219 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 19, i64 %indvars.iv.next203
  store i32 %218, ptr %219, align 4, !tbaa !5
  %220 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 20, i64 %indvars.iv202
  %221 = load i32, ptr %220, align 4, !tbaa !5
  %222 = icmp eq i64 %101, 117
  %223 = zext i1 %222 to i32
  %224 = add nsw i32 %221, %223
  %225 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 20, i64 %indvars.iv.next203
  store i32 %224, ptr %225, align 4, !tbaa !5
  %226 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 21, i64 %indvars.iv202
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = icmp eq i64 %101, 118
  %229 = zext i1 %228 to i32
  %230 = add nsw i32 %227, %229
  %231 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 21, i64 %indvars.iv.next203
  store i32 %230, ptr %231, align 4, !tbaa !5
  %232 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 22, i64 %indvars.iv202
  %233 = load i32, ptr %232, align 4, !tbaa !5
  %234 = icmp eq i64 %101, 119
  %235 = zext i1 %234 to i32
  %236 = add nsw i32 %233, %235
  %237 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 22, i64 %indvars.iv.next203
  store i32 %236, ptr %237, align 4, !tbaa !5
  %238 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 23, i64 %indvars.iv202
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = icmp eq i64 %101, 120
  %241 = zext i1 %240 to i32
  %242 = add nsw i32 %239, %241
  %243 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 23, i64 %indvars.iv.next203
  store i32 %242, ptr %243, align 4, !tbaa !5
  %244 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 24, i64 %indvars.iv202
  %245 = load i32, ptr %244, align 4, !tbaa !5
  %246 = icmp eq i64 %101, 121
  %247 = zext i1 %246 to i32
  %248 = add nsw i32 %245, %247
  %249 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 24, i64 %indvars.iv.next203
  store i32 %248, ptr %249, align 4, !tbaa !5
  %250 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 25, i64 %indvars.iv202
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = icmp eq i64 %101, 122
  %253 = zext i1 %252 to i32
  %254 = add nsw i32 %251, %253
  %255 = getelementptr inbounds [27 x [200001 x i32]], ptr @c, i64 0, i64 25, i64 %indvars.iv.next203
  store i32 %254, ptr %255, align 4, !tbaa !5
  %256 = getelementptr inbounds [200001 x i32], ptr @pR, i64 0, i64 %indvars.iv202
  store i32 %.lcssa132, ptr %256, align 4, !tbaa !5
  %257 = getelementptr inbounds [200001 x i32], ptr @dsuR, i64 0, i64 %indvars.iv202
  %258 = trunc nuw nsw i64 %indvars.iv202 to i32
  store i32 %258, ptr %257, align 4, !tbaa !5
  %259 = getelementptr inbounds [200001 x i32], ptr @dsuL, i64 0, i64 %indvars.iv202
  store i32 %258, ptr %259, align 4, !tbaa !5
  %exitcond206.not = icmp eq i64 %indvars.iv.next203, %79
  br i1 %exitcond206.not, label %._crit_edge154, label %.preheader128, !llvm.loop !16

._crit_edge154:                                   ; preds = %.preheader128
  %.pre213 = load i32, ptr @n, align 4, !tbaa !5
  %260 = zext nneg i32 %.lcssa132 to i64
  %261 = getelementptr inbounds [200001 x i32], ptr @dsuR, i64 0, i64 %260
  store i32 %.lcssa132, ptr %261, align 4, !tbaa !5
  %262 = getelementptr inbounds [200001 x i32], ptr @dsuL, i64 0, i64 %260
  store i32 %.lcssa132, ptr %262, align 4, !tbaa !5
  %.not119167 = icmp slt i32 %.pre213, 2
  br i1 %.not119167, label %._crit_edge169, label %.preheader127

.preheader127:                                    ; preds = %._crit_edge154, %._crit_edge166
  %263 = phi i32 [ %272, %._crit_edge166 ], [ %.pre213, %._crit_edge154 ]
  %264 = phi i32 [ %274, %._crit_edge166 ], [ 2, %._crit_edge154 ]
  %.0104168 = phi i32 [ %273, %._crit_edge166 ], [ 1, %._crit_edge154 ]
  %265 = icmp slt i32 %.0104168, %263
  br i1 %265, label %.lr.ph165, label %._crit_edge166

.lr.ph165:                                        ; preds = %.preheader127
  %266 = add nsw i32 %264, -1
  br label %275

._crit_edge169:                                   ; preds = %._crit_edge166, %._crit_edge154.thread, %._crit_edge154
  %267 = phi i32 [ %.pre213, %._crit_edge154 ], [ %.lcssa132, %._crit_edge154.thread ], [ %272, %._crit_edge166 ]
  %268 = sext i32 %267 to i64
  %269 = shl nsw i64 %268, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 @st3, ptr nonnull align 16 @pR, i64 %269, i1 false)
  %270 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %268
  %271 = load i32, ptr %270, align 4, !tbaa !5
  %.not120175 = icmp slt i32 %271, 1
  br i1 %.not120175, label %._crit_edge177, label %.preheader

._crit_edge166:                                   ; preds = %.loopexit, %.preheader127
  %272 = phi i32 [ %263, %.preheader127 ], [ %306, %.loopexit ]
  %273 = add nuw nsw i32 %.0104168, 1
  %274 = shl nuw nsw i32 %273, 1
  %.not119 = icmp sgt i32 %274, %272
  br i1 %.not119, label %._crit_edge169, label %.preheader127, !llvm.loop !17

275:                                              ; preds = %.lr.ph165, %.loopexit
  %.0102164 = phi i32 [ %.0104168, %.lr.ph165 ], [ %305, %.loopexit ]
  %.0103163 = phi i32 [ 0, %.lr.ph165 ], [ %.0102164, %.loopexit ]
  %276 = add nsw i32 %.0103163, -1
  %277 = add nsw i32 %.0102164, -1
  %278 = tail call noundef i32 @_Z3lcsii(i32 noundef %276, i32 noundef %277)
  %279 = sub nsw i32 %.0103163, %278
  %280 = tail call noundef i32 @_Z3lcpii(i32 noundef %.0103163, i32 noundef %.0102164)
  %281 = add nsw i32 %280, %.0102164
  %282 = sub nsw i32 %281, %279
  %283 = icmp slt i32 %282, %264
  br i1 %283, label %.loopexit, label %284

284:                                              ; preds = %275
  %285 = tail call noundef i32 @_Z7dsuFindPii(ptr noundef nonnull @dsuL, i32 noundef %279)
  %286 = add i32 %285, %264
  %.not123155 = icmp sgt i32 %286, %281
  br i1 %.not123155, label %._crit_edge159, label %.lr.ph158

._crit_edge159:                                   ; preds = %.lr.ph158, %284
  %287 = add i32 %266, %279
  %288 = tail call noundef i32 @_Z7dsuFindPii(ptr noundef nonnull @dsuR, i32 noundef %287)
  %289 = icmp slt i32 %288, %281
  br i1 %289, label %.lr.ph162, label %.loopexit

.lr.ph158:                                        ; preds = %284, %.lr.ph158
  %290 = phi i32 [ %297, %.lr.ph158 ], [ %286, %284 ]
  %.0100156 = phi i32 [ %296, %.lr.ph158 ], [ %285, %284 ]
  %291 = add nsw i32 %290, -1
  %292 = sext i32 %.0100156 to i64
  %293 = getelementptr inbounds [200001 x i32], ptr @pR, i64 0, i64 %292
  store i32 %291, ptr %293, align 4, !tbaa !5
  %294 = add nsw i32 %.0100156, 1
  %295 = getelementptr inbounds [200001 x i32], ptr @dsuL, i64 0, i64 %292
  store i32 %294, ptr %295, align 4, !tbaa !5
  %296 = tail call noundef i32 @_Z7dsuFindPii(ptr noundef nonnull @dsuL, i32 noundef %.0100156)
  %297 = add i32 %296, %264
  %.not123 = icmp sgt i32 %297, %281
  br i1 %.not123, label %._crit_edge159, label %.lr.ph158, !llvm.loop !18

.lr.ph162:                                        ; preds = %._crit_edge159, %.lr.ph162
  %.099160 = phi i32 [ %303, %.lr.ph162 ], [ %288, %._crit_edge159 ]
  %reass.sub = sub i32 %.099160, %264
  %298 = add i32 %reass.sub, 1
  %299 = sext i32 %.099160 to i64
  %300 = getelementptr inbounds [200001 x i32], ptr @pL, i64 0, i64 %299
  store i32 %298, ptr %300, align 4, !tbaa !5
  %301 = add nsw i32 %.099160, 1
  %302 = getelementptr inbounds [200001 x i32], ptr @dsuR, i64 0, i64 %299
  store i32 %301, ptr %302, align 4, !tbaa !5
  %303 = tail call noundef i32 @_Z7dsuFindPii(ptr noundef nonnull @dsuR, i32 noundef %.099160)
  %304 = icmp slt i32 %303, %281
  br i1 %304, label %.lr.ph162, label %.loopexit, !llvm.loop !19

.loopexit:                                        ; preds = %.lr.ph162, %._crit_edge159, %275
  %305 = add nuw nsw i32 %.0102164, %.0104168
  %306 = load i32, ptr @n, align 4, !tbaa !5
  %307 = icmp slt i32 %305, %306
  br i1 %307, label %275, label %._crit_edge166, !llvm.loop !20

.preheader:                                       ; preds = %._crit_edge169, %._crit_edge174
  %308 = phi i32 [ %319, %._crit_edge174 ], [ %267, %._crit_edge169 ]
  %indvars.iv210 = phi i64 [ %indvars.iv.next211, %._crit_edge174 ], [ 1, %._crit_edge169 ]
  %309 = trunc nuw nsw i64 %indvars.iv210 to i32
  %310 = shl nuw i32 1, %309
  %.not122171 = icmp sgt i32 %310, %308
  br i1 %.not122171, label %.preheader.._crit_edge174_crit_edge, label %.lr.ph173

.preheader.._crit_edge174_crit_edge:              ; preds = %.preheader
  %.pre215 = sext i32 %308 to i64
  br label %._crit_edge174

.lr.ph173:                                        ; preds = %.preheader
  %311 = add nsw i64 %indvars.iv210, -1
  %312 = trunc nuw nsw i64 %311 to i32
  %313 = shl nuw i32 1, %312
  %314 = sext i32 %310 to i64
  %315 = sext i32 %313 to i64
  br label %323

._crit_edge177:                                   ; preds = %._crit_edge174, %._crit_edge169
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %316 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %317 = load i32, ptr %1, align 4, !tbaa !5
  %318 = add nsw i32 %317, -1
  store i32 %318, ptr %1, align 4, !tbaa !5
  %.not121178 = icmp eq i32 %317, 0
  br i1 %.not121178, label %._crit_edge181, label %.lr.ph180

._crit_edge174:                                   ; preds = %323, %.preheader.._crit_edge174_crit_edge
  %.pre-phi216 = phi i64 [ %.pre215, %.preheader.._crit_edge174_crit_edge ], [ %332, %323 ]
  %319 = phi i32 [ %308, %.preheader.._crit_edge174_crit_edge ], [ %331, %323 ]
  %indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1
  %320 = getelementptr inbounds [200001 x i32], ptr @Log, i64 0, i64 %.pre-phi216
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %.not120.not = icmp slt i64 %indvars.iv210, %322
  br i1 %.not120.not, label %.preheader, label %._crit_edge177, !llvm.loop !21

323:                                              ; preds = %.lr.ph173, %323
  %indvars.iv207 = phi i64 [ 0, %.lr.ph173 ], [ %indvars.iv.next208, %323 ]
  %324 = getelementptr inbounds [19 x [200001 x i32]], ptr @st3, i64 0, i64 %311, i64 %indvars.iv207
  %325 = add nuw nsw i64 %indvars.iv207, %315
  %326 = getelementptr inbounds [19 x [200001 x i32]], ptr @st3, i64 0, i64 %311, i64 %325
  %327 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %324, ptr noundef nonnull align 4 dereferenceable(4) %326)
  %328 = load i32, ptr %327, align 4, !tbaa !5
  %329 = getelementptr inbounds [19 x [200001 x i32]], ptr @st3, i64 0, i64 %indvars.iv210, i64 %indvars.iv207
  store i32 %328, ptr %329, align 4, !tbaa !5
  %indvars.iv.next208 = add nuw nsw i64 %indvars.iv207, 1
  %330 = add nuw nsw i64 %indvars.iv.next208, %314
  %331 = load i32, ptr @n, align 4, !tbaa !5
  %332 = sext i32 %331 to i64
  %.not122 = icmp sgt i64 %330, %332
  br i1 %.not122, label %._crit_edge174, label %323, !llvm.loop !22

.lr.ph180:                                        ; preds = %._crit_edge177, %.lr.ph180
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  %333 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %334 = load i32, ptr %2, align 4, !tbaa !5
  %335 = add nsw i32 %334, -1
  store i32 %335, ptr %2, align 4, !tbaa !5
  %336 = load i32, ptr %3, align 4, !tbaa !5
  %337 = add nsw i32 %336, -1
  store i32 %337, ptr %3, align 4, !tbaa !5
  %338 = call noundef i32 @_Z5solveii(i32 noundef %335, i32 noundef %337)
  %339 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %338)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %340 = load i32, ptr %1, align 4, !tbaa !5
  %341 = add nsw i32 %340, -1
  store i32 %341, ptr %1, align 4, !tbaa !5
  %.not121 = icmp eq i32 %340, 0
  br i1 %.not121, label %._crit_edge181, label %.lr.ph180, !llvm.loop !23

._crit_edge181:                                   ; preds = %.lr.ph180, %._crit_edge177
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0
}

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

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

; 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) #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z7dsuFindPii(ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

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

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

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


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