; LLVM IR from tangjz/acm-icpc :: self_training/2015-02-16 (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"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@f = external dso_local global [1001 x i32], align 16
@c = external dso_local global [1001 x i32], align 16
@w = external dso_local global [1001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [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
  store i32 0, ptr %1, align 4
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @t)
  br label %8

8:                                                ; preds = %103, %0
  %9 = load i32, ptr @t, align 4, !tbaa !5
  %10 = add nsw i32 %9, -1
  store i32 %10, ptr @t, align 4, !tbaa !5
  %11 = icmp ne i32 %9, 0
  br i1 %11, label %12, label %109

12:                                               ; preds = %8
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 0, i64 4004, i1 false)
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @n, ptr noundef @v)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %14

14:                                               ; preds = %24, %12
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = load i32, ptr @n, align 4, !tbaa !5
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds i32, ptr @w, i64 %21
  %23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %22)
  br label %24

24:                                               ; preds = %19
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %14, !llvm.loop !9

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

28:                                               ; preds = %38, %27
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = icmp sle i32 %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  br label %41

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr @c, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %36)
  br label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %3, align 4, !tbaa !5
  br label %28, !llvm.loop !11

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

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

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

47:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %48 = load i32, ptr @v, align 4, !tbaa !5
  store i32 %48, ptr %6, align 4, !tbaa !5
  br label %49

49:                                               ; preds = %96, %47
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1001 x i32], ptr @c, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = icmp sge i32 %50, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %49
  store i32 13, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %99

57:                                               ; preds = %49
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = load i32, ptr %4, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1001 x i32], ptr @c, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = sub nsw i32 %62, %66
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = load i32, ptr %4, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1001 x i32], ptr @w, i64 0, i64 %72
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = add nsw i32 %70, %74
  %76 = icmp slt i32 %61, %75
  br i1 %76, label %77, label %95

77:                                               ; preds = %57
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = load i32, ptr %4, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [1001 x i32], ptr @c, i64 0, i64 %80
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = sub nsw i32 %78, %82
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = load i32, ptr %4, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [1001 x i32], ptr @w, i64 0, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = add nsw i32 %86, %90
  %92 = load i32, ptr %6, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %93
  store i32 %91, ptr %94, align 4, !tbaa !5
  br label %95

95:                                               ; preds = %77, %57
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = add nsw i32 %97, -1
  store i32 %98, ptr %6, align 4, !tbaa !5
  br label %49, !llvm.loop !12

99:                                               ; preds = %56
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %4, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %4, align 4, !tbaa !5
  br label %42, !llvm.loop !13

103:                                              ; preds = %46
  %104 = load i32, ptr @v, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %107)
  br label %8, !llvm.loop !14

109:                                              ; preds = %8
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 @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 nounwind willreturn memory(argmem: write) }
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 = 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"

@t = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@v = external dso_local global i32, align 4
@f = external dso_local local_unnamed_addr global [1001 x i32], align 16
@c = external dso_local global [1001 x i32], align 16
@w = external dso_local global [1001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

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

.lr.ph43:                                         ; preds = %0, %._crit_edge40
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4004) @f, i8 0, i64 4004, i1 false)
  %4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n, ptr noundef nonnull @v)
  %5 = load i32, ptr @n, align 4, !tbaa !5
  %.not2429 = icmp slt i32 %5, 1
  br i1 %.not2429, label %.preheader.thread, label %.lr.ph

.preheader28:                                     ; preds = %.lr.ph
  %.not2531 = icmp slt i32 %8, 1
  br i1 %.not2531, label %.preheader.thread, label %.lr.ph33

.lr.ph:                                           ; preds = %.lr.ph43, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.lr.ph43 ]
  %6 = getelementptr inbounds i32, ptr @w, i64 %indvars.iv
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %6)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %.not24.not = icmp slt i64 %indvars.iv, %9
  br i1 %.not24.not, label %.lr.ph, label %.preheader28, !llvm.loop !9

.preheader.thread:                                ; preds = %.preheader28, %.lr.ph43
  %.pre60 = load i32, ptr @v, align 4, !tbaa !5
  br label %.preheader.._crit_edge40_crit_edge

.preheader:                                       ; preds = %.lr.ph33
  %.not2637 = icmp slt i32 %17, 1
  %.pre = load i32, ptr @v, align 4, !tbaa !5
  br i1 %.not2637, label %.preheader.._crit_edge40_crit_edge, label %.lr.ph39

.preheader.._crit_edge40_crit_edge:               ; preds = %.preheader.thread, %.preheader
  %.pre61 = phi i32 [ %.pre60, %.preheader.thread ], [ %.pre, %.preheader ]
  %.pre56 = sext i32 %.pre61 to i64
  br label %._crit_edge40

.lr.ph39:                                         ; preds = %.preheader
  %10 = sext i32 %.pre to i64
  %11 = add nuw i32 %17, 1
  %wide.trip.count = zext i32 %11 to i64
  %12 = shl nsw i64 %10, 2
  %scevgep = getelementptr i8, ptr @f, i64 %12
  %scevgep64 = getelementptr i8, ptr @f, i64 %12
  %13 = shl nsw i64 %10, 2
  %scevgep70 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 4), i64 %13
  %scevgep71 = getelementptr i8, ptr getelementptr inbounds (i8, ptr @f, i64 4), i64 %13
  %14 = add nsw i64 %10, 1
  %bound1 = icmp ugt ptr %scevgep70, @f
  br label %24

.lr.ph33:                                         ; preds = %.preheader28, %.lr.ph33
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %.lr.ph33 ], [ 1, %.preheader28 ]
  %15 = getelementptr inbounds i32, ptr @c, i64 %indvars.iv47
  %16 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %15)
  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %.not25.not = icmp slt i64 %indvars.iv47, %18
  br i1 %.not25.not, label %.lr.ph33, label %.preheader, !llvm.loop !11

._crit_edge40:                                    ; preds = %._crit_edge, %.preheader.._crit_edge40_crit_edge
  %.pre-phi = phi i64 [ %.pre56, %.preheader.._crit_edge40_crit_edge ], [ %10, %._crit_edge ]
  %19 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %.pre-phi
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %20)
  %22 = load i32, ptr @t, align 4, !tbaa !5
  %23 = add nsw i32 %22, -1
  store i32 %23, ptr @t, align 4, !tbaa !5
  %.not = icmp eq i32 %22, 0
  br i1 %.not, label %._crit_edge44, label %.lr.ph43, !llvm.loop !12

24:                                               ; preds = %.lr.ph39, %._crit_edge
  %indvars.iv53 = phi i64 [ 1, %.lr.ph39 ], [ %indvars.iv.next54, %._crit_edge ]
  %25 = getelementptr inbounds [1001 x i32], ptr @c, i64 0, i64 %indvars.iv53
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %.not2734 = icmp slt i32 %.pre, %26
  br i1 %.not2734, label %._crit_edge, label %.lr.ph36

.lr.ph36:                                         ; preds = %24
  %27 = getelementptr inbounds [1001 x i32], ptr @w, i64 0, i64 %indvars.iv53
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = sext i32 %26 to i64
  %30 = sub nsw i64 %14, %29
  %min.iters.check = icmp ult i64 %30, 28
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.lr.ph36
  %indvars.iv50.ph = phi i64 [ %10, %vector.memcheck ], [ %10, %vector.scevcheck ], [ %10, %.lr.ph36 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.scevcheck:                                 ; preds = %.lr.ph36
  %31 = sub nsw i64 %10, %29
  %mul.result.neg = mul nsw i64 %31, -4
  %32 = getelementptr i8, ptr %scevgep, i64 %mul.result.neg
  %33 = icmp ugt ptr %32, %scevgep
  %34 = mul nsw i64 %29, -4
  %scevgep65 = getelementptr i8, ptr %scevgep64, i64 %34
  %mul.result67.neg = mul nsw i64 %31, -4
  %mul.overflow68 = icmp ugt i64 %31, 4611686018427387903
  %35 = getelementptr i8, ptr %scevgep65, i64 %mul.result67.neg
  %36 = icmp ugt ptr %35, %scevgep65
  %37 = or i1 %36, %mul.overflow68
  %38 = or i1 %33, %37
  br i1 %38, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %39 = shl nsw i64 %29, 2
  %scevgep69 = getelementptr i8, ptr @f, i64 %39
  %40 = mul nsw i64 %29, -4
  %scevgep72 = getelementptr i8, ptr %scevgep71, i64 %40
  %bound0 = icmp ult ptr %scevgep69, %scevgep72
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %30, -8
  %ind.end = sub nsw i64 %10, %n.vec
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %28, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue92, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue92 ]
  %offset.idx = sub i64 %10, %index
  %41 = add i64 %offset.idx, -4
  %42 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %offset.idx
  %43 = getelementptr inbounds i8, ptr %42, i64 -12
  %44 = getelementptr inbounds i8, ptr %42, i64 -28
  %wide.load = load <4 x i32>, ptr %43, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  %reverse = shufflevector <4 x i32> %wide.load, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load73 = load <4 x i32>, ptr %44, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  %reverse74 = shufflevector <4 x i32> %wide.load73, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %45 = sub nsw i64 %offset.idx, %29
  %46 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 -12
  %48 = getelementptr inbounds i8, ptr %46, i64 -28
  %wide.load75 = load <4 x i32>, ptr %47, align 4, !tbaa !5, !alias.scope !16
  %reverse76 = shufflevector <4 x i32> %wide.load75, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %wide.load77 = load <4 x i32>, ptr %48, align 4, !tbaa !5, !alias.scope !16
  %reverse78 = shufflevector <4 x i32> %wide.load77, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
  %49 = add nsw <4 x i32> %broadcast.splat, %reverse76
  %50 = add nsw <4 x i32> %broadcast.splat, %reverse78
  %51 = icmp slt <4 x i32> %reverse, %49
  %52 = icmp slt <4 x i32> %reverse74, %50
  %53 = extractelement <4 x i1> %51, i64 0
  br i1 %53, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %54 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %offset.idx
  %55 = extractelement <4 x i32> %49, i64 0
  store i32 %55, ptr %54, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %56 = extractelement <4 x i1> %51, i64 1
  br i1 %56, label %pred.store.if79, label %pred.store.continue80

pred.store.if79:                                  ; preds = %pred.store.continue
  %57 = add i64 %offset.idx, -1
  %58 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %57
  %59 = extractelement <4 x i32> %49, i64 1
  store i32 %59, ptr %58, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue80

pred.store.continue80:                            ; preds = %pred.store.if79, %pred.store.continue
  %60 = extractelement <4 x i1> %51, i64 2
  br i1 %60, label %pred.store.if81, label %pred.store.continue82

pred.store.if81:                                  ; preds = %pred.store.continue80
  %61 = add i64 %offset.idx, -2
  %62 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %61
  %63 = extractelement <4 x i32> %49, i64 2
  store i32 %63, ptr %62, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue82

pred.store.continue82:                            ; preds = %pred.store.if81, %pred.store.continue80
  %64 = extractelement <4 x i1> %51, i64 3
  br i1 %64, label %pred.store.if83, label %pred.store.continue84

pred.store.if83:                                  ; preds = %pred.store.continue82
  %65 = add i64 %offset.idx, -3
  %66 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %65
  %67 = extractelement <4 x i32> %49, i64 3
  store i32 %67, ptr %66, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue84

pred.store.continue84:                            ; preds = %pred.store.if83, %pred.store.continue82
  %68 = extractelement <4 x i1> %52, i64 0
  br i1 %68, label %pred.store.if85, label %pred.store.continue86

pred.store.if85:                                  ; preds = %pred.store.continue84
  %69 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %41
  %70 = extractelement <4 x i32> %50, i64 0
  store i32 %70, ptr %69, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue86

pred.store.continue86:                            ; preds = %pred.store.if85, %pred.store.continue84
  %71 = extractelement <4 x i1> %52, i64 1
  br i1 %71, label %pred.store.if87, label %pred.store.continue88

pred.store.if87:                                  ; preds = %pred.store.continue86
  %72 = add i64 %offset.idx, -5
  %73 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %72
  %74 = extractelement <4 x i32> %50, i64 1
  store i32 %74, ptr %73, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue88

pred.store.continue88:                            ; preds = %pred.store.if87, %pred.store.continue86
  %75 = extractelement <4 x i1> %52, i64 2
  br i1 %75, label %pred.store.if89, label %pred.store.continue90

pred.store.if89:                                  ; preds = %pred.store.continue88
  %76 = add i64 %offset.idx, -6
  %77 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %76
  %78 = extractelement <4 x i32> %50, i64 2
  store i32 %78, ptr %77, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue90

pred.store.continue90:                            ; preds = %pred.store.if89, %pred.store.continue88
  %79 = extractelement <4 x i1> %52, i64 3
  br i1 %79, label %pred.store.if91, label %pred.store.continue92

pred.store.if91:                                  ; preds = %pred.store.continue90
  %80 = add i64 %offset.idx, -7
  %81 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %80
  %82 = extractelement <4 x i32> %50, i64 3
  store i32 %82, ptr %81, align 4, !tbaa !5, !alias.scope !13, !noalias !16
  br label %pred.store.continue92

pred.store.continue92:                            ; preds = %pred.store.if91, %pred.store.continue90
  %index.next = add nuw i64 %index, 8
  %83 = icmp eq i64 %index.next, %n.vec
  br i1 %83, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %pred.store.continue92
  %cmp.n = icmp eq i64 %30, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %92, %middle.block, %24
  %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next54, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge40, label %24, !llvm.loop !21

scalar.ph:                                        ; preds = %scalar.ph.preheader, %92
  %indvars.iv50 = phi i64 [ %indvars.iv.next51, %92 ], [ %indvars.iv50.ph, %scalar.ph.preheader ]
  %84 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %indvars.iv50
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = sub nsw i64 %indvars.iv50, %29
  %87 = getelementptr inbounds [1001 x i32], ptr @f, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = add nsw i32 %28, %88
  %90 = icmp slt i32 %85, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %scalar.ph
  store i32 %89, ptr %84, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %scalar.ph, %91
  %indvars.iv.next51 = add nsw i64 %indvars.iv50, -1
  %.not27.not = icmp sgt i64 %indvars.iv50, %29
  br i1 %.not27.not, label %scalar.ph, label %._crit_edge, !llvm.loop !22

._crit_edge44:                                    ; preds = %._crit_edge40, %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 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

attributes #0 = { mustprogress nofree 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 nounwind willreturn memory(argmem: write) }

!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 = !{!14}
!14 = distinct !{!14, !15}
!15 = distinct !{!15, !"LVerDomain"}
!16 = !{!17}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !10, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10, !19}


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