; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-11-27/upsolved (F - Function - lzy)

; 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
@f = external dso_local global [100009 x [2 x [3 x i32]]], align 16
@g = external dso_local global [100009 x [2 x [3 x i32]]], align 16
@s = external dso_local global [100009 x i8], align 16
@t = external dso_local global [100009 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3coniii(i32 noundef, i32 noundef, i32 noundef) #1

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  br label %19

19:                                               ; preds = %316, %0
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef getelementptr inbounds (i8, ptr @s, i64 1), ptr noundef getelementptr inbounds (i8, ptr @t, i64 1))
  %21 = icmp eq i32 %20, 2
  br i1 %21, label %22, label %317

22:                                               ; preds = %19
  %23 = call i64 @strlen(ptr noundef getelementptr inbounds (i8, ptr @s, i64 1)) #8
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr @n, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 0, i64 2400216, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @g, i8 0, i64 2400216, i1 false)
  store i32 1, ptr @f, align 16, !tbaa !5
  store i32 1, ptr @g, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %130, %22
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp sle i32 %26, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %25
  store i32 4, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #9
  br label %133

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100009 x i8], ptr @s, i64 0, i64 %32
  %34 = load i8, ptr %33, align 1, !tbaa !9
  %35 = sext i8 %34 to i32
  %36 = icmp eq i32 %35, 63
  br i1 %36, label %37, label %89

37:                                               ; preds = %30
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !9
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 63
  br i1 %43, label %44, label %68

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

45:                                               ; preds = %64, %44
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = icmp sle i32 %46, 1
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 7, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  br label %67

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

50:                                               ; preds = %60, %49
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = icmp sle i32 %51, 1
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  br label %63

54:                                               ; preds = %50
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = icmp ne i32 %56, 0
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = icmp ne i32 %58, 0
  call void @_Z3updibb(i32 noundef %55, i1 noundef zeroext %57, i1 noundef zeroext %59)
  br label %60

60:                                               ; preds = %54
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %5, align 4, !tbaa !5
  br label %50, !llvm.loop !10

63:                                               ; preds = %53
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  br label %45, !llvm.loop !12

67:                                               ; preds = %48
  br label %88

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

69:                                               ; preds = %84, %68
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = icmp sle i32 %70, 1
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %87

73:                                               ; preds = %69
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = icmp ne i32 %75, 0
  %77 = load i32, ptr %2, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %78
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = sext i8 %80 to i32
  %82 = xor i32 %81, 49
  %83 = icmp ne i32 %82, 0
  call void @_Z3updibb(i32 noundef %74, i1 noundef zeroext %76, i1 noundef zeroext %83)
  br label %84

84:                                               ; preds = %73
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %6, align 4, !tbaa !5
  br label %69, !llvm.loop !13

87:                                               ; preds = %72
  br label %88

88:                                               ; preds = %87, %67
  br label %129

89:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %90 = load i32, ptr %2, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100009 x i8], ptr @s, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !9
  %94 = sext i8 %93 to i32
  %95 = xor i32 %94, 48
  store i32 %95, ptr %7, align 4, !tbaa !5
  %96 = load i32, ptr %2, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !9
  %100 = sext i8 %99 to i32
  %101 = icmp eq i32 %100, 63
  br i1 %101, label %102, label %117

102:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %113, %102
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = icmp sle i32 %104, 1
  br i1 %105, label %107, label %106

106:                                              ; preds = %103
  store i32 16, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  br label %116

107:                                              ; preds = %103
  %108 = load i32, ptr %2, align 4, !tbaa !5
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = icmp ne i32 %109, 0
  %111 = load i32, ptr %8, align 4, !tbaa !5
  %112 = icmp ne i32 %111, 0
  call void @_Z3updibb(i32 noundef %108, i1 noundef zeroext %110, i1 noundef zeroext %112)
  br label %113

113:                                              ; preds = %107
  %114 = load i32, ptr %8, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %8, align 4, !tbaa !5
  br label %103, !llvm.loop !14

116:                                              ; preds = %106
  br label %128

117:                                              ; preds = %89
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = icmp ne i32 %119, 0
  %121 = load i32, ptr %2, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %122
  %124 = load i8, ptr %123, align 1, !tbaa !9
  %125 = sext i8 %124 to i32
  %126 = xor i32 %125, 49
  %127 = icmp ne i32 %126, 0
  call void @_Z3updibb(i32 noundef %118, i1 noundef zeroext %120, i1 noundef zeroext %127)
  br label %128

128:                                              ; preds = %117, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %129

129:                                              ; preds = %128, %88
  br label %130

130:                                              ; preds = %129
  %131 = load i32, ptr %2, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %2, align 4, !tbaa !5
  br label %25, !llvm.loop !15

133:                                              ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #9
  store i8 1, ptr %11, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %155, %133
  %135 = load i32, ptr %12, align 4, !tbaa !5
  %136 = load i32, ptr @n, align 4, !tbaa !5
  %137 = icmp sle i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 19, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %158

139:                                              ; preds = %134
  %140 = load i32, ptr %12, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100009 x i8], ptr @s, i64 0, i64 %141
  %143 = load i8, ptr %142, align 1, !tbaa !9
  %144 = sext i8 %143 to i32
  %145 = icmp eq i32 %144, 49
  br i1 %145, label %153, label %146

146:                                              ; preds = %139
  %147 = load i32, ptr %12, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %148
  %150 = load i8, ptr %149, align 1, !tbaa !9
  %151 = sext i8 %150 to i32
  %152 = icmp eq i32 %151, 49
  br i1 %152, label %153, label %154

153:                                              ; preds = %146, %139
  store i8 0, ptr %11, align 1, !tbaa !16
  br label %154

154:                                              ; preds = %153, %146
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %12, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %12, align 4, !tbaa !5
  br label %134, !llvm.loop !18

158:                                              ; preds = %138
  %159 = load i8, ptr %11, align 1, !tbaa !16, !range !19, !noundef !20
  %160 = trunc i8 %159 to i1
  br i1 %160, label %161, label %166

161:                                              ; preds = %158
  %162 = load i32, ptr %9, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %9, align 4, !tbaa !5
  %164 = load i32, ptr %10, align 4, !tbaa !5
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %10, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %161, %158
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %167

167:                                              ; preds = %215, %166
  %168 = load i32, ptr %13, align 4, !tbaa !5
  %169 = icmp sle i32 %168, 1
  br i1 %169, label %171, label %170

170:                                              ; preds = %167
  store i32 22, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %218

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

172:                                              ; preds = %211, %171
  %173 = load i32, ptr %14, align 4, !tbaa !5
  %174 = icmp sle i32 %173, 2
  br i1 %174, label %176, label %175

175:                                              ; preds = %172
  store i32 25, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %214

176:                                              ; preds = %172
  %177 = load i32, ptr @n, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %178
  %180 = load i32, ptr %13, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [2 x [3 x i32]], ptr %179, i64 0, i64 %181
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [3 x i32], ptr %182, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = load i32, ptr %9, align 4, !tbaa !5
  %188 = add nsw i32 %187, %186
  store i32 %188, ptr %9, align 4, !tbaa !5
  %189 = icmp sge i32 %188, 1000000007
  br i1 %189, label %190, label %193

190:                                              ; preds = %176
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = sub nsw i32 %191, 1000000007
  store i32 %192, ptr %9, align 4, !tbaa !5
  br label %193

193:                                              ; preds = %190, %176
  %194 = load i32, ptr @n, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %195
  %197 = load i32, ptr %13, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [2 x [3 x i32]], ptr %196, i64 0, i64 %198
  %200 = load i32, ptr %14, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [3 x i32], ptr %199, i64 0, i64 %201
  %203 = load i32, ptr %202, align 4, !tbaa !5
  %204 = load i32, ptr %10, align 4, !tbaa !5
  %205 = add nsw i32 %204, %203
  store i32 %205, ptr %10, align 4, !tbaa !5
  %206 = icmp sge i32 %205, 22222223
  br i1 %206, label %207, label %210

207:                                              ; preds = %193
  %208 = load i32, ptr %10, align 4, !tbaa !5
  %209 = sub nsw i32 %208, 22222223
  store i32 %209, ptr %10, align 4, !tbaa !5
  br label %210

210:                                              ; preds = %207, %193
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %14, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %14, align 4, !tbaa !5
  br label %172, !llvm.loop !21

214:                                              ; preds = %175
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %13, align 4, !tbaa !5
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %13, align 4, !tbaa !5
  br label %167, !llvm.loop !22

218:                                              ; preds = %170
  %219 = load i32, ptr %9, align 4, !tbaa !5
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %221, label %226

221:                                              ; preds = %218
  %222 = load i32, ptr %10, align 4, !tbaa !5
  %223 = icmp eq i32 %222, 0
  br i1 %223, label %224, label %226

224:                                              ; preds = %221
  %225 = call i32 @puts(ptr noundef @.str.1)
  br label %316

226:                                              ; preds = %221, %218
  %227 = load i32, ptr %9, align 4, !tbaa !5
  %228 = icmp eq i32 %227, 1
  br i1 %228, label %229, label %312

229:                                              ; preds = %226
  %230 = load i32, ptr %10, align 4, !tbaa !5
  %231 = icmp eq i32 %230, 1
  br i1 %231, label %232, label %312

232:                                              ; preds = %229
  %233 = call i32 @puts(ptr noundef @.str.2)
  %234 = load i8, ptr %11, align 1, !tbaa !16, !range !19, !noundef !20
  %235 = trunc i8 %234 to i1
  br i1 %235, label %236, label %261

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

237:                                              ; preds = %244, %236
  %238 = load i32, ptr %15, align 4, !tbaa !5
  %239 = load i32, ptr @n, align 4, !tbaa !5
  %240 = icmp sle i32 %238, %239
  br i1 %240, label %242, label %241

241:                                              ; preds = %237
  store i32 28, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %247

242:                                              ; preds = %237
  %243 = call i32 @putchar(i32 noundef 48)
  br label %244

244:                                              ; preds = %242
  %245 = load i32, ptr %15, align 4, !tbaa !5
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %15, align 4, !tbaa !5
  br label %237, !llvm.loop !23

247:                                              ; preds = %241
  %248 = call i32 @puts(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %249

249:                                              ; preds = %256, %247
  %250 = load i32, ptr %16, align 4, !tbaa !5
  %251 = load i32, ptr @n, align 4, !tbaa !5
  %252 = icmp sle i32 %250, %251
  br i1 %252, label %254, label %253

253:                                              ; preds = %249
  store i32 31, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %259

254:                                              ; preds = %249
  %255 = call i32 @putchar(i32 noundef 48)
  br label %256

256:                                              ; preds = %254
  %257 = load i32, ptr %16, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %16, align 4, !tbaa !5
  br label %249, !llvm.loop !24

259:                                              ; preds = %253
  %260 = call i32 @puts(ptr noundef @.str.3)
  br label %311

261:                                              ; preds = %232
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %262

262:                                              ; preds = %305, %261
  %263 = load i32, ptr %17, align 4, !tbaa !5
  %264 = icmp sle i32 %263, 1
  br i1 %264, label %266, label %265

265:                                              ; preds = %262
  store i32 34, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  br label %308

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

267:                                              ; preds = %301, %266
  %268 = load i32, ptr %18, align 4, !tbaa !5
  %269 = icmp sle i32 %268, 2
  br i1 %269, label %271, label %270

270:                                              ; preds = %267
  store i32 37, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %304

271:                                              ; preds = %267
  %272 = load i32, ptr @n, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %273
  %275 = load i32, ptr %17, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds [2 x [3 x i32]], ptr %274, i64 0, i64 %276
  %278 = load i32, ptr %18, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [3 x i32], ptr %277, i64 0, i64 %279
  %281 = load i32, ptr %280, align 4, !tbaa !5
  %282 = icmp ne i32 %281, 0
  br i1 %282, label %295, label %283

283:                                              ; preds = %271
  %284 = load i32, ptr @n, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %285
  %287 = load i32, ptr %17, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [2 x [3 x i32]], ptr %286, i64 0, i64 %288
  %290 = load i32, ptr %18, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [3 x i32], ptr %289, i64 0, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = icmp ne i32 %293, 0
  br i1 %294, label %295, label %300

295:                                              ; preds = %283, %271
  %296 = load i32, ptr @n, align 4, !tbaa !5
  %297 = load i32, ptr %17, align 4, !tbaa !5
  %298 = load i32, ptr %18, align 4, !tbaa !5
  %299 = call noundef zeroext i1 @_Z3coniii(i32 noundef %296, i32 noundef %297, i32 noundef %298)
  br label %300

300:                                              ; preds = %295, %283
  br label %301

301:                                              ; preds = %300
  %302 = load i32, ptr %18, align 4, !tbaa !5
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %18, align 4, !tbaa !5
  br label %267, !llvm.loop !25

304:                                              ; preds = %270
  br label %305

305:                                              ; preds = %304
  %306 = load i32, ptr %17, align 4, !tbaa !5
  %307 = add nsw i32 %306, 1
  store i32 %307, ptr %17, align 4, !tbaa !5
  br label %262, !llvm.loop !26

308:                                              ; preds = %265
  %309 = call i32 @puts(ptr noundef getelementptr inbounds (i8, ptr @s, i64 1))
  %310 = call i32 @puts(ptr noundef getelementptr inbounds (i8, ptr @t, i64 1))
  br label %311

311:                                              ; preds = %308, %259
  br label %315

312:                                              ; preds = %229, %226
  %313 = load i32, ptr %9, align 4, !tbaa !5
  %314 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %313)
  br label %315

315:                                              ; preds = %312, %311
  br label %316

316:                                              ; preds = %315, %224
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %19, !llvm.loop !27

317:                                              ; preds = %19
  ret i32 0
}

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updibb(i32 noundef, i1 noundef zeroext, i1 noundef zeroext) #6

declare i32 @puts(ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #7

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!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 = !{!"bool", !7, i64 0}
!18 = distinct !{!18, !11}
!19 = !{i8 0, i8 2}
!20 = !{}
!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}


; 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
@f = external dso_local local_unnamed_addr global [100009 x [2 x [3 x i32]]], align 16
@g = external dso_local local_unnamed_addr global [100009 x [2 x [3 x i32]]], align 16
@s = external dso_local global [100009 x i8], align 16
@t = external dso_local global [100009 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z3coniii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @s, i64 1), ptr noundef nonnull getelementptr inbounds (i8, ptr @t, i64 1))
  %2 = icmp eq i32 %1, 2
  br i1 %2, label %.lr.ph137, label %._crit_edge138

.lr.ph137:                                        ; preds = %0, %152
  %3 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @s, i64 1)) #7
  %4 = trunc i64 %3 to i32
  store i32 %4, ptr @n, align 4, !tbaa !5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2400216) @f, i8 0, i64 2400216, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(2400216) @g, i8 0, i64 2400216, i1 false)
  store i32 1, ptr @f, align 16, !tbaa !5
  store i32 1, ptr @g, align 16, !tbaa !5
  %.not112 = icmp slt i32 %4, 1
  br i1 %.not112, label %._crit_edge, label %.lr.ph

.preheader107:                                    ; preds = %.loopexit
  %.not92114 = icmp slt i32 %25, 1
  br i1 %.not92114, label %._crit_edge, label %.lr.ph117.preheader

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

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

.lr.ph:                                           ; preds = %.lr.ph137, %.loopexit
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit ], [ 1, %.lr.ph137 ]
  %7 = getelementptr inbounds [100009 x i8], ptr @s, i64 0, i64 %indvars.iv
  %8 = load i8, ptr %7, align 1, !tbaa !9
  %9 = icmp eq i8 %8, 63
  %10 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %indvars.iv
  %11 = load i8, ptr %10, align 1, !tbaa !9
  %12 = icmp eq i8 %11, 63
  br i1 %9, label %13, label %19

13:                                               ; preds = %.lr.ph
  br i1 %12, label %.preheader.preheader, label %.preheader101.preheader

.preheader101.preheader:                          ; preds = %13
  %14 = icmp ne i8 %11, 49
  %15 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @_Z3updibb(i32 noundef %15, i1 noundef zeroext false, i1 noundef zeroext %14)
  %16 = load i8, ptr %10, align 1, !tbaa !9
  %17 = icmp ne i8 %16, 49
  tail call void @_Z3updibb(i32 noundef %15, i1 noundef zeroext true, i1 noundef zeroext %17)
  br label %.loopexit

.preheader.preheader:                             ; preds = %13
  %18 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @_Z3updibb(i32 noundef %18, i1 noundef zeroext false, i1 noundef zeroext false)
  tail call void @_Z3updibb(i32 noundef %18, i1 noundef zeroext false, i1 noundef zeroext true)
  tail call void @_Z3updibb(i32 noundef %18, i1 noundef zeroext true, i1 noundef zeroext false)
  tail call void @_Z3updibb(i32 noundef %18, i1 noundef zeroext true, i1 noundef zeroext true)
  br label %.loopexit

19:                                               ; preds = %.lr.ph
  %20 = icmp ne i8 %8, 48
  br i1 %12, label %.preheader103, label %22

.preheader103:                                    ; preds = %19
  %21 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @_Z3updibb(i32 noundef %21, i1 noundef zeroext %20, i1 noundef zeroext false)
  tail call void @_Z3updibb(i32 noundef %21, i1 noundef zeroext %20, i1 noundef zeroext true)
  br label %.loopexit

22:                                               ; preds = %19
  %23 = icmp ne i8 %11, 49
  %24 = trunc nuw nsw i64 %indvars.iv to i32
  tail call void @_Z3updibb(i32 noundef %24, i1 noundef zeroext %20, i1 noundef zeroext %23)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader103, %.preheader101.preheader, %.preheader.preheader, %22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr @n, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %.not.not = icmp slt i64 %indvars.iv, %26
  br i1 %.not.not, label %.lr.ph, label %.preheader107, !llvm.loop !10

._crit_edge.loopexit.unr-lcssa:                   ; preds = %95, %.lr.ph117.preheader
  %.1.lcssa.ph = phi i8 [ poison, %.lr.ph117.preheader ], [ %.1.1, %95 ]
  %indvars.iv143.unr = phi i64 [ 1, %.lr.ph117.preheader ], [ %indvars.iv.next144.1, %95 ]
  %.074115.unr = phi i8 [ 1, %.lr.ph117.preheader ], [ %.1.1, %95 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph117.epil

.lr.ph117.epil:                                   ; preds = %._crit_edge.loopexit.unr-lcssa
  %27 = getelementptr inbounds [100009 x i8], ptr @s, i64 0, i64 %indvars.iv143.unr
  %28 = load i8, ptr %27, align 1, !tbaa !9
  %29 = icmp eq i8 %28, 49
  br i1 %29, label %34, label %30

30:                                               ; preds = %.lr.ph117.epil
  %31 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %indvars.iv143.unr
  %32 = load i8, ptr %31, align 1, !tbaa !9
  %33 = icmp eq i8 %32, 49
  br i1 %33, label %34, label %._crit_edge

34:                                               ; preds = %30, %.lr.ph117.epil
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %34, %30, %.lr.ph137, %.preheader107
  %.lcssa172 = phi i32 [ %25, %.preheader107 ], [ %4, %.lr.ph137 ], [ %25, %30 ], [ %25, %34 ], [ %25, %._crit_edge.loopexit.unr-lcssa ]
  %.074.lcssa = phi i8 [ 1, %.preheader107 ], [ 1, %.lr.ph137 ], [ %.1.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ 0, %34 ], [ %.074115.unr, %30 ]
  %.mask = and i8 %.074.lcssa, 1
  %spec.select = zext nneg i8 %.mask to i32
  %35 = sext i32 %.lcssa172 to i64
  %36 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %35, i64 0, i64 1
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = add nsw i32 %37, %spec.select
  %39 = icmp sgt i32 %38, 1000000006
  %40 = add nsw i32 %38, -1000000007
  %spec.select97 = select i1 %39, i32 %40, i32 %38
  %41 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %35, i64 0, i64 1
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, %spec.select
  %44 = icmp sgt i32 %43, 22222222
  %45 = add nsw i32 %43, -22222223
  %.3 = select i1 %44, i32 %45, i32 %43
  %46 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %35, i64 0, i64 2
  %47 = load i32, ptr %46, align 8, !tbaa !5
  %48 = add nsw i32 %47, %spec.select97
  %49 = icmp sgt i32 %48, 1000000006
  %50 = add nsw i32 %48, -1000000007
  %spec.select97.1 = select i1 %49, i32 %50, i32 %48
  %51 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %35, i64 0, i64 2
  %52 = load i32, ptr %51, align 8, !tbaa !5
  %53 = add nsw i32 %52, %.3
  %54 = icmp sgt i32 %53, 22222222
  %55 = add nsw i32 %53, -22222223
  %.3.1 = select i1 %54, i32 %55, i32 %53
  %56 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %35, i64 1, i64 1
  %57 = load i32, ptr %56, align 8, !tbaa !5
  %58 = add nsw i32 %57, %spec.select97.1
  %59 = icmp sgt i32 %58, 1000000006
  %60 = add nsw i32 %58, -1000000007
  %spec.select97.1152 = select i1 %59, i32 %60, i32 %58
  %61 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %35, i64 1, i64 1
  %62 = load i32, ptr %61, align 8, !tbaa !5
  %63 = add nsw i32 %62, %.3.1
  %64 = icmp sgt i32 %63, 22222222
  %65 = add nsw i32 %63, -22222223
  %.3.1153 = select i1 %64, i32 %65, i32 %63
  %66 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %35, i64 1, i64 2
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = add nsw i32 %67, %spec.select97.1152
  %69 = icmp sgt i32 %68, 1000000006
  %70 = add nsw i32 %68, -1000000007
  %spec.select97.1.1 = select i1 %69, i32 %70, i32 %68
  %71 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %35, i64 1, i64 2
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, %.3.1153
  %74 = icmp sgt i32 %73, 22222222
  %75 = add nsw i32 %73, -22222223
  %.3.1.1 = select i1 %74, i32 %75, i32 %73
  %76 = trunc nuw i8 %.074.lcssa to i1
  %77 = icmp eq i32 %spec.select97.1.1, 0
  %78 = icmp eq i32 %.3.1.1, 0
  %or.cond = select i1 %77, i1 %78, i1 false
  br i1 %or.cond, label %96, label %98

.lr.ph117:                                        ; preds = %95, %.lr.ph117.preheader.new
  %indvars.iv143 = phi i64 [ 1, %.lr.ph117.preheader.new ], [ %indvars.iv.next144.1, %95 ]
  %.074115 = phi i8 [ 1, %.lr.ph117.preheader.new ], [ %.1.1, %95 ]
  %niter = phi i64 [ 0, %.lr.ph117.preheader.new ], [ %niter.next.1, %95 ]
  %79 = getelementptr inbounds [100009 x i8], ptr @s, i64 0, i64 %indvars.iv143
  %80 = load i8, ptr %79, align 1, !tbaa !9
  %81 = icmp eq i8 %80, 49
  br i1 %81, label %86, label %82

82:                                               ; preds = %.lr.ph117
  %83 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %indvars.iv143
  %84 = load i8, ptr %83, align 1, !tbaa !9
  %85 = icmp eq i8 %84, 49
  br i1 %85, label %86, label %.lr.ph117.1

86:                                               ; preds = %82, %.lr.ph117
  br label %.lr.ph117.1

.lr.ph117.1:                                      ; preds = %82, %86
  %.1 = phi i8 [ 0, %86 ], [ %.074115, %82 ]
  %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1
  %87 = getelementptr inbounds [100009 x i8], ptr @s, i64 0, i64 %indvars.iv.next144
  %88 = load i8, ptr %87, align 1, !tbaa !9
  %89 = icmp eq i8 %88, 49
  br i1 %89, label %94, label %90

90:                                               ; preds = %.lr.ph117.1
  %91 = getelementptr inbounds [100009 x i8], ptr @t, i64 0, i64 %indvars.iv.next144
  %92 = load i8, ptr %91, align 1, !tbaa !9
  %93 = icmp eq i8 %92, 49
  br i1 %93, label %94, label %95

94:                                               ; preds = %90, %.lr.ph117.1
  br label %95

95:                                               ; preds = %94, %90
  %.1.1 = phi i8 [ 0, %94 ], [ %.1, %90 ]
  %indvars.iv.next144.1 = add nuw nsw i64 %indvars.iv143, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph117, !llvm.loop !12

96:                                               ; preds = %._crit_edge
  %97 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %152

98:                                               ; preds = %._crit_edge
  %99 = icmp eq i32 %spec.select97.1.1, 1
  %100 = icmp eq i32 %.3.1.1, 1
  %or.cond3 = select i1 %99, i1 %100, i1 false
  br i1 %or.cond3, label %101, label %150

101:                                              ; preds = %98
  %102 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  %103 = load i32, ptr @n, align 4, !tbaa !5
  br i1 %76, label %.preheader105, label %.preheader98.preheader

.preheader98.preheader:                           ; preds = %101
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %104, i64 0, i64 1
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %.not93 = icmp eq i32 %106, 0
  br i1 %.not93, label %116, label %119

.preheader105:                                    ; preds = %101
  %.not95127 = icmp slt i32 %103, 1
  br i1 %.not95127, label %._crit_edge130, label %.lr.ph129

._crit_edge130:                                   ; preds = %.lr.ph129, %.preheader105
  %107 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  %108 = load i32, ptr @n, align 4, !tbaa !5
  %.not96131 = icmp slt i32 %108, 1
  br i1 %.not96131, label %._crit_edge135, label %.lr.ph134

.lr.ph129:                                        ; preds = %.preheader105, %.lr.ph129
  %.070128 = phi i32 [ %110, %.lr.ph129 ], [ 1, %.preheader105 ]
  %109 = tail call i32 @putchar(i32 noundef 48)
  %110 = add nuw nsw i32 %.070128, 1
  %111 = load i32, ptr @n, align 4, !tbaa !5
  %.not95.not = icmp slt i32 %.070128, %111
  br i1 %.not95.not, label %.lr.ph129, label %._crit_edge130, !llvm.loop !13

._crit_edge135:                                   ; preds = %.lr.ph134, %._crit_edge130
  %112 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %152

.lr.ph134:                                        ; preds = %._crit_edge130, %.lr.ph134
  %.069132 = phi i32 [ %114, %.lr.ph134 ], [ 1, %._crit_edge130 ]
  %113 = tail call i32 @putchar(i32 noundef 48)
  %114 = add nuw nsw i32 %.069132, 1
  %115 = load i32, ptr @n, align 4, !tbaa !5
  %.not96.not = icmp slt i32 %.069132, %115
  br i1 %.not96.not, label %.lr.ph134, label %._crit_edge135, !llvm.loop !14

116:                                              ; preds = %.preheader98.preheader
  %117 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %104, i64 0, i64 1
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %.not94 = icmp eq i32 %118, 0
  br i1 %.not94, label %121, label %119

119:                                              ; preds = %116, %.preheader98.preheader
  %120 = tail call noundef zeroext i1 @_Z3coniii(i32 noundef %103, i32 noundef 0, i32 noundef 1)
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  %.pre165 = sext i32 %.pre to i64
  br label %121

121:                                              ; preds = %116, %119
  %.pre-phi = phi i64 [ %104, %116 ], [ %.pre165, %119 ]
  %122 = phi i32 [ %103, %116 ], [ %.pre, %119 ]
  %123 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %.pre-phi, i64 0, i64 2
  %124 = load i32, ptr %123, align 8, !tbaa !5
  %.not93.1 = icmp eq i32 %124, 0
  br i1 %.not93.1, label %125, label %128

125:                                              ; preds = %121
  %126 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %.pre-phi, i64 0, i64 2
  %127 = load i32, ptr %126, align 8, !tbaa !5
  %.not94.1 = icmp eq i32 %127, 0
  br i1 %.not94.1, label %.preheader98.1, label %128

128:                                              ; preds = %125, %121
  %129 = tail call noundef zeroext i1 @_Z3coniii(i32 noundef %122, i32 noundef 0, i32 noundef 2)
  %.pre163 = load i32, ptr @n, align 4, !tbaa !5
  %.pre166 = sext i32 %.pre163 to i64
  br label %.preheader98.1

.preheader98.1:                                   ; preds = %128, %125
  %.pre-phi167 = phi i64 [ %.pre166, %128 ], [ %.pre-phi, %125 ]
  %130 = phi i32 [ %.pre163, %128 ], [ %122, %125 ]
  %131 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %.pre-phi167, i64 1, i64 1
  %132 = load i32, ptr %131, align 8, !tbaa !5
  %.not93.1161 = icmp eq i32 %132, 0
  br i1 %.not93.1161, label %133, label %136

133:                                              ; preds = %.preheader98.1
  %134 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %.pre-phi167, i64 1, i64 1
  %135 = load i32, ptr %134, align 8, !tbaa !5
  %.not94.1162 = icmp eq i32 %135, 0
  br i1 %.not94.1162, label %138, label %136

136:                                              ; preds = %133, %.preheader98.1
  %137 = tail call noundef zeroext i1 @_Z3coniii(i32 noundef %130, i32 noundef 1, i32 noundef 1)
  %.pre164 = load i32, ptr @n, align 4, !tbaa !5
  %.pre168 = sext i32 %.pre164 to i64
  br label %138

138:                                              ; preds = %136, %133
  %.pre-phi169 = phi i64 [ %.pre168, %136 ], [ %.pre-phi167, %133 ]
  %139 = phi i32 [ %.pre164, %136 ], [ %130, %133 ]
  %140 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @f, i64 0, i64 %.pre-phi169, i64 1, i64 2
  %141 = load i32, ptr %140, align 4, !tbaa !5
  %.not93.1.1 = icmp eq i32 %141, 0
  br i1 %.not93.1.1, label %142, label %145

142:                                              ; preds = %138
  %143 = getelementptr inbounds [100009 x [2 x [3 x i32]]], ptr @g, i64 0, i64 %.pre-phi169, i64 1, i64 2
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %.not94.1.1 = icmp eq i32 %144, 0
  br i1 %.not94.1.1, label %147, label %145

145:                                              ; preds = %142, %138
  %146 = tail call noundef zeroext i1 @_Z3coniii(i32 noundef %139, i32 noundef 1, i32 noundef 2)
  br label %147

147:                                              ; preds = %145, %142
  %148 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @s, i64 1))
  %149 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @t, i64 1))
  br label %152

150:                                              ; preds = %98
  %151 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %spec.select97.1.1)
  br label %152

152:                                              ; preds = %150, %147, %._crit_edge135, %96
  %153 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds (i8, ptr @s, i64 1), ptr noundef nonnull getelementptr inbounds (i8, ptr @t, i64 1))
  %154 = icmp eq i32 %153, 2
  br i1 %154, label %.lr.ph137, label %._crit_edge138, !llvm.loop !15

._crit_edge138:                                   ; preds = %152, %0
  ret i32 0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z3updibb(i32 noundef, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #5

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

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

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

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

!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}


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