; LLVM IR from USE-jx/hybridAstar_lbfgsSmooth :: src/hybrid_astar_searcher/src/dynamicvoronoi.ll (ZN14DynamicVoronoiC2Ev)

; 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.DynamicVoronoi = type { %class.BucketPrioQueue, %"class.std::queue", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", i32, i32, ptr, ptr, i32, double, double }
%class.BucketPrioQueue = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::queue<IntPoint>, std::allocator<std::queue<IntPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::queue<IntPoint>, std::allocator<std::queue<IntPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::queue<IntPoint>, std::allocator<std::queue<IntPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::queue<IntPoint>, std::allocator<std::queue<IntPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<IntPoint, std::allocator<IntPoint>>::_Deque_impl" }
%"struct.std::_Deque_base<IntPoint, std::allocator<IntPoint>>::_Deque_impl" = type { %"struct.std::_Deque_base<IntPoint, std::allocator<IntPoint>>::_Deque_impl_data" }
%"struct.std::_Deque_base<IntPoint, std::allocator<IntPoint>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<IntPoint, std::allocator<IntPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<IntPoint, std::allocator<IntPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<IntPoint, std::allocator<IntPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<IntPoint, std::allocator<IntPoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14DynamicVoronoiC2Ev(ptr noundef nonnull align 8 dereferenceable(232) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  %6 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 0
  call void @_ZN15BucketPrioQueueC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %6)
  %7 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 1
  invoke void @_ZNSt5queueI8IntPointSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %8 unwind label %16

8:                                                ; preds = %1
  %9 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 2
  call void @_ZNSt6vectorI8IntPointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %10 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 3
  call void @_ZNSt6vectorI8IntPointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %11 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 4
  call void @_ZNSt6vectorI8IntPointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %12 = call double @sqrt(double noundef 2.000000e+00) #5
  %13 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 11
  store double %12, ptr %13, align 8, !tbaa !9
  %14 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 7
  store ptr null, ptr %14, align 8, !tbaa !29
  %15 = getelementptr inbounds %class.DynamicVoronoi, ptr %5, i32 0, i32 8
  store ptr null, ptr %15, align 8, !tbaa !30
  ret void

16:                                               ; preds = %1
  %17 = landingpad { ptr, i32 }
          cleanup
  %18 = extractvalue { ptr, i32 } %17, 0
  store ptr %18, ptr %3, align 8
  %19 = extractvalue { ptr, i32 } %17, 1
  store i32 %19, ptr %4, align 4
  call void @_ZN15BucketPrioQueueD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %20

20:                                               ; preds = %16
  %21 = load ptr, ptr %3, align 8
  %22 = load i32, ptr %4, align 4
  %23 = insertvalue { ptr, i32 } poison, ptr %21, 0
  %24 = insertvalue { ptr, i32 } %23, i32 %22, 1
  resume { ptr, i32 } %24
}

declare void @_ZN15BucketPrioQueueC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN15BucketPrioQueueD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 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 = { "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 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 #3 = { 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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !28, i64 224}
!10 = !{!"_ZTS14DynamicVoronoi", !11, i64 0, !17, i64 32, !24, i64 112, !24, i64 136, !24, i64 160, !12, i64 184, !12, i64 188, !6, i64 192, !6, i64 200, !12, i64 208, !28, i64 216, !28, i64 224}
!11 = !{!"_ZTS15BucketPrioQueue", !12, i64 0, !12, i64 4, !13, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSSt6vectorISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt5queueI8IntPointSt5dequeIS0_SaIS0_EEE", !18, i64 0}
!18 = !{!"_ZTSSt5dequeI8IntPointSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt11_Deque_baseI8IntPointSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseI8IntPointSaIS0_EE11_Deque_implE", !21, i64 0}
!21 = !{!"_ZTSNSt11_Deque_baseI8IntPointSaIS0_EE16_Deque_impl_dataE", !6, i64 0, !22, i64 8, !23, i64 16, !23, i64 48}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSSt15_Deque_iteratorI8IntPointRS0_PS0_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt6vectorI8IntPointSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseI8IntPointSaIS0_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI8IntPointSaIS0_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseI8IntPointSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"double", !7, i64 0}
!29 = !{!10, !6, i64 192}
!30 = !{!10, !6, i64 200}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN14DynamicVoronoiC2Ev(ptr noundef nonnull align 8 dereferenceable(232) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN15BucketPrioQueueC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %2 = getelementptr inbounds i8, ptr %0, i64 32
  invoke void @_ZNSt5queueI8IntPointSt5dequeIS0_SaIS0_EEEC2IS3_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %2)
          to label %3 unwind label %9

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 112
  tail call void @_ZNSt6vectorI8IntPointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %5 = getelementptr inbounds i8, ptr %0, i64 136
  tail call void @_ZNSt6vectorI8IntPointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %6 = getelementptr inbounds i8, ptr %0, i64 160
  tail call void @_ZNSt6vectorI8IntPointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  %7 = getelementptr inbounds i8, ptr %0, i64 224
  store double 0x3FF6A09E667F3BCD, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 192
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  ret void

9:                                                ; preds = %1
  %10 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN15BucketPrioQueueD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #5
  resume { ptr, i32 } %10
}

declare void @_ZN15BucketPrioQueueC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN15BucketPrioQueueD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 = { "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 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !27, i64 224}
!6 = !{!"_ZTS14DynamicVoronoi", !7, i64 0, !16, i64 32, !23, i64 112, !23, i64 136, !23, i64 160, !8, i64 184, !8, i64 188, !15, i64 192, !15, i64 200, !8, i64 208, !27, i64 216, !27, i64 224}
!7 = !{!"_ZTS15BucketPrioQueue", !8, i64 0, !8, i64 4, !11, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6vectorISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt5queueI8IntPointSt5dequeIS1_SaIS1_EEESaIS5_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"_ZTSSt5queueI8IntPointSt5dequeIS0_SaIS0_EEE", !17, i64 0}
!17 = !{!"_ZTSSt5dequeI8IntPointSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt11_Deque_baseI8IntPointSaIS0_EE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseI8IntPointSaIS0_EE11_Deque_implE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseI8IntPointSaIS0_EE16_Deque_impl_dataE", !15, i64 0, !21, i64 8, !22, i64 16, !22, i64 48}
!21 = !{!"long", !9, i64 0}
!22 = !{!"_ZTSSt15_Deque_iteratorI8IntPointRS0_PS0_E", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!23 = !{!"_ZTSSt6vectorI8IntPointSaIS0_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseI8IntPointSaIS0_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseI8IntPointSaIS0_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseI8IntPointSaIS0_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!27 = !{!"double", !9, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass