; LLVM IR from yuikns/panther :: ann/src/bd_tree.ll (ZN10ANNbd_treeC2EPPdiii12ANNsplitRule13ANNshrinkRule)

; 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.ANNorthRect = type { ptr, ptr }
%class.ANNkd_tree = type { %class.ANNpointSet, i32, i32, i32, ptr, ptr, ptr, ptr, ptr }
%class.ANNpointSet = type { ptr }

@_ZTV10ANNbd_tree = external dso_local unnamed_addr constant { [12 x ptr] }, align 8
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1

; 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: mustprogress uwtable
declare dso_local void @_ZN11ANNorthRectC2Eidd(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, double noundef, double noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ANNbd_treeC2EPPdiii12ANNsplitRule13ANNshrinkRule(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %class.ANNorthRect, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store i32 %2, ptr %10, align 4, !tbaa !9
  store i32 %3, ptr %11, align 4, !tbaa !9
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !11
  store i32 %6, ptr %14, align 4, !tbaa !13
  %18 = load ptr, ptr %8, align 8
  %19 = load i32, ptr %10, align 4, !tbaa !9
  %20 = load i32, ptr %11, align 4, !tbaa !9
  %21 = load i32, ptr %12, align 4, !tbaa !9
  call void @_ZN10ANNkd_treeC2Eiii(ptr noundef nonnull align 8 dereferenceable(64) %18, i32 noundef %19, i32 noundef %20, i32 noundef %21)
  store ptr getelementptr inbounds inrange(-16, 80) ({ [12 x ptr] }, ptr @_ZTV10ANNbd_tree, i32 0, i32 0, i32 2), ptr %18, align 8, !tbaa !15
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 4
  store ptr %22, ptr %23, align 8, !tbaa !17
  %24 = load i32, ptr %10, align 4, !tbaa !9
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %7
  br label %115

27:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %28 = load i32, ptr %11, align 4, !tbaa !9
  invoke void @_ZN11ANNorthRectC2Eidd(ptr noundef nonnull align 8 dereferenceable(16) %15, i32 noundef %28, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %29 unwind label %49

29:                                               ; preds = %27
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 5
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %33 = load i32, ptr %10, align 4, !tbaa !9
  %34 = load i32, ptr %11, align 4, !tbaa !9
  invoke void @_Z11annEnclRectPPdPiiiR11ANNorthRect(ptr noundef %30, ptr noundef %32, i32 noundef %33, i32 noundef %34, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %35 unwind label %53

35:                                               ; preds = %29
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = getelementptr inbounds %class.ANNorthRect, ptr %15, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !21
  %39 = invoke noundef ptr @_Z9annCopyPtiPd(i32 noundef %36, ptr noundef %38)
          to label %40 unwind label %53

40:                                               ; preds = %35
  %41 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 7
  store ptr %39, ptr %41, align 8, !tbaa !23
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = getelementptr inbounds %class.ANNorthRect, ptr %15, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !24
  %45 = invoke noundef ptr @_Z9annCopyPtiPd(i32 noundef %42, ptr noundef %44)
          to label %46 unwind label %53

46:                                               ; preds = %40
  %47 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 8
  store ptr %45, ptr %47, align 8, !tbaa !25
  %48 = load i32, ptr %13, align 4, !tbaa !11
  switch i32 %48, label %112 [
    i32 0, label %57
    i32 1, label %68
    i32 5, label %79
    i32 3, label %79
    i32 2, label %90
    i32 4, label %101
  ]

49:                                               ; preds = %27
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %16, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %17, align 4
  br label %116

53:                                               ; preds = %112, %101, %90, %79, %68, %57, %40, %35, %29
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %16, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %17, align 4
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  br label %116

57:                                               ; preds = %46
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 5
  %60 = load ptr, ptr %59, align 8, !tbaa !20
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = load i32, ptr %14, align 4, !tbaa !13
  %65 = invoke noundef ptr @_Z8rbd_treePPdPiiiiR11ANNorthRectPFvS0_S1_RKS2_iiRiRdS6_E13ANNshrinkRule(ptr noundef %58, ptr noundef %60, i32 noundef %61, i32 noundef %62, i32 noundef %63, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef @_Z8kd_splitPPdPiRK11ANNorthRectiiRiRdS5_, i32 noundef %64)
          to label %66 unwind label %53

66:                                               ; preds = %57
  %67 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 6
  store ptr %65, ptr %67, align 8, !tbaa !26
  br label %114

68:                                               ; preds = %46
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 5
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  %72 = load i32, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = load i32, ptr %14, align 4, !tbaa !13
  %76 = invoke noundef ptr @_Z8rbd_treePPdPiiiiR11ANNorthRectPFvS0_S1_RKS2_iiRiRdS6_E13ANNshrinkRule(ptr noundef %69, ptr noundef %71, i32 noundef %72, i32 noundef %73, i32 noundef %74, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef @_Z11midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_, i32 noundef %75)
          to label %77 unwind label %53

77:                                               ; preds = %68
  %78 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 6
  store ptr %76, ptr %78, align 8, !tbaa !26
  br label %114

79:                                               ; preds = %46, %46
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 5
  %82 = load ptr, ptr %81, align 8, !tbaa !20
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %11, align 4, !tbaa !9
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = load i32, ptr %14, align 4, !tbaa !13
  %87 = invoke noundef ptr @_Z8rbd_treePPdPiiiiR11ANNorthRectPFvS0_S1_RKS2_iiRiRdS6_E13ANNshrinkRule(ptr noundef %80, ptr noundef %82, i32 noundef %83, i32 noundef %84, i32 noundef %85, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef @_Z14sl_midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_, i32 noundef %86)
          to label %88 unwind label %53

88:                                               ; preds = %79
  %89 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 6
  store ptr %87, ptr %89, align 8, !tbaa !26
  br label %114

90:                                               ; preds = %46
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 5
  %93 = load ptr, ptr %92, align 8, !tbaa !20
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = load i32, ptr %12, align 4, !tbaa !9
  %97 = load i32, ptr %14, align 4, !tbaa !13
  %98 = invoke noundef ptr @_Z8rbd_treePPdPiiiiR11ANNorthRectPFvS0_S1_RKS2_iiRiRdS6_E13ANNshrinkRule(ptr noundef %91, ptr noundef %93, i32 noundef %94, i32 noundef %95, i32 noundef %96, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef @_Z10fair_splitPPdPiRK11ANNorthRectiiRiRdS5_, i32 noundef %97)
          to label %99 unwind label %53

99:                                               ; preds = %90
  %100 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 6
  store ptr %98, ptr %100, align 8, !tbaa !26
  br label %114

101:                                              ; preds = %46
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 5
  %104 = load ptr, ptr %103, align 8, !tbaa !20
  %105 = load i32, ptr %10, align 4, !tbaa !9
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = load i32, ptr %12, align 4, !tbaa !9
  %108 = load i32, ptr %14, align 4, !tbaa !13
  %109 = invoke noundef ptr @_Z8rbd_treePPdPiiiiR11ANNorthRectPFvS0_S1_RKS2_iiRiRdS6_E13ANNshrinkRule(ptr noundef %102, ptr noundef %104, i32 noundef %105, i32 noundef %106, i32 noundef %107, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef @_Z13sl_fair_splitPPdPiRK11ANNorthRectiiRiRdS5_, i32 noundef %108)
          to label %110 unwind label %53

110:                                              ; preds = %101
  %111 = getelementptr inbounds %class.ANNkd_tree, ptr %18, i32 0, i32 6
  store ptr %109, ptr %111, align 8, !tbaa !26
  br label %114

112:                                              ; preds = %46
  invoke void @_Z8annErrorPKc6ANNerr(ptr noundef @.str.10, i32 noundef 1)
          to label %113 unwind label %53

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113, %110, %99, %88, %77, %66
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %115

115:                                              ; preds = %114, %26
  ret void

116:                                              ; preds = %53, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @_ZN10ANNkd_treeD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %18) #5
  br label %117

117:                                              ; preds = %116
  %118 = load ptr, ptr %16, align 8
  %119 = load i32, ptr %17, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121
}

declare void @_ZN10ANNkd_treeC2Eiii(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3

declare void @_Z11annEnclRectPPdPiiiR11ANNorthRect(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #3

declare noundef ptr @_Z9annCopyPtiPd(i32 noundef, ptr noundef) #3

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

declare void @_Z8kd_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z11midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z14sl_midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z10fair_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z13sl_fair_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z8annErrorPKc6ANNerr(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind
declare void @_ZN10ANNkd_treeD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { "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 "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS12ANNsplitRule", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS13ANNshrinkRule", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!18, !6, i64 24}
!18 = !{!"_ZTS10ANNkd_tree", !19, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!19 = !{!"_ZTS11ANNpointSet"}
!20 = !{!18, !6, i64 32}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTS11ANNorthRect", !6, i64 0, !6, i64 8}
!23 = !{!18, !6, i64 48}
!24 = !{!22, !6, i64 8}
!25 = !{!18, !6, i64 56}
!26 = !{!18, !6, i64 40}


; 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.ANNorthRect = type { ptr, ptr }

@_ZTV10ANNbd_tree = external dso_local unnamed_addr constant { [12 x ptr] }, align 8
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@switch.table._ZN10ANNbd_treeC2EPPdiii12ANNsplitRule13ANNshrinkRule = private unnamed_addr constant [6 x ptr] [ptr @_Z8kd_splitPPdPiRK11ANNorthRectiiRiRdS5_, ptr @_Z11midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_, ptr @_Z10fair_splitPPdPiRK11ANNorthRectiiRiRdS5_, ptr @_Z14sl_midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_, ptr @_Z13sl_fair_splitPPdPiRK11ANNorthRectiiRiRdS5_, ptr @_Z14sl_midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_], align 8

; 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: mustprogress uwtable
declare dso_local void @_ZN11ANNorthRectC2Eidd(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, double noundef, double noundef) unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ANNbd_treeC2EPPdiii12ANNsplitRule13ANNshrinkRule(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %class.ANNorthRect, align 8
  tail call void @_ZN10ANNkd_treeC2Eiii(ptr noundef nonnull align 8 dereferenceable(64) %0, i32 noundef %2, i32 noundef %3, i32 noundef %4)
  store ptr getelementptr inbounds inrange(-16, 80) (i8, ptr @_ZTV10ANNbd_tree, i64 16), ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %1, ptr %9, align 8, !tbaa !8
  %10 = icmp eq i32 %2, 0
  br i1 %10, label %36, label %11

11:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  invoke void @_ZN11ANNorthRectC2Eidd(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %3, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %12 unwind label %26

12:                                               ; preds = %11
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  invoke void @_Z11annEnclRectPPdPiiiR11ANNorthRect(ptr noundef %1, ptr noundef %14, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %15 unwind label %28

15:                                               ; preds = %12
  %16 = load ptr, ptr %8, align 8, !tbaa !15
  %17 = invoke noundef ptr @_Z9annCopyPtiPd(i32 noundef %3, ptr noundef %16)
          to label %18 unwind label %28

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %17, ptr %19, align 8, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !18
  %22 = invoke noundef ptr @_Z9annCopyPtiPd(i32 noundef %3, ptr noundef %21)
          to label %23 unwind label %28

23:                                               ; preds = %18
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr %22, ptr %24, align 8, !tbaa !19
  %25 = icmp ult i32 %5, 6
  br i1 %25, label %switch.lookup, label %33

26:                                               ; preds = %11
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %37

28:                                               ; preds = %switch.lookup, %33, %18, %15, %12
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br label %37

switch.lookup:                                    ; preds = %23
  %30 = zext nneg i32 %5 to i64
  %switch.gep = getelementptr inbounds [6 x ptr], ptr @switch.table._ZN10ANNbd_treeC2EPPdiii12ANNsplitRule13ANNshrinkRule, i64 0, i64 %30
  %switch.load = load ptr, ptr %switch.gep, align 8
  %31 = load ptr, ptr %13, align 8, !tbaa !14
  %32 = invoke noundef ptr @_Z8rbd_treePPdPiiiiR11ANNorthRectPFvS0_S1_RKS2_iiRiRdS6_E13ANNshrinkRule(ptr noundef %1, ptr noundef %31, i32 noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull %switch.load, i32 noundef %6)
          to label %.sink.split unwind label %28

33:                                               ; preds = %23
  invoke void @_Z8annErrorPKc6ANNerr(ptr noundef nonnull @.str.10, i32 noundef 1)
          to label %35 unwind label %28

.sink.split:                                      ; preds = %switch.lookup
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr %32, ptr %34, align 8, !tbaa !20
  br label %35

35:                                               ; preds = %.sink.split, %33
  call void @_ZN11ANNorthRectD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %36

36:                                               ; preds = %7, %35
  ret void

37:                                               ; preds = %28, %26
  %.pn = phi { ptr, i32 } [ %29, %28 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @_ZN10ANNkd_treeD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0) #5
  resume { ptr, i32 } %.pn
}

declare void @_ZN10ANNkd_treeC2Eiii(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef, i32 noundef, i32 noundef) unnamed_addr #3

declare void @_Z11annEnclRectPPdPiiiR11ANNorthRect(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

declare noundef ptr @_Z9annCopyPtiPd(i32 noundef, ptr noundef) local_unnamed_addr #3

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

declare void @_Z8kd_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z11midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z14sl_midpt_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z10fair_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z13sl_fair_splitPPdPiRK11ANNorthRectiiRiRdS5_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #3

declare void @_Z8annErrorPKc6ANNerr(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN10ANNkd_treeD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { "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 "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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 24}
!9 = !{!"_ZTS10ANNkd_tree", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56}
!10 = !{!"_ZTS11ANNpointSet"}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"any pointer", !12, i64 0}
!14 = !{!9, !13, i64 32}
!15 = !{!16, !13, i64 0}
!16 = !{!"_ZTS11ANNorthRect", !13, i64 0, !13, i64 8}
!17 = !{!9, !13, i64 48}
!18 = !{!16, !13, i64 8}
!19 = !{!9, !13, i64 56}
!20 = !{!9, !13, i64 40}


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