; LLVM IR from jrouwe/JoltPhysics :: TestFramework/Renderer (DebugRendererImp)

; 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::Color" = type { %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Float2" = type { float, float }
%"class.JPH::Ref.17" = type { ptr }
%"class.JPH::DebugRenderer::Vertex" = type { %"class.JPH::Float3", %"class.JPH::Float3", %"class.JPH::Float2", %"class.JPH::Color" }

@_ZN3JPH5Color6sWhiteE = external global %"class.JPH::Color", align 4

; 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: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) #1 align 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) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13DebugRenderer8GeometryC2ERKNS_3RefINS_16RefTargetVirtualEEERKNS_5AABoxE(ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #5 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef) #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13DebugRenderer16sCalculateBoundsEPKNS0_6VertexEi(ptr dead_on_unwind noalias writable sret(%"class.JPH::AABox") align 16, ptr noundef, i32 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN3JPH13DebugRenderer24CreateSwingLimitGeometryEiPKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(320) %0, i32 noundef %1, ptr noundef %2) #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %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
  %21 = alloca %"class.JPH::Vec3", align 16
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Float3", align 4
  %27 = alloca %"class.JPH::Float2", align 4
  %28 = alloca %"class.JPH::Float2", align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %"class.JPH::Ref.17", align 8
  %37 = alloca ptr, align 8
  %38 = alloca i32, align 4
  %39 = alloca %"class.JPH::AABox", align 16
  %40 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  %41 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %42 = load i32, ptr %5, align 4, !tbaa !9
  %43 = mul nsw i32 2, %42
  store i32 %43, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = mul i64 %45, 36
  %47 = alloca i8, i64 %46, align 16
  store ptr %47, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %48, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %180, %3
  %50 = load i32, ptr %10, align 4, !tbaa !9
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = icmp slt i32 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %183

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %55, i32 1
  store ptr %56, ptr %9, align 8, !tbaa !5
  store ptr %55, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %57, i32 1
  store ptr %58, ptr %9, align 8, !tbaa !5
  store ptr %57, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = load i32, ptr %10, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %"class.JPH::Vec3", ptr %59, i64 %61
  store ptr %62, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = add nsw i32 %64, %65
  %67 = sub nsw i32 %66, 1
  %68 = load i32, ptr %5, align 4, !tbaa !9
  %69 = srem i32 %67, %68
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %"class.JPH::Vec3", ptr %63, i64 %70
  store ptr %71, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = load i32, ptr %10, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = srem i32 %74, %75
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds %"class.JPH::Vec3", ptr %72, i64 %77
  store ptr %78, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #8
  %79 = load ptr, ptr %15, align 8, !tbaa !5
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 %80, i64 16, i1 false), !tbaa.struct !11
  %81 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %82 = load double, ptr %81, align 16
  %83 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %84 = load double, ptr %83, align 8
  %85 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %79, double %82, double %84)
  %86 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %87 = getelementptr inbounds %union.anon, ptr %86, i32 0, i32 0
  %88 = getelementptr inbounds { double, double }, ptr %87, i32 0, i32 0
  %89 = extractvalue { double, double } %85, 0
  store double %89, ptr %88, align 16
  %90 = getelementptr inbounds { double, double }, ptr %87, i32 0, i32 1
  %91 = extractvalue { double, double } %85, 1
  store double %91, ptr %90, align 8
  %92 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %93 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %94 = getelementptr inbounds %union.anon, ptr %93, i32 0, i32 0
  %95 = getelementptr inbounds { double, double }, ptr %94, i32 0, i32 0
  %96 = extractvalue { double, double } %92, 0
  store double %96, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %94, i32 0, i32 1
  %98 = extractvalue { double, double } %92, 1
  store double %98, ptr %97, align 8
  %99 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %100 = load double, ptr %99, align 16
  %101 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %102 = load double, ptr %101, align 8
  %103 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %19, double %100, double %102)
  %104 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %105 = getelementptr inbounds %union.anon, ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds { double, double }, ptr %105, i32 0, i32 0
  %107 = extractvalue { double, double } %103, 0
  store double %107, ptr %106, align 16
  %108 = getelementptr inbounds { double, double }, ptr %105, i32 0, i32 1
  %109 = extractvalue { double, double } %103, 1
  store double %109, ptr %108, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  %110 = load ptr, ptr %13, align 8, !tbaa !5
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %111, i64 16, i1 false), !tbaa.struct !11
  %112 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %113 = load double, ptr %112, align 16
  %114 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %115 = load double, ptr %114, align 8
  %116 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %110, double %113, double %115)
  %117 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %118 = getelementptr inbounds %union.anon, ptr %117, i32 0, i32 0
  %119 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 0
  %120 = extractvalue { double, double } %116, 0
  store double %120, ptr %119, align 16
  %121 = getelementptr inbounds { double, double }, ptr %118, i32 0, i32 1
  %122 = extractvalue { double, double } %116, 1
  store double %122, ptr %121, align 8
  %123 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %124 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %125 = getelementptr inbounds %union.anon, ptr %124, i32 0, i32 0
  %126 = getelementptr inbounds { double, double }, ptr %125, i32 0, i32 0
  %127 = extractvalue { double, double } %123, 0
  store double %127, ptr %126, align 16
  %128 = getelementptr inbounds { double, double }, ptr %125, i32 0, i32 1
  %129 = extractvalue { double, double } %123, 1
  store double %129, ptr %128, align 8
  %130 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %131 = load double, ptr %130, align 16
  %132 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %133 = load double, ptr %132, align 8
  %134 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %23, double %131, double %133)
  %135 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %136 = getelementptr inbounds %union.anon, ptr %135, i32 0, i32 0
  %137 = getelementptr inbounds { double, double }, ptr %136, i32 0, i32 0
  %138 = extractvalue { double, double } %134, 0
  store double %138, ptr %137, align 16
  %139 = getelementptr inbounds { double, double }, ptr %136, i32 0, i32 1
  %140 = extractvalue { double, double } %134, 1
  store double %140, ptr %139, align 8
  %141 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %142 = load double, ptr %141, align 16
  %143 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %144 = load double, ptr %143, align 8
  %145 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %18, double %142, double %144)
  %146 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %147 = getelementptr inbounds %union.anon, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds { double, double }, ptr %147, i32 0, i32 0
  %149 = extractvalue { double, double } %145, 0
  store double %149, ptr %148, align 16
  %150 = getelementptr inbounds { double, double }, ptr %147, i32 0, i32 1
  %151 = extractvalue { double, double } %145, 1
  store double %151, ptr %150, align 8
  %152 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %153 = load double, ptr %152, align 16
  %154 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %155 = load double, ptr %154, align 8
  %156 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef 5.000000e-01, double %153, double %155)
  %157 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %158 = getelementptr inbounds %union.anon, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds { double, double }, ptr %158, i32 0, i32 0
  %160 = extractvalue { double, double } %156, 0
  store double %160, ptr %159, align 16
  %161 = getelementptr inbounds { double, double }, ptr %158, i32 0, i32 1
  %162 = extractvalue { double, double } %156, 1
  store double %162, ptr %161, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #8
  call void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %26, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %163, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %164, ptr align 4 %26, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #8
  %165 = load ptr, ptr %11, align 8, !tbaa !5
  %166 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %165, i32 0, i32 1
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %16, ptr noundef %166)
  %167 = load ptr, ptr %11, align 8, !tbaa !5
  %168 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %167, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %168, ptr align 4 @_ZN3JPH5Color6sWhiteE, i64 4, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  call void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %27, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %169, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %170, ptr align 4 %27, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  %171 = load ptr, ptr %13, align 8, !tbaa !5
  %172 = load ptr, ptr %12, align 8, !tbaa !5
  %173 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %172, i32 0, i32 0
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %171, ptr noundef %173)
  %174 = load ptr, ptr %12, align 8, !tbaa !5
  %175 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %174, i32 0, i32 1
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %16, ptr noundef %175)
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %176, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %177, ptr align 4 @_ZN3JPH5Color6sWhiteE, i64 4, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  call void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %28, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %178 = load ptr, ptr %12, align 8, !tbaa !5
  %179 = getelementptr inbounds %"class.JPH::DebugRenderer::Vertex", ptr %178, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %179, ptr align 4 %28, i64 8, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %180

180:                                              ; preds = %54
  %181 = load i32, ptr %10, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %10, align 4, !tbaa !9
  br label %49, !llvm.loop !18

183:                                              ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  %184 = load i32, ptr %5, align 4, !tbaa !9
  %185 = mul nsw i32 3, %184
  store i32 %185, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %186 = load i32, ptr %29, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = mul i64 %187, 4
  %189 = alloca i8, i64 %188, align 16
  store ptr %189, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %190 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %190, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %191

191:                                              ; preds = %214, %183
  %192 = load i32, ptr %32, align 4, !tbaa !9
  %193 = load i32, ptr %5, align 4, !tbaa !9
  %194 = icmp slt i32 %192, %193
  br i1 %194, label %196, label %195

195:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %217

196:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #8
  %197 = load i32, ptr %32, align 4, !tbaa !9
  %198 = mul nsw i32 2, %197
  store i32 %198, ptr %33, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %199 = load i32, ptr %33, align 4, !tbaa !9
  %200 = add nsw i32 %199, 3
  %201 = load i32, ptr %7, align 4, !tbaa !9
  %202 = srem i32 %200, %201
  store i32 %202, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %203 = load i32, ptr %33, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %35, align 4, !tbaa !9
  %205 = load i32, ptr %33, align 4, !tbaa !9
  %206 = load ptr, ptr %31, align 8, !tbaa !5
  %207 = getelementptr inbounds i32, ptr %206, i32 1
  store ptr %207, ptr %31, align 8, !tbaa !5
  store i32 %205, ptr %206, align 4, !tbaa !9
  %208 = load i32, ptr %34, align 4, !tbaa !9
  %209 = load ptr, ptr %31, align 8, !tbaa !5
  %210 = getelementptr inbounds i32, ptr %209, i32 1
  store ptr %210, ptr %31, align 8, !tbaa !5
  store i32 %208, ptr %209, align 4, !tbaa !9
  %211 = load i32, ptr %35, align 4, !tbaa !9
  %212 = load ptr, ptr %31, align 8, !tbaa !5
  %213 = getelementptr inbounds i32, ptr %212, i32 1
  store ptr %213, ptr %31, align 8, !tbaa !5
  store i32 %211, ptr %212, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #8
  br label %214

214:                                              ; preds = %196
  %215 = load i32, ptr %32, align 4, !tbaa !9
  %216 = add nsw i32 %215, 1
  store i32 %216, ptr %32, align 4, !tbaa !9
  br label %191, !llvm.loop !20

217:                                              ; preds = %195
  %218 = call noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef 64)
  store i1 true, ptr %40, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #8
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = load i32, ptr %7, align 4, !tbaa !9
  %221 = load ptr, ptr %30, align 8, !tbaa !5
  %222 = load i32, ptr %29, align 4, !tbaa !9
  %223 = load ptr, ptr %41, align 8, !tbaa !21
  %224 = getelementptr inbounds ptr, ptr %223, i64 5
  %225 = load ptr, ptr %224, align 8
  invoke void %225(ptr dead_on_unwind writable sret(%"class.JPH::Ref.17") align 8 %36, ptr noundef nonnull align 8 dereferenceable(320) %41, ptr noundef %219, i32 noundef %220, ptr noundef %221, i32 noundef %222)
          to label %226 unwind label %231

226:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 32, ptr %39) #8
  %227 = load ptr, ptr %8, align 8, !tbaa !5
  %228 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN3JPH13DebugRenderer16sCalculateBoundsEPKNS0_6VertexEi(ptr dead_on_unwind writable sret(%"class.JPH::AABox") align 16 %39, ptr noundef %227, i32 noundef %228)
          to label %229 unwind label %235

229:                                              ; preds = %226
  invoke void @_ZN3JPH13DebugRenderer8GeometryC2ERKNS_3RefINS_16RefTargetVirtualEEERKNS_5AABoxE(ptr noundef nonnull align 16 dereferenceable(64) %218, ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 16 dereferenceable(32) %39)
          to label %230 unwind label %235

230:                                              ; preds = %229
  store i1 false, ptr %40, align 1
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #8
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  ret ptr %218

231:                                              ; preds = %217
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %37, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %38, align 4
  br label %239

235:                                              ; preds = %229, %226
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %37, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %38, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #8
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #8
  br label %239

239:                                              ; preds = %235, %231
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #8
  %240 = load i1, ptr %40, align 1
  br i1 %240, label %241, label %242

241:                                              ; preds = %239
  call void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef %218) #8
  br label %242

242:                                              ; preds = %241, %239
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %243

243:                                              ; preds = %242
  %244 = load ptr, ptr %37, align 8
  %245 = load i32, ptr %38, align 4
  %246 = insertvalue { ptr, i32 } poison, ptr %244, 0
  %247 = insertvalue { ptr, i32 } %246, i32 %245, 1
  resume { ptr, i32 } %247
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = !{i64 0, i64 4, !14, i64 4, i64 4, !14, i64 8, i64 4, !14}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{i64 0, i64 4, !12}
!17 = !{i64 0, i64 4, !14, i64 4, i64 4, !14}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, 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::Color" = type { %union.anon.0 }
%union.anon.0 = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Float2" = type { float, float }
%"class.JPH::Ref.17" = type { ptr }

@_ZN3JPH5Color6sWhiteE = external local_unnamed_addr global %"class.JPH::Color", align 4

; 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: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef) local_unnamed_addr #1 align 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) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13DebugRenderer8GeometryC2ERKNS_3RefINS_16RefTargetVirtualEEERKNS_5AABoxE(ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(32)) unnamed_addr #5 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH13DebugRenderer16sCalculateBoundsEPKNS0_6VertexEi(ptr dead_on_unwind noalias writable sret(%"class.JPH::AABox") align 16, ptr noundef, i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN3JPH13DebugRenderer24CreateSwingLimitGeometryEiPKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(320) %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.JPH::Vec3", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Float3", align 4
  %9 = alloca %"class.JPH::Float2", align 8
  %10 = alloca %"class.JPH::Float2", align 8
  %11 = alloca %"class.JPH::Ref.17", align 8
  %12 = alloca %"class.JPH::AABox", align 16
  %13 = shl nsw i32 %1, 1
  %14 = sext i32 %13 to i64
  %15 = mul nsw i64 %14, 36
  %16 = alloca i8, i64 %15, align 16
  %17 = icmp sgt i32 %1, 0
  br i1 %17, label %.lr.ph, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %3
  %18 = mul nsw i32 %1, 3
  %19 = sext i32 %18 to i64
  %20 = shl nsw i64 %19, 2
  %21 = alloca i8, i64 %20, align 16
  br label %._crit_edge78

.lr.ph:                                           ; preds = %3
  %22 = add nsw i32 %1, -1
  %23 = getelementptr inbounds i8, ptr %6, i64 8
  %24 = getelementptr inbounds i8, ptr %5, i64 8
  %25 = getelementptr inbounds i8, ptr %7, i64 8
  %26 = getelementptr inbounds i8, ptr %4, i64 8
  %27 = zext nneg i32 %1 to i64
  br label %33

._crit_edge:                                      ; preds = %33
  %28 = mul nuw nsw i32 %1, 3
  %29 = zext nneg i32 %28 to i64
  %30 = shl nuw nsw i64 %29, 2
  %31 = alloca i8, i64 %30, align 16
  br i1 %17, label %.lr.ph77.preheader, label %._crit_edge78

.lr.ph77.preheader:                               ; preds = %._crit_edge
  %xtraiter = and i32 %1, 1
  %32 = icmp eq i32 %1, 1
  br i1 %32, label %._crit_edge78.loopexit.unr-lcssa, label %.lr.ph77.preheader.new

.lr.ph77.preheader.new:                           ; preds = %.lr.ph77.preheader
  %unroll_iter = and i32 %1, 2147483646
  br label %.lr.ph77

33:                                               ; preds = %.lr.ph, %33
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %33 ]
  %.06673 = phi ptr [ %16, %.lr.ph ], [ %35, %33 ]
  %34 = getelementptr inbounds i8, ptr %.06673, i64 36
  %35 = getelementptr inbounds i8, ptr %.06673, i64 72
  %36 = getelementptr inbounds %"class.JPH::Vec3", ptr %2, i64 %indvars.iv
  %37 = trunc nuw nsw i64 %indvars.iv to i32
  %38 = add i32 %22, %37
  %39 = srem i32 %38, %1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds %"class.JPH::Vec3", ptr %2, i64 %40
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %42 = icmp eq i64 %indvars.iv.next, %27
  %43 = and i64 %indvars.iv.next, 4294967295
  %44 = select i1 %42, i64 0, i64 %43
  %45 = getelementptr inbounds %"class.JPH::Vec3", ptr %2, i64 %44
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  %.sroa.023.0.copyload = load double, ptr %36, align 16
  %.sroa.224.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 8
  %.sroa.224.0.copyload = load double, ptr %.sroa.224.0..sroa_idx, align 8, !tbaa !5
  %46 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %45, double %.sroa.023.0.copyload, double %.sroa.224.0.copyload)
  %47 = extractvalue { double, double } %46, 0
  store double %47, ptr %6, align 16
  %48 = extractvalue { double, double } %46, 1
  store double %48, ptr %23, align 8
  %49 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %50 = extractvalue { double, double } %49, 0
  %51 = extractvalue { double, double } %49, 1
  %52 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %6, double %50, double %51)
  %53 = extractvalue { double, double } %52, 0
  store double %53, ptr %5, align 16
  %54 = extractvalue { double, double } %52, 1
  store double %54, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %.sroa.017.0.copyload = load double, ptr %41, align 16
  %.sroa.218.0..sroa_idx = getelementptr inbounds i8, ptr %41, i64 8
  %.sroa.218.0.copyload = load double, ptr %.sroa.218.0..sroa_idx, align 8, !tbaa !5
  %55 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %36, double %.sroa.017.0.copyload, double %.sroa.218.0.copyload)
  %56 = extractvalue { double, double } %55, 0
  store double %56, ptr %7, align 16
  %57 = extractvalue { double, double } %55, 1
  store double %57, ptr %25, align 8
  %58 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %59 = extractvalue { double, double } %58, 0
  %60 = extractvalue { double, double } %58, 1
  %61 = call { double, double } @_ZNK3JPH4Vec312NormalizedOrES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %59, double %60)
  %62 = extractvalue { double, double } %61, 0
  %63 = extractvalue { double, double } %61, 1
  %64 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %62, double %63)
  %65 = extractvalue { double, double } %64, 0
  %66 = extractvalue { double, double } %64, 1
  %67 = call { double, double } @_ZN3JPHmlEfNS_4Vec3E(float noundef 5.000000e-01, double %65, double %66)
  %68 = extractvalue { double, double } %67, 0
  store double %68, ptr %4, align 16
  %69 = extractvalue { double, double } %67, 1
  store double %69, ptr %26, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #8
  call void @_ZN3JPH6Float3C2Efff(ptr noundef nonnull align 4 dereferenceable(12) %8, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %.06673, ptr noundef nonnull align 4 dereferenceable(12) %8, i64 12, i1 false), !tbaa.struct !8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #8
  %70 = getelementptr inbounds i8, ptr %.06673, i64 12
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull %70)
  %71 = getelementptr inbounds i8, ptr %.06673, i64 32
  %72 = load i32, ptr @_ZN3JPH5Color6sWhiteE, align 4, !tbaa !5
  store i32 %72, ptr %71, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %73 = getelementptr inbounds i8, ptr %.06673, i64 24
  %74 = load i64, ptr %9, align 8
  store i64 %74, ptr %73, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %36, ptr noundef nonnull %34)
  %75 = getelementptr inbounds i8, ptr %.06673, i64 48
  call void @_ZNK3JPH4Vec311StoreFloat3EPNS_6Float3E(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull %75)
  %76 = getelementptr inbounds i8, ptr %.06673, i64 68
  %77 = load i32, ptr @_ZN3JPH5Color6sWhiteE, align 4, !tbaa !5
  store i32 %77, ptr %76, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN3JPH6Float2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %78 = getelementptr inbounds i8, ptr %.06673, i64 60
  %79 = load i64, ptr %10, align 8
  store i64 %79, ptr %78, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #8
  %exitcond.not = icmp eq i64 %indvars.iv.next, %27
  br i1 %exitcond.not, label %._crit_edge, label %33, !llvm.loop !11

._crit_edge78.loopexit.unr-lcssa.loopexit:        ; preds = %.lr.ph77
  %80 = shl nuw nsw i32 %107, 1
  br label %._crit_edge78.loopexit.unr-lcssa

._crit_edge78.loopexit.unr-lcssa:                 ; preds = %._crit_edge78.loopexit.unr-lcssa.loopexit, %.lr.ph77.preheader
  %.06875.unr = phi ptr [ %31, %.lr.ph77.preheader ], [ %106, %._crit_edge78.loopexit.unr-lcssa.loopexit ]
  %.06974.unr = phi i32 [ 0, %.lr.ph77.preheader ], [ %80, %._crit_edge78.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge78, label %.lr.ph77.epil

.lr.ph77.epil:                                    ; preds = %._crit_edge78.loopexit.unr-lcssa
  %81 = add nuw nsw i32 %.06974.unr, 3
  %82 = urem i32 %81, %13
  %83 = or disjoint i32 %.06974.unr, 1
  %84 = getelementptr inbounds i8, ptr %.06875.unr, i64 4
  store i32 %.06974.unr, ptr %.06875.unr, align 4, !tbaa !13
  %85 = getelementptr inbounds i8, ptr %.06875.unr, i64 8
  store i32 %82, ptr %84, align 4, !tbaa !13
  store i32 %83, ptr %85, align 4, !tbaa !13
  br label %._crit_edge78

._crit_edge78:                                    ; preds = %.lr.ph77.epil, %._crit_edge78.loopexit.unr-lcssa, %._crit_edge.thread, %._crit_edge
  %86 = phi ptr [ %21, %._crit_edge.thread ], [ %31, %._crit_edge ], [ %31, %._crit_edge78.loopexit.unr-lcssa ], [ %31, %.lr.ph77.epil ]
  %87 = phi i32 [ %18, %._crit_edge.thread ], [ %28, %._crit_edge ], [ %28, %._crit_edge78.loopexit.unr-lcssa ], [ %28, %.lr.ph77.epil ]
  %88 = call noundef ptr @_ZN3JPH13DebugRenderer8GeometrynwEm(i64 noundef 64)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %89 = load ptr, ptr %0, align 8, !tbaa !15
  %90 = getelementptr inbounds i8, ptr %89, i64 40
  %91 = load ptr, ptr %90, align 8
  invoke void %91(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Ref.17") align 8 %11, ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull %16, i32 noundef %13, ptr noundef nonnull %86, i32 noundef %87)
          to label %108 unwind label %111

.lr.ph77:                                         ; preds = %.lr.ph77, %.lr.ph77.preheader.new
  %.06875 = phi ptr [ %31, %.lr.ph77.preheader.new ], [ %106, %.lr.ph77 ]
  %.06974 = phi i32 [ 0, %.lr.ph77.preheader.new ], [ %107, %.lr.ph77 ]
  %niter = phi i32 [ 0, %.lr.ph77.preheader.new ], [ %niter.next.1, %.lr.ph77 ]
  %92 = shl nuw nsw i32 %.06974, 1
  %93 = or disjoint i32 %92, 3
  %94 = urem i32 %93, %13
  %95 = or disjoint i32 %92, 1
  %96 = getelementptr inbounds i8, ptr %.06875, i64 4
  store i32 %92, ptr %.06875, align 4, !tbaa !13
  %97 = getelementptr inbounds i8, ptr %.06875, i64 8
  store i32 %94, ptr %96, align 4, !tbaa !13
  %98 = getelementptr inbounds i8, ptr %.06875, i64 12
  store i32 %95, ptr %97, align 4, !tbaa !13
  %99 = shl nuw i32 %.06974, 1
  %100 = or disjoint i32 %99, 2
  %101 = add nuw nsw i32 %99, 5
  %102 = urem i32 %101, %13
  %103 = or disjoint i32 %99, 3
  %104 = getelementptr inbounds i8, ptr %.06875, i64 16
  store i32 %100, ptr %98, align 4, !tbaa !13
  %105 = getelementptr inbounds i8, ptr %.06875, i64 20
  store i32 %102, ptr %104, align 4, !tbaa !13
  %106 = getelementptr inbounds i8, ptr %.06875, i64 24
  store i32 %103, ptr %105, align 4, !tbaa !13
  %107 = add nuw nsw i32 %.06974, 2
  %niter.next.1 = add i32 %niter, 2
  %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge78.loopexit.unr-lcssa.loopexit, label %.lr.ph77, !llvm.loop !17

108:                                              ; preds = %._crit_edge78
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #8
  invoke void @_ZN3JPH13DebugRenderer16sCalculateBoundsEPKNS0_6VertexEi(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %12, ptr noundef nonnull %16, i32 noundef %13)
          to label %109 unwind label %113

109:                                              ; preds = %108
  invoke void @_ZN3JPH13DebugRenderer8GeometryC2ERKNS_3RefINS_16RefTargetVirtualEEERKNS_5AABoxE(ptr noundef nonnull align 16 dereferenceable(64) %88, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 16 dereferenceable(32) %12)
          to label %110 unwind label %113

110:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  ret ptr %88

111:                                              ; preds = %._crit_edge78
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %115

113:                                              ; preds = %109, %108
  %114 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #8
  call void @_ZN3JPH3RefINS_16RefTargetVirtualEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  br label %115

115:                                              ; preds = %113, %111
  %.pn = phi { ptr, i32 } [ %114, %113 ], [ %112, %111 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @_ZN3JPH13DebugRenderer8GeometrydlEPv(ptr noundef %88) #8
  resume { ptr, i32 } %.pn
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !6, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !6, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !7, i64 0}
!17 = distinct !{!17, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass