; LLVM IR from bohanwang/libpgo :: src/core/mesh/predicates.ll (ZN3pgo4Mesh21inCircumsphereOnPlaneEPKdS2_S2_S2_)

; 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::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@_ZN3pgo4MeshL7getCompE = external hidden global [3 x %"class.std::function"], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3pgo4Mesh8orient2dEPKdS2_S2_(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3pgo4Mesh8incircleEPKdS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3pgo4Mesh21inCircumsphereOnPlaneEPKdS2_S2_S2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::function", align 8
  %13 = alloca [2 x double], align 16
  %14 = alloca [2 x double], align 16
  %15 = alloca [2 x double], align 16
  %16 = alloca [2 x double], align 16
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %90, %4
  %23 = load i32, ptr %10, align 4, !tbaa !9
  %24 = icmp slt i32 %23, 3
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  store i32 2, ptr %11, align 4
  br label %95

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #3
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [3 x %"class.std::function"], ptr @_ZN3pgo4MeshL7getCompE, i64 0, i64 %28
  call void @_ZNSt8functionIFvPKdPdEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %29)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds [2 x double], ptr %13, i64 0, i64 0
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %30, ptr noundef %31)
          to label %32 unwind label %50

32:                                               ; preds = %26
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %33, ptr noundef %34)
          to label %35 unwind label %50

35:                                               ; preds = %32
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds [2 x double], ptr %15, i64 0, i64 0
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %36, ptr noundef %37)
          to label %38 unwind label %50

38:                                               ; preds = %35
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds [2 x double], ptr %16, i64 0, i64 0
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %39, ptr noundef %40)
          to label %41 unwind label %50

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %42 = getelementptr inbounds [2 x double], ptr %13, i64 0, i64 0
  %43 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  %44 = getelementptr inbounds [2 x double], ptr %15, i64 0, i64 0
  %45 = invoke noundef double @_ZN3pgo4Mesh8orient2dEPKdS2_S2_(ptr noundef %42, ptr noundef %43, ptr noundef %44)
          to label %46 unwind label %54

46:                                               ; preds = %41
  store double %45, ptr %19, align 8, !tbaa !11
  %47 = load double, ptr %19, align 8, !tbaa !11
  %48 = fcmp oeq double %47, 0.000000e+00
  br i1 %48, label %49, label %58

49:                                               ; preds = %46
  store i32 4, ptr %11, align 4
  br label %87

50:                                               ; preds = %38, %35, %32, %26
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %17, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %18, align 4
  br label %94

54:                                               ; preds = %41
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %17, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %18, align 4
  br label %93

58:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %59 = load double, ptr %19, align 8, !tbaa !11
  %60 = fcmp ogt double %59, 0.000000e+00
  %61 = zext i1 %60 to i64
  %62 = select i1 %60, i32 1, i32 -1
  store i32 %62, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %63 = getelementptr inbounds [2 x double], ptr %13, i64 0, i64 0
  %64 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  %65 = getelementptr inbounds [2 x double], ptr %15, i64 0, i64 0
  %66 = getelementptr inbounds [2 x double], ptr %16, i64 0, i64 0
  %67 = invoke noundef double @_ZN3pgo4Mesh8incircleEPKdS2_S2_S2_(ptr noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66)
          to label %68 unwind label %74

68:                                               ; preds = %58
  store double %67, ptr %21, align 8, !tbaa !11
  %69 = load double, ptr %21, align 8, !tbaa !11
  %70 = fcmp olt double %69, 0.000000e+00
  br i1 %70, label %71, label %78

71:                                               ; preds = %68
  %72 = load i32, ptr %20, align 4, !tbaa !9
  %73 = mul nsw i32 %72, -1
  store i32 %73, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %86

74:                                               ; preds = %58
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %17, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  br label %93

78:                                               ; preds = %68
  %79 = load double, ptr %21, align 8, !tbaa !11
  %80 = fcmp ogt double %79, 0.000000e+00
  br i1 %80, label %81, label %84

81:                                               ; preds = %78
  %82 = load i32, ptr %20, align 4, !tbaa !9
  %83 = mul nsw i32 %82, 1
  store i32 %83, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %86

84:                                               ; preds = %78
  br label %85

85:                                               ; preds = %84
  store i32 0, ptr %11, align 4
  br label %86

86:                                               ; preds = %85, %81, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  br label %87

87:                                               ; preds = %86, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  %88 = load i32, ptr %11, align 4
  switch i32 %88, label %95 [
    i32 0, label %89
    i32 4, label %90
  ]

89:                                               ; preds = %87
  br label %90

90:                                               ; preds = %89, %87
  %91 = load i32, ptr %10, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %10, align 4, !tbaa !9
  br label %22, !llvm.loop !13

93:                                               ; preds = %74, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %94

94:                                               ; preds = %93, %50
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %100

95:                                               ; preds = %87, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  %96 = load i32, ptr %11, align 4
  switch i32 %96, label %105 [
    i32 2, label %97
    i32 1, label %98
  ]

97:                                               ; preds = %95
  store i32 0, ptr %5, align 4
  br label %98

98:                                               ; preds = %97, %95
  %99 = load i32, ptr %5, align 4
  ret i32 %99

100:                                              ; preds = %94
  %101 = load ptr, ptr %17, align 8
  %102 = load i32, ptr %18, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104

105:                                              ; preds = %95
  unreachable
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@_ZN3pgo4MeshL7getCompE = external hidden global [3 x %"class.std::function"], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3pgo4Mesh8orient2dEPKdS2_S2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN3pgo4Mesh8incircleEPKdS2_S2_S2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3pgo4Mesh21inCircumsphereOnPlaneEPKdS2_S2_S2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::function", align 8
  %6 = alloca [2 x double], align 16
  %7 = alloca [2 x double], align 16
  %8 = alloca [2 x double], align 16
  %9 = alloca [2 x double], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @_ZNSt8functionIFvPKdPdEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) @_ZN3pgo4MeshL7getCompE)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %0, ptr noundef nonnull %6)
          to label %10 unwind label %17

10:                                               ; preds = %4
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %1, ptr noundef nonnull %7)
          to label %11 unwind label %17

11:                                               ; preds = %10
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %2, ptr noundef nonnull %8)
          to label %12 unwind label %17

12:                                               ; preds = %11
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %3, ptr noundef nonnull %9)
          to label %13 unwind label %17

13:                                               ; preds = %12
  %14 = invoke noundef double @_ZN3pgo4Mesh8orient2dEPKdS2_S2_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
          to label %15 unwind label %19

15:                                               ; preds = %13
  %16 = fcmp oeq double %14, 0.000000e+00
  br i1 %16, label %.thread31, label %21

.thread31:                                        ; preds = %15
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br label %31

17:                                               ; preds = %50, %49, %48, %47, %34, %33, %32, %31, %12, %11, %10, %4
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %64

19:                                               ; preds = %51, %35, %13
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %64

21:                                               ; preds = %15
  %22 = fcmp ogt double %14, 0.000000e+00
  %23 = invoke noundef double @_ZN3pgo4Mesh8incircleEPKdS2_S2_S2_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %24 unwind label %26

24:                                               ; preds = %21
  %25 = fcmp olt double %23, 0.000000e+00
  br i1 %25, label %.thread, label %28

26:                                               ; preds = %55, %39, %21
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %64

.thread:                                          ; preds = %58, %42, %24
  %.lcssa38 = phi i1 [ %22, %24 ], [ %40, %42 ], [ %56, %58 ]
  %.neg.le = select i1 %.lcssa38, i32 -1, i32 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br label %.loopexit

28:                                               ; preds = %24
  %29 = fcmp ogt double %23, 0.000000e+00
  %30 = select i1 %22, i32 1, i32 -1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br i1 %29, label %.loopexit, label %31

31:                                               ; preds = %28, %.thread31
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @_ZNSt8functionIFvPKdPdEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3pgo4MeshL7getCompE, i64 32))
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %0, ptr noundef nonnull %6)
          to label %32 unwind label %17

32:                                               ; preds = %31
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %1, ptr noundef nonnull %7)
          to label %33 unwind label %17

33:                                               ; preds = %32
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %2, ptr noundef nonnull %8)
          to label %34 unwind label %17

34:                                               ; preds = %33
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %3, ptr noundef nonnull %9)
          to label %35 unwind label %17

35:                                               ; preds = %34
  %36 = invoke noundef double @_ZN3pgo4Mesh8orient2dEPKdS2_S2_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
          to label %37 unwind label %19

37:                                               ; preds = %35
  %38 = fcmp oeq double %36, 0.000000e+00
  br i1 %38, label %.thread31.1, label %39

39:                                               ; preds = %37
  %40 = fcmp ogt double %36, 0.000000e+00
  %41 = invoke noundef double @_ZN3pgo4Mesh8incircleEPKdS2_S2_S2_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %42 unwind label %26

42:                                               ; preds = %39
  %43 = fcmp olt double %41, 0.000000e+00
  br i1 %43, label %.thread, label %44

44:                                               ; preds = %42
  %45 = fcmp ogt double %41, 0.000000e+00
  %46 = select i1 %40, i32 1, i32 -1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br i1 %45, label %.loopexit, label %47

.thread31.1:                                      ; preds = %37
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br label %47

47:                                               ; preds = %.thread31.1, %44
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #3
  call void @_ZNSt8functionIFvPKdPdEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) getelementptr inbounds (i8, ptr @_ZN3pgo4MeshL7getCompE, i64 64))
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %0, ptr noundef nonnull %6)
          to label %48 unwind label %17

48:                                               ; preds = %47
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %1, ptr noundef nonnull %7)
          to label %49 unwind label %17

49:                                               ; preds = %48
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %2, ptr noundef nonnull %8)
          to label %50 unwind label %17

50:                                               ; preds = %49
  invoke void @_ZNKSt8functionIFvPKdPdEEclES1_S2_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %3, ptr noundef nonnull %9)
          to label %51 unwind label %17

51:                                               ; preds = %50
  %52 = invoke noundef double @_ZN3pgo4Mesh8orient2dEPKdS2_S2_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
          to label %53 unwind label %19

53:                                               ; preds = %51
  %54 = fcmp oeq double %52, 0.000000e+00
  br i1 %54, label %.thread31.2, label %55

55:                                               ; preds = %53
  %56 = fcmp ogt double %52, 0.000000e+00
  %57 = invoke noundef double @_ZN3pgo4Mesh8incircleEPKdS2_S2_S2_(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %58 unwind label %26

58:                                               ; preds = %55
  %59 = fcmp olt double %57, 0.000000e+00
  br i1 %59, label %.thread, label %60

60:                                               ; preds = %58
  %61 = fcmp ogt double %57, 0.000000e+00
  %62 = select i1 %56, i32 1, i32 -1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br i1 %61, label %.loopexit, label %63

.thread31.2:                                      ; preds = %53
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  br label %63

63:                                               ; preds = %.thread31.2, %60
  br label %.loopexit

64:                                               ; preds = %19, %26, %17
  %.pn.pn = phi { ptr, i32 } [ %18, %17 ], [ %27, %26 ], [ %20, %19 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #3
  resume { ptr, i32 } %.pn.pn

.loopexit:                                        ; preds = %28, %44, %60, %63, %.thread
  %spec.select = phi i32 [ %.neg.le, %.thread ], [ %30, %28 ], [ %46, %44 ], [ %62, %60 ], [ 0, %63 ]
  ret i32 %spec.select
}

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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)"}


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