; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Isect.ll (Z12R3IntersectsRK6R3LineRK13R3OrientedBoxP7R3Point)

; 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.R3Line = type { %class.R3Point, %class.R3Vector }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }

; 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 noundef i32 @_Z12R3IntersectsRK6R3LineRK5R3BoxP7R3Point(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z12R3IntersectsRK6R3LineRK13R3OrientedBoxP7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %class.R3Line, align 8
  %9 = alloca %class.R3Affine, align 8
  %10 = alloca %class.R4Matrix, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %class.R3Box, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %class.R3Affine, align 8
  %17 = alloca %class.R4Matrix, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = call noundef i32 @_ZNK13R3OrientedBox7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(128) %18)
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %3
  store i32 0, ptr %4, align 4
  br label %93

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN6R3LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(48) %23)
  call void @llvm.lifetime.start.p0(i64 272, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %10) #6
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNK13R3OrientedBox11CoordSystemEv(ptr noundef nonnull align 8 dereferenceable(128) %24)
  call void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8 %10, ptr noundef nonnull align 8 dereferenceable(96) %25)
  call void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %9, ptr noundef nonnull align 8 dereferenceable(128) %10, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 128, ptr %10) #6
  invoke void @_ZN6R3Line9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %26 unwind label %55

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 56, ptr %13) #6
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = invoke noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %27, i32 noundef 0)
          to label %29 unwind label %59

29:                                               ; preds = %26
  %30 = fneg double %28
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = invoke noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %31, i32 noundef 1)
          to label %33 unwind label %59

33:                                               ; preds = %29
  %34 = fneg double %32
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = invoke noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %35, i32 noundef 2)
          to label %37 unwind label %59

37:                                               ; preds = %33
  %38 = fneg double %36
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = invoke noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %39, i32 noundef 0)
          to label %41 unwind label %59

41:                                               ; preds = %37
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = invoke noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %42, i32 noundef 1)
          to label %44 unwind label %59

44:                                               ; preds = %41
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = invoke noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %45, i32 noundef 2)
          to label %47 unwind label %59

47:                                               ; preds = %44
  invoke void @_ZN5R3BoxC1Edddddd(ptr noundef nonnull align 8 dereferenceable(56) %13, double noundef %30, double noundef %34, double noundef %38, double noundef %40, double noundef %43, double noundef %46)
          to label %48 unwind label %59

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = invoke noundef i32 @_Z12R3IntersectsRK6R3LineRK5R3BoxP7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef %49)
          to label %51 unwind label %63

51:                                               ; preds = %48
  store i32 %50, ptr %14, align 4, !tbaa !9
  %52 = load i32, ptr %14, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %67

54:                                               ; preds = %51
  store i32 0, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %89

55:                                               ; preds = %22
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %11, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %12, align 4
  br label %92

59:                                               ; preds = %47, %44, %41, %37, %33, %29, %26
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %11, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %12, align 4
  br label %91

63:                                               ; preds = %48
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %11, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %12, align 4
  br label %90

67:                                               ; preds = %51
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %87

70:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 272, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %17) #6
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = invoke noundef nonnull align 8 dereferenceable(96) ptr @_ZNK13R3OrientedBox11CoordSystemEv(ptr noundef nonnull align 8 dereferenceable(128) %71)
          to label %73 unwind label %78

73:                                               ; preds = %70
  invoke void @_ZNK13R3CoordSystem6MatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8 %17, ptr noundef nonnull align 8 dereferenceable(96) %72)
          to label %74 unwind label %78

74:                                               ; preds = %73
  invoke void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %16, ptr noundef nonnull align 8 dereferenceable(128) %17, i32 noundef 0)
          to label %75 unwind label %78

75:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 128, ptr %17) #6
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %77 unwind label %82

77:                                               ; preds = %75
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %16) #6
  call void @llvm.lifetime.end.p0(i64 272, ptr %16) #6
  br label %87

78:                                               ; preds = %74, %73, %70
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %11, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 128, ptr %17) #6
  br label %86

82:                                               ; preds = %75
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %16) #6
  br label %86

86:                                               ; preds = %82, %78
  call void @llvm.lifetime.end.p0(i64 272, ptr %16) #6
  br label %90

87:                                               ; preds = %77, %67
  %88 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %88, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %89

89:                                               ; preds = %87, %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #6
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %9) #6
  call void @llvm.lifetime.end.p0(i64 272, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #6
  br label %93

90:                                               ; preds = %86, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %13) #6
  br label %91

91:                                               ; preds = %90, %59
  call void @llvm.lifetime.end.p0(i64 56, ptr %13) #6
  br label %92

92:                                               ; preds = %91, %55
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %9) #6
  call void @llvm.lifetime.end.p0(i64 272, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #6
  br label %95

93:                                               ; preds = %89, %21
  %94 = load i32, ptr %4, align 4
  ret i32 %94

95:                                               ; preds = %92
  %96 = load ptr, ptr %11, align 8
  %97 = load i32, ptr %12, align 4
  %98 = insertvalue { ptr, i32 } poison, ptr %96, 0
  %99 = insertvalue { ptr, i32 } %98, i32 %97, 1
  resume { ptr, i32 } %99
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK13R3OrientedBox7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(128)) #2 align 2

declare void @_ZN6R3LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

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

declare void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(96)) #3

declare void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) unnamed_addr #3

declare void @_ZN6R3Line9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) #4 align 2

declare void @_ZN5R3BoxC1Edddddd(ptr noundef nonnull align 8 dereferenceable(56), double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) unnamed_addr #3

declare void @_ZNK13R3CoordSystem6MatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(96)) #3

declare void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nounwind
declare void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

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 = { inlinehint 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 = { "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 "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 #6 = { 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}


; 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.R3Line = type { %class.R3Point, %class.R3Vector }
%class.R3Point = type { [3 x double] }
%class.R3Vector = type { [3 x double] }
%class.R3Affine = type { %class.R3Transformation, %class.R4Matrix, %class.R4Matrix, %class.RNFlags }
%class.R3Transformation = type { ptr }
%class.R4Matrix = type { [4 x [4 x double]] }
%class.RNFlags = type { i64 }
%class.R3Box = type { %class.R3Solid, %class.R3Point, %class.R3Point }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }

; 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 noundef i32 @_Z12R3IntersectsRK6R3LineRK5R3BoxP7R3Point(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z12R3IntersectsRK6R3LineRK13R3OrientedBoxP7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(128) %1, ptr noundef %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.R3Line, align 8
  %5 = alloca %class.R3Affine, align 8
  %6 = alloca %class.R4Matrix, align 8
  %7 = alloca %class.R3Box, align 8
  %8 = alloca %class.R3Affine, align 8
  %9 = alloca %class.R4Matrix, align 8
  %10 = tail call noundef i32 @_ZNK13R3OrientedBox7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(128) %1)
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %47

11:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  call void @_ZN6R3LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(48) %0)
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #6
  %12 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNK13R3OrientedBox11CoordSystemEv(ptr noundef nonnull align 8 dereferenceable(128) %1)
  call void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind nonnull writable sret(%class.R4Matrix) align 8 %6, ptr noundef nonnull align 8 dereferenceable(96) %12)
  call void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %5, ptr noundef nonnull align 8 dereferenceable(128) %6, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #6
  invoke void @_ZN6R3Line9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %13 unwind label %27

13:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #6
  %14 = call noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %15 = fneg double %14
  %16 = call noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %17 = fneg double %16
  %18 = call noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  %19 = fneg double %18
  %20 = call noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 0)
  %21 = call noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 1)
  %22 = call noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128) %1, i32 noundef 2)
  invoke void @_ZN5R3BoxC1Edddddd(ptr noundef nonnull align 8 dereferenceable(56) %7, double noundef %15, double noundef %17, double noundef %19, double noundef %20, double noundef %21, double noundef %22)
          to label %23 unwind label %29

23:                                               ; preds = %13
  %24 = invoke noundef i32 @_Z12R3IntersectsRK6R3LineRK5R3BoxP7R3Point(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(56) %7, ptr noundef %2)
          to label %25 unwind label %31

25:                                               ; preds = %23
  %26 = icmp eq i32 %24, 0
  %.not25 = icmp eq ptr %2, null
  %or.cond = or i1 %.not25, %26
  br i1 %or.cond, label %43, label %33

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

29:                                               ; preds = %13
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %45

31:                                               ; preds = %23
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %44

33:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %9) #6
  %34 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNK13R3OrientedBox11CoordSystemEv(ptr noundef nonnull align 8 dereferenceable(128) %1)
  invoke void @_ZNK13R3CoordSystem6MatrixEv(ptr dead_on_unwind nonnull writable sret(%class.R4Matrix) align 8 %9, ptr noundef nonnull align 8 dereferenceable(96) %34)
          to label %35 unwind label %38

35:                                               ; preds = %33
  invoke void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272) %8, ptr noundef nonnull align 8 dereferenceable(128) %9, i32 noundef 0)
          to label %36 unwind label %38

36:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #6
  invoke void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %37 unwind label %40

37:                                               ; preds = %36
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %8) #6
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %8) #6
  br label %43

38:                                               ; preds = %35, %33
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #6
  br label %42

40:                                               ; preds = %36
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %8) #6
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %8) #6
  br label %44

43:                                               ; preds = %37, %25
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %5) #6
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  br label %47

44:                                               ; preds = %42, %31
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %32, %31 ]
  call void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  br label %45

45:                                               ; preds = %44, %29
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %44 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  br label %46

46:                                               ; preds = %45, %27
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %45 ], [ %28, %27 ]
  call void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272) %5) #6
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn

47:                                               ; preds = %3, %43
  %.1 = phi i32 [ %24, %43 ], [ 0, %3 ]
  ret i32 %.1
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK13R3OrientedBox7IsEmptyEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

declare void @_ZN6R3LineC1ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

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

declare void @_ZNK13R3CoordSystem13InverseMatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

declare void @_ZN8R3AffineC1ERK8R4Matrixi(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) unnamed_addr #3

declare void @_ZN6R3Line9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK13R3OrientedBox6RadiusEi(ptr noundef nonnull align 8 dereferenceable(128), i32 noundef) local_unnamed_addr #4 align 2

declare void @_ZN5R3BoxC1Edddddd(ptr noundef nonnull align 8 dereferenceable(56), double noundef, double noundef, double noundef, double noundef, double noundef, double noundef) unnamed_addr #3

declare void @_ZNK13R3CoordSystem6MatrixEv(ptr dead_on_unwind writable sret(%class.R4Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3

declare void @_ZN7R3Point9TransformERK16R3Transformation(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN8R3AffineD1Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN7R3SolidD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5

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 = { inlinehint 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 = { "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 "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 #6 = { 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: CorrelatedValuePropagationPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass