; LLVM IR from tangjz/acm-icpc :: codeforces/complete (583B)

; 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
@a = external dso_local global [1010 x i32], align 16
@cnt = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@vis = external dso_local global [1010 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = 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 @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %8

8:                                                ; preds = %18, %0
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = load i32, ptr @n, align 4, !tbaa !5
  %11 = icmp sle i32 %9, %10
  br i1 %11, label %13, label %12

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

13:                                               ; preds = %8
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds i32, ptr @a, i64 %15
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %16)
  br label %18

18:                                               ; preds = %13
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  store i32 %20, ptr %2, align 4, !tbaa !5
  br label %8, !llvm.loop !9

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

22:                                               ; preds = %98, %21
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

26:                                               ; preds = %22
  store i32 5, ptr %4, align 4
  br label %101

27:                                               ; preds = %22
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = and i32 %28, 1
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %61

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %32 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %32, ptr %5, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %57, %31
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %37, label %36

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

37:                                               ; preds = %33
  %38 = load i32, ptr %5, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !11, !range !13, !noundef !14
  %42 = trunc i8 %41 to i1
  br i1 %42, label %56, label %43

43:                                               ; preds = %37
  %44 = load i32, ptr %5, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = load i32, ptr @cnt, align 4, !tbaa !5
  %49 = icmp sle i32 %47, %48
  br i1 %49, label %50, label %56

50:                                               ; preds = %43
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %52
  store i8 1, ptr %53, align 1, !tbaa !11
  %54 = load i32, ptr @cnt, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr @cnt, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %50, %43, %37
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %5, align 4, !tbaa !5
  br label %33, !llvm.loop !15

60:                                               ; preds = %36
  br label %91

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

62:                                               ; preds = %87, %61
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = icmp sle i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %90

67:                                               ; preds = %62
  %68 = load i32, ptr %6, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %69
  %71 = load i8, ptr %70, align 1, !tbaa !11, !range !13, !noundef !14
  %72 = trunc i8 %71 to i1
  br i1 %72, label %86, label %73

73:                                               ; preds = %67
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr @cnt, align 4, !tbaa !5
  %79 = icmp sle i32 %77, %78
  br i1 %79, label %80, label %86

80:                                               ; preds = %73
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %82
  store i8 1, ptr %83, align 1, !tbaa !11
  %84 = load i32, ptr @cnt, align 4, !tbaa !5
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr @cnt, align 4, !tbaa !5
  br label %86

86:                                               ; preds = %80, %73, %67
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %6, align 4, !tbaa !5
  br label %62, !llvm.loop !16

90:                                               ; preds = %66
  br label %91

91:                                               ; preds = %90, %60
  %92 = load i32, ptr @cnt, align 4, !tbaa !5
  %93 = load i32, ptr @n, align 4, !tbaa !5
  %94 = icmp eq i32 %92, %93
  br i1 %94, label %95, label %97

95:                                               ; preds = %91
  %96 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %96, ptr @ans, align 4, !tbaa !5
  store i32 5, ptr %4, align 4
  br label %101

97:                                               ; preds = %91
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %3, align 4, !tbaa !5
  br label %22, !llvm.loop !17

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

102:                                              ; preds = %101
  %103 = load i32, ptr @ans, align 4, !tbaa !5
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, i32 noundef %103)
  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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !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
@a = external dso_local global [1010 x i32], align 16
@cnt = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local local_unnamed_addr global i32, align 4
@vis = external dso_local local_unnamed_addr global [1010 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = 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 @n)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %.not31 = icmp slt i32 %2, 1
  br i1 %.not31, label %.loopexit29, label %.lr.ph

.preheader28:                                     ; preds = %.lr.ph
  %3 = icmp sgt i32 %12, 0
  br i1 %3, label %.lr.ph51.split.split.preheader, label %.loopexit29

.lr.ph51.split.split.preheader:                   ; preds = %.preheader28
  %cnt.promoted40 = load i32, ptr @cnt, align 4, !tbaa !5
  %4 = zext nneg i32 %12 to i64
  %5 = zext nneg i32 %12 to i64
  %xtraiter = and i64 %4, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  %6 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %4
  %7 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %4
  %indvars.iv.next75.prol = add nsw i64 %4, -1
  %8 = icmp eq i32 %12, 1
  %xtraiter89 = and i64 %5, 1
  %9 = icmp eq i32 %12, 1
  %unroll_iter = and i64 %5, 2147483646
  %lcmp.mod91.not = icmp eq i64 %xtraiter89, 0
  br label %.lr.ph51.split.split

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

.lr.ph51.split.split:                             ; preds = %.lr.ph51.split.split.preheader, %71
  %.01850 = phi i32 [ %72, %71 ], [ 0, %.lr.ph51.split.split.preheader ]
  %cnt.promoted364849 = phi i32 [ %cnt.promoted3643, %71 ], [ %cnt.promoted40, %.lr.ph51.split.split.preheader ]
  %14 = and i32 %.01850, 1
  %.not21 = icmp eq i32 %14, 0
  br i1 %.not21, label %.preheader.preheader, label %.preheader26.preheader

.preheader26.preheader:                           ; preds = %.lr.ph51.split.split
  br i1 %lcmp.mod.not, label %.preheader26.prol.loopexit, label %.preheader26.prol

.preheader26.prol:                                ; preds = %.preheader26.preheader
  %15 = load i8, ptr %6, align 1, !tbaa !11, !range !13, !noundef !14
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %.preheader26.prol.loopexit, label %17

17:                                               ; preds = %.preheader26.prol
  %18 = load i32, ptr %7, align 4, !tbaa !5
  %.not25.prol = icmp sgt i32 %18, %cnt.promoted364849
  br i1 %.not25.prol, label %.preheader26.prol.loopexit, label %19

19:                                               ; preds = %17
  store i8 1, ptr %6, align 1, !tbaa !11
  %20 = add nsw i32 %cnt.promoted364849, 1
  store i32 %20, ptr @cnt, align 4, !tbaa !5
  br label %.preheader26.prol.loopexit

.preheader26.prol.loopexit:                       ; preds = %.preheader26.prol, %17, %19, %.preheader26.preheader
  %cnt.promoted3641.lcssa.unr = phi i32 [ poison, %.preheader26.preheader ], [ %cnt.promoted364849, %.preheader26.prol ], [ %cnt.promoted364849, %17 ], [ %20, %19 ]
  %indvars.iv74.unr = phi i64 [ %4, %.preheader26.preheader ], [ %indvars.iv.next75.prol, %19 ], [ %indvars.iv.next75.prol, %17 ], [ %indvars.iv.next75.prol, %.preheader26.prol ]
  %.unr = phi i32 [ %cnt.promoted364849, %.preheader26.preheader ], [ %cnt.promoted364849, %.preheader26.prol ], [ %cnt.promoted364849, %17 ], [ %20, %19 ]
  br i1 %8, label %..loopexit_crit_edge, label %.preheader26

.preheader.preheader:                             ; preds = %.lr.ph51.split.split
  br i1 %9, label %..loopexit_crit_edge.loopexit.unr-lcssa, label %.preheader

.preheader26:                                     ; preds = %.preheader26.prol.loopexit, %39
  %indvars.iv74 = phi i64 [ %indvars.iv.next75.1, %39 ], [ %indvars.iv74.unr, %.preheader26.prol.loopexit ]
  %cnt.promoted3642 = phi i32 [ %cnt.promoted3641.1, %39 ], [ %.unr, %.preheader26.prol.loopexit ]
  %21 = phi i32 [ %40, %39 ], [ %.unr, %.preheader26.prol.loopexit ]
  %22 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %indvars.iv74
  %23 = load i8, ptr %22, align 1, !tbaa !11, !range !13, !noundef !14
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %.preheader26.1, label %25

25:                                               ; preds = %.preheader26
  %26 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv74
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %.not25 = icmp sgt i32 %27, %21
  br i1 %.not25, label %.preheader26.1, label %28

28:                                               ; preds = %25
  store i8 1, ptr %22, align 1, !tbaa !11
  %29 = add nsw i32 %21, 1
  store i32 %29, ptr @cnt, align 4, !tbaa !5
  br label %.preheader26.1

.preheader26.1:                                   ; preds = %.preheader26, %25, %28
  %cnt.promoted3641 = phi i32 [ %cnt.promoted3642, %.preheader26 ], [ %cnt.promoted3642, %25 ], [ %29, %28 ]
  %30 = phi i32 [ %21, %.preheader26 ], [ %21, %25 ], [ %29, %28 ]
  %indvars.iv.next75 = add nsw i64 %indvars.iv74, -1
  %31 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %indvars.iv.next75
  %32 = load i8, ptr %31, align 1, !tbaa !11, !range !13, !noundef !14
  %33 = trunc nuw i8 %32 to i1
  br i1 %33, label %39, label %34

34:                                               ; preds = %.preheader26.1
  %35 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv.next75
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not25.1 = icmp sgt i32 %36, %30
  br i1 %.not25.1, label %39, label %37

37:                                               ; preds = %34
  store i8 1, ptr %31, align 1, !tbaa !11
  %38 = add nsw i32 %30, 1
  store i32 %38, ptr @cnt, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %37, %34, %.preheader26.1
  %cnt.promoted3641.1 = phi i32 [ %cnt.promoted3641, %.preheader26.1 ], [ %cnt.promoted3641, %34 ], [ %38, %37 ]
  %40 = phi i32 [ %30, %.preheader26.1 ], [ %30, %34 ], [ %38, %37 ]
  %indvars.iv.next75.1 = add nsw i64 %indvars.iv74, -2
  %41 = icmp eq i64 %indvars.iv.next75.1, 0
  br i1 %41, label %..loopexit_crit_edge, label %.preheader26, !llvm.loop !15

.preheader:                                       ; preds = %.preheader.preheader, %60
  %indvars.iv77 = phi i64 [ %indvars.iv.next78.1, %60 ], [ 1, %.preheader.preheader ]
  %cnt.promoted3646 = phi i32 [ %cnt.promoted3645.1, %60 ], [ %cnt.promoted364849, %.preheader.preheader ]
  %42 = phi i32 [ %61, %60 ], [ %cnt.promoted364849, %.preheader.preheader ]
  %niter = phi i64 [ %niter.next.1, %60 ], [ 0, %.preheader.preheader ]
  %43 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %indvars.iv77
  %44 = load i8, ptr %43, align 1, !tbaa !11, !range !13, !noundef !14
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %.preheader.1, label %46

46:                                               ; preds = %.preheader
  %47 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv77
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %.not23 = icmp sgt i32 %48, %42
  br i1 %.not23, label %.preheader.1, label %49

49:                                               ; preds = %46
  store i8 1, ptr %43, align 1, !tbaa !11
  %50 = add nsw i32 %42, 1
  store i32 %50, ptr @cnt, align 4, !tbaa !5
  br label %.preheader.1

.preheader.1:                                     ; preds = %.preheader, %46, %49
  %cnt.promoted3645 = phi i32 [ %cnt.promoted3646, %.preheader ], [ %cnt.promoted3646, %46 ], [ %50, %49 ]
  %51 = phi i32 [ %42, %.preheader ], [ %42, %46 ], [ %50, %49 ]
  %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1
  %52 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %indvars.iv.next78
  %53 = load i8, ptr %52, align 1, !tbaa !11, !range !13, !noundef !14
  %54 = trunc nuw i8 %53 to i1
  br i1 %54, label %60, label %55

55:                                               ; preds = %.preheader.1
  %56 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv.next78
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %.not23.1 = icmp sgt i32 %57, %51
  br i1 %.not23.1, label %60, label %58

58:                                               ; preds = %55
  store i8 1, ptr %52, align 1, !tbaa !11
  %59 = add nsw i32 %51, 1
  store i32 %59, ptr @cnt, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %58, %55, %.preheader.1
  %cnt.promoted3645.1 = phi i32 [ %cnt.promoted3645, %.preheader.1 ], [ %cnt.promoted3645, %55 ], [ %59, %58 ]
  %61 = phi i32 [ %51, %.preheader.1 ], [ %51, %55 ], [ %59, %58 ]
  %indvars.iv.next78.1 = add nuw nsw i64 %indvars.iv77, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %..loopexit_crit_edge.loopexit.unr-lcssa, label %.preheader, !llvm.loop !16

..loopexit_crit_edge.loopexit.unr-lcssa:          ; preds = %60, %.preheader.preheader
  %cnt.promoted3645.lcssa.ph = phi i32 [ poison, %.preheader.preheader ], [ %cnt.promoted3645.1, %60 ]
  %indvars.iv77.unr = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next78.1, %60 ]
  %cnt.promoted3646.unr = phi i32 [ %cnt.promoted364849, %.preheader.preheader ], [ %cnt.promoted3645.1, %60 ]
  %.unr90 = phi i32 [ %cnt.promoted364849, %.preheader.preheader ], [ %61, %60 ]
  br i1 %lcmp.mod91.not, label %..loopexit_crit_edge, label %.preheader.epil

.preheader.epil:                                  ; preds = %..loopexit_crit_edge.loopexit.unr-lcssa
  %62 = getelementptr inbounds [1010 x i8], ptr @vis, i64 0, i64 %indvars.iv77.unr
  %63 = load i8, ptr %62, align 1, !tbaa !11, !range !13, !noundef !14
  %64 = trunc nuw i8 %63 to i1
  br i1 %64, label %..loopexit_crit_edge, label %65

65:                                               ; preds = %.preheader.epil
  %66 = getelementptr inbounds [1010 x i32], ptr @a, i64 0, i64 %indvars.iv77.unr
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %.not23.epil = icmp sgt i32 %67, %.unr90
  br i1 %.not23.epil, label %..loopexit_crit_edge, label %68

68:                                               ; preds = %65
  store i8 1, ptr %62, align 1, !tbaa !11
  %69 = add nsw i32 %.unr90, 1
  store i32 %69, ptr @cnt, align 4, !tbaa !5
  br label %..loopexit_crit_edge

..loopexit_crit_edge:                             ; preds = %.preheader26.prol.loopexit, %39, %..loopexit_crit_edge.loopexit.unr-lcssa, %68, %65, %.preheader.epil
  %cnt.promoted3643 = phi i32 [ %cnt.promoted3645.lcssa.ph, %..loopexit_crit_edge.loopexit.unr-lcssa ], [ %cnt.promoted3646.unr, %.preheader.epil ], [ %cnt.promoted3646.unr, %65 ], [ %69, %68 ], [ %cnt.promoted3641.lcssa.unr, %.preheader26.prol.loopexit ], [ %cnt.promoted3641.1, %39 ]
  %70 = icmp eq i32 %cnt.promoted3643, %12
  br i1 %70, label %.split.us, label %71

.split.us:                                        ; preds = %..loopexit_crit_edge
  store i32 %.01850, ptr @ans, align 4, !tbaa !5
  br label %.loopexit29

71:                                               ; preds = %..loopexit_crit_edge
  %72 = add nuw nsw i32 %.01850, 1
  %exitcond80.not = icmp eq i32 %72, %12
  br i1 %exitcond80.not, label %.loopexit29, label %.lr.ph51.split.split, !llvm.loop !17

.loopexit29:                                      ; preds = %71, %0, %.preheader28, %.split.us
  %73 = load i32, ptr @ans, align 4, !tbaa !5
  %74 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %73)
  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"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass