; LLVM IR from SOHNE/Dura2D :: src/collision/d2AABBTree.ll (ZNK10d2AABBTree4PickERK6d2Vec2)

; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl" }
%"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl" = type { %"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%class.d2AABBTree = type { %class.d2Broadphase, ptr, %"class.std::__cxx11::list", float, %"class.std::vector" }
%class.d2Broadphase = type { ptr }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::pair<d2Body *, d2Body *>, std::allocator<std::pair<d2Body *, d2Body *>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::pair<d2Body *, d2Body *>, std::allocator<std::pair<d2Body *, d2Body *>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<d2Node *, std::allocator<d2Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.d2Node = type { ptr, [2 x ptr], i8, %struct.d2AABB, ptr }
%struct.d2AABB = type { %struct.d2Vec2, %struct.d2Vec2, ptr, ptr }
%struct.d2Vec2 = type { float, float }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK10d2AABBTree4PickERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::queue", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #4
  call void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %12 = getelementptr inbounds %class.d2AABBTree, ptr %11, i32 0, i32 1
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %22

15:                                               ; preds = %2
  %16 = getelementptr inbounds %class.d2AABBTree, ptr %11, i32 0, i32 1
  invoke void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %17 unwind label %18

17:                                               ; preds = %15
  br label %22

18:                                               ; preds = %23, %15
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %7, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %8, align 4
  br label %69

22:                                               ; preds = %17, %2
  br label %23

23:                                               ; preds = %65, %22
  %24 = invoke noundef zeroext i1 @_ZNKSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %25 unwind label %18

25:                                               ; preds = %23
  %26 = xor i1 %24, true
  br i1 %26, label %27, label %66

27:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %29 unwind label %48

29:                                               ; preds = %27
  %30 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %30, ptr %9, align 8, !tbaa !5
  invoke void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
          to label %31 unwind label %48

31:                                               ; preds = %29
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = invoke noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72) %32)
          to label %34 unwind label %48

34:                                               ; preds = %31
  br i1 %33, label %35, label %53

35:                                               ; preds = %34
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.d2Node, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !23
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = invoke noundef zeroext i1 @_ZNK6d2AABB8ContainsERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 4 dereferenceable(8) %39)
          to label %41 unwind label %48

41:                                               ; preds = %35
  br i1 %40, label %42, label %52

42:                                               ; preds = %41
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.d2Node, ptr %43, i32 0, i32 4
  %45 = load ptr, ptr %44, align 8, !tbaa !23
  %46 = getelementptr inbounds %struct.d2AABB, ptr %45, i32 0, i32 3
  %47 = load ptr, ptr %46, align 8, !tbaa !28
  store ptr %47, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %63

48:                                               ; preds = %57, %53, %35, %31, %29, %27
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %69

52:                                               ; preds = %41
  br label %62

53:                                               ; preds = %34
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.d2Node, ptr %54, i32 0, i32 1
  %56 = getelementptr inbounds [2 x ptr], ptr %55, i64 0, i64 0
  invoke void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(8) %56)
          to label %57 unwind label %48

57:                                               ; preds = %53
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.d2Node, ptr %58, i32 0, i32 1
  %60 = getelementptr inbounds [2 x ptr], ptr %59, i64 0, i64 1
  invoke void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(8) %60)
          to label %61 unwind label %48

61:                                               ; preds = %57
  br label %62

62:                                               ; preds = %61, %52
  store i32 0, ptr %10, align 4
  br label %63

63:                                               ; preds = %62, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %64 = load i32, ptr %10, align 4
  switch i32 %64, label %67 [
    i32 0, label %65
  ]

65:                                               ; preds = %63
  br label %23, !llvm.loop !29

66:                                               ; preds = %25
  store ptr null, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %67

67:                                               ; preds = %66, %63
  call void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #4
  %68 = load ptr, ptr %3, align 8
  ret ptr %68

69:                                               ; preds = %48, %18
  call void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %6) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #4
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr %7, align 8
  %72 = load i32, ptr %8, align 4
  %73 = insertvalue { ptr, i32 } poison, ptr %71, 0
  %74 = insertvalue { ptr, i32 } %73, i32 %72, 1
  resume { ptr, i32 } %74
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = { 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, !6, i64 8}
!10 = !{!"_ZTS10d2AABBTree", !11, i64 0, !6, i64 8, !12, i64 16, !18, i64 40, !19, i64 48}
!11 = !{!"_ZTS12d2Broadphase"}
!12 = !{!"_ZTSNSt7__cxx114listISt4pairIP6d2BodyS3_ESaIS4_EEE", !13, i64 0}
!13 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EEE", !14, i64 0}
!14 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EE10_List_implE", !15, i64 0}
!15 = !{!"_ZTSNSt8__detail17_List_node_headerE", !16, i64 0, !17, i64 16}
!16 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIP6d2NodeSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIP6d2NodeSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!24, !6, i64 64}
!24 = !{!"_ZTS6d2Node", !6, i64 0, !7, i64 8, !25, i64 24, !26, i64 32, !6, i64 64}
!25 = !{!"bool", !7, i64 0}
!26 = !{!"_ZTS6d2AABB", !27, i64 0, !27, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"_ZTS6d2Vec2", !18, i64 0, !18, i64 4}
!28 = !{!26, !6, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; 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::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl" }
%"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl" = type { %"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<d2Node *, std::allocator<d2Node *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK10d2AABBTree4PickERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::queue", align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #4
  call void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %9, label %6

6:                                                ; preds = %2
  invoke void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %9 unwind label %7

7:                                                ; preds = %6
  %8 = landingpad { ptr, i32 }
          cleanup
  br label %30

9:                                                ; preds = %6, %2
  %10 = call noundef zeroext i1 @_ZNKSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %10, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %9, %28
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %12 = load ptr, ptr %11, align 8, !tbaa !22
  call void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  %13 = call noundef zeroext i1 @_ZNK6d2Node6IsLeafEv(ptr noundef nonnull align 8 dereferenceable(72) %12)
  br i1 %13, label %14, label %24

14:                                               ; preds = %.lr.ph
  %15 = getelementptr inbounds i8, ptr %12, i64 64
  %16 = load ptr, ptr %15, align 8, !tbaa !23
  %17 = call noundef zeroext i1 @_ZNK6d2AABB8ContainsERK6d2Vec2(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 4 dereferenceable(8) %1)
  br i1 %17, label %.thread, label %28

.thread:                                          ; preds = %14
  %18 = getelementptr inbounds i8, ptr %12, i64 64
  %19 = load ptr, ptr %18, align 8, !tbaa !23
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !28
  br label %.loopexit

22:                                               ; preds = %26, %24
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %30

24:                                               ; preds = %.lr.ph
  %25 = getelementptr inbounds i8, ptr %12, i64 8
  invoke void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %25)
          to label %26 unwind label %22

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %12, i64 16
  invoke void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %28 unwind label %22

28:                                               ; preds = %14, %26
  %29 = call noundef zeroext i1 @_ZNKSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %3)
  br i1 %29, label %.loopexit, label %.lr.ph, !llvm.loop !29

.loopexit:                                        ; preds = %28, %9, %.thread
  %.2 = phi ptr [ %21, %.thread ], [ null, %9 ], [ null, %28 ]
  call void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  ret ptr %.2

30:                                               ; preds = %22, %7
  %.pn = phi { ptr, i32 } [ %23, %22 ], [ %8, %7 ]
  call void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %3) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE4pushERKS1_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueIP6d2NodeSt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = { 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, !8, i64 8}
!6 = !{!"_ZTS10d2AABBTree", !7, i64 0, !8, i64 8, !11, i64 16, !17, i64 40, !18, i64 48}
!7 = !{!"_ZTS12d2Broadphase"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSNSt7__cxx114listISt4pairIP6d2BodyS3_ESaIS4_EEE", !12, i64 0}
!12 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EEE", !13, i64 0}
!13 = !{!"_ZTSNSt7__cxx1110_List_baseISt4pairIP6d2BodyS3_ESaIS4_EE10_List_implE", !14, i64 0}
!14 = !{!"_ZTSNSt8__detail17_List_node_headerE", !15, i64 0, !16, i64 16}
!15 = !{!"_ZTSNSt8__detail15_List_node_baseE", !8, i64 0, !8, i64 8}
!16 = !{!"long", !9, i64 0}
!17 = !{!"float", !9, i64 0}
!18 = !{!"_ZTSSt6vectorIP6d2NodeSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIP6d2NodeSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP6d2NodeSaIS1_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!22 = !{!8, !8, i64 0}
!23 = !{!24, !8, i64 64}
!24 = !{!"_ZTS6d2Node", !8, i64 0, !9, i64 8, !25, i64 24, !26, i64 32, !8, i64 64}
!25 = !{!"bool", !9, i64 0}
!26 = !{!"_ZTS6d2AABB", !27, i64 0, !27, i64 8, !8, i64 16, !8, i64 24}
!27 = !{!"_ZTS6d2Vec2", !17, i64 0, !17, i64 4}
!28 = !{!26, !8, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass