; LLVM IR from tangjz/acm-icpc :: buaa/oj3rd (1180)

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

@k = external dso_local global i32, align 4
@first = external dso_local global i32, align 4
@str = external dso_local global [21 x [21 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 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
  br label %7

7:                                                ; preds = %117, %0
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @k)
  %9 = icmp eq i32 %8, 1
  br i1 %9, label %10, label %118

10:                                               ; preds = %7
  %11 = load i32, ptr @first, align 4, !tbaa !5
  %12 = icmp ne i32 %11, 0
  br i1 %12, label %13, label %15

13:                                               ; preds = %10
  %14 = call i32 @putchar(i32 noundef 10)
  br label %16

15:                                               ; preds = %10
  store i32 1, ptr @first, align 4, !tbaa !5
  br label %16

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

17:                                               ; preds = %93, %16
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @k, align 4, !tbaa !5
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = sub nsw i32 %19, %20
  %22 = icmp slt i32 %18, %21
  br i1 %22, label %24, label %23

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

24:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %25 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %25, ptr %4, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %54, %24
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load i32, ptr @k, align 4, !tbaa !5
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sub nsw i32 %28, %29
  %31 = icmp slt i32 %27, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %26
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = and i32 %34, 1
  %36 = icmp ne i32 %35, 0
  %37 = zext i1 %36 to i64
  %38 = select i1 %36, i8 35, i8 42
  %39 = load i32, ptr @k, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = sub nsw i32 %39, %40
  %42 = sub nsw i32 %41, 1
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %43
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [21 x i8], ptr %44, i64 0, i64 %46
  store i8 %38, ptr %47, align 1, !tbaa !9
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %49
  %51 = load i32, ptr %4, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [21 x i8], ptr %50, i64 0, i64 %52
  store i8 %38, ptr %53, align 1, !tbaa !9
  br label %54

54:                                               ; preds = %33
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %4, align 4, !tbaa !5
  br label %26, !llvm.loop !10

57:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %5, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %89, %57
  %61 = load i32, ptr %5, align 4, !tbaa !5
  %62 = load i32, ptr @k, align 4, !tbaa !5
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = sub nsw i32 %62, %63
  %65 = sub nsw i32 %64, 1
  %66 = icmp slt i32 %61, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %60
  store i32 10, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %92

68:                                               ; preds = %60
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = and i32 %69, 1
  %71 = icmp ne i32 %70, 0
  %72 = zext i1 %71 to i64
  %73 = select i1 %71, i8 35, i8 42
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %75
  %77 = load i32, ptr @k, align 4, !tbaa !5
  %78 = load i32, ptr %2, align 4, !tbaa !5
  %79 = sub nsw i32 %77, %78
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [21 x i8], ptr %76, i64 0, i64 %81
  store i8 %73, ptr %82, align 1, !tbaa !9
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %84
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [21 x i8], ptr %85, i64 0, i64 %87
  store i8 %73, ptr %88, align 1, !tbaa !9
  br label %89

89:                                               ; preds = %68
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %5, align 4, !tbaa !5
  br label %60, !llvm.loop !12

92:                                               ; preds = %67
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !13

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

97:                                               ; preds = %114, %96
  %98 = load i32, ptr %6, align 4, !tbaa !5
  %99 = load i32, ptr @k, align 4, !tbaa !5
  %100 = icmp slt i32 %98, %99
  br i1 %100, label %102, label %101

101:                                              ; preds = %97
  store i32 13, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %117

102:                                              ; preds = %97
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %104
  %106 = load i32, ptr @k, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [21 x i8], ptr %105, i64 0, i64 %107
  store i8 0, ptr %108, align 1, !tbaa !9
  %109 = load i32, ptr %6, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %110
  %112 = getelementptr inbounds [21 x i8], ptr %111, i64 0, i64 0
  %113 = call i32 @puts(ptr noundef %112)
  br label %114

114:                                              ; preds = %102
  %115 = load i32, ptr %6, align 4, !tbaa !5
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %6, align 4, !tbaa !5
  br label %97, !llvm.loop !14

117:                                              ; preds = %101
  br label %7, !llvm.loop !15

118:                                              ; preds = %7
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #2

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

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

declare i32 @puts(ptr noundef) #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 = { inlinehint 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 #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 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}
!13 = distinct !{!13, !11}
!14 = distinct !{!14, !11}
!15 = distinct !{!15, !11}


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

@k = external dso_local global i32, align 4
@first = external dso_local local_unnamed_addr global i32, align 4
@str = external dso_local global [21 x [21 x i8]], align 16
@.str = external hidden unnamed_addr constant [3 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 @k)
  %2 = icmp eq i32 %1, 1
  br i1 %2, label %.lr.ph40, label %._crit_edge

.loopexit34:                                      ; preds = %.lr.ph39, %9, %.preheader33
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @k)
  %4 = icmp eq i32 %3, 1
  br i1 %4, label %.lr.ph40, label %._crit_edge, !llvm.loop !5

.lr.ph40:                                         ; preds = %0, %.loopexit34
  %5 = load i32, ptr @first, align 4, !tbaa !7
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %8, label %6

6:                                                ; preds = %.lr.ph40
  %7 = tail call i32 @putchar(i32 noundef 10)
  br label %9

8:                                                ; preds = %.lr.ph40
  store i32 1, ptr @first, align 4, !tbaa !7
  br label %9

9:                                                ; preds = %8, %6
  %10 = load i32, ptr @k, align 4, !tbaa !7
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.preheader.preheader, label %.loopexit34

.preheader.preheader:                             ; preds = %9
  %12 = add nsw i32 %10, -1
  %13 = zext nneg i32 %12 to i64
  %14 = zext nneg i32 %10 to i64
  %15 = zext nneg i32 %10 to i64
  %16 = mul nuw nsw i64 %14, 21
  %17 = mul nuw nsw i64 %14, 22
  %invariant.gep = getelementptr i8, ptr @str, i64 %14
  %gep85 = getelementptr i8, ptr getelementptr (i8, ptr @str, i64 -21), i64 %17
  %gep86 = getelementptr i8, ptr getelementptr (i8, ptr @str, i64 -21), i64 %16
  br label %iter.check

.loopexit:                                        ; preds = %.lr.ph, %.loopexit84
  %18 = sub nsw i32 %10, %indvars66
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  %indvars.iv.next58 = add nsw i64 %indvars.iv57, -1
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %indvars.iv.next56 = add nsw i64 %indvars.iv55, -1
  br i1 %20, label %iter.check, label %.preheader33, !llvm.loop !11

.preheader33:                                     ; preds = %.loopexit
  br i1 %11, label %.lr.ph39, label %.loopexit34

iter.check:                                       ; preds = %.preheader.preheader, %.loopexit
  %indvars.iv59 = phi i64 [ %15, %.preheader.preheader ], [ %indvars.iv.next60, %.loopexit ]
  %indvars.iv57 = phi i64 [ %14, %.preheader.preheader ], [ %indvars.iv.next58, %.loopexit ]
  %indvars.iv55 = phi i64 [ %13, %.preheader.preheader ], [ %indvars.iv.next56, %.loopexit ]
  %indvars.iv46 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next47, %.loopexit ]
  %indvars.iv = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next, %.loopexit ]
  %21 = xor i64 %indvars.iv, -1
  %22 = add nsw i64 %21, %15
  %23 = shl nuw i64 %indvars.iv, 1
  %24 = sub i64 %14, %23
  %25 = and i64 %indvars.iv, 1
  %.not32 = icmp eq i64 %25, 0
  %26 = select i1 %.not32, i8 42, i8 35
  %indvars.iv.next60 = add nsw i64 %indvars.iv59, -1
  %min.iters.check = icmp ult i64 %24, 8
  br i1 %min.iters.check, label %vec.epilog.scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %iter.check
  %27 = mul nuw nsw i64 %indvars.iv, 20
  %gep = getelementptr i8, ptr %invariant.gep, i64 %27
  %28 = mul nuw nsw i64 %indvars.iv, 22
  %scevgep72 = getelementptr i8, ptr @str, i64 %28
  %29 = mul nsw i64 %indvars.iv, -22
  %scevgep71 = getelementptr i8, ptr %gep85, i64 %29
  %30 = mul nsw i64 %indvars.iv, -20
  %scevgep = getelementptr i8, ptr %gep86, i64 %30
  %bound0 = icmp ult ptr %scevgep, %gep
  %bound1 = icmp ult ptr %scevgep72, %scevgep71
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %vec.epilog.scalar.ph.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %vector.memcheck
  %min.iters.check74 = icmp ult i64 %24, 32
  br i1 %min.iters.check74, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %24, -32
  %broadcast.splatinsert = insertelement <16 x i8> poison, i8 %26, i64 0
  %broadcast.splat = shufflevector <16 x i8> %broadcast.splatinsert, <16 x i8> poison, <16 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %indvars.iv, %index
  %31 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv.next60, i64 %offset.idx
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  store <16 x i8> %broadcast.splat, ptr %31, align 1, !tbaa !12, !alias.scope !13, !noalias !16
  store <16 x i8> %broadcast.splat, ptr %32, align 1, !tbaa !12, !alias.scope !13, !noalias !16
  %33 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 %offset.idx
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  store <16 x i8> %broadcast.splat, ptr %33, align 1, !tbaa !12, !alias.scope !16
  store <16 x i8> %broadcast.splat, ptr %34, align 1, !tbaa !12, !alias.scope !16
  %index.next = add nuw i64 %index, 32
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %24, %n.vec
  br i1 %cmp.n, label %.loopexit84, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end77 = add i64 %indvars.iv, %n.vec
  %n.vec.remaining = and i64 %24, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %vec.epilog.scalar.ph.preheader, label %vec.epilog.ph

vec.epilog.scalar.ph.preheader:                   ; preds = %vec.epilog.middle.block, %vector.memcheck, %iter.check, %vec.epilog.iter.check
  %indvars.iv41.ph = phi i64 [ %indvars.iv, %iter.check ], [ %indvars.iv, %vector.memcheck ], [ %ind.end77, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  %36 = sub i64 %indvars.iv57, %indvars.iv41.ph
  %xtraiter = and i64 %36, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %vec.epilog.scalar.ph.prol.loopexit, label %vec.epilog.scalar.ph.prol

vec.epilog.scalar.ph.prol:                        ; preds = %vec.epilog.scalar.ph.preheader
  %37 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv.next60, i64 %indvars.iv41.ph
  store i8 %26, ptr %37, align 1, !tbaa !12
  %38 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 %indvars.iv41.ph
  store i8 %26, ptr %38, align 1, !tbaa !12
  %indvars.iv.next42.prol = add nuw nsw i64 %indvars.iv41.ph, 1
  br label %vec.epilog.scalar.ph.prol.loopexit

vec.epilog.scalar.ph.prol.loopexit:               ; preds = %vec.epilog.scalar.ph.prol, %vec.epilog.scalar.ph.preheader
  %indvars.iv41.unr = phi i64 [ %indvars.iv41.ph, %vec.epilog.scalar.ph.preheader ], [ %indvars.iv.next42.prol, %vec.epilog.scalar.ph.prol ]
  %39 = icmp eq i64 %22, %indvars.iv41.ph
  br i1 %39, label %.loopexit84, label %vec.epilog.scalar.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.vec76 = and i64 %24, -8
  %ind.end = add i64 %indvars.iv, %n.vec76
  %broadcast.splatinsert80 = insertelement <8 x i8> poison, i8 %26, i64 0
  %broadcast.splat81 = shufflevector <8 x i8> %broadcast.splatinsert80, <8 x i8> poison, <8 x i32> zeroinitializer
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %vec.epilog.vector.body, %vec.epilog.ph
  %index78 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next82, %vec.epilog.vector.body ]
  %offset.idx79 = add i64 %indvars.iv, %index78
  %40 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv.next60, i64 %offset.idx79
  store <8 x i8> %broadcast.splat81, ptr %40, align 1, !tbaa !12, !alias.scope !21, !noalias !24
  %41 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 %offset.idx79
  store <8 x i8> %broadcast.splat81, ptr %41, align 1, !tbaa !12, !alias.scope !24
  %index.next82 = add nuw i64 %index78, 8
  %42 = icmp eq i64 %index.next82, %n.vec76
  br i1 %42, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !26

vec.epilog.middle.block:                          ; preds = %vec.epilog.vector.body
  %cmp.n83 = icmp eq i64 %24, %n.vec76
  br i1 %cmp.n83, label %.loopexit84, label %vec.epilog.scalar.ph.preheader

.loopexit84:                                      ; preds = %vec.epilog.scalar.ph.prol.loopexit, %vec.epilog.scalar.ph, %vec.epilog.middle.block, %middle.block
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars66 = trunc i64 %indvars.iv.next to i32
  %43 = xor i64 %indvars.iv, -1
  %44 = add nsw i64 %15, %43
  %45 = icmp slt i64 %indvars.iv.next, %44
  br i1 %45, label %.lr.ph, label %.loopexit

vec.epilog.scalar.ph:                             ; preds = %vec.epilog.scalar.ph.prol.loopexit, %vec.epilog.scalar.ph
  %indvars.iv41 = phi i64 [ %indvars.iv.next42.1, %vec.epilog.scalar.ph ], [ %indvars.iv41.unr, %vec.epilog.scalar.ph.prol.loopexit ]
  %46 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv.next60, i64 %indvars.iv41
  store i8 %26, ptr %46, align 1, !tbaa !12
  %47 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 %indvars.iv41
  store i8 %26, ptr %47, align 1, !tbaa !12
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %48 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv.next60, i64 %indvars.iv.next42
  store i8 %26, ptr %48, align 1, !tbaa !12
  %49 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv, i64 %indvars.iv.next42
  store i8 %26, ptr %49, align 1, !tbaa !12
  %indvars.iv.next42.1 = add nuw nsw i64 %indvars.iv41, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next42.1, %indvars.iv57
  br i1 %exitcond.not.1, label %.loopexit84, label %vec.epilog.scalar.ph, !llvm.loop !27

.lr.ph:                                           ; preds = %.loopexit84, %.lr.ph
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.lr.ph ], [ %indvars.iv46, %.loopexit84 ]
  %50 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv48, i64 %44
  store i8 %26, ptr %50, align 1, !tbaa !12
  %51 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv48, i64 %indvars.iv
  store i8 %26, ptr %51, align 1, !tbaa !12
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next49, %indvars.iv55
  br i1 %exitcond54.not, label %.loopexit, label %.lr.ph, !llvm.loop !28

.lr.ph39:                                         ; preds = %.preheader33, %.lr.ph39
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph39 ], [ 0, %.preheader33 ]
  %52 = phi i32 [ %57, %.lr.ph39 ], [ %10, %.preheader33 ]
  %53 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv68
  %54 = sext i32 %52 to i64
  %55 = getelementptr inbounds [21 x [21 x i8]], ptr @str, i64 0, i64 %indvars.iv68, i64 %54
  store i8 0, ptr %55, align 1, !tbaa !12
  %56 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %53)
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %57 = load i32, ptr @k, align 4, !tbaa !7
  %58 = sext i32 %57 to i64
  %59 = icmp slt i64 %indvars.iv.next69, %58
  br i1 %59, label %.lr.ph39, label %.loopexit34, !llvm.loop !29

._crit_edge:                                      ; preds = %.loopexit34, %0
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(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 = { inlinehint mustprogress nofree 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" }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = !{!9, !9, i64 0}
!13 = !{!14}
!14 = distinct !{!14, !15}
!15 = distinct !{!15, !"LVerDomain"}
!16 = !{!17}
!17 = distinct !{!17, !15}
!18 = distinct !{!18, !6, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = !{!22}
!22 = distinct !{!22, !23}
!23 = distinct !{!23, !"LVerDomain"}
!24 = !{!25}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !6, !19, !20}
!27 = distinct !{!27, !6, !19}
!28 = distinct !{!28, !6}
!29 = distinct !{!29, !6}


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