; LLVM IR from doyubkim/fluid-engine-dev :: src/jet/cylinder3.ll (ZNK3jet9Cylinder324closestIntersectionLocalERKNS_3RayIdLm3EEE)

; 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.jet::Vector" = type { double, double, double }
%"struct.jet::SurfaceRayIntersection3" = type { i8, double, %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::BoundingBox.1" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Plane3" = type { %"class.jet::Surface3.base", %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Surface3.base" = type <{ ptr, %"class.jet::Transform3", i8 }>
%"class.jet::Transform3" = type { %"class.jet::Vector", %"class.jet::Quaternion", %"class.jet::Matrix", %"class.jet::Matrix" }
%"class.jet::Quaternion" = type { double, double, double, double }
%"class.jet::Matrix" = type { %"struct.std::array" }
%"struct.std::array" = type { [9 x double] }
%"class.jet::Vector.0" = type { double, double }
%"class.jet::Ray" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Cylinder3" = type { %"class.jet::Surface3.base", %"class.jet::Vector", double, double }

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

; 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 @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3jet6squareIdEET_S1_(double noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6 align 2

declare void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) unnamed_addr #7

declare void @_ZNK3jet8Surface319closestIntersectionERKNS_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.jet::SurfaceRayIntersection3") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(48)) #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet3RayIdLm3EE7pointAtEd(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(48), double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3jet9Cylinder324closestIntersectionLocalERKNS_3RayIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.jet::SurfaceRayIntersection3") align 8 %0, ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull align 8 dereferenceable(48) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.jet::Vector", align 8
  %8 = alloca %"class.jet::Vector", align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.jet::BoundingBox.1", align 8
  %13 = alloca %"class.jet::Plane3", align 8
  %14 = alloca %"class.jet::Vector", align 8
  %15 = alloca %"class.jet::Transform3", align 8
  %16 = alloca %"class.jet::Plane3", align 8
  %17 = alloca %"class.jet::Vector", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.jet::Transform3", align 8
  %21 = alloca %"struct.jet::SurfaceRayIntersection3", align 8
  %22 = alloca %"struct.jet::SurfaceRayIntersection3", align 8
  %23 = alloca %"class.jet::Vector", align 8
  %24 = alloca %"class.jet::Vector.0", align 8
  %25 = alloca i32, align 4
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca %"class.jet::Vector", align 8
  %30 = alloca %"class.jet::Vector", align 8
  %31 = alloca %"class.jet::Vector", align 8
  %32 = alloca %"class.jet::Vector", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8
  call void @_ZN3jet23SurfaceRayIntersection3C2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #8
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.jet::Ray", ptr %34, i32 0, i32 1
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %35)
  %36 = getelementptr inbounds %"class.jet::Vector", ptr %7, i32 0, i32 1
  store double 0.000000e+00, ptr %36, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #8
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.jet::Ray", ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 1
  call void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 8 dereferenceable(24) %39)
  %40 = getelementptr inbounds %"class.jet::Vector", ptr %8, i32 0, i32 1
  store double 0.000000e+00, ptr %40, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %41 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %7)
  store double %41, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %42 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
  store double %42, ptr %10, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %43 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %44 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 2
  %45 = load double, ptr %44, align 8, !tbaa !13
  %46 = call noundef double @_ZN3jet6squareIdEET_S1_(double noundef %45)
  %47 = fsub double %43, %46
  store double %47, ptr %11, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #8
  call void @_ZNK3jet9Cylinder316boundingBoxLocalEv(ptr dead_on_unwind writable sret(%"class.jet::BoundingBox.1") align 8 %12, ptr noundef nonnull align 8 dereferenceable(256) %33)
  call void @llvm.lifetime.start.p0(i64 264, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef 0.000000e+00, double noundef 1.000000e+00, double noundef 0.000000e+00)
  %48 = getelementptr inbounds %"class.jet::BoundingBox.1", ptr %12, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 200, ptr %15) #8
  call void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %15)
  call void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %48, ptr noundef nonnull align 8 dereferenceable(200) %15, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 200, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 264, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %17, double noundef 0.000000e+00, double noundef -1.000000e+00, double noundef 0.000000e+00)
          to label %49 unwind label %94

49:                                               ; preds = %3
  %50 = getelementptr inbounds %"class.jet::BoundingBox.1", ptr %12, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 200, ptr %20) #8
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %20)
          to label %51 unwind label %98

51:                                               ; preds = %49
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %16, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(200) %20, i1 noundef zeroext false)
          to label %52 unwind label %98

52:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 200, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #8
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK3jet8Surface319closestIntersectionERKNS_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.jet::SurfaceRayIntersection3") align 8 %21, ptr noundef nonnull align 8 dereferenceable(209) %13, ptr noundef nonnull align 8 dereferenceable(48) %53)
          to label %54 unwind label %103

54:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #8
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK3jet8Surface319closestIntersectionERKNS_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.jet::SurfaceRayIntersection3") align 8 %22, ptr noundef nonnull align 8 dereferenceable(209) %16, ptr noundef nonnull align 8 dereferenceable(48) %55)
          to label %56 unwind label %107

56:                                               ; preds = %54
  %57 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 1
  store double 0x7FEFFFFFFFFFFFFF, ptr %57, align 8, !tbaa !21
  %58 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 0
  store i8 0, ptr %58, align 8, !tbaa !23
  %59 = load double, ptr %9, align 8, !tbaa !12
  %60 = fcmp olt double %59, 0x3CB0000000000000
  br i1 %60, label %70, label %61

61:                                               ; preds = %56
  %62 = load double, ptr %10, align 8, !tbaa !12
  %63 = load double, ptr %10, align 8, !tbaa !12
  %64 = load double, ptr %9, align 8, !tbaa !12
  %65 = load double, ptr %11, align 8, !tbaa !12
  %66 = fmul double %64, %65
  %67 = fneg double %66
  %68 = call double @llvm.fmuladd.f64(double %62, double %63, double %67)
  %69 = fcmp olt double %68, 0.000000e+00
  br i1 %69, label %70, label %135

70:                                               ; preds = %61, %56
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #8
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %"class.jet::Ray", ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 1
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %23, ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(24) %73)
          to label %74 unwind label %111

74:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  %75 = getelementptr inbounds %"class.jet::Vector", ptr %23, i32 0, i32 0
  %76 = load double, ptr %75, align 8, !tbaa !24
  %77 = getelementptr inbounds %"class.jet::Vector", ptr %23, i32 0, i32 2
  %78 = load double, ptr %77, align 8, !tbaa !25
  invoke void @_ZN3jet6VectorIdLm2EEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %24, double noundef %76, double noundef %78)
          to label %79 unwind label %115

79:                                               ; preds = %74
  %80 = invoke noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %81 unwind label %115

81:                                               ; preds = %79
  %82 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 2
  %83 = load double, ptr %82, align 8, !tbaa !13
  %84 = invoke noundef double @_ZN3jet6squareIdEET_S1_(double noundef %83)
          to label %85 unwind label %115

85:                                               ; preds = %81
  %86 = fcmp ole double %80, %84
  br i1 %86, label %87, label %133

87:                                               ; preds = %85
  %88 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %21, i32 0, i32 0
  %89 = load i8, ptr %88, align 8, !tbaa !23, !range !26, !noundef !27
  %90 = trunc i8 %89 to i1
  br i1 %90, label %91, label %119

91:                                               ; preds = %87
  %92 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %21)
          to label %93 unwind label %115

93:                                               ; preds = %91
  br label %119

94:                                               ; preds = %3
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %18, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %19, align 4
  br label %102

98:                                               ; preds = %51, %49
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %18, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 200, ptr %20) #8
  br label %102

102:                                              ; preds = %98, %94
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #8
  br label %285

103:                                              ; preds = %52
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %18, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %19, align 4
  br label %284

107:                                              ; preds = %54
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %18, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %19, align 4
  br label %283

111:                                              ; preds = %70
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %18, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %19, align 4
  br label %134

115:                                              ; preds = %129, %91, %81, %79, %74
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %18, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br label %134

119:                                              ; preds = %93, %87
  %120 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %22, i32 0, i32 0
  %121 = load i8, ptr %120, align 8, !tbaa !23, !range !26, !noundef !27
  %122 = trunc i8 %121 to i1
  br i1 %122, label %123, label %132

123:                                              ; preds = %119
  %124 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %22, i32 0, i32 1
  %125 = load double, ptr %124, align 8, !tbaa !21
  %126 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 1
  %127 = load double, ptr %126, align 8, !tbaa !21
  %128 = fcmp olt double %125, %127
  br i1 %128, label %129, label %132

129:                                              ; preds = %123
  %130 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %22)
          to label %131 unwind label %115

131:                                              ; preds = %129
  br label %132

132:                                              ; preds = %131, %123, %119
  br label %133

133:                                              ; preds = %132, %85
  store i32 1, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  br label %282

134:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #8
  br label %283

135:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  %136 = load double, ptr %10, align 8, !tbaa !12
  %137 = fneg double %136
  %138 = load double, ptr %10, align 8, !tbaa !12
  %139 = load double, ptr %10, align 8, !tbaa !12
  %140 = load double, ptr %9, align 8, !tbaa !12
  %141 = load double, ptr %11, align 8, !tbaa !12
  %142 = fmul double %140, %141
  %143 = fneg double %142
  %144 = call double @llvm.fmuladd.f64(double %138, double %139, double %143)
  %145 = call double @sqrt(double noundef %144) #8
  %146 = fadd double %137, %145
  %147 = load double, ptr %9, align 8, !tbaa !12
  %148 = fdiv double %146, %147
  store double %148, ptr %26, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %149 = load double, ptr %10, align 8, !tbaa !12
  %150 = fneg double %149
  %151 = load double, ptr %10, align 8, !tbaa !12
  %152 = load double, ptr %10, align 8, !tbaa !12
  %153 = load double, ptr %9, align 8, !tbaa !12
  %154 = load double, ptr %11, align 8, !tbaa !12
  %155 = fmul double %153, %154
  %156 = fneg double %155
  %157 = call double @llvm.fmuladd.f64(double %151, double %152, double %156)
  %158 = call double @sqrt(double noundef %157) #8
  %159 = fsub double %150, %158
  %160 = load double, ptr %9, align 8, !tbaa !12
  %161 = fdiv double %159, %160
  store double %161, ptr %27, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %162 = load double, ptr %27, align 8, !tbaa !12
  store double %162, ptr %28, align 8, !tbaa !12
  %163 = load double, ptr %27, align 8, !tbaa !12
  %164 = fcmp olt double %163, 0.000000e+00
  br i1 %164, label %165, label %167

165:                                              ; preds = %135
  %166 = load double, ptr %26, align 8, !tbaa !12
  store double %166, ptr %28, align 8, !tbaa !12
  br label %167

167:                                              ; preds = %165, %135
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #8
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = load double, ptr %28, align 8, !tbaa !12
  invoke void @_ZNK3jet3RayIdLm3EE7pointAtEd(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %29, ptr noundef nonnull align 8 dereferenceable(48) %168, double noundef %169)
          to label %170 unwind label %206

170:                                              ; preds = %167
  %171 = getelementptr inbounds %"class.jet::Vector", ptr %29, i32 0, i32 1
  %172 = load double, ptr %171, align 8, !tbaa !9
  %173 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 1
  %174 = getelementptr inbounds %"class.jet::Vector", ptr %173, i32 0, i32 1
  %175 = load double, ptr %174, align 8, !tbaa !28
  %176 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 3
  %177 = load double, ptr %176, align 8, !tbaa !29
  %178 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %177, double %175)
  %179 = fcmp oge double %172, %178
  br i1 %179, label %180, label %214

180:                                              ; preds = %170
  %181 = getelementptr inbounds %"class.jet::Vector", ptr %29, i32 0, i32 1
  %182 = load double, ptr %181, align 8, !tbaa !9
  %183 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 1
  %184 = getelementptr inbounds %"class.jet::Vector", ptr %183, i32 0, i32 1
  %185 = load double, ptr %184, align 8, !tbaa !28
  %186 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 3
  %187 = load double, ptr %186, align 8, !tbaa !29
  %188 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %187, double %185)
  %189 = fcmp ole double %182, %188
  br i1 %189, label %190, label %214

190:                                              ; preds = %180
  %191 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 0
  store i8 1, ptr %191, align 8, !tbaa !23
  %192 = load double, ptr %28, align 8, !tbaa !12
  %193 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 1
  store double %192, ptr %193, align 8, !tbaa !21
  %194 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 2
  %195 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %194, ptr noundef nonnull align 8 dereferenceable(24) %29)
          to label %196 unwind label %206

196:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #8
  %197 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 1
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %30, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %197)
          to label %198 unwind label %210

198:                                              ; preds = %196
  %199 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 3
  %200 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %199, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %201 unwind label %210

201:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  %202 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 3
  %203 = getelementptr inbounds %"class.jet::Vector", ptr %202, i32 0, i32 1
  store double 0.000000e+00, ptr %203, align 8, !tbaa !30
  %204 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 3
  invoke void @_ZN3jet6VectorIdLm3EE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %204)
          to label %205 unwind label %206

205:                                              ; preds = %201
  br label %214

206:                                              ; preds = %201, %190, %167
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %18, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %19, align 4
  br label %281

210:                                              ; preds = %198, %196
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %18, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #8
  br label %281

214:                                              ; preds = %205, %180, %170
  %215 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %21, i32 0, i32 0
  %216 = load i8, ptr %215, align 8, !tbaa !23, !range !26, !noundef !27
  %217 = trunc i8 %216 to i1
  br i1 %217, label %218, label %247

218:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #8
  %219 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %21, i32 0, i32 2
  %220 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 1
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %31, ptr noundef nonnull align 8 dereferenceable(24) %219, ptr noundef nonnull align 8 dereferenceable(24) %220)
          to label %221 unwind label %232

221:                                              ; preds = %218
  %222 = getelementptr inbounds %"class.jet::Vector", ptr %31, i32 0, i32 1
  store double 0.000000e+00, ptr %222, align 8, !tbaa !9
  %223 = invoke noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %224 unwind label %232

224:                                              ; preds = %221
  %225 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 2
  %226 = load double, ptr %225, align 8, !tbaa !13
  %227 = invoke noundef double @_ZN3jet6squareIdEET_S1_(double noundef %226)
          to label %228 unwind label %232

228:                                              ; preds = %224
  %229 = fcmp ogt double %223, %227
  br i1 %229, label %230, label %236

230:                                              ; preds = %228
  %231 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %21, i32 0, i32 0
  store i8 0, ptr %231, align 8, !tbaa !23
  br label %246

232:                                              ; preds = %242, %224, %221, %218
  %233 = landingpad { ptr, i32 }
          cleanup
  %234 = extractvalue { ptr, i32 } %233, 0
  store ptr %234, ptr %18, align 8
  %235 = extractvalue { ptr, i32 } %233, 1
  store i32 %235, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  br label %281

236:                                              ; preds = %228
  %237 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %21, i32 0, i32 1
  %238 = load double, ptr %237, align 8, !tbaa !21
  %239 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 1
  %240 = load double, ptr %239, align 8, !tbaa !21
  %241 = fcmp olt double %238, %240
  br i1 %241, label %242, label %245

242:                                              ; preds = %236
  %243 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %21)
          to label %244 unwind label %232

244:                                              ; preds = %242
  br label %245

245:                                              ; preds = %244, %236
  br label %246

246:                                              ; preds = %245, %230
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  br label %247

247:                                              ; preds = %246, %214
  %248 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %22, i32 0, i32 0
  %249 = load i8, ptr %248, align 8, !tbaa !23, !range !26, !noundef !27
  %250 = trunc i8 %249 to i1
  br i1 %250, label %251, label %280

251:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #8
  %252 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %22, i32 0, i32 2
  %253 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 1
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %32, ptr noundef nonnull align 8 dereferenceable(24) %252, ptr noundef nonnull align 8 dereferenceable(24) %253)
          to label %254 unwind label %265

254:                                              ; preds = %251
  %255 = getelementptr inbounds %"class.jet::Vector", ptr %32, i32 0, i32 1
  store double 0.000000e+00, ptr %255, align 8, !tbaa !9
  %256 = invoke noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %32)
          to label %257 unwind label %265

257:                                              ; preds = %254
  %258 = getelementptr inbounds %"class.jet::Cylinder3", ptr %33, i32 0, i32 2
  %259 = load double, ptr %258, align 8, !tbaa !13
  %260 = invoke noundef double @_ZN3jet6squareIdEET_S1_(double noundef %259)
          to label %261 unwind label %265

261:                                              ; preds = %257
  %262 = fcmp ogt double %256, %260
  br i1 %262, label %263, label %269

263:                                              ; preds = %261
  %264 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %22, i32 0, i32 0
  store i8 0, ptr %264, align 8, !tbaa !23
  br label %279

265:                                              ; preds = %275, %257, %254, %251
  %266 = landingpad { ptr, i32 }
          cleanup
  %267 = extractvalue { ptr, i32 } %266, 0
  store ptr %267, ptr %18, align 8
  %268 = extractvalue { ptr, i32 } %266, 1
  store i32 %268, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  br label %281

269:                                              ; preds = %261
  %270 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %22, i32 0, i32 1
  %271 = load double, ptr %270, align 8, !tbaa !21
  %272 = getelementptr inbounds %"struct.jet::SurfaceRayIntersection3", ptr %0, i32 0, i32 1
  %273 = load double, ptr %272, align 8, !tbaa !21
  %274 = fcmp olt double %271, %273
  br i1 %274, label %275, label %278

275:                                              ; preds = %269
  %276 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %22)
          to label %277 unwind label %265

277:                                              ; preds = %275
  br label %278

278:                                              ; preds = %277, %269
  br label %279

279:                                              ; preds = %278, %263
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #8
  br label %280

280:                                              ; preds = %279, %247
  store i32 1, ptr %25, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %282

281:                                              ; preds = %265, %232, %210, %206
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  br label %283

282:                                              ; preds = %280, %133
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #8
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %16) #8
  call void @llvm.lifetime.end.p0(i64 264, ptr %16) #8
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %13) #8
  call void @llvm.lifetime.end.p0(i64 264, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  ret void

283:                                              ; preds = %281, %134, %107
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #8
  br label %284

284:                                              ; preds = %283, %103
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #8
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %16) #8
  br label %285

285:                                              ; preds = %284, %102
  call void @llvm.lifetime.end.p0(i64 264, ptr %16) #8
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %13) #8
  call void @llvm.lifetime.end.p0(i64 264, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  br label %286

286:                                              ; preds = %285
  %287 = load ptr, ptr %18, align 8
  %288 = load i32, ptr %19, align 4
  %289 = insertvalue { ptr, i32 } poison, ptr %287, 0
  %290 = insertvalue { ptr, i32 } %289, i32 %288, 1
  resume { ptr, i32 } %290
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet23SurfaceRayIntersection3C2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet9Cylinder316boundingBoxLocalEv(ptr dead_on_unwind noalias writable sret(%"class.jet::BoundingBox.1") align 8, ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) #6 align 2

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

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

; Function Attrs: nounwind
declare void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 #7 = { "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 #8 = { 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, !11, i64 8}
!10 = !{!"_ZTSN3jet6VectorIdLm3EEE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"double", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 240}
!14 = !{!"_ZTSN3jet9Cylinder3E", !15, i64 0, !10, i64 216, !11, i64 240, !11, i64 248}
!15 = !{!"_ZTSN3jet8Surface3E", !16, i64 8, !20, i64 208}
!16 = !{!"_ZTSN3jet10Transform3E", !10, i64 0, !17, i64 24, !18, i64 56, !18, i64 128}
!17 = !{!"_ZTSN3jet10QuaternionIdEE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!18 = !{!"_ZTSN3jet6MatrixIdLm3ELm3EEE", !19, i64 0}
!19 = !{!"_ZTSSt5arrayIdLm9EE", !7, i64 0}
!20 = !{!"bool", !7, i64 0}
!21 = !{!22, !11, i64 8}
!22 = !{!"_ZTSN3jet23SurfaceRayIntersection3E", !20, i64 0, !11, i64 8, !10, i64 16, !10, i64 40}
!23 = !{!22, !20, i64 0}
!24 = !{!10, !11, i64 0}
!25 = !{!10, !11, i64 16}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!14, !11, i64 224}
!29 = !{!14, !11, i64 248}
!30 = !{!22, !11, i64 48}


; 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.jet::Vector" = type { double, double, double }
%"struct.jet::SurfaceRayIntersection3" = type { i8, double, %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::BoundingBox.1" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Plane3" = type { %"class.jet::Surface3.base", %"class.jet::Vector", %"class.jet::Vector" }
%"class.jet::Surface3.base" = type <{ ptr, %"class.jet::Transform3", i8 }>
%"class.jet::Transform3" = type { %"class.jet::Vector", %"class.jet::Quaternion", %"class.jet::Matrix", %"class.jet::Matrix" }
%"class.jet::Quaternion" = type { double, double, double, double }
%"class.jet::Matrix" = type { %"struct.std::array" }
%"struct.std::array" = type { [9 x double] }
%"class.jet::Vector.0" = type { double, double }

declare i32 @__gxx_personality_v0(...)

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

; 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 uwtable
declare dso_local void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

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

; 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 @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, double noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZN3jet6squareIdEET_S1_(double noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #6 align 2

declare void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(200), i1 noundef zeroext) unnamed_addr #7

declare void @_ZNK3jet8Surface319closestIntersectionERKNS_3RayIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.jet::SurfaceRayIntersection3") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #7

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet3RayIdLm3EE7pointAtEd(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(48), double noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3jet9Cylinder324closestIntersectionLocalERKNS_3RayIdLm3EEE(ptr dead_on_unwind noalias nonnull writable sret(%"struct.jet::SurfaceRayIntersection3") align 8 %0, ptr noundef nonnull align 8 dereferenceable(256) %1, ptr noundef nonnull align 8 dereferenceable(48) %2) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.jet::Vector", align 8
  %5 = alloca %"class.jet::Vector", align 8
  %6 = alloca %"class.jet::BoundingBox.1", align 8
  %7 = alloca %"class.jet::Plane3", align 8
  %8 = alloca %"class.jet::Vector", align 8
  %9 = alloca %"class.jet::Transform3", align 8
  %10 = alloca %"class.jet::Plane3", align 8
  %11 = alloca %"class.jet::Vector", align 8
  %12 = alloca %"class.jet::Transform3", align 8
  %13 = alloca %"struct.jet::SurfaceRayIntersection3", align 8
  %14 = alloca %"struct.jet::SurfaceRayIntersection3", align 8
  %15 = alloca %"class.jet::Vector", align 8
  %16 = alloca %"class.jet::Vector.0", align 8
  %17 = alloca %"class.jet::Vector", align 8
  %18 = alloca %"class.jet::Vector", align 8
  %19 = alloca %"class.jet::Vector", align 8
  %20 = alloca %"class.jet::Vector", align 8
  tail call void @_ZN3jet23SurfaceRayIntersection3C2Ev(ptr noundef nonnull align 8 dereferenceable(64) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  %21 = getelementptr inbounds i8, ptr %2, i64 24
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %21)
  %22 = getelementptr inbounds i8, ptr %4, i64 8
  store double 0.000000e+00, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #9
  %23 = getelementptr inbounds i8, ptr %1, i64 216
  call void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %23)
  %24 = getelementptr inbounds i8, ptr %5, i64 8
  store double 0.000000e+00, ptr %24, align 8, !tbaa !5
  %25 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %26 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
  %27 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %28 = getelementptr inbounds i8, ptr %1, i64 240
  %29 = load double, ptr %28, align 8, !tbaa !10
  %30 = call noundef double @_ZN3jet6squareIdEET_S1_(double noundef %29)
  %31 = fsub double %27, %30
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #9
  call void @_ZNK3jet9Cylinder316boundingBoxLocalEv(ptr dead_on_unwind nonnull writable sret(%"class.jet::BoundingBox.1") align 8 %6, ptr noundef nonnull align 8 dereferenceable(256) %1)
  call void @llvm.lifetime.start.p0(i64 264, ptr nonnull %7) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #9
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %8, double noundef 0.000000e+00, double noundef 1.000000e+00, double noundef 0.000000e+00)
  %32 = getelementptr inbounds i8, ptr %6, i64 24
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %9) #9
  call void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %9)
  call void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(200) %9, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #9
  call void @llvm.lifetime.start.p0(i64 264, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #9
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %11, double noundef 0.000000e+00, double noundef -1.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %12) #9
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %12)
          to label %33 unwind label %58

33:                                               ; preds = %3
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(200) %12, i1 noundef zeroext false)
          to label %34 unwind label %58

34:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #9
  invoke void @_ZNK3jet8Surface319closestIntersectionERKNS_3RayIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.jet::SurfaceRayIntersection3") align 8 %13, ptr noundef nonnull align 8 dereferenceable(209) %7, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %35 unwind label %60

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #9
  invoke void @_ZNK3jet8Surface319closestIntersectionERKNS_3RayIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.jet::SurfaceRayIntersection3") align 8 %14, ptr noundef nonnull align 8 dereferenceable(209) %10, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %36 unwind label %62

36:                                               ; preds = %35
  %37 = getelementptr inbounds i8, ptr %0, i64 8
  store double 0x7FEFFFFFFFFFFFFF, ptr %37, align 8, !tbaa !18
  store i8 0, ptr %0, align 8, !tbaa !20
  %38 = fcmp olt double %25, 0x3CB0000000000000
  br i1 %38, label %44, label %39

39:                                               ; preds = %36
  %40 = fneg double %25
  %41 = fmul double %31, %40
  %42 = call double @llvm.fmuladd.f64(double %26, double %26, double %41)
  %43 = fcmp olt double %42, 0.000000e+00
  br i1 %43, label %44, label %80

44:                                               ; preds = %39, %36
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #9
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %45 unwind label %64

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #9
  %46 = load double, ptr %15, align 8, !tbaa !21
  %47 = getelementptr inbounds i8, ptr %15, i64 16
  %48 = load double, ptr %47, align 8, !tbaa !22
  call void @_ZN3jet6VectorIdLm2EEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %16, double noundef %46, double noundef %48)
  %49 = call noundef double @_ZNK3jet6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %16)
  %50 = load double, ptr %28, align 8, !tbaa !10
  %51 = call noundef double @_ZN3jet6squareIdEET_S1_(double noundef %50)
  %52 = fcmp ugt double %49, %51
  br i1 %52, label %78, label %53

53:                                               ; preds = %45
  %54 = load i8, ptr %13, align 8, !tbaa !20, !range !23, !noundef !24
  %55 = trunc nuw i8 %54 to i1
  br i1 %55, label %56, label %68

56:                                               ; preds = %53
  %57 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %13)
          to label %68 unwind label %66

58:                                               ; preds = %33, %3
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #9
  br label %161

60:                                               ; preds = %34
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %160

62:                                               ; preds = %35
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %159

64:                                               ; preds = %44
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %79

66:                                               ; preds = %76, %56
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #9
  br label %79

68:                                               ; preds = %56, %53
  %69 = load i8, ptr %14, align 8, !tbaa !20, !range !23, !noundef !24
  %70 = trunc nuw i8 %69 to i1
  br i1 %70, label %71, label %78

71:                                               ; preds = %68
  %72 = getelementptr inbounds i8, ptr %14, i64 8
  %73 = load double, ptr %72, align 8, !tbaa !18
  %74 = load double, ptr %37, align 8, !tbaa !18
  %75 = fcmp olt double %73, %74
  br i1 %75, label %76, label %78

76:                                               ; preds = %71
  %77 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %14)
          to label %78 unwind label %66

78:                                               ; preds = %68, %71, %76, %45
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #9
  br label %158

79:                                               ; preds = %66, %64
  %.pn41 = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #9
  br label %159

80:                                               ; preds = %39
  %81 = fneg double %26
  %82 = call double @sqrt(double noundef %42) #9
  %83 = call double @sqrt(double noundef %42) #9
  %84 = fsub double %81, %83
  %85 = fdiv double %84, %25
  %86 = fcmp olt double %85, 0.000000e+00
  %87 = fsub double %82, %26
  %88 = fdiv double %87, %25
  %.0 = select i1 %86, double %88, double %85
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #9
  invoke void @_ZNK3jet3RayIdLm3EE7pointAtEd(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(48) %2, double noundef %.0)
          to label %89 unwind label %109

89:                                               ; preds = %80
  %90 = getelementptr inbounds i8, ptr %17, i64 8
  %91 = load double, ptr %90, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %1, i64 224
  %93 = load double, ptr %92, align 8, !tbaa !25
  %94 = getelementptr inbounds i8, ptr %1, i64 248
  %95 = load double, ptr %94, align 8, !tbaa !26
  %96 = call double @llvm.fmuladd.f64(double %95, double -5.000000e-01, double %93)
  %97 = fcmp ult double %91, %96
  %98 = call double @llvm.fmuladd.f64(double %95, double 5.000000e-01, double %93)
  %99 = fcmp ugt double %91, %98
  %or.cond = select i1 %97, i1 true, i1 %99
  br i1 %or.cond, label %113, label %100

100:                                              ; preds = %89
  store i8 1, ptr %0, align 8, !tbaa !20
  store double %.0, ptr %37, align 8, !tbaa !18
  %101 = getelementptr inbounds i8, ptr %0, i64 16
  %102 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %101, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %103 unwind label %109

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #9
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %104 unwind label %111

104:                                              ; preds = %103
  %105 = getelementptr inbounds i8, ptr %0, i64 40
  %106 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %105, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %107 unwind label %111

107:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #9
  %108 = getelementptr inbounds i8, ptr %0, i64 48
  store double 0.000000e+00, ptr %108, align 8, !tbaa !27
  call void @_ZN3jet6VectorIdLm3EE9normalizeEv(ptr noundef nonnull align 8 dereferenceable(24) %105)
  br label %113

109:                                              ; preds = %100, %80
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %157

111:                                              ; preds = %104, %103
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #9
  br label %157

113:                                              ; preds = %107, %89
  %114 = load i8, ptr %13, align 8, !tbaa !20, !range !23, !noundef !24
  %115 = trunc nuw i8 %114 to i1
  br i1 %115, label %116, label %135

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #9
  %117 = getelementptr inbounds i8, ptr %13, i64 16
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %117, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %118 unwind label %125

118:                                              ; preds = %116
  %119 = getelementptr inbounds i8, ptr %19, i64 8
  store double 0.000000e+00, ptr %119, align 8, !tbaa !5
  %120 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %121 = load double, ptr %28, align 8, !tbaa !10
  %122 = call noundef double @_ZN3jet6squareIdEET_S1_(double noundef %121)
  %123 = fcmp ogt double %120, %122
  br i1 %123, label %124, label %127

124:                                              ; preds = %118
  store i8 0, ptr %13, align 8, !tbaa !20
  br label %134

125:                                              ; preds = %132, %116
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #9
  br label %157

127:                                              ; preds = %118
  %128 = getelementptr inbounds i8, ptr %13, i64 8
  %129 = load double, ptr %128, align 8, !tbaa !18
  %130 = load double, ptr %37, align 8, !tbaa !18
  %131 = fcmp olt double %129, %130
  br i1 %131, label %132, label %134

132:                                              ; preds = %127
  %133 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %13)
          to label %134 unwind label %125

134:                                              ; preds = %127, %132, %124
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #9
  br label %135

135:                                              ; preds = %134, %113
  %136 = load i8, ptr %14, align 8, !tbaa !20, !range !23, !noundef !24
  %137 = trunc nuw i8 %136 to i1
  br i1 %137, label %138, label %156

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #9
  %139 = getelementptr inbounds i8, ptr %14, i64 16
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %139, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %140 unwind label %146

140:                                              ; preds = %138
  %141 = getelementptr inbounds i8, ptr %20, i64 8
  store double 0.000000e+00, ptr %141, align 8, !tbaa !5
  %142 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  %143 = load double, ptr %28, align 8, !tbaa !10
  %144 = call noundef double @_ZN3jet6squareIdEET_S1_(double noundef %143)
  %145 = fcmp ogt double %142, %144
  br i1 %145, label %155, label %148

146:                                              ; preds = %153, %138
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #9
  br label %157

148:                                              ; preds = %140
  %149 = getelementptr inbounds i8, ptr %14, i64 8
  %150 = load double, ptr %149, align 8, !tbaa !18
  %151 = load double, ptr %37, align 8, !tbaa !18
  %152 = fcmp olt double %150, %151
  br i1 %152, label %153, label %155

153:                                              ; preds = %148
  %154 = invoke noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64) %0, ptr noundef nonnull align 8 dereferenceable(64) %14)
          to label %155 unwind label %146

155:                                              ; preds = %140, %148, %153
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #9
  br label %156

156:                                              ; preds = %155, %135
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #9
  br label %158

157:                                              ; preds = %146, %125, %111, %109
  %.pn = phi { ptr, i32 } [ %147, %146 ], [ %126, %125 ], [ %112, %111 ], [ %110, %109 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #9
  br label %159

158:                                              ; preds = %156, %78
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #9
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %10) #9
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %10) #9
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %7) #9
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  ret void

159:                                              ; preds = %157, %79, %62
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %79 ], [ %.pn, %157 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #9
  br label %160

160:                                              ; preds = %159, %60
  %.pn41.pn.pn = phi { ptr, i32 } [ %.pn41.pn, %159 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #9
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %10) #9
  br label %161

161:                                              ; preds = %160, %58
  %.pn41.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn, %160 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %10) #9
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %7) #9
  call void @llvm.lifetime.end.p0(i64 264, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  resume { ptr, i32 } %.pn41.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet23SurfaceRayIntersection3C2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3jet9Cylinder316boundingBoxLocalEv(ptr dead_on_unwind noalias writable sret(%"class.jet::BoundingBox.1") align 8, ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN3jet23SurfaceRayIntersection3aSERKS0_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #6 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nofree nounwind willreturn memory(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 #7 = { "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 #8 = { 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 #9 = { 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, !7, i64 8}
!6 = !{!"_ZTSN3jet6VectorIdLm3EEE", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 240}
!11 = !{!"_ZTSN3jet9Cylinder3E", !12, i64 0, !6, i64 216, !7, i64 240, !7, i64 248}
!12 = !{!"_ZTSN3jet8Surface3E", !13, i64 8, !17, i64 208}
!13 = !{!"_ZTSN3jet10Transform3E", !6, i64 0, !14, i64 24, !15, i64 56, !15, i64 128}
!14 = !{!"_ZTSN3jet10QuaternionIdEE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!15 = !{!"_ZTSN3jet6MatrixIdLm3ELm3EEE", !16, i64 0}
!16 = !{!"_ZTSSt5arrayIdLm9EE", !8, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{!19, !7, i64 8}
!19 = !{!"_ZTSN3jet23SurfaceRayIntersection3E", !17, i64 0, !7, i64 8, !6, i64 16, !6, i64 40}
!20 = !{!19, !17, i64 0}
!21 = !{!6, !7, i64 0}
!22 = !{!6, !7, i64 16}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!11, !7, i64 224}
!26 = !{!11, !7, i64 248}
!27 = !{!19, !7, i64 48}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass