; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/196 Division 2/Problem D (D)

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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@x = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@p = external dso_local global [100100 x i32], align 16
@f = external dso_local global [100100 x i32], align 16
@dis = external dso_local global [100100 x i32], align 16
@nearest = external dso_local global [100100 x i32], align 16
@g = external dso_local global [100100 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5findPii(i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z13calcMaxBranchii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11furthestInPiii(i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7distToPiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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
  store i32 0, ptr %1, align 4
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m, ptr noundef @d)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %10

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

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

15:                                               ; preds = %10
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef @x)
  %17 = load i32, ptr @x, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [100100 x i32], ptr @p, i64 0, i64 %18
  store i32 1, ptr %19, align 4, !tbaa !5
  %20 = load i32, ptr @x, align 4, !tbaa !5
  store i32 %20, ptr %2, align 4, !tbaa !5
  br label %21

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

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

26:                                               ; preds = %39, %24
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp slt i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %42

31:                                               ; preds = %26
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef %4, ptr noundef %5)
  %33 = load i32, ptr %4, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %34
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %37
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %39

39:                                               ; preds = %31
  %40 = load i32, ptr %6, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %6, align 4, !tbaa !5
  br label %26, !llvm.loop !11

42:                                               ; preds = %30
  %43 = load i32, ptr @x, align 4, !tbaa !5
  %44 = call noundef i32 @_Z5findPii(i32 noundef %43, i32 noundef -1)
  %45 = load i32, ptr @x, align 4, !tbaa !5
  %46 = call noundef i32 @_Z13calcMaxBranchii(i32 noundef %45, i32 noundef -1)
  %47 = load i32, ptr @x, align 4, !tbaa !5
  call void @_Z11furthestInPiii(i32 noundef %47, i32 noundef -1, i32 noundef 0)
  %48 = load i32, ptr @x, align 4, !tbaa !5
  %49 = load i32, ptr @x, align 4, !tbaa !5
  call void @_Z7distToPiiii(i32 noundef %48, i32 noundef -1, i32 noundef 0, i32 noundef %49)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %50

50:                                               ; preds = %74, %42
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = load i32, ptr @n, align 4, !tbaa !5
  %53 = icmp sle i32 %51, %52
  br i1 %53, label %55, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %77

55:                                               ; preds = %50
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100100 x i32], ptr @dis, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = load i32, ptr %8, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100100 x i32], ptr @nearest, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100100 x i32], ptr @f, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = add nsw i32 %59, %66
  %68 = load i32, ptr @d, align 4, !tbaa !5
  %69 = icmp sle i32 %67, %68
  br i1 %69, label %70, label %73

70:                                               ; preds = %55
  %71 = load i32, ptr %7, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %7, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %70, %55
  br label %74

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

77:                                               ; preds = %54
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %78)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

declare i32 @printf(ptr noundef, ...) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@x = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@p = external dso_local local_unnamed_addr global [100100 x i32], align 16
@f = external dso_local local_unnamed_addr global [100100 x i32], align 16
@dis = external dso_local local_unnamed_addr global [100100 x i32], align 16
@nearest = external dso_local local_unnamed_addr global [100100 x i32], align 16
@g = external dso_local global [100100 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5findPii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z13calcMaxBranchii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11furthestInPiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7distToPiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m, ptr noundef nonnull @d)
  %4 = load i32, ptr @m, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.014.lcssa = phi i32 [ undef, %0 ], [ %9, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 %.014.lcssa, ptr @x, align 4, !tbaa !5
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 1
  br i1 %7, label %.lr.ph19, label %._crit_edge20

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.01316 = phi i32 [ %12, %.lr.ph ], [ 0, %0 ]
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @x)
  %9 = load i32, ptr @x, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [100100 x i32], ptr @p, i64 0, i64 %10
  store i32 1, ptr %11, align 4, !tbaa !5
  %12 = add nuw nsw i32 %.01316, 1
  %13 = load i32, ptr @m, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge20.loopexit:                           ; preds = %.lr.ph19
  %.pre = load i32, ptr @x, align 4, !tbaa !5
  br label %._crit_edge20

._crit_edge20:                                    ; preds = %._crit_edge20.loopexit, %._crit_edge
  %15 = phi i32 [ %.pre, %._crit_edge20.loopexit ], [ %.014.lcssa, %._crit_edge ]
  %16 = call noundef i32 @_Z5findPii(i32 noundef %15, i32 noundef -1)
  %17 = load i32, ptr @x, align 4, !tbaa !5
  %18 = call noundef i32 @_Z13calcMaxBranchii(i32 noundef %17, i32 noundef -1)
  %19 = load i32, ptr @x, align 4, !tbaa !5
  call void @_Z11furthestInPiii(i32 noundef %19, i32 noundef -1, i32 noundef 0)
  %20 = load i32, ptr @x, align 4, !tbaa !5
  call void @_Z7distToPiiii(i32 noundef %20, i32 noundef -1, i32 noundef 0, i32 noundef %20)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %.not21 = icmp slt i32 %21, 1
  br i1 %.not21, label %._crit_edge26, label %.lr.ph25

.lr.ph25:                                         ; preds = %._crit_edge20
  %22 = load i32, ptr @d, align 4, !tbaa !5
  %23 = zext nneg i32 %21 to i64
  %xtraiter = and i64 %23, 1
  %24 = icmp eq i32 %21, 1
  br i1 %24, label %._crit_edge26.loopexit.unr-lcssa, label %.lr.ph25.new

.lr.ph25.new:                                     ; preds = %.lr.ph25
  %unroll_iter = and i64 %23, 2147483646
  br label %45

.lr.ph19:                                         ; preds = %._crit_edge, %.lr.ph19
  %.01217 = phi i32 [ %32, %.lr.ph19 ], [ 1, %._crit_edge ]
  %25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %27
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100100 x %"class.std::vector"], ptr @g, i64 0, i64 %30
  call void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %32 = add nuw nsw i32 %.01217, 1
  %33 = load i32, ptr @n, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %.lr.ph19, label %._crit_edge20.loopexit, !llvm.loop !11

._crit_edge26.loopexit.unr-lcssa:                 ; preds = %45, %.lr.ph25
  %spec.select.lcssa.ph = phi i32 [ poison, %.lr.ph25 ], [ %spec.select.1, %45 ]
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph25 ], [ %indvars.iv.next.1, %45 ]
  %.01122.unr = phi i32 [ 0, %.lr.ph25 ], [ %spec.select.1, %45 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge26, label %._crit_edge26.loopexit.epilog-lcssa

._crit_edge26.loopexit.epilog-lcssa:              ; preds = %._crit_edge26.loopexit.unr-lcssa
  %35 = getelementptr inbounds [100100 x i32], ptr @dis, i64 0, i64 %indvars.iv.unr
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = getelementptr inbounds [100100 x i32], ptr @nearest, i64 0, i64 %indvars.iv.unr
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100100 x i32], ptr @f, i64 0, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = add nsw i32 %41, %36
  %.not15.epil = icmp sle i32 %42, %22
  %43 = zext i1 %.not15.epil to i32
  %spec.select.epil = add nuw nsw i32 %.01122.unr, %43
  br label %._crit_edge26

._crit_edge26:                                    ; preds = %._crit_edge26.loopexit.epilog-lcssa, %._crit_edge26.loopexit.unr-lcssa, %._crit_edge20
  %.011.lcssa = phi i32 [ 0, %._crit_edge20 ], [ %spec.select.lcssa.ph, %._crit_edge26.loopexit.unr-lcssa ], [ %spec.select.epil, %._crit_edge26.loopexit.epilog-lcssa ]
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %.011.lcssa)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0

45:                                               ; preds = %45, %.lr.ph25.new
  %indvars.iv = phi i64 [ 1, %.lr.ph25.new ], [ %indvars.iv.next.1, %45 ]
  %.01122 = phi i32 [ 0, %.lr.ph25.new ], [ %spec.select.1, %45 ]
  %niter = phi i64 [ 0, %.lr.ph25.new ], [ %niter.next.1, %45 ]
  %46 = getelementptr inbounds [100100 x i32], ptr @dis, i64 0, i64 %indvars.iv
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = getelementptr inbounds [100100 x i32], ptr @nearest, i64 0, i64 %indvars.iv
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100100 x i32], ptr @f, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, %47
  %.not15 = icmp sle i32 %53, %22
  %54 = zext i1 %.not15 to i32
  %spec.select = add nuw nsw i32 %.01122, %54
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = getelementptr inbounds [100100 x i32], ptr @dis, i64 0, i64 %indvars.iv.next
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = getelementptr inbounds [100100 x i32], ptr @nearest, i64 0, i64 %indvars.iv.next
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [100100 x i32], ptr @f, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, %56
  %.not15.1 = icmp sle i32 %62, %22
  %63 = zext i1 %.not15.1 to i32
  %spec.select.1 = add nuw nsw i32 %spec.select, %63
  %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 %._crit_edge26.loopexit.unr-lcssa, label %45, !llvm.loop !12
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #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}


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