; LLVM IR from tangjz/acm-icpc :: lydsy/1021.ll (Z4initv)

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

@tot = external dso_local global i32, align 4
@p = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@c = external dso_local global [5 x [7 x i32]], align 16
@f = external dso_local global [2 x [201 x [201 x i32]]], align 16
@cur = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL1w = external hidden constant [7 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL3com = external hidden constant [7 x i32], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4initv() #0 {
  %1 = alloca [3 x i32], align 4
  %2 = alloca [3 x 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
  call void @llvm.lifetime.start.p0(i64 12, ptr %1) #6
  call void @llvm.memset.p0.i64(ptr align 4 %1, i8 0, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %2) #6
  %16 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %17 = getelementptr inbounds i32, ptr %16, i64 0
  %18 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %19 = getelementptr inbounds i32, ptr %18, i64 1
  %20 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %21 = getelementptr inbounds i32, ptr %20, i64 2
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %17, ptr noundef %19, ptr noundef %21)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %78, %0
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 3
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %81

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

28:                                               ; preds = %74, %27
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = icmp sge i32 %29, 0
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %28
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [5 x [7 x i32]], ptr @c, i64 0, i64 %34
  %36 = getelementptr inbounds [7 x i32], ptr %35, i64 0, i64 0
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds i32, ptr %36, i64 %38
  %40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %39)
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [5 x [7 x i32]], ptr @c, i64 0, i64 %42
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [7 x i32], ptr %43, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = load i32, ptr %5, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [7 x i32], ptr getelementptr inbounds ([5 x [7 x i32]], ptr @c, i64 0, i64 3), i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = add nsw i32 %51, %47
  store i32 %52, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [5 x [7 x i32]], ptr @c, i64 0, i64 %54
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [7 x i32], ptr %55, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [7 x i32], ptr @_ZL1w, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = mul nsw i32 %59, %63
  store i32 %64, ptr %6, align 4, !tbaa !5
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = load i32, ptr @tot, align 4, !tbaa !5
  %67 = add nsw i32 %66, %65
  store i32 %67, ptr @tot, align 4, !tbaa !5
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [3 x i32], ptr %1, i64 0, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, %68
  store i32 %73, ptr %71, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %74

74:                                               ; preds = %32
  %75 = load i32, ptr %5, align 4, !tbaa !5
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr %5, align 4, !tbaa !5
  br label %28, !llvm.loop !9

77:                                               ; preds = %31
  br label %78

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

81:                                               ; preds = %26
  %82 = getelementptr inbounds [3 x i32], ptr %1, i64 0, i64 0
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sub nsw i32 %83, %85
  %87 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 2
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %86, %88
  store i32 %89, ptr @p, align 4, !tbaa !5
  %90 = getelementptr inbounds [3 x i32], ptr %1, i64 0, i64 1
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 1
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = sub nsw i32 %91, %93
  %95 = getelementptr inbounds [3 x i32], ptr %2, i64 0, i64 0
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = add nsw i32 %94, %96
  store i32 %97, ptr @q, align 4, !tbaa !5
  %98 = load i32, ptr @p, align 4, !tbaa !5
  %99 = icmp slt i32 %98, 0
  br i1 %99, label %103, label %100

100:                                              ; preds = %81
  %101 = load i32, ptr @q, align 4, !tbaa !5
  %102 = icmp slt i32 %101, 0
  br i1 %102, label %103, label %105

103:                                              ; preds = %100, %81
  %104 = call i32 @puts(ptr noundef @.str.2)
  call void @exit(i32 noundef 0) #7
  unreachable

105:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %106 = load i32, ptr getelementptr inbounds ([7 x i32], ptr @_ZL3com, i64 0, i64 1), align 4, !tbaa !5
  %107 = load i32, ptr @_ZL3com, align 16, !tbaa !5
  %108 = sdiv i32 %106, %107
  store i32 %108, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %109 = load i32, ptr @p, align 4, !tbaa !5
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = srem i32 %109, %110
  store i32 %111, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %112 = load i32, ptr @q, align 4, !tbaa !5
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = srem i32 %112, %113
  store i32 %114, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %115 = load i32, ptr @tot, align 4, !tbaa !5
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = sub nsw i32 %115, %116
  %118 = load i32, ptr %9, align 4, !tbaa !5
  %119 = sub nsw i32 %117, %118
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = sdiv i32 %119, %120
  store i32 %121, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %141, %105
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = icmp sle i32 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %144

127:                                              ; preds = %122
  %128 = load i32, ptr @cur, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %129
  %131 = load i32, ptr %11, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [201 x [201 x i32]], ptr %130, i64 0, i64 %132
  %134 = getelementptr inbounds [201 x i32], ptr %133, i64 0, i64 0
  %135 = load i32, ptr %10, align 4, !tbaa !5
  %136 = load i32, ptr %11, align 4, !tbaa !5
  %137 = sub nsw i32 %135, %136
  %138 = add nsw i32 %137, 1
  %139 = sext i32 %138 to i64
  %140 = mul i64 %139, 4
  call void @llvm.memset.p0.i64(ptr align 4 %134, i8 63, i64 %140, i1 false)
  br label %141

141:                                              ; preds = %127
  %142 = load i32, ptr %11, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %11, align 4, !tbaa !5
  br label %122, !llvm.loop !12

144:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %232, %144
  %146 = load i32, ptr %12, align 4, !tbaa !5
  %147 = load i32, ptr getelementptr inbounds ([5 x [7 x i32]], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %148 = icmp sle i32 %146, %147
  br i1 %148, label %150, label %149

149:                                              ; preds = %145
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %235

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

151:                                              ; preds = %228, %150
  %152 = load i32, ptr %12, align 4, !tbaa !5
  %153 = load i32, ptr %13, align 4, !tbaa !5
  %154 = add nsw i32 %152, %153
  %155 = load i32, ptr getelementptr inbounds ([5 x [7 x i32]], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %156 = icmp sle i32 %154, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %151
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %231

158:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %159 = getelementptr inbounds [3 x i32], ptr %1, i64 0, i64 0
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = load i32, ptr %12, align 4, !tbaa !5
  %162 = add nsw i32 %160, %161
  %163 = load i32, ptr @c, align 16, !tbaa !5
  %164 = sub nsw i32 %162, %163
  store i32 %164, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %165 = getelementptr inbounds [3 x i32], ptr %1, i64 0, i64 1
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = load i32, ptr %13, align 4, !tbaa !5
  %168 = add nsw i32 %166, %167
  %169 = load i32, ptr getelementptr inbounds ([5 x [7 x i32]], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %170 = sub nsw i32 %168, %169
  store i32 %170, ptr %15, align 4, !tbaa !5
  %171 = load i32, ptr %14, align 4, !tbaa !5
  %172 = icmp sge i32 %171, 0
  br i1 %172, label %173, label %227

173:                                              ; preds = %158
  %174 = load i32, ptr %15, align 4, !tbaa !5
  %175 = icmp sge i32 %174, 0
  br i1 %175, label %176, label %227

176:                                              ; preds = %173
  %177 = load i32, ptr %14, align 4, !tbaa !5
  %178 = load i32, ptr %15, align 4, !tbaa !5
  %179 = add nsw i32 %177, %178
  %180 = load i32, ptr @tot, align 4, !tbaa !5
  %181 = icmp sle i32 %179, %180
  br i1 %181, label %182, label %227

182:                                              ; preds = %176
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = load i32, ptr %7, align 4, !tbaa !5
  %185 = srem i32 %183, %184
  %186 = load i32, ptr %8, align 4, !tbaa !5
  %187 = icmp eq i32 %185, %186
  br i1 %187, label %188, label %227

188:                                              ; preds = %182
  %189 = load i32, ptr %15, align 4, !tbaa !5
  %190 = load i32, ptr %7, align 4, !tbaa !5
  %191 = srem i32 %189, %190
  %192 = load i32, ptr %9, align 4, !tbaa !5
  %193 = icmp eq i32 %191, %192
  br i1 %193, label %194, label %227

194:                                              ; preds = %188
  %195 = load i32, ptr %12, align 4, !tbaa !5
  %196 = load i32, ptr @c, align 16, !tbaa !5
  %197 = sub nsw i32 %195, %196
  %198 = call i32 @llvm.abs.i32(i32 %197, i1 true)
  %199 = load i32, ptr %13, align 4, !tbaa !5
  %200 = load i32, ptr getelementptr inbounds ([5 x [7 x i32]], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  %201 = sub nsw i32 %199, %200
  %202 = call i32 @llvm.abs.i32(i32 %201, i1 true)
  %203 = add nsw i32 %198, %202
  %204 = load i32, ptr getelementptr inbounds ([5 x [7 x i32]], ptr @c, i64 0, i64 3), align 4, !tbaa !5
  %205 = load i32, ptr %12, align 4, !tbaa !5
  %206 = sub nsw i32 %204, %205
  %207 = load i32, ptr %13, align 4, !tbaa !5
  %208 = sub nsw i32 %206, %207
  %209 = load i32, ptr getelementptr inbounds ([5 x [7 x i32]], ptr @c, i64 0, i64 2), align 8, !tbaa !5
  %210 = sub nsw i32 %208, %209
  %211 = call i32 @llvm.abs.i32(i32 %210, i1 true)
  %212 = add nsw i32 %203, %211
  %213 = sdiv i32 %212, 2
  %214 = load i32, ptr @cur, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %215
  %217 = load i32, ptr %14, align 4, !tbaa !5
  %218 = load i32, ptr %7, align 4, !tbaa !5
  %219 = sdiv i32 %217, %218
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds [201 x [201 x i32]], ptr %216, i64 0, i64 %220
  %222 = load i32, ptr %15, align 4, !tbaa !5
  %223 = load i32, ptr %7, align 4, !tbaa !5
  %224 = sdiv i32 %222, %223
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [201 x i32], ptr %221, i64 0, i64 %225
  store i32 %213, ptr %226, align 4, !tbaa !5
  br label %227

227:                                              ; preds = %194, %188, %182, %176, %173, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %228

228:                                              ; preds = %227
  %229 = load i32, ptr %13, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %13, align 4, !tbaa !5
  br label %151, !llvm.loop !13

231:                                              ; preds = %157
  br label %232

232:                                              ; preds = %231
  %233 = load i32, ptr %12, align 4, !tbaa !5
  %234 = add nsw i32 %233, 1
  store i32 %234, ptr %12, align 4, !tbaa !5
  br label %145, !llvm.loop !14

235:                                              ; preds = %149
  %236 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %236, ptr @tot, align 4, !tbaa !5
  %237 = load i32, ptr %7, align 4, !tbaa !5
  %238 = load i32, ptr @p, align 4, !tbaa !5
  %239 = sdiv i32 %238, %237
  store i32 %239, ptr @p, align 4, !tbaa !5
  %240 = load i32, ptr %7, align 4, !tbaa !5
  %241 = load i32, ptr @q, align 4, !tbaa !5
  %242 = sdiv i32 %241, %240
  store i32 %242, ptr @q, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %1) #6
  ret void
}

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

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

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

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

declare i32 @puts(ptr noundef) #3

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { noreturn 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !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"

@tot = external dso_local local_unnamed_addr global i32, align 4
@p = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local local_unnamed_addr global i32, align 4
@c = external dso_local global [5 x [7 x i32]], align 16
@f = external dso_local local_unnamed_addr global [2 x [201 x [201 x i32]]], align 16
@cur = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL1w = external hidden local_unnamed_addr constant [7 x i32], align 16
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZL3com = external hidden local_unnamed_addr constant [7 x i32], align 16

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z4initv() local_unnamed_addr #0 {
.preheader82:
  %0 = alloca [3 x i32], align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %0) #7
  %1 = getelementptr inbounds i8, ptr %0, i64 4
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %0, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %.pre103 = load i32, ptr @_ZL1w, align 16, !tbaa !5
  %.pre102 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL1w, i64 4), align 4, !tbaa !5
  %.pre101 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL1w, i64 8), align 8, !tbaa !5
  %.pre100 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL1w, i64 12), align 4, !tbaa !5
  %.pre99 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL1w, i64 16), align 16, !tbaa !5
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @_ZL1w, i64 20), align 4, !tbaa !5
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 20))
  %5 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 20), align 4, !tbaa !5
  %6 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 104), align 8, !tbaa !5
  %7 = add nsw i32 %6, %5
  store i32 %7, ptr getelementptr inbounds (i8, ptr @c, i64 104), align 8, !tbaa !5
  %8 = mul nsw i32 %.pre, %5
  %9 = load i32, ptr @tot, align 4, !tbaa !5
  %10 = add nsw i32 %9, %8
  store i32 %10, ptr @tot, align 4, !tbaa !5
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 16))
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 16), align 16, !tbaa !5
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 100), align 4, !tbaa !5
  %14 = add nsw i32 %13, %12
  store i32 %14, ptr getelementptr inbounds (i8, ptr @c, i64 100), align 4, !tbaa !5
  %15 = mul nsw i32 %.pre99, %12
  %16 = load i32, ptr @tot, align 4, !tbaa !5
  %17 = add nsw i32 %16, %15
  store i32 %17, ptr @tot, align 4, !tbaa !5
  %18 = add nsw i32 %8, %15
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 12))
  %20 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 12), align 4, !tbaa !5
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 96), align 16, !tbaa !5
  %22 = add nsw i32 %21, %20
  store i32 %22, ptr getelementptr inbounds (i8, ptr @c, i64 96), align 16, !tbaa !5
  %23 = mul nsw i32 %.pre100, %20
  %24 = load i32, ptr @tot, align 4, !tbaa !5
  %25 = add nsw i32 %24, %23
  store i32 %25, ptr @tot, align 4, !tbaa !5
  %26 = add nsw i32 %18, %23
  %27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 8))
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 8), align 8, !tbaa !5
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 92), align 4, !tbaa !5
  %30 = add nsw i32 %29, %28
  store i32 %30, ptr getelementptr inbounds (i8, ptr @c, i64 92), align 4, !tbaa !5
  %31 = mul nsw i32 %.pre101, %28
  %32 = load i32, ptr @tot, align 4, !tbaa !5
  %33 = add nsw i32 %32, %31
  store i32 %33, ptr @tot, align 4, !tbaa !5
  %34 = add nsw i32 %26, %31
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 4))
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 88), align 8, !tbaa !5
  %38 = add nsw i32 %37, %36
  store i32 %38, ptr getelementptr inbounds (i8, ptr @c, i64 88), align 8, !tbaa !5
  %39 = mul nsw i32 %.pre102, %36
  %40 = load i32, ptr @tot, align 4, !tbaa !5
  %41 = add nsw i32 %40, %39
  store i32 %41, ptr @tot, align 4, !tbaa !5
  %42 = add nsw i32 %34, %39
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @c)
  %44 = load i32, ptr @c, align 16, !tbaa !5
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 84), align 4, !tbaa !5
  %46 = add nsw i32 %45, %44
  store i32 %46, ptr getelementptr inbounds (i8, ptr @c, i64 84), align 4, !tbaa !5
  %47 = mul nsw i32 %.pre103, %44
  %48 = load i32, ptr @tot, align 4, !tbaa !5
  %49 = add nsw i32 %48, %47
  store i32 %49, ptr @tot, align 4, !tbaa !5
  %50 = add nsw i32 %42, %47
  %51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 48))
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 48), align 16, !tbaa !5
  %53 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 104), align 8, !tbaa !5
  %54 = add nsw i32 %53, %52
  store i32 %54, ptr getelementptr inbounds (i8, ptr @c, i64 104), align 8, !tbaa !5
  %55 = mul nsw i32 %.pre, %52
  %56 = load i32, ptr @tot, align 4, !tbaa !5
  %57 = add nsw i32 %56, %55
  store i32 %57, ptr @tot, align 4, !tbaa !5
  %58 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 44))
  %59 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 44), align 4, !tbaa !5
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 100), align 4, !tbaa !5
  %61 = add nsw i32 %60, %59
  store i32 %61, ptr getelementptr inbounds (i8, ptr @c, i64 100), align 4, !tbaa !5
  %62 = mul nsw i32 %.pre99, %59
  %63 = load i32, ptr @tot, align 4, !tbaa !5
  %64 = add nsw i32 %63, %62
  store i32 %64, ptr @tot, align 4, !tbaa !5
  %65 = add nsw i32 %55, %62
  %66 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 40))
  %67 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 40), align 8, !tbaa !5
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 96), align 16, !tbaa !5
  %69 = add nsw i32 %68, %67
  store i32 %69, ptr getelementptr inbounds (i8, ptr @c, i64 96), align 16, !tbaa !5
  %70 = mul nsw i32 %.pre100, %67
  %71 = load i32, ptr @tot, align 4, !tbaa !5
  %72 = add nsw i32 %71, %70
  store i32 %72, ptr @tot, align 4, !tbaa !5
  %73 = add nsw i32 %65, %70
  %74 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 36))
  %75 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 36), align 4, !tbaa !5
  %76 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 92), align 4, !tbaa !5
  %77 = add nsw i32 %76, %75
  store i32 %77, ptr getelementptr inbounds (i8, ptr @c, i64 92), align 4, !tbaa !5
  %78 = mul nsw i32 %.pre101, %75
  %79 = load i32, ptr @tot, align 4, !tbaa !5
  %80 = add nsw i32 %79, %78
  store i32 %80, ptr @tot, align 4, !tbaa !5
  %81 = add nsw i32 %73, %78
  %82 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 32))
  %83 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 32), align 16, !tbaa !5
  %84 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 88), align 8, !tbaa !5
  %85 = add nsw i32 %84, %83
  store i32 %85, ptr getelementptr inbounds (i8, ptr @c, i64 88), align 8, !tbaa !5
  %86 = mul nsw i32 %.pre102, %83
  %87 = load i32, ptr @tot, align 4, !tbaa !5
  %88 = add nsw i32 %87, %86
  store i32 %88, ptr @tot, align 4, !tbaa !5
  %89 = add nsw i32 %81, %86
  %90 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 28))
  %91 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 28), align 4, !tbaa !5
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 84), align 4, !tbaa !5
  %93 = add nsw i32 %92, %91
  store i32 %93, ptr getelementptr inbounds (i8, ptr @c, i64 84), align 4, !tbaa !5
  %94 = mul nsw i32 %.pre103, %91
  %95 = load i32, ptr @tot, align 4, !tbaa !5
  %96 = add nsw i32 %95, %94
  store i32 %96, ptr @tot, align 4, !tbaa !5
  %97 = add nsw i32 %89, %94
  %98 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 76))
  %99 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 76), align 4, !tbaa !5
  %100 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 104), align 8, !tbaa !5
  %101 = add nsw i32 %100, %99
  store i32 %101, ptr getelementptr inbounds (i8, ptr @c, i64 104), align 8, !tbaa !5
  %102 = mul nsw i32 %.pre, %99
  %103 = load i32, ptr @tot, align 4, !tbaa !5
  %104 = add nsw i32 %103, %102
  store i32 %104, ptr @tot, align 4, !tbaa !5
  %105 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 72))
  %106 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 72), align 8, !tbaa !5
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 100), align 4, !tbaa !5
  %108 = add nsw i32 %107, %106
  store i32 %108, ptr getelementptr inbounds (i8, ptr @c, i64 100), align 4, !tbaa !5
  %109 = mul nsw i32 %.pre99, %106
  %110 = load i32, ptr @tot, align 4, !tbaa !5
  %111 = add nsw i32 %110, %109
  store i32 %111, ptr @tot, align 4, !tbaa !5
  %112 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 68))
  %113 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 68), align 4, !tbaa !5
  %114 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 96), align 16, !tbaa !5
  %115 = add nsw i32 %114, %113
  store i32 %115, ptr getelementptr inbounds (i8, ptr @c, i64 96), align 16, !tbaa !5
  %116 = mul nsw i32 %.pre100, %113
  %117 = load i32, ptr @tot, align 4, !tbaa !5
  %118 = add nsw i32 %117, %116
  store i32 %118, ptr @tot, align 4, !tbaa !5
  %119 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 64))
  %120 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 64), align 16, !tbaa !5
  %121 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 92), align 4, !tbaa !5
  %122 = add nsw i32 %121, %120
  store i32 %122, ptr getelementptr inbounds (i8, ptr @c, i64 92), align 4, !tbaa !5
  %123 = mul nsw i32 %.pre101, %120
  %124 = load i32, ptr @tot, align 4, !tbaa !5
  %125 = add nsw i32 %124, %123
  store i32 %125, ptr @tot, align 4, !tbaa !5
  %126 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 60))
  %127 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 60), align 4, !tbaa !5
  %128 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 88), align 8, !tbaa !5
  %129 = add nsw i32 %128, %127
  store i32 %129, ptr getelementptr inbounds (i8, ptr @c, i64 88), align 8, !tbaa !5
  %130 = mul nsw i32 %.pre102, %127
  %131 = load i32, ptr @tot, align 4, !tbaa !5
  %132 = add nsw i32 %131, %130
  store i32 %132, ptr @tot, align 4, !tbaa !5
  %133 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 56))
  %134 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 56), align 8, !tbaa !5
  %135 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 84), align 4, !tbaa !5
  %136 = add nsw i32 %135, %134
  store i32 %136, ptr getelementptr inbounds (i8, ptr @c, i64 84), align 4, !tbaa !5
  %137 = mul nsw i32 %.pre103, %134
  %138 = load i32, ptr @tot, align 4, !tbaa !5
  %139 = add nsw i32 %138, %137
  store i32 %139, ptr @tot, align 4, !tbaa !5
  %140 = load i32, ptr %0, align 4, !tbaa !5
  %141 = sub nsw i32 %50, %140
  %142 = load i32, ptr %2, align 4, !tbaa !5
  %143 = add nsw i32 %141, %142
  store i32 %143, ptr @p, align 4, !tbaa !5
  %144 = load i32, ptr %1, align 4, !tbaa !5
  %145 = sub nsw i32 %97, %144
  %146 = add nsw i32 %145, %140
  store i32 %146, ptr @q, align 4, !tbaa !5
  %147 = icmp slt i32 %143, 0
  %148 = icmp slt i32 %146, 0
  %or.cond = select i1 %147, i1 true, i1 %148
  br i1 %or.cond, label %149, label %151

149:                                              ; preds = %.preheader82
  %150 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @exit(i32 noundef 0) #8
  unreachable

151:                                              ; preds = %.preheader82
  %152 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL3com, i64 4), align 4, !tbaa !5
  %153 = load i32, ptr @_ZL3com, align 16, !tbaa !5
  %154 = sdiv i32 %152, %153
  %155 = srem i32 %143, %154
  %156 = sdiv i32 %143, %154
  %157 = srem i32 %146, %154
  %158 = sdiv i32 %146, %154
  %159 = add nuw i32 %157, %155
  %160 = sub i32 %139, %159
  %161 = sdiv i32 %160, %154
  %.not85 = icmp slt i32 %161, 0
  br i1 %.not85, label %.preheader81, label %.lr.ph

.lr.ph:                                           ; preds = %151
  %162 = load i32, ptr @cur, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = add nuw i32 %161, 1
  %wide.trip.count = zext i32 %164 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %165 = icmp ult i32 %161, 3
  br i1 %165, label %.preheader81.loopexit.unr-lcssa, label %.lr.ph.new

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

.preheader81.loopexit.unr-lcssa:                  ; preds = %183, %.lr.ph
  %indvars.iv94.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next95.3, %183 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader81, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader81.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv94.epil = phi i64 [ %indvars.iv.next95.epil, %.epil.preheader ], [ %indvars.iv94.unr, %.preheader81.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader81.loopexit.unr-lcssa ]
  %166 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %163, i64 %indvars.iv94.epil
  %167 = trunc nuw nsw i64 %indvars.iv94.epil to i32
  %168 = sub i32 %164, %167
  %169 = sext i32 %168 to i64
  %170 = shl nsw i64 %169, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %166, i8 63, i64 %170, i1 false)
  %indvars.iv.next95.epil = add nuw nsw i64 %indvars.iv94.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader81, label %.epil.preheader, !llvm.loop !9

.preheader81:                                     ; preds = %.preheader81.loopexit.unr-lcssa, %.epil.preheader, %151
  %.not6788 = icmp slt i32 %136, 0
  br i1 %.not6788, label %._crit_edge, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader81
  %171 = load i32, ptr @c, align 16, !tbaa !5
  %172 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 28), align 4, !tbaa !5
  %173 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 56), align 8
  %174 = load i32, ptr @cur, align 4
  %175 = sext i32 %174 to i64
  %176 = add i32 %134, 1
  %177 = add i32 %176, %135
  %broadcast.splatinsert108 = insertelement <4 x i32> poison, i32 %97, i64 0
  %broadcast.splat109 = shufflevector <4 x i32> %broadcast.splatinsert108, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert110 = insertelement <4 x i32> poison, i32 %172, i64 0
  %broadcast.splat111 = shufflevector <4 x i32> %broadcast.splatinsert110, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert114 = insertelement <4 x i32> poison, i32 %139, i64 0
  %broadcast.splat115 = shufflevector <4 x i32> %broadcast.splatinsert114, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert122 = insertelement <4 x i32> poison, i32 %155, i64 0
  %broadcast.splat123 = shufflevector <4 x i32> %broadcast.splatinsert122, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert132 = insertelement <4 x i32> poison, i32 %157, i64 0
  %broadcast.splat133 = shufflevector <4 x i32> %broadcast.splatinsert132, <4 x i32> poison, <4 x i32> zeroinitializer
  %178 = insertelement <4 x i32> poison, i32 %136, i64 0
  %179 = shufflevector <4 x i32> %178, <4 x i32> poison, <4 x i32> zeroinitializer
  %180 = insertelement <4 x i32> poison, i32 %173, i64 0
  %181 = insertelement <4 x i32> poison, i32 %172, i64 0
  %182 = shufflevector <4 x i32> %181, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %.preheader

183:                                              ; preds = %183, %.lr.ph.new
  %indvars.iv94 = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next95.3, %183 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %183 ]
  %184 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %163, i64 %indvars.iv94
  %185 = trunc nuw nsw i64 %indvars.iv94 to i32
  %186 = sub i32 %164, %185
  %187 = sext i32 %186 to i64
  %188 = shl nsw i64 %187, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %184, i8 63, i64 %188, i1 false)
  %indvars.iv.next95 = or disjoint i64 %indvars.iv94, 1
  %189 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %163, i64 %indvars.iv.next95
  %190 = trunc nuw nsw i64 %indvars.iv.next95 to i32
  %191 = sub i32 %164, %190
  %192 = sext i32 %191 to i64
  %193 = shl nsw i64 %192, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %189, i8 63, i64 %193, i1 false)
  %indvars.iv.next95.1 = or disjoint i64 %indvars.iv94, 2
  %194 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %163, i64 %indvars.iv.next95.1
  %195 = trunc nuw nsw i64 %indvars.iv.next95.1 to i32
  %196 = sub i32 %164, %195
  %197 = sext i32 %196 to i64
  %198 = shl nsw i64 %197, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %194, i8 63, i64 %198, i1 false)
  %indvars.iv.next95.2 = or disjoint i64 %indvars.iv94, 3
  %199 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %163, i64 %indvars.iv.next95.2
  %200 = trunc nuw nsw i64 %indvars.iv.next95.2 to i32
  %201 = sub i32 %164, %200
  %202 = sext i32 %201 to i64
  %203 = shl nsw i64 %202, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %199, i8 63, i64 %203, i1 false)
  %indvars.iv.next95.3 = add nuw nsw i64 %indvars.iv94, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader81.loopexit.unr-lcssa, label %183, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.lr.ph, %.split.us
  %.05889 = phi i32 [ 0, %.preheader.lr.ph ], [ %320, %.split.us ]
  %204 = add i32 %.05889, 1
  %smax = call i32 @llvm.smax.i32(i32 %204, i32 %177)
  %205 = sub i32 %smax, %.05889
  %206 = add nsw i32 %.05889, %50
  %207 = sub i32 %206, %171
  %.fr90 = freeze i32 %207
  %208 = icmp slt i32 %.fr90, 0
  %209 = sub nsw i32 %.05889, %171
  %210 = call i32 @llvm.abs.i32(i32 %209, i1 true)
  br i1 %208, label %.split.us, label %.preheader.split.preheader

.preheader.split.preheader:                       ; preds = %.preheader
  %min.iters.check = icmp ult i32 %205, 4
  br i1 %min.iters.check, label %.preheader.split.preheader142, label %vector.ph

.preheader.split.preheader142:                    ; preds = %middle.block, %.preheader.split.preheader
  %.05787.ph = phi i32 [ 0, %.preheader.split.preheader ], [ %n.vec, %middle.block ]
  br label %.preheader.split

vector.ph:                                        ; preds = %.preheader.split.preheader
  %n.vec = and i32 %205, -4
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.05889, i64 0
  %broadcast.splatinsert112 = insertelement <4 x i32> poison, i32 %.fr90, i64 0
  %broadcast.splat113 = shufflevector <4 x i32> %broadcast.splatinsert112, <4 x i32> poison, <4 x i32> zeroinitializer
  %211 = add <4 x i32> %180, %broadcast.splatinsert
  %212 = shufflevector <4 x i32> %211, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue139, %vector.ph
  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %pred.store.continue139 ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %pred.store.continue139 ]
  %213 = or disjoint i32 %index, 1
  %214 = insertelement <2 x i32> poison, i32 %index, i64 0
  %215 = shufflevector <2 x i32> %214, <2 x i32> poison, <2 x i32> zeroinitializer
  %216 = or disjoint <2 x i32> %215, <i32 2, i32 3>
  %217 = add nsw <4 x i32> %vec.ind, %broadcast.splat109
  %218 = sub <4 x i32> %217, %broadcast.splat111
  %219 = icmp sgt <4 x i32> %218, <i32 -1, i32 -1, i32 -1, i32 -1>
  %220 = add nuw nsw <4 x i32> %218, %broadcast.splat113
  %221 = icmp sle <4 x i32> %220, %broadcast.splat115
  %.not141 = select <4 x i1> %219, <4 x i1> %221, <4 x i1> zeroinitializer
  %222 = extractelement <4 x i1> %.not141, i64 0
  br i1 %222, label %pred.srem.if, label %pred.srem.continue

pred.srem.if:                                     ; preds = %vector.body
  %223 = srem i32 %.fr90, %154
  %224 = insertelement <4 x i32> poison, i32 %223, i64 0
  br label %pred.srem.continue

pred.srem.continue:                               ; preds = %pred.srem.if, %vector.body
  %225 = phi <4 x i32> [ poison, %vector.body ], [ %224, %pred.srem.if ]
  %226 = extractelement <4 x i1> %.not141, i64 1
  br i1 %226, label %pred.srem.if116, label %pred.srem.continue117

pred.srem.if116:                                  ; preds = %pred.srem.continue
  %227 = srem i32 %.fr90, %154
  %228 = insertelement <4 x i32> %225, i32 %227, i64 1
  br label %pred.srem.continue117

pred.srem.continue117:                            ; preds = %pred.srem.if116, %pred.srem.continue
  %229 = phi <4 x i32> [ %225, %pred.srem.continue ], [ %228, %pred.srem.if116 ]
  %230 = extractelement <4 x i1> %.not141, i64 2
  br i1 %230, label %pred.srem.if118, label %pred.srem.continue119

pred.srem.if118:                                  ; preds = %pred.srem.continue117
  %231 = srem i32 %.fr90, %154
  %232 = insertelement <4 x i32> %229, i32 %231, i64 2
  br label %pred.srem.continue119

pred.srem.continue119:                            ; preds = %pred.srem.if118, %pred.srem.continue117
  %233 = phi <4 x i32> [ %229, %pred.srem.continue117 ], [ %232, %pred.srem.if118 ]
  %234 = extractelement <4 x i1> %.not141, i64 3
  br i1 %234, label %pred.srem.if120, label %pred.srem.continue121

pred.srem.if120:                                  ; preds = %pred.srem.continue119
  %235 = srem i32 %.fr90, %154
  %236 = insertelement <4 x i32> %233, i32 %235, i64 3
  br label %pred.srem.continue121

pred.srem.continue121:                            ; preds = %pred.srem.if120, %pred.srem.continue119
  %237 = phi <4 x i32> [ %233, %pred.srem.continue119 ], [ %236, %pred.srem.if120 ]
  %238 = icmp eq <4 x i32> %237, %broadcast.splat123
  %239 = select <4 x i1> %.not141, <4 x i1> %238, <4 x i1> zeroinitializer
  %240 = extractelement <4 x i1> %239, i64 0
  br i1 %240, label %pred.srem.if124, label %pred.srem.continue125

pred.srem.if124:                                  ; preds = %pred.srem.continue121
  %241 = extractelement <4 x i32> %218, i64 0
  %242 = srem i32 %241, %154
  %243 = insertelement <4 x i32> poison, i32 %242, i64 0
  br label %pred.srem.continue125

pred.srem.continue125:                            ; preds = %pred.srem.if124, %pred.srem.continue121
  %244 = phi <4 x i32> [ poison, %pred.srem.continue121 ], [ %243, %pred.srem.if124 ]
  %245 = extractelement <4 x i1> %239, i64 1
  br i1 %245, label %pred.srem.if126, label %pred.srem.continue127

pred.srem.if126:                                  ; preds = %pred.srem.continue125
  %246 = extractelement <4 x i32> %218, i64 1
  %247 = srem i32 %246, %154
  %248 = insertelement <4 x i32> %244, i32 %247, i64 1
  br label %pred.srem.continue127

pred.srem.continue127:                            ; preds = %pred.srem.if126, %pred.srem.continue125
  %249 = phi <4 x i32> [ %244, %pred.srem.continue125 ], [ %248, %pred.srem.if126 ]
  %250 = extractelement <4 x i1> %239, i64 2
  br i1 %250, label %pred.srem.if128, label %pred.srem.continue129

pred.srem.if128:                                  ; preds = %pred.srem.continue127
  %251 = extractelement <4 x i32> %218, i64 2
  %252 = srem i32 %251, %154
  %253 = insertelement <4 x i32> %249, i32 %252, i64 2
  br label %pred.srem.continue129

pred.srem.continue129:                            ; preds = %pred.srem.if128, %pred.srem.continue127
  %254 = phi <4 x i32> [ %249, %pred.srem.continue127 ], [ %253, %pred.srem.if128 ]
  %255 = extractelement <4 x i1> %239, i64 3
  br i1 %255, label %pred.srem.if130, label %pred.srem.continue131

pred.srem.if130:                                  ; preds = %pred.srem.continue129
  %256 = extractelement <4 x i32> %218, i64 3
  %257 = srem i32 %256, %154
  %258 = insertelement <4 x i32> %254, i32 %257, i64 3
  br label %pred.srem.continue131

pred.srem.continue131:                            ; preds = %pred.srem.if130, %pred.srem.continue129
  %259 = phi <4 x i32> [ %254, %pred.srem.continue129 ], [ %258, %pred.srem.if130 ]
  %260 = icmp eq <4 x i32> %259, %broadcast.splat133
  %261 = select <4 x i1> %239, <4 x i1> %260, <4 x i1> zeroinitializer
  %262 = insertelement <4 x i32> poison, i32 %index, i64 0
  %263 = insertelement <4 x i32> %262, i32 %213, i64 1
  %264 = shufflevector <2 x i32> %216, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
  %265 = shufflevector <4 x i32> %263, <4 x i32> %264, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
  %266 = sub nsw <4 x i32> %265, %182
  %267 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %266, i1 true)
  %268 = add <4 x i32> %212, %vec.ind
  %269 = sub <4 x i32> %179, %268
  %270 = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %269, i1 true)
  %271 = extractelement <4 x i1> %261, i64 0
  br i1 %271, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %pred.srem.continue131
  %272 = sdiv i32 %.fr90, %154
  %273 = extractelement <4 x i32> %218, i64 0
  %274 = sdiv i32 %273, %154
  %275 = extractelement <4 x i32> %267, i64 0
  %276 = add nuw nsw i32 %275, %210
  %277 = sext i32 %274 to i64
  %278 = sext i32 %272 to i64
  %279 = extractelement <4 x i32> %270, i64 0
  %280 = add nuw nsw i32 %276, %279
  %281 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %175, i64 %278, i64 %277
  %282 = lshr i32 %280, 1
  store i32 %282, ptr %281, align 4, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %pred.srem.continue131
  %283 = extractelement <4 x i1> %261, i64 1
  br i1 %283, label %pred.store.if134, label %pred.store.continue135

pred.store.if134:                                 ; preds = %pred.store.continue
  %284 = sdiv i32 %.fr90, %154
  %285 = extractelement <4 x i32> %218, i64 1
  %286 = sdiv i32 %285, %154
  %287 = extractelement <4 x i32> %267, i64 1
  %288 = add nuw nsw i32 %287, %210
  %289 = sext i32 %286 to i64
  %290 = sext i32 %284 to i64
  %291 = extractelement <4 x i32> %270, i64 1
  %292 = add nuw nsw i32 %288, %291
  %293 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %175, i64 %290, i64 %289
  %294 = lshr i32 %292, 1
  store i32 %294, ptr %293, align 4, !tbaa !5
  br label %pred.store.continue135

pred.store.continue135:                           ; preds = %pred.store.if134, %pred.store.continue
  %295 = extractelement <4 x i1> %261, i64 2
  br i1 %295, label %pred.store.if136, label %pred.store.continue137

pred.store.if136:                                 ; preds = %pred.store.continue135
  %296 = sdiv i32 %.fr90, %154
  %297 = extractelement <4 x i32> %218, i64 2
  %298 = sdiv i32 %297, %154
  %299 = extractelement <4 x i32> %267, i64 2
  %300 = add nuw nsw i32 %299, %210
  %301 = sext i32 %298 to i64
  %302 = sext i32 %296 to i64
  %303 = extractelement <4 x i32> %270, i64 2
  %304 = add nuw nsw i32 %300, %303
  %305 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %175, i64 %302, i64 %301
  %306 = lshr i32 %304, 1
  store i32 %306, ptr %305, align 4, !tbaa !5
  br label %pred.store.continue137

pred.store.continue137:                           ; preds = %pred.store.if136, %pred.store.continue135
  %307 = extractelement <4 x i1> %261, i64 3
  br i1 %307, label %pred.store.if138, label %pred.store.continue139

pred.store.if138:                                 ; preds = %pred.store.continue137
  %308 = sdiv i32 %.fr90, %154
  %309 = extractelement <4 x i32> %218, i64 3
  %310 = sdiv i32 %309, %154
  %311 = extractelement <4 x i32> %267, i64 3
  %312 = add nuw nsw i32 %311, %210
  %313 = sext i32 %310 to i64
  %314 = sext i32 %308 to i64
  %315 = extractelement <4 x i32> %270, i64 3
  %316 = add nuw nsw i32 %312, %315
  %317 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %175, i64 %314, i64 %313
  %318 = lshr i32 %316, 1
  store i32 %318, ptr %317, align 4, !tbaa !5
  br label %pred.store.continue139

pred.store.continue139:                           ; preds = %pred.store.if138, %pred.store.continue137
  %index.next = add nuw i32 %index, 4
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %319 = icmp eq i32 %index.next, %n.vec
  br i1 %319, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %pred.store.continue139
  %cmp.n = icmp eq i32 %205, %n.vec
  br i1 %cmp.n, label %.split.us, label %.preheader.split.preheader142

._crit_edge:                                      ; preds = %.split.us, %.preheader81
  store i32 %161, ptr @tot, align 4, !tbaa !5
  store i32 %156, ptr @p, align 4, !tbaa !5
  store i32 %158, ptr @q, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %0) #7
  ret void

.split.us:                                        ; preds = %346, %middle.block, %.preheader
  %320 = add i32 %.05889, 1
  %exitcond98.not = icmp eq i32 %.05889, %136
  br i1 %exitcond98.not, label %._crit_edge, label %.preheader, !llvm.loop !16

.preheader.split:                                 ; preds = %.preheader.split.preheader142, %346
  %.05787 = phi i32 [ %347, %346 ], [ %.05787.ph, %.preheader.split.preheader142 ]
  %321 = add nuw nsw i32 %.05787, %.05889
  %322 = add nsw i32 %.05787, %97
  %323 = sub i32 %322, %172
  %324 = icmp slt i32 %323, 0
  %325 = add nuw nsw i32 %323, %.fr90
  %.not69 = icmp sgt i32 %325, %139
  %or.cond70 = select i1 %324, i1 true, i1 %.not69
  br i1 %or.cond70, label %346, label %326

326:                                              ; preds = %.preheader.split
  %327 = srem i32 %.fr90, %154
  %328 = sdiv i32 %.fr90, %154
  %329 = icmp eq i32 %327, %155
  br i1 %329, label %330, label %346

330:                                              ; preds = %326
  %331 = srem i32 %323, %154
  %332 = sdiv i32 %323, %154
  %333 = icmp eq i32 %331, %157
  br i1 %333, label %334, label %346

334:                                              ; preds = %330
  %335 = sub nsw i32 %.05787, %172
  %336 = call i32 @llvm.abs.i32(i32 %335, i1 true)
  %337 = add nuw nsw i32 %336, %210
  %338 = add i32 %321, %173
  %339 = sub i32 %136, %338
  %340 = call i32 @llvm.abs.i32(i32 %339, i1 true)
  %341 = add nuw nsw i32 %337, %340
  %342 = lshr i32 %341, 1
  %343 = sext i32 %328 to i64
  %344 = sext i32 %332 to i64
  %345 = getelementptr inbounds [2 x [201 x [201 x i32]]], ptr @f, i64 0, i64 %175, i64 %343, i64 %344
  store i32 %342, ptr %345, align 4, !tbaa !5
  br label %346

346:                                              ; preds = %334, %330, %326, %.preheader.split
  %347 = add nuw nsw i32 %.05787, 1
  %348 = add nuw nsw i32 %347, %.05889
  %.not68 = icmp sgt i32 %348, %136
  br i1 %.not68, label %.split.us, label %.preheader.split, !llvm.loop !17
}

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

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.abs.v4i32(<4 x i32>, i1 immarg) #6

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12, !15, !14}


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