; LLVM IR from tangjz/acm-icpc :: lydsy (3563)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@g = external dso_local global [500001 x [2 x i32]], align 16
@cnt = external dso_local global i32, align 4
@t = external dso_local global i32, align 4
@tt = external dso_local global [16 x i32], align 16
@fa = external dso_local global [100001 x i32], align 16
@vis = external dso_local global [500001 x i8], align 16
@ch = external dso_local global i8, align 1
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca 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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %13 = call noundef i32 @_Z6getintv()
  store i32 %13, ptr @n, align 4, !tbaa !5
  %14 = call noundef i32 @_Z6getintv()
  store i32 %14, ptr @m, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %31, %0
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = load i32, ptr @m, align 4, !tbaa !5
  %18 = icmp sle i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %34

20:                                               ; preds = %15
  %21 = call noundef i32 @_Z6getintv()
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [500001 x [2 x i32]], ptr @g, i64 0, i64 %23
  %25 = getelementptr inbounds [2 x i32], ptr %24, i64 0, i64 0
  store i32 %21, ptr %25, align 8, !tbaa !5
  %26 = call noundef i32 @_Z6getintv()
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [500001 x [2 x i32]], ptr @g, i64 0, i64 %28
  %30 = getelementptr inbounds [2 x i32], ptr %29, i64 0, i64 1
  store i32 %26, ptr %30, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %20
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %4, align 4, !tbaa !5
  br label %15, !llvm.loop !9

34:                                               ; preds = %19
  %35 = call noundef i32 @_Z6getintv()
  store i32 %35, ptr @q, align 4, !tbaa !5
  %36 = call noundef i32 @_Z6getintv()
  store i32 %36, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %69, %34
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = load i32, ptr %2, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %37
  br label %43

43:                                               ; preds = %54, %42
  %44 = call i32 @getchar()
  %45 = trunc i32 %44 to i8
  store i8 %45, ptr @ch, align 1, !tbaa !11
  %46 = sext i8 %45 to i32
  %47 = icmp slt i32 %46, 48
  br i1 %47, label %52, label %48

48:                                               ; preds = %43
  %49 = load i8, ptr @ch, align 1, !tbaa !11
  %50 = sext i8 %49 to i32
  %51 = icmp sgt i32 %50, 57
  br label %52

52:                                               ; preds = %48, %43
  %53 = phi i1 [ true, %43 ], [ %51, %48 ]
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  br label %43, !llvm.loop !12

55:                                               ; preds = %52
  br label %56

56:                                               ; preds = %67, %55
  %57 = call i32 @getchar()
  %58 = trunc i32 %57 to i8
  store i8 %58, ptr @ch, align 1, !tbaa !11
  %59 = sext i8 %58 to i32
  %60 = icmp sge i32 %59, 48
  br i1 %60, label %61, label %65

61:                                               ; preds = %56
  %62 = load i8, ptr @ch, align 1, !tbaa !11
  %63 = sext i8 %62 to i32
  %64 = icmp sle i32 %63, 57
  br label %65

65:                                               ; preds = %61, %56
  %66 = phi i1 [ false, %56 ], [ %64, %61 ]
  br i1 %66, label %67, label %68

67:                                               ; preds = %65
  br label %56, !llvm.loop !13

68:                                               ; preds = %65
  br label %69

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

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

73:                                               ; preds = %133, %72
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = load i32, ptr @q, align 4, !tbaa !5
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %136

78:                                               ; preds = %73
  %79 = call noundef i32 @_Z6getintv()
  store i32 %79, ptr %2, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %119, %78
  %81 = load i8, ptr @ch, align 1, !tbaa !11
  %82 = sext i8 %81 to i32
  %83 = icmp ne i32 %82, 10
  br i1 %83, label %84, label %122

84:                                               ; preds = %80
  br label %85

85:                                               ; preds = %100, %84
  %86 = call i32 @getchar()
  %87 = trunc i32 %86 to i8
  store i8 %87, ptr @ch, align 1, !tbaa !11
  %88 = sext i8 %87 to i32
  %89 = icmp slt i32 %88, 48
  br i1 %89, label %94, label %90

90:                                               ; preds = %85
  %91 = load i8, ptr @ch, align 1, !tbaa !11
  %92 = sext i8 %91 to i32
  %93 = icmp sgt i32 %92, 57
  br i1 %93, label %94, label %98

94:                                               ; preds = %90, %85
  %95 = load i8, ptr @ch, align 1, !tbaa !11
  %96 = sext i8 %95 to i32
  %97 = icmp ne i32 %96, 10
  br label %98

98:                                               ; preds = %94, %90
  %99 = phi i1 [ false, %90 ], [ %97, %94 ]
  br i1 %99, label %100, label %101

100:                                              ; preds = %98
  br label %85, !llvm.loop !15

101:                                              ; preds = %98
  %102 = load i8, ptr @ch, align 1, !tbaa !11
  %103 = sext i8 %102 to i32
  %104 = icmp eq i32 %103, 10
  br i1 %104, label %105, label %106

105:                                              ; preds = %101
  br label %122

106:                                              ; preds = %101
  br label %107

107:                                              ; preds = %118, %106
  %108 = call i32 @getchar()
  %109 = trunc i32 %108 to i8
  store i8 %109, ptr @ch, align 1, !tbaa !11
  %110 = sext i8 %109 to i32
  %111 = icmp sge i32 %110, 48
  br i1 %111, label %112, label %116

112:                                              ; preds = %107
  %113 = load i8, ptr @ch, align 1, !tbaa !11
  %114 = sext i8 %113 to i32
  %115 = icmp sle i32 %114, 57
  br label %116

116:                                              ; preds = %112, %107
  %117 = phi i1 [ false, %107 ], [ %115, %112 ]
  br i1 %117, label %118, label %119

118:                                              ; preds = %116
  br label %107, !llvm.loop !16

119:                                              ; preds = %116
  %120 = load i32, ptr %3, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %3, align 4, !tbaa !5
  br label %80, !llvm.loop !17

122:                                              ; preds = %105, %80
  %123 = load i32, ptr %3, align 4, !tbaa !5
  %124 = load i32, ptr %2, align 4, !tbaa !5
  %125 = xor i32 %124, %123
  store i32 %125, ptr %2, align 4, !tbaa !5
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = load i32, ptr @cnt, align 4, !tbaa !5
  %128 = icmp sgt i32 %126, %127
  %129 = zext i1 %128 to i64
  %130 = select i1 %128, ptr @.str, ptr @.str.1
  %131 = call i32 @puts(ptr noundef %130)
  %132 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %132, ptr @cnt, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %122
  %134 = load i32, ptr %6, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %6, align 4, !tbaa !5
  br label %73, !llvm.loop !18

136:                                              ; preds = %77
  %137 = call noundef i32 @_Z6getintv()
  store i32 %137, ptr %2, align 4, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %189, %136
  %139 = load i8, ptr @ch, align 1, !tbaa !11
  %140 = sext i8 %139 to i32
  %141 = icmp ne i32 %140, 10
  br i1 %141, label %142, label %195

142:                                              ; preds = %138
  br label %143

143:                                              ; preds = %158, %142
  %144 = call i32 @getchar()
  %145 = trunc i32 %144 to i8
  store i8 %145, ptr @ch, align 1, !tbaa !11
  %146 = sext i8 %145 to i32
  %147 = icmp slt i32 %146, 48
  br i1 %147, label %152, label %148

148:                                              ; preds = %143
  %149 = load i8, ptr @ch, align 1, !tbaa !11
  %150 = sext i8 %149 to i32
  %151 = icmp sgt i32 %150, 57
  br i1 %151, label %152, label %156

152:                                              ; preds = %148, %143
  %153 = load i8, ptr @ch, align 1, !tbaa !11
  %154 = sext i8 %153 to i32
  %155 = icmp ne i32 %154, 10
  br label %156

156:                                              ; preds = %152, %148
  %157 = phi i1 [ false, %148 ], [ %155, %152 ]
  br i1 %157, label %158, label %159

158:                                              ; preds = %156
  br label %143, !llvm.loop !19

159:                                              ; preds = %156
  %160 = load i8, ptr @ch, align 1, !tbaa !11
  %161 = sext i8 %160 to i32
  %162 = icmp eq i32 %161, 10
  br i1 %162, label %163, label %164

163:                                              ; preds = %159
  br label %195

164:                                              ; preds = %159
  %165 = load i8, ptr @ch, align 1, !tbaa !11
  %166 = sext i8 %165 to i32
  %167 = sub nsw i32 %166, 48
  store i32 %167, ptr @t, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %179, %164
  %169 = call i32 @getchar()
  %170 = trunc i32 %169 to i8
  store i8 %170, ptr @ch, align 1, !tbaa !11
  %171 = sext i8 %170 to i32
  %172 = icmp sge i32 %171, 48
  br i1 %172, label %173, label %177

173:                                              ; preds = %168
  %174 = load i8, ptr @ch, align 1, !tbaa !11
  %175 = sext i8 %174 to i32
  %176 = icmp sle i32 %175, 57
  br label %177

177:                                              ; preds = %173, %168
  %178 = phi i1 [ false, %168 ], [ %176, %173 ]
  br i1 %178, label %179, label %189

179:                                              ; preds = %177
  %180 = load i32, ptr @t, align 4, !tbaa !5
  %181 = shl i32 %180, 3
  %182 = load i32, ptr @t, align 4, !tbaa !5
  %183 = shl i32 %182, 1
  %184 = add nsw i32 %181, %183
  %185 = load i8, ptr @ch, align 1, !tbaa !11
  %186 = sext i8 %185 to i32
  %187 = add nsw i32 %184, %186
  %188 = sub nsw i32 %187, 48
  store i32 %188, ptr @t, align 4, !tbaa !5
  br label %168, !llvm.loop !20

189:                                              ; preds = %177
  %190 = load i32, ptr @t, align 4, !tbaa !5
  %191 = load i32, ptr %3, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %3, align 4, !tbaa !5
  %193 = sext i32 %191 to i64
  %194 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %193
  store i32 %190, ptr %194, align 4, !tbaa !5
  br label %138, !llvm.loop !21

195:                                              ; preds = %163, %138
  %196 = load i32, ptr %3, align 4, !tbaa !5
  %197 = load i32, ptr %2, align 4, !tbaa !5
  %198 = xor i32 %197, %196
  store i32 %198, ptr %2, align 4, !tbaa !5
  %199 = load i32, ptr %2, align 4, !tbaa !5
  %200 = load i32, ptr @cnt, align 4, !tbaa !5
  %201 = icmp sgt i32 %199, %200
  %202 = zext i1 %201 to i64
  %203 = select i1 %201, ptr @.str, ptr @.str.1
  %204 = call i32 @puts(ptr noundef %203)
  %205 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %205, ptr @cnt, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %220, %195
  %207 = load i32, ptr %7, align 4, !tbaa !5
  %208 = load i32, ptr %3, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %211, label %210

210:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %223

211:                                              ; preds = %206
  %212 = load i32, ptr %7, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = load i32, ptr @cnt, align 4, !tbaa !5
  %217 = xor i32 %215, %216
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %218
  store i8 1, ptr %219, align 1, !tbaa !22
  br label %220

220:                                              ; preds = %211
  %221 = load i32, ptr %7, align 4, !tbaa !5
  %222 = add nsw i32 %221, 1
  store i32 %222, ptr %7, align 4, !tbaa !5
  br label %206, !llvm.loop !24

223:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %234, %223
  %225 = load i32, ptr %8, align 4, !tbaa !5
  %226 = load i32, ptr @n, align 4, !tbaa !5
  %227 = icmp sle i32 %225, %226
  br i1 %227, label %229, label %228

228:                                              ; preds = %224
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %237

229:                                              ; preds = %224
  %230 = load i32, ptr %8, align 4, !tbaa !5
  %231 = load i32, ptr %8, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %232
  store i32 %230, ptr %233, align 4, !tbaa !5
  br label %234

234:                                              ; preds = %229
  %235 = load i32, ptr %8, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %8, align 4, !tbaa !5
  br label %224, !llvm.loop !25

237:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %265, %237
  %239 = load i32, ptr %9, align 4, !tbaa !5
  %240 = load i32, ptr @m, align 4, !tbaa !5
  %241 = icmp sle i32 %239, %240
  br i1 %241, label %243, label %242

242:                                              ; preds = %238
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %268

243:                                              ; preds = %238
  %244 = load i32, ptr %9, align 4, !tbaa !5
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %245
  %247 = load i8, ptr %246, align 1, !tbaa !22, !range !26, !noundef !27
  %248 = trunc i8 %247 to i1
  br i1 %248, label %264, label %249

249:                                              ; preds = %243
  %250 = load i32, ptr %9, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [500001 x [2 x i32]], ptr @g, i64 0, i64 %251
  %253 = getelementptr inbounds [2 x i32], ptr %252, i64 0, i64 1
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = call noundef i32 @_Z4findi(i32 noundef %254)
  %256 = load i32, ptr %9, align 4, !tbaa !5
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [500001 x [2 x i32]], ptr @g, i64 0, i64 %257
  %259 = getelementptr inbounds [2 x i32], ptr %258, i64 0, i64 0
  %260 = load i32, ptr %259, align 8, !tbaa !5
  %261 = call noundef i32 @_Z4findi(i32 noundef %260)
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %262
  store i32 %255, ptr %263, align 4, !tbaa !5
  br label %264

264:                                              ; preds = %249, %243
  br label %265

265:                                              ; preds = %264
  %266 = load i32, ptr %9, align 4, !tbaa !5
  %267 = add nsw i32 %266, 1
  store i32 %267, ptr %9, align 4, !tbaa !5
  br label %238, !llvm.loop !28

268:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 2, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %269 = call noundef i32 @_Z4findi(i32 noundef 1)
  store i32 %269, ptr %11, align 4, !tbaa !5
  br label %270

270:                                              ; preds = %283, %268
  %271 = load i32, ptr %10, align 4, !tbaa !5
  %272 = load i32, ptr @n, align 4, !tbaa !5
  %273 = icmp sle i32 %271, %272
  br i1 %273, label %275, label %274

274:                                              ; preds = %270
  store i32 36, ptr %12, align 4
  br label %286

275:                                              ; preds = %270
  %276 = load i32, ptr %10, align 4, !tbaa !5
  %277 = call noundef i32 @_Z4findi(i32 noundef %276)
  %278 = load i32, ptr %11, align 4, !tbaa !5
  %279 = icmp ne i32 %277, %278
  br i1 %279, label %280, label %282

280:                                              ; preds = %275
  %281 = call i32 @puts(ptr noundef @.str.1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %286

282:                                              ; preds = %275
  br label %283

283:                                              ; preds = %282
  %284 = load i32, ptr %10, align 4, !tbaa !5
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %10, align 4, !tbaa !5
  br label %270, !llvm.loop !29

286:                                              ; preds = %280, %274
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %287 = load i32, ptr %12, align 4
  switch i32 %287, label %290 [
    i32 36, label %288
  ]

288:                                              ; preds = %286
  %289 = call i32 @puts(ptr noundef @.str)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  br label %290

290:                                              ; preds = %288, %286
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %291 = load i32, ptr %1, align 4
  ret i32 %291
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z6getintv() #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @getchar() #2

declare i32 @puts(ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) #2

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

@n = external dso_local local_unnamed_addr global i32, align 4
@m = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local local_unnamed_addr global [500001 x [2 x i32]], align 16
@cnt = external dso_local local_unnamed_addr global i32, align 4
@t = external dso_local local_unnamed_addr global i32, align 4
@tt = external dso_local local_unnamed_addr global [16 x i32], align 16
@fa = external dso_local local_unnamed_addr global [100001 x i32], align 16
@vis = external dso_local local_unnamed_addr global [500001 x i8], align 16
@ch = external dso_local local_unnamed_addr global i8, align 1
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call noundef i32 @_Z6getintv()
  store i32 %1, ptr @n, align 4, !tbaa !5
  %2 = tail call noundef i32 @_Z6getintv()
  store i32 %2, ptr @m, align 4, !tbaa !5
  %.not84 = icmp slt i32 %2, 1
  br i1 %.not84, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %3 = tail call noundef i32 @_Z6getintv()
  store i32 %3, ptr @q, align 4, !tbaa !5
  %4 = tail call noundef i32 @_Z6getintv()
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.preheader83, label %.preheader81

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %6 = tail call noundef i32 @_Z6getintv()
  %7 = getelementptr inbounds [500001 x [2 x i32]], ptr @g, i64 0, i64 %indvars.iv
  store i32 %6, ptr %7, align 8, !tbaa !5
  %8 = tail call noundef i32 @_Z6getintv()
  %9 = getelementptr inbounds i8, ptr %7, i64 4
  store i32 %8, ptr %9, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %10 = load i32, ptr @m, align 4, !tbaa !5
  %11 = sext i32 %10 to i64
  %.not.not = icmp slt i64 %indvars.iv, %11
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader83:                                     ; preds = %._crit_edge, %25
  %.05786 = phi i32 [ %26, %25 ], [ 0, %._crit_edge ]
  br label %14

.preheader81:                                     ; preds = %25, %._crit_edge
  %12 = load i32, ptr @q, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 2
  br i1 %13, label %.lr.ph92, label %._crit_edge93

14:                                               ; preds = %.preheader83, %14
  %15 = tail call i32 @getchar()
  %16 = trunc i32 %15 to i8
  store i8 %16, ptr @ch, align 1, !tbaa !11
  %sext72 = shl i32 %15, 24
  %17 = ashr exact i32 %sext72, 24
  %18 = add nsw i32 %17, -58
  %19 = icmp ult i32 %18, -10
  br i1 %19, label %14, label %.preheader82, !llvm.loop !12

.preheader82:                                     ; preds = %14, %.preheader82
  %20 = tail call i32 @getchar()
  %21 = trunc i32 %20 to i8
  store i8 %21, ptr @ch, align 1, !tbaa !11
  %sext73 = shl i32 %20, 24
  %22 = ashr exact i32 %sext73, 24
  %23 = add nsw i32 %22, -48
  %24 = icmp ult i32 %23, 10
  br i1 %24, label %.preheader82, label %25, !llvm.loop !13

25:                                               ; preds = %.preheader82
  %26 = add nuw nsw i32 %.05786, 1
  %exitcond.not = icmp eq i32 %26, %4
  br i1 %exitcond.not, label %.preheader81, label %.preheader83, !llvm.loop !14

._crit_edge93:                                    ; preds = %.critedge._crit_edge, %.preheader81
  %27 = tail call noundef i32 @_Z6getintv()
  %28 = load i8, ptr @ch, align 1, !tbaa !11
  %.not6398 = icmp eq i8 %28, 10
  br i1 %.not6398, label %.critedge7._crit_edge, label %.preheader78

.lr.ph92:                                         ; preds = %.preheader81, %.critedge._crit_edge
  %.05691 = phi i32 [ %50, %.critedge._crit_edge ], [ 2, %.preheader81 ]
  %29 = tail call noundef i32 @_Z6getintv()
  %30 = load i8, ptr @ch, align 1, !tbaa !11
  %.not6987 = icmp eq i8 %30, 10
  br i1 %.not6987, label %.critedge._crit_edge, label %.preheader80

.preheader80:                                     ; preds = %.lr.ph92, %43
  %.05988 = phi i32 [ %44, %43 ], [ 0, %.lr.ph92 ]
  br label %31

31:                                               ; preds = %.preheader80, %31
  %32 = tail call i32 @getchar()
  %33 = trunc i32 %32 to i8
  store i8 %33, ptr @ch, align 1, !tbaa !11
  %sext70 = shl i32 %32, 24
  %34 = ashr exact i32 %sext70, 24
  %35 = add nsw i32 %34, -58
  %or.cond = icmp ult i32 %35, -10
  %36 = icmp ne i32 %sext70, 167772160
  %or.cond10 = and i1 %36, %or.cond
  br i1 %or.cond10, label %31, label %.critedge, !llvm.loop !15

.critedge:                                        ; preds = %31
  %37 = icmp eq i32 %sext70, 167772160
  br i1 %37, label %.critedge._crit_edge, label %.preheader79

.preheader79:                                     ; preds = %.critedge, %.preheader79
  %38 = tail call i32 @getchar()
  %39 = trunc i32 %38 to i8
  store i8 %39, ptr @ch, align 1, !tbaa !11
  %sext71 = shl i32 %38, 24
  %40 = ashr exact i32 %sext71, 24
  %41 = add nsw i32 %40, -48
  %42 = icmp ult i32 %41, 10
  br i1 %42, label %.preheader79, label %43, !llvm.loop !16

43:                                               ; preds = %.preheader79
  %44 = add nuw nsw i32 %.05988, 1
  %.not69 = icmp eq i8 %39, 10
  br i1 %.not69, label %.critedge._crit_edge, label %.preheader80, !llvm.loop !17

.critedge._crit_edge:                             ; preds = %43, %.critedge, %.lr.ph92
  %.059.lcssa = phi i32 [ 0, %.lr.ph92 ], [ %.05988, %.critedge ], [ %44, %43 ]
  %45 = xor i32 %.059.lcssa, %29
  %46 = load i32, ptr @cnt, align 4, !tbaa !5
  %47 = icmp sgt i32 %45, %46
  %48 = select i1 %47, ptr @.str, ptr @.str.1
  %49 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %48)
  store i32 %45, ptr @cnt, align 4, !tbaa !5
  %50 = add nuw nsw i32 %.05691, 1
  %51 = load i32, ptr @q, align 4, !tbaa !5
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %.lr.ph92, label %._crit_edge93, !llvm.loop !18

.preheader78:                                     ; preds = %._crit_edge93, %._crit_edge97
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %._crit_edge97 ], [ 0, %._crit_edge93 ]
  br label %53

53:                                               ; preds = %.preheader78, %53
  %54 = tail call i32 @getchar()
  %55 = trunc i32 %54 to i8
  store i8 %55, ptr @ch, align 1, !tbaa !11
  %sext = shl i32 %54, 24
  %56 = ashr exact i32 %sext, 24
  %57 = add nsw i32 %56, -58
  %or.cond5 = icmp ult i32 %57, -10
  %58 = icmp ne i32 %sext, 167772160
  %or.cond13 = and i1 %58, %or.cond5
  br i1 %or.cond13, label %53, label %.critedge7, !llvm.loop !19

.critedge7:                                       ; preds = %53
  %59 = icmp eq i32 %sext, 167772160
  br i1 %59, label %.critedge7._crit_edge.loopexit, label %.preheader77

.preheader77:                                     ; preds = %.critedge7
  %storemerge94 = add nsw i32 %56, -48
  store i32 %storemerge94, ptr @t, align 4, !tbaa !5
  %60 = tail call i32 @getchar()
  %61 = trunc i32 %60 to i8
  store i8 %61, ptr @ch, align 1, !tbaa !11
  %sext6495 = shl i32 %60, 24
  %62 = ashr exact i32 %sext6495, 24
  %63 = add nsw i32 %62, -48
  %64 = icmp ult i32 %63, 10
  br i1 %64, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %.preheader77, %.lr.ph96
  %65 = phi i32 [ %71, %.lr.ph96 ], [ %62, %.preheader77 ]
  %66 = load i32, ptr @t, align 4, !tbaa !5
  %67 = mul i32 %66, 10
  %68 = add nsw i32 %67, %65
  %storemerge = add nsw i32 %68, -48
  store i32 %storemerge, ptr @t, align 4, !tbaa !5
  %69 = tail call i32 @getchar()
  %70 = trunc i32 %69 to i8
  store i8 %70, ptr @ch, align 1, !tbaa !11
  %sext64 = shl i32 %69, 24
  %71 = ashr exact i32 %sext64, 24
  %72 = add nsw i32 %71, -48
  %73 = icmp ult i32 %72, 10
  br i1 %73, label %.lr.ph96, label %._crit_edge97, !llvm.loop !20

._crit_edge97:                                    ; preds = %.lr.ph96, %.preheader77
  %74 = phi i8 [ %61, %.preheader77 ], [ %70, %.lr.ph96 ]
  %75 = load i32, ptr @t, align 4, !tbaa !5
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %76 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %indvars.iv118
  store i32 %75, ptr %76, align 4, !tbaa !5
  %.not63 = icmp eq i8 %74, 10
  br i1 %.not63, label %.critedge7._crit_edge.loopexit, label %.preheader78, !llvm.loop !21

.critedge7._crit_edge.loopexit:                   ; preds = %.critedge7, %._crit_edge97
  %.160.lcssa.ph.in = phi i64 [ %indvars.iv.next119, %._crit_edge97 ], [ %indvars.iv118, %.critedge7 ]
  %.160.lcssa.ph = trunc i64 %.160.lcssa.ph.in to i32
  br label %.critedge7._crit_edge

.critedge7._crit_edge:                            ; preds = %.critedge7._crit_edge.loopexit, %._crit_edge93
  %.160.lcssa = phi i32 [ 0, %._crit_edge93 ], [ %.160.lcssa.ph, %.critedge7._crit_edge.loopexit ]
  %77 = xor i32 %.160.lcssa, %27
  %78 = load i32, ptr @cnt, align 4, !tbaa !5
  %79 = icmp sgt i32 %77, %78
  %80 = select i1 %79, ptr @.str, ptr @.str.1
  %81 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %80)
  store i32 %77, ptr @cnt, align 4, !tbaa !5
  %.not = icmp eq i32 %.160.lcssa, 0
  br i1 %.not, label %.preheader76, label %.lr.ph105.preheader

.lr.ph105.preheader:                              ; preds = %.critedge7._crit_edge
  %wide.trip.count = zext i32 %.160.lcssa to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %82 = icmp ult i32 %.160.lcssa, 4
  br i1 %82, label %.preheader76.loopexit.unr-lcssa, label %.lr.ph105.preheader.new

.lr.ph105.preheader.new:                          ; preds = %.lr.ph105.preheader
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %.lr.ph105

.preheader76.loopexit.unr-lcssa:                  ; preds = %.lr.ph105, %.lr.ph105.preheader
  %indvars.iv121.unr = phi i64 [ 0, %.lr.ph105.preheader ], [ %indvars.iv.next122.3, %.lr.ph105 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader76, label %.lr.ph105.epil

.lr.ph105.epil:                                   ; preds = %.preheader76.loopexit.unr-lcssa, %.lr.ph105.epil
  %indvars.iv121.epil = phi i64 [ %indvars.iv.next122.epil, %.lr.ph105.epil ], [ %indvars.iv121.unr, %.preheader76.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph105.epil ], [ 0, %.preheader76.loopexit.unr-lcssa ]
  %83 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %indvars.iv121.epil
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = xor i32 %84, %77
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %86
  store i8 1, ptr %87, align 1, !tbaa !22
  %indvars.iv.next122.epil = add nuw nsw i64 %indvars.iv121.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader76, label %.lr.ph105.epil, !llvm.loop !24

.preheader76:                                     ; preds = %.preheader76.loopexit.unr-lcssa, %.lr.ph105.epil, %.critedge7._crit_edge
  %88 = load i32, ptr @n, align 4, !tbaa !5
  %.not65106 = icmp slt i32 %88, 1
  br i1 %.not65106, label %.preheader, label %.lr.ph108.preheader

.lr.ph108.preheader:                              ; preds = %.preheader76
  %89 = add nuw i32 %88, 1
  %wide.trip.count130 = zext i32 %89 to i64
  %90 = zext nneg i32 %88 to i64
  %min.iters.check = icmp ult i32 %88, 8
  br i1 %min.iters.check, label %.lr.ph108.preheader141, label %vector.ph

.lr.ph108.preheader141:                           ; preds = %middle.block, %.lr.ph108.preheader
  %indvars.iv126.ph = phi i64 [ 1, %.lr.ph108.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph108

vector.ph:                                        ; preds = %.lr.ph108.preheader
  %n.vec = and i64 %90, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %91 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %offset.idx
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  store <4 x i32> %vec.ind, ptr %91, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %92, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %93 = icmp eq i64 %index.next, %n.vec
  br i1 %93, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %90
  br i1 %cmp.n, label %.preheader, label %.lr.ph108.preheader141

.lr.ph105:                                        ; preds = %.lr.ph105, %.lr.ph105.preheader.new
  %indvars.iv121 = phi i64 [ 0, %.lr.ph105.preheader.new ], [ %indvars.iv.next122.3, %.lr.ph105 ]
  %niter = phi i64 [ 0, %.lr.ph105.preheader.new ], [ %niter.next.3, %.lr.ph105 ]
  %94 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %indvars.iv121
  %95 = load i32, ptr %94, align 16, !tbaa !5
  %96 = xor i32 %95, %77
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %97
  store i8 1, ptr %98, align 1, !tbaa !22
  %indvars.iv.next122 = or disjoint i64 %indvars.iv121, 1
  %99 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %indvars.iv.next122
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = xor i32 %100, %77
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %102
  store i8 1, ptr %103, align 1, !tbaa !22
  %indvars.iv.next122.1 = or disjoint i64 %indvars.iv121, 2
  %104 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %indvars.iv.next122.1
  %105 = load i32, ptr %104, align 8, !tbaa !5
  %106 = xor i32 %105, %77
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %107
  store i8 1, ptr %108, align 1, !tbaa !22
  %indvars.iv.next122.2 = or disjoint i64 %indvars.iv121, 3
  %109 = getelementptr inbounds [16 x i32], ptr @tt, i64 0, i64 %indvars.iv.next122.2
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = xor i32 %110, %77
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %112
  store i8 1, ptr %113, align 1, !tbaa !22
  %indvars.iv.next122.3 = add nuw nsw i64 %indvars.iv121, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader76.loopexit.unr-lcssa, label %.lr.ph105, !llvm.loop !29

.preheader:                                       ; preds = %.lr.ph108, %middle.block, %.preheader76
  %114 = load i32, ptr @m, align 4, !tbaa !5
  %.not66109 = icmp slt i32 %114, 1
  br i1 %.not66109, label %._crit_edge112, label %.lr.ph111

.lr.ph108:                                        ; preds = %.lr.ph108.preheader141, %.lr.ph108
  %indvars.iv126 = phi i64 [ %indvars.iv.next127, %.lr.ph108 ], [ %indvars.iv126.ph, %.lr.ph108.preheader141 ]
  %115 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %indvars.iv126
  %116 = trunc nuw nsw i64 %indvars.iv126 to i32
  store i32 %116, ptr %115, align 4, !tbaa !5
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next127, %wide.trip.count130
  br i1 %exitcond131.not, label %.preheader, label %.lr.ph108, !llvm.loop !30

._crit_edge112:                                   ; preds = %132, %.preheader
  %117 = tail call noundef i32 @_Z4findi(i32 noundef 1)
  %118 = load i32, ptr @n, align 4, !tbaa !5
  %.not67113 = icmp slt i32 %118, 2
  br i1 %.not67113, label %.critedge75, label %.lr.ph116

.lr.ph111:                                        ; preds = %.preheader, %132
  %119 = phi i32 [ %133, %132 ], [ %114, %.preheader ]
  %indvars.iv132 = phi i64 [ %indvars.iv.next133, %132 ], [ 1, %.preheader ]
  %120 = getelementptr inbounds [500001 x i8], ptr @vis, i64 0, i64 %indvars.iv132
  %121 = load i8, ptr %120, align 1, !tbaa !22, !range !31, !noundef !32
  %122 = trunc nuw i8 %121 to i1
  br i1 %122, label %132, label %123

123:                                              ; preds = %.lr.ph111
  %124 = getelementptr inbounds [500001 x [2 x i32]], ptr @g, i64 0, i64 %indvars.iv132
  %125 = getelementptr inbounds i8, ptr %124, i64 4
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = tail call noundef i32 @_Z4findi(i32 noundef %126)
  %128 = load i32, ptr %124, align 8, !tbaa !5
  %129 = tail call noundef i32 @_Z4findi(i32 noundef %128)
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100001 x i32], ptr @fa, i64 0, i64 %130
  store i32 %127, ptr %131, align 4, !tbaa !5
  %.pre = load i32, ptr @m, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %.lr.ph111, %123
  %133 = phi i32 [ %119, %.lr.ph111 ], [ %.pre, %123 ]
  %indvars.iv.next133 = add nuw nsw i64 %indvars.iv132, 1
  %134 = sext i32 %133 to i64
  %.not66.not = icmp slt i64 %indvars.iv132, %134
  br i1 %.not66.not, label %.lr.ph111, label %._crit_edge112, !llvm.loop !33

135:                                              ; preds = %.lr.ph116
  %136 = add nuw nsw i32 %.052114, 1
  %137 = load i32, ptr @n, align 4, !tbaa !5
  %.not67.not = icmp slt i32 %.052114, %137
  br i1 %.not67.not, label %.lr.ph116, label %.critedge75, !llvm.loop !34

.lr.ph116:                                        ; preds = %._crit_edge112, %135
  %.052114 = phi i32 [ %136, %135 ], [ 2, %._crit_edge112 ]
  %138 = tail call noundef i32 @_Z4findi(i32 noundef %.052114)
  %.not68 = icmp eq i32 %138, %117
  br i1 %.not68, label %135, label %.critedge75

.critedge75:                                      ; preds = %135, %.lr.ph116, %._crit_edge112
  %.str.1.sink = phi ptr [ @.str, %._crit_edge112 ], [ @.str.1, %.lr.ph116 ], [ @.str, %135 ]
  %139 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1.sink)
  ret i32 0
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z6getintv() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @getchar() local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z4findi(i32 noundef) local_unnamed_addr #1

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

!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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!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 = !{!23, !23, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !10, !27, !28}
!27 = !{!"llvm.loop.isvectorized", i32 1}
!28 = !{!"llvm.loop.unroll.runtime.disable"}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10, !28, !27}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}


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