; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Collision (ManifoldBetweenTwoFaces)

; 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.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::StaticArray.2" = type { i32, [12 x i8], [32 x %"struct.JPH::StaticArray<JPH::Vec3, 32>::Storage"] }
%"struct.JPH::StaticArray<JPH::Vec3, 32>::Storage" = type { [16 x i8] }

@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040), ptr noundef nonnull align 16 dereferenceable(16)) #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH23ManifoldBetweenTwoFacesENS_4Vec3ES0_S0_fRKNS_11StaticArrayIS0_Lj32EEES4_RNS1_IS0_Lj64EEES6_(double %0, double %1, double %2, double %3, double %4, double %5, float noundef %6, ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(528) %8, ptr noundef nonnull align 16 dereferenceable(1040) %9, ptr noundef nonnull align 16 dereferenceable(1040) %10) #4 personality ptr @__gxx_personality_v0 {
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca float, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.JPH::AssertLastParam", align 1
  %21 = alloca i32, align 4
  %22 = alloca %"class.JPH::StaticArray.2", align 16
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %"class.JPH::Vec3", align 16
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca %"class.JPH::Vec3", align 16
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca float, align 4
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca float, align 4
  %43 = alloca ptr, align 8
  %44 = alloca ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca %"class.JPH::Vec3", align 16
  %47 = alloca float, align 4
  %48 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca %"class.JPH::Vec3", align 16
  %51 = alloca %"class.JPH::Vec3", align 16
  %52 = alloca %"class.JPH::Vec3", align 16
  %53 = alloca %"class.JPH::Vec3", align 16
  %54 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  store double %0, ptr %54, align 16
  %55 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %1, ptr %55, align 8
  %56 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  store double %2, ptr %56, align 16
  %57 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  store double %3, ptr %57, align 8
  %58 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  store double %4, ptr %58, align 16
  %59 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  store double %5, ptr %59, align 8
  store float %6, ptr %15, align 4, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !9
  store ptr %8, ptr %17, align 8, !tbaa !9
  store ptr %9, ptr %18, align 8, !tbaa !9
  store ptr %10, ptr %19, align 8, !tbaa !9
  br label %60

60:                                               ; preds = %11
  %61 = load float, ptr %15, align 4, !tbaa !5
  %62 = fcmp ogt float %61, 0.000000e+00
  br i1 %62, label %66, label %63

63:                                               ; preds = %60
  %64 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 139)
  br i1 %64, label %65, label %66

65:                                               ; preds = %63
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !11
  br label %66

66:                                               ; preds = %65, %63, %60
  br label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %68 = load ptr, ptr %18, align 8, !tbaa !9
  %69 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %68)
  store i32 %69, ptr %21, align 4, !tbaa !12
  %70 = load ptr, ptr %16, align 8, !tbaa !9
  %71 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %70)
  %72 = icmp uge i32 %71, 2
  br i1 %72, label %73, label %331

73:                                               ; preds = %67
  %74 = load ptr, ptr %17, align 8, !tbaa !9
  %75 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %74)
  %76 = icmp uge i32 %75, 3
  br i1 %76, label %77, label %331

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 528, ptr %22) #8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EEC2Ev(ptr noundef nonnull align 16 dereferenceable(528) %22) #8
  %78 = load ptr, ptr %16, align 8, !tbaa !9
  %79 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %78)
          to label %80 unwind label %90

80:                                               ; preds = %77
  %81 = icmp uge i32 %79, 3
  br i1 %81, label %82, label %94

82:                                               ; preds = %80
  %83 = load ptr, ptr %17, align 8, !tbaa !9
  %84 = load ptr, ptr %16, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !14
  %85 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %86 = load double, ptr %85, align 16
  %87 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %88 = load double, ptr %87, align 8
  invoke void @_ZN3JPH14ClipPolyVsPolyINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S6_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528) %83, ptr noundef nonnull align 16 dereferenceable(528) %84, double %86, double %88, ptr noundef nonnull align 16 dereferenceable(528) %22)
          to label %89 unwind label %90

89:                                               ; preds = %82
  br label %121

90:                                               ; preds = %106, %103, %99, %94, %82, %77
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %23, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %24, align 4
  br label %330

94:                                               ; preds = %80
  %95 = load ptr, ptr %16, align 8, !tbaa !9
  %96 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %95)
          to label %97 unwind label %90

97:                                               ; preds = %94
  %98 = icmp eq i32 %96, 2
  br i1 %98, label %99, label %120

99:                                               ; preds = %97
  %100 = load ptr, ptr %17, align 8, !tbaa !9
  %101 = load ptr, ptr %16, align 8, !tbaa !9
  %102 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %101, i32 noundef 0)
          to label %103 unwind label %90

103:                                              ; preds = %99
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %26, ptr align 16 %102, i64 16, i1 false), !tbaa.struct !14
  %104 = load ptr, ptr %16, align 8, !tbaa !9
  %105 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %104, i32 noundef 1)
          to label %106 unwind label %90

106:                                              ; preds = %103
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %105, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !14
  %107 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %108 = load double, ptr %107, align 16
  %109 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %110 = load double, ptr %109, align 8
  %111 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %112 = load double, ptr %111, align 16
  %113 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %114 = load double, ptr %113, align 8
  %115 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %116 = load double, ptr %115, align 16
  %117 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %118 = load double, ptr %117, align 8
  invoke void @_ZN3JPH14ClipPolyVsEdgeINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S2_S2_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528) %100, double %108, double %110, double %112, double %114, double %116, double %118, ptr noundef nonnull align 16 dereferenceable(528) %22)
          to label %119 unwind label %90

119:                                              ; preds = %106
  br label %120

120:                                              ; preds = %119, %97
  br label %121

121:                                              ; preds = %120, %89
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #8
  %122 = load ptr, ptr %16, align 8, !tbaa !9
  %123 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %122, i32 noundef 0)
          to label %124 unwind label %172

124:                                              ; preds = %121
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %123, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #8
  %125 = load ptr, ptr %16, align 8, !tbaa !9
  %126 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %125, i32 noundef 1)
          to label %127 unwind label %176

127:                                              ; preds = %124
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !14
  %128 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %129 = load double, ptr %128, align 16
  %130 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %131 = load double, ptr %130, align 8
  %132 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %126, double %129, double %131)
          to label %133 unwind label %176

133:                                              ; preds = %127
  %134 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %135 = getelementptr inbounds %union.anon, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds { double, double }, ptr %135, i32 0, i32 0
  %137 = extractvalue { double, double } %132, 0
  store double %137, ptr %136, align 16
  %138 = getelementptr inbounds { double, double }, ptr %135, i32 0, i32 1
  %139 = extractvalue { double, double } %132, 1
  store double %139, ptr %138, align 8
  %140 = load ptr, ptr %16, align 8, !tbaa !9
  %141 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %140)
          to label %142 unwind label %176

142:                                              ; preds = %133
  %143 = icmp uge i32 %141, 3
  br i1 %143, label %144, label %184

144:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #8
  %145 = load ptr, ptr %16, align 8, !tbaa !9
  %146 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %145, i32 noundef 2)
          to label %147 unwind label %180

147:                                              ; preds = %144
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !14
  %148 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %149 = load double, ptr %148, align 16
  %150 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %151 = load double, ptr %150, align 8
  %152 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %146, double %149, double %151)
          to label %153 unwind label %180

153:                                              ; preds = %147
  %154 = getelementptr inbounds %"class.JPH::Vec3", ptr %34, i32 0, i32 0
  %155 = getelementptr inbounds %union.anon, ptr %154, i32 0, i32 0
  %156 = getelementptr inbounds { double, double }, ptr %155, i32 0, i32 0
  %157 = extractvalue { double, double } %152, 0
  store double %157, ptr %156, align 16
  %158 = getelementptr inbounds { double, double }, ptr %155, i32 0, i32 1
  %159 = extractvalue { double, double } %152, 1
  store double %159, ptr %158, align 8
  %160 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %161 = load double, ptr %160, align 16
  %162 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %163 = load double, ptr %162, align 8
  %164 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %31, double %161, double %163)
          to label %165 unwind label %180

165:                                              ; preds = %153
  %166 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %167 = getelementptr inbounds %union.anon, ptr %166, i32 0, i32 0
  %168 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 0
  %169 = extractvalue { double, double } %164, 0
  store double %169, ptr %168, align 16
  %170 = getelementptr inbounds { double, double }, ptr %167, i32 0, i32 1
  %171 = extractvalue { double, double } %164, 1
  store double %171, ptr %170, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  br label %213

172:                                              ; preds = %121
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %23, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %24, align 4
  br label %329

176:                                              ; preds = %133, %127, %124
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %23, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %24, align 4
  br label %328

180:                                              ; preds = %153, %147, %144
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %23, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  br label %328

184:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !14
  %185 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %186 = load double, ptr %185, align 16
  %187 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %188 = load double, ptr %187, align 8
  %189 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %31, double %186, double %188)
          to label %190 unwind label %209

190:                                              ; preds = %184
  %191 = getelementptr inbounds %"class.JPH::Vec3", ptr %37, i32 0, i32 0
  %192 = getelementptr inbounds %union.anon, ptr %191, i32 0, i32 0
  %193 = getelementptr inbounds { double, double }, ptr %192, i32 0, i32 0
  %194 = extractvalue { double, double } %189, 0
  store double %194, ptr %193, align 16
  %195 = getelementptr inbounds { double, double }, ptr %192, i32 0, i32 1
  %196 = extractvalue { double, double } %189, 1
  store double %196, ptr %195, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %39, ptr align 16 %31, i64 16, i1 false), !tbaa.struct !14
  %197 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %198 = load double, ptr %197, align 16
  %199 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %200 = load double, ptr %199, align 8
  %201 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %37, double %198, double %200)
          to label %202 unwind label %209

202:                                              ; preds = %190
  %203 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %204 = getelementptr inbounds %union.anon, ptr %203, i32 0, i32 0
  %205 = getelementptr inbounds { double, double }, ptr %204, i32 0, i32 0
  %206 = extractvalue { double, double } %201, 0
  store double %206, ptr %205, align 16
  %207 = getelementptr inbounds { double, double }, ptr %204, i32 0, i32 1
  %208 = extractvalue { double, double } %201, 1
  store double %208, ptr %207, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %36, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %213

209:                                              ; preds = %190, %184
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %23, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #8
  br label %328

213:                                              ; preds = %202, %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %30, i64 16, i1 false), !tbaa.struct !14
  %214 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %215 = load double, ptr %214, align 16
  %216 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %217 = load double, ptr %216, align 8
  %218 = invoke noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %215, double %217)
          to label %219 unwind label %236

219:                                              ; preds = %213
  store float %218, ptr %40, align 4, !tbaa !5
  %220 = load float, ptr %40, align 4, !tbaa !5
  %221 = fcmp une float %220, 0.000000e+00
  br i1 %221, label %222, label %326

222:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  %223 = invoke noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
          to label %224 unwind label %240

224:                                              ; preds = %222
  store float %223, ptr %42, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #8
  store ptr %22, ptr %43, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #8
  %225 = load ptr, ptr %43, align 8, !tbaa !9
  %226 = invoke noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(528) %225)
          to label %227 unwind label %244

227:                                              ; preds = %224
  store ptr %226, ptr %44, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %228 = load ptr, ptr %43, align 8, !tbaa !9
  %229 = invoke noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(528) %228)
          to label %230 unwind label %248

230:                                              ; preds = %227
  store ptr %229, ptr %45, align 8, !tbaa !9
  br label %231

231:                                              ; preds = %318, %230
  %232 = load ptr, ptr %44, align 8, !tbaa !9
  %233 = load ptr, ptr %45, align 8, !tbaa !9
  %234 = icmp ne ptr %232, %233
  br i1 %234, label %252, label %235

235:                                              ; preds = %231
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %324

236:                                              ; preds = %213
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %23, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %24, align 4
  br label %327

240:                                              ; preds = %222
  %241 = landingpad { ptr, i32 }
          cleanup
  %242 = extractvalue { ptr, i32 } %241, 0
  store ptr %242, ptr %23, align 8
  %243 = extractvalue { ptr, i32 } %241, 1
  store i32 %243, ptr %24, align 4
  br label %325

244:                                              ; preds = %224
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %23, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %24, align 4
  br label %323

248:                                              ; preds = %227
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %23, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %24, align 4
  br label %322

252:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 16, ptr %46) #8
  %253 = load ptr, ptr %44, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %46, ptr align 16 %253, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %49, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !14
  %254 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %255 = load double, ptr %254, align 16
  %256 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %257 = load double, ptr %256, align 8
  %258 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %46, double %255, double %257)
          to label %259 unwind label %309

259:                                              ; preds = %252
  %260 = getelementptr inbounds %"class.JPH::Vec3", ptr %48, i32 0, i32 0
  %261 = getelementptr inbounds %union.anon, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds { double, double }, ptr %261, i32 0, i32 0
  %263 = extractvalue { double, double } %258, 0
  store double %263, ptr %262, align 16
  %264 = getelementptr inbounds { double, double }, ptr %261, i32 0, i32 1
  %265 = extractvalue { double, double } %258, 1
  store double %265, ptr %264, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %50, ptr align 16 %30, i64 16, i1 false), !tbaa.struct !14
  %266 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %267 = load double, ptr %266, align 16
  %268 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %269 = load double, ptr %268, align 8
  %270 = invoke noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %48, double %267, double %269)
          to label %271 unwind label %309

271:                                              ; preds = %259
  %272 = load float, ptr %40, align 4, !tbaa !5
  %273 = fdiv float %270, %272
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #8
  store float %273, ptr %47, align 4, !tbaa !5
  %274 = load float, ptr %47, align 4, !tbaa !5
  %275 = load float, ptr %42, align 4, !tbaa !5
  %276 = fmul float %274, %275
  %277 = load float, ptr %15, align 4, !tbaa !5
  %278 = fcmp olt float %276, %277
  br i1 %278, label %279, label %317

279:                                              ; preds = %271
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #8
  %280 = load float, ptr %47, align 4, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %53, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !14
  %281 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %282 = load double, ptr %281, align 16
  %283 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %284 = load double, ptr %283, align 8
  %285 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %280, double %282, double %284)
          to label %286 unwind label %313

286:                                              ; preds = %279
  %287 = getelementptr inbounds %"class.JPH::Vec3", ptr %52, i32 0, i32 0
  %288 = getelementptr inbounds %union.anon, ptr %287, i32 0, i32 0
  %289 = getelementptr inbounds { double, double }, ptr %288, i32 0, i32 0
  %290 = extractvalue { double, double } %285, 0
  store double %290, ptr %289, align 16
  %291 = getelementptr inbounds { double, double }, ptr %288, i32 0, i32 1
  %292 = extractvalue { double, double } %285, 1
  store double %292, ptr %291, align 8
  %293 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %294 = load double, ptr %293, align 16
  %295 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %296 = load double, ptr %295, align 8
  %297 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %46, double %294, double %296)
          to label %298 unwind label %313

298:                                              ; preds = %286
  %299 = getelementptr inbounds %"class.JPH::Vec3", ptr %51, i32 0, i32 0
  %300 = getelementptr inbounds %union.anon, ptr %299, i32 0, i32 0
  %301 = getelementptr inbounds { double, double }, ptr %300, i32 0, i32 0
  %302 = extractvalue { double, double } %297, 0
  store double %302, ptr %301, align 16
  %303 = getelementptr inbounds { double, double }, ptr %300, i32 0, i32 1
  %304 = extractvalue { double, double } %297, 1
  store double %304, ptr %303, align 8
  %305 = load ptr, ptr %18, align 8, !tbaa !9
  invoke void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %305, ptr noundef nonnull align 16 dereferenceable(16) %51)
          to label %306 unwind label %313

306:                                              ; preds = %298
  %307 = load ptr, ptr %19, align 8, !tbaa !9
  invoke void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %307, ptr noundef nonnull align 16 dereferenceable(16) %46)
          to label %308 unwind label %313

308:                                              ; preds = %306
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #8
  br label %317

309:                                              ; preds = %259, %252
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %23, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #8
  br label %321

313:                                              ; preds = %306, %298, %286, %279
  %314 = landingpad { ptr, i32 }
          cleanup
  %315 = extractvalue { ptr, i32 } %314, 0
  store ptr %315, ptr %23, align 8
  %316 = extractvalue { ptr, i32 } %314, 1
  store i32 %316, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #8
  br label %321

317:                                              ; preds = %308, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  br label %318

318:                                              ; preds = %317
  %319 = load ptr, ptr %44, align 8, !tbaa !9
  %320 = getelementptr inbounds %"class.JPH::Vec3", ptr %319, i32 1
  store ptr %320, ptr %44, align 8, !tbaa !9
  br label %231

321:                                              ; preds = %313, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %46) #8
  br label %322

322:                                              ; preds = %321, %248
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  br label %323

323:                                              ; preds = %322, %244
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #8
  br label %325

324:                                              ; preds = %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  br label %326

325:                                              ; preds = %323, %240
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  br label %327

326:                                              ; preds = %324, %219
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EED2Ev(ptr noundef nonnull align 16 dereferenceable(528) %22) #8
  call void @llvm.lifetime.end.p0(i64 528, ptr %22) #8
  br label %331

327:                                              ; preds = %325, %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %328

328:                                              ; preds = %327, %209, %180, %176
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  br label %329

329:                                              ; preds = %328, %172
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #8
  br label %330

330:                                              ; preds = %329, %90
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EED2Ev(ptr noundef nonnull align 16 dereferenceable(528) %22) #8
  call void @llvm.lifetime.end.p0(i64 528, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %340

331:                                              ; preds = %326, %73, %67
  %332 = load ptr, ptr %18, align 8, !tbaa !9
  %333 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %332)
  %334 = load i32, ptr %21, align 4, !tbaa !12
  %335 = icmp eq i32 %333, %334
  br i1 %335, label %336, label %339

336:                                              ; preds = %331
  %337 = load ptr, ptr %18, align 8, !tbaa !9
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %337, ptr noundef nonnull align 16 dereferenceable(16) %12)
  %338 = load ptr, ptr %19, align 8, !tbaa !9
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %338, ptr noundef nonnull align 16 dereferenceable(16) %13)
  br label %339

339:                                              ; preds = %336, %331
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  ret void

340:                                              ; preds = %330
  %341 = load ptr, ptr %23, align 8
  %342 = load i32, ptr %24, align 4
  %343 = insertvalue { ptr, i32 } poison, ptr %341, 0
  %344 = insertvalue { ptr, i32 } %343, i32 %342, 1
  resume { ptr, i32 } %344
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14ClipPolyVsPolyINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S6_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528), ptr noundef nonnull align 16 dereferenceable(528), double, double, ptr noundef nonnull align 16 dereferenceable(528)) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14ClipPolyVsEdgeINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S2_S2_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528), double, double, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(528)) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528), i32 noundef) #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(528)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(528)) #1 align 2

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline 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 #7 = { alwaysinline 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 #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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{i64 2158439772}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{i64 0, i64 16, !15}
!15 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::StaticArray.2" = type { i32, [12 x i8], [32 x %"struct.JPH::StaticArray<JPH::Vec3, 32>::Storage"] }
%"struct.JPH::StaticArray<JPH::Vec3, 32>::Storage" = type { [16 x i8] }

@.str.1 = external hidden unnamed_addr constant [103 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1

; 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 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 i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef, double, double) local_unnamed_addr #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH23ManifoldBetweenTwoFacesENS_4Vec3ES0_S0_fRKNS_11StaticArrayIS0_Lj32EEES4_RNS1_IS0_Lj64EEES6_(double %0, double %1, double %2, double %3, double %4, double %5, float noundef %6, ptr noundef nonnull align 16 dereferenceable(528) %7, ptr noundef nonnull align 16 dereferenceable(528) %8, ptr noundef nonnull align 16 dereferenceable(1040) %9, ptr noundef nonnull align 16 dereferenceable(1040) %10) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::StaticArray.2", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Vec3", align 16
  store double %0, ptr %12, align 16
  %21 = getelementptr inbounds i8, ptr %12, i64 8
  store double %1, ptr %21, align 8
  store double %2, ptr %13, align 16
  %22 = getelementptr inbounds i8, ptr %13, i64 8
  store double %3, ptr %22, align 8
  store double %4, ptr %14, align 16
  %23 = getelementptr inbounds i8, ptr %14, i64 8
  store double %5, ptr %23, align 8
  %24 = fcmp ogt float %6, 0.000000e+00
  br i1 %24, label %28, label %25

25:                                               ; preds = %11
  %26 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 139)
  br i1 %26, label %27, label %28

27:                                               ; preds = %25
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #8, !srcloc !5
  br label %28

28:                                               ; preds = %11, %25, %27
  %29 = tail call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %9)
  %30 = tail call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %7)
  %31 = icmp ugt i32 %30, 1
  br i1 %31, label %32, label %126

32:                                               ; preds = %28
  %33 = tail call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %8)
  %34 = icmp ugt i32 %33, 2
  br i1 %34, label %35, label %126

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 528, ptr nonnull %15) #8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EEC2Ev(ptr noundef nonnull align 16 dereferenceable(528) %15) #8
  %36 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %7)
  %37 = icmp ugt i32 %36, 2
  br i1 %37, label %38, label %41

38:                                               ; preds = %35
  invoke void @_ZN3JPH14ClipPolyVsPolyINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S6_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528) %8, ptr noundef nonnull align 16 dereferenceable(528) %7, double %4, double %5, ptr noundef nonnull align 16 dereferenceable(528) %15)
          to label %49 unwind label %39

39:                                               ; preds = %48, %46, %44, %38
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %125

41:                                               ; preds = %35
  %42 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %7)
  %43 = icmp eq i32 %42, 2
  br i1 %43, label %44, label %49

44:                                               ; preds = %41
  %45 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %7, i32 noundef 0)
          to label %46 unwind label %39

46:                                               ; preds = %44
  %.sroa.039.0.copyload = load double, ptr %45, align 16
  %.sroa.240.0..sroa_idx = getelementptr inbounds i8, ptr %45, i64 8
  %.sroa.240.0.copyload = load double, ptr %.sroa.240.0..sroa_idx, align 8, !tbaa !6
  %47 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %7, i32 noundef 1)
          to label %48 unwind label %39

48:                                               ; preds = %46
  %.sroa.037.0.copyload = load double, ptr %47, align 16
  %.sroa.238.0..sroa_idx = getelementptr inbounds i8, ptr %47, i64 8
  %.sroa.238.0.copyload = load double, ptr %.sroa.238.0..sroa_idx, align 8, !tbaa !6
  invoke void @_ZN3JPH14ClipPolyVsEdgeINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S2_S2_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528) %8, double %.sroa.039.0.copyload, double %.sroa.240.0.copyload, double %.sroa.037.0.copyload, double %.sroa.238.0.copyload, double %4, double %5, ptr noundef nonnull align 16 dereferenceable(528) %15)
          to label %49 unwind label %39

49:                                               ; preds = %41, %48, %38
  %50 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %7, i32 noundef 0)
          to label %51 unwind label %69

51:                                               ; preds = %49
  %.sroa.033.0.copyload = load double, ptr %50, align 16
  %.sroa.734.0..sroa_idx = getelementptr inbounds i8, ptr %50, i64 8
  %.sroa.734.0.copyload = load double, ptr %.sroa.734.0..sroa_idx, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #8
  %52 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %7, i32 noundef 1)
          to label %53 unwind label %71

53:                                               ; preds = %51
  %54 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %52, double %.sroa.033.0.copyload, double %.sroa.734.0.copyload)
          to label %55 unwind label %71

55:                                               ; preds = %53
  %56 = extractvalue { double, double } %54, 0
  store double %56, ptr %16, align 16
  %57 = getelementptr inbounds i8, ptr %16, i64 8
  %58 = extractvalue { double, double } %54, 1
  store double %58, ptr %57, align 8
  %59 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528) %7)
  %60 = icmp ugt i32 %59, 2
  br i1 %60, label %61, label %75

61:                                               ; preds = %55
  %62 = invoke noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528) %7, i32 noundef 2)
          to label %63 unwind label %73

63:                                               ; preds = %61
  %64 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %62, double %.sroa.033.0.copyload, double %.sroa.734.0.copyload)
          to label %65 unwind label %73

65:                                               ; preds = %63
  %66 = extractvalue { double, double } %64, 0
  %67 = extractvalue { double, double } %64, 1
  %68 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %66, double %67)
          to label %85 unwind label %73

69:                                               ; preds = %49
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %125

71:                                               ; preds = %53, %51
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %124

73:                                               ; preds = %65, %63, %61
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %124

75:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  %76 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %4, double %5)
          to label %77 unwind label %83

77:                                               ; preds = %75
  %78 = extractvalue { double, double } %76, 0
  store double %78, ptr %17, align 16
  %79 = getelementptr inbounds i8, ptr %17, i64 8
  %80 = extractvalue { double, double } %76, 1
  store double %80, ptr %79, align 8
  %.sroa.019.0.copyload = load double, ptr %16, align 16
  %.sroa.220.0.copyload = load double, ptr %57, align 8, !tbaa !6
  %81 = invoke { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %17, double %.sroa.019.0.copyload, double %.sroa.220.0.copyload)
          to label %82 unwind label %83

82:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  br label %85

83:                                               ; preds = %77, %75
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  br label %124

85:                                               ; preds = %65, %82
  %.pn = phi { double, double } [ %81, %82 ], [ %68, %65 ]
  %.sroa.7.0 = extractvalue { double, double } %.pn, 1
  %.sroa.032.0 = extractvalue { double, double } %.pn, 0
  %86 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %.sroa.032.0, double %.sroa.7.0)
  %87 = fcmp une float %86, 0.000000e+00
  br i1 %87, label %88, label %.loopexit

88:                                               ; preds = %85
  %89 = invoke noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
          to label %90 unwind label %95

90:                                               ; preds = %88
  %91 = call noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(528) %15)
  %92 = call noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(528) %15)
  %.not80 = icmp eq ptr %91, %92
  br i1 %.not80, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %90
  %93 = getelementptr inbounds i8, ptr %19, i64 8
  %94 = getelementptr inbounds i8, ptr %20, i64 8
  br label %97

95:                                               ; preds = %88
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %124

97:                                               ; preds = %.lr.ph, %121
  %.07181 = phi ptr [ %91, %.lr.ph ], [ %122, %121 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %18, ptr noundef nonnull align 16 dereferenceable(16) %.07181, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #8
  %98 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %.sroa.033.0.copyload, double %.sroa.734.0.copyload)
          to label %99 unwind label %117

99:                                               ; preds = %97
  %100 = extractvalue { double, double } %98, 0
  store double %100, ptr %19, align 16
  %101 = extractvalue { double, double } %98, 1
  store double %101, ptr %93, align 8
  %102 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %.sroa.032.0, double %.sroa.7.0)
  %103 = fdiv float %102, %86
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  %104 = fmul float %89, %103
  %105 = fcmp olt float %104, %6
  br i1 %105, label %106, label %121

106:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #8
  %.sroa.0.0.copyload = load double, ptr %14, align 16
  %.sroa.2.0.copyload = load double, ptr %23, align 8, !tbaa !6
  %107 = invoke { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef %103, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
          to label %108 unwind label %119

108:                                              ; preds = %106
  %109 = extractvalue { double, double } %107, 0
  %110 = extractvalue { double, double } %107, 1
  %111 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %109, double %110)
          to label %112 unwind label %119

112:                                              ; preds = %108
  %113 = extractvalue { double, double } %111, 0
  store double %113, ptr %20, align 16
  %114 = extractvalue { double, double } %111, 1
  store double %114, ptr %94, align 8
  invoke void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %9, ptr noundef nonnull align 16 dereferenceable(16) %20)
          to label %115 unwind label %119

115:                                              ; preds = %112
  invoke void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %10, ptr noundef nonnull align 16 dereferenceable(16) %18)
          to label %116 unwind label %119

116:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  br label %121

117:                                              ; preds = %97
  %118 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #8
  br label %123

119:                                              ; preds = %115, %112, %108, %106
  %120 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #8
  br label %123

121:                                              ; preds = %116, %99
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  %122 = getelementptr inbounds i8, ptr %.07181, i64 16
  %.not = icmp eq ptr %122, %92
  br i1 %.not, label %.loopexit, label %97

123:                                              ; preds = %119, %117
  %.pn74 = phi { ptr, i32 } [ %120, %119 ], [ %118, %117 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  br label %124

.loopexit:                                        ; preds = %121, %90, %85
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EED2Ev(ptr noundef nonnull align 16 dereferenceable(528) %15) #8
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %15) #8
  br label %126

124:                                              ; preds = %95, %123, %83, %73, %71
  %.pn74.pn.pn = phi { ptr, i32 } [ %74, %73 ], [ %84, %83 ], [ %72, %71 ], [ %.pn74, %123 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  br label %125

125:                                              ; preds = %69, %124, %39
  %.pn74.pn.pn.pn.pn = phi { ptr, i32 } [ %40, %39 ], [ %.pn74.pn.pn, %124 ], [ %70, %69 ]
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj32EED2Ev(ptr noundef nonnull align 16 dereferenceable(528) %15) #8
  call void @llvm.lifetime.end.p0(i64 528, ptr nonnull %15) #8
  resume { ptr, i32 } %.pn74.pn.pn.pn.pn

126:                                              ; preds = %.loopexit, %32, %28
  %127 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %9)
  %128 = icmp eq i32 %127, %29
  br i1 %128, label %129, label %130

129:                                              ; preds = %126
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %9, ptr noundef nonnull align 16 dereferenceable(16) %12)
  call void @_ZN3JPH11StaticArrayINS_4Vec3ELj64EE9push_backERKS1_(ptr noundef nonnull align 16 dereferenceable(1040) %10, ptr noundef nonnull align 16 dereferenceable(16) %13)
  br label %130

130:                                              ; preds = %129, %126
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(528)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14ClipPolyVsPolyINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S6_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528), ptr noundef nonnull align 16 dereferenceable(528), double, double, ptr noundef nonnull align 16 dereferenceable(528)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH14ClipPolyVsEdgeINS_11StaticArrayINS_4Vec3ELj32EEEEEvRKT_S2_S2_S2_RS4_(ptr noundef nonnull align 16 dereferenceable(528), double, double, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(528)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK3JPH11StaticArrayINS_4Vec3ELj32EEixEj(ptr noundef nonnull align 16 dereferenceable(528), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(528)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH11StaticArrayINS_4Vec3ELj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(528)) local_unnamed_addr #1 align 2

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { alwaysinline 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 #7 = { alwaysinline 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 #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 = !{i64 2158439772}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 16, !6}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass