; LLVM IR from kazunetakahashi/atcoder :: 2019/0818_ABC138 (C)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"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<long double, std::allocator<long double>>::_Vector_impl" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Setprecision" = type { i32 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::priority_queue", align 8
  %4 = alloca i32, align 4
  %5 = alloca x86_fp80, align 16
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca x86_fp80, align 16
  %9 = alloca x86_fp80, align 16
  %10 = alloca x86_fp80, align 16
  %11 = alloca %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #7
  call void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %22, %0
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %29

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %19 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) %5)
          to label %20 unwind label %25

20:                                               ; preds = %18
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4pushERKe(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 16 dereferenceable(16) %5)
          to label %21 unwind label %25

21:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %22

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

25:                                               ; preds = %20, %18
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %6, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %84

29:                                               ; preds = %17
  br label %30

30:                                               ; preds = %47, %29
  %31 = invoke noundef i64 @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %32 unwind label %48

32:                                               ; preds = %30
  %33 = icmp uge i64 %31, 2
  br i1 %33, label %34, label %66

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %35 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %36 unwind label %52

36:                                               ; preds = %34
  %37 = load x86_fp80, ptr %35, align 16, !tbaa !11
  store x86_fp80 %37, ptr %8, align 16, !tbaa !11
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %38 unwind label %52

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %39 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %40 unwind label %56

40:                                               ; preds = %38
  %41 = load x86_fp80, ptr %39, align 16, !tbaa !11
  store x86_fp80 %41, ptr %9, align 16, !tbaa !11
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %42 unwind label %56

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %43 = load x86_fp80, ptr %8, align 16, !tbaa !11
  %44 = load x86_fp80, ptr %9, align 16, !tbaa !11
  %45 = fadd x86_fp80 %43, %44
  %46 = fdiv x86_fp80 %45, 0xK40008000000000000000
  store x86_fp80 %46, ptr %10, align 16, !tbaa !11
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4pushERKe(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 16 dereferenceable(16) %10)
          to label %47 unwind label %60

47:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %30, !llvm.loop !13

48:                                               ; preds = %80, %77, %75, %70, %68, %66, %30
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %7, align 4
  br label %84

52:                                               ; preds = %36, %34
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  br label %65

56:                                               ; preds = %40, %38
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  br label %64

60:                                               ; preds = %42
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %6, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %64

64:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %65

65:                                               ; preds = %64, %52
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %84

66:                                               ; preds = %32
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
          to label %68 unwind label %48

68:                                               ; preds = %66
  %69 = invoke i32 @_ZSt12setprecisioni(i32 noundef 12)
          to label %70 unwind label %48

70:                                               ; preds = %68
  %71 = getelementptr inbounds %"struct.std::_Setprecision", ptr %11, i32 0, i32 0
  store i32 %69, ptr %71, align 4
  %72 = getelementptr inbounds %"struct.std::_Setprecision", ptr %11, i32 0, i32 0
  %73 = load i32, ptr %72, align 4
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %67, i32 %73)
          to label %75 unwind label %48

75:                                               ; preds = %70
  %76 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
          to label %77 unwind label %48

77:                                               ; preds = %75
  %78 = load x86_fp80, ptr %76, align 16, !tbaa !11
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %74, x86_fp80 noundef %78)
          to label %80 unwind label %48

80:                                               ; preds = %77
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %82 unwind label %48

82:                                               ; preds = %80
  call void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %83 = load i32, ptr %1, align 4
  ret i32 %83

84:                                               ; preds = %65, %48, %25
  call void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %6, align 8
  %87 = load i32, ptr %7, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4pushERKe(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 16 dereferenceable(16)) #0 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8), x86_fp80 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #6 align 2

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { 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 #7 = { 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 = !{!12, !12, i64 0}
!12 = !{!"long double", !7, i64 0}
!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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"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<long double, std::allocator<long double>>::_Vector_impl" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl" = type { %"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long double, std::allocator<long double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::priority_queue", align 8
  %3 = alloca x86_fp80, align 16
  %4 = alloca x86_fp80, align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %5 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %12, %0
  %8 = call noundef i64 @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %9 = icmp ugt i64 %8, 1
  br i1 %9, label %.lr.ph16, label %._crit_edge

.lr.ph:                                           ; preds = %0, %12
  %.015 = phi i32 [ %13, %12 ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %10 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 16 dereferenceable(16) %3)
          to label %11 unwind label %16

11:                                               ; preds = %.lr.ph
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4pushERKe(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 16 dereferenceable(16) %3)
          to label %12 unwind label %16

12:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  %13 = add nuw nsw i32 %.015, 1
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %.lr.ph, label %.preheader, !llvm.loop !9

16:                                               ; preds = %11, %.lr.ph
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  br label %48

.lr.ph16:                                         ; preds = %.preheader, %26
  %18 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %19 = load x86_fp80, ptr %18, align 16, !tbaa !11
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
          to label %20 unwind label %31

20:                                               ; preds = %.lr.ph16
  %21 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %22 = load x86_fp80, ptr %21, align 16, !tbaa !11
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3popEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
          to label %23 unwind label %33

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %24 = fadd x86_fp80 %19, %22
  %25 = fmul x86_fp80 %24, 0xK3FFE8000000000000000
  store x86_fp80 %25, ptr %4, align 16, !tbaa !11
  invoke void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4pushERKe(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 16 dereferenceable(16) %4)
          to label %26 unwind label %35

26:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  %27 = call noundef i64 @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %28 = icmp ugt i64 %27, 1
  br i1 %28, label %.lr.ph16, label %._crit_edge, !llvm.loop !13

29:                                               ; preds = %45, %41, %38, %._crit_edge
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %48

31:                                               ; preds = %.lr.ph16
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %48

33:                                               ; preds = %20
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %48

35:                                               ; preds = %23
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %48

._crit_edge:                                      ; preds = %26, %.preheader
  %37 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
          to label %38 unwind label %29

38:                                               ; preds = %._crit_edge
  %39 = call i32 @_ZSt12setprecisioni(i32 noundef 12)
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 %39)
          to label %41 unwind label %29

41:                                               ; preds = %38
  %42 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNKSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE3topEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  %43 = load x86_fp80, ptr %42, align 16, !tbaa !11
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8) %40, x86_fp80 noundef %43)
          to label %45 unwind label %29

45:                                               ; preds = %41
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %47 unwind label %29

47:                                               ; preds = %45
  call void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

48:                                               ; preds = %31, %35, %33, %29, %16
  %.pn13 = phi { ptr, i32 } [ %17, %16 ], [ %30, %29 ], [ %32, %31 ], [ %36, %35 ], [ %34, %33 ]
  call void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn13
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERe(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEE4pushERKe(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #0 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEe(ptr noundef nonnull align 8 dereferenceable(8), x86_fp80 noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt14priority_queueIeSt6vectorIeSaIeEESt7greaterIeEED2Ev(ptr noundef nonnull align 8 dereferenceable(25)) unnamed_addr #6 align 2

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


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass