; LLVM IR from ahampriyanshu/algo-ds-101 :: Algorithms/Graph/Dijkstra/dijkstra_leftist_heap (leftistHeap)

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

%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { float, i32 }
%"struct.std::pair.6" = type { i32, ptr }
%"struct.std::pair.4" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%class.LeftistHeap = type { ptr, ptr }
%"struct.std::pair.8" = type { i32, ptr }
%class.Node = type { %"struct.std::pair", i32, ptr, ptr, ptr }

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #0

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

; 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 uwtable
declare dso_local noundef ptr @_ZN11LeftistHeap10mergeHeapsEP4NodeS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiP4NodeELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE6insertIS6_IiS1_EEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i32, ptr } @_ZSt9make_pairIRiRP4NodeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11LeftistHeap11decreaseKeyEif(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %1, float noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca float, align 4
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::pair", align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::pair.6", align 8
  %14 = alloca %"struct.std::pair.4", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store float %2, ptr %6, align 4, !tbaa !11
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %16 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 1
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %18 = call ptr @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE4findERS7_(ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %19 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %7, i32 0, i32 0
  %20 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %19, i32 0, i32 0
  store ptr %18, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %21 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = call ptr @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %22) #5
  %24 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %8, i32 0, i32 0
  %25 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %24, i32 0, i32 0
  store ptr %23, ptr %25, align 8
  %26 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiP4NodeELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br i1 %26, label %27, label %139

27:                                               ; preds = %3
  %28 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %29 = getelementptr inbounds %"struct.std::pair.8", ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %33 = icmp eq ptr %30, %32
  br i1 %33, label %34, label %40

34:                                               ; preds = %27
  %35 = load float, ptr %6, align 4, !tbaa !11
  %36 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !17
  %38 = getelementptr inbounds %class.Node, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %"struct.std::pair", ptr %38, i32 0, i32 0
  store float %35, ptr %39, align 8, !tbaa !18
  br label %138

40:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %41 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #6
  %42 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %43 = getelementptr inbounds %"struct.std::pair.8", ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !15
  %45 = getelementptr inbounds %class.Node, ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds %"struct.std::pair", ptr %45, i32 0, i32 1
  %47 = invoke i64 @_ZSt9make_pairIRfRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %46)
          to label %48 unwind label %84

48:                                               ; preds = %40
  store i64 %47, ptr %10, align 4
  %49 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %50 = getelementptr inbounds %"struct.std::pair.8", ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = getelementptr inbounds %class.Node, ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !21
  %54 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %55 = getelementptr inbounds %"struct.std::pair.8", ptr %54, i32 0, i32 1
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  %57 = getelementptr inbounds %class.Node, ptr %56, i32 0, i32 3
  %58 = load ptr, ptr %57, align 8, !tbaa !22
  %59 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %60 = getelementptr inbounds %"struct.std::pair.8", ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = getelementptr inbounds %class.Node, ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !23
  %64 = load i64, ptr %10, align 4
  invoke void @_ZN4NodeC1ESt4pairIfiEiPS_S2_S2_(ptr noundef nonnull align 8 dereferenceable(40) %41, i64 %64, i32 noundef 0, ptr noundef %53, ptr noundef %58, ptr noundef %63)
          to label %65 unwind label %84

65:                                               ; preds = %48
  store ptr %41, ptr %9, align 8, !tbaa !5
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %class.Node, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !21
  %69 = getelementptr inbounds %class.Node, ptr %68, i32 0, i32 3
  %70 = load ptr, ptr %69, align 8, !tbaa !22
  %71 = getelementptr inbounds %class.Node, ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %"struct.std::pair", ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 4, !tbaa !24
  %74 = load i32, ptr %5, align 4, !tbaa !9
  %75 = icmp eq i32 %73, %74
  br i1 %75, label %76, label %88

76:                                               ; preds = %65
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = getelementptr inbounds %class.Node, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = getelementptr inbounds %class.Node, ptr %79, i32 0, i32 3
  store ptr null, ptr %80, align 8, !tbaa !22
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = getelementptr inbounds %class.Node, ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !21
  call void @_ZN11LeftistHeap12swapChildrenEP4Node(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef %83)
  br label %93

84:                                               ; preds = %48, %40
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %11, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %12, align 4
  call void @_ZdlPvm(ptr noundef %41, i64 noundef 40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %140

88:                                               ; preds = %65
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %class.Node, ptr %89, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !21
  %92 = getelementptr inbounds %class.Node, ptr %91, i32 0, i32 4
  store ptr null, ptr %92, align 8, !tbaa !23
  br label %93

93:                                               ; preds = %88, %76
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = getelementptr inbounds %class.Node, ptr %94, i32 0, i32 2
  store ptr null, ptr %95, align 8, !tbaa !21
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %class.Node, ptr %96, i32 0, i32 3
  %98 = load ptr, ptr %97, align 8, !tbaa !22
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %106

100:                                              ; preds = %93
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.Node, ptr %102, i32 0, i32 3
  %104 = load ptr, ptr %103, align 8, !tbaa !22
  %105 = getelementptr inbounds %class.Node, ptr %104, i32 0, i32 2
  store ptr %101, ptr %105, align 8, !tbaa !21
  br label %106

106:                                              ; preds = %100, %93
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = getelementptr inbounds %class.Node, ptr %107, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !23
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %117

111:                                              ; preds = %106
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = getelementptr inbounds %class.Node, ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !23
  %116 = getelementptr inbounds %class.Node, ptr %115, i32 0, i32 2
  store ptr %112, ptr %116, align 8, !tbaa !21
  br label %117

117:                                              ; preds = %111, %106
  %118 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !17
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = call noundef ptr @_ZN11LeftistHeap10mergeHeapsEP4NodeS1_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef %119, ptr noundef %120)
  %122 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 0
  store ptr %121, ptr %122, align 8, !tbaa !17
  %123 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !13
  %125 = call noundef i64 @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE5eraseERS7_(ptr noundef nonnull align 8 dereferenceable(56) %124, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %126 = getelementptr inbounds %class.LeftistHeap, ptr %15, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %128 = call { i32, ptr } @_ZSt9make_pairIRiRP4NodeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %129 = getelementptr inbounds { i32, ptr }, ptr %13, i32 0, i32 0
  %130 = extractvalue { i32, ptr } %128, 0
  store i32 %130, ptr %129, align 8
  %131 = getelementptr inbounds { i32, ptr }, ptr %13, i32 0, i32 1
  %132 = extractvalue { i32, ptr } %128, 1
  store ptr %132, ptr %131, align 8
  %133 = call { ptr, i8 } @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE6insertIS6_IiS1_EEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %127, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %134 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %135 = extractvalue { ptr, i8 } %133, 0
  store ptr %135, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %137 = extractvalue { ptr, i8 } %133, 1
  store i8 %137, ptr %136, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %138

138:                                              ; preds = %117, %34
  br label %139

139:                                              ; preds = %138, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

140:                                              ; preds = %84
  %141 = load ptr, ptr %11, align 8
  %142 = load i32, ptr %12, align 4
  %143 = insertvalue { ptr, i32 } poison, ptr %141, 0
  %144 = insertvalue { ptr, i32 } %143, i32 %142, 1
  resume { ptr, i32 } %144
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11LeftistHeap12swapChildrenEP4Node(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #4 align 2

declare void @_ZN4NodeC1ESt4pairIfiEiPS_S2_S2_(ptr, i64, i32, ptr, ptr, ptr)

attributes #0 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS11LeftistHeap", !6, i64 0, !6, i64 8}
!15 = !{!16, !6, i64 8}
!16 = !{!"_ZTSSt4pairIKiP4NodeE", !10, i64 0, !6, i64 8}
!17 = !{!14, !6, i64 0}
!18 = !{!19, !12, i64 0}
!19 = !{!"_ZTS4Node", !20, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!20 = !{!"_ZTSSt4pairIfiE", !12, i64 0, !10, i64 4}
!21 = !{!19, !6, i64 16}
!22 = !{!19, !6, i64 24}
!23 = !{!19, !6, i64 32}
!24 = !{!19, !10, i64 4}


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

%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair.6" = type { i32, ptr }

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

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

; 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 uwtable
declare dso_local noundef ptr @_ZN11LeftistHeap10mergeHeapsEP4NodeS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiP4NodeELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE6insertIS6_IiS1_EEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i32, ptr } @_ZSt9make_pairIRiRP4NodeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11LeftistHeap11decreaseKeyEif(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %1, float noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca float, align 4
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.std::pair.6", align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  store float %2, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = call ptr @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE4findERS7_(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store ptr %12, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %13 = load ptr, ptr %10, align 8, !tbaa !11
  %14 = call ptr @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %13) #5
  store ptr %14, ptr %7, align 8
  %15 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiP4NodeELb0EEES8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br i1 %15, label %16, label %81

16:                                               ; preds = %3
  %17 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !14
  %20 = load ptr, ptr %0, align 8, !tbaa !16
  %21 = icmp eq ptr %19, %20
  br i1 %21, label %22, label %23

22:                                               ; preds = %16
  store float %2, ptr %20, align 8, !tbaa !17
  br label %81

23:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %24 = call noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #6
  %25 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %27, i64 4
  %29 = invoke i64 @_ZSt9make_pairIRfRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %30 unwind label %56

30:                                               ; preds = %23
  %31 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  %39 = getelementptr inbounds i8, ptr %38, i64 24
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiP4NodeELb0ELb0EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %43, i64 32
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  invoke void @_ZN4NodeC1ESt4pairIfiEiPS_S2_S2_(ptr noundef nonnull align 8 dereferenceable(40) %24, i64 %29, i32 noundef 0, ptr noundef %35, ptr noundef %40, ptr noundef %45)
          to label %46 unwind label %56

46:                                               ; preds = %30
  store ptr %24, ptr %8, align 8, !tbaa !23
  %47 = getelementptr inbounds i8, ptr %24, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !20
  %49 = getelementptr inbounds i8, ptr %48, i64 24
  %50 = load ptr, ptr %49, align 8, !tbaa !21
  %51 = getelementptr inbounds i8, ptr %50, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !24
  %53 = load i32, ptr %4, align 4, !tbaa !5
  %54 = icmp eq i32 %52, %53
  br i1 %54, label %55, label %58

55:                                               ; preds = %46
  store ptr null, ptr %49, align 8, !tbaa !21
  call void @_ZN11LeftistHeap12swapChildrenEP4Node(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %48)
  br label %60

56:                                               ; preds = %30, %23
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %24, i64 noundef 40) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  resume { ptr, i32 } %57

58:                                               ; preds = %46
  %59 = getelementptr inbounds i8, ptr %48, i64 32
  store ptr null, ptr %59, align 8, !tbaa !22
  br label %60

60:                                               ; preds = %58, %55
  store ptr null, ptr %47, align 8, !tbaa !20
  %61 = getelementptr inbounds i8, ptr %24, i64 24
  %62 = load ptr, ptr %61, align 8, !tbaa !21
  %.not = icmp eq ptr %62, null
  br i1 %.not, label %65, label %63

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %62, i64 16
  store ptr %24, ptr %64, align 8, !tbaa !20
  br label %65

65:                                               ; preds = %63, %60
  %66 = getelementptr inbounds i8, ptr %24, i64 32
  %67 = load ptr, ptr %66, align 8, !tbaa !22
  %.not5 = icmp eq ptr %67, null
  br i1 %.not5, label %70, label %68

68:                                               ; preds = %65
  %69 = getelementptr inbounds i8, ptr %67, i64 16
  store ptr %24, ptr %69, align 8, !tbaa !20
  br label %70

70:                                               ; preds = %68, %65
  %71 = load ptr, ptr %0, align 8, !tbaa !16
  %72 = call noundef ptr @_ZN11LeftistHeap10mergeHeapsEP4NodeS1_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %71, ptr noundef nonnull %24)
  store ptr %72, ptr %0, align 8, !tbaa !16
  %73 = load ptr, ptr %10, align 8, !tbaa !11
  %74 = call noundef i64 @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE5eraseERS7_(ptr noundef nonnull align 8 dereferenceable(56) %73, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %75 = load ptr, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %76 = call { i32, ptr } @_ZSt9make_pairIRiRP4NodeESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %77 = extractvalue { i32, ptr } %76, 0
  store i32 %77, ptr %9, align 8
  %78 = getelementptr inbounds i8, ptr %9, i64 8
  %79 = extractvalue { i32, ptr } %76, 1
  store ptr %79, ptr %78, align 8
  %80 = call { ptr, i8 } @_ZNSt13unordered_mapIiP4NodeSt4hashIiESt8equal_toIiESaISt4pairIKiS1_EEE6insertIS6_IiS1_EEENSt9enable_ifIXsr16is_constructibleIS8_OT_EE5valueES6_INSt8__detail14_Node_iteratorIS8_Lb0ELb0EEEbEE4typeESF_(ptr noundef nonnull align 8 dereferenceable(56) %75, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %81

81:                                               ; preds = %22, %70, %3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11LeftistHeap12swapChildrenEP4Node(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #4 align 2

declare void @_ZN4NodeC1ESt4pairIfiEiPS_S2_S2_(ptr, i64, i32, ptr, ptr, ptr) local_unnamed_addr

attributes #0 = { nobuiltin allocsize(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 = { nobuiltin 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 = { 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 }
attributes #6 = { builtin allocsize(0) }
attributes #7 = { builtin 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 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTS11LeftistHeap", !13, i64 0, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !13, i64 8}
!15 = !{!"_ZTSSt4pairIKiP4NodeE", !6, i64 0, !13, i64 8}
!16 = !{!12, !13, i64 0}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTS4Node", !19, i64 0, !6, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!19 = !{!"_ZTSSt4pairIfiE", !10, i64 0, !6, i64 4}
!20 = !{!18, !13, i64 16}
!21 = !{!18, !13, i64 24}
!22 = !{!18, !13, i64 32}
!23 = !{!13, !13, i64 0}
!24 = !{!18, !6, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass