; LLVM IR from tangjz/acm-icpc :: luogu (1049)

; 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
@v = external dso_local global i32, align 4
@num = external dso_local global i32, align 4
@f = external dso_local global [20001 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; 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
  store i32 0, ptr %1, align 4
  store i8 1, ptr @f, align 16, !tbaa !5
  %5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @v, ptr noundef @n)
  br label %6

6:                                                ; preds = %35, %0
  %7 = load i32, ptr @n, align 4, !tbaa !9
  %8 = add nsw i32 %7, -1
  store i32 %8, ptr @n, align 4, !tbaa !9
  %9 = icmp ne i32 %7, 0
  br i1 %9, label %10, label %36

10:                                               ; preds = %6
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef @num)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  %12 = load i32, ptr @v, align 4, !tbaa !9
  %13 = load i32, ptr @num, align 4, !tbaa !9
  %14 = sub nsw i32 %12, %13
  store i32 %14, ptr %2, align 4, !tbaa !9
  br label %15

15:                                               ; preds = %32, %10
  %16 = load i32, ptr %2, align 4, !tbaa !9
  %17 = icmp sge i32 %16, 0
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %15
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %21
  %23 = load i8, ptr %22, align 1, !tbaa !5, !range !11, !noundef !12
  %24 = trunc i8 %23 to i1
  br i1 %24, label %25, label %31

25:                                               ; preds = %19
  %26 = load i32, ptr %2, align 4, !tbaa !9
  %27 = load i32, ptr @num, align 4, !tbaa !9
  %28 = add nsw i32 %26, %27
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %29
  store i8 1, ptr %30, align 1, !tbaa !5
  br label %31

31:                                               ; preds = %25, %19
  br label %32

32:                                               ; preds = %31
  %33 = load i32, ptr %2, align 4, !tbaa !9
  %34 = add nsw i32 %33, -1
  store i32 %34, ptr %2, align 4, !tbaa !9
  br label %15, !llvm.loop !13

35:                                               ; preds = %18
  br label %6, !llvm.loop !15

36:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  %37 = load i32, ptr @v, align 4, !tbaa !9
  store i32 %37, ptr %3, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %54, %36
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = icmp sge i32 %39, 0
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 7, ptr %4, align 4
  br label %57

42:                                               ; preds = %38
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !5, !range !11, !noundef !12
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %53

48:                                               ; preds = %42
  %49 = load i32, ptr @v, align 4, !tbaa !9
  %50 = load i32, ptr %3, align 4, !tbaa !9
  %51 = sub nsw i32 %49, %50
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %51)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  br label %57

53:                                               ; preds = %42
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr %3, align 4, !tbaa !9
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %3, align 4, !tbaa !9
  br label %38, !llvm.loop !16

57:                                               ; preds = %48, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  %58 = load i32, ptr %4, align 4
  switch i32 %58, label %61 [
    i32 7, label %59
    i32 1, label %59
  ]

59:                                               ; preds = %57, %57
  %60 = load i32, ptr %1, align 4
  ret i32 %60

61:                                               ; preds = %57
  unreachable
}

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

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 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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

; Function Attrs: mustprogress nofree norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  store i8 1, ptr @f, align 16, !tbaa !5
  %1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @v, ptr noundef nonnull @n)
  %2 = load i32, ptr @n, align 4, !tbaa !9
  %3 = add nsw i32 %2, -1
  store i32 %3, ptr @n, align 4, !tbaa !9
  %.not14 = icmp eq i32 %2, 0
  br i1 %.not14, label %.._crit_edge_crit_edge, label %.lr.ph15

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre = load i32, ptr @v, align 4, !tbaa !9
  br label %._crit_edge

.loopexit11:                                      ; preds = %123, %middle.block, %vec.epilog.middle.block, %.lr.ph15
  %4 = load i32, ptr @n, align 4, !tbaa !9
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @n, align 4, !tbaa !9
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph15, !llvm.loop !11

.lr.ph15:                                         ; preds = %0, %.loopexit11
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @num)
  %7 = load i32, ptr @v, align 4, !tbaa !9
  %8 = load i32, ptr @num, align 4, !tbaa !9
  %9 = sub nsw i32 %7, %8
  %10 = icmp sgt i32 %9, -1
  br i1 %10, label %iter.check, label %.loopexit11

iter.check:                                       ; preds = %.lr.ph15
  %11 = zext nneg i32 %9 to i64
  %12 = sext i32 %8 to i64
  %13 = add nuw nsw i64 %11, 1
  %min.iters.check = icmp ult i32 %9, 7
  br i1 %min.iters.check, label %.lr.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %iter.check
  %14 = getelementptr i8, ptr @f, i64 %12
  %scevgep = getelementptr i8, ptr %14, i64 %11
  %15 = icmp ugt ptr %14, %scevgep
  %scevgep26 = getelementptr i8, ptr @f, i64 %11
  %16 = icmp ult ptr %scevgep26, @f
  %17 = or i1 %15, %16
  %18 = add nsw i64 %12, 15
  %diff.check = icmp ult i64 %18, 16
  %or.cond = select i1 %17, i1 true, i1 %diff.check
  br i1 %or.cond, label %.lr.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.scevcheck
  %min.iters.check30 = icmp ult i32 %9, 15
  br i1 %min.iters.check30, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %13, 4294967280
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue60, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue60 ]
  %offset.idx = sub i64 %11, %index
  %gep = getelementptr [20001 x i8], ptr getelementptr (i8, ptr @f, i64 -15), i64 0, i64 %offset.idx
  %wide.load = load <16 x i8>, ptr %gep, align 1, !tbaa !5
  %reverse = shufflevector <16 x i8> %wide.load, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  %19 = trunc <16 x i8> %reverse to <16 x i1>
  %20 = extractelement <16 x i1> %19, i64 0
  br i1 %20, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %21 = add nsw i64 %offset.idx, %12
  %22 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %21
  store i8 1, ptr %22, align 1, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %23 = extractelement <16 x i1> %19, i64 1
  br i1 %23, label %pred.store.if31, label %pred.store.continue32

pred.store.if31:                                  ; preds = %pred.store.continue
  %24 = add i64 %offset.idx, -1
  %25 = add nsw i64 %24, %12
  %26 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %25
  store i8 1, ptr %26, align 1, !tbaa !5
  br label %pred.store.continue32

pred.store.continue32:                            ; preds = %pred.store.if31, %pred.store.continue
  %27 = extractelement <16 x i1> %19, i64 2
  br i1 %27, label %pred.store.if33, label %pred.store.continue34

pred.store.if33:                                  ; preds = %pred.store.continue32
  %28 = add i64 %offset.idx, -2
  %29 = add nsw i64 %28, %12
  %30 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %29
  store i8 1, ptr %30, align 1, !tbaa !5
  br label %pred.store.continue34

pred.store.continue34:                            ; preds = %pred.store.if33, %pred.store.continue32
  %31 = extractelement <16 x i1> %19, i64 3
  br i1 %31, label %pred.store.if35, label %pred.store.continue36

pred.store.if35:                                  ; preds = %pred.store.continue34
  %32 = add i64 %offset.idx, -3
  %33 = add nsw i64 %32, %12
  %34 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %33
  store i8 1, ptr %34, align 1, !tbaa !5
  br label %pred.store.continue36

pred.store.continue36:                            ; preds = %pred.store.if35, %pred.store.continue34
  %35 = extractelement <16 x i1> %19, i64 4
  br i1 %35, label %pred.store.if37, label %pred.store.continue38

pred.store.if37:                                  ; preds = %pred.store.continue36
  %36 = add i64 %offset.idx, -4
  %37 = add nsw i64 %36, %12
  %38 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %37
  store i8 1, ptr %38, align 1, !tbaa !5
  br label %pred.store.continue38

pred.store.continue38:                            ; preds = %pred.store.if37, %pred.store.continue36
  %39 = extractelement <16 x i1> %19, i64 5
  br i1 %39, label %pred.store.if39, label %pred.store.continue40

pred.store.if39:                                  ; preds = %pred.store.continue38
  %40 = add i64 %offset.idx, -5
  %41 = add nsw i64 %40, %12
  %42 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %41
  store i8 1, ptr %42, align 1, !tbaa !5
  br label %pred.store.continue40

pred.store.continue40:                            ; preds = %pred.store.if39, %pred.store.continue38
  %43 = extractelement <16 x i1> %19, i64 6
  br i1 %43, label %pred.store.if41, label %pred.store.continue42

pred.store.if41:                                  ; preds = %pred.store.continue40
  %44 = add i64 %offset.idx, -6
  %45 = add nsw i64 %44, %12
  %46 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %45
  store i8 1, ptr %46, align 1, !tbaa !5
  br label %pred.store.continue42

pred.store.continue42:                            ; preds = %pred.store.if41, %pred.store.continue40
  %47 = extractelement <16 x i1> %19, i64 7
  br i1 %47, label %pred.store.if43, label %pred.store.continue44

pred.store.if43:                                  ; preds = %pred.store.continue42
  %48 = add i64 %offset.idx, -7
  %49 = add nsw i64 %48, %12
  %50 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %49
  store i8 1, ptr %50, align 1, !tbaa !5
  br label %pred.store.continue44

pred.store.continue44:                            ; preds = %pred.store.if43, %pred.store.continue42
  %51 = extractelement <16 x i1> %19, i64 8
  br i1 %51, label %pred.store.if45, label %pred.store.continue46

pred.store.if45:                                  ; preds = %pred.store.continue44
  %52 = add i64 %offset.idx, -8
  %53 = add nsw i64 %52, %12
  %54 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %53
  store i8 1, ptr %54, align 1, !tbaa !5
  br label %pred.store.continue46

pred.store.continue46:                            ; preds = %pred.store.if45, %pred.store.continue44
  %55 = extractelement <16 x i1> %19, i64 9
  br i1 %55, label %pred.store.if47, label %pred.store.continue48

pred.store.if47:                                  ; preds = %pred.store.continue46
  %56 = add i64 %offset.idx, -9
  %57 = add nsw i64 %56, %12
  %58 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %57
  store i8 1, ptr %58, align 1, !tbaa !5
  br label %pred.store.continue48

pred.store.continue48:                            ; preds = %pred.store.if47, %pred.store.continue46
  %59 = extractelement <16 x i1> %19, i64 10
  br i1 %59, label %pred.store.if49, label %pred.store.continue50

pred.store.if49:                                  ; preds = %pred.store.continue48
  %60 = add i64 %offset.idx, -10
  %61 = add nsw i64 %60, %12
  %62 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %61
  store i8 1, ptr %62, align 1, !tbaa !5
  br label %pred.store.continue50

pred.store.continue50:                            ; preds = %pred.store.if49, %pred.store.continue48
  %63 = extractelement <16 x i1> %19, i64 11
  br i1 %63, label %pred.store.if51, label %pred.store.continue52

pred.store.if51:                                  ; preds = %pred.store.continue50
  %64 = add i64 %offset.idx, -11
  %65 = add nsw i64 %64, %12
  %66 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %65
  store i8 1, ptr %66, align 1, !tbaa !5
  br label %pred.store.continue52

pred.store.continue52:                            ; preds = %pred.store.if51, %pred.store.continue50
  %67 = extractelement <16 x i1> %19, i64 12
  br i1 %67, label %pred.store.if53, label %pred.store.continue54

pred.store.if53:                                  ; preds = %pred.store.continue52
  %68 = add i64 %offset.idx, -12
  %69 = add nsw i64 %68, %12
  %70 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %69
  store i8 1, ptr %70, align 1, !tbaa !5
  br label %pred.store.continue54

pred.store.continue54:                            ; preds = %pred.store.if53, %pred.store.continue52
  %71 = extractelement <16 x i1> %19, i64 13
  br i1 %71, label %pred.store.if55, label %pred.store.continue56

pred.store.if55:                                  ; preds = %pred.store.continue54
  %72 = add i64 %offset.idx, -13
  %73 = add nsw i64 %72, %12
  %74 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %73
  store i8 1, ptr %74, align 1, !tbaa !5
  br label %pred.store.continue56

pred.store.continue56:                            ; preds = %pred.store.if55, %pred.store.continue54
  %75 = extractelement <16 x i1> %19, i64 14
  br i1 %75, label %pred.store.if57, label %pred.store.continue58

pred.store.if57:                                  ; preds = %pred.store.continue56
  %76 = add i64 %offset.idx, -14
  %77 = add nsw i64 %76, %12
  %78 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %77
  store i8 1, ptr %78, align 1, !tbaa !5
  br label %pred.store.continue58

pred.store.continue58:                            ; preds = %pred.store.if57, %pred.store.continue56
  %79 = extractelement <16 x i1> %19, i64 15
  br i1 %79, label %pred.store.if59, label %pred.store.continue60

pred.store.if59:                                  ; preds = %pred.store.continue58
  %80 = add i64 %offset.idx, -15
  %81 = add nsw i64 %80, %12
  %82 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %81
  store i8 1, ptr %82, align 1, !tbaa !5
  br label %pred.store.continue60

pred.store.continue60:                            ; preds = %pred.store.if59, %pred.store.continue58
  %index.next = add nuw i64 %index, 16
  %83 = icmp eq i64 %index.next, %n.vec
  br i1 %83, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %pred.store.continue60
  %cmp.n = icmp eq i64 %13, %n.vec
  br i1 %cmp.n, label %.loopexit11, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end63 = sub nsw i64 %11, %n.vec
  %n.vec.remaining = and i64 %13, 8
  %min.epilog.iters.check.not.not = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check.not.not, label %.lr.ph.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec62 = and i64 %13, 4294967288
  %ind.end = sub nsw i64 %11, %n.vec62
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %pred.store.continue83, %vec.epilog.ph
  %index64 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next84, %pred.store.continue83 ]
  %offset.idx65 = sub i64 %11, %index64
  %gep88 = getelementptr [20001 x i8], ptr getelementptr (i8, ptr @f, i64 -7), i64 0, i64 %offset.idx65
  %wide.load66 = load <8 x i8>, ptr %gep88, align 1, !tbaa !5
  %reverse67 = shufflevector <8 x i8> %wide.load66, <8 x i8> poison, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
  %84 = trunc <8 x i8> %reverse67 to <8 x i1>
  %85 = extractelement <8 x i1> %84, i64 0
  br i1 %85, label %pred.store.if68, label %pred.store.continue69

pred.store.if68:                                  ; preds = %vec.epilog.vector.body
  %86 = add nsw i64 %offset.idx65, %12
  %87 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %86
  store i8 1, ptr %87, align 1, !tbaa !5
  br label %pred.store.continue69

pred.store.continue69:                            ; preds = %pred.store.if68, %vec.epilog.vector.body
  %88 = extractelement <8 x i1> %84, i64 1
  br i1 %88, label %pred.store.if70, label %pred.store.continue71

pred.store.if70:                                  ; preds = %pred.store.continue69
  %89 = add i64 %offset.idx65, -1
  %90 = add nsw i64 %89, %12
  %91 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %90
  store i8 1, ptr %91, align 1, !tbaa !5
  br label %pred.store.continue71

pred.store.continue71:                            ; preds = %pred.store.if70, %pred.store.continue69
  %92 = extractelement <8 x i1> %84, i64 2
  br i1 %92, label %pred.store.if72, label %pred.store.continue73

pred.store.if72:                                  ; preds = %pred.store.continue71
  %93 = add i64 %offset.idx65, -2
  %94 = add nsw i64 %93, %12
  %95 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %94
  store i8 1, ptr %95, align 1, !tbaa !5
  br label %pred.store.continue73

pred.store.continue73:                            ; preds = %pred.store.if72, %pred.store.continue71
  %96 = extractelement <8 x i1> %84, i64 3
  br i1 %96, label %pred.store.if74, label %pred.store.continue75

pred.store.if74:                                  ; preds = %pred.store.continue73
  %97 = add i64 %offset.idx65, -3
  %98 = add nsw i64 %97, %12
  %99 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %98
  store i8 1, ptr %99, align 1, !tbaa !5
  br label %pred.store.continue75

pred.store.continue75:                            ; preds = %pred.store.if74, %pred.store.continue73
  %100 = extractelement <8 x i1> %84, i64 4
  br i1 %100, label %pred.store.if76, label %pred.store.continue77

pred.store.if76:                                  ; preds = %pred.store.continue75
  %101 = add i64 %offset.idx65, -4
  %102 = add nsw i64 %101, %12
  %103 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %102
  store i8 1, ptr %103, align 1, !tbaa !5
  br label %pred.store.continue77

pred.store.continue77:                            ; preds = %pred.store.if76, %pred.store.continue75
  %104 = extractelement <8 x i1> %84, i64 5
  br i1 %104, label %pred.store.if78, label %pred.store.continue79

pred.store.if78:                                  ; preds = %pred.store.continue77
  %105 = add i64 %offset.idx65, -5
  %106 = add nsw i64 %105, %12
  %107 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %106
  store i8 1, ptr %107, align 1, !tbaa !5
  br label %pred.store.continue79

pred.store.continue79:                            ; preds = %pred.store.if78, %pred.store.continue77
  %108 = extractelement <8 x i1> %84, i64 6
  br i1 %108, label %pred.store.if80, label %pred.store.continue81

pred.store.if80:                                  ; preds = %pred.store.continue79
  %109 = add i64 %offset.idx65, -6
  %110 = add nsw i64 %109, %12
  %111 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %110
  store i8 1, ptr %111, align 1, !tbaa !5
  br label %pred.store.continue81

pred.store.continue81:                            ; preds = %pred.store.if80, %pred.store.continue79
  %112 = extractelement <8 x i1> %84, i64 7
  br i1 %112, label %pred.store.if82, label %pred.store.continue83

pred.store.if82:                                  ; preds = %pred.store.continue81
  %113 = add i64 %offset.idx65, -7
  %114 = add nsw i64 %113, %12
  %115 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %114
  store i8 1, ptr %115, align 1, !tbaa !5
  br label %pred.store.continue83

pred.store.continue83:                            ; preds = %pred.store.if82, %pred.store.continue81
  %index.next84 = add nuw i64 %index64, 8
  %116 = icmp eq i64 %index.next84, %n.vec62
  br i1 %116, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !16

vec.epilog.middle.block:                          ; preds = %pred.store.continue83
  %cmp.n85 = icmp eq i64 %13, %n.vec62
  br i1 %cmp.n85, label %.loopexit11, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %vec.epilog.middle.block, %vector.scevcheck, %iter.check, %vec.epilog.iter.check
  %indvars.iv.ph = phi i64 [ %11, %iter.check ], [ %11, %vector.scevcheck ], [ %ind.end63, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %123
  %indvars.iv = phi i64 [ %indvars.iv.next, %123 ], [ %indvars.iv.ph, %.lr.ph.preheader ]
  %117 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %indvars.iv
  %118 = load i8, ptr %117, align 1, !tbaa !5, !range !17, !noundef !18
  %119 = trunc nuw i8 %118 to i1
  br i1 %119, label %120, label %123

120:                                              ; preds = %.lr.ph
  %121 = add nsw i64 %indvars.iv, %12
  %122 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %121
  store i8 1, ptr %122, align 1, !tbaa !5
  br label %123

123:                                              ; preds = %.lr.ph, %120
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %124 = icmp sgt i64 %indvars.iv, 0
  br i1 %124, label %.lr.ph, label %.loopexit11, !llvm.loop !19

._crit_edge:                                      ; preds = %.loopexit11, %.._crit_edge_crit_edge
  %125 = phi i32 [ %.pre, %.._crit_edge_crit_edge ], [ %7, %.loopexit11 ]
  %126 = icmp sgt i32 %125, -1
  br i1 %126, label %.lr.ph18.preheader, label %.loopexit

.lr.ph18.preheader:                               ; preds = %._crit_edge
  %127 = zext nneg i32 %125 to i64
  br label %.lr.ph18

.lr.ph18:                                         ; preds = %.lr.ph18.preheader, %135
  %indvars.iv21 = phi i64 [ %127, %.lr.ph18.preheader ], [ %indvars.iv.next22, %135 ]
  %128 = getelementptr inbounds [20001 x i8], ptr @f, i64 0, i64 %indvars.iv21
  %129 = load i8, ptr %128, align 1, !tbaa !5, !range !17, !noundef !18
  %130 = trunc nuw i8 %129 to i1
  br i1 %130, label %131, label %135

131:                                              ; preds = %.lr.ph18
  %132 = trunc nuw nsw i64 %indvars.iv21 to i32
  %133 = sub nsw i32 %125, %132
  %134 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %133)
  br label %.loopexit

135:                                              ; preds = %.lr.ph18
  %indvars.iv.next22 = add nsw i64 %indvars.iv21, -1
  %136 = icmp sgt i64 %indvars.iv21, 0
  br i1 %136, label %.lr.ph18, label %.loopexit, !llvm.loop !20

.loopexit:                                        ; preds = %135, %._crit_edge, %131
  ret i32 0
}

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

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

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!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, !14, !15}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12, !14}
!20 = distinct !{!20, !12}


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