; LLVM IR from tangjz/acm-icpc :: codeforces/complete (475A)

; 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
@vis = external dso_local global [3 x [11 x i32]], align 16
@vis2 = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 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 @n)
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = icmp sle i32 %8, 2
  br i1 %9, label %10, label %25

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

11:                                               ; preds = %21, %10
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %11
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [3 x [11 x i32]], ptr @vis, i64 0, i64 %18
  %20 = getelementptr inbounds [11 x i32], ptr %19, i64 0, i64 0
  store i32 1, ptr %20, align 4, !tbaa !5
  br label %21

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

24:                                               ; preds = %15
  br label %46

25:                                               ; preds = %0
  store i32 1, ptr @vis2, align 4, !tbaa !5
  %26 = load i32, ptr @n, align 4, !tbaa !5
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %28

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

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

33:                                               ; preds = %28
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = srem i32 %34, 3
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [3 x [11 x i32]], ptr @vis, i64 0, i64 %36
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = sdiv i32 %38, 3
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [11 x i32], ptr %37, i64 0, i64 %40
  store i32 1, ptr %41, align 4, !tbaa !5
  br label %42

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

45:                                               ; preds = %32
  br label %46

46:                                               ; preds = %45, %24
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %64, %46
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = icmp slt i32 %49, 11
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %67

52:                                               ; preds = %48
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [11 x i32], ptr @vis, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %52
  br label %60

59:                                               ; preds = %52
  br label %60

60:                                               ; preds = %59, %58
  %61 = phi ptr [ @.str.3, %58 ], [ @.str.4, %59 ]
  %62 = getelementptr inbounds [3 x i8], ptr %61, i64 0, i64 0
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %62)
  br label %64

64:                                               ; preds = %60
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  br label %48, !llvm.loop !12

67:                                               ; preds = %51
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %85, %67
  %70 = load i32, ptr %5, align 4, !tbaa !5
  %71 = icmp slt i32 %70, 11
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %88

73:                                               ; preds = %69
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds ([3 x [11 x i32]], ptr @vis, i64 0, i64 1), i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %73
  br label %81

80:                                               ; preds = %73
  br label %81

81:                                               ; preds = %80, %79
  %82 = phi ptr [ @.str.3, %79 ], [ @.str.4, %80 ]
  %83 = getelementptr inbounds [3 x i8], ptr %82, i64 0, i64 0
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %83)
  br label %85

85:                                               ; preds = %81
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %5, align 4, !tbaa !5
  br label %69, !llvm.loop !13

88:                                               ; preds = %72
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %90 = load i32, ptr @vis2, align 4, !tbaa !5
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %88
  br label %94

93:                                               ; preds = %88
  br label %94

94:                                               ; preds = %93, %92
  %95 = phi ptr [ @.str.3, %92 ], [ @.str.4, %93 ]
  %96 = getelementptr inbounds [3 x i8], ptr %95, i64 0, i64 0
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %96)
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %115, %94
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = icmp slt i32 %100, 11
  br i1 %101, label %103, label %102

102:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %118

103:                                              ; preds = %99
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [11 x i32], ptr getelementptr inbounds ([3 x [11 x i32]], ptr @vis, i64 0, i64 2), i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %103
  br label %111

110:                                              ; preds = %103
  br label %111

111:                                              ; preds = %110, %109
  %112 = phi ptr [ @.str.3, %109 ], [ @.str.4, %110 ]
  %113 = getelementptr inbounds [3 x i8], ptr %112, i64 0, i64 0
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, ptr noundef %113)
  br label %115

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

118:                                              ; preds = %102
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  ret i32 0
}

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

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

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

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 = !{!"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"

@n = external dso_local global i32, align 4
@vis = external dso_local local_unnamed_addr global [3 x [11 x i32]], align 16
@vis2 = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 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 @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = icmp slt i32 %2, 3
  br i1 %3, label %.preheader, label %.lr.ph.preheader

.preheader:                                       ; preds = %0
  %4 = icmp sgt i32 %2, 0
  br i1 %4, label %vector.body, label %.loopexit

vector.body:                                      ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %2 to i64
  %trip.count.minus.1 = add nsw i64 %wide.trip.count, -1
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %trip.count.minus.1, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %5 = icmp uge <2 x i64> %broadcast.splat, <i64 0, i64 1>
  %6 = extractelement <2 x i1> %5, i64 0
  br i1 %6, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  store i32 1, ptr @vis, align 16, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %7 = extractelement <2 x i1> %5, i64 1
  br i1 %7, label %pred.store.if49, label %.loopexit

pred.store.if49:                                  ; preds = %pred.store.continue
  store i32 1, ptr getelementptr inbounds (i8, ptr @vis, i64 44), align 4, !tbaa !5
  br label %.loopexit

.lr.ph.preheader:                                 ; preds = %0
  store i32 1, ptr @vis2, align 4, !tbaa !5
  %8 = add nsw i32 %2, -1
  store i32 %8, ptr @n, align 4, !tbaa !5
  %xtraiter = and i32 %8, 1
  %unroll_iter = and i32 %8, -2
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader
  %.02026 = phi i32 [ 0, %.lr.ph.preheader ], [ %20, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader ], [ %niter.next.1, %.lr.ph ]
  %9 = urem i32 %.02026, 3
  %10 = zext nneg i32 %9 to i64
  %11 = udiv i32 %.02026, 3
  %12 = zext nneg i32 %11 to i64
  %13 = getelementptr inbounds [3 x [11 x i32]], ptr @vis, i64 0, i64 %10, i64 %12
  store i32 1, ptr %13, align 4, !tbaa !5
  %14 = or disjoint i32 %.02026, 1
  %15 = urem i32 %14, 3
  %16 = zext nneg i32 %15 to i64
  %17 = udiv i32 %14, 3
  %18 = zext nneg i32 %17 to i64
  %19 = getelementptr inbounds [3 x [11 x i32]], ptr @vis, i64 0, i64 %16, i64 %18
  store i32 1, ptr %19, align 4, !tbaa !5
  %20 = add nuw nsw i32 %.02026, 2
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit51.unr-lcssa, label %.lr.ph, !llvm.loop !9

.loopexit.loopexit51.unr-lcssa:                   ; preds = %.lr.ph
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.loopexit.loopexit51.unr-lcssa
  %21 = urem i32 %20, 3
  %22 = zext nneg i32 %21 to i64
  %23 = udiv i32 %20, 3
  %24 = zext nneg i32 %23 to i64
  %25 = getelementptr inbounds [3 x [11 x i32]], ptr @vis, i64 0, i64 %22, i64 %24
  store i32 1, ptr %25, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph.epil, %.loopexit.loopexit51.unr-lcssa, %pred.store.continue, %pred.store.if49, %.preheader
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %27 = load i32, ptr @vis, align 16, !tbaa !5
  %.not24 = icmp eq i32 %27, 0
  %.str.3..str.4 = select i1 %.not24, ptr @.str.4, ptr @.str.3
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4)
  %29 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 4), align 4, !tbaa !5
  %.not24.1 = icmp eq i32 %29, 0
  %.str.3..str.4.1 = select i1 %.not24.1, ptr @.str.4, ptr @.str.3
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.1)
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 8), align 8, !tbaa !5
  %.not24.2 = icmp eq i32 %31, 0
  %.str.3..str.4.2 = select i1 %.not24.2, ptr @.str.4, ptr @.str.3
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.2)
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 12), align 4, !tbaa !5
  %.not24.3 = icmp eq i32 %33, 0
  %.str.3..str.4.3 = select i1 %.not24.3, ptr @.str.4, ptr @.str.3
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.3)
  %35 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 16), align 16, !tbaa !5
  %.not24.4 = icmp eq i32 %35, 0
  %.str.3..str.4.4 = select i1 %.not24.4, ptr @.str.4, ptr @.str.3
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.4)
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 20), align 4, !tbaa !5
  %.not24.5 = icmp eq i32 %37, 0
  %.str.3..str.4.5 = select i1 %.not24.5, ptr @.str.4, ptr @.str.3
  %38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.5)
  %39 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 24), align 8, !tbaa !5
  %.not24.6 = icmp eq i32 %39, 0
  %.str.3..str.4.6 = select i1 %.not24.6, ptr @.str.4, ptr @.str.3
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.6)
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 28), align 4, !tbaa !5
  %.not24.7 = icmp eq i32 %41, 0
  %.str.3..str.4.7 = select i1 %.not24.7, ptr @.str.4, ptr @.str.3
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.7)
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 32), align 16, !tbaa !5
  %.not24.8 = icmp eq i32 %43, 0
  %.str.3..str.4.8 = select i1 %.not24.8, ptr @.str.4, ptr @.str.3
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.8)
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 36), align 4, !tbaa !5
  %.not24.9 = icmp eq i32 %45, 0
  %.str.3..str.4.9 = select i1 %.not24.9, ptr @.str.4, ptr @.str.3
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.9)
  %47 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 40), align 8, !tbaa !5
  %.not24.10 = icmp eq i32 %47, 0
  %.str.3..str.4.10 = select i1 %.not24.10, ptr @.str.4, ptr @.str.3
  %48 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.4.10)
  %49 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %50 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 44), align 4, !tbaa !5
  %.not23 = icmp eq i32 %50, 0
  %.str.3..str.41 = select i1 %.not23, ptr @.str.4, ptr @.str.3
  %51 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41)
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 48), align 16, !tbaa !5
  %.not23.1 = icmp eq i32 %52, 0
  %.str.3..str.41.1 = select i1 %.not23.1, ptr @.str.4, ptr @.str.3
  %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.1)
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 52), align 4, !tbaa !5
  %.not23.2 = icmp eq i32 %54, 0
  %.str.3..str.41.2 = select i1 %.not23.2, ptr @.str.4, ptr @.str.3
  %55 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.2)
  %56 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 56), align 8, !tbaa !5
  %.not23.3 = icmp eq i32 %56, 0
  %.str.3..str.41.3 = select i1 %.not23.3, ptr @.str.4, ptr @.str.3
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.3)
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 60), align 4, !tbaa !5
  %.not23.4 = icmp eq i32 %58, 0
  %.str.3..str.41.4 = select i1 %.not23.4, ptr @.str.4, ptr @.str.3
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.4)
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 64), align 16, !tbaa !5
  %.not23.5 = icmp eq i32 %60, 0
  %.str.3..str.41.5 = select i1 %.not23.5, ptr @.str.4, ptr @.str.3
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.5)
  %62 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 68), align 4, !tbaa !5
  %.not23.6 = icmp eq i32 %62, 0
  %.str.3..str.41.6 = select i1 %.not23.6, ptr @.str.4, ptr @.str.3
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.6)
  %64 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 72), align 8, !tbaa !5
  %.not23.7 = icmp eq i32 %64, 0
  %.str.3..str.41.7 = select i1 %.not23.7, ptr @.str.4, ptr @.str.3
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.7)
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 76), align 4, !tbaa !5
  %.not23.8 = icmp eq i32 %66, 0
  %.str.3..str.41.8 = select i1 %.not23.8, ptr @.str.4, ptr @.str.3
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.8)
  %68 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 80), align 16, !tbaa !5
  %.not23.9 = icmp eq i32 %68, 0
  %.str.3..str.41.9 = select i1 %.not23.9, ptr @.str.4, ptr @.str.3
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.9)
  %70 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 84), align 4, !tbaa !5
  %.not23.10 = icmp eq i32 %70, 0
  %.str.3..str.41.10 = select i1 %.not23.10, ptr @.str.4, ptr @.str.3
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.41.10)
  %72 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %73 = load i32, ptr @vis2, align 4, !tbaa !5
  %.not = icmp eq i32 %73, 0
  %74 = select i1 %.not, ptr @.str.4, ptr @.str.3
  %75 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %74)
  %76 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 88), align 8, !tbaa !5
  %.not22 = icmp eq i32 %77, 0
  %.str.3..str.42 = select i1 %.not22, ptr @.str.4, ptr @.str.3
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42)
  %79 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 92), align 4, !tbaa !5
  %.not22.1 = icmp eq i32 %79, 0
  %.str.3..str.42.1 = select i1 %.not22.1, ptr @.str.4, ptr @.str.3
  %80 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.1)
  %81 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 96), align 16, !tbaa !5
  %.not22.2 = icmp eq i32 %81, 0
  %.str.3..str.42.2 = select i1 %.not22.2, ptr @.str.4, ptr @.str.3
  %82 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.2)
  %83 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 100), align 4, !tbaa !5
  %.not22.3 = icmp eq i32 %83, 0
  %.str.3..str.42.3 = select i1 %.not22.3, ptr @.str.4, ptr @.str.3
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.3)
  %85 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 104), align 8, !tbaa !5
  %.not22.4 = icmp eq i32 %85, 0
  %.str.3..str.42.4 = select i1 %.not22.4, ptr @.str.4, ptr @.str.3
  %86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.4)
  %87 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 108), align 4, !tbaa !5
  %.not22.5 = icmp eq i32 %87, 0
  %.str.3..str.42.5 = select i1 %.not22.5, ptr @.str.4, ptr @.str.3
  %88 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.5)
  %89 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 112), align 16, !tbaa !5
  %.not22.6 = icmp eq i32 %89, 0
  %.str.3..str.42.6 = select i1 %.not22.6, ptr @.str.4, ptr @.str.3
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.6)
  %91 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 116), align 4, !tbaa !5
  %.not22.7 = icmp eq i32 %91, 0
  %.str.3..str.42.7 = select i1 %.not22.7, ptr @.str.4, ptr @.str.3
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.7)
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 120), align 8, !tbaa !5
  %.not22.8 = icmp eq i32 %93, 0
  %.str.3..str.42.8 = select i1 %.not22.8, ptr @.str.4, ptr @.str.3
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.8)
  %95 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 124), align 4, !tbaa !5
  %.not22.9 = icmp eq i32 %95, 0
  %.str.3..str.42.9 = select i1 %.not22.9, ptr @.str.4, ptr @.str.3
  %96 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.9)
  %97 = load i32, ptr getelementptr inbounds (i8, ptr @vis, i64 128), align 16, !tbaa !5
  %.not22.10 = icmp eq i32 %97, 0
  %.str.3..str.42.10 = select i1 %.not22.10, ptr @.str.4, ptr @.str.3
  %98 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, ptr noundef nonnull %.str.3..str.42.10)
  %99 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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