; LLVM IR from tangjz/acm-icpc :: luogu (1413)

; 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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"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 }

@Q = external dso_local global [6 x %"class.std::priority_queue"], align 16
@n = external dso_local global i32, align 4
@ans = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  br label %7

7:                                                ; preds = %11, %0
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr @n, align 4, !tbaa !5
  %10 = icmp ne i32 %8, 0
  br i1 %10, label %11, label %17

11:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2, ptr noundef %3)
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = add nsw i32 %13, -1
  store i32 %14, ptr %2, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %15
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25) %16, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %7, !llvm.loop !9

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

18:                                               ; preds = %63, %17
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 6
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %66

22:                                               ; preds = %18
  br label %23

23:                                               ; preds = %61, %22
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %25
  %27 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %26)
  %28 = xor i1 %27, true
  br i1 %28, label %29, label %62

29:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %31
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %32)
  %34 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %34, ptr %5, align 4, !tbaa !5
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %36
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %37)
  %38 = load i32, ptr @ans, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr @ans, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %57, %29
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %42
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %43)
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = add nsw i32 %46, 60
  %48 = icmp slt i32 %45, %47
  br i1 %48, label %49, label %55

49:                                               ; preds = %40
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %51
  %53 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) %52)
  %54 = xor i1 %53, true
  br label %55

55:                                               ; preds = %49, %40
  %56 = phi i1 [ false, %40 ], [ %54, %49 ]
  br i1 %56, label %57, label %61

57:                                               ; preds = %55
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %59
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %60)
  br label %40, !llvm.loop !11

61:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %23, !llvm.loop !12

62:                                               ; preds = %23
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %4, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %4, align 4, !tbaa !5
  br label %18, !llvm.loop !13

66:                                               ; preds = %21
  %67 = load i32, ptr @ans, align 4, !tbaa !5
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %67)
  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: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) #3 align 2

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

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #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}


; 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::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"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 }

@Q = external dso_local global [6 x %"class.std::priority_queue"], align 16
@n = external dso_local global i32, align 4
@ans = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %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)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %5 = add nsw i32 %4, -1
  store i32 %5, ptr @n, align 4, !tbaa !5
  %.not10 = icmp eq i32 %4, 0
  br i1 %.not10, label %.preheader9, label %.lr.ph

.preheader9:                                      ; preds = %.lr.ph, %0
  %6 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %6, label %._crit_edge, label %.lr.ph13

.lr.ph:                                           ; preds = %0, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = add nsw i32 %8, -1
  store i32 %9, ptr %1, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [6 x %"class.std::priority_queue"], ptr @Q, i64 0, i64 %10
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25) %11, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = add nsw i32 %12, -1
  store i32 %13, ptr @n, align 4, !tbaa !5
  %.not = icmp eq i32 %12, 0
  br i1 %.not, label %.preheader9, label %.lr.ph, !llvm.loop !9

.lr.ph13:                                         ; preds = %.preheader9, %.critedge
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %15 = load i32, ptr %14, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %16 = load i32, ptr @ans, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr @ans, align 4, !tbaa !5
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %19 = load i32, ptr %18, align 4, !tbaa !5
  %20 = add nsw i32 %15, 60
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %.lr.ph11, label %.critedge

.lr.ph11:                                         ; preds = %.lr.ph13, %23
  %22 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %22, label %.critedge, label %23

23:                                               ; preds = %.lr.ph11
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = icmp slt i32 %25, %20
  br i1 %26, label %.lr.ph11, label %.critedge, !llvm.loop !11

.critedge:                                        ; preds = %.lr.ph11, %23, %.lr.ph13
  %27 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %27, label %._crit_edge, label %.lr.ph13, !llvm.loop !12

._crit_edge:                                      ; preds = %.critedge, %.preheader9
  %28 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  br i1 %28, label %._crit_edge.1, label %.lr.ph13.1

.lr.ph13.1:                                       ; preds = %._crit_edge, %.critedge.1
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  %30 = load i32, ptr %29, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  %31 = load i32, ptr @ans, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr @ans, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = add nsw i32 %30, 60
  %36 = icmp slt i32 %34, %35
  br i1 %36, label %.lr.ph11.1, label %.critedge.1

.lr.ph11.1:                                       ; preds = %.lr.ph13.1, %38
  %37 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  br i1 %37, label %.critedge.1, label %38

38:                                               ; preds = %.lr.ph11.1
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = icmp slt i32 %40, %35
  br i1 %41, label %.lr.ph11.1, label %.critedge.1, !llvm.loop !11

.critedge.1:                                      ; preds = %.lr.ph11.1, %38, %.lr.ph13.1
  %42 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 32))
  br i1 %42, label %._crit_edge.1, label %.lr.ph13.1, !llvm.loop !12

._crit_edge.1:                                    ; preds = %.critedge.1, %._crit_edge
  %43 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  br i1 %43, label %._crit_edge.2, label %.lr.ph13.2

.lr.ph13.2:                                       ; preds = %._crit_edge.1, %.critedge.2
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  %45 = load i32, ptr %44, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  %46 = load i32, ptr @ans, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr @ans, align 4, !tbaa !5
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = add nsw i32 %45, 60
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %.lr.ph11.2, label %.critedge.2

.lr.ph11.2:                                       ; preds = %.lr.ph13.2, %53
  %52 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  br i1 %52, label %.critedge.2, label %53

53:                                               ; preds = %.lr.ph11.2
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = icmp slt i32 %55, %50
  br i1 %56, label %.lr.ph11.2, label %.critedge.2, !llvm.loop !11

.critedge.2:                                      ; preds = %.lr.ph11.2, %53, %.lr.ph13.2
  %57 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 64))
  br i1 %57, label %._crit_edge.2, label %.lr.ph13.2, !llvm.loop !12

._crit_edge.2:                                    ; preds = %.critedge.2, %._crit_edge.1
  %58 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  br i1 %58, label %._crit_edge.3, label %.lr.ph13.3

.lr.ph13.3:                                       ; preds = %._crit_edge.2, %.critedge.3
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  %60 = load i32, ptr %59, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  %61 = load i32, ptr @ans, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr @ans, align 4, !tbaa !5
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = add nsw i32 %60, 60
  %66 = icmp slt i32 %64, %65
  br i1 %66, label %.lr.ph11.3, label %.critedge.3

.lr.ph11.3:                                       ; preds = %.lr.ph13.3, %68
  %67 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  br i1 %67, label %.critedge.3, label %68

68:                                               ; preds = %.lr.ph11.3
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  %69 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = icmp slt i32 %70, %65
  br i1 %71, label %.lr.ph11.3, label %.critedge.3, !llvm.loop !11

.critedge.3:                                      ; preds = %.lr.ph11.3, %68, %.lr.ph13.3
  %72 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 96))
  br i1 %72, label %._crit_edge.3, label %.lr.ph13.3, !llvm.loop !12

._crit_edge.3:                                    ; preds = %.critedge.3, %._crit_edge.2
  %73 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  br i1 %73, label %._crit_edge.4, label %.lr.ph13.4

.lr.ph13.4:                                       ; preds = %._crit_edge.3, %.critedge.4
  %74 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  %75 = load i32, ptr %74, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  %76 = load i32, ptr @ans, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr @ans, align 4, !tbaa !5
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = add nsw i32 %75, 60
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %.lr.ph11.4, label %.critedge.4

.lr.ph11.4:                                       ; preds = %.lr.ph13.4, %83
  %82 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  br i1 %82, label %.critedge.4, label %83

83:                                               ; preds = %.lr.ph11.4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = icmp slt i32 %85, %80
  br i1 %86, label %.lr.ph11.4, label %.critedge.4, !llvm.loop !11

.critedge.4:                                      ; preds = %.lr.ph11.4, %83, %.lr.ph13.4
  %87 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 128))
  br i1 %87, label %._crit_edge.4, label %.lr.ph13.4, !llvm.loop !12

._crit_edge.4:                                    ; preds = %.critedge.4, %._crit_edge.3
  %88 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  br i1 %88, label %._crit_edge.5, label %.lr.ph13.5

.lr.ph13.5:                                       ; preds = %._crit_edge.4, %.critedge.5
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  %90 = load i32, ptr %89, align 4, !tbaa !5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  %91 = load i32, ptr @ans, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr @ans, align 4, !tbaa !5
  %93 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = add nsw i32 %90, 60
  %96 = icmp slt i32 %94, %95
  br i1 %96, label %.lr.ph11.5, label %.critedge.5

.lr.ph11.5:                                       ; preds = %.lr.ph13.5, %98
  %97 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  br i1 %97, label %.critedge.5, label %98

98:                                               ; preds = %.lr.ph11.5
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = icmp slt i32 %100, %95
  br i1 %101, label %.lr.ph11.5, label %.critedge.5, !llvm.loop !11

.critedge.5:                                      ; preds = %.lr.ph11.5, %98, %.lr.ph13.5
  %102 = call noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) getelementptr inbounds (i8, ptr @Q, i64 160))
  br i1 %102, label %._crit_edge.5, label %.lr.ph13.5, !llvm.loop !12

._crit_edge.5:                                    ; preds = %.critedge.5, %._crit_edge.4
  %103 = load i32, ptr @ans, align 4, !tbaa !5
  %104 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %103)
  ret i32 0
}

; 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: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE4pushERKi(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt7greaterIiEE3popEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #3 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { 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 = { 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 = { 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 #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}


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