; LLVM IR from tangjz/acm-icpc :: hdu (6357)

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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@g = external dso_local global [100001 x [13 x i32]], align 16
@f = external dso_local global ptr, align 8
@buf = external dso_local global [100001 x i8], align 16
@pat = external dso_local global [13 x i8], align 1
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i8, align 1
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %32

32:                                               ; preds = %502, %500, %0
  %33 = load i32, ptr @t, align 4, !tbaa !5
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr @t, align 4, !tbaa !5
  %35 = icmp ne i32 %33, 0
  br i1 %35, label %36, label %503

36:                                               ; preds = %32
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @buf)
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #5
  store i8 57, ptr %2, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  store i8 48, ptr %3, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %38

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

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %57

43:                                               ; preds = %38
  %44 = load i32, ptr %4, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %45
  %47 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3minIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %46)
  %48 = load i8, ptr %47, align 1, !tbaa !9
  store i8 %48, ptr %2, align 1, !tbaa !9
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %50
  %52 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3maxIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %51)
  %53 = load i8, ptr %52, align 1, !tbaa !9
  store i8 %53, ptr %3, align 1, !tbaa !9
  br label %54

54:                                               ; preds = %43
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %4, align 4, !tbaa !5
  br label %38, !llvm.loop !10

57:                                               ; preds = %42
  %58 = load i8, ptr %2, align 1, !tbaa !9
  %59 = sext i8 %58 to i32
  %60 = load i8, ptr %3, align 1, !tbaa !9
  %61 = sext i8 %60 to i32
  %62 = icmp eq i32 %59, %61
  br i1 %62, label %63, label %66

63:                                               ; preds = %57
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %64, i32 noundef 1, i32 noundef 1)
  store i32 2, ptr %5, align 4
  br label %500, !llvm.loop !12

66:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  %67 = load i8, ptr %2, align 1, !tbaa !9
  store i8 %67, ptr %9, align 1, !tbaa !9
  br label %68

68:                                               ; preds = %235, %66
  %69 = load i8, ptr %9, align 1, !tbaa !9
  %70 = sext i8 %69 to i32
  %71 = load i8, ptr %3, align 1, !tbaa !9
  %72 = sext i8 %71 to i32
  %73 = icmp slt i32 %70, %72
  br i1 %73, label %75, label %74

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

75:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  %76 = load i8, ptr %9, align 1, !tbaa !9
  %77 = sext i8 %76 to i32
  %78 = add nsw i32 %77, 1
  %79 = trunc i32 %78 to i8
  store i8 %79, ptr %10, align 1, !tbaa !9
  br label %80

80:                                               ; preds = %231, %75
  %81 = load i8, ptr %10, align 1, !tbaa !9
  %82 = sext i8 %81 to i32
  %83 = load i8, ptr %3, align 1, !tbaa !9
  %84 = sext i8 %83 to i32
  %85 = icmp sle i32 %82, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %80
  store i32 10, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %234

87:                                               ; preds = %80
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %88 = load i8, ptr %2, align 1, !tbaa !9
  store i8 %88, ptr %11, align 1, !tbaa !9
  br label %89

89:                                               ; preds = %102, %87
  %90 = load i8, ptr %11, align 1, !tbaa !9
  %91 = sext i8 %90 to i32
  %92 = load i8, ptr %9, align 1, !tbaa !9
  %93 = sext i8 %92 to i32
  %94 = icmp sle i32 %91, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %89
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  br label %105

96:                                               ; preds = %89
  %97 = load i8, ptr %11, align 1, !tbaa !9
  %98 = load i32, ptr @tot, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr @tot, align 4, !tbaa !5
  %100 = sext i32 %98 to i64
  %101 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %100
  store i8 %97, ptr %101, align 1, !tbaa !9
  br label %102

102:                                              ; preds = %96
  %103 = load i8, ptr %11, align 1, !tbaa !9
  %104 = add i8 %103, 1
  store i8 %104, ptr %11, align 1, !tbaa !9
  br label %89, !llvm.loop !13

105:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  %106 = load i8, ptr %10, align 1, !tbaa !9
  store i8 %106, ptr %12, align 1, !tbaa !9
  br label %107

107:                                              ; preds = %120, %105
  %108 = load i8, ptr %12, align 1, !tbaa !9
  %109 = sext i8 %108 to i32
  %110 = load i8, ptr %9, align 1, !tbaa !9
  %111 = sext i8 %110 to i32
  %112 = icmp sge i32 %109, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %107
  store i32 16, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  br label %123

114:                                              ; preds = %107
  %115 = load i8, ptr %12, align 1, !tbaa !9
  %116 = load i32, ptr @tot, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr @tot, align 4, !tbaa !5
  %118 = sext i32 %116 to i64
  %119 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %118
  store i8 %115, ptr %119, align 1, !tbaa !9
  br label %120

120:                                              ; preds = %114
  %121 = load i8, ptr %12, align 1, !tbaa !9
  %122 = add i8 %121, -1
  store i8 %122, ptr %12, align 1, !tbaa !9
  br label %107, !llvm.loop !14

123:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  %124 = load i8, ptr %10, align 1, !tbaa !9
  store i8 %124, ptr %13, align 1, !tbaa !9
  br label %125

125:                                              ; preds = %138, %123
  %126 = load i8, ptr %13, align 1, !tbaa !9
  %127 = sext i8 %126 to i32
  %128 = load i8, ptr %3, align 1, !tbaa !9
  %129 = sext i8 %128 to i32
  %130 = icmp sle i32 %127, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %125
  store i32 19, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  br label %141

132:                                              ; preds = %125
  %133 = load i8, ptr %13, align 1, !tbaa !9
  %134 = load i32, ptr @tot, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr @tot, align 4, !tbaa !5
  %136 = sext i32 %134 to i64
  %137 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %136
  store i8 %133, ptr %137, align 1, !tbaa !9
  br label %138

138:                                              ; preds = %132
  %139 = load i8, ptr %13, align 1, !tbaa !9
  %140 = add i8 %139, 1
  store i8 %140, ptr %13, align 1, !tbaa !9
  br label %125, !llvm.loop !15

141:                                              ; preds = %131
  %142 = load ptr, ptr @f, align 8, !tbaa !16
  %143 = load i32, ptr @tot, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = mul i64 %144, 4
  call void @llvm.memset.p0.i64(ptr align 4 %142, i8 0, i64 %145, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %146

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

150:                                              ; preds = %146
  store i32 22, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %212

151:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %152

152:                                              ; preds = %205, %151
  %153 = load i32, ptr %15, align 4, !tbaa !5
  %154 = load i32, ptr @tot, align 4, !tbaa !5
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %157, label %156

156:                                              ; preds = %152
  store i32 25, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %208

157:                                              ; preds = %152
  %158 = load i32, ptr %14, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !9
  %162 = sext i8 %161 to i32
  %163 = load i32, ptr %15, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %164
  %166 = load i8, ptr %165, align 1, !tbaa !9
  %167 = sext i8 %166 to i32
  %168 = icmp eq i32 %162, %167
  %169 = zext i1 %168 to i32
  %170 = load ptr, ptr @f, align 8, !tbaa !16
  %171 = load i32, ptr %15, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds i32, ptr %170, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = add nsw i32 %174, %169
  store i32 %175, ptr %173, align 4, !tbaa !5
  %176 = load i32, ptr %15, align 4, !tbaa !5
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %203

178:                                              ; preds = %157
  %179 = load ptr, ptr @f, align 8, !tbaa !16
  %180 = load i32, ptr %15, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds i32, ptr %179, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = load ptr, ptr @f, align 8, !tbaa !16
  %185 = load i32, ptr %15, align 4, !tbaa !5
  %186 = sub nsw i32 %185, 1
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds i32, ptr %184, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = icmp slt i32 %183, %189
  br i1 %190, label %191, label %203

191:                                              ; preds = %178
  %192 = load ptr, ptr @f, align 8, !tbaa !16
  %193 = load i32, ptr %15, align 4, !tbaa !5
  %194 = sub nsw i32 %193, 1
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds i32, ptr %192, i64 %195
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = load ptr, ptr @f, align 8, !tbaa !16
  %199 = load i32, ptr %15, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds i32, ptr %198, i64 %200
  store i32 %197, ptr %201, align 4, !tbaa !5
  %202 = icmp ne i32 %197, 0
  br label %203

203:                                              ; preds = %191, %178, %157
  %204 = phi i1 [ false, %178 ], [ false, %157 ], [ %202, %191 ]
  br label %205

205:                                              ; preds = %203
  %206 = load i32, ptr %15, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %15, align 4, !tbaa !5
  br label %152, !llvm.loop !18

208:                                              ; preds = %156
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %14, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %14, align 4, !tbaa !5
  br label %146, !llvm.loop !19

212:                                              ; preds = %150
  %213 = load i32, ptr %6, align 4, !tbaa !5
  %214 = load ptr, ptr @f, align 8, !tbaa !16
  %215 = load i32, ptr @tot, align 4, !tbaa !5
  %216 = sub nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds i32, ptr %214, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = icmp slt i32 %213, %219
  br i1 %220, label %221, label %230

221:                                              ; preds = %212
  %222 = load ptr, ptr @f, align 8, !tbaa !16
  %223 = load i32, ptr @tot, align 4, !tbaa !5
  %224 = sub nsw i32 %223, 1
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds i32, ptr %222, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  store i32 %227, ptr %6, align 4, !tbaa !5
  %228 = load i8, ptr %9, align 1, !tbaa !9
  store i8 %228, ptr %7, align 1, !tbaa !9
  %229 = load i8, ptr %10, align 1, !tbaa !9
  store i8 %229, ptr %8, align 1, !tbaa !9
  br label %230

230:                                              ; preds = %221, %212
  br label %231

231:                                              ; preds = %230
  %232 = load i8, ptr %10, align 1, !tbaa !9
  %233 = add i8 %232, 1
  store i8 %233, ptr %10, align 1, !tbaa !9
  br label %80, !llvm.loop !20

234:                                              ; preds = %86
  br label %235

235:                                              ; preds = %234
  %236 = load i8, ptr %9, align 1, !tbaa !9
  %237 = add i8 %236, 1
  store i8 %237, ptr %9, align 1, !tbaa !9
  br label %68, !llvm.loop !21

238:                                              ; preds = %74
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  %239 = load i8, ptr %2, align 1, !tbaa !9
  store i8 %239, ptr %16, align 1, !tbaa !9
  br label %240

240:                                              ; preds = %253, %238
  %241 = load i8, ptr %16, align 1, !tbaa !9
  %242 = sext i8 %241 to i32
  %243 = load i8, ptr %7, align 1, !tbaa !9
  %244 = sext i8 %243 to i32
  %245 = icmp sle i32 %242, %244
  br i1 %245, label %247, label %246

246:                                              ; preds = %240
  store i32 28, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  br label %256

247:                                              ; preds = %240
  %248 = load i8, ptr %16, align 1, !tbaa !9
  %249 = load i32, ptr @tot, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr @tot, align 4, !tbaa !5
  %251 = sext i32 %249 to i64
  %252 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %251
  store i8 %248, ptr %252, align 1, !tbaa !9
  br label %253

253:                                              ; preds = %247
  %254 = load i8, ptr %16, align 1, !tbaa !9
  %255 = add i8 %254, 1
  store i8 %255, ptr %16, align 1, !tbaa !9
  br label %240, !llvm.loop !22

256:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  %257 = load i8, ptr %8, align 1, !tbaa !9
  store i8 %257, ptr %17, align 1, !tbaa !9
  br label %258

258:                                              ; preds = %271, %256
  %259 = load i8, ptr %17, align 1, !tbaa !9
  %260 = sext i8 %259 to i32
  %261 = load i8, ptr %7, align 1, !tbaa !9
  %262 = sext i8 %261 to i32
  %263 = icmp sge i32 %260, %262
  br i1 %263, label %265, label %264

264:                                              ; preds = %258
  store i32 31, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %274

265:                                              ; preds = %258
  %266 = load i8, ptr %17, align 1, !tbaa !9
  %267 = load i32, ptr @tot, align 4, !tbaa !5
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr @tot, align 4, !tbaa !5
  %269 = sext i32 %267 to i64
  %270 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %269
  store i8 %266, ptr %270, align 1, !tbaa !9
  br label %271

271:                                              ; preds = %265
  %272 = load i8, ptr %17, align 1, !tbaa !9
  %273 = add i8 %272, -1
  store i8 %273, ptr %17, align 1, !tbaa !9
  br label %258, !llvm.loop !23

274:                                              ; preds = %264
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  %275 = load i8, ptr %8, align 1, !tbaa !9
  store i8 %275, ptr %18, align 1, !tbaa !9
  br label %276

276:                                              ; preds = %289, %274
  %277 = load i8, ptr %18, align 1, !tbaa !9
  %278 = sext i8 %277 to i32
  %279 = load i8, ptr %3, align 1, !tbaa !9
  %280 = sext i8 %279 to i32
  %281 = icmp sle i32 %278, %280
  br i1 %281, label %283, label %282

282:                                              ; preds = %276
  store i32 34, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  br label %292

283:                                              ; preds = %276
  %284 = load i8, ptr %18, align 1, !tbaa !9
  %285 = load i32, ptr @tot, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr @tot, align 4, !tbaa !5
  %287 = sext i32 %285 to i64
  %288 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %287
  store i8 %284, ptr %288, align 1, !tbaa !9
  br label %289

289:                                              ; preds = %283
  %290 = load i8, ptr %18, align 1, !tbaa !9
  %291 = add i8 %290, 1
  store i8 %291, ptr %18, align 1, !tbaa !9
  br label %276, !llvm.loop !24

292:                                              ; preds = %282
  %293 = load i32, ptr @tot, align 4, !tbaa !5
  %294 = sext i32 %293 to i64
  %295 = mul i64 %294, 4
  call void @llvm.memset.p0.i64(ptr align 16 @g, i8 0, i64 %295, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %296

296:                                              ; preds = %372, %292
  %297 = load i32, ptr %19, align 4, !tbaa !5
  %298 = load i32, ptr @n, align 4, !tbaa !5
  %299 = icmp slt i32 %297, %298
  br i1 %299, label %301, label %300

300:                                              ; preds = %296
  store i32 37, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %375

301:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %302 = load i32, ptr %19, align 4, !tbaa !5
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %303
  %305 = getelementptr inbounds [13 x i32], ptr %304, i64 0, i64 0
  store ptr %305, ptr %20, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %306 = load i32, ptr %19, align 4, !tbaa !5
  %307 = add nsw i32 %306, 1
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %308
  %310 = getelementptr inbounds [13 x i32], ptr %309, i64 0, i64 0
  store ptr %310, ptr %21, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %311

311:                                              ; preds = %368, %301
  %312 = load i32, ptr %22, align 4, !tbaa !5
  %313 = load i32, ptr @tot, align 4, !tbaa !5
  %314 = icmp slt i32 %312, %313
  br i1 %314, label %316, label %315

315:                                              ; preds = %311
  store i32 40, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %371

316:                                              ; preds = %311
  %317 = load ptr, ptr %20, align 8, !tbaa !16
  %318 = load i32, ptr %22, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds i32, ptr %317, i64 %319
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = load i32, ptr %19, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %323
  %325 = load i8, ptr %324, align 1, !tbaa !9
  %326 = sext i8 %325 to i32
  %327 = load i32, ptr %22, align 4, !tbaa !5
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %328
  %330 = load i8, ptr %329, align 1, !tbaa !9
  %331 = sext i8 %330 to i32
  %332 = icmp eq i32 %326, %331
  %333 = zext i1 %332 to i32
  %334 = add nsw i32 %321, %333
  %335 = load ptr, ptr %21, align 8, !tbaa !16
  %336 = load i32, ptr %22, align 4, !tbaa !5
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds i32, ptr %335, i64 %337
  store i32 %334, ptr %338, align 4, !tbaa !5
  %339 = load i32, ptr %22, align 4, !tbaa !5
  %340 = icmp ne i32 %339, 0
  br i1 %340, label %341, label %366

341:                                              ; preds = %316
  %342 = load ptr, ptr %21, align 8, !tbaa !16
  %343 = load i32, ptr %22, align 4, !tbaa !5
  %344 = sext i32 %343 to i64
  %345 = getelementptr inbounds i32, ptr %342, i64 %344
  %346 = load i32, ptr %345, align 4, !tbaa !5
  %347 = load ptr, ptr %21, align 8, !tbaa !16
  %348 = load i32, ptr %22, align 4, !tbaa !5
  %349 = sub nsw i32 %348, 1
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds i32, ptr %347, i64 %350
  %352 = load i32, ptr %351, align 4, !tbaa !5
  %353 = icmp slt i32 %346, %352
  br i1 %353, label %354, label %366

354:                                              ; preds = %341
  %355 = load ptr, ptr %21, align 8, !tbaa !16
  %356 = load i32, ptr %22, align 4, !tbaa !5
  %357 = sub nsw i32 %356, 1
  %358 = sext i32 %357 to i64
  %359 = getelementptr inbounds i32, ptr %355, i64 %358
  %360 = load i32, ptr %359, align 4, !tbaa !5
  %361 = load ptr, ptr %21, align 8, !tbaa !16
  %362 = load i32, ptr %22, align 4, !tbaa !5
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds i32, ptr %361, i64 %363
  store i32 %360, ptr %364, align 4, !tbaa !5
  %365 = icmp ne i32 %360, 0
  br label %366

366:                                              ; preds = %354, %341, %316
  %367 = phi i1 [ false, %341 ], [ false, %316 ], [ %365, %354 ]
  br label %368

368:                                              ; preds = %366
  %369 = load i32, ptr %22, align 4, !tbaa !5
  %370 = add nsw i32 %369, 1
  store i32 %370, ptr %22, align 4, !tbaa !5
  br label %311, !llvm.loop !25

371:                                              ; preds = %315
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %372

372:                                              ; preds = %371
  %373 = load i32, ptr %19, align 4, !tbaa !5
  %374 = add nsw i32 %373, 1
  store i32 %374, ptr %19, align 4, !tbaa !5
  br label %296, !llvm.loop !26

375:                                              ; preds = %300
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %376 = load i32, ptr @n, align 4, !tbaa !5
  %377 = sub nsw i32 %376, 1
  store i32 %377, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %378 = load i32, ptr @tot, align 4, !tbaa !5
  %379 = sub nsw i32 %378, 1
  store i32 %379, ptr %26, align 4, !tbaa !5
  br label %380

380:                                              ; preds = %490, %375
  %381 = load i32, ptr %25, align 4, !tbaa !5
  %382 = icmp sge i32 %381, 0
  br i1 %382, label %384, label %383

383:                                              ; preds = %380
  store i32 43, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %493

384:                                              ; preds = %380
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %385 = load i32, ptr %25, align 4, !tbaa !5
  %386 = sext i32 %385 to i64
  %387 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %386
  %388 = getelementptr inbounds [13 x i32], ptr %387, i64 0, i64 0
  store ptr %388, ptr %27, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %389 = load i32, ptr %25, align 4, !tbaa !5
  %390 = add nsw i32 %389, 1
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %391
  %393 = getelementptr inbounds [13 x i32], ptr %392, i64 0, i64 0
  store ptr %393, ptr %28, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %394 = load ptr, ptr %27, align 8, !tbaa !16
  %395 = load i32, ptr %26, align 4, !tbaa !5
  %396 = sext i32 %395 to i64
  %397 = getelementptr inbounds i32, ptr %394, i64 %396
  %398 = load i32, ptr %397, align 4, !tbaa !5
  %399 = load i32, ptr %25, align 4, !tbaa !5
  %400 = sext i32 %399 to i64
  %401 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %400
  %402 = load i8, ptr %401, align 1, !tbaa !9
  %403 = sext i8 %402 to i32
  %404 = load i32, ptr %26, align 4, !tbaa !5
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %405
  %407 = load i8, ptr %406, align 1, !tbaa !9
  %408 = sext i8 %407 to i32
  %409 = icmp eq i32 %403, %408
  %410 = zext i1 %409 to i32
  %411 = add nsw i32 %398, %410
  store i32 %411, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %412 = load i32, ptr %26, align 4, !tbaa !5
  %413 = icmp ne i32 %412, 0
  br i1 %413, label %414, label %421

414:                                              ; preds = %384
  %415 = load ptr, ptr %28, align 8, !tbaa !16
  %416 = load i32, ptr %26, align 4, !tbaa !5
  %417 = sub nsw i32 %416, 1
  %418 = sext i32 %417 to i64
  %419 = getelementptr inbounds i32, ptr %415, i64 %418
  %420 = load i32, ptr %419, align 4, !tbaa !5
  br label %422

421:                                              ; preds = %384
  br label %422

422:                                              ; preds = %421, %414
  %423 = phi i32 [ %420, %414 ], [ -1, %421 ]
  store i32 %423, ptr %30, align 4, !tbaa !5
  br label %424

424:                                              ; preds = %487, %422
  %425 = load i32, ptr %29, align 4, !tbaa !5
  %426 = load i32, ptr %30, align 4, !tbaa !5
  %427 = icmp slt i32 %425, %426
  br i1 %427, label %428, label %489

428:                                              ; preds = %424
  %429 = load i32, ptr %26, align 4, !tbaa !5
  %430 = sub nsw i32 %429, 1
  %431 = sext i32 %430 to i64
  %432 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %431
  %433 = load i8, ptr %432, align 1, !tbaa !9
  %434 = sext i8 %433 to i32
  %435 = load i8, ptr %7, align 1, !tbaa !9
  %436 = sext i8 %435 to i32
  %437 = icmp eq i32 %434, %436
  br i1 %437, label %438, label %456

438:                                              ; preds = %428
  %439 = load i32, ptr %26, align 4, !tbaa !5
  %440 = sext i32 %439 to i64
  %441 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %440
  %442 = load i8, ptr %441, align 1, !tbaa !9
  %443 = sext i8 %442 to i32
  %444 = load i8, ptr %8, align 1, !tbaa !9
  %445 = sext i8 %444 to i32
  %446 = icmp eq i32 %443, %445
  br i1 %446, label %447, label %456

447:                                              ; preds = %438
  %448 = load i32, ptr %24, align 4, !tbaa !5
  %449 = icmp ne i32 %448, 0
  br i1 %449, label %452, label %450

450:                                              ; preds = %447
  %451 = load i32, ptr %25, align 4, !tbaa !5
  store i32 %451, ptr %24, align 4, !tbaa !5
  br label %455

452:                                              ; preds = %447
  %453 = load i32, ptr %25, align 4, !tbaa !5
  %454 = add nsw i32 %453, 1
  store i32 %454, ptr %23, align 4, !tbaa !5
  br label %455

455:                                              ; preds = %452, %450
  br label %456

456:                                              ; preds = %455, %438, %428
  %457 = load i32, ptr %26, align 4, !tbaa !5
  %458 = add nsw i32 %457, -1
  store i32 %458, ptr %26, align 4, !tbaa !5
  %459 = load ptr, ptr %27, align 8, !tbaa !16
  %460 = load i32, ptr %26, align 4, !tbaa !5
  %461 = sext i32 %460 to i64
  %462 = getelementptr inbounds i32, ptr %459, i64 %461
  %463 = load i32, ptr %462, align 4, !tbaa !5
  %464 = load i32, ptr %25, align 4, !tbaa !5
  %465 = sext i32 %464 to i64
  %466 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %465
  %467 = load i8, ptr %466, align 1, !tbaa !9
  %468 = sext i8 %467 to i32
  %469 = load i32, ptr %26, align 4, !tbaa !5
  %470 = sext i32 %469 to i64
  %471 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %470
  %472 = load i8, ptr %471, align 1, !tbaa !9
  %473 = sext i8 %472 to i32
  %474 = icmp eq i32 %468, %473
  %475 = zext i1 %474 to i32
  %476 = add nsw i32 %463, %475
  store i32 %476, ptr %29, align 4, !tbaa !5
  %477 = load i32, ptr %26, align 4, !tbaa !5
  %478 = icmp ne i32 %477, 0
  br i1 %478, label %479, label %486

479:                                              ; preds = %456
  %480 = load ptr, ptr %28, align 8, !tbaa !16
  %481 = load i32, ptr %26, align 4, !tbaa !5
  %482 = sub nsw i32 %481, 1
  %483 = sext i32 %482 to i64
  %484 = getelementptr inbounds i32, ptr %480, i64 %483
  %485 = load i32, ptr %484, align 4, !tbaa !5
  br label %487

486:                                              ; preds = %456
  br label %487

487:                                              ; preds = %486, %479
  %488 = phi i32 [ %485, %479 ], [ -1, %486 ]
  store i32 %488, ptr %30, align 4, !tbaa !5
  br label %424, !llvm.loop !27

489:                                              ; preds = %424
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %490

490:                                              ; preds = %489
  %491 = load i32, ptr %25, align 4, !tbaa !5
  %492 = add nsw i32 %491, -1
  store i32 %492, ptr %25, align 4, !tbaa !5
  br label %380, !llvm.loop !28

493:                                              ; preds = %383
  %494 = load i32, ptr %6, align 4, !tbaa !5
  %495 = load i32, ptr %23, align 4, !tbaa !5
  %496 = add nsw i32 %495, 1
  %497 = load i32, ptr %24, align 4, !tbaa !5
  %498 = add nsw i32 %497, 1
  %499 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %494, i32 noundef %496, i32 noundef %498)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  store i32 0, ptr %5, align 4
  br label %500

500:                                              ; preds = %493, %63
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #5
  %501 = load i32, ptr %5, align 4
  switch i32 %501, label %504 [
    i32 0, label %502
    i32 2, label %32
  ]

502:                                              ; preds = %500
  br label %32, !llvm.loop !12

503:                                              ; preds = %32
  ret i32 0

504:                                              ; preds = %500
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3minIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3maxIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3

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

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

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

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

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

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


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

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local local_unnamed_addr global [100001 x [13 x i32]], align 16
@f = external dso_local local_unnamed_addr global ptr, align 8
@buf = external dso_local global [100001 x i8], align 16
@pat = external dso_local local_unnamed_addr global [13 x i8], align 1
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i8, align 1
  %2 = alloca i8, align 1
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @t)
  %4 = load i32, ptr @t, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @t, align 4, !tbaa !5
  %.not248 = icmp eq i32 %4, 0
  br i1 %.not248, label %._crit_edge253, label %.lr.ph252

.lr.ph252:                                        ; preds = %0, %255
  %6 = phi <2 x i8> [ %256, %255 ], [ undef, %0 ]
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @buf)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %1) #6
  store i8 57, ptr %1, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #6
  store i8 48, ptr %2, align 1, !tbaa !9
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge199

._crit_edge:                                      ; preds = %.lr.ph
  %.pre = load i8, ptr %1, align 1, !tbaa !9
  %10 = icmp eq i8 %.pre, %19
  br i1 %10, label %23, label %.preheader159

.preheader159:                                    ; preds = %._crit_edge
  %11 = icmp slt i8 %.pre, %19
  br i1 %11, label %.preheader156.preheader, label %._crit_edge199

.preheader156.preheader:                          ; preds = %.preheader159
  %12 = add i8 %.pre, 2
  %13 = add i8 %.pre, -1
  %14 = add i8 %.pre, 1
  br label %.preheader156

.lr.ph:                                           ; preds = %.lr.ph252, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph252 ]
  %15 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %indvars.iv
  %16 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3minIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1) %1, ptr noundef nonnull align 1 dereferenceable(1) %15)
  %17 = load i8, ptr %16, align 1, !tbaa !9
  store i8 %17, ptr %1, align 1, !tbaa !9
  %18 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3maxIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1) %2, ptr noundef nonnull align 1 dereferenceable(1) %15)
  %19 = load i8, ptr %18, align 1, !tbaa !9
  store i8 %19, ptr %2, align 1, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = load i32, ptr @n, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %indvars.iv.next, %21
  br i1 %22, label %.lr.ph, label %._crit_edge, !llvm.loop !10

23:                                               ; preds = %._crit_edge
  %24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %20, i32 noundef 1, i32 noundef 1)
  br label %255, !llvm.loop !12

.preheader156:                                    ; preds = %.preheader156.preheader, %._crit_edge191
  %indvar = phi i8 [ 0, %.preheader156.preheader ], [ %indvar.next, %._crit_edge191 ]
  %25 = phi i32 [ %20, %.preheader156.preheader ], [ %46, %._crit_edge191 ]
  %26 = phi i8 [ %19, %.preheader156.preheader ], [ %47, %._crit_edge191 ]
  %.0111198 = phi i32 [ 0, %.preheader156.preheader ], [ %.1112.lcssa, %._crit_edge191 ]
  %.0127196 = phi i8 [ %.pre, %.preheader156.preheader ], [ %.0126184, %._crit_edge191 ]
  %27 = phi <2 x i8> [ %6, %.preheader156.preheader ], [ %48, %._crit_edge191 ]
  %28 = add i8 %14, %indvar
  %29 = add i8 %13, %indvar
  %30 = add i8 %12, %indvar
  %31 = add i8 %.pre, %indvar
  %.0126184 = add nsw i8 %.0127196, 1
  %.not148185.not = icmp slt i8 %.0127196, %26
  br i1 %.not148185.not, label %.lr.ph190.preheader, label %._crit_edge191

.lr.ph190.preheader:                              ; preds = %.preheader156
  %32 = insertelement <2 x i8> poison, i8 %.0127196, i64 0
  br label %.lr.ph190

._crit_edge199.loopexit:                          ; preds = %._crit_edge191
  %.pre310 = load i8, ptr %1, align 1, !tbaa !9
  br label %._crit_edge199

._crit_edge199:                                   ; preds = %.lr.ph252, %._crit_edge199.loopexit, %.preheader159
  %33 = phi i32 [ %20, %.preheader159 ], [ %46, %._crit_edge199.loopexit ], [ %8, %.lr.ph252 ]
  %34 = phi i8 [ %.pre, %.preheader159 ], [ %.pre310, %._crit_edge199.loopexit ], [ 57, %.lr.ph252 ]
  %.0111.lcssa = phi i32 [ 0, %.preheader159 ], [ %.1112.lcssa, %._crit_edge199.loopexit ], [ 0, %.lr.ph252 ]
  %.lcssa160 = phi i8 [ %19, %.preheader159 ], [ %47, %._crit_edge199.loopexit ], [ 48, %.lr.ph252 ]
  %35 = phi <2 x i8> [ %6, %.preheader159 ], [ %48, %._crit_edge199.loopexit ], [ %6, %.lr.ph252 ]
  store i32 0, ptr @tot, align 4, !tbaa !5
  %36 = extractelement <2 x i8> %35, i64 0
  %.not141205 = icmp sgt i8 %34, %36
  br i1 %.not141205, label %.preheader158, label %.lr.ph208.preheader

.lr.ph208.preheader:                              ; preds = %._crit_edge199
  %37 = add i8 %34, 1
  %38 = add i8 %36, 1
  %smax365 = call i8 @llvm.smax.i8(i8 %37, i8 %38)
  %39 = xor i8 %34, -1
  %40 = add i8 %smax365, %39
  %41 = zext i8 %40 to i64
  %42 = add nuw nsw i64 %41, 1
  %min.iters.check368 = icmp ult i8 %40, 31
  br i1 %min.iters.check368, label %.lr.ph208.preheader466, label %vector.ph369

.lr.ph208.preheader466:                           ; preds = %middle.block366, %.lr.ph208.preheader
  %indvars.iv279.ph = phi i64 [ 0, %.lr.ph208.preheader ], [ %n.vec371, %middle.block366 ]
  %.0120206.ph = phi i8 [ %34, %.lr.ph208.preheader ], [ %ind.end374, %middle.block366 ]
  br label %.lr.ph208

vector.ph369:                                     ; preds = %.lr.ph208.preheader
  %n.vec371 = and i64 %42, 480
  %.cast373 = trunc i64 %n.vec371 to i8
  %ind.end374 = add i8 %34, %.cast373
  %.splatinsert378 = insertelement <16 x i8> poison, i8 %34, i64 0
  %.splat379 = shufflevector <16 x i8> %.splatinsert378, <16 x i8> poison, <16 x i32> zeroinitializer
  %induction380 = add <16 x i8> %.splat379, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>
  br label %vector.body376

vector.body376:                                   ; preds = %vector.body376, %vector.ph369
  %index377 = phi i64 [ 0, %vector.ph369 ], [ %index.next385, %vector.body376 ]
  %vec.ind381 = phi <16 x i8> [ %induction380, %vector.ph369 ], [ %vec.ind.next384, %vector.body376 ]
  %step.add382 = add <16 x i8> %vec.ind381, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
  %43 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %index377
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  store <16 x i8> %vec.ind381, ptr %43, align 1, !tbaa !9
  store <16 x i8> %step.add382, ptr %44, align 1, !tbaa !9
  %index.next385 = add nuw i64 %index377, 32
  %vec.ind.next384 = add <16 x i8> %vec.ind381, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %45 = icmp eq i64 %index.next385, %n.vec371
  br i1 %45, label %middle.block366, label %vector.body376, !llvm.loop !13

middle.block366:                                  ; preds = %vector.body376
  %cmp.n386 = icmp eq i64 %42, %n.vec371
  br i1 %cmp.n386, label %..preheader158_crit_edge, label %.lr.ph208.preheader466

._crit_edge191:                                   ; preds = %._crit_edge183, %.preheader156
  %46 = phi i32 [ %25, %.preheader156 ], [ %109, %._crit_edge183 ]
  %47 = phi i8 [ %26, %.preheader156 ], [ %120, %._crit_edge183 ]
  %.1112.lcssa = phi i32 [ %.0111198, %.preheader156 ], [ %.2113, %._crit_edge183 ]
  %48 = phi <2 x i8> [ %27, %.preheader156 ], [ %119, %._crit_edge183 ]
  %49 = icmp slt i8 %.0126184, %47
  %indvar.next = add i8 %indvar, 1
  br i1 %49, label %.preheader156, label %._crit_edge199.loopexit, !llvm.loop !16

.lr.ph190:                                        ; preds = %.lr.ph190.preheader, %._crit_edge183
  %indvar387 = phi i8 [ %indvar.next388, %._crit_edge183 ], [ 0, %.lr.ph190.preheader ]
  %50 = phi i8 [ %120, %._crit_edge183 ], [ %26, %.lr.ph190.preheader ]
  %.0126189 = phi i8 [ %.0126, %._crit_edge183 ], [ %.0126184, %.lr.ph190.preheader ]
  %.1112188 = phi i32 [ %.2113, %._crit_edge183 ], [ %.0111198, %.lr.ph190.preheader ]
  %51 = phi <2 x i8> [ %119, %._crit_edge183 ], [ %27, %.lr.ph190.preheader ]
  %52 = add i8 %.0127196, %indvar387
  %smin413 = call i8 @llvm.smin.i8(i8 %29, i8 %52)
  %53 = sub i8 %52, %smin413
  %54 = zext i8 %53 to i64
  %55 = add nuw nsw i64 %54, 1
  %56 = add i8 %30, %indvar387
  %57 = add i8 %31, %indvar387
  store i32 0, ptr @tot, align 4, !tbaa !5
  %58 = load i8, ptr %1, align 1, !tbaa !9
  %.not149163 = icmp sgt i8 %58, %.0127196
  br i1 %.not149163, label %.preheader154, label %.lr.ph166.preheader

.lr.ph166.preheader:                              ; preds = %.lr.ph190
  %59 = add i8 %58, 1
  %smax437 = call i8 @llvm.smax.i8(i8 %28, i8 %59)
  %60 = xor i8 %58, -1
  %61 = add i8 %smax437, %60
  %62 = zext i8 %61 to i64
  %63 = add nuw nsw i64 %62, 1
  %min.iters.check440 = icmp ult i8 %61, 31
  br i1 %min.iters.check440, label %.lr.ph166.preheader463, label %vector.ph441

.lr.ph166.preheader463:                           ; preds = %middle.block438, %.lr.ph166.preheader
  %indvars.iv266.ph = phi i64 [ 0, %.lr.ph166.preheader ], [ %n.vec443, %middle.block438 ]
  %.0125164.ph = phi i8 [ %58, %.lr.ph166.preheader ], [ %ind.end446, %middle.block438 ]
  br label %.lr.ph166

vector.ph441:                                     ; preds = %.lr.ph166.preheader
  %n.vec443 = and i64 %63, 480
  %.cast445 = trunc i64 %n.vec443 to i8
  %ind.end446 = add i8 %58, %.cast445
  %.splatinsert450 = insertelement <16 x i8> poison, i8 %58, i64 0
  %.splat451 = shufflevector <16 x i8> %.splatinsert450, <16 x i8> poison, <16 x i32> zeroinitializer
  %induction452 = add <16 x i8> %.splat451, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>
  br label %vector.body448

vector.body448:                                   ; preds = %vector.body448, %vector.ph441
  %index449 = phi i64 [ 0, %vector.ph441 ], [ %index.next457, %vector.body448 ]
  %vec.ind453 = phi <16 x i8> [ %induction452, %vector.ph441 ], [ %vec.ind.next456, %vector.body448 ]
  %step.add454 = add <16 x i8> %vec.ind453, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
  %64 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %index449
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  store <16 x i8> %vec.ind453, ptr %64, align 1, !tbaa !9
  store <16 x i8> %step.add454, ptr %65, align 1, !tbaa !9
  %index.next457 = add nuw i64 %index449, 32
  %vec.ind.next456 = add <16 x i8> %vec.ind453, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %66 = icmp eq i64 %index.next457, %n.vec443
  br i1 %66, label %middle.block438, label %vector.body448, !llvm.loop !17

middle.block438:                                  ; preds = %vector.body448
  %cmp.n458 = icmp eq i64 %63, %n.vec443
  br i1 %cmp.n458, label %..preheader154_crit_edge, label %.lr.ph166.preheader463

..preheader154_crit_edge:                         ; preds = %.lr.ph166, %middle.block438
  %indvars.iv.next267.lcssa = phi i64 [ %n.vec443, %middle.block438 ], [ %indvars.iv.next267, %.lr.ph166 ]
  %67 = trunc nuw nsw i64 %indvars.iv.next267.lcssa to i32
  store i32 %67, ptr @tot, align 4, !tbaa !5
  br label %.preheader154

.preheader154:                                    ; preds = %..preheader154_crit_edge, %.lr.ph190
  %tot.promoted168 = phi i32 [ %67, %..preheader154_crit_edge ], [ 0, %.lr.ph190 ]
  %.not150169 = icmp slt i8 %.0126189, %.0127196
  br i1 %.not150169, label %.preheader153, label %.lr.ph171.preheader

.lr.ph171.preheader:                              ; preds = %.preheader154
  %68 = sext i32 %tot.promoted168 to i64
  %min.iters.check416 = icmp ult i8 %53, 31
  br i1 %min.iters.check416, label %.lr.ph171.preheader462, label %vector.ph417

.lr.ph171.preheader462:                           ; preds = %middle.block414, %.lr.ph171.preheader
  %indvars.iv268.ph = phi i64 [ %68, %.lr.ph171.preheader ], [ %ind.end420, %middle.block414 ]
  %.0124170.ph = phi i8 [ %.0126189, %.lr.ph171.preheader ], [ %ind.end423, %middle.block414 ]
  br label %.lr.ph171

vector.ph417:                                     ; preds = %.lr.ph171.preheader
  %n.vec419 = and i64 %55, 480
  %ind.end420 = add nsw i64 %n.vec419, %68
  %.cast422 = trunc i64 %n.vec419 to i8
  %ind.end423 = sub i8 %.0126189, %.cast422
  %.splatinsert427 = insertelement <16 x i8> poison, i8 %.0126189, i64 0
  %.splat428 = shufflevector <16 x i8> %.splatinsert427, <16 x i8> poison, <16 x i32> zeroinitializer
  %induction429 = add <16 x i8> %.splat428, <i8 0, i8 -1, i8 -2, i8 -3, i8 -4, i8 -5, i8 -6, i8 -7, i8 -8, i8 -9, i8 -10, i8 -11, i8 -12, i8 -13, i8 -14, i8 -15>
  br label %vector.body425

vector.body425:                                   ; preds = %vector.body425, %vector.ph417
  %index426 = phi i64 [ 0, %vector.ph417 ], [ %index.next435, %vector.body425 ]
  %vec.ind430 = phi <16 x i8> [ %induction429, %vector.ph417 ], [ %vec.ind.next433, %vector.body425 ]
  %step.add431 = add <16 x i8> %vec.ind430, <i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16>
  %offset.idx434 = add i64 %index426, %68
  %69 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %offset.idx434
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  store <16 x i8> %vec.ind430, ptr %69, align 1, !tbaa !9
  store <16 x i8> %step.add431, ptr %70, align 1, !tbaa !9
  %index.next435 = add nuw i64 %index426, 32
  %vec.ind.next433 = add <16 x i8> %vec.ind430, <i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32>
  %71 = icmp eq i64 %index.next435, %n.vec419
  br i1 %71, label %middle.block414, label %vector.body425, !llvm.loop !18

middle.block414:                                  ; preds = %vector.body425
  %cmp.n436 = icmp eq i64 %55, %n.vec419
  br i1 %cmp.n436, label %..preheader153_crit_edge, label %.lr.ph171.preheader462

.lr.ph166:                                        ; preds = %.lr.ph166.preheader463, %.lr.ph166
  %indvars.iv266 = phi i64 [ %indvars.iv.next267, %.lr.ph166 ], [ %indvars.iv266.ph, %.lr.ph166.preheader463 ]
  %.0125164 = phi i8 [ %73, %.lr.ph166 ], [ %.0125164.ph, %.lr.ph166.preheader463 ]
  %indvars.iv.next267 = add nuw nsw i64 %indvars.iv266, 1
  %72 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv266
  store i8 %.0125164, ptr %72, align 1, !tbaa !9
  %73 = add i8 %.0125164, 1
  %.not149 = icmp sgt i8 %73, %.0127196
  br i1 %.not149, label %..preheader154_crit_edge, label %.lr.ph166, !llvm.loop !19

..preheader153_crit_edge:                         ; preds = %.lr.ph171, %middle.block414
  %indvars.iv.next269.lcssa = phi i64 [ %ind.end420, %middle.block414 ], [ %indvars.iv.next269, %.lr.ph171 ]
  %74 = trunc nsw i64 %indvars.iv.next269.lcssa to i32
  store i32 %74, ptr @tot, align 4, !tbaa !5
  br label %.preheader153

.preheader153:                                    ; preds = %..preheader153_crit_edge, %.preheader154
  %tot.promoted173 = phi i32 [ %74, %..preheader153_crit_edge ], [ %tot.promoted168, %.preheader154 ]
  %.not151174 = icmp sgt i8 %.0126189, %50
  br i1 %.not151174, label %86, label %.lr.ph176.preheader

.lr.ph176.preheader:                              ; preds = %.preheader153
  %75 = sext i32 %tot.promoted173 to i64
  %76 = add i8 %50, 1
  %smax389 = call i8 @llvm.smax.i8(i8 %56, i8 %76)
  %reass.sub = sub i8 %smax389, %57
  %77 = add i8 %reass.sub, -2
  %78 = zext i8 %77 to i64
  %79 = add nuw nsw i64 %78, 1
  %min.iters.check392 = icmp ult i8 %77, 31
  br i1 %min.iters.check392, label %.lr.ph176.preheader461, label %vector.ph393

.lr.ph176.preheader461:                           ; preds = %middle.block390, %.lr.ph176.preheader
  %indvars.iv270.ph = phi i64 [ %75, %.lr.ph176.preheader ], [ %ind.end396, %middle.block390 ]
  %.0123175.ph = phi i8 [ %.0126189, %.lr.ph176.preheader ], [ %ind.end399, %middle.block390 ]
  br label %.lr.ph176

vector.ph393:                                     ; preds = %.lr.ph176.preheader
  %n.vec395 = and i64 %79, 480
  %ind.end396 = add nsw i64 %n.vec395, %75
  %.cast398 = trunc i64 %n.vec395 to i8
  %ind.end399 = add i8 %.0126189, %.cast398
  %.splatinsert403 = insertelement <16 x i8> poison, i8 %.0126189, i64 0
  %.splat404 = shufflevector <16 x i8> %.splatinsert403, <16 x i8> poison, <16 x i32> zeroinitializer
  %induction405 = add <16 x i8> %.splat404, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>
  br label %vector.body401

vector.body401:                                   ; preds = %vector.body401, %vector.ph393
  %index402 = phi i64 [ 0, %vector.ph393 ], [ %index.next411, %vector.body401 ]
  %vec.ind406 = phi <16 x i8> [ %induction405, %vector.ph393 ], [ %vec.ind.next409, %vector.body401 ]
  %step.add407 = add <16 x i8> %vec.ind406, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
  %offset.idx410 = add i64 %index402, %75
  %80 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %offset.idx410
  %81 = getelementptr inbounds i8, ptr %80, i64 16
  store <16 x i8> %vec.ind406, ptr %80, align 1, !tbaa !9
  store <16 x i8> %step.add407, ptr %81, align 1, !tbaa !9
  %index.next411 = add nuw i64 %index402, 32
  %vec.ind.next409 = add <16 x i8> %vec.ind406, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %82 = icmp eq i64 %index.next411, %n.vec395
  br i1 %82, label %middle.block390, label %vector.body401, !llvm.loop !20

middle.block390:                                  ; preds = %vector.body401
  %cmp.n412 = icmp eq i64 %79, %n.vec395
  br i1 %cmp.n412, label %._crit_edge177, label %.lr.ph176.preheader461

.lr.ph171:                                        ; preds = %.lr.ph171.preheader462, %.lr.ph171
  %indvars.iv268 = phi i64 [ %indvars.iv.next269, %.lr.ph171 ], [ %indvars.iv268.ph, %.lr.ph171.preheader462 ]
  %.0124170 = phi i8 [ %84, %.lr.ph171 ], [ %.0124170.ph, %.lr.ph171.preheader462 ]
  %indvars.iv.next269 = add nsw i64 %indvars.iv268, 1
  %83 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv268
  store i8 %.0124170, ptr %83, align 1, !tbaa !9
  %84 = add i8 %.0124170, -1
  %.not150 = icmp slt i8 %84, %.0127196
  br i1 %.not150, label %..preheader153_crit_edge, label %.lr.ph171, !llvm.loop !21

._crit_edge177:                                   ; preds = %.lr.ph176, %middle.block390
  %indvars.iv.next271.lcssa = phi i64 [ %ind.end396, %middle.block390 ], [ %indvars.iv.next271, %.lr.ph176 ]
  %85 = trunc nsw i64 %indvars.iv.next271.lcssa to i32
  store i32 %85, ptr @tot, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %._crit_edge177, %.preheader153
  %87 = phi i32 [ %85, %._crit_edge177 ], [ %tot.promoted173, %.preheader153 ]
  %88 = load ptr, ptr @f, align 8, !tbaa !22
  %89 = sext i32 %87 to i64
  %90 = shl nsw i64 %89, 2
  call void @llvm.memset.p0.i64(ptr align 4 %88, i8 0, i64 %90, i1 false)
  %91 = load i32, ptr @n, align 4, !tbaa !5
  %92 = icmp sgt i32 %91, 0
  %.pre308 = load ptr, ptr @f, align 8
  %.pre309 = load i32, ptr @tot, align 4, !tbaa !5
  %93 = icmp sgt i32 %.pre309, 0
  %or.cond = select i1 %92, i1 %93, i1 false
  br i1 %or.cond, label %.preheader, label %._crit_edge183

.lr.ph176:                                        ; preds = %.lr.ph176.preheader461, %.lr.ph176
  %indvars.iv270 = phi i64 [ %indvars.iv.next271, %.lr.ph176 ], [ %indvars.iv270.ph, %.lr.ph176.preheader461 ]
  %.0123175 = phi i8 [ %95, %.lr.ph176 ], [ %.0123175.ph, %.lr.ph176.preheader461 ]
  %indvars.iv.next271 = add nsw i64 %indvars.iv270, 1
  %94 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv270
  store i8 %.0123175, ptr %94, align 1, !tbaa !9
  %95 = add i8 %.0123175, 1
  %.not151 = icmp sgt i8 %95, %50
  br i1 %.not151, label %._crit_edge177, label %.lr.ph176, !llvm.loop !24

.preheader:                                       ; preds = %86, %._crit_edge181
  %96 = phi i32 [ %122, %._crit_edge181 ], [ %91, %86 ]
  %97 = phi i32 [ %123, %._crit_edge181 ], [ %.pre309, %86 ]
  %indvars.iv276 = phi i64 [ %indvars.iv.next277, %._crit_edge181 ], [ 0, %86 ]
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %99, label %._crit_edge181

99:                                               ; preds = %.preheader
  %100 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %indvars.iv276
  %101 = load i8, ptr %100, align 1, !tbaa !9
  %102 = load i8, ptr @pat, align 1, !tbaa !9
  %103 = icmp eq i8 %101, %102
  %104 = zext i1 %103 to i32
  %105 = load i32, ptr %.pre308, align 4, !tbaa !5
  %106 = add nsw i32 %105, %104
  store i32 %106, ptr %.pre308, align 4, !tbaa !5
  %107 = load i32, ptr @tot, align 4, !tbaa !5
  %108 = icmp sgt i32 %107, 1
  br i1 %108, label %.peel.next.preheader, label %._crit_edge181.loopexit

.peel.next.preheader:                             ; preds = %99
  %load_initial = load i32, ptr %.pre308, align 4
  br label %.peel.next

._crit_edge183:                                   ; preds = %._crit_edge181, %86
  %109 = phi i32 [ %91, %86 ], [ %122, %._crit_edge181 ]
  %110 = phi i32 [ %.pre309, %86 ], [ %123, %._crit_edge181 ]
  %111 = sext i32 %110 to i64
  %112 = getelementptr i32, ptr %.pre308, i64 %111
  %113 = getelementptr i8, ptr %112, i64 -4
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = icmp slt i32 %.1112188, %114
  %116 = insertelement <2 x i1> poison, i1 %115, i64 0
  %117 = shufflevector <2 x i1> %116, <2 x i1> poison, <2 x i32> zeroinitializer
  %118 = insertelement <2 x i8> %32, i8 %.0126189, i64 1
  %119 = select <2 x i1> %117, <2 x i8> %118, <2 x i8> %51
  %.2113 = call i32 @llvm.smax.i32(i32 %.1112188, i32 %114)
  %.0126 = add i8 %.0126189, 1
  %120 = load i8, ptr %2, align 1, !tbaa !9
  %.not148 = icmp sgt i8 %.0126, %120
  %indvar.next388 = add i8 %indvar387, 1
  br i1 %.not148, label %._crit_edge191, label %.lr.ph190, !llvm.loop !25

._crit_edge181.loopexit:                          ; preds = %.peel.next, %99
  %121 = phi i32 [ %107, %99 ], [ %134, %.peel.next ]
  %.pre306 = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge181

._crit_edge181:                                   ; preds = %._crit_edge181.loopexit, %.preheader
  %122 = phi i32 [ %.pre306, %._crit_edge181.loopexit ], [ %96, %.preheader ]
  %123 = phi i32 [ %121, %._crit_edge181.loopexit ], [ %97, %.preheader ]
  %indvars.iv.next277 = add nuw nsw i64 %indvars.iv276, 1
  %124 = sext i32 %122 to i64
  %125 = icmp slt i64 %indvars.iv.next277, %124
  br i1 %125, label %.preheader, label %._crit_edge183, !llvm.loop !26

.peel.next:                                       ; preds = %.peel.next.preheader, %.peel.next
  %store_forwarded = phi i32 [ %load_initial, %.peel.next.preheader ], [ %spec.store.select, %.peel.next ]
  %indvars.iv272 = phi i64 [ 1, %.peel.next.preheader ], [ %indvars.iv.next273, %.peel.next ]
  %126 = load i8, ptr %100, align 1, !tbaa !9
  %127 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv272
  %128 = load i8, ptr %127, align 1, !tbaa !9
  %129 = icmp eq i8 %126, %128
  %130 = zext i1 %129 to i32
  %131 = getelementptr inbounds i32, ptr %.pre308, i64 %indvars.iv272
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = add nsw i32 %132, %130
  %spec.store.select = call i32 @llvm.smax.i32(i32 %133, i32 %store_forwarded)
  store i32 %spec.store.select, ptr %131, align 4
  %indvars.iv.next273 = add nuw nsw i64 %indvars.iv272, 1
  %134 = load i32, ptr @tot, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = icmp slt i64 %indvars.iv.next273, %135
  br i1 %136, label %.peel.next, label %._crit_edge181.loopexit, !llvm.loop !28

..preheader158_crit_edge:                         ; preds = %.lr.ph208, %middle.block366
  %indvars.iv.next280.lcssa = phi i64 [ %n.vec371, %middle.block366 ], [ %indvars.iv.next280, %.lr.ph208 ]
  %137 = trunc nuw nsw i64 %indvars.iv.next280.lcssa to i32
  store i32 %137, ptr @tot, align 4, !tbaa !5
  br label %.preheader158

.preheader158:                                    ; preds = %..preheader158_crit_edge, %._crit_edge199
  %tot.promoted210 = phi i32 [ %137, %..preheader158_crit_edge ], [ 0, %._crit_edge199 ]
  %138 = extractelement <2 x i8> %35, i64 1
  %.not142211 = icmp slt i8 %138, %36
  br i1 %.not142211, label %.preheader157, label %.lr.ph213.preheader

.lr.ph213.preheader:                              ; preds = %.preheader158
  %139 = sext i32 %tot.promoted210 to i64
  %140 = add i8 %138, -1
  %141 = add i8 %36, -1
  %smin = call i8 @llvm.smin.i8(i8 %140, i8 %141)
  %142 = sub i8 %140, %smin
  %143 = zext i8 %142 to i64
  %144 = add nuw nsw i64 %143, 1
  %min.iters.check344 = icmp ult i8 %142, 31
  br i1 %min.iters.check344, label %.lr.ph213.preheader465, label %vector.ph345

.lr.ph213.preheader465:                           ; preds = %middle.block342, %.lr.ph213.preheader
  %indvars.iv281.ph = phi i64 [ %139, %.lr.ph213.preheader ], [ %ind.end348, %middle.block342 ]
  %.0119212.ph = phi i8 [ %138, %.lr.ph213.preheader ], [ %ind.end351, %middle.block342 ]
  br label %.lr.ph213

vector.ph345:                                     ; preds = %.lr.ph213.preheader
  %n.vec347 = and i64 %144, 480
  %ind.end348 = add nsw i64 %n.vec347, %139
  %.cast350 = trunc i64 %n.vec347 to i8
  %ind.end351 = sub i8 %138, %.cast350
  %.splat356 = shufflevector <2 x i8> %35, <2 x i8> poison, <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
  %induction357 = add <16 x i8> %.splat356, <i8 0, i8 -1, i8 -2, i8 -3, i8 -4, i8 -5, i8 -6, i8 -7, i8 -8, i8 -9, i8 -10, i8 -11, i8 -12, i8 -13, i8 -14, i8 -15>
  br label %vector.body353

vector.body353:                                   ; preds = %vector.body353, %vector.ph345
  %index354 = phi i64 [ 0, %vector.ph345 ], [ %index.next363, %vector.body353 ]
  %vec.ind358 = phi <16 x i8> [ %induction357, %vector.ph345 ], [ %vec.ind.next361, %vector.body353 ]
  %step.add359 = add <16 x i8> %vec.ind358, <i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16>
  %offset.idx362 = add i64 %index354, %139
  %145 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %offset.idx362
  %146 = getelementptr inbounds i8, ptr %145, i64 16
  store <16 x i8> %vec.ind358, ptr %145, align 1, !tbaa !9
  store <16 x i8> %step.add359, ptr %146, align 1, !tbaa !9
  %index.next363 = add nuw i64 %index354, 32
  %vec.ind.next361 = add <16 x i8> %vec.ind358, <i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32, i8 -32>
  %147 = icmp eq i64 %index.next363, %n.vec347
  br i1 %147, label %middle.block342, label %vector.body353, !llvm.loop !30

middle.block342:                                  ; preds = %vector.body353
  %cmp.n364 = icmp eq i64 %144, %n.vec347
  br i1 %cmp.n364, label %..preheader157_crit_edge, label %.lr.ph213.preheader465

.lr.ph208:                                        ; preds = %.lr.ph208.preheader466, %.lr.ph208
  %indvars.iv279 = phi i64 [ %indvars.iv.next280, %.lr.ph208 ], [ %indvars.iv279.ph, %.lr.ph208.preheader466 ]
  %.0120206 = phi i8 [ %149, %.lr.ph208 ], [ %.0120206.ph, %.lr.ph208.preheader466 ]
  %indvars.iv.next280 = add nuw nsw i64 %indvars.iv279, 1
  %148 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv279
  store i8 %.0120206, ptr %148, align 1, !tbaa !9
  %149 = add i8 %.0120206, 1
  %.not141 = icmp sgt i8 %149, %36
  br i1 %.not141, label %..preheader158_crit_edge, label %.lr.ph208, !llvm.loop !31

..preheader157_crit_edge:                         ; preds = %.lr.ph213, %middle.block342
  %indvars.iv.next282.lcssa = phi i64 [ %ind.end348, %middle.block342 ], [ %indvars.iv.next282, %.lr.ph213 ]
  %150 = trunc nsw i64 %indvars.iv.next282.lcssa to i32
  store i32 %150, ptr @tot, align 4, !tbaa !5
  br label %.preheader157

.preheader157:                                    ; preds = %..preheader157_crit_edge, %.preheader158
  %tot.promoted215 = phi i32 [ %150, %..preheader157_crit_edge ], [ %tot.promoted210, %.preheader158 ]
  %.not143216 = icmp sgt i8 %138, %.lcssa160
  br i1 %.not143216, label %164, label %.lr.ph218.preheader

.lr.ph218.preheader:                              ; preds = %.preheader157
  %151 = sext i32 %tot.promoted215 to i64
  %152 = add i8 %138, 1
  %153 = add i8 %.lcssa160, 1
  %smax = call i8 @llvm.smax.i8(i8 %152, i8 %153)
  %154 = xor i8 %138, -1
  %155 = add i8 %smax, %154
  %156 = zext i8 %155 to i64
  %157 = add nuw nsw i64 %156, 1
  %min.iters.check = icmp ult i8 %155, 31
  br i1 %min.iters.check, label %.lr.ph218.preheader464, label %vector.ph

.lr.ph218.preheader464:                           ; preds = %middle.block, %.lr.ph218.preheader
  %indvars.iv283.ph = phi i64 [ %151, %.lr.ph218.preheader ], [ %ind.end, %middle.block ]
  %.0118217.ph = phi i8 [ %138, %.lr.ph218.preheader ], [ %ind.end339, %middle.block ]
  br label %.lr.ph218

vector.ph:                                        ; preds = %.lr.ph218.preheader
  %n.vec = and i64 %157, 480
  %ind.end = add nsw i64 %n.vec, %151
  %.cast = trunc i64 %n.vec to i8
  %ind.end339 = add i8 %138, %.cast
  %.splat = shufflevector <2 x i8> %35, <2 x i8> poison, <16 x i32> <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
  %induction = add <16 x i8> %.splat, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <16 x i8> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <16 x i8> %vec.ind, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
  %offset.idx = add i64 %index, %151
  %158 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %offset.idx
  %159 = getelementptr inbounds i8, ptr %158, i64 16
  store <16 x i8> %vec.ind, ptr %158, align 1, !tbaa !9
  store <16 x i8> %step.add, ptr %159, align 1, !tbaa !9
  %index.next = add nuw i64 %index, 32
  %vec.ind.next = add <16 x i8> %vec.ind, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %160 = icmp eq i64 %index.next, %n.vec
  br i1 %160, label %middle.block, label %vector.body, !llvm.loop !32

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %157, %n.vec
  br i1 %cmp.n, label %._crit_edge219, label %.lr.ph218.preheader464

.lr.ph213:                                        ; preds = %.lr.ph213.preheader465, %.lr.ph213
  %indvars.iv281 = phi i64 [ %indvars.iv.next282, %.lr.ph213 ], [ %indvars.iv281.ph, %.lr.ph213.preheader465 ]
  %.0119212 = phi i8 [ %162, %.lr.ph213 ], [ %.0119212.ph, %.lr.ph213.preheader465 ]
  %indvars.iv.next282 = add nsw i64 %indvars.iv281, 1
  %161 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv281
  store i8 %.0119212, ptr %161, align 1, !tbaa !9
  %162 = add i8 %.0119212, -1
  %.not142 = icmp slt i8 %162, %36
  br i1 %.not142, label %..preheader157_crit_edge, label %.lr.ph213, !llvm.loop !33

._crit_edge219:                                   ; preds = %.lr.ph218, %middle.block
  %indvars.iv.next284.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next284, %.lr.ph218 ]
  %163 = trunc nsw i64 %indvars.iv.next284.lcssa to i32
  store i32 %163, ptr @tot, align 4, !tbaa !5
  br label %164

164:                                              ; preds = %._crit_edge219, %.preheader157
  %165 = phi i32 [ %163, %._crit_edge219 ], [ %tot.promoted215, %.preheader157 ]
  %166 = sext i32 %165 to i64
  %167 = shl nsw i64 %166, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @g, i8 0, i64 %167, i1 false)
  %168 = icmp sgt i32 %33, 0
  br i1 %168, label %.lr.ph226, label %._crit_edge245

.lr.ph226:                                        ; preds = %164
  %169 = icmp sgt i32 %165, 0
  br i1 %169, label %.lr.ph223.us.preheader, label %.lr.ph244.preheader

.lr.ph223.us.preheader:                           ; preds = %.lr.ph226
  %wide.trip.count294 = zext nneg i32 %33 to i64
  %.pre313 = load i32, ptr @g, align 16, !tbaa !5
  %.pre314 = load i8, ptr @pat, align 1, !tbaa !9
  %wide.trip.count = zext nneg i32 %165 to i64
  %exitcond.peel.not = icmp eq i32 %165, 1
  %170 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %170, 1
  %171 = icmp eq i32 %165, 2
  %unroll_iter = and i64 %170, -2
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %172

172:                                              ; preds = %..loopexit155_crit_edge.us, %.lr.ph223.us.preheader
  %173 = phi i32 [ %.pre313, %.lr.ph223.us.preheader ], [ %180, %..loopexit155_crit_edge.us ]
  %indvars.iv291 = phi i64 [ 0, %.lr.ph223.us.preheader ], [ %indvars.iv.next292, %..loopexit155_crit_edge.us ]
  %174 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %indvars.iv291
  %indvars.iv.next292 = add nuw nsw i64 %indvars.iv291, 1
  %175 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %indvars.iv.next292
  %176 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %indvars.iv291
  %177 = load i8, ptr %176, align 1, !tbaa !9
  %178 = icmp eq i8 %177, %.pre314
  %179 = zext i1 %178 to i32
  %180 = add nsw i32 %173, %179
  store i32 %180, ptr %175, align 4, !tbaa !5
  br i1 %exitcond.peel.not, label %..loopexit155_crit_edge.us, label %.peel.next289.preheader

.peel.next289.preheader:                          ; preds = %172
  %181 = mul nuw nsw i64 %indvars.iv291, 52
  %gep499 = getelementptr i8, ptr getelementptr (i8, ptr @g, i64 52), i64 %181
  %load_initial459 = load i32, ptr %gep499, align 4
  br i1 %171, label %..loopexit155_crit_edge.us.loopexit.unr-lcssa, label %.peel.next289

.peel.next289:                                    ; preds = %.peel.next289.preheader, %.peel.next289
  %store_forwarded460 = phi i32 [ %spec.store.select330.1, %.peel.next289 ], [ %load_initial459, %.peel.next289.preheader ]
  %indvars.iv285 = phi i64 [ %indvars.iv.next286.1, %.peel.next289 ], [ 1, %.peel.next289.preheader ]
  %niter = phi i64 [ %niter.next.1, %.peel.next289 ], [ 0, %.peel.next289.preheader ]
  %182 = getelementptr inbounds i32, ptr %174, i64 %indvars.iv285
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv285
  %185 = load i8, ptr %184, align 1, !tbaa !9
  %186 = icmp eq i8 %177, %185
  %187 = zext i1 %186 to i32
  %188 = add nsw i32 %183, %187
  %189 = getelementptr inbounds i32, ptr %175, i64 %indvars.iv285
  %spec.store.select330 = call i32 @llvm.smax.i32(i32 %188, i32 %store_forwarded460)
  store i32 %spec.store.select330, ptr %189, align 4
  %indvars.iv.next286 = add nuw nsw i64 %indvars.iv285, 1
  %190 = getelementptr inbounds i32, ptr %174, i64 %indvars.iv.next286
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv.next286
  %193 = load i8, ptr %192, align 1, !tbaa !9
  %194 = icmp eq i8 %177, %193
  %195 = zext i1 %194 to i32
  %196 = add nsw i32 %191, %195
  %197 = getelementptr inbounds i32, ptr %175, i64 %indvars.iv.next286
  %spec.store.select330.1 = call i32 @llvm.smax.i32(i32 %196, i32 %spec.store.select330)
  store i32 %spec.store.select330.1, ptr %197, align 4
  %indvars.iv.next286.1 = add nuw nsw i64 %indvars.iv285, 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 %..loopexit155_crit_edge.us.loopexit.unr-lcssa, label %.peel.next289, !llvm.loop !34

..loopexit155_crit_edge.us.loopexit.unr-lcssa:    ; preds = %.peel.next289, %.peel.next289.preheader
  %store_forwarded460.unr = phi i32 [ %load_initial459, %.peel.next289.preheader ], [ %spec.store.select330.1, %.peel.next289 ]
  %indvars.iv285.unr = phi i64 [ 1, %.peel.next289.preheader ], [ %indvars.iv.next286.1, %.peel.next289 ]
  br i1 %lcmp.mod.not, label %..loopexit155_crit_edge.us, label %.peel.next289.epil

.peel.next289.epil:                               ; preds = %..loopexit155_crit_edge.us.loopexit.unr-lcssa
  %198 = getelementptr inbounds i32, ptr %174, i64 %indvars.iv285.unr
  %199 = load i32, ptr %198, align 4, !tbaa !5
  %200 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv285.unr
  %201 = load i8, ptr %200, align 1, !tbaa !9
  %202 = icmp eq i8 %177, %201
  %203 = zext i1 %202 to i32
  %204 = add nsw i32 %199, %203
  %205 = getelementptr inbounds i32, ptr %175, i64 %indvars.iv285.unr
  %spec.store.select330.epil = call i32 @llvm.smax.i32(i32 %204, i32 %store_forwarded460.unr)
  store i32 %spec.store.select330.epil, ptr %205, align 4
  br label %..loopexit155_crit_edge.us

..loopexit155_crit_edge.us:                       ; preds = %.peel.next289.epil, %..loopexit155_crit_edge.us.loopexit.unr-lcssa, %172
  %exitcond295.not = icmp eq i64 %indvars.iv.next292, %wide.trip.count294
  br i1 %exitcond295.not, label %._crit_edge227, label %172, !llvm.loop !35

.lr.ph218:                                        ; preds = %.lr.ph218.preheader464, %.lr.ph218
  %indvars.iv283 = phi i64 [ %indvars.iv.next284, %.lr.ph218 ], [ %indvars.iv283.ph, %.lr.ph218.preheader464 ]
  %.0118217 = phi i8 [ %207, %.lr.ph218 ], [ %.0118217.ph, %.lr.ph218.preheader464 ]
  %indvars.iv.next284 = add nsw i64 %indvars.iv283, 1
  %206 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv283
  store i8 %.0118217, ptr %206, align 1, !tbaa !9
  %207 = add i8 %.0118217, 1
  %.not143 = icmp sgt i8 %207, %.lcssa160
  br i1 %.not143, label %._crit_edge219, label %.lr.ph218, !llvm.loop !36

._crit_edge227:                                   ; preds = %..loopexit155_crit_edge.us
  br i1 %168, label %.lr.ph244.preheader, label %._crit_edge245

.lr.ph244.preheader:                              ; preds = %.lr.ph226, %._crit_edge227
  %208 = add nsw i32 %165, -1
  %209 = zext nneg i32 %33 to i64
  br label %.lr.ph244

.loopexit.loopexit:                               ; preds = %252
  %210 = trunc nsw i64 %indvars.iv.next297 to i32
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %231
  %.1108.lcssa = phi i32 [ %.0107238, %231 ], [ %.2109, %.loopexit.loopexit ]
  %.1106.lcssa = phi i32 [ %.0105239, %231 ], [ %.2, %.loopexit.loopexit ]
  %.1.lcssa = phi i32 [ %.0103241, %231 ], [ %210, %.loopexit.loopexit ]
  %211 = icmp sgt i64 %indvars.iv299, 1
  br i1 %211, label %.lr.ph244, label %._crit_edge245, !llvm.loop !37

._crit_edge245:                                   ; preds = %.loopexit, %164, %._crit_edge227
  %.0107.lcssa = phi i32 [ 0, %._crit_edge227 ], [ 0, %164 ], [ %.1108.lcssa, %.loopexit ]
  %.0105.lcssa = phi i32 [ 0, %._crit_edge227 ], [ 0, %164 ], [ %.1106.lcssa, %.loopexit ]
  %212 = add nuw nsw i32 %.0107.lcssa, 1
  %213 = add nuw nsw i32 %.0105.lcssa, 1
  %214 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.0111.lcssa, i32 noundef %212, i32 noundef %213)
  br label %255

.lr.ph244:                                        ; preds = %.lr.ph244.preheader, %.loopexit
  %indvars.iv299 = phi i64 [ %209, %.lr.ph244.preheader ], [ %indvars.iv.next300, %.loopexit ]
  %.0103241 = phi i32 [ %208, %.lr.ph244.preheader ], [ %.1.lcssa, %.loopexit ]
  %.0105239 = phi i32 [ 0, %.lr.ph244.preheader ], [ %.1106.lcssa, %.loopexit ]
  %.0107238 = phi i32 [ 0, %.lr.ph244.preheader ], [ %.1108.lcssa, %.loopexit ]
  %indvars.iv.next300 = add nsw i64 %indvars.iv299, -1
  %215 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %indvars.iv.next300
  %216 = getelementptr inbounds [100001 x [13 x i32]], ptr @g, i64 0, i64 %indvars.iv299
  %217 = sext i32 %.0103241 to i64
  %218 = getelementptr inbounds i32, ptr %215, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = getelementptr inbounds [100001 x i8], ptr @buf, i64 0, i64 %indvars.iv.next300
  %221 = load i8, ptr %220, align 1, !tbaa !9
  %222 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %217
  %223 = load i8, ptr %222, align 1, !tbaa !9
  %224 = icmp eq i8 %221, %223
  %225 = zext i1 %224 to i32
  %226 = add nsw i32 %219, %225
  %.not144 = icmp eq i32 %.0103241, 0
  br i1 %.not144, label %231, label %227

227:                                              ; preds = %.lr.ph244
  %228 = getelementptr i32, ptr %216, i64 %217
  %229 = getelementptr i8, ptr %228, i64 -4
  %230 = load i32, ptr %229, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %.lr.ph244, %227
  %232 = phi i32 [ %230, %227 ], [ -1, %.lr.ph244 ]
  %invariant.gep = getelementptr i8, ptr %216, i64 -8
  %233 = icmp slt i32 %226, %232
  br i1 %233, label %.lr.ph233.preheader, label %.loopexit

.lr.ph233.preheader:                              ; preds = %231
  %234 = trunc nuw nsw i64 %indvars.iv299 to i32
  %235 = trunc nuw nsw i64 %indvars.iv.next300 to i32
  br label %.lr.ph233

.lr.ph233:                                        ; preds = %.lr.ph233.preheader, %252
  %indvars.iv296 = phi i64 [ %217, %.lr.ph233.preheader ], [ %indvars.iv.next297, %252 ]
  %.1106230 = phi i32 [ %.0105239, %.lr.ph233.preheader ], [ %.2, %252 ]
  %.1108229 = phi i32 [ %.0107238, %.lr.ph233.preheader ], [ %.2109, %252 ]
  %indvars.iv.next297 = add nsw i64 %indvars.iv296, -1
  %236 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv.next297
  %237 = load i8, ptr %236, align 1, !tbaa !9
  %238 = icmp eq i8 %237, %36
  br i1 %238, label %239, label %244

239:                                              ; preds = %.lr.ph233
  %240 = getelementptr inbounds [13 x i8], ptr @pat, i64 0, i64 %indvars.iv296
  %241 = load i8, ptr %240, align 1, !tbaa !9
  %242 = icmp eq i8 %241, %138
  br i1 %242, label %243, label %244

243:                                              ; preds = %239
  %.not145 = icmp eq i32 %.1106230, 0
  %.1108..0104.in = select i1 %.not145, i32 %.1108229, i32 %234
  %.0104..1106 = select i1 %.not145, i32 %235, i32 %.1106230
  br label %244

244:                                              ; preds = %243, %239, %.lr.ph233
  %.2109 = phi i32 [ %.1108229, %239 ], [ %.1108229, %.lr.ph233 ], [ %.1108..0104.in, %243 ]
  %.2 = phi i32 [ %.1106230, %239 ], [ %.1106230, %.lr.ph233 ], [ %.0104..1106, %243 ]
  %245 = getelementptr inbounds i32, ptr %215, i64 %indvars.iv.next297
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = icmp eq i8 %221, %237
  %248 = zext i1 %247 to i32
  %249 = add nsw i32 %246, %248
  %.not146 = icmp eq i64 %indvars.iv.next297, 0
  br i1 %.not146, label %252, label %250

250:                                              ; preds = %244
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv296
  %251 = load i32, ptr %gep, align 4, !tbaa !5
  br label %252

252:                                              ; preds = %244, %250
  %253 = phi i32 [ %251, %250 ], [ -1, %244 ]
  %254 = icmp slt i32 %249, %253
  br i1 %254, label %.lr.ph233, label %.loopexit.loopexit, !llvm.loop !38

255:                                              ; preds = %._crit_edge245, %23
  %256 = phi <2 x i8> [ %6, %23 ], [ %35, %._crit_edge245 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %1) #6
  %257 = load i32, ptr @t, align 4, !tbaa !5
  %258 = add nsw i32 %257, -1
  store i32 %258, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %257, 0
  br i1 %.not, label %._crit_edge253, label %.lr.ph252

._crit_edge253:                                   ; preds = %255, %0
  ret i32 0
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3minIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZSt3maxIcERKT_S2_S2_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.smin.i8(i8, i8) #5

attributes #0 = { mustprogress norecurse 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !11}
!17 = distinct !{!17, !11, !14, !15}
!18 = distinct !{!18, !11, !14, !15}
!19 = distinct !{!19, !11, !15, !14}
!20 = distinct !{!20, !11, !14, !15}
!21 = distinct !{!21, !11, !15, !14}
!22 = !{!23, !23, i64 0}
!23 = !{!"any pointer", !7, i64 0}
!24 = distinct !{!24, !11, !15, !14}
!25 = distinct !{!25, !11}
!26 = distinct !{!26, !11, !27}
!27 = !{!"llvm.loop.unswitch.partial.disable"}
!28 = distinct !{!28, !11, !29}
!29 = !{!"llvm.loop.peeled.count", i32 1}
!30 = distinct !{!30, !11, !14, !15}
!31 = distinct !{!31, !11, !15, !14}
!32 = distinct !{!32, !11, !14, !15}
!33 = distinct !{!33, !11, !15, !14}
!34 = distinct !{!34, !11, !29}
!35 = distinct !{!35, !11}
!36 = distinct !{!36, !11, !15, !14}
!37 = distinct !{!37, !11}
!38 = distinct !{!38, !11}


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