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

; 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 }
%"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::Box3" = type { %"class.jet::Surface3.base", %"class.jet::BoundingBox" }
%"class.jet::BoundingBox" = type { %"class.jet::Vector", %"class.jet::Vector" }

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

declare i32 @__gxx_personality_v0(...)

; 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 #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3jet11BoundingBoxIdLm3EE8containsERKNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2 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 #3

declare void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(24)) #3

; 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)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet5clampIdEENS_6VectorIT_Lm3EEERKS3_S5_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), ptr noundef nonnull align 8 dereferenceable(24)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3jet4Box318closestNormalLocalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(264) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca [6 x %"class.jet::Plane3"], align 16
  %8 = alloca ptr, align 8
  %9 = alloca %"class.jet::Vector", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.jet::Transform3", align 8
  %13 = alloca %"class.jet::Vector", align 8
  %14 = alloca %"class.jet::Transform3", align 8
  %15 = alloca %"class.jet::Vector", align 8
  %16 = alloca %"class.jet::Transform3", align 8
  %17 = alloca %"class.jet::Vector", align 8
  %18 = alloca %"class.jet::Transform3", align 8
  %19 = alloca %"class.jet::Vector", align 8
  %20 = alloca %"class.jet::Transform3", align 8
  %21 = alloca %"class.jet::Vector", align 8
  %22 = alloca %"class.jet::Transform3", align 8
  %23 = alloca i1, align 1
  %24 = alloca %"class.jet::Vector", align 8
  %25 = alloca double, align 8
  %26 = alloca %"class.jet::Vector", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"class.jet::Vector", align 8
  %29 = alloca double, align 8
  %30 = alloca %"class.jet::Vector", align 8
  %31 = alloca i32, align 4
  %32 = alloca %"class.jet::Vector", align 8
  %33 = alloca %"class.jet::Vector", align 8
  %34 = alloca double, align 8
  %35 = alloca i32, align 4
  %36 = alloca double, 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
  %37 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 1584, ptr %7) #6
  store i1 true, ptr %23, align 1
  store ptr %7, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef 1.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %38 unwind label %92

38:                                               ; preds = %3
  %39 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %40 = getelementptr inbounds %"class.jet::BoundingBox", ptr %39, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 200, ptr %12) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %12)
          to label %41 unwind label %96

41:                                               ; preds = %38
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(200) %12, i1 noundef zeroext false)
          to label %42 unwind label %96

42:                                               ; preds = %41
  %43 = getelementptr inbounds %"class.jet::Plane3", ptr %7, i64 1
  store ptr %43, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef 0.000000e+00, double noundef 1.000000e+00, double noundef 0.000000e+00)
          to label %44 unwind label %100

44:                                               ; preds = %42
  %45 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %46 = getelementptr inbounds %"class.jet::BoundingBox", ptr %45, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 200, ptr %14) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %14)
          to label %47 unwind label %104

47:                                               ; preds = %44
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %43, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(200) %14, i1 noundef zeroext false)
          to label %48 unwind label %104

48:                                               ; preds = %47
  %49 = getelementptr inbounds %"class.jet::Plane3", ptr %7, i64 2
  store ptr %49, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %15, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 1.000000e+00)
          to label %50 unwind label %108

50:                                               ; preds = %48
  %51 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %52 = getelementptr inbounds %"class.jet::BoundingBox", ptr %51, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 200, ptr %16) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %16)
          to label %53 unwind label %112

53:                                               ; preds = %50
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %49, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(200) %16, i1 noundef zeroext false)
          to label %54 unwind label %112

54:                                               ; preds = %53
  %55 = getelementptr inbounds %"class.jet::Plane3", ptr %7, i64 3
  store ptr %55, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #6
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %17, double noundef -1.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %56 unwind label %116

56:                                               ; preds = %54
  %57 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %58 = getelementptr inbounds %"class.jet::BoundingBox", ptr %57, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 200, ptr %18) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %18)
          to label %59 unwind label %120

59:                                               ; preds = %56
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %55, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %58, ptr noundef nonnull align 8 dereferenceable(200) %18, i1 noundef zeroext false)
          to label %60 unwind label %120

60:                                               ; preds = %59
  %61 = getelementptr inbounds %"class.jet::Plane3", ptr %7, i64 4
  store ptr %61, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %19, double noundef 0.000000e+00, double noundef -1.000000e+00, double noundef 0.000000e+00)
          to label %62 unwind label %124

62:                                               ; preds = %60
  %63 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %64 = getelementptr inbounds %"class.jet::BoundingBox", ptr %63, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 200, ptr %20) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %20)
          to label %65 unwind label %128

65:                                               ; preds = %62
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %61, ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull align 8 dereferenceable(24) %64, ptr noundef nonnull align 8 dereferenceable(200) %20, i1 noundef zeroext false)
          to label %66 unwind label %128

66:                                               ; preds = %65
  %67 = getelementptr inbounds %"class.jet::Plane3", ptr %7, i64 5
  store ptr %67, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #6
  invoke void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %21, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef -1.000000e+00)
          to label %68 unwind label %132

68:                                               ; preds = %66
  %69 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %70 = getelementptr inbounds %"class.jet::BoundingBox", ptr %69, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 200, ptr %22) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %22)
          to label %71 unwind label %136

71:                                               ; preds = %68
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %67, ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %70, ptr noundef nonnull align 8 dereferenceable(200) %22, i1 noundef zeroext false)
          to label %72 unwind label %136

72:                                               ; preds = %71
  store i1 false, ptr %23, align 1
  call void @llvm.lifetime.end.p0(i64 200, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  %73 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = invoke noundef zeroext i1 @_ZNK3jet11BoundingBoxIdLm3EE8containsERKNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(48) %73, ptr noundef nonnull align 8 dereferenceable(24) %74)
          to label %76 unwind label %161

76:                                               ; preds = %72
  br i1 %75, label %77, label %215

77:                                               ; preds = %76
  %78 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i64 0, i64 0
  %79 = getelementptr inbounds %"class.jet::Plane3", ptr %78, i32 0, i32 1
  invoke void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %79)
          to label %80 unwind label %161

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #6
  %81 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i64 0, i64 0
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %24, ptr noundef nonnull align 8 dereferenceable(209) %81, ptr noundef nonnull align 8 dereferenceable(24) %82)
          to label %83 unwind label %165

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #6
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %26, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(24) %84)
          to label %85 unwind label %169

85:                                               ; preds = %83
  %86 = invoke noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %87 unwind label %169

87:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  store double %86, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 1, ptr %27, align 4, !tbaa !11
  br label %88

88:                                               ; preds = %207, %87
  %89 = load i32, ptr %27, align 4, !tbaa !11
  %90 = icmp slt i32 %89, 6
  br i1 %90, label %173, label %91

91:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %212

92:                                               ; preds = %3
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %10, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %11, align 4
  br label %150

96:                                               ; preds = %41, %38
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %10, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %11, align 4
  br label %149

100:                                              ; preds = %42
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %10, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %11, align 4
  br label %148

104:                                              ; preds = %47, %44
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %10, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %11, align 4
  br label %147

108:                                              ; preds = %48
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %10, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %11, align 4
  br label %146

112:                                              ; preds = %53, %50
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %10, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %11, align 4
  br label %145

116:                                              ; preds = %54
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %10, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %11, align 4
  br label %144

120:                                              ; preds = %59, %56
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %10, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %11, align 4
  br label %143

124:                                              ; preds = %60
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %10, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %11, align 4
  br label %142

128:                                              ; preds = %65, %62
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %10, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %11, align 4
  br label %141

132:                                              ; preds = %66
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %10, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %11, align 4
  br label %140

136:                                              ; preds = %71, %68
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %10, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 200, ptr %22) #6
  br label %140

140:                                              ; preds = %136, %132
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #6
  br label %141

141:                                              ; preds = %140, %128
  call void @llvm.lifetime.end.p0(i64 200, ptr %20) #6
  br label %142

142:                                              ; preds = %141, %124
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %143

143:                                              ; preds = %142, %120
  call void @llvm.lifetime.end.p0(i64 200, ptr %18) #6
  br label %144

144:                                              ; preds = %143, %116
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #6
  br label %145

145:                                              ; preds = %144, %112
  call void @llvm.lifetime.end.p0(i64 200, ptr %16) #6
  br label %146

146:                                              ; preds = %145, %108
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %147

147:                                              ; preds = %146, %104
  call void @llvm.lifetime.end.p0(i64 200, ptr %14) #6
  br label %148

148:                                              ; preds = %147, %100
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  br label %149

149:                                              ; preds = %148, %96
  call void @llvm.lifetime.end.p0(i64 200, ptr %12) #6
  br label %150

150:                                              ; preds = %149, %92
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  %151 = load i1, ptr %23, align 1
  br i1 %151, label %152, label %160

152:                                              ; preds = %150
  %153 = load ptr, ptr %8, align 8
  %154 = icmp eq ptr %7, %153
  br i1 %154, label %159, label %155

155:                                              ; preds = %155, %152
  %156 = phi ptr [ %153, %152 ], [ %157, %155 ]
  %157 = getelementptr inbounds %"class.jet::Plane3", ptr %156, i64 -1
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %157) #6
  %158 = icmp eq ptr %157, %7
  br i1 %158, label %159, label %155

159:                                              ; preds = %155, %152
  br label %160

160:                                              ; preds = %159, %150
  br label %291

161:                                              ; preds = %77, %72
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %10, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %11, align 4
  br label %283

165:                                              ; preds = %80
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %10, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %11, align 4
  br label %214

169:                                              ; preds = %85, %83
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %10, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #6
  br label %213

173:                                              ; preds = %88
  call void @llvm.lifetime.start.p0(i64 24, ptr %28) #6
  %174 = load i32, ptr %27, align 4, !tbaa !11
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i64 0, i64 %175
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %28, ptr noundef nonnull align 8 dereferenceable(209) %176, ptr noundef nonnull align 8 dereferenceable(24) %177)
          to label %178 unwind label %194

178:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #6
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  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) %28, ptr noundef nonnull align 8 dereferenceable(24) %179)
          to label %180 unwind label %198

180:                                              ; preds = %178
  %181 = invoke noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %182 unwind label %198

182:                                              ; preds = %180
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #6
  store double %181, ptr %29, align 8, !tbaa !9
  %183 = load double, ptr %29, align 8, !tbaa !9
  %184 = load double, ptr %25, align 8, !tbaa !9
  %185 = fcmp olt double %183, %184
  br i1 %185, label %186, label %206

186:                                              ; preds = %182
  %187 = load i32, ptr %27, align 4, !tbaa !11
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i64 0, i64 %188
  %190 = getelementptr inbounds %"class.jet::Plane3", ptr %189, i32 0, i32 1
  %191 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %190)
          to label %192 unwind label %202

192:                                              ; preds = %186
  %193 = load double, ptr %29, align 8, !tbaa !9
  store double %193, ptr %25, align 8, !tbaa !9
  br label %206

194:                                              ; preds = %173
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %10, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %11, align 4
  br label %211

198:                                              ; preds = %180, %178
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %10, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #6
  br label %210

202:                                              ; preds = %186
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %10, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %11, align 4
  br label %210

206:                                              ; preds = %192, %182
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #6
  br label %207

207:                                              ; preds = %206
  %208 = load i32, ptr %27, align 4, !tbaa !11
  %209 = add nsw i32 %208, 1
  store i32 %209, ptr %27, align 4, !tbaa !11
  br label %88, !llvm.loop !13

210:                                              ; preds = %202, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  br label %211

211:                                              ; preds = %210, %194
  call void @llvm.lifetime.end.p0(i64 24, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %213

212:                                              ; preds = %91
  store i32 1, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %275

213:                                              ; preds = %211, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %214

214:                                              ; preds = %213, %165
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #6
  br label %283

215:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #6
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %218 = getelementptr inbounds %"class.jet::BoundingBox", ptr %217, i32 0, i32 0
  %219 = getelementptr inbounds %"class.jet::Box3", ptr %37, i32 0, i32 1
  %220 = getelementptr inbounds %"class.jet::BoundingBox", ptr %219, i32 0, i32 1
  invoke void @_ZN3jet5clampIdEENS_6VectorIT_Lm3EEERKS3_S5_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %32, ptr noundef nonnull align 8 dereferenceable(24) %216, ptr noundef nonnull align 8 dereferenceable(24) %218, ptr noundef nonnull align 8 dereferenceable(24) %220)
          to label %221 unwind label %233

221:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #6
  %222 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8 %33, ptr noundef nonnull align 8 dereferenceable(24) %222, ptr noundef nonnull align 8 dereferenceable(24) %32)
          to label %223 unwind label %237

223:                                              ; preds = %221
  %224 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i64 0, i64 0
  %225 = getelementptr inbounds %"class.jet::Plane3", ptr %224, i32 0, i32 1
  invoke void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %225)
          to label %226 unwind label %237

226:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %227 = invoke noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %33)
          to label %228 unwind label %241

228:                                              ; preds = %226
  store double %227, ptr %34, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  store i32 1, ptr %35, align 4, !tbaa !11
  br label %229

229:                                              ; preds = %268, %228
  %230 = load i32, ptr %35, align 4, !tbaa !11
  %231 = icmp slt i32 %230, 6
  br i1 %231, label %245, label %232

232:                                              ; preds = %229
  store i32 5, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %271

233:                                              ; preds = %215
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %10, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %11, align 4
  br label %274

237:                                              ; preds = %223, %221
  %238 = landingpad { ptr, i32 }
          cleanup
  %239 = extractvalue { ptr, i32 } %238, 0
  store ptr %239, ptr %10, align 8
  %240 = extractvalue { ptr, i32 } %238, 1
  store i32 %240, ptr %11, align 4
  br label %273

241:                                              ; preds = %226
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %10, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %11, align 4
  br label %272

245:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  %246 = load i32, ptr %35, align 4, !tbaa !11
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i64 0, i64 %247
  %249 = getelementptr inbounds %"class.jet::Plane3", ptr %248, i32 0, i32 1
  %250 = invoke noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %249, ptr noundef nonnull align 8 dereferenceable(24) %33)
          to label %251 unwind label %263

251:                                              ; preds = %245
  store double %250, ptr %36, align 8, !tbaa !9
  %252 = load double, ptr %36, align 8, !tbaa !9
  %253 = load double, ptr %34, align 8, !tbaa !9
  %254 = fcmp ogt double %252, %253
  br i1 %254, label %255, label %267

255:                                              ; preds = %251
  %256 = load i32, ptr %35, align 4, !tbaa !11
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i64 0, i64 %257
  %259 = getelementptr inbounds %"class.jet::Plane3", ptr %258, i32 0, i32 1
  %260 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %259)
          to label %261 unwind label %263

261:                                              ; preds = %255
  %262 = load double, ptr %36, align 8, !tbaa !9
  store double %262, ptr %34, align 8, !tbaa !9
  br label %267

263:                                              ; preds = %255, %245
  %264 = landingpad { ptr, i32 }
          cleanup
  %265 = extractvalue { ptr, i32 } %264, 0
  store ptr %265, ptr %10, align 8
  %266 = extractvalue { ptr, i32 } %264, 1
  store i32 %266, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %272

267:                                              ; preds = %261, %251
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  br label %268

268:                                              ; preds = %267
  %269 = load i32, ptr %35, align 4, !tbaa !11
  %270 = add nsw i32 %269, 1
  store i32 %270, ptr %35, align 4, !tbaa !11
  br label %229, !llvm.loop !15

271:                                              ; preds = %232
  store i32 1, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #6
  br label %275

272:                                              ; preds = %263, %241
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %273

273:                                              ; preds = %272, %237
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  br label %274

274:                                              ; preds = %273, %233
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #6
  br label %283

275:                                              ; preds = %271, %212
  %276 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i32 0, i32 0
  %277 = getelementptr inbounds %"class.jet::Plane3", ptr %276, i64 6
  br label %278

278:                                              ; preds = %278, %275
  %279 = phi ptr [ %277, %275 ], [ %280, %278 ]
  %280 = getelementptr inbounds %"class.jet::Plane3", ptr %279, i64 -1
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %280) #6
  %281 = icmp eq ptr %280, %276
  br i1 %281, label %282, label %278

282:                                              ; preds = %278
  call void @llvm.lifetime.end.p0(i64 1584, ptr %7) #6
  ret void

283:                                              ; preds = %274, %214, %161
  %284 = getelementptr inbounds [6 x %"class.jet::Plane3"], ptr %7, i32 0, i32 0
  %285 = getelementptr inbounds %"class.jet::Plane3", ptr %284, i64 6
  br label %286

286:                                              ; preds = %286, %283
  %287 = phi ptr [ %285, %283 ], [ %288, %286 ]
  %288 = getelementptr inbounds %"class.jet::Plane3", ptr %287, i64 -1
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %288) #6
  %289 = icmp eq ptr %288, %284
  br i1 %289, label %290, label %286

290:                                              ; preds = %286
  br label %291

291:                                              ; preds = %290, %160
  call void @llvm.lifetime.end.p0(i64 1584, ptr %7) #6
  br label %292

292:                                              ; preds = %291
  %293 = load ptr, ptr %10, align 8
  %294 = load i32, ptr %11, align 4
  %295 = insertvalue { ptr, i32 } poison, ptr %293, 0
  %296 = insertvalue { ptr, i32 } %295, i32 %294, 1
  resume { ptr, i32 } %296
}

; 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 #1 align 2

; 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)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 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)) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 #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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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 }
%"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] }

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

declare i32 @__gxx_personality_v0(...)

; 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 #1 align 2

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3jet11BoundingBoxIdLm3EE8containsERKNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2 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 #3

declare void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"class.jet::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(209), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; 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 #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3jet5clampIdEENS_6VectorIT_Lm3EEERKS3_S5_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), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3jet4Box318closestNormalLocalERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"class.jet::Vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(264) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca [6 x %"class.jet::Plane3"], align 16
  %5 = alloca %"class.jet::Vector", align 8
  %6 = alloca %"class.jet::Transform3", align 8
  %7 = alloca %"class.jet::Vector", align 8
  %8 = alloca %"class.jet::Transform3", align 8
  %9 = alloca %"class.jet::Vector", align 8
  %10 = alloca %"class.jet::Transform3", align 8
  %11 = alloca %"class.jet::Vector", align 8
  %12 = alloca %"class.jet::Transform3", align 8
  %13 = alloca %"class.jet::Vector", align 8
  %14 = alloca %"class.jet::Transform3", align 8
  %15 = alloca %"class.jet::Vector", align 8
  %16 = alloca %"class.jet::Transform3", 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
  %21 = alloca %"class.jet::Vector", align 8
  %22 = alloca %"class.jet::Vector", align 8
  call void @llvm.lifetime.start.p0(i64 1584, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef 1.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  %23 = getelementptr inbounds i8, ptr %1, i64 216
  %24 = getelementptr inbounds i8, ptr %1, i64 240
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %6) #6
  call void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %6)
  call void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(200) %6, i1 noundef zeroext false)
  %25 = getelementptr inbounds i8, ptr %4, i64 264
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %7, 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 %8) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %8)
          to label %26 unwind label %46

26:                                               ; preds = %3
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(200) %8, i1 noundef zeroext false)
          to label %27 unwind label %46

27:                                               ; preds = %26
  %28 = getelementptr inbounds i8, ptr %4, i64 528
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %10) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %10)
          to label %29 unwind label %48

29:                                               ; preds = %27
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %28, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(200) %10, i1 noundef zeroext false)
          to label %30 unwind label %48

30:                                               ; preds = %29
  %31 = getelementptr inbounds i8, ptr %4, i64 792
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #6
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %11, double noundef -1.000000e+00, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %12) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %12)
          to label %32 unwind label %50

32:                                               ; preds = %30
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %31, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(200) %12, i1 noundef zeroext false)
          to label %33 unwind label %50

33:                                               ; preds = %32
  %34 = getelementptr inbounds i8, ptr %4, i64 1056
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #6
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %13, 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 %14) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %14)
          to label %35 unwind label %52

35:                                               ; preds = %33
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %34, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(200) %14, i1 noundef zeroext false)
          to label %36 unwind label %52

36:                                               ; preds = %35
  %37 = getelementptr inbounds i8, ptr %4, i64 1320
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #6
  call void @_ZN3jet6VectorIdLm3EEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %15, double noundef 0.000000e+00, double noundef 0.000000e+00, double noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %16) #6
  invoke void @_ZN3jet10Transform3C2Ev(ptr noundef nonnull align 8 dereferenceable(200) %16)
          to label %38 unwind label %54

38:                                               ; preds = %36
  invoke void @_ZN3jet6Plane3C1ERKNS_6VectorIdLm3EEES4_RKNS_10Transform3Eb(ptr noundef nonnull align 8 dereferenceable(264) %37, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(200) %16, i1 noundef zeroext false)
          to label %39 unwind label %54

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  %40 = call noundef zeroext i1 @_ZNK3jet11BoundingBoxIdLm3EE8containsERKNS_6VectorIdLm3EEE(ptr noundef nonnull align 8 dereferenceable(48) %23, ptr noundef nonnull align 8 dereferenceable(24) %2)
  br i1 %40, label %41, label %116

41:                                               ; preds = %39
  %42 = getelementptr inbounds i8, ptr %4, i64 216
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %42)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %17) #6
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(209) %4, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %43 unwind label %64

43:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #6
  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) %2)
          to label %44 unwind label %66

44:                                               ; preds = %43
  %45 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #6
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(209) %25, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %68 unwind label %75

46:                                               ; preds = %26, %3
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %59

48:                                               ; preds = %29, %27
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %58

50:                                               ; preds = %32, %30
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %57

52:                                               ; preds = %35, %33
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %56

54:                                               ; preds = %38, %36
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #6
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  %.0 = phi ptr [ %37, %54 ], [ %34, %52 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #6
  br label %57

57:                                               ; preds = %56, %50
  %.pn.pn = phi { ptr, i32 } [ %.pn, %56 ], [ %51, %50 ]
  %.1 = phi ptr [ %.0, %56 ], [ %31, %50 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #6
  br label %58

58:                                               ; preds = %57, %48
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %57 ], [ %49, %48 ]
  %.2 = phi ptr [ %.1, %57 ], [ %28, %48 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %59

59:                                               ; preds = %46, %58
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %58 ], [ %47, %46 ]
  %.3 = phi ptr [ %.2, %58 ], [ %25, %46 ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %60

60:                                               ; preds = %59, %60
  %61 = phi ptr [ %62, %60 ], [ %.3, %59 ]
  %62 = getelementptr inbounds i8, ptr %61, i64 -264
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %62) #6
  %63 = icmp eq ptr %62, %4
  br i1 %63, label %.loopexit, label %60

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

66:                                               ; preds = %43
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #6
  br label %115

68:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #6
  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) %19, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %69 unwind label %77

69:                                               ; preds = %68
  %70 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  %71 = fcmp olt double %70, %45
  br i1 %71, label %72, label %81

72:                                               ; preds = %69
  %73 = getelementptr inbounds i8, ptr %4, i64 480
  %74 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %73)
          to label %81 unwind label %79

75:                                               ; preds = %105, %97, %89, %81, %44
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %114

77:                                               ; preds = %106, %98, %90, %82, %68
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  br label %114

79:                                               ; preds = %110, %102, %94, %86, %72
  %80 = landingpad { ptr, i32 }
          cleanup
  br label %114

81:                                               ; preds = %72, %69
  %.136 = phi double [ %45, %69 ], [ %70, %72 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #6
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(209) %28, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %82 unwind label %75

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #6
  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) %19, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %83 unwind label %77

83:                                               ; preds = %82
  %84 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  %85 = fcmp olt double %84, %.136
  br i1 %85, label %86, label %89

86:                                               ; preds = %83
  %87 = getelementptr inbounds i8, ptr %4, i64 744
  %88 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %87)
          to label %89 unwind label %79

89:                                               ; preds = %86, %83
  %.136.1 = phi double [ %.136, %83 ], [ %84, %86 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #6
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(209) %31, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %90 unwind label %75

90:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #6
  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) %19, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %91 unwind label %77

91:                                               ; preds = %90
  %92 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  %93 = fcmp olt double %92, %.136.1
  br i1 %93, label %94, label %97

94:                                               ; preds = %91
  %95 = getelementptr inbounds i8, ptr %4, i64 1008
  %96 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %95)
          to label %97 unwind label %79

97:                                               ; preds = %94, %91
  %.136.2 = phi double [ %.136.1, %91 ], [ %92, %94 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #6
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(209) %34, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %98 unwind label %75

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #6
  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) %19, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %99 unwind label %77

99:                                               ; preds = %98
  %100 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  %101 = fcmp olt double %100, %.136.2
  br i1 %101, label %102, label %105

102:                                              ; preds = %99
  %103 = getelementptr inbounds i8, ptr %4, i64 1272
  %104 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %103)
          to label %105 unwind label %79

105:                                              ; preds = %102, %99
  %.136.3 = phi double [ %.136.2, %99 ], [ %100, %102 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #6
  invoke void @_ZNK3jet8Surface312closestPointERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %19, ptr noundef nonnull align 8 dereferenceable(209) %37, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %106 unwind label %75

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %20) #6
  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) %19, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %107 unwind label %77

107:                                              ; preds = %106
  %108 = call noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %20) #6
  %109 = fcmp olt double %108, %.136.3
  br i1 %109, label %110, label %113

110:                                              ; preds = %107
  %111 = getelementptr inbounds i8, ptr %4, i64 1536
  %112 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %111)
          to label %113 unwind label %79

113:                                              ; preds = %110, %107
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  br label %159

114:                                              ; preds = %77, %79, %75
  %.pn61.pn = phi { ptr, i32 } [ %76, %75 ], [ %80, %79 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #6
  br label %115

115:                                              ; preds = %66, %114, %64
  %.pn61.pn.pn.pn = phi { ptr, i32 } [ %65, %64 ], [ %.pn61.pn, %114 ], [ %67, %66 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %17) #6
  br label %.loopexit.loopexit

116:                                              ; preds = %39
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %21) #6
  invoke void @_ZN3jet5clampIdEENS_6VectorIT_Lm3EEERKS3_S5_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %117 unwind label %124

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #6
  invoke void @_ZN3jetmiIdEENS_6VectorIT_Lm3EEERKS3_S5_(ptr dead_on_unwind nonnull writable sret(%"class.jet::Vector") align 8 %22, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %118 unwind label %126

118:                                              ; preds = %117
  %119 = getelementptr inbounds i8, ptr %4, i64 216
  call void @_ZN3jet6VectorIdLm3EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %119)
  %120 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %121 = getelementptr inbounds i8, ptr %4, i64 480
  %122 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %121, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %123 = fcmp ogt double %122, %120
  br i1 %123, label %128, label %132

124:                                              ; preds = %116
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %158

126:                                              ; preds = %117
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %157

128:                                              ; preds = %118
  %129 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %121)
          to label %132 unwind label %130

130:                                              ; preds = %154, %148, %142, %136, %128
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %157

132:                                              ; preds = %128, %118
  %.128 = phi double [ %120, %118 ], [ %122, %128 ]
  %133 = getelementptr inbounds i8, ptr %4, i64 744
  %134 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %135 = fcmp ogt double %134, %.128
  br i1 %135, label %136, label %138

136:                                              ; preds = %132
  %137 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %133)
          to label %138 unwind label %130

138:                                              ; preds = %136, %132
  %.128.1 = phi double [ %.128, %132 ], [ %134, %136 ]
  %139 = getelementptr inbounds i8, ptr %4, i64 1008
  %140 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %139, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %141 = fcmp ogt double %140, %.128.1
  br i1 %141, label %142, label %144

142:                                              ; preds = %138
  %143 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %139)
          to label %144 unwind label %130

144:                                              ; preds = %142, %138
  %.128.2 = phi double [ %.128.1, %138 ], [ %140, %142 ]
  %145 = getelementptr inbounds i8, ptr %4, i64 1272
  %146 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %145, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %147 = fcmp ogt double %146, %.128.2
  br i1 %147, label %148, label %150

148:                                              ; preds = %144
  %149 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %145)
          to label %150 unwind label %130

150:                                              ; preds = %148, %144
  %.128.3 = phi double [ %.128.2, %144 ], [ %146, %148 ]
  %151 = getelementptr inbounds i8, ptr %4, i64 1536
  %152 = call noundef double @_ZNK3jet6VectorIdLm3EE3dotERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %151, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %153 = fcmp ogt double %152, %.128.3
  br i1 %153, label %154, label %156

154:                                              ; preds = %150
  %155 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet6VectorIdLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %151)
          to label %156 unwind label %130

156:                                              ; preds = %154, %150
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #6
  br label %159

157:                                              ; preds = %130, %126
  %.pn58 = phi { ptr, i32 } [ %131, %130 ], [ %127, %126 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #6
  br label %158

158:                                              ; preds = %157, %124
  %.pn58.pn = phi { ptr, i32 } [ %.pn58, %157 ], [ %125, %124 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %21) #6
  br label %.loopexit.loopexit

159:                                              ; preds = %156, %113
  %160 = getelementptr inbounds i8, ptr %4, i64 1320
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %160) #6
  %161 = getelementptr inbounds i8, ptr %4, i64 1056
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %161) #6
  %162 = getelementptr inbounds i8, ptr %4, i64 792
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %162) #6
  %163 = getelementptr inbounds i8, ptr %4, i64 528
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %163) #6
  %164 = getelementptr inbounds i8, ptr %4, i64 264
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %164) #6
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %4) #6
  call void @llvm.lifetime.end.p0(i64 1584, ptr nonnull %4) #6
  ret void

.loopexit.loopexit:                               ; preds = %158, %115
  %.pn61.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn61.pn.pn.pn, %115 ], [ %.pn58.pn, %158 ]
  %165 = getelementptr inbounds i8, ptr %4, i64 1320
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %165) #6
  %166 = getelementptr inbounds i8, ptr %4, i64 1056
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %166) #6
  %167 = getelementptr inbounds i8, ptr %4, i64 792
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %167) #6
  %168 = getelementptr inbounds i8, ptr %4, i64 528
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %168) #6
  %169 = getelementptr inbounds i8, ptr %4, i64 264
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %169) #6
  call void @_ZN3jet8Surface3D2Ev(ptr noundef nonnull align 8 dereferenceable(264) %4) #6
  br label %.loopexit

.loopexit:                                        ; preds = %60, %.loopexit.loopexit
  %.pn61.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn61.pn.pn.pn.pn, %.loopexit.loopexit ], [ %.pn.pn.pn.pn, %60 ]
  call void @llvm.lifetime.end.p0(i64 1584, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn61.pn.pn.pn.pn.pn
}

; 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 #1 align 2

; 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 #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3jet6VectorIdLm3EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 #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: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass