; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/AIM Tech Division 1/Problem A (A)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@e = external dso_local global [501 x [501 x i32]], align 16
@f = external dso_local global [501 x [501 x i32]], align 16
@s = external dso_local global [501 x i8], align 16
@used = external dso_local global [501 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2okcc(i8 noundef signext, i8 noundef signext) #0

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

18:                                               ; preds = %37, %0
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = load i32, ptr @m, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %40

23:                                               ; preds = %18
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %2, ptr noundef %3)
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %26
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [501 x i32], ptr %27, i64 0, i64 %29
  store i32 1, ptr %30, align 4, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %32
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [501 x i32], ptr %33, i64 0, i64 %35
  store i32 1, ptr %36, align 4, !tbaa !5
  br label %37

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

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

41:                                               ; preds = %78, %40
  %42 = load i32, ptr %5, align 4, !tbaa !5
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %81

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

47:                                               ; preds = %62, %46
  %48 = load i32, ptr %8, align 4, !tbaa !5
  %49 = load i32, ptr @n, align 4, !tbaa !5
  %50 = icmp sle i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %65

52:                                               ; preds = %47
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %54
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [501 x i32], ptr %55, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = add nsw i32 %60, %59
  store i32 %61, ptr %7, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %52
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %8, align 4, !tbaa !5
  br label %47, !llvm.loop !11

65:                                               ; preds = %51
  %66 = load i32, ptr %7, align 4, !tbaa !5
  %67 = load i32, ptr @n, align 4, !tbaa !5
  %68 = sub nsw i32 %67, 1
  %69 = icmp eq i32 %66, %68
  br i1 %69, label %70, label %77

70:                                               ; preds = %65
  %71 = load i32, ptr %5, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %72
  store i32 1, ptr %73, align 4, !tbaa !5
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %75
  store i8 98, ptr %76, align 1, !tbaa !12
  br label %77

77:                                               ; preds = %70, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %5, align 4, !tbaa !5
  br label %41, !llvm.loop !13

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

82:                                               ; preds = %133, %81
  %83 = load i32, ptr %9, align 4, !tbaa !5
  %84 = load i32, ptr @n, align 4, !tbaa !5
  %85 = icmp sle i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 11, ptr %6, align 4
  br label %136

87:                                               ; preds = %82
  %88 = load i32, ptr %9, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %87
  br label %133

94:                                               ; preds = %87
  %95 = load i32, ptr %9, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %96
  store i8 97, ptr %97, align 1, !tbaa !12
  %98 = load i32, ptr %9, align 4, !tbaa !5
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %99
  store i32 1, ptr %100, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %129, %94
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = load i32, ptr @n, align 4, !tbaa !5
  %104 = icmp sle i32 %102, %103
  br i1 %104, label %106, label %105

105:                                              ; preds = %101
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %132

106:                                              ; preds = %101
  %107 = load i32, ptr %10, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %108
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %128, label %112

112:                                              ; preds = %106
  %113 = load i32, ptr %9, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %114
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [501 x i32], ptr %115, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = icmp eq i32 %119, 1
  br i1 %120, label %121, label %128

121:                                              ; preds = %112
  %122 = load i32, ptr %10, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %123
  store i32 1, ptr %124, align 4, !tbaa !5
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %126
  store i8 97, ptr %127, align 1, !tbaa !12
  br label %128

128:                                              ; preds = %121, %112, %106
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %10, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %10, align 4, !tbaa !5
  br label %101, !llvm.loop !14

132:                                              ; preds = %105
  store i32 11, ptr %6, align 4
  br label %136

133:                                              ; preds = %93
  %134 = load i32, ptr %9, align 4, !tbaa !5
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %9, align 4, !tbaa !5
  br label %82, !llvm.loop !15

136:                                              ; preds = %132, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %137

137:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %157, %137
  %139 = load i32, ptr %11, align 4, !tbaa !5
  %140 = load i32, ptr @n, align 4, !tbaa !5
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 17, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %160

143:                                              ; preds = %138
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %156, label %149

149:                                              ; preds = %143
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %151
  store i8 99, ptr %152, align 1, !tbaa !12
  %153 = load i32, ptr %11, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %154
  store i32 1, ptr %155, align 4, !tbaa !5
  br label %156

156:                                              ; preds = %149, %143
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %11, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %11, align 4, !tbaa !5
  br label %138, !llvm.loop !16

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

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

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

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

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

171:                                              ; preds = %167
  store i32 23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %198

172:                                              ; preds = %167
  %173 = load i32, ptr %12, align 4, !tbaa !5
  %174 = load i32, ptr %13, align 4, !tbaa !5
  %175 = icmp eq i32 %173, %174
  br i1 %175, label %176, label %177

176:                                              ; preds = %172
  br label %195

177:                                              ; preds = %172
  %178 = load i32, ptr %12, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %179
  %181 = load i8, ptr %180, align 1, !tbaa !12
  %182 = load i32, ptr %13, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %183
  %185 = load i8, ptr %184, align 1, !tbaa !12
  %186 = call noundef zeroext i1 @_Z2okcc(i8 noundef signext %181, i8 noundef signext %185)
  br i1 %186, label %187, label %194

187:                                              ; preds = %177
  %188 = load i32, ptr %12, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [501 x [501 x i32]], ptr @f, i64 0, i64 %189
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [501 x i32], ptr %190, i64 0, i64 %192
  store i32 1, ptr %193, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %187, %177
  br label %195

195:                                              ; preds = %194, %176
  %196 = load i32, ptr %13, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %13, align 4, !tbaa !5
  br label %167, !llvm.loop !17

198:                                              ; preds = %171
  br label %199

199:                                              ; preds = %198
  %200 = load i32, ptr %12, align 4, !tbaa !5
  %201 = add nsw i32 %200, 1
  store i32 %201, ptr %12, align 4, !tbaa !5
  br label %161, !llvm.loop !18

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

203:                                              ; preds = %239, %202
  %204 = load i32, ptr %14, align 4, !tbaa !5
  %205 = load i32, ptr @n, align 4, !tbaa !5
  %206 = icmp sle i32 %204, %205
  br i1 %206, label %208, label %207

207:                                              ; preds = %203
  store i32 26, ptr %6, align 4
  br label %242

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

209:                                              ; preds = %233, %208
  %210 = load i32, ptr %15, align 4, !tbaa !5
  %211 = load i32, ptr @n, align 4, !tbaa !5
  %212 = icmp sle i32 %210, %211
  br i1 %212, label %214, label %213

213:                                              ; preds = %209
  store i32 29, ptr %6, align 4
  br label %236

214:                                              ; preds = %209
  %215 = load i32, ptr %14, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %216
  %218 = load i32, ptr %15, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [501 x i32], ptr %217, i64 0, i64 %219
  %221 = load i32, ptr %220, align 4, !tbaa !5
  %222 = load i32, ptr %14, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [501 x [501 x i32]], ptr @f, i64 0, i64 %223
  %225 = load i32, ptr %15, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [501 x i32], ptr %224, i64 0, i64 %226
  %228 = load i32, ptr %227, align 4, !tbaa !5
  %229 = icmp ne i32 %221, %228
  br i1 %229, label %230, label %232

230:                                              ; preds = %214
  %231 = call i32 @puts(ptr noundef @.str.1)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  br label %236

232:                                              ; preds = %214
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %15, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %15, align 4, !tbaa !5
  br label %209, !llvm.loop !19

236:                                              ; preds = %230, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  %237 = load i32, ptr %6, align 4
  switch i32 %237, label %242 [
    i32 29, label %238
  ]

238:                                              ; preds = %236
  br label %239

239:                                              ; preds = %238
  %240 = load i32, ptr %14, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %14, align 4, !tbaa !5
  br label %203, !llvm.loop !20

242:                                              ; preds = %236, %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %243 = load i32, ptr %6, align 4
  switch i32 %243, label %263 [
    i32 26, label %244
  ]

244:                                              ; preds = %242
  %245 = call i32 @puts(ptr noundef @.str.2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 1, ptr %16, align 4, !tbaa !5
  br label %246

246:                                              ; preds = %258, %244
  %247 = load i32, ptr %16, align 4, !tbaa !5
  %248 = load i32, ptr @n, align 4, !tbaa !5
  %249 = icmp sle i32 %247, %248
  br i1 %249, label %251, label %250

250:                                              ; preds = %246
  store i32 32, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %261

251:                                              ; preds = %246
  %252 = load i32, ptr %16, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %253
  %255 = load i8, ptr %254, align 1, !tbaa !12
  %256 = sext i8 %255 to i32
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %256)
  br label %258

258:                                              ; preds = %251
  %259 = load i32, ptr %16, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %16, align 4, !tbaa !5
  br label %246, !llvm.loop !21

261:                                              ; preds = %250
  %262 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  br label %263

263:                                              ; preds = %261, %242
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %264 = load i32, ptr %1, align 4
  ret i32 %264
}

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

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

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

declare i32 @puts(ptr noundef) #2

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

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

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

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


; 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 global i32, align 4
@m = external dso_local global i32, align 4
@e = external dso_local local_unnamed_addr global [501 x [501 x i32]], align 16
@f = external dso_local local_unnamed_addr global [501 x [501 x i32]], align 16
@s = external dso_local local_unnamed_addr global [501 x i8], align 16
@used = external dso_local local_unnamed_addr global [501 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z2okcc(i8 noundef signext, i8 noundef signext) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %4 = load i32, ptr @m, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %.preheader90

.preheader90:                                     ; preds = %.lr.ph, %0
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not98 = icmp slt i32 %6, 1
  br i1 %.not98, label %.critedge83, label %.preheader89.lr.ph

.preheader89.lr.ph:                               ; preds = %.preheader90
  %7 = add nsw i32 %6, -1
  %8 = add nuw i32 %6, 1
  %wide.trip.count137 = zext i32 %8 to i64
  %9 = zext nneg i32 %6 to i64
  %min.iters.check = icmp ult i32 %6, 8
  %n.vec = and i64 %9, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  %cmp.n = icmp eq i64 %n.vec, %9
  br label %.preheader89

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.06593 = phi i32 [ %17, %.lr.ph ], [ 0, %0 ]
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %12, i64 %14
  store i32 1, ptr %15, align 4, !tbaa !5
  %16 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %14, i64 %12
  store i32 1, ptr %16, align 4, !tbaa !5
  %17 = add nuw nsw i32 %.06593, 1
  %18 = load i32, ptr @m, align 4, !tbaa !5
  %19 = icmp slt i32 %17, %18
  br i1 %19, label %.lr.ph, label %.preheader90, !llvm.loop !9

.preheader89:                                     ; preds = %.preheader89.lr.ph, %34
  %indvars.iv134 = phi i64 [ 1, %.preheader89.lr.ph ], [ %indvars.iv.next135, %34 ]
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %middle.block, %.preheader89
  %indvars.iv.ph = phi i64 [ 1, %.preheader89 ], [ %ind.end, %middle.block ]
  %.06295.ph = phi i32 [ 0, %.preheader89 ], [ %25, %middle.block ]
  br label %scalar.ph

vector.body:                                      ; preds = %.preheader89, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader89 ]
  %vec.phi = phi <4 x i32> [ %22, %vector.body ], [ zeroinitializer, %.preheader89 ]
  %vec.phi188 = phi <4 x i32> [ %23, %vector.body ], [ zeroinitializer, %.preheader89 ]
  %offset.idx = or disjoint i64 %index, 1
  %20 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %indvars.iv134, i64 %offset.idx
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %wide.load = load <4 x i32>, ptr %20, align 4, !tbaa !5
  %wide.load189 = load <4 x i32>, ptr %21, align 4, !tbaa !5
  %22 = add <4 x i32> %wide.load, %vec.phi
  %23 = add <4 x i32> %wide.load189, %vec.phi188
  %index.next = add nuw i64 %index, 8
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %23, %22
  %25 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

.preheader87:                                     ; preds = %34
  br i1 %.not98, label %.critedge83, label %.lr.ph105.preheader

.lr.ph105.preheader:                              ; preds = %.preheader87
  %26 = add nuw i32 %6, 1
  %wide.trip.count142 = zext i32 %26 to i64
  br label %.lr.ph105

._crit_edge:                                      ; preds = %scalar.ph, %middle.block
  %.lcssa187 = phi i32 [ %25, %middle.block ], [ %30, %scalar.ph ]
  %27 = icmp eq i32 %.lcssa187, %7
  br i1 %27, label %31, label %34

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.06295 = phi i32 [ %30, %scalar.ph ], [ %.06295.ph, %scalar.ph.preheader ]
  %28 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %indvars.iv134, i64 %indvars.iv
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add nsw i32 %29, %.06295
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count137
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !14

31:                                               ; preds = %._crit_edge
  %32 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv134
  store i32 1, ptr %32, align 4, !tbaa !5
  %33 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv134
  store i8 98, ptr %33, align 1, !tbaa !15
  br label %34

34:                                               ; preds = %31, %._crit_edge
  %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1
  %exitcond138.not = icmp eq i64 %indvars.iv.next135, %wide.trip.count137
  br i1 %exitcond138.not, label %.preheader87, label %.preheader89, !llvm.loop !16

35:                                               ; preds = %.lr.ph105
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %exitcond143.not = icmp eq i64 %indvars.iv.next140, %wide.trip.count142
  br i1 %exitcond143.not, label %.loopexit, label %.lr.ph105, !llvm.loop !17

.lr.ph105:                                        ; preds = %.lr.ph105.preheader, %35
  %indvars.iv139 = phi i64 [ 1, %.lr.ph105.preheader ], [ %indvars.iv.next140, %35 ]
  %36 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv139
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %.not70 = icmp eq i32 %37, 0
  br i1 %.not70, label %.lr.ph109.preheader, label %35

.lr.ph109.preheader:                              ; preds = %.lr.ph105
  %38 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv139
  %39 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv139
  store i8 97, ptr %39, align 1, !tbaa !15
  store i32 1, ptr %38, align 4, !tbaa !5
  %40 = zext nneg i32 %6 to i64
  %xtraiter = and i64 %40, 1
  %41 = icmp eq i32 %8, 2
  br i1 %41, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph109.preheader.new

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

.lr.ph109:                                        ; preds = %58, %.lr.ph109.preheader.new
  %indvars.iv144 = phi i64 [ 1, %.lr.ph109.preheader.new ], [ %indvars.iv.next145.1, %58 ]
  %niter = phi i64 [ 0, %.lr.ph109.preheader.new ], [ %niter.next.1, %58 ]
  %42 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv144
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %.not80 = icmp eq i32 %43, 0
  br i1 %.not80, label %44, label %.lr.ph109.1

44:                                               ; preds = %.lr.ph109
  %45 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %indvars.iv139, i64 %indvars.iv144
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %48, label %.lr.ph109.1

48:                                               ; preds = %44
  store i32 1, ptr %42, align 4, !tbaa !5
  %49 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv144
  store i8 97, ptr %49, align 1, !tbaa !15
  br label %.lr.ph109.1

.lr.ph109.1:                                      ; preds = %.lr.ph109, %44, %48
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %50 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv.next145
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %.not80.1 = icmp eq i32 %51, 0
  br i1 %.not80.1, label %52, label %58

52:                                               ; preds = %.lr.ph109.1
  %53 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %indvars.iv139, i64 %indvars.iv.next145
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp eq i32 %54, 1
  br i1 %55, label %56, label %58

56:                                               ; preds = %52
  store i32 1, ptr %50, align 4, !tbaa !5
  %57 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv.next145
  store i8 97, ptr %57, align 1, !tbaa !15
  br label %58

58:                                               ; preds = %56, %52, %.lr.ph109.1
  %indvars.iv.next145.1 = add nuw nsw i64 %indvars.iv144, 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 %.loopexit.loopexit.unr-lcssa, label %.lr.ph109, !llvm.loop !18

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

.lr.ph109.epil:                                   ; preds = %.loopexit.loopexit.unr-lcssa
  %59 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv144.unr
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %.not80.epil = icmp eq i32 %60, 0
  br i1 %.not80.epil, label %61, label %.loopexit

61:                                               ; preds = %.lr.ph109.epil
  %62 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %indvars.iv139, i64 %indvars.iv144.unr
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 1
  br i1 %64, label %65, label %.loopexit

65:                                               ; preds = %61
  store i32 1, ptr %59, align 4, !tbaa !5
  %66 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv144.unr
  store i8 97, ptr %66, align 1, !tbaa !15
  br label %.loopexit

.loopexit:                                        ; preds = %35, %.loopexit.loopexit.unr-lcssa, %65, %61, %.lr.ph109.epil
  br i1 %.not98, label %.critedge83, label %.lr.ph113.preheader

.lr.ph113.preheader:                              ; preds = %.loopexit
  %67 = zext nneg i32 %6 to i64
  %xtraiter198 = and i64 %67, 1
  %68 = icmp eq i32 %6, 1
  br i1 %68, label %.preheader86.unr-lcssa, label %.lr.ph113.preheader.new

.lr.ph113.preheader.new:                          ; preds = %.lr.ph113.preheader
  %unroll_iter200 = and i64 %67, 2147483646
  br label %.lr.ph113

.preheader86.unr-lcssa:                           ; preds = %81, %.lr.ph113.preheader
  %indvars.iv149.unr = phi i64 [ 1, %.lr.ph113.preheader ], [ %indvars.iv.next150.1, %81 ]
  %lcmp.mod199.not = icmp eq i64 %xtraiter198, 0
  br i1 %lcmp.mod199.not, label %.preheader86, label %.lr.ph113.epil

.lr.ph113.epil:                                   ; preds = %.preheader86.unr-lcssa
  %69 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv149.unr
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %.not79.epil = icmp eq i32 %70, 0
  br i1 %.not79.epil, label %71, label %.preheader86

71:                                               ; preds = %.lr.ph113.epil
  %72 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv149.unr
  store i8 99, ptr %72, align 1, !tbaa !15
  store i32 1, ptr %69, align 4, !tbaa !5
  br label %.preheader86

.preheader86:                                     ; preds = %.lr.ph113.epil, %71, %.preheader86.unr-lcssa
  br i1 %.not98, label %.critedge83, label %.preheader85

.lr.ph113:                                        ; preds = %81, %.lr.ph113.preheader.new
  %indvars.iv149 = phi i64 [ 1, %.lr.ph113.preheader.new ], [ %indvars.iv.next150.1, %81 ]
  %niter201 = phi i64 [ 0, %.lr.ph113.preheader.new ], [ %niter201.next.1, %81 ]
  %73 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv149
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %.not79 = icmp eq i32 %74, 0
  br i1 %.not79, label %75, label %.lr.ph113.1

75:                                               ; preds = %.lr.ph113
  %76 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv149
  store i8 99, ptr %76, align 1, !tbaa !15
  store i32 1, ptr %73, align 4, !tbaa !5
  br label %.lr.ph113.1

.lr.ph113.1:                                      ; preds = %.lr.ph113, %75
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 1
  %77 = getelementptr inbounds [501 x i32], ptr @used, i64 0, i64 %indvars.iv.next150
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %.not79.1 = icmp eq i32 %78, 0
  br i1 %.not79.1, label %79, label %81

79:                                               ; preds = %.lr.ph113.1
  %80 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv.next150
  store i8 99, ptr %80, align 1, !tbaa !15
  store i32 1, ptr %77, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %79, %.lr.ph113.1
  %indvars.iv.next150.1 = add nuw nsw i64 %indvars.iv149, 2
  %niter201.next.1 = add i64 %niter201, 2
  %niter201.ncmp.1 = icmp eq i64 %niter201.next.1, %unroll_iter200
  br i1 %niter201.ncmp.1, label %.preheader86.unr-lcssa, label %.lr.ph113, !llvm.loop !19

.preheader85:                                     ; preds = %.preheader86, %._crit_edge117
  %82 = phi i32 [ %85, %._crit_edge117 ], [ %6, %.preheader86 ]
  %indvars.iv157 = phi i64 [ %indvars.iv.next158, %._crit_edge117 ], [ 1, %.preheader86 ]
  %.not78114 = icmp slt i32 %82, 1
  br i1 %.not78114, label %.preheader85.._crit_edge117_crit_edge, label %.lr.ph116

.preheader85.._crit_edge117_crit_edge:            ; preds = %.preheader85
  %.pre = sext i32 %82 to i64
  br label %._crit_edge117

.lr.ph116:                                        ; preds = %.preheader85
  %83 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv157
  br label %86

.preheader84:                                     ; preds = %._crit_edge117
  %.not74123 = icmp slt i32 %85, 1
  br i1 %.not74123, label %.critedge83, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader84
  %84 = add nuw i32 %85, 1
  %wide.trip.count168 = zext i32 %84 to i64
  br label %.preheader

._crit_edge117:                                   ; preds = %95, %.preheader85.._crit_edge117_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader85.._crit_edge117_crit_edge ], [ %97, %95 ]
  %85 = phi i32 [ %82, %.preheader85.._crit_edge117_crit_edge ], [ %96, %95 ]
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %.not73.not = icmp slt i64 %indvars.iv157, %.pre-phi
  br i1 %.not73.not, label %.preheader85, label %.preheader84, !llvm.loop !20

86:                                               ; preds = %.lr.ph116, %95
  %indvars.iv154 = phi i64 [ 1, %.lr.ph116 ], [ %indvars.iv.next155, %95 ]
  %87 = icmp eq i64 %indvars.iv157, %indvars.iv154
  br i1 %87, label %95, label %88

88:                                               ; preds = %86
  %89 = load i8, ptr %83, align 1, !tbaa !15
  %90 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv154
  %91 = load i8, ptr %90, align 1, !tbaa !15
  %92 = call noundef zeroext i1 @_Z2okcc(i8 noundef signext %89, i8 noundef signext %91)
  br i1 %92, label %93, label %95

93:                                               ; preds = %88
  %94 = getelementptr inbounds [501 x [501 x i32]], ptr @f, i64 0, i64 %indvars.iv157, i64 %indvars.iv154
  store i32 1, ptr %94, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %88, %93, %86
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %.not78.not = icmp slt i64 %indvars.iv154, %97
  br i1 %.not78.not, label %86, label %._crit_edge117, !llvm.loop !22

.preheader:                                       ; preds = %.preheader.preheader, %..critedge_crit_edge
  %indvars.iv165 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next166, %..critedge_crit_edge ]
  br label %99

98:                                               ; preds = %99
  %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1
  %exitcond164.not = icmp eq i64 %indvars.iv.next161, %wide.trip.count168
  br i1 %exitcond164.not, label %..critedge_crit_edge, label %99, !llvm.loop !23

99:                                               ; preds = %.preheader, %98
  %indvars.iv160 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next161, %98 ]
  %100 = getelementptr inbounds [501 x [501 x i32]], ptr @e, i64 0, i64 %indvars.iv165, i64 %indvars.iv160
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = getelementptr inbounds [501 x [501 x i32]], ptr @f, i64 0, i64 %indvars.iv165, i64 %indvars.iv160
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %.not76 = icmp eq i32 %101, %103
  br i1 %.not76, label %98, label %._crit_edge128

..critedge_crit_edge:                             ; preds = %98
  %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1
  %exitcond169.not = icmp eq i64 %indvars.iv.next166, %wide.trip.count168
  br i1 %exitcond169.not, label %.critedge83, label %.preheader, !llvm.loop !24

.critedge83:                                      ; preds = %..critedge_crit_edge, %.preheader90, %.preheader87, %.loopexit, %.preheader86, %.preheader84
  %104 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  %105 = load i32, ptr @n, align 4, !tbaa !5
  %.not77125 = icmp slt i32 %105, 1
  br i1 %.not77125, label %._crit_edge128, label %.lr.ph127

.lr.ph127:                                        ; preds = %.critedge83, %.lr.ph127
  %indvars.iv170 = phi i64 [ %indvars.iv.next171, %.lr.ph127 ], [ 1, %.critedge83 ]
  %106 = getelementptr inbounds [501 x i8], ptr @s, i64 0, i64 %indvars.iv170
  %107 = load i8, ptr %106, align 1, !tbaa !15
  %108 = sext i8 %107 to i32
  %109 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %108)
  %indvars.iv.next171 = add nuw nsw i64 %indvars.iv170, 1
  %110 = load i32, ptr @n, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %.not77.not = icmp slt i64 %indvars.iv170, %111
  br i1 %.not77.not, label %.lr.ph127, label %._crit_edge128, !llvm.loop !25

._crit_edge128:                                   ; preds = %99, %.lr.ph127, %.critedge83
  %.str.1.sink = phi ptr [ @.str.4, %.critedge83 ], [ @.str.4, %.lr.ph127 ], [ @.str.1, %99 ]
  %112 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1.sink)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0
}

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

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !13, !12}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10, !21}
!21 = !{!"llvm.loop.unswitch.partial.disable"}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}


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