; LLVM IR from tangjz/acm-icpc :: TDL_training/2015-12-02 (C - Wow! Such City! - 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
@m = external dso_local global i32, align 4
@u = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@s = external dso_local global [1009 x i32], align 16
@c = external dso_local global [1009 x [1009 x i32]], align 16
@x = external dso_local global [1000009 x i64], align 16
@y = external dso_local global [1000009 x i64], align 16
@l = external dso_local global i32, align 4
@r = external dso_local global i32, align 4
@q = external dso_local global [10000009 x i32], align 16
@inq = external dso_local global [1009 x i8], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

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

12:                                               ; preds = %246, %0
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @x, ptr noundef getelementptr inbounds (i64, ptr @x, i64 1), ptr noundef @y, ptr noundef getelementptr inbounds (i64, ptr @y, i64 1))
  %14 = icmp eq i32 %13, 6
  br i1 %14, label %15, label %249

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

16:                                               ; preds = %86, %15
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = mul nsw i32 %18, %19
  %21 = icmp slt i32 %17, %20
  br i1 %21, label %23, label %22

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

23:                                               ; preds = %16
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = sub nsw i32 %24, 1
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = mul i64 %28, 23456
  %30 = add i64 12345, %29
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sub nsw i32 %31, 2
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = mul i64 %35, 34567
  %37 = add i64 %30, %36
  %38 = load i32, ptr %2, align 4, !tbaa !5
  %39 = sub nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %40
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 2
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !9
  %48 = mul i64 %42, %47
  %49 = mul i64 %48, 45678
  %50 = add i64 %37, %49
  %51 = urem i64 %50, 5837501
  %52 = load i32, ptr %2, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %53
  store i64 %51, ptr %54, align 8, !tbaa !9
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = sub nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %57
  %59 = load i64, ptr %58, align 8, !tbaa !9
  %60 = mul i64 %59, 67890
  %61 = add i64 56789, %60
  %62 = load i32, ptr %2, align 4, !tbaa !5
  %63 = sub nsw i32 %62, 2
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = mul i64 %66, 78901
  %68 = add i64 %61, %67
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %71
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = load i32, ptr %2, align 4, !tbaa !5
  %75 = sub nsw i32 %74, 2
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %76
  %78 = load i64, ptr %77, align 8, !tbaa !9
  %79 = mul i64 %73, %78
  %80 = mul i64 %79, 89012
  %81 = add i64 %68, %80
  %82 = urem i64 %81, 9860381
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %84
  store i64 %82, ptr %85, align 8, !tbaa !9
  br label %86

86:                                               ; preds = %23
  %87 = load i32, ptr %2, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !11

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

90:                                               ; preds = %135, %89
  %91 = load i32, ptr %3, align 4, !tbaa !5
  %92 = load i32, ptr @n, align 4, !tbaa !5
  %93 = icmp slt i32 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 7, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %138

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

96:                                               ; preds = %131, %95
  %97 = load i32, ptr %5, align 4, !tbaa !5
  %98 = load i32, ptr @n, align 4, !tbaa !5
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  store i32 10, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %134

101:                                              ; preds = %96
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = load i32, ptr %5, align 4, !tbaa !5
  %104 = icmp ne i32 %102, %103
  br i1 %104, label %105, label %130

105:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %106 = load i32, ptr %3, align 4, !tbaa !5
  %107 = load i32, ptr @n, align 4, !tbaa !5
  %108 = mul nsw i32 %106, %107
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = add nsw i32 %108, %109
  store i32 %110, ptr %6, align 4, !tbaa !5
  %111 = load i32, ptr %6, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %112
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = mul i64 %114, 90123
  %116 = load i32, ptr %6, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %117
  %119 = load i64, ptr %118, align 8, !tbaa !9
  %120 = add i64 %115, %119
  %121 = urem i64 %120, 8475871
  %122 = add i64 %121, 1
  %123 = trunc i64 %122 to i32
  %124 = load i32, ptr %3, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1009 x [1009 x i32]], ptr @c, i64 0, i64 %125
  %127 = load i32, ptr %5, align 4, !tbaa !5
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [1009 x i32], ptr %126, i64 0, i64 %128
  store i32 %123, ptr %129, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %130

130:                                              ; preds = %105, %101
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %5, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %5, align 4, !tbaa !5
  br label %96, !llvm.loop !13

134:                                              ; preds = %100
  br label %135

135:                                              ; preds = %134
  %136 = load i32, ptr %3, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %3, align 4, !tbaa !5
  br label %90, !llvm.loop !14

138:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %139 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %139, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1073741823, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %149, %138
  %141 = load i32, ptr %9, align 4, !tbaa !5
  %142 = load i32, ptr @n, align 4, !tbaa !5
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %145, label %144

144:                                              ; preds = %140
  store i32 13, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %152

145:                                              ; preds = %140
  %146 = load i32, ptr %9, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %147
  store i32 1073741823, ptr %148, align 4, !tbaa !5
  br label %149

149:                                              ; preds = %145
  %150 = load i32, ptr %9, align 4, !tbaa !5
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %9, align 4, !tbaa !5
  br label %140, !llvm.loop !15

152:                                              ; preds = %144
  store i32 0, ptr @r, align 4, !tbaa !5
  %153 = load i32, ptr @r, align 4, !tbaa !5
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr @r, align 4, !tbaa !5
  %155 = sext i32 %153 to i64
  %156 = getelementptr inbounds [10000009 x i32], ptr @q, i64 0, i64 %155
  store i32 0, ptr %156, align 4, !tbaa !5
  store i8 1, ptr @inq, align 16, !tbaa !16
  store i32 0, ptr @l, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %225, %152
  %158 = load i32, ptr @l, align 4, !tbaa !5
  %159 = load i32, ptr @r, align 4, !tbaa !5
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %161, label %228

161:                                              ; preds = %157
  %162 = load i32, ptr @l, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [10000009 x i32], ptr @q, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !5
  store i32 %165, ptr @u, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [1009 x i8], ptr @inq, i64 0, i64 %166
  store i8 0, ptr %167, align 1, !tbaa !16
  store i32 1, ptr @v, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %221, %161
  %169 = load i32, ptr @v, align 4, !tbaa !5
  %170 = load i32, ptr @n, align 4, !tbaa !5
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %172, label %224

172:                                              ; preds = %168
  %173 = load i32, ptr @v, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %174
  %176 = load i32, ptr %175, align 4, !tbaa !5
  %177 = load i32, ptr @u, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = load i32, ptr @u, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [1009 x [1009 x i32]], ptr @c, i64 0, i64 %182
  %184 = load i32, ptr @v, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [1009 x i32], ptr %183, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = add nsw i32 %180, %187
  %189 = icmp sgt i32 %176, %188
  br i1 %189, label %190, label %220

190:                                              ; preds = %172
  %191 = load i32, ptr @u, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = load i32, ptr @u, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [1009 x [1009 x i32]], ptr @c, i64 0, i64 %196
  %198 = load i32, ptr @v, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [1009 x i32], ptr %197, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = add nsw i32 %194, %201
  %203 = load i32, ptr @v, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %204
  store i32 %202, ptr %205, align 4, !tbaa !5
  %206 = load i32, ptr @v, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [1009 x i8], ptr @inq, i64 0, i64 %207
  %209 = load i8, ptr %208, align 1, !tbaa !16, !range !18, !noundef !19
  %210 = trunc i8 %209 to i1
  br i1 %210, label %219, label %211

211:                                              ; preds = %190
  %212 = load i32, ptr @v, align 4, !tbaa !5
  %213 = load i32, ptr @r, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr @r, align 4, !tbaa !5
  %215 = sext i32 %213 to i64
  %216 = getelementptr inbounds [10000009 x i32], ptr @q, i64 0, i64 %215
  store i32 %212, ptr %216, align 4, !tbaa !5
  %217 = sext i32 %212 to i64
  %218 = getelementptr inbounds [1009 x i8], ptr @inq, i64 0, i64 %217
  store i8 1, ptr %218, align 1, !tbaa !16
  br label %219

219:                                              ; preds = %211, %190
  br label %220

220:                                              ; preds = %219, %172
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr @v, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr @v, align 4, !tbaa !5
  br label %168, !llvm.loop !20

224:                                              ; preds = %168
  br label %225

225:                                              ; preds = %224
  %226 = load i32, ptr @l, align 4, !tbaa !5
  %227 = add nsw i32 %226, 1
  store i32 %227, ptr @l, align 4, !tbaa !5
  br label %157, !llvm.loop !21

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

229:                                              ; preds = %243, %228
  %230 = load i32, ptr %10, align 4, !tbaa !5
  %231 = load i32, ptr @n, align 4, !tbaa !5
  %232 = icmp slt i32 %230, %231
  br i1 %232, label %234, label %233

233:                                              ; preds = %229
  store i32 22, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %246

234:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %235 = load i32, ptr %10, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %236
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = load i32, ptr @m, align 4, !tbaa !5
  %240 = srem i32 %238, %239
  store i32 %240, ptr %11, align 4, !tbaa !5
  %241 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %242 = load i32, ptr %241, align 4, !tbaa !5
  store i32 %242, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %243

243:                                              ; preds = %234
  %244 = load i32, ptr %10, align 4, !tbaa !5
  %245 = add nsw i32 %244, 1
  store i32 %245, ptr %10, align 4, !tbaa !5
  br label %229, !llvm.loop !22

246:                                              ; preds = %233
  %247 = load i32, ptr %7, align 4, !tbaa !5
  %248 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %247)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %12, !llvm.loop !23

249:                                              ; preds = %12
  ret i32 0
}

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

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

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

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

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

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


; 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
@u = external dso_local local_unnamed_addr global i32, align 4
@v = external dso_local local_unnamed_addr global i32, align 4
@s = external dso_local local_unnamed_addr global [1009 x i32], align 16
@c = external dso_local local_unnamed_addr global [1009 x [1009 x i32]], align 16
@x = external dso_local global [1000009 x i64], align 16
@y = external dso_local global [1000009 x i64], align 16
@l = external dso_local local_unnamed_addr global i32, align 4
@r = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local local_unnamed_addr global [10000009 x i32], align 16
@inq = external dso_local local_unnamed_addr global [1009 x i8], align 16
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %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, ptr noundef nonnull @x, ptr noundef nonnull getelementptr inbounds (i8, ptr @x, i64 8), ptr noundef nonnull @y, ptr noundef nonnull getelementptr inbounds (i8, ptr @y, i64 8))
  %4 = icmp eq i32 %3, 6
  br i1 %4, label %.preheader43, label %._crit_edge72

.preheader43:                                     ; preds = %0, %._crit_edge71
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %6 = mul nsw i32 %5, %5
  %7 = icmp ugt i32 %6, 2
  br i1 %7, label %.lr.ph.preheader, label %.preheader42

.lr.ph.preheader:                                 ; preds = %.preheader43
  %wide.trip.count = zext nneg i32 %6 to i64
  %.pre = load i64, ptr getelementptr inbounds (i8, ptr @x, i64 8), align 8, !tbaa !9
  %.pre104 = load i64, ptr getelementptr inbounds (i8, ptr @y, i64 8), align 8, !tbaa !9
  br label %.lr.ph

.preheader42:                                     ; preds = %.lr.ph, %.preheader43
  %8 = icmp sgt i32 %5, 0
  br i1 %8, label %.preheader.us.preheader, label %._crit_edge48.split.us.thread

._crit_edge48.split.us.thread:                    ; preds = %.preheader42
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %9 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %9, ptr %1, align 4, !tbaa !5
  br label %.lr.ph64.thread

.preheader.us.preheader:                          ; preds = %.preheader42
  %10 = zext nneg i32 %5 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %indvars.iv83 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next84, %._crit_edge.us ]
  %11 = mul nuw nsw i64 %indvars.iv83, %10
  br label %12

12:                                               ; preds = %.preheader.us, %25
  %indvars.iv78 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next79, %25 ]
  %.not.us = icmp eq i64 %indvars.iv83, %indvars.iv78
  br i1 %.not.us, label %25, label %13

13:                                               ; preds = %12
  %14 = add nuw nsw i64 %indvars.iv78, %11
  %15 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %14
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = mul i64 %16, 90123
  %18 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %14
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = add i64 %17, %19
  %21 = urem i64 %20, 8475871
  %22 = trunc nuw nsw i64 %21 to i32
  %23 = add nuw nsw i32 %22, 1
  %24 = getelementptr inbounds [1009 x [1009 x i32]], ptr @c, i64 0, i64 %indvars.iv83, i64 %indvars.iv78
  store i32 %23, ptr %24, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %13, %12
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %10
  br i1 %exitcond82.not, label %._crit_edge.us, label %12, !llvm.loop !11

._crit_edge.us:                                   ; preds = %25
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %10
  br i1 %exitcond87.not, label %._crit_edge48.split.us, label %.preheader.us, !llvm.loop !13

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %26 = phi i64 [ %.pre104, %.lr.ph.preheader ], [ %43, %.lr.ph ]
  %27 = phi i64 [ %.pre, %.lr.ph.preheader ], [ %35, %.lr.ph ]
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %28 = mul i64 %27, 23456
  %29 = add nsw i64 %indvars.iv, -2
  %30 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %29
  %31 = load i64, ptr %30, align 8, !tbaa !9
  %32 = mul i64 %27, 45678
  %reass.add = add i64 %32, 34567
  %reass.mul = mul i64 %reass.add, %31
  %33 = add i64 %28, 12345
  %34 = add i64 %33, %reass.mul
  %35 = urem i64 %34, 5837501
  %36 = getelementptr inbounds [1000009 x i64], ptr @x, i64 0, i64 %indvars.iv
  store i64 %35, ptr %36, align 8, !tbaa !9
  %37 = mul i64 %26, 67890
  %38 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %29
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = mul i64 %26, 89012
  %reass.add39 = add i64 %40, 78901
  %reass.mul40 = mul i64 %reass.add39, %39
  %41 = add i64 %37, 56789
  %42 = add i64 %41, %reass.mul40
  %43 = urem i64 %42, 9860381
  %44 = getelementptr inbounds [1000009 x i64], ptr @y, i64 0, i64 %indvars.iv
  store i64 %43, ptr %44, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader42, label %.lr.ph, !llvm.loop !14

._crit_edge48.split.us:                           ; preds = %._crit_edge.us
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %45 = load i32, ptr @m, align 4, !tbaa !5
  store i32 %45, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 1
  br i1 %.not, label %.lr.ph64.thread, label %.lr.ph50.preheader

.lr.ph50.preheader:                               ; preds = %._crit_edge48.split.us
  %wide.trip.count91 = zext nneg i32 %5 to i64
  %46 = add nsw i64 %10, -1
  %min.iters.check = icmp ult i32 %5, 9
  br i1 %min.iters.check, label %.lr.ph50.preheader111, label %vector.ph

.lr.ph50.preheader111:                            ; preds = %middle.block, %.lr.ph50.preheader
  %indvars.iv88.ph = phi i64 [ 1, %.lr.ph50.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph50

vector.ph:                                        ; preds = %.lr.ph50.preheader
  %n.vec = and i64 %46, -8
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %47 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %offset.idx
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  store <4 x i32> <i32 1073741823, i32 1073741823, i32 1073741823, i32 1073741823>, ptr %47, align 4, !tbaa !5
  store <4 x i32> <i32 1073741823, i32 1073741823, i32 1073741823, i32 1073741823>, ptr %48, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %49 = icmp eq i64 %index.next, %n.vec
  br i1 %49, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %46, %n.vec
  br i1 %cmp.n, label %.lr.ph64, label %.lr.ph50.preheader111

.lr.ph64.thread:                                  ; preds = %._crit_edge48.split.us.thread, %._crit_edge48.split.us
  %.ph105 = phi i32 [ %45, %._crit_edge48.split.us ], [ %9, %._crit_edge48.split.us.thread ]
  store i32 1, ptr @r, align 4, !tbaa !5
  store i32 0, ptr @q, align 16, !tbaa !5
  br label %.preheader41.thread

.lr.ph64:                                         ; preds = %.lr.ph50, %middle.block
  store i32 1, ptr @r, align 4, !tbaa !5
  store i32 0, ptr @q, align 16, !tbaa !5
  store i8 1, ptr @inq, align 16, !tbaa !18
  br i1 %.not, label %.preheader41.thread, label %.lr.ph53.us.preheader

.preheader41.thread:                              ; preds = %.lr.ph64, %.lr.ph64.thread
  %50 = phi i32 [ %.ph105, %.lr.ph64.thread ], [ %45, %.lr.ph64 ]
  store i8 0, ptr @inq, align 16, !tbaa !18
  store i32 0, ptr @u, align 4, !tbaa !5
  store i32 1, ptr @v, align 4, !tbaa !5
  store i32 1, ptr @l, align 4, !tbaa !5
  br label %._crit_edge71

.lr.ph53.us.preheader:                            ; preds = %.lr.ph64
  %wide.trip.count96 = zext nneg i32 %5 to i64
  br label %.lr.ph53.us

.lr.ph53.us:                                      ; preds = %.lr.ph53.us.preheader, %._crit_edge54.us
  %indvars.iv98 = phi i64 [ 0, %.lr.ph53.us.preheader ], [ %indvars.iv.next99, %._crit_edge54.us ]
  %r.promoted6061.us = phi i32 [ 1, %.lr.ph53.us.preheader ], [ %r.promoted58.us, %._crit_edge54.us ]
  %51 = getelementptr inbounds [10000009 x i32], ptr @q, i64 0, i64 %indvars.iv98
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1009 x i8], ptr @inq, i64 0, i64 %53
  store i8 0, ptr %54, align 1, !tbaa !18
  %55 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %53
  br label %56

56:                                               ; preds = %.lr.ph53.us, %74
  %indvars.iv93 = phi i64 [ 1, %.lr.ph53.us ], [ %indvars.iv.next94, %74 ]
  %r.promoted59.us = phi i32 [ %r.promoted6061.us, %.lr.ph53.us ], [ %r.promoted58.us, %74 ]
  %57 = phi i32 [ %r.promoted6061.us, %.lr.ph53.us ], [ %75, %74 ]
  %58 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %indvars.iv93
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr %55, align 4, !tbaa !5
  %61 = getelementptr inbounds [1009 x [1009 x i32]], ptr @c, i64 0, i64 %53, i64 %indvars.iv93
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = add nsw i32 %62, %60
  %64 = icmp sgt i32 %59, %63
  br i1 %64, label %65, label %74

65:                                               ; preds = %56
  store i32 %63, ptr %58, align 4, !tbaa !5
  %66 = getelementptr inbounds [1009 x i8], ptr @inq, i64 0, i64 %indvars.iv93
  %67 = load i8, ptr %66, align 1, !tbaa !18, !range !20, !noundef !21
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %74, label %69

69:                                               ; preds = %65
  %70 = add nsw i32 %57, 1
  store i32 %70, ptr @r, align 4, !tbaa !5
  %71 = sext i32 %57 to i64
  %72 = getelementptr inbounds [10000009 x i32], ptr @q, i64 0, i64 %71
  %73 = trunc nuw nsw i64 %indvars.iv93 to i32
  store i32 %73, ptr %72, align 4, !tbaa !5
  store i8 1, ptr %66, align 1, !tbaa !18
  br label %74

74:                                               ; preds = %69, %65, %56
  %r.promoted58.us = phi i32 [ %r.promoted59.us, %56 ], [ %70, %69 ], [ %r.promoted59.us, %65 ]
  %75 = phi i32 [ %57, %56 ], [ %70, %69 ], [ %57, %65 ]
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96
  br i1 %exitcond97.not, label %._crit_edge54.us, label %56, !llvm.loop !22

._crit_edge54.us:                                 ; preds = %74
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %76 = sext i32 %r.promoted58.us to i64
  %77 = icmp slt i64 %indvars.iv.next99, %76
  br i1 %77, label %.lr.ph53.us, label %.preheader41, !llvm.loop !23

.lr.ph50:                                         ; preds = %.lr.ph50.preheader111, %.lr.ph50
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph50 ], [ %indvars.iv88.ph, %.lr.ph50.preheader111 ]
  %78 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %indvars.iv88
  store i32 1073741823, ptr %78, align 4, !tbaa !5
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %.lr.ph64, label %.lr.ph50, !llvm.loop !24

.preheader41:                                     ; preds = %._crit_edge54.us
  %79 = trunc nuw nsw i64 %indvars.iv.next99 to i32
  store i32 %52, ptr @u, align 4, !tbaa !5
  store i32 %5, ptr @v, align 4, !tbaa !5
  store i32 %79, ptr @l, align 4, !tbaa !5
  br i1 %.not, label %._crit_edge71, label %.lr.ph70

._crit_edge71:                                    ; preds = %.lr.ph70, %.preheader41.thread, %.preheader41
  %80 = phi i32 [ %45, %.preheader41 ], [ %50, %.preheader41.thread ], [ %89, %.lr.ph70 ]
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %80)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %82 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @x, ptr noundef nonnull getelementptr inbounds (i8, ptr @x, i64 8), ptr noundef nonnull @y, ptr noundef nonnull getelementptr inbounds (i8, ptr @y, i64 8))
  %83 = icmp eq i32 %82, 6
  br i1 %83, label %.preheader43, label %._crit_edge72, !llvm.loop !25

.lr.ph70:                                         ; preds = %.preheader41, %.lr.ph70
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %.lr.ph70 ], [ 1, %.preheader41 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  %84 = getelementptr inbounds [1009 x i32], ptr @s, i64 0, i64 %indvars.iv101
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = load i32, ptr @m, align 4, !tbaa !5
  %87 = srem i32 %85, %86
  store i32 %87, ptr %2, align 4, !tbaa !5
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  store i32 %89, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %90 = load i32, ptr @n, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = icmp slt i64 %indvars.iv.next102, %91
  br i1 %92, label %.lr.ph70, label %._crit_edge71, !llvm.loop !26

._crit_edge72:                                    ; preds = %._crit_edge71, %0
  ret i32 0
}

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

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

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

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

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

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


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