; LLVM IR from lzyrapx/Competitive-Programming :: LibreOJ (6164（莫队算法）)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@times = external dso_local global [227156 x i32], align 16
@a = external dso_local global [56789 x i32], align 16
@bl = external dso_local global [56789 x i32], align 16
@num = external dso_local global [56789 x i32], align 16
@ret = external dso_local global [56789 x i32], align 16
@vis = external dso_local global [227156 x i8], align 16
@all = external dso_local global i32, align 4
@querys = external dso_local global [56789 x %struct.node], 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 [7 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 @_Z3insi(i32 noundef) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z3deli(i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca 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
  store i32 0, ptr %1, align 4
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %16)
  %18 = fptosi double %17 to i32
  store i32 %18, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %33, %0
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %22 = icmp sle i32 %20, %21
  br i1 %22, label %24, label %23

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

24:                                               ; preds = %19
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sub nsw i32 %25, 1
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sdiv i32 %26, %27
  %29 = add nsw i32 %28, 1
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [56789 x i32], ptr @bl, i64 0, i64 %31
  store i32 %29, ptr %32, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %24
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %3, align 4, !tbaa !5
  br label %19, !llvm.loop !9

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

37:                                               ; preds = %47, %36
  %38 = load i32, ptr %4, align 4, !tbaa !5
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %40 = icmp sle i32 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %37
  %43 = load i32, ptr %4, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %44
  %46 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %45)
  br label %47

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

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

51:                                               ; preds = %87, %50
  %52 = load i32, ptr %5, align 4, !tbaa !5
  %53 = load i32, ptr @m, align 4, !tbaa !5
  %54 = icmp sle i32 %52, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %90

56:                                               ; preds = %51
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.node, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %62
  %64 = getelementptr inbounds %struct.node, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %5, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %66
  %68 = getelementptr inbounds %struct.node, ptr %67, i32 0, i32 2
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %60, ptr noundef %64, ptr noundef %68)
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %72
  %74 = getelementptr inbounds %struct.node, ptr %73, i32 0, i32 3
  store i32 %70, ptr %74, align 4, !tbaa !12
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %76
  %78 = getelementptr inbounds %struct.node, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 4, !tbaa !14
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [56789 x i32], ptr @bl, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %84
  %86 = getelementptr inbounds %struct.node, ptr %85, i32 0, i32 4
  store i32 %82, ptr %86, align 4, !tbaa !15
  br label %87

87:                                               ; preds = %56
  %88 = load i32, ptr %5, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %5, align 4, !tbaa !5
  br label %51, !llvm.loop !16

90:                                               ; preds = %55
  %91 = load i32, ptr @m, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds %struct.node, ptr @querys, i64 %92
  %94 = getelementptr inbounds %struct.node, ptr %93, i64 1
  call void @_ZSt4sortIP4nodeEvT_S2_(ptr noundef getelementptr inbounds (%struct.node, ptr @querys, i64 1), ptr noundef %94)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %251, %90
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = load i32, ptr @m, align 4, !tbaa !5
  %98 = icmp sle i32 %96, %97
  br i1 %98, label %100, label %99

99:                                               ; preds = %95
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %254

100:                                              ; preds = %95
  br label %101

101:                                              ; preds = %109, %100
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = load i32, ptr %8, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %104
  %106 = getelementptr inbounds %struct.node, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !17
  %108 = icmp slt i32 %102, %107
  br i1 %108, label %109, label %115

109:                                              ; preds = %101
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %7, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  call void @_Z3insi(i32 noundef %114)
  br label %101, !llvm.loop !18

115:                                              ; preds = %101
  br label %116

116:                                              ; preds = %124, %115
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %119
  %121 = getelementptr inbounds %struct.node, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 4, !tbaa !14
  %123 = icmp sgt i32 %117, %122
  br i1 %123, label %124, label %130

124:                                              ; preds = %116
  %125 = load i32, ptr %6, align 4, !tbaa !5
  %126 = add nsw i32 %125, -1
  store i32 %126, ptr %6, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %127
  %129 = load i32, ptr %128, align 4, !tbaa !5
  call void @_Z3insi(i32 noundef %129)
  br label %116, !llvm.loop !19

130:                                              ; preds = %116
  br label %131

131:                                              ; preds = %139, %130
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = load i32, ptr %8, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %134
  %136 = getelementptr inbounds %struct.node, ptr %135, i32 0, i32 1
  %137 = load i32, ptr %136, align 4, !tbaa !17
  %138 = icmp sgt i32 %132, %137
  br i1 %138, label %139, label %145

139:                                              ; preds = %131
  %140 = load i32, ptr %7, align 4, !tbaa !5
  %141 = add nsw i32 %140, -1
  store i32 %141, ptr %7, align 4, !tbaa !5
  %142 = sext i32 %140 to i64
  %143 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  call void @_Z3deli(i32 noundef %144)
  br label %131, !llvm.loop !20

145:                                              ; preds = %131
  br label %146

146:                                              ; preds = %154, %145
  %147 = load i32, ptr %6, align 4, !tbaa !5
  %148 = load i32, ptr %8, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %149
  %151 = getelementptr inbounds %struct.node, ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 4, !tbaa !14
  %153 = icmp slt i32 %147, %152
  br i1 %153, label %154, label %160

154:                                              ; preds = %146
  %155 = load i32, ptr %6, align 4, !tbaa !5
  %156 = add nsw i32 %155, 1
  store i32 %156, ptr %6, align 4, !tbaa !5
  %157 = sext i32 %155 to i64
  %158 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  call void @_Z3deli(i32 noundef %159)
  br label %146, !llvm.loop !21

160:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %222, %160
  %162 = load i32, ptr %12, align 4, !tbaa !5
  %163 = load i32, ptr @all, align 4, !tbaa !5
  %164 = icmp sle i32 %162, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  store i32 22, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %225

166:                                              ; preds = %161
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %171
  %173 = load i8, ptr %172, align 1, !tbaa !22, !range !24, !noundef !25
  %174 = trunc i8 %173 to i1
  br i1 %174, label %221, label %175

175:                                              ; preds = %166
  %176 = load i32, ptr %12, align 4, !tbaa !5
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [56789 x i32], ptr @num, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = icmp sgt i32 %182, 0
  br i1 %183, label %184, label %221

184:                                              ; preds = %175
  %185 = load i32, ptr %12, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = load i32, ptr %8, align 4, !tbaa !5
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %190
  %192 = getelementptr inbounds %struct.node, ptr %191, i32 0, i32 2
  %193 = load i32, ptr %192, align 4, !tbaa !26
  %194 = call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %188, i32 noundef %193)
  %195 = icmp eq i32 %194, 1
  br i1 %195, label %196, label %206

196:                                              ; preds = %184
  %197 = load i32, ptr %12, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %198
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [56789 x i32], ptr @num, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = load i32, ptr %11, align 4, !tbaa !5
  %205 = add nsw i32 %204, %203
  store i32 %205, ptr %11, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %196, %184
  %207 = load i32, ptr %12, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %208
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = load i32, ptr %10, align 4, !tbaa !5
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %10, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %213
  store i32 %210, ptr %214, align 4, !tbaa !5
  %215 = load i32, ptr %12, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %219
  store i8 1, ptr %220, align 1, !tbaa !22
  br label %221

221:                                              ; preds = %206, %175, %166
  br label %222

222:                                              ; preds = %221
  %223 = load i32, ptr %12, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %12, align 4, !tbaa !5
  br label %161, !llvm.loop !27

225:                                              ; preds = %165
  %226 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %226, ptr @all, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %239, %225
  %228 = load i32, ptr %13, align 4, !tbaa !5
  %229 = load i32, ptr %10, align 4, !tbaa !5
  %230 = icmp sle i32 %228, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %227
  store i32 25, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %242

232:                                              ; preds = %227
  %233 = load i32, ptr %13, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %237
  store i8 0, ptr %238, align 1, !tbaa !22
  br label %239

239:                                              ; preds = %232
  %240 = load i32, ptr %13, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %13, align 4, !tbaa !5
  br label %227, !llvm.loop !28

242:                                              ; preds = %231
  %243 = load i32, ptr %11, align 4, !tbaa !5
  %244 = load i32, ptr %8, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %245
  %247 = getelementptr inbounds %struct.node, ptr %246, i32 0, i32 3
  %248 = load i32, ptr %247, align 4, !tbaa !12
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [56789 x i32], ptr @ret, i64 0, i64 %249
  store i32 %243, ptr %250, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %251

251:                                              ; preds = %242
  %252 = load i32, ptr %8, align 4, !tbaa !5
  %253 = add nsw i32 %252, 1
  store i32 %253, ptr %8, align 4, !tbaa !5
  br label %95, !llvm.loop !29

254:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %255

255:                                              ; preds = %266, %254
  %256 = load i32, ptr %14, align 4, !tbaa !5
  %257 = load i32, ptr @m, align 4, !tbaa !5
  %258 = icmp sle i32 %256, %257
  br i1 %258, label %260, label %259

259:                                              ; preds = %255
  store i32 28, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %269

260:                                              ; preds = %255
  %261 = load i32, ptr %14, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [56789 x i32], ptr @ret, i64 0, i64 %262
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %265 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %264)
  br label %266

266:                                              ; preds = %260
  %267 = load i32, ptr %14, align 4, !tbaa !5
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %14, align 4, !tbaa !5
  br label %255, !llvm.loop !30

269:                                              ; preds = %259
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %270 = load i32, ptr %1, align 4
  ret i32 %270
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef, i32 noundef) #0

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

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


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

%struct.node = type { i32, i32, i32, i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@times = external dso_local local_unnamed_addr global [227156 x i32], align 16
@a = external dso_local global [56789 x i32], align 16
@bl = external dso_local local_unnamed_addr global [56789 x i32], align 16
@num = external dso_local local_unnamed_addr global [56789 x i32], align 16
@ret = external dso_local local_unnamed_addr global [56789 x i32], align 16
@vis = external dso_local local_unnamed_addr global [227156 x i8], align 16
@all = external dso_local local_unnamed_addr global i32, align 4
@querys = external dso_local global [56789 x %struct.node], 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 [7 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 @_Z3insi(i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = tail call noundef double @_ZSt4sqrtIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %2)
  %4 = fptosi double %3 to i32
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not84 = icmp slt i32 %5, 1
  br i1 %.not84, label %.preheader80, 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 %.preheader81.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

.preheader81.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 %.preheader81, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader81.unr-lcssa
  %8 = trunc i64 %indvars.iv.unr to i32
  %9 = add i32 %8, -1
  %10 = sdiv i32 %9, %4
  %11 = add nsw i32 %10, 1
  %12 = getelementptr inbounds [56789 x i32], ptr @bl, i64 0, i64 %indvars.iv.unr
  store i32 %11, ptr %12, align 4, !tbaa !5
  br label %.preheader81

.preheader81:                                     ; preds = %.preheader81.unr-lcssa, %.lr.ph.epil
  br i1 %.not84, label %.preheader80, label %.lr.ph88

.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 ]
  %13 = trunc i64 %indvars.iv to i32
  %14 = add nsw i32 %13, -1
  %15 = sdiv i32 %14, %4
  %16 = add nsw i32 %15, 1
  %17 = getelementptr inbounds [56789 x i32], ptr @bl, i64 0, i64 %indvars.iv
  store i32 %16, ptr %17, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = trunc i64 %indvars.iv.next to i32
  %19 = add i32 %18, -1
  %20 = sdiv i32 %19, %4
  %21 = add nsw i32 %20, 1
  %22 = getelementptr inbounds [56789 x i32], ptr @bl, i64 0, i64 %indvars.iv.next
  store i32 %21, ptr %22, 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 %.preheader81.unr-lcssa, label %.lr.ph, !llvm.loop !9

.preheader80:                                     ; preds = %.lr.ph88, %0, %.preheader81
  %23 = load i32, ptr @m, align 4, !tbaa !5
  %.not7089 = icmp slt i32 %23, 1
  br i1 %.not7089, label %.preheader80.._crit_edge_crit_edge, label %.lr.ph91

.preheader80.._crit_edge_crit_edge:               ; preds = %.preheader80
  %.pre168 = sext i32 %23 to i64
  br label %._crit_edge

.lr.ph88:                                         ; preds = %.preheader81, %.lr.ph88
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %.lr.ph88 ], [ 1, %.preheader81 ]
  %24 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %indvars.iv133
  %25 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %24)
  %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %.not69.not = icmp slt i64 %indvars.iv133, %27
  br i1 %.not69.not, label %.lr.ph88, label %.preheader80, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph91, %.preheader80.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre168, %.preheader80.._crit_edge_crit_edge ], [ %43, %.lr.ph91 ]
  %28 = getelementptr inbounds %struct.node, ptr @querys, i64 %.pre-phi
  %29 = getelementptr inbounds i8, ptr %28, i64 20
  tail call void @_ZSt4sortIP4nodeEvT_S2_(ptr noundef nonnull getelementptr inbounds (i8, ptr @querys, i64 20), ptr noundef nonnull %29)
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %.not71120 = icmp slt i32 %30, 1
  br i1 %.not71120, label %._crit_edge127, label %.preheader79

.lr.ph91:                                         ; preds = %.preheader80, %.lr.ph91
  %indvars.iv136 = phi i64 [ %indvars.iv.next137, %.lr.ph91 ], [ 1, %.preheader80 ]
  %31 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %indvars.iv136
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  %33 = getelementptr inbounds i8, ptr %31, i64 8
  %34 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %31, ptr noundef nonnull %32, ptr noundef nonnull %33)
  %35 = getelementptr inbounds i8, ptr %31, i64 12
  %36 = trunc nuw nsw i64 %indvars.iv136 to i32
  store i32 %36, ptr %35, align 4, !tbaa !12
  %37 = load i32, ptr %31, align 4, !tbaa !14
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [56789 x i32], ptr @bl, i64 0, i64 %38
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %31, i64 16
  store i32 %40, ptr %41, align 4, !tbaa !15
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %.not70.not = icmp slt i64 %indvars.iv136, %43
  br i1 %.not70.not, label %.lr.ph91, label %._crit_edge, !llvm.loop !16

.preheader79:                                     ; preds = %._crit_edge, %._crit_edge119
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %._crit_edge119 ], [ 1, %._crit_edge ]
  %.059122 = phi i32 [ %.261.lcssa, %._crit_edge119 ], [ 0, %._crit_edge ]
  %.062121 = phi i32 [ %.264.lcssa, %._crit_edge119 ], [ 1, %._crit_edge ]
  %44 = getelementptr inbounds [56789 x %struct.node], ptr @querys, i64 0, i64 %indvars.iv159
  %45 = getelementptr inbounds i8, ptr %44, i64 4
  %46 = load i32, ptr %45, align 4, !tbaa !17
  %47 = icmp slt i32 %.059122, %46
  br i1 %47, label %.lr.ph94.preheader, label %.preheader78

.lr.ph94.preheader:                               ; preds = %.preheader79
  %48 = sext i32 %.059122 to i64
  br label %.lr.ph94

.preheader:                                       ; preds = %._crit_edge119
  %49 = icmp slt i32 %128, 1
  br i1 %49, label %._crit_edge127, label %.lr.ph126

.preheader78.loopexit:                            ; preds = %.lr.ph94
  %50 = trunc nsw i64 %indvars.iv.next140 to i32
  br label %.preheader78

.preheader78:                                     ; preds = %.preheader78.loopexit, %.preheader79
  %51 = phi i32 [ %46, %.preheader79 ], [ %57, %.preheader78.loopexit ]
  %.160.lcssa = phi i32 [ %.059122, %.preheader79 ], [ %50, %.preheader78.loopexit ]
  %52 = load i32, ptr %44, align 4, !tbaa !14
  %53 = icmp sgt i32 %.062121, %52
  br i1 %53, label %.lr.ph99.preheader, label %.preheader77

.lr.ph99.preheader:                               ; preds = %.preheader78
  %54 = sext i32 %.062121 to i64
  br label %.lr.ph99

.lr.ph94:                                         ; preds = %.lr.ph94.preheader, %.lr.ph94
  %indvars.iv139 = phi i64 [ %48, %.lr.ph94.preheader ], [ %indvars.iv.next140, %.lr.ph94 ]
  %indvars.iv.next140 = add nsw i64 %indvars.iv139, 1
  %55 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %indvars.iv.next140
  %56 = load i32, ptr %55, align 4, !tbaa !5
  tail call void @_Z3insi(i32 noundef %56)
  %57 = load i32, ptr %45, align 4, !tbaa !17
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next140, %58
  br i1 %59, label %.lr.ph94, label %.preheader78.loopexit, !llvm.loop !18

.preheader77.loopexit:                            ; preds = %.lr.ph99
  %60 = trunc nsw i64 %indvars.iv.next143 to i32
  %.pre = load i32, ptr %45, align 4, !tbaa !17
  br label %.preheader77

.preheader77:                                     ; preds = %.preheader77.loopexit, %.preheader78
  %61 = phi i32 [ %52, %.preheader78 ], [ %67, %.preheader77.loopexit ]
  %62 = phi i32 [ %51, %.preheader78 ], [ %.pre, %.preheader77.loopexit ]
  %.163.lcssa = phi i32 [ %.062121, %.preheader78 ], [ %60, %.preheader77.loopexit ]
  %63 = icmp sgt i32 %.160.lcssa, %62
  br i1 %63, label %.lr.ph102.preheader, label %.preheader76

.lr.ph102.preheader:                              ; preds = %.preheader77
  %64 = sext i32 %.160.lcssa to i64
  br label %.lr.ph102

.lr.ph99:                                         ; preds = %.lr.ph99.preheader, %.lr.ph99
  %indvars.iv142 = phi i64 [ %54, %.lr.ph99.preheader ], [ %indvars.iv.next143, %.lr.ph99 ]
  %indvars.iv.next143 = add nsw i64 %indvars.iv142, -1
  %65 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %indvars.iv.next143
  %66 = load i32, ptr %65, align 4, !tbaa !5
  tail call void @_Z3insi(i32 noundef %66)
  %67 = load i32, ptr %44, align 4, !tbaa !14
  %68 = sext i32 %67 to i64
  %69 = icmp sgt i64 %indvars.iv.next143, %68
  br i1 %69, label %.lr.ph99, label %.preheader77.loopexit, !llvm.loop !19

.preheader76.loopexit:                            ; preds = %.lr.ph102
  %70 = trunc nsw i64 %indvars.iv.next146 to i32
  %.pre165 = load i32, ptr %44, align 4, !tbaa !14
  br label %.preheader76

.preheader76:                                     ; preds = %.preheader76.loopexit, %.preheader77
  %71 = phi i32 [ %61, %.preheader77 ], [ %.pre165, %.preheader76.loopexit ]
  %.261.lcssa = phi i32 [ %.160.lcssa, %.preheader77 ], [ %70, %.preheader76.loopexit ]
  %72 = icmp slt i32 %.163.lcssa, %71
  br i1 %72, label %.lr.ph105.preheader, label %.preheader75

.lr.ph105.preheader:                              ; preds = %.preheader76
  %73 = sext i32 %.163.lcssa to i64
  br label %.lr.ph105

.lr.ph102:                                        ; preds = %.lr.ph102.preheader, %.lr.ph102
  %indvars.iv145 = phi i64 [ %64, %.lr.ph102.preheader ], [ %indvars.iv.next146, %.lr.ph102 ]
  %indvars.iv.next146 = add nsw i64 %indvars.iv145, -1
  %74 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %indvars.iv145
  %75 = load i32, ptr %74, align 4, !tbaa !5
  tail call void @_Z3deli(i32 noundef %75)
  %76 = load i32, ptr %45, align 4, !tbaa !17
  %77 = sext i32 %76 to i64
  %78 = icmp sgt i64 %indvars.iv.next146, %77
  br i1 %78, label %.lr.ph102, label %.preheader76.loopexit, !llvm.loop !20

.preheader75.loopexit:                            ; preds = %.lr.ph105
  %79 = trunc nsw i64 %indvars.iv.next149 to i32
  br label %.preheader75

.preheader75:                                     ; preds = %.preheader75.loopexit, %.preheader76
  %.264.lcssa = phi i32 [ %.163.lcssa, %.preheader76 ], [ %79, %.preheader75.loopexit ]
  %80 = load i32, ptr @all, align 4, !tbaa !5
  %.not73107 = icmp slt i32 %80, 1
  br i1 %.not73107, label %._crit_edge112.thread, label %.lr.ph111

._crit_edge112.thread:                            ; preds = %.preheader75
  store i32 0, ptr @all, align 4, !tbaa !5
  br label %._crit_edge119

.lr.ph111:                                        ; preds = %.preheader75
  %81 = getelementptr inbounds i8, ptr %44, i64 8
  br label %89

.lr.ph105:                                        ; preds = %.lr.ph105.preheader, %.lr.ph105
  %indvars.iv148 = phi i64 [ %73, %.lr.ph105.preheader ], [ %indvars.iv.next149, %.lr.ph105 ]
  %indvars.iv.next149 = add nsw i64 %indvars.iv148, 1
  %82 = getelementptr inbounds [56789 x i32], ptr @a, i64 0, i64 %indvars.iv148
  %83 = load i32, ptr %82, align 4, !tbaa !5
  tail call void @_Z3deli(i32 noundef %83)
  %84 = load i32, ptr %44, align 4, !tbaa !14
  %85 = sext i32 %84 to i64
  %86 = icmp slt i64 %indvars.iv.next149, %85
  br i1 %86, label %.lr.ph105, label %.preheader75.loopexit, !llvm.loop !21

._crit_edge112:                                   ; preds = %117
  store i32 %.157, ptr @all, align 4, !tbaa !5
  %.not74115 = icmp slt i32 %.157, 1
  br i1 %.not74115, label %._crit_edge119, label %.lr.ph118.preheader

.lr.ph118.preheader:                              ; preds = %._crit_edge112
  %87 = zext nneg i32 %.157 to i64
  %xtraiter183 = and i64 %87, 3
  %88 = icmp ult i32 %.157, 4
  br i1 %88, label %._crit_edge119.loopexit.unr-lcssa, label %.lr.ph118.preheader.new

.lr.ph118.preheader.new:                          ; preds = %.lr.ph118.preheader
  %unroll_iter185 = and i64 %87, 2147483644
  br label %.lr.ph118

89:                                               ; preds = %.lr.ph111, %117
  %90 = phi i32 [ %80, %.lr.ph111 ], [ %118, %117 ]
  %indvars.iv151 = phi i64 [ 1, %.lr.ph111 ], [ %indvars.iv.next152, %117 ]
  %.055109 = phi i32 [ 0, %.lr.ph111 ], [ %.2, %117 ]
  %.056108 = phi i32 [ 0, %.lr.ph111 ], [ %.157, %117 ]
  %91 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %indvars.iv151
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !22, !range !24, !noundef !25
  %96 = trunc nuw i8 %95 to i1
  br i1 %96, label %117, label %97

97:                                               ; preds = %89
  %98 = getelementptr inbounds [56789 x i32], ptr @num, i64 0, i64 %93
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, 0
  br i1 %100, label %101, label %117

101:                                              ; preds = %97
  %102 = load i32, ptr %81, align 4, !tbaa !26
  %103 = tail call noundef i32 @_ZSt5__gcdIiET_S0_S0_(i32 noundef %92, i32 noundef %102)
  %104 = icmp eq i32 %103, 1
  %.pre166 = load i32, ptr %91, align 4, !tbaa !5
  br i1 %104, label %105, label %110

105:                                              ; preds = %101
  %106 = sext i32 %.pre166 to i64
  %107 = getelementptr inbounds [56789 x i32], ptr @num, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = add nsw i32 %108, %.055109
  br label %110

110:                                              ; preds = %105, %101
  %.1 = phi i32 [ %109, %105 ], [ %.055109, %101 ]
  %111 = add nsw i32 %.056108, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %112
  store i32 %.pre166, ptr %113, align 4, !tbaa !5
  %114 = load i32, ptr %91, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %115
  store i8 1, ptr %116, align 1, !tbaa !22
  %.pre167 = load i32, ptr @all, align 4, !tbaa !5
  br label %117

117:                                              ; preds = %89, %97, %110
  %118 = phi i32 [ %90, %89 ], [ %.pre167, %110 ], [ %90, %97 ]
  %.157 = phi i32 [ %.056108, %89 ], [ %111, %110 ], [ %.056108, %97 ]
  %.2 = phi i32 [ %.055109, %89 ], [ %.1, %110 ], [ %.055109, %97 ]
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %119 = sext i32 %118 to i64
  %.not73.not = icmp slt i64 %indvars.iv151, %119
  br i1 %.not73.not, label %89, label %._crit_edge112, !llvm.loop !27

._crit_edge119.loopexit.unr-lcssa:                ; preds = %.lr.ph118, %.lr.ph118.preheader
  %indvars.iv154.unr = phi i64 [ 1, %.lr.ph118.preheader ], [ %indvars.iv.next155.3, %.lr.ph118 ]
  %lcmp.mod184.not = icmp eq i64 %xtraiter183, 0
  br i1 %lcmp.mod184.not, label %._crit_edge119, label %.lr.ph118.epil

.lr.ph118.epil:                                   ; preds = %._crit_edge119.loopexit.unr-lcssa, %.lr.ph118.epil
  %indvars.iv154.epil = phi i64 [ %indvars.iv.next155.epil, %.lr.ph118.epil ], [ %indvars.iv154.unr, %._crit_edge119.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph118.epil ], [ 0, %._crit_edge119.loopexit.unr-lcssa ]
  %120 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %indvars.iv154.epil
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %122
  store i8 0, ptr %123, align 1, !tbaa !22
  %indvars.iv.next155.epil = add nuw nsw i64 %indvars.iv154.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter183
  br i1 %epil.iter.cmp.not, label %._crit_edge119, label %.lr.ph118.epil, !llvm.loop !28

._crit_edge119:                                   ; preds = %._crit_edge119.loopexit.unr-lcssa, %.lr.ph118.epil, %._crit_edge112.thread, %._crit_edge112
  %.055.lcssa173 = phi i32 [ 0, %._crit_edge112.thread ], [ %.2, %._crit_edge112 ], [ %.2, %.lr.ph118.epil ], [ %.2, %._crit_edge119.loopexit.unr-lcssa ]
  %124 = getelementptr inbounds i8, ptr %44, i64 12
  %125 = load i32, ptr %124, align 4, !tbaa !12
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [56789 x i32], ptr @ret, i64 0, i64 %126
  store i32 %.055.lcssa173, ptr %127, align 4, !tbaa !5
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %128 = load i32, ptr @m, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %.not71.not = icmp slt i64 %indvars.iv159, %129
  br i1 %.not71.not, label %.preheader79, label %.preheader, !llvm.loop !30

.lr.ph118:                                        ; preds = %.lr.ph118, %.lr.ph118.preheader.new
  %indvars.iv154 = phi i64 [ 1, %.lr.ph118.preheader.new ], [ %indvars.iv.next155.3, %.lr.ph118 ]
  %niter186 = phi i64 [ 0, %.lr.ph118.preheader.new ], [ %niter186.next.3, %.lr.ph118 ]
  %130 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %indvars.iv154
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %132
  store i8 0, ptr %133, align 1, !tbaa !22
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %134 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %indvars.iv.next155
  %135 = load i32, ptr %134, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %136
  store i8 0, ptr %137, align 1, !tbaa !22
  %indvars.iv.next155.1 = add nuw nsw i64 %indvars.iv154, 2
  %138 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %indvars.iv.next155.1
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %140
  store i8 0, ptr %141, align 1, !tbaa !22
  %indvars.iv.next155.2 = add nuw nsw i64 %indvars.iv154, 3
  %142 = getelementptr inbounds [227156 x i32], ptr @times, i64 0, i64 %indvars.iv.next155.2
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [227156 x i8], ptr @vis, i64 0, i64 %144
  store i8 0, ptr %145, align 1, !tbaa !22
  %indvars.iv.next155.3 = add nuw nsw i64 %indvars.iv154, 4
  %niter186.next.3 = add i64 %niter186, 4
  %niter186.ncmp.3 = icmp eq i64 %niter186.next.3, %unroll_iter185
  br i1 %niter186.ncmp.3, label %._crit_edge119.loopexit.unr-lcssa, label %.lr.ph118, !llvm.loop !31

._crit_edge127:                                   ; preds = %.lr.ph126, %._crit_edge, %.preheader
  ret i32 0

.lr.ph126:                                        ; preds = %.preheader, %.lr.ph126
  %indvars.iv162 = phi i64 [ %indvars.iv.next163, %.lr.ph126 ], [ 1, %.preheader ]
  %146 = getelementptr inbounds [56789 x i32], ptr @ret, i64 0, i64 %indvars.iv162
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %147)
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1
  %149 = load i32, ptr @m, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %.not72.not = icmp slt i64 %indvars.iv162, %150
  br i1 %.not72.not, label %.lr.ph126, label %._crit_edge127, !llvm.loop !32
}

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

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

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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" }

!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, !6, i64 12}
!13 = !{!"_ZTS4node", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16}
!14 = !{!13, !6, i64 0}
!15 = !{!13, !6, i64 16}
!16 = distinct !{!16, !10}
!17 = !{!13, !6, i64 4}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = !{!23, !23, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!13, !6, i64 8}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.unroll.disable"}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}


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