; LLVM IR from tangjz/acm-icpc :: uoj (18)

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

@d = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@cnt = external dso_local global [129 x [129 x i32]], align 16
@ans1 = external dso_local global i32, align 4
@ans2 = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 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
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @d, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %78, %0
  %23 = load i32, ptr %2, 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 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %81

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %4, ptr noundef %5, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %29 = load i32, ptr %4, align 4, !tbaa !5
  %30 = load i32, ptr @d, align 4, !tbaa !5
  %31 = sub nsw i32 %29, %30
  store i32 %31, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %33 = load i32, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  store i32 %33, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %34 = load i32, ptr %4, align 4, !tbaa !5
  %35 = load i32, ptr @d, align 4, !tbaa !5
  %36 = add nsw i32 %34, %35
  store i32 %36, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 128, ptr %12, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %38 = load i32, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  store i32 %38, ptr %10, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %74, %27
  %40 = load i32, ptr %7, align 4, !tbaa !5
  %41 = load i32, ptr %10, align 4, !tbaa !5
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = load i32, ptr @d, align 4, !tbaa !5
  %47 = sub nsw i32 %45, %46
  store i32 %47, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %49 = load i32, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  store i32 %49, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %50 = load i32, ptr %5, align 4, !tbaa !5
  %51 = load i32, ptr @d, align 4, !tbaa !5
  %52 = add nsw i32 %50, %51
  store i32 %52, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 128, ptr %18, align 4, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %54 = load i32, ptr %53, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  store i32 %54, ptr %16, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %70, %44
  %56 = load i32, ptr %13, align 4, !tbaa !5
  %57 = load i32, ptr %16, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %73

60:                                               ; preds = %55
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %63
  %65 = load i32, ptr %13, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [129 x i32], ptr %64, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = add nsw i32 %68, %61
  store i32 %69, ptr %67, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %60
  %71 = load i32, ptr %13, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %13, align 4, !tbaa !5
  br label %55, !llvm.loop !9

73:                                               ; preds = %59
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %7, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %7, align 4, !tbaa !5
  br label %39, !llvm.loop !11

77:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %2, align 4, !tbaa !5
  br label %22, !llvm.loop !12

81:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %128, %81
  %83 = load i32, ptr %19, align 4, !tbaa !5
  %84 = icmp slt i32 %83, 129
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  br label %131

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

87:                                               ; preds = %124, %86
  %88 = load i32, ptr %20, align 4, !tbaa !5
  %89 = icmp slt i32 %88, 129
  br i1 %89, label %91, label %90

90:                                               ; preds = %87
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  br label %127

91:                                               ; preds = %87
  %92 = load i32, ptr @ans1, align 4, !tbaa !5
  %93 = load i32, ptr %19, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %94
  %96 = load i32, ptr %20, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [129 x i32], ptr %95, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = icmp slt i32 %92, %99
  br i1 %100, label %101, label %109

101:                                              ; preds = %91
  %102 = load i32, ptr %19, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %103
  %105 = load i32, ptr %20, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds [129 x i32], ptr %104, i64 0, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  store i32 %108, ptr @ans1, align 4, !tbaa !5
  store i32 1, ptr @ans2, align 4, !tbaa !5
  br label %123

109:                                              ; preds = %91
  %110 = load i32, ptr @ans1, align 4, !tbaa !5
  %111 = load i32, ptr %19, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %112
  %114 = load i32, ptr %20, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [129 x i32], ptr %113, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = icmp eq i32 %110, %117
  br i1 %118, label %119, label %122

119:                                              ; preds = %109
  %120 = load i32, ptr @ans2, align 4, !tbaa !5
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr @ans2, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %119, %109
  br label %123

123:                                              ; preds = %122, %101
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %20, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %20, align 4, !tbaa !5
  br label %87, !llvm.loop !13

127:                                              ; preds = %90
  br label %128

128:                                              ; preds = %127
  %129 = load i32, ptr %19, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %19, align 4, !tbaa !5
  br label %82, !llvm.loop !14

131:                                              ; preds = %85
  %132 = load i32, ptr @ans2, align 4, !tbaa !5
  %133 = load i32, ptr @ans1, align 4, !tbaa !5
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %132, i32 noundef %133)
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; 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 nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

@d = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@cnt = external dso_local local_unnamed_addr global [129 x [129 x i32]], align 16
@ans1 = external dso_local local_unnamed_addr global i32, align 4
@ans2 = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #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
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @d, ptr noundef nonnull @n)
  %13 = load i32, ptr @n, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph37, label %.preheader27

.preheader27:                                     ; preds = %._crit_edge34, %0
  %ans2.promoted39 = load i32, ptr @ans2, align 4, !tbaa !5
  %ans1.promoted43 = load i32, ptr @ans1, align 4, !tbaa !5
  br label %.preheader

.lr.ph37:                                         ; preds = %0, %._crit_edge34
  %.02135 = phi i32 [ %28, %._crit_edge34 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = load i32, ptr @d, align 4, !tbaa !5
  %18 = sub nsw i32 %16, %17
  store i32 %18, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %20 = load i32, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = load i32, ptr @d, align 4, !tbaa !5
  %23 = add nsw i32 %22, %21
  store i32 %23, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 128, ptr %7, align 4, !tbaa !5
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %.not30 = icmp sgt i32 %20, %25
  br i1 %.not30, label %._crit_edge34, label %.lr.ph33.preheader

.lr.ph33.preheader:                               ; preds = %.lr.ph37
  %26 = sext i32 %20 to i64
  %27 = add i32 %25, 1
  br label %.lr.ph33

._crit_edge34:                                    ; preds = %._crit_edge, %.lr.ph37
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  %28 = add nuw nsw i32 %.02135, 1
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %.lr.ph37, label %.preheader27, !llvm.loop !9

.lr.ph33:                                         ; preds = %.lr.ph33.preheader, %._crit_edge
  %indvars.iv51 = phi i64 [ %26, %.lr.ph33.preheader ], [ %indvars.iv.next52, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = load i32, ptr @d, align 4, !tbaa !5
  %33 = sub nsw i32 %31, %32
  store i32 %33, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %35 = load i32, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = load i32, ptr @d, align 4, !tbaa !5
  %38 = add nsw i32 %37, %36
  store i32 %38, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 128, ptr %11, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  %.not2628 = icmp sgt i32 %35, %40
  br i1 %.not2628, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph33
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %35 to i64
  %43 = add i32 %40, 1
  %44 = sub i32 %40, %35
  %45 = zext i32 %44 to i64
  %46 = add nuw nsw i64 %45, 1
  %min.iters.check = icmp ult i32 %44, 7
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ %42, %.lr.ph ], [ %ind.end, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %46, 8589934584
  %ind.end = add nsw i64 %n.vec, %42
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %41, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 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 %index, %42
  %47 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %indvars.iv51, i64 %offset.idx
  %48 = getelementptr inbounds i8, ptr %47, i64 16
  %wide.load = load <4 x i32>, ptr %47, align 4, !tbaa !5
  %wide.load69 = load <4 x i32>, ptr %48, align 4, !tbaa !5
  %49 = add nsw <4 x i32> %wide.load, %broadcast.splat
  %50 = add nsw <4 x i32> %wide.load69, %broadcast.splat
  store <4 x i32> %49, ptr %47, align 4, !tbaa !5
  store <4 x i32> %50, ptr %48, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %51 = icmp eq i64 %index.next, %n.vec
  br i1 %51, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %46, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %.lr.ph33
  %indvars.iv.next52 = add nsw i64 %indvars.iv51, 1
  %lftr.wideiv54 = trunc i64 %indvars.iv.next52 to i32
  %exitcond55.not = icmp eq i32 %27, %lftr.wideiv54
  br i1 %exitcond55.not, label %._crit_edge34, label %.lr.ph33, !llvm.loop !14

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %52 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %indvars.iv51, i64 %indvars.iv
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, %41
  store i32 %54, ptr %52, align 4, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %43, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %scalar.ph, !llvm.loop !15

.preheader:                                       ; preds = %.preheader27, %57
  %indvars.iv60 = phi i64 [ 0, %.preheader27 ], [ %indvars.iv.next61, %57 ]
  %ans2.promoted4248 = phi i32 [ %ans2.promoted39, %.preheader27 ], [ %71, %57 ]
  %ans1.promoted4647 = phi i32 [ %ans1.promoted43, %.preheader27 ], [ %70, %57 ]
  br label %58

55:                                               ; preds = %57
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %71, i32 noundef %70)
  ret i32 0

57:                                               ; preds = %69
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond63.not = icmp eq i64 %indvars.iv.next61, 129
  br i1 %exitcond63.not, label %55, label %.preheader, !llvm.loop !16

58:                                               ; preds = %83, %.preheader
  %indvars.iv56 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next57.1, %83 ]
  %ans1.promoted45 = phi i32 [ %ans1.promoted4647, %.preheader ], [ %84, %83 ]
  %ans2.promoted41 = phi i32 [ %ans2.promoted4248, %.preheader ], [ %85, %83 ]
  %59 = phi i32 [ %ans1.promoted4647, %.preheader ], [ %87, %83 ]
  %60 = phi i32 [ %ans2.promoted4248, %.preheader ], [ %86, %83 ]
  %61 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %indvars.iv60, i64 %indvars.iv56
  %62 = load i32, ptr %61, align 4, !tbaa !5
  %63 = icmp slt i32 %59, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %58
  store i32 %62, ptr @ans1, align 4, !tbaa !5
  br label %.sink.split

65:                                               ; preds = %58
  %66 = icmp eq i32 %59, %62
  br i1 %66, label %67, label %69

67:                                               ; preds = %65
  %68 = add nsw i32 %60, 1
  br label %.sink.split

.sink.split:                                      ; preds = %67, %64
  %.sink = phi i32 [ 1, %64 ], [ %68, %67 ]
  %.ph = phi i32 [ %62, %64 ], [ %ans1.promoted45, %67 ]
  %.ph67 = phi i32 [ %62, %64 ], [ %59, %67 ]
  store i32 %.sink, ptr @ans2, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %.sink.split, %65
  %70 = phi i32 [ %ans1.promoted45, %65 ], [ %.ph, %.sink.split ]
  %71 = phi i32 [ %ans2.promoted41, %65 ], [ %.sink, %.sink.split ]
  %72 = phi i32 [ %60, %65 ], [ %.sink, %.sink.split ]
  %73 = phi i32 [ %59, %65 ], [ %.ph67, %.sink.split ]
  %exitcond59.not = icmp eq i64 %indvars.iv56, 128
  br i1 %exitcond59.not, label %57, label %74, !llvm.loop !17

74:                                               ; preds = %69
  %indvars.iv.next57 = or disjoint i64 %indvars.iv56, 1
  %75 = getelementptr inbounds [129 x [129 x i32]], ptr @cnt, i64 0, i64 %indvars.iv60, i64 %indvars.iv.next57
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = icmp slt i32 %73, %76
  br i1 %77, label %82, label %78

78:                                               ; preds = %74
  %79 = icmp eq i32 %73, %76
  br i1 %79, label %80, label %83

80:                                               ; preds = %78
  %81 = add nsw i32 %72, 1
  br label %.sink.split.1

82:                                               ; preds = %74
  store i32 %76, ptr @ans1, align 4, !tbaa !5
  br label %.sink.split.1

.sink.split.1:                                    ; preds = %82, %80
  %.sink.1 = phi i32 [ 1, %82 ], [ %81, %80 ]
  %.ph.1 = phi i32 [ %76, %82 ], [ %70, %80 ]
  %.ph67.1 = phi i32 [ %76, %82 ], [ %73, %80 ]
  store i32 %.sink.1, ptr @ans2, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %.sink.split.1, %78
  %84 = phi i32 [ %70, %78 ], [ %.ph.1, %.sink.split.1 ]
  %85 = phi i32 [ %71, %78 ], [ %.sink.1, %.sink.split.1 ]
  %86 = phi i32 [ %72, %78 ], [ %.sink.1, %.sink.split.1 ]
  %87 = phi i32 [ %73, %78 ], [ %.ph67.1, %.sink.split.1 ]
  %indvars.iv.next57.1 = add nuw nsw i64 %indvars.iv56, 2
  br label %58
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !13, !12}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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