; 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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

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

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

; Function Attrs: 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) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, i32 %2, double %3, double %4, double %5, double %6, double %7, double %8, i32 noundef %9) #4 align 2 {
  %11 = alloca %"class.JPH::Color", align 4
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %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::Color", align 4
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Color", align 4
  %30 = alloca %"class.JPH::Vec3", align 16
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Color", align 4
  %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 %"class.JPH::Vec3", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca %"class.JPH::Color", align 4
  %43 = alloca %"class.JPH::Vec3", align 16
  %44 = alloca %"class.JPH::Vec3", align 16
  %45 = alloca %"class.JPH::Vec3", align 16
  %46 = alloca %"class.JPH::Color", align 4
  %47 = alloca %"class.JPH::Vec3", align 16
  %48 = alloca %"class.JPH::Vec3", align 16
  %49 = alloca %"class.JPH::Vec3", align 16
  %50 = alloca %"class.JPH::Color", align 4
  %51 = alloca %"class.JPH::Vec3", align 16
  %52 = alloca %"class.JPH::Vec3", align 16
  %53 = alloca %"class.JPH::Vec3", align 16
  %54 = alloca %"class.JPH::Color", align 4
  %55 = alloca %"class.JPH::Vec3", align 16
  %56 = alloca %"class.JPH::Vec3", align 16
  %57 = alloca %"class.JPH::Vec3", align 16
  %58 = getelementptr inbounds %"class.JPH::Color", ptr %11, i32 0, i32 0
  %59 = getelementptr inbounds %union.anon.0, ptr %58, i32 0, i32 0
  store i32 %2, ptr %59, align 4
  %60 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  store double %3, ptr %60, align 16
  %61 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %4, ptr %61, align 8
  %62 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  store double %5, ptr %62, align 16
  %63 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  store double %6, ptr %63, align 8
  %64 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  store double %7, ptr %64, align 16
  %65 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  store double %8, ptr %65, align 8
  store ptr %0, ptr %15, align 8, !tbaa !5
  store ptr %1, ptr %16, align 8, !tbaa !5
  store i32 %9, ptr %17, align 4, !tbaa !9
  %66 = load ptr, ptr %15, align 8
  %67 = load i32, ptr %17, align 4, !tbaa !9
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %69, label %148

69:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #5
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !11
  %71 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %72 = load double, ptr %71, align 16
  %73 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %74 = load double, ptr %73, align 8
  %75 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %70, double %72, double %74)
  %76 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %77 = getelementptr inbounds %union.anon, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 0
  %79 = extractvalue { double, double } %75, 0
  store double %79, ptr %78, align 16
  %80 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 1
  %81 = extractvalue { double, double } %75, 1
  store double %81, ptr %80, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %13, i64 16, i1 false), !tbaa.struct !11
  %83 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  %87 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %82, double %84, double %86)
  %88 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %89 = getelementptr inbounds %union.anon, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 0
  %91 = extractvalue { double, double } %87, 0
  store double %91, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 1
  %93 = extractvalue { double, double } %87, 1
  store double %93, ptr %92, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %94 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !11
  %95 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %96 = load double, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %98 = load double, ptr %97, align 8
  %99 = call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %94, double %96, double %98)
  %100 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %101 = getelementptr inbounds %union.anon, ptr %100, i32 0, i32 0
  %102 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 0
  %103 = extractvalue { double, double } %99, 0
  store double %103, ptr %102, align 16
  %104 = getelementptr inbounds { double, double }, ptr %101, i32 0, i32 1
  %105 = extractvalue { double, double } %99, 1
  store double %105, ptr %104, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %24, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  %106 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %107 = load double, ptr %106, align 16
  %108 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %109 = load double, ptr %108, align 8
  %110 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %111 = load double, ptr %110, align 16
  %112 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %113 = load double, ptr %112, align 8
  %114 = getelementptr inbounds %"class.JPH::Color", ptr %26, i32 0, i32 0
  %115 = getelementptr inbounds %union.anon.0, ptr %114, i32 0, i32 0
  %116 = load i32, ptr %115, align 4
  %117 = load ptr, ptr %66, align 8, !tbaa !14
  %118 = getelementptr inbounds ptr, ptr %117, i64 2
  %119 = load ptr, ptr %118, align 8
  call void %119(ptr noundef nonnull align 8 dereferenceable(320) %66, double %107, double %109, double %111, double %113, i32 %116)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  %120 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %121 = load double, ptr %120, align 16
  %122 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %123 = load double, ptr %122, align 8
  %124 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %125 = load double, ptr %124, align 16
  %126 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %127 = load double, ptr %126, align 8
  %128 = getelementptr inbounds %"class.JPH::Color", ptr %29, i32 0, i32 0
  %129 = getelementptr inbounds %union.anon.0, ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 4
  %131 = load ptr, ptr %66, align 8, !tbaa !14
  %132 = getelementptr inbounds ptr, ptr %131, i64 2
  %133 = load ptr, ptr %132, align 8
  call void %133(ptr noundef nonnull align 8 dereferenceable(320) %66, double %121, double %123, double %125, double %127, i32 %130)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %22, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  %134 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %135 = load double, ptr %134, align 16
  %136 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %137 = load double, ptr %136, align 8
  %138 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %139 = load double, ptr %138, align 16
  %140 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %141 = load double, ptr %140, align 8
  %142 = getelementptr inbounds %"class.JPH::Color", ptr %32, i32 0, i32 0
  %143 = getelementptr inbounds %union.anon.0, ptr %142, i32 0, i32 0
  %144 = load i32, ptr %143, align 4
  %145 = load ptr, ptr %66, align 8, !tbaa !14
  %146 = getelementptr inbounds ptr, ptr %145, i64 2
  %147 = load ptr, ptr %146, align 8
  call void %147(ptr noundef nonnull align 8 dereferenceable(320) %66, double %135, double %137, double %139, double %141, i32 %144)
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #5
  br label %275

148:                                              ; preds = %10
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %13, i64 16, i1 false), !tbaa.struct !11
  %149 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %150 = load double, ptr %149, align 16
  %151 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %152 = load double, ptr %151, align 8
  %153 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %150, double %152)
  %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 } %153, 0
  store double %157, ptr %156, align 16
  %158 = getelementptr inbounds { double, double }, ptr %155, i32 0, i32 1
  %159 = extractvalue { double, double } %153, 1
  store double %159, ptr %158, align 8
  %160 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %34)
  %161 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %162 = getelementptr inbounds %union.anon, ptr %161, i32 0, i32 0
  %163 = getelementptr inbounds { double, double }, ptr %162, i32 0, i32 0
  %164 = extractvalue { double, double } %160, 0
  store double %164, ptr %163, align 16
  %165 = getelementptr inbounds { double, double }, ptr %162, i32 0, i32 1
  %166 = extractvalue { double, double } %160, 1
  store double %166, ptr %165, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %37) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %38, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !11
  %167 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 0
  %168 = load double, ptr %167, align 16
  %169 = getelementptr inbounds { double, double }, ptr %38, i32 0, i32 1
  %170 = load double, ptr %169, align 8
  %171 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %168, double %170)
  %172 = getelementptr inbounds %"class.JPH::Vec3", ptr %37, i32 0, i32 0
  %173 = getelementptr inbounds %union.anon, ptr %172, i32 0, i32 0
  %174 = getelementptr inbounds { double, double }, ptr %173, i32 0, i32 0
  %175 = extractvalue { double, double } %171, 0
  store double %175, ptr %174, align 16
  %176 = getelementptr inbounds { double, double }, ptr %173, i32 0, i32 1
  %177 = extractvalue { double, double } %171, 1
  store double %177, ptr %176, align 8
  %178 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %37)
  %179 = getelementptr inbounds %"class.JPH::Vec3", ptr %36, i32 0, i32 0
  %180 = getelementptr inbounds %union.anon, ptr %179, i32 0, i32 0
  %181 = getelementptr inbounds { double, double }, ptr %180, i32 0, i32 0
  %182 = extractvalue { double, double } %178, 0
  store double %182, ptr %181, align 16
  %183 = getelementptr inbounds { double, double }, ptr %180, i32 0, i32 1
  %184 = extractvalue { double, double } %178, 1
  store double %184, ptr %183, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %37) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !11
  %185 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %186 = load double, ptr %185, align 16
  %187 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %188 = load double, ptr %187, align 8
  %189 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %186, double %188)
  %190 = getelementptr inbounds %"class.JPH::Vec3", ptr %40, i32 0, i32 0
  %191 = getelementptr inbounds %union.anon, ptr %190, i32 0, i32 0
  %192 = getelementptr inbounds { double, double }, ptr %191, i32 0, i32 0
  %193 = extractvalue { double, double } %189, 0
  store double %193, ptr %192, align 16
  %194 = getelementptr inbounds { double, double }, ptr %191, i32 0, i32 1
  %195 = extractvalue { double, double } %189, 1
  store double %195, ptr %194, align 8
  %196 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %40)
  %197 = getelementptr inbounds %"class.JPH::Vec3", ptr %39, i32 0, i32 0
  %198 = getelementptr inbounds %union.anon, ptr %197, i32 0, i32 0
  %199 = getelementptr inbounds { double, double }, ptr %198, i32 0, i32 0
  %200 = extractvalue { double, double } %196, 0
  store double %200, ptr %199, align 16
  %201 = getelementptr inbounds { double, double }, ptr %198, i32 0, i32 1
  %202 = extractvalue { double, double } %196, 1
  store double %202, ptr %201, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #5
  %203 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %42, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %43, ptr align 16 %12, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %44, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %45, ptr align 16 %39, i64 16, i1 false), !tbaa.struct !11
  %204 = load i32, ptr %17, align 4, !tbaa !9
  %205 = sub nsw i32 %204, 1
  %206 = getelementptr inbounds %"class.JPH::Color", ptr %42, i32 0, i32 0
  %207 = getelementptr inbounds %union.anon.0, ptr %206, i32 0, i32 0
  %208 = load i32, ptr %207, align 4
  %209 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 0
  %210 = load double, ptr %209, align 16
  %211 = getelementptr inbounds { double, double }, ptr %43, i32 0, i32 1
  %212 = load double, ptr %211, align 8
  %213 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 0
  %214 = load double, ptr %213, align 16
  %215 = getelementptr inbounds { double, double }, ptr %44, i32 0, i32 1
  %216 = load double, ptr %215, align 8
  %217 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %218 = load double, ptr %217, align 16
  %219 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %220 = load double, ptr %219, align 8
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %66, ptr noundef nonnull align 16 dereferenceable(64) %203, i32 %208, double %210, double %212, double %214, double %216, double %218, double %220, i32 noundef %205)
  %221 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %47, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %48, ptr align 16 %36, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %49, ptr align 16 %39, i64 16, i1 false), !tbaa.struct !11
  %222 = load i32, ptr %17, align 4, !tbaa !9
  %223 = sub nsw i32 %222, 1
  %224 = getelementptr inbounds %"class.JPH::Color", ptr %46, i32 0, i32 0
  %225 = getelementptr inbounds %union.anon.0, ptr %224, i32 0, i32 0
  %226 = load i32, ptr %225, align 4
  %227 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %228 = load double, ptr %227, align 16
  %229 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %230 = load double, ptr %229, align 8
  %231 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 0
  %232 = load double, ptr %231, align 16
  %233 = getelementptr inbounds { double, double }, ptr %48, i32 0, i32 1
  %234 = load double, ptr %233, align 8
  %235 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 0
  %236 = load double, ptr %235, align 16
  %237 = getelementptr inbounds { double, double }, ptr %49, i32 0, i32 1
  %238 = load double, ptr %237, align 8
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %66, ptr noundef nonnull align 16 dereferenceable(64) %221, i32 %226, double %228, double %230, double %232, double %234, double %236, double %238, i32 noundef %223)
  %239 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %50, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %51, ptr align 16 %33, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 16 %13, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %53, ptr align 16 %36, i64 16, i1 false), !tbaa.struct !11
  %240 = load i32, ptr %17, align 4, !tbaa !9
  %241 = sub nsw i32 %240, 1
  %242 = getelementptr inbounds %"class.JPH::Color", ptr %50, i32 0, i32 0
  %243 = getelementptr inbounds %union.anon.0, ptr %242, i32 0, i32 0
  %244 = load i32, ptr %243, align 4
  %245 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 0
  %246 = load double, ptr %245, align 16
  %247 = getelementptr inbounds { double, double }, ptr %51, i32 0, i32 1
  %248 = load double, ptr %247, align 8
  %249 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 0
  %250 = load double, ptr %249, align 16
  %251 = getelementptr inbounds { double, double }, ptr %52, i32 0, i32 1
  %252 = load double, ptr %251, align 8
  %253 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 0
  %254 = load double, ptr %253, align 16
  %255 = getelementptr inbounds { double, double }, ptr %53, i32 0, i32 1
  %256 = load double, ptr %255, align 8
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %66, ptr noundef nonnull align 16 dereferenceable(64) %239, i32 %244, double %246, double %248, double %250, double %252, double %254, double %256, i32 noundef %241)
  %257 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %55, ptr align 16 %39, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %56, ptr align 16 %36, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %57, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !11
  %258 = load i32, ptr %17, align 4, !tbaa !9
  %259 = sub nsw i32 %258, 1
  %260 = getelementptr inbounds %"class.JPH::Color", ptr %54, i32 0, i32 0
  %261 = getelementptr inbounds %union.anon.0, ptr %260, i32 0, i32 0
  %262 = load i32, ptr %261, align 4
  %263 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 0
  %264 = load double, ptr %263, align 16
  %265 = getelementptr inbounds { double, double }, ptr %55, i32 0, i32 1
  %266 = load double, ptr %265, align 8
  %267 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 0
  %268 = load double, ptr %267, align 16
  %269 = getelementptr inbounds { double, double }, ptr %56, i32 0, i32 1
  %270 = load double, ptr %269, align 8
  %271 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %272 = load double, ptr %271, align 16
  %273 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %274 = load double, ptr %273, align 8
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %66, ptr noundef nonnull align 16 dereferenceable(64) %257, i32 %262, double %264, double %266, double %268, double %270, double %272, double %274, i32 noundef %259)
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #5
  br label %275

275:                                              ; preds = %148, %69
  ret void
}

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

!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, !12}
!14 = !{!15, !15, i64 0}
!15 = !{!"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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) local_unnamed_addr #2 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 #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, i32 %2, double %3, double %4, double %5, double %6, double %7, double %8, i32 noundef %9) local_unnamed_addr #3 align 2 {
  %11 = alloca %"class.JPH::Vec3", align 16
  %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::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  store double %3, ptr %11, align 16
  %17 = getelementptr inbounds i8, ptr %11, i64 8
  store double %4, ptr %17, align 8
  store double %5, ptr %12, align 16
  %18 = getelementptr inbounds i8, ptr %12, i64 8
  store double %6, ptr %18, align 8
  store double %7, ptr %13, align 16
  %19 = getelementptr inbounds i8, ptr %13, i64 8
  store double %8, ptr %19, align 8
  %20 = icmp eq i32 %9, 0
  br i1 %20, label %21, label %40

21:                                               ; preds = %10
  %22 = tail call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %1, double %3, double %4)
  %23 = extractvalue { double, double } %22, 0
  %24 = extractvalue { double, double } %22, 1
  %25 = tail call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %1, double %5, double %6)
  %26 = extractvalue { double, double } %25, 0
  %27 = extractvalue { double, double } %25, 1
  %28 = tail call { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %1, double %7, double %8)
  %29 = extractvalue { double, double } %28, 0
  %30 = extractvalue { double, double } %28, 1
  %31 = load ptr, ptr %0, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  %33 = load ptr, ptr %32, align 8
  tail call void %33(ptr noundef nonnull align 8 dereferenceable(320) %0, double %23, double %24, double %26, double %27, i32 %2)
  %34 = load ptr, ptr %0, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load ptr, ptr %35, align 8
  tail call void %36(ptr noundef nonnull align 8 dereferenceable(320) %0, double %26, double %27, double %29, double %30, i32 %2)
  %37 = load ptr, ptr %0, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = load ptr, ptr %38, align 8
  tail call void %39(ptr noundef nonnull align 8 dereferenceable(320) %0, double %29, double %30, double %23, double %24, i32 %2)
  br label %63

40:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #4
  %41 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %5, double %6)
  %42 = extractvalue { double, double } %41, 0
  store double %42, ptr %14, align 16
  %43 = getelementptr inbounds i8, ptr %14, i64 8
  %44 = extractvalue { double, double } %41, 1
  store double %44, ptr %43, align 8
  %45 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %14)
  %46 = extractvalue { double, double } %45, 0
  %47 = extractvalue { double, double } %45, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #4
  %48 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %7, double %8)
  %49 = extractvalue { double, double } %48, 0
  store double %49, ptr %15, align 16
  %50 = getelementptr inbounds i8, ptr %15, i64 8
  %51 = extractvalue { double, double } %48, 1
  store double %51, ptr %50, align 8
  %52 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %15)
  %53 = extractvalue { double, double } %52, 0
  %54 = extractvalue { double, double } %52, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #4
  %.sroa.027.0.copyload = load double, ptr %11, align 16
  %.sroa.228.0.copyload = load double, ptr %17, align 8, !tbaa !8
  %55 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %.sroa.027.0.copyload, double %.sroa.228.0.copyload)
  %56 = extractvalue { double, double } %55, 0
  store double %56, ptr %16, align 16
  %57 = getelementptr inbounds i8, ptr %16, i64 8
  %58 = extractvalue { double, double } %55, 1
  store double %58, ptr %57, align 8
  %59 = call { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %16)
  %60 = extractvalue { double, double } %59, 0
  %61 = extractvalue { double, double } %59, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #4
  %.sroa.024.0.copyload = load double, ptr %11, align 16
  %.sroa.225.0.copyload = load double, ptr %17, align 8, !tbaa !8
  %62 = add nsw i32 %9, -1
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, i32 %2, double %.sroa.024.0.copyload, double %.sroa.225.0.copyload, double %46, double %47, double %60, double %61, i32 noundef %62)
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, i32 %2, double %46, double %47, double %53, double %54, double %60, double %61, i32 noundef %62)
  %.sroa.08.0.copyload = load double, ptr %12, align 16
  %.sroa.29.0.copyload = load double, ptr %18, align 8, !tbaa !8
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, i32 %2, double %46, double %47, double %.sroa.08.0.copyload, double %.sroa.29.0.copyload, double %53, double %54, i32 noundef %62)
  %.sroa.0.0.copyload = load double, ptr %13, align 16
  %.sroa.2.0.copyload = load double, ptr %19, align 8, !tbaa !8
  call void @_ZN3JPH13DebugRenderer27DrawWireUnitSphereRecursiveERKNS_5Mat44ENS_5ColorENS_4Vec3ES5_S5_i(ptr noundef nonnull align 8 dereferenceable(320) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, i32 %2, double %60, double %61, double %53, double %54, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, i32 noundef %62)
  br label %63

63:                                               ; preds = %40, %21
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass