; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/182 Division 1/Problem B (B)

; 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<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@inf = external dso_local global i32, align 4
@g = external dso_local global [101 x [101 x i32]], align 16
@a = external dso_local global [101 x i32], align 16
@c = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5checki(i32 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: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"struct.std::pair", 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
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @d)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %23, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = sub nsw i32 %14, 1
  %16 = icmp sle i32 %13, %15
  br i1 %16, label %18, label %17

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

18:                                               ; preds = %12
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %20
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %21)
  br label %23

23:                                               ; preds = %18
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

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

27:                                               ; preds = %35, %26
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

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

32:                                               ; preds = %27
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @x, ptr noundef @y)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %34 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x, ptr noundef nonnull align 4 dereferenceable(4) @y)
  store i64 %34, ptr %4, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @c, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %35

35:                                               ; preds = %32
  %36 = load i32, ptr %3, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %3, align 4, !tbaa !5
  br label %27, !llvm.loop !11

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %85, %38
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %81, %44
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = icmp sle i32 %46, %47
  br i1 %48, label %50, label %49

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

50:                                               ; preds = %45
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = icmp eq i32 %51, %52
  br i1 %53, label %54, label %63

54:                                               ; preds = %50
  %55 = load i32, ptr @inf, align 4, !tbaa !5
  %56 = sub nsw i32 0, %55
  %57 = load i32, ptr %5, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [101 x [101 x i32]], ptr @g, i64 0, i64 %58
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [101 x i32], ptr %59, i64 0, i64 %61
  store i32 %56, ptr %62, align 4, !tbaa !5
  br label %80

63:                                               ; preds = %50
  %64 = load i32, ptr %5, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %65
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = load i32, ptr @d, align 4, !tbaa !5
  %69 = load i32, ptr %5, align 4, !tbaa !5
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = call noundef i32 @_Z5disttii(i32 noundef %69, i32 noundef %70)
  %72 = mul nsw i32 %68, %71
  %73 = sub nsw i32 %67, %72
  %74 = load i32, ptr %5, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [101 x [101 x i32]], ptr @g, i64 0, i64 %75
  %77 = load i32, ptr %7, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [101 x i32], ptr %76, i64 0, i64 %78
  store i32 %73, ptr %79, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %63, %54
  br label %81

81:                                               ; preds = %80
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %7, align 4, !tbaa !5
  br label %45, !llvm.loop !12

84:                                               ; preds = %49
  br label %85

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

88:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %89 = load i32, ptr @inf, align 4, !tbaa !5
  store i32 %89, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  br label %90

90:                                               ; preds = %107, %88
  %91 = load i32, ptr %8, align 4, !tbaa !5
  %92 = load i32, ptr %9, align 4, !tbaa !5
  %93 = icmp sle i32 %91, %92
  br i1 %93, label %94, label %108

94:                                               ; preds = %90
  %95 = load i32, ptr %8, align 4, !tbaa !5
  %96 = load i32, ptr %9, align 4, !tbaa !5
  %97 = add nsw i32 %95, %96
  %98 = sdiv i32 %97, 2
  store i32 %98, ptr %10, align 4, !tbaa !5
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = call noundef zeroext i1 @_Z5checki(i32 noundef %99)
  br i1 %100, label %101, label %104

101:                                              ; preds = %94
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = sub nsw i32 %102, 1
  store i32 %103, ptr %9, align 4, !tbaa !5
  br label %107

104:                                              ; preds = %94
  %105 = load i32, ptr %10, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %8, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %104, %101
  br label %90, !llvm.loop !14

108:                                              ; preds = %90
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %109)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %111 = load i32, ptr %1, align 4
  ret i32 %111
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@x = external dso_local global i32, align 4
@y = external dso_local global i32, align 4
@inf = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local local_unnamed_addr global [101 x [101 x i32]], align 16
@a = external dso_local global [101 x i32], align 16
@c = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5checki(i32 noundef) 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

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

.preheader37:                                     ; preds = %.lr.ph, %0
  %4 = phi i32 [ %3, %0 ], [ %7, %.lr.ph ]
  %.not40 = icmp slt i32 %4, 1
  br i1 %.not40, label %._crit_edge48, label %.lr.ph42

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

.preheader36:                                     ; preds = %.lr.ph42
  %.not3346 = icmp slt i32 %12, 1
  br i1 %.not3346, label %._crit_edge48, label %.preheader

.lr.ph42:                                         ; preds = %.preheader37, %.lr.ph42
  %.03141 = phi i32 [ %11, %.lr.ph42 ], [ 1, %.preheader37 ]
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @x, ptr noundef nonnull @y)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  %10 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) @x, ptr noundef nonnull align 4 dereferenceable(4) @y)
  store i64 %10, ptr %1, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) @c, ptr noundef nonnull align 4 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  %11 = add nuw nsw i32 %.03141, 1
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %.not.not55 = icmp slt i32 %.03141, %12
  br i1 %.not.not55, label %.lr.ph42, label %.preheader36, !llvm.loop !11

.preheader:                                       ; preds = %.preheader36, %._crit_edge
  %13 = phi i32 [ %17, %._crit_edge ], [ %12, %.preheader36 ]
  %indvars.iv61 = phi i64 [ %indvars.iv.next62, %._crit_edge ], [ 1, %.preheader36 ]
  %.not3543 = icmp slt i32 %13, 1
  br i1 %.not3543, label %._crit_edge, label %.lr.ph45

.lr.ph45:                                         ; preds = %.preheader
  %14 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv61
  %15 = trunc nuw nsw i64 %indvars.iv61 to i32
  br label %19

._crit_edge48:                                    ; preds = %._crit_edge, %.preheader37, %.preheader36
  %16 = load i32, ptr @inf, align 4, !tbaa !5
  %.not3449 = icmp slt i32 %16, 1
  br i1 %.not3449, label %._crit_edge54, label %.lr.ph53

._crit_edge:                                      ; preds = %33, %.preheader
  %17 = phi i32 [ %13, %.preheader ], [ %34, %33 ]
  %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1
  %18 = sext i32 %17 to i64
  %.not33.not = icmp slt i64 %indvars.iv61, %18
  br i1 %.not33.not, label %.preheader, label %._crit_edge48, !llvm.loop !12

19:                                               ; preds = %.lr.ph45, %33
  %20 = phi i32 [ %13, %.lr.ph45 ], [ %34, %33 ]
  %21 = phi i32 [ %13, %.lr.ph45 ], [ %35, %33 ]
  %indvars.iv58 = phi i64 [ 1, %.lr.ph45 ], [ %indvars.iv.next59, %33 ]
  %22 = icmp eq i64 %indvars.iv61, %indvars.iv58
  br i1 %22, label %23, label %26

23:                                               ; preds = %19
  %24 = load i32, ptr @inf, align 4, !tbaa !5
  %25 = sub nsw i32 0, %24
  br label %33

26:                                               ; preds = %19
  %27 = load i32, ptr %14, align 4, !tbaa !5
  %28 = load i32, ptr @d, align 4, !tbaa !5
  %29 = trunc nuw nsw i64 %indvars.iv58 to i32
  %30 = call noundef i32 @_Z5disttii(i32 noundef %15, i32 noundef %29)
  %31 = mul nsw i32 %30, %28
  %32 = sub nsw i32 %27, %31
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %23, %26
  %34 = phi i32 [ %20, %23 ], [ %.pre, %26 ]
  %35 = phi i32 [ %21, %23 ], [ %.pre, %26 ]
  %.sink = phi i32 [ %25, %23 ], [ %32, %26 ]
  %36 = getelementptr inbounds [101 x [101 x i32]], ptr @g, i64 0, i64 %indvars.iv61, i64 %indvars.iv58
  store i32 %.sink, ptr %36, align 4
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %37 = sext i32 %35 to i64
  %.not35.not = icmp slt i64 %indvars.iv58, %37
  br i1 %.not35.not, label %19, label %._crit_edge, !llvm.loop !14

.lr.ph53:                                         ; preds = %._crit_edge48, %.lr.ph53
  %.051 = phi i32 [ %.1, %.lr.ph53 ], [ %16, %._crit_edge48 ]
  %.02750 = phi i32 [ %.128, %.lr.ph53 ], [ 1, %._crit_edge48 ]
  %38 = add nuw nsw i32 %.051, %.02750
  %39 = lshr i32 %38, 1
  %40 = call noundef zeroext i1 @_Z5checki(i32 noundef %39)
  %41 = add nsw i32 %39, -1
  %42 = add nuw nsw i32 %39, 1
  %.128 = select i1 %40, i32 %.02750, i32 %42
  %.1 = select i1 %40, i32 %41, i32 %.051
  %.not34 = icmp sgt i32 %.128, %.1
  br i1 %.not34, label %._crit_edge54, label %.lr.ph53, !llvm.loop !15

._crit_edge54:                                    ; preds = %.lr.ph53, %._crit_edge48
  %.027.lcssa = phi i32 [ 1, %._crit_edge48 ], [ %.128, %.lr.ph53 ]
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %.027.lcssa)
  ret i32 0
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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