; LLVM IR from tangjz/acm-icpc :: 51nod (1435)

; 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
@cnt = external dso_local global [10 x i32], align 16
@str = external dso_local global [16 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL4last = external hidden constant [10 x i32], align 16

; 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
  %7 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %9

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

13:                                               ; preds = %9
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %28

14:                                               ; preds = %9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [16 x i8], ptr @str, i64 0, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !9
  %19 = sext i8 %18 to i32
  %20 = sub nsw i32 %19, 48
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !5
  br label %25

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

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

29:                                               ; preds = %44, %28
  %30 = load i32, ptr %3, align 4, !tbaa !5
  %31 = icmp sge i32 %30, 2
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %29
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = add nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = add nsw i32 %42, %38
  store i32 %43, ptr %41, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %33
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr %3, align 4, !tbaa !5
  br label %29, !llvm.loop !12

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

48:                                               ; preds = %123, %47
  %49 = load i32, ptr %4, align 4, !tbaa !5
  %50 = icmp sge i32 %49, 2
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %126

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

59:                                               ; preds = %52
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [10 x i32], ptr @_ZL4last, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %70, %63
  store i32 %71, ptr %69, align 4, !tbaa !5
  %72 = load i32, ptr %4, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !5
  %76 = load i32, ptr %4, align 4, !tbaa !5
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [10 x i32], ptr @_ZL4last, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = sdiv i32 %76, %80
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = add nsw i32 %84, %75
  store i32 %85, ptr %83, align 4, !tbaa !5
  br label %122

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

87:                                               ; preds = %99, %86
  %88 = load i32, ptr %6, align 4, !tbaa !5
  %89 = load i32, ptr %4, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = icmp slt i32 %88, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %87
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %102

95:                                               ; preds = %87
  %96 = load i32, ptr %4, align 4, !tbaa !5
  %97 = add nsw i32 48, %96
  %98 = call i32 @putchar(i32 noundef %97)
  br label %99

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

102:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 2, ptr %7, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %118, %102
  %104 = load i32, ptr %7, align 4, !tbaa !5
  %105 = load i32, ptr %4, align 4, !tbaa !5
  %106 = icmp sle i32 %104, %105
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %121

108:                                              ; preds = %103
  %109 = load i32, ptr %4, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %110
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = load i32, ptr %7, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = sub nsw i32 %116, %112
  store i32 %117, ptr %115, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %108
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %7, align 4, !tbaa !5
  br label %103, !llvm.loop !14

121:                                              ; preds = %107
  br label %122

122:                                              ; preds = %121, %59
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %4, align 4, !tbaa !5
  %125 = add nsw i32 %124, -1
  store i32 %125, ptr %4, align 4, !tbaa !5
  br label %48, !llvm.loop !15

126:                                              ; preds = %51
  %127 = call i32 @putchar(i32 noundef 10)
  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

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

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

@n = external dso_local global i32, align 4
@cnt = external dso_local local_unnamed_addr global [10 x i32], align 16
@str = external dso_local global [16 x i8], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@_ZL4last = external hidden local_unnamed_addr constant [10 x i32], align 16

; 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, ptr noundef nonnull @str)
  %2 = load i32, ptr @n, align 4, !tbaa !5
  %3 = icmp sgt i32 %2, 0
  br i1 %3, label %.lr.ph.preheader, label %.preheader33

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = zext nneg i32 %2 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %4 = icmp eq i32 %2, 1
  br i1 %4, label %.preheader33.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  br label %.lr.ph

.preheader33.loopexit.unr-lcssa:                  ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next.1, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader33, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %.preheader33.loopexit.unr-lcssa
  %5 = getelementptr inbounds [16 x i8], ptr @str, i64 0, i64 %indvars.iv.unr
  %6 = load i8, ptr %5, align 1, !tbaa !9
  %7 = sext i8 %6 to i64
  %8 = add nsw i64 %7, -48
  %9 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %8
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = add nsw i32 %10, 1
  store i32 %11, ptr %9, align 4, !tbaa !5
  br label %.preheader33

.preheader33:                                     ; preds = %.lr.ph.epil, %.preheader33.loopexit.unr-lcssa, %0
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 36), align 4, !tbaa !5
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 32), align 16, !tbaa !5
  %14 = add nsw i32 %13, %12
  store i32 %14, ptr getelementptr inbounds (i8, ptr @cnt, i64 32), align 16, !tbaa !5
  %15 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 28), align 4, !tbaa !5
  %16 = add nsw i32 %15, %14
  store i32 %16, ptr getelementptr inbounds (i8, ptr @cnt, i64 28), align 4, !tbaa !5
  %17 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !5
  %18 = add nsw i32 %17, %16
  store i32 %18, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !5
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 20), align 4, !tbaa !5
  %20 = add nsw i32 %19, %18
  store i32 %20, ptr getelementptr inbounds (i8, ptr @cnt, i64 20), align 4, !tbaa !5
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !5
  %22 = add nsw i32 %21, %20
  store i32 %22, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !5
  %23 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %24 = add nsw i32 %23, %22
  store i32 %24, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %25 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %26 = add nsw i32 %25, %24
  store i32 %26, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  br label %.preheader32

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader.new ], [ %indvars.iv.next.1, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.1, %.lr.ph ]
  %27 = getelementptr inbounds [16 x i8], ptr @str, i64 0, i64 %indvars.iv
  %28 = load i8, ptr %27, align 2, !tbaa !9
  %29 = sext i8 %28 to i64
  %30 = add nsw i64 %29, -48
  %31 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, 1
  store i32 %33, ptr %31, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %34 = getelementptr inbounds [16 x i8], ptr @str, i64 0, i64 %indvars.iv.next
  %35 = load i8, ptr %34, align 1, !tbaa !9
  %36 = sext i8 %35 to i64
  %37 = add nsw i64 %36, -48
  %38 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %38, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 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 %.preheader33.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !10

41:                                               ; preds = %.loopexit
  %42 = tail call i32 @putchar(i32 noundef 10)
  ret i32 0

.preheader32:                                     ; preds = %.preheader33, %.loopexit
  %indvars.iv56 = phi i64 [ 9, %.preheader33 ], [ %indvars.iv.next57, %.loopexit ]
  %indvars.iv54 = phi i64 [ 10, %.preheader33 ], [ %indvars.iv.next55, %.loopexit ]
  %43 = getelementptr inbounds [10 x i32], ptr @_ZL4last, i64 0, i64 %indvars.iv56
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = zext i32 %44 to i64
  %.not = icmp eq i64 %indvars.iv56, %45
  %46 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %indvars.iv56
  %47 = load i32, ptr %46, align 4, !tbaa !5
  br i1 %.not, label %.preheader31, label %51

.preheader31:                                     ; preds = %.preheader32
  %48 = icmp sgt i32 %47, 0
  br i1 %48, label %.lr.ph37, label %.lr.ph40

.lr.ph37:                                         ; preds = %.preheader31
  %49 = trunc i64 %indvars.iv56 to i32
  %50 = add i32 %49, 48
  br label %63

51:                                               ; preds = %.preheader32
  %52 = sext i32 %44 to i64
  %53 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, %47
  store i32 %55, ptr %53, align 4, !tbaa !5
  %56 = load i32, ptr %46, align 4, !tbaa !5
  %57 = trunc nuw nsw i64 %indvars.iv56 to i32
  %58 = sdiv i32 %57, %44
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [10 x i32], ptr @cnt, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, %56
  store i32 %62, ptr %60, align 4, !tbaa !5
  br label %.loopexit

63:                                               ; preds = %.lr.ph37, %63
  %.02536 = phi i32 [ 0, %.lr.ph37 ], [ %65, %63 ]
  %64 = tail call i32 @putchar(i32 noundef %50)
  %65 = add nuw nsw i32 %.02536, 1
  %66 = load i32, ptr %46, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %63, label %.lr.ph40, !llvm.loop !12

.lr.ph40:                                         ; preds = %.preheader31, %63
  %68 = load i32, ptr %46, align 4, !tbaa !5
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %70 = sub nsw i32 %69, %68
  store i32 %70, ptr getelementptr inbounds (i8, ptr @cnt, i64 8), align 8, !tbaa !5
  %exitcond53.not = icmp eq i64 %indvars.iv54, 3
  br i1 %exitcond53.not, label %.loopexit, label %.lr.ph40.1, !llvm.loop !13

.lr.ph40.1:                                       ; preds = %.lr.ph40
  %71 = load i32, ptr %46, align 4, !tbaa !5
  %72 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %73 = sub nsw i32 %72, %71
  store i32 %73, ptr getelementptr inbounds (i8, ptr @cnt, i64 12), align 4, !tbaa !5
  %exitcond53.not.1 = icmp eq i64 %indvars.iv54, 4
  br i1 %exitcond53.not.1, label %.loopexit, label %.lr.ph40.2, !llvm.loop !13

.lr.ph40.2:                                       ; preds = %.lr.ph40.1
  %74 = load i32, ptr %46, align 4, !tbaa !5
  %75 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !5
  %76 = sub nsw i32 %75, %74
  store i32 %76, ptr getelementptr inbounds (i8, ptr @cnt, i64 16), align 16, !tbaa !5
  %exitcond53.not.2 = icmp eq i64 %indvars.iv54, 5
  br i1 %exitcond53.not.2, label %.loopexit, label %.lr.ph40.3, !llvm.loop !13

.lr.ph40.3:                                       ; preds = %.lr.ph40.2
  %77 = load i32, ptr %46, align 4, !tbaa !5
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 20), align 4, !tbaa !5
  %79 = sub nsw i32 %78, %77
  store i32 %79, ptr getelementptr inbounds (i8, ptr @cnt, i64 20), align 4, !tbaa !5
  %exitcond53.not.3 = icmp eq i64 %indvars.iv54, 6
  br i1 %exitcond53.not.3, label %.loopexit, label %.lr.ph40.4, !llvm.loop !13

.lr.ph40.4:                                       ; preds = %.lr.ph40.3
  %80 = load i32, ptr %46, align 4, !tbaa !5
  %81 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !5
  %82 = sub nsw i32 %81, %80
  store i32 %82, ptr getelementptr inbounds (i8, ptr @cnt, i64 24), align 8, !tbaa !5
  %exitcond53.not.4 = icmp eq i64 %indvars.iv54, 7
  br i1 %exitcond53.not.4, label %.loopexit, label %.lr.ph40.5, !llvm.loop !13

.lr.ph40.5:                                       ; preds = %.lr.ph40.4
  %83 = load i32, ptr %46, align 4, !tbaa !5
  %84 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 28), align 4, !tbaa !5
  %85 = sub nsw i32 %84, %83
  store i32 %85, ptr getelementptr inbounds (i8, ptr @cnt, i64 28), align 4, !tbaa !5
  %exitcond53.not.5 = icmp eq i64 %indvars.iv54, 8
  br i1 %exitcond53.not.5, label %.loopexit, label %.lr.ph40.6, !llvm.loop !13

.lr.ph40.6:                                       ; preds = %.lr.ph40.5
  %86 = load i32, ptr %46, align 4, !tbaa !5
  %87 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 32), align 16, !tbaa !5
  %88 = sub nsw i32 %87, %86
  store i32 %88, ptr getelementptr inbounds (i8, ptr @cnt, i64 32), align 16, !tbaa !5
  %exitcond53.not.6 = icmp eq i64 %indvars.iv54, 9
  br i1 %exitcond53.not.6, label %.loopexit, label %.lr.ph40.7, !llvm.loop !13

.lr.ph40.7:                                       ; preds = %.lr.ph40.6
  %89 = load i32, ptr %46, align 4, !tbaa !5
  %90 = load i32, ptr getelementptr inbounds (i8, ptr @cnt, i64 36), align 4, !tbaa !5
  %91 = sub nsw i32 %90, %89
  store i32 %91, ptr getelementptr inbounds (i8, ptr @cnt, i64 36), align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph40, %.lr.ph40.1, %.lr.ph40.2, %.lr.ph40.3, %.lr.ph40.4, %.lr.ph40.5, %.lr.ph40.6, %.lr.ph40.7, %51
  %indvars.iv.next57 = add nsw i64 %indvars.iv56, -1
  %92 = icmp ugt i64 %indvars.iv56, 2
  %indvars.iv.next55 = add nsw i64 %indvars.iv54, -1
  br i1 %92, label %.preheader32, label %41, !llvm.loop !14
}

; 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

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


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