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

; 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.14 }
%union.anon.14 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.6 }
%union.anon.6 = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::CompoundShape" = type <{ %"class.JPH::Shape.base", [6 x i8], %"class.JPH::Vec3", %"class.JPH::AABox", %"class.JPH::Array.7", float, [4 x i8] }>
%"class.JPH::Shape.base" = type <{ ptr, %"class.JPH::RefTarget.5", [4 x i8], i64, i8, i8 }>
%"class.JPH::RefTarget.5" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Array.7" = type { i64, i64, ptr }
%"struct.JPH::CompoundShape::SubShape" = type <{ %"class.JPH::RefConst.13", %"class.JPH::Float3", %"class.JPH::Float3", i32, i8, [3 x i8] }>
%"class.JPH::RefConst.13" = type { ptr }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::MutableCompoundShape" = type { %"class.JPH::CompoundShape.base", %"class.JPH::Array.10", [8 x i8] }
%"class.JPH::CompoundShape.base" = type <{ %"class.JPH::Shape.base", [6 x i8], %"class.JPH::Vec3", %"class.JPH::AABox", %"class.JPH::Array.7", float }>
%"class.JPH::Array.10" = type { i64, i64, ptr }
%"struct.JPH::MutableCompoundShape::Bounds" = type { %"class.JPH::Vec4", %"class.JPH::Vec4", %"class.JPH::Vec4", %"class.JPH::Vec4", %"class.JPH::Vec4", %"class.JPH::Vec4" }

; 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: mustprogress uwtable
define dso_local void @_ZN3JPH20MutableCompoundShape23CalculateSubShapeBoundsEjj(ptr noundef nonnull align 16 dereferenceable(144) %0, i32 noundef %1, i32 noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.JPH::Mat44", align 16
  %11 = alloca %"class.JPH::Mat44", align 16
  %12 = alloca %"class.JPH::AABox", align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.JPH::Mat44", align 16
  %17 = alloca %"class.JPH::Quat", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::AABox", 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::Mat44", align 16
  %24 = alloca %"class.JPH::Mat44", align 16
  %25 = alloca ptr, align 8
  %26 = alloca %"class.JPH::Vec4", align 16
  %27 = alloca %"class.JPH::Vec4", align 16
  %28 = alloca %"class.JPH::Vec4", align 16
  %29 = alloca %"class.JPH::Vec4", align 16
  %30 = alloca %"class.JPH::Vec4", align 16
  %31 = alloca %"class.JPH::Vec4", align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %32 = load ptr, ptr %4, align 8
  call void @_ZN3JPH20MutableCompoundShape28EnsureSubShapeBoundsCapacityEv(ptr noundef nonnull align 16 dereferenceable(144) %32)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %33 = load i32, ptr %5, align 4, !tbaa !9
  %34 = and i32 %33, -4
  store i32 %34, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %35 = load i32, ptr %5, align 4, !tbaa !9
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = add i32 %35, %36
  store i32 %37, ptr %8, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %180, %3
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = icmp ult i32 %39, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %38
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %183

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #7
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %117, %43
  %45 = load i32, ptr %13, align 4, !tbaa !9
  %46 = icmp ult i32 %45, 4
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %120

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = load i32, ptr %13, align 4, !tbaa !9
  %51 = add i32 %49, %50
  store i32 %51, ptr %14, align 4, !tbaa !9
  %52 = load i32, ptr %14, align 4, !tbaa !9
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds %"class.JPH::CompoundShape", ptr %32, i32 0, i32 4
  %55 = call noundef i64 @_ZNK3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %54)
  %56 = icmp ult i64 %53, %55
  br i1 %56, label %57, label %104

57:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %58 = getelementptr inbounds %"class.JPH::CompoundShape", ptr %32, i32 0, i32 4
  %59 = load i32, ptr %14, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = call noundef nonnull align 8 dereferenceable(37) ptr @_ZN3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %58, i64 noundef %60)
  store ptr %61, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #7
  %62 = load ptr, ptr %15, align 8, !tbaa !5
  %63 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %62)
  %64 = getelementptr inbounds %"class.JPH::Quat", ptr %17, i32 0, i32 0
  %65 = getelementptr inbounds %"class.JPH::Vec4", ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds %union.anon.14, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 0
  %68 = extractvalue { double, double } %63, 0
  store double %68, ptr %67, align 16
  %69 = getelementptr inbounds { double, double }, ptr %66, i32 0, i32 1
  %70 = extractvalue { double, double } %63, 1
  store double %70, ptr %69, align 8
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14GetPositionCOMEv(ptr noundef nonnull align 8 dereferenceable(37) %71)
  %73 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %74 = getelementptr inbounds %union.anon.6, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 0
  %76 = extractvalue { double, double } %72, 0
  store double %76, ptr %75, align 16
  %77 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 1
  %78 = extractvalue { double, double } %72, 1
  store double %78, ptr %77, align 8
  %79 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %80 = load double, ptr %79, align 16
  %81 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %82 = load double, ptr %81, align 8
  %83 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  call void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %16, double %80, double %82, double %84, double %86)
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #7
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.JPH::CompoundShape::SubShape", ptr %87, i32 0, i32 0
  %89 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %88)
  %90 = call { double, double } @_ZN3JPH4Vec34sOneEv()
  %91 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %92 = getelementptr inbounds %union.anon.6, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds { double, double }, ptr %92, i32 0, i32 0
  %94 = extractvalue { double, double } %90, 0
  store double %94, ptr %93, align 16
  %95 = getelementptr inbounds { double, double }, ptr %92, i32 0, i32 1
  %96 = extractvalue { double, double } %90, 1
  store double %96, ptr %95, align 8
  %97 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %98 = load double, ptr %97, align 16
  %99 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %100 = load double, ptr %99, align 8
  %101 = load ptr, ptr %89, align 8, !tbaa !11
  %102 = getelementptr inbounds ptr, ptr %101, i64 6
  %103 = load ptr, ptr %102, align 8
  call void %103(ptr dead_on_unwind writable sret(%"class.JPH::AABox") align 16 %19, ptr noundef nonnull align 8 dereferenceable(26) %89, ptr noundef nonnull align 16 dereferenceable(64) %16, double %98, double %100)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 %19, i64 32, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %104

104:                                              ; preds = %57, %48
  %105 = load i32, ptr %13, align 4, !tbaa !9
  %106 = getelementptr inbounds %"class.JPH::AABox", ptr %12, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %21, ptr align 16 %106, i64 16, i1 false), !tbaa.struct !15
  %107 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %108 = load double, ptr %107, align 16
  %109 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %110 = load double, ptr %109, align 8
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %10, i32 noundef %105, double %108, double %110)
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = getelementptr inbounds %"class.JPH::AABox", ptr %12, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %22, ptr align 16 %112, i64 16, i1 false), !tbaa.struct !15
  %113 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %114 = load double, ptr %113, align 16
  %115 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %116 = load double, ptr %115, align 8
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %11, i32 noundef %111, double %114, double %116)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %117

117:                                              ; preds = %104
  %118 = load i32, ptr %13, align 4, !tbaa !9
  %119 = add i32 %118, 1
  store i32 %119, ptr %13, align 4, !tbaa !9
  br label %44, !llvm.loop !16

120:                                              ; preds = %47
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #7
  call void @_ZNK3JPH5Mat4410TransposedEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %23, ptr noundef nonnull align 16 dereferenceable(64) %10)
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #7
  call void @_ZNK3JPH5Mat4410TransposedEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %24, ptr noundef nonnull align 16 dereferenceable(64) %11)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %121 = getelementptr inbounds %"class.JPH::MutableCompoundShape", ptr %32, i32 0, i32 1
  %122 = load i32, ptr %7, align 4, !tbaa !9
  %123 = lshr i32 %122, 2
  %124 = zext i32 %123 to i64
  %125 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZN3JPH5ArrayINS_20MutableCompoundShape6BoundsENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %124)
  store ptr %125, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #7
  %126 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %23, i32 noundef 0)
  %127 = getelementptr inbounds %"class.JPH::Vec4", ptr %26, i32 0, i32 0
  %128 = getelementptr inbounds %union.anon.14, ptr %127, i32 0, i32 0
  %129 = getelementptr inbounds { double, double }, ptr %128, i32 0, i32 0
  %130 = extractvalue { double, double } %126, 0
  store double %130, ptr %129, align 16
  %131 = getelementptr inbounds { double, double }, ptr %128, i32 0, i32 1
  %132 = extractvalue { double, double } %126, 1
  store double %132, ptr %131, align 8
  %133 = load ptr, ptr %25, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.JPH::MutableCompoundShape::Bounds", ptr %133, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %134, ptr align 16 %26, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #7
  %135 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %23, i32 noundef 1)
  %136 = getelementptr inbounds %"class.JPH::Vec4", ptr %27, i32 0, i32 0
  %137 = getelementptr inbounds %union.anon.14, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds { double, double }, ptr %137, i32 0, i32 0
  %139 = extractvalue { double, double } %135, 0
  store double %139, ptr %138, align 16
  %140 = getelementptr inbounds { double, double }, ptr %137, i32 0, i32 1
  %141 = extractvalue { double, double } %135, 1
  store double %141, ptr %140, align 8
  %142 = load ptr, ptr %25, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.JPH::MutableCompoundShape::Bounds", ptr %142, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %143, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #7
  %144 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %23, i32 noundef 2)
  %145 = getelementptr inbounds %"class.JPH::Vec4", ptr %28, i32 0, i32 0
  %146 = getelementptr inbounds %union.anon.14, ptr %145, i32 0, i32 0
  %147 = getelementptr inbounds { double, double }, ptr %146, i32 0, i32 0
  %148 = extractvalue { double, double } %144, 0
  store double %148, ptr %147, align 16
  %149 = getelementptr inbounds { double, double }, ptr %146, i32 0, i32 1
  %150 = extractvalue { double, double } %144, 1
  store double %150, ptr %149, align 8
  %151 = load ptr, ptr %25, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.JPH::MutableCompoundShape::Bounds", ptr %151, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %152, ptr align 16 %28, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #7
  %153 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %24, i32 noundef 0)
  %154 = getelementptr inbounds %"class.JPH::Vec4", ptr %29, i32 0, i32 0
  %155 = getelementptr inbounds %union.anon.14, 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 = load ptr, ptr %25, align 8, !tbaa !5
  %161 = getelementptr inbounds %"struct.JPH::MutableCompoundShape::Bounds", ptr %160, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %161, ptr align 16 %29, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #7
  %162 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %24, i32 noundef 1)
  %163 = getelementptr inbounds %"class.JPH::Vec4", ptr %30, i32 0, i32 0
  %164 = getelementptr inbounds %union.anon.14, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds { double, double }, ptr %164, i32 0, i32 0
  %166 = extractvalue { double, double } %162, 0
  store double %166, ptr %165, align 16
  %167 = getelementptr inbounds { double, double }, ptr %164, i32 0, i32 1
  %168 = extractvalue { double, double } %162, 1
  store double %168, ptr %167, align 8
  %169 = load ptr, ptr %25, align 8, !tbaa !5
  %170 = getelementptr inbounds %"struct.JPH::MutableCompoundShape::Bounds", ptr %169, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %170, ptr align 16 %30, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #7
  %171 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %24, i32 noundef 2)
  %172 = getelementptr inbounds %"class.JPH::Vec4", ptr %31, i32 0, i32 0
  %173 = getelementptr inbounds %union.anon.14, 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 = load ptr, ptr %25, align 8, !tbaa !5
  %179 = getelementptr inbounds %"struct.JPH::MutableCompoundShape::Bounds", ptr %178, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %179, ptr align 16 %31, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #7
  br label %180

180:                                              ; preds = %120
  %181 = load i32, ptr %7, align 4, !tbaa !9
  %182 = add i32 %181, 4
  store i32 %182, ptr %7, align 4, !tbaa !9
  br label %38, !llvm.loop !18

183:                                              ; preds = %42
  call void @_ZN3JPH20MutableCompoundShape20CalculateLocalBoundsEv(ptr noundef nonnull align 16 dereferenceable(144) %32)
  ret void
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20MutableCompoundShape20CalculateLocalBoundsEv(ptr noundef nonnull align 16 dereferenceable(144)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20MutableCompoundShape28EnsureSubShapeBoundsCapacityEv(ptr noundef nonnull align 16 dereferenceable(144)) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(37) ptr @_ZN3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double, double, double) #4 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), i32 noundef, double, double) #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH5Mat4410TransposedEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(96) ptr @_ZN3JPH5ArrayINS_20MutableCompoundShape6BoundsENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { alwaysinline mustprogress nounwind 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 #7 = { 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 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{i64 0, i64 16, !14, i64 16, i64 16, !14}
!14 = !{!7, !7, i64 0}
!15 = !{i64 0, i64 16, !14}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


; 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.14 }
%union.anon.14 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.6 }
%union.anon.6 = 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: mustprogress uwtable
define dso_local void @_ZN3JPH20MutableCompoundShape23CalculateSubShapeBoundsEjj(ptr noundef nonnull align 16 dereferenceable(144) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %"class.JPH::Mat44", align 16
  %5 = alloca %"class.JPH::Mat44", align 16
  %6 = alloca %"class.JPH::AABox", align 16
  %7 = alloca %"class.JPH::Mat44", align 16
  %8 = alloca %"class.JPH::AABox", align 16
  %9 = alloca %"class.JPH::Mat44", align 16
  %10 = alloca %"class.JPH::Mat44", align 16
  tail call void @_ZN3JPH20MutableCompoundShape28EnsureSubShapeBoundsCapacityEv(ptr noundef nonnull align 16 dereferenceable(144) %0)
  %11 = and i32 %1, -4
  %12 = add i32 %2, %1
  %13 = icmp ult i32 %11, %12
  br i1 %13, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  %.sroa.218.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  %15 = getelementptr inbounds i8, ptr %6, i64 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 24
  %16 = getelementptr inbounds i8, ptr %0, i64 112
  br label %17

._crit_edge:                                      ; preds = %93, %3
  call void @_ZN3JPH20MutableCompoundShape20CalculateLocalBoundsEv(ptr noundef nonnull align 16 dereferenceable(144) %0)
  ret void

17:                                               ; preds = %.lr.ph, %93
  %.046 = phi i32 [ %11, %.lr.ph ], [ %120, %93 ]
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @_ZN3JPH5AABoxC2Ev(ptr noundef nonnull align 16 dereferenceable(32) %6)
  %18 = zext i32 %.046 to i64
  %19 = call noundef i64 @_ZNK3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %20 = icmp ugt i64 %19, %18
  br i1 %20, label %21, label %36

21:                                               ; preds = %17
  %22 = call noundef nonnull align 8 dereferenceable(37) ptr @_ZN3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %18)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  %23 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %22)
  %24 = extractvalue { double, double } %23, 0
  %25 = extractvalue { double, double } %23, 1
  %26 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14GetPositionCOMEv(ptr noundef nonnull align 8 dereferenceable(37) %22)
  %27 = extractvalue { double, double } %26, 0
  %28 = extractvalue { double, double } %26, 1
  call void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, double %24, double %25, double %27, double %28)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %29 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %22)
  %30 = call { double, double } @_ZN3JPH4Vec34sOneEv()
  %31 = extractvalue { double, double } %30, 0
  %32 = extractvalue { double, double } %30, 1
  %33 = load ptr, ptr %29, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 48
  %35 = load ptr, ptr %34, align 8
  call void %35(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %8, ptr noundef nonnull align 8 dereferenceable(26) %29, ptr noundef nonnull align 16 dereferenceable(64) %7, double %31, double %32)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  br label %36

36:                                               ; preds = %21, %17
  %.sroa.017.0.copyload = load double, ptr %6, align 16
  %.sroa.218.0.copyload = load double, ptr %.sroa.218.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %4, i32 noundef 0, double %.sroa.017.0.copyload, double %.sroa.218.0.copyload)
  %.sroa.016.0.copyload = load double, ptr %15, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %5, i32 noundef 0, double %.sroa.016.0.copyload, double %.sroa.2.0.copyload)
  %37 = or disjoint i64 %18, 1
  %38 = call noundef i64 @_ZNK3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %39 = icmp ugt i64 %38, %37
  br i1 %39, label %40, label %55

40:                                               ; preds = %36
  %41 = call noundef nonnull align 8 dereferenceable(37) ptr @_ZN3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %37)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  %42 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %41)
  %43 = extractvalue { double, double } %42, 0
  %44 = extractvalue { double, double } %42, 1
  %45 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14GetPositionCOMEv(ptr noundef nonnull align 8 dereferenceable(37) %41)
  %46 = extractvalue { double, double } %45, 0
  %47 = extractvalue { double, double } %45, 1
  call void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, double %43, double %44, double %46, double %47)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %48 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %41)
  %49 = call { double, double } @_ZN3JPH4Vec34sOneEv()
  %50 = extractvalue { double, double } %49, 0
  %51 = extractvalue { double, double } %49, 1
  %52 = load ptr, ptr %48, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 48
  %54 = load ptr, ptr %53, align 8
  call void %54(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %8, ptr noundef nonnull align 8 dereferenceable(26) %48, ptr noundef nonnull align 16 dereferenceable(64) %7, double %50, double %51)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  br label %55

55:                                               ; preds = %40, %36
  %.sroa.017.0.copyload.1 = load double, ptr %6, align 16
  %.sroa.218.0.copyload.1 = load double, ptr %.sroa.218.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %4, i32 noundef 1, double %.sroa.017.0.copyload.1, double %.sroa.218.0.copyload.1)
  %.sroa.016.0.copyload.1 = load double, ptr %15, align 16
  %.sroa.2.0.copyload.1 = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %5, i32 noundef 1, double %.sroa.016.0.copyload.1, double %.sroa.2.0.copyload.1)
  %56 = or disjoint i64 %18, 2
  %57 = call noundef i64 @_ZNK3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %58 = icmp ugt i64 %57, %56
  br i1 %58, label %59, label %74

59:                                               ; preds = %55
  %60 = call noundef nonnull align 8 dereferenceable(37) ptr @_ZN3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %56)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  %61 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %60)
  %62 = extractvalue { double, double } %61, 0
  %63 = extractvalue { double, double } %61, 1
  %64 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14GetPositionCOMEv(ptr noundef nonnull align 8 dereferenceable(37) %60)
  %65 = extractvalue { double, double } %64, 0
  %66 = extractvalue { double, double } %64, 1
  call void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, double %62, double %63, double %65, double %66)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %67 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %60)
  %68 = call { double, double } @_ZN3JPH4Vec34sOneEv()
  %69 = extractvalue { double, double } %68, 0
  %70 = extractvalue { double, double } %68, 1
  %71 = load ptr, ptr %67, align 8, !tbaa !5
  %72 = getelementptr inbounds i8, ptr %71, i64 48
  %73 = load ptr, ptr %72, align 8
  call void %73(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %8, ptr noundef nonnull align 8 dereferenceable(26) %67, ptr noundef nonnull align 16 dereferenceable(64) %7, double %69, double %70)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  br label %74

74:                                               ; preds = %59, %55
  %.sroa.017.0.copyload.2 = load double, ptr %6, align 16
  %.sroa.218.0.copyload.2 = load double, ptr %.sroa.218.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %4, i32 noundef 2, double %.sroa.017.0.copyload.2, double %.sroa.218.0.copyload.2)
  %.sroa.016.0.copyload.2 = load double, ptr %15, align 16
  %.sroa.2.0.copyload.2 = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %5, i32 noundef 2, double %.sroa.016.0.copyload.2, double %.sroa.2.0.copyload.2)
  %75 = or disjoint i64 %18, 3
  %76 = call noundef i64 @_ZNK3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %14)
  %77 = icmp ugt i64 %76, %75
  br i1 %77, label %78, label %93

78:                                               ; preds = %74
  %79 = call noundef nonnull align 8 dereferenceable(37) ptr @_ZN3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %14, i64 noundef %75)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #7
  %80 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %79)
  %81 = extractvalue { double, double } %80, 0
  %82 = extractvalue { double, double } %80, 1
  %83 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14GetPositionCOMEv(ptr noundef nonnull align 8 dereferenceable(37) %79)
  %84 = extractvalue { double, double } %83, 0
  %85 = extractvalue { double, double } %83, 1
  call void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %7, double %81, double %82, double %84, double %85)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  %86 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %79)
  %87 = call { double, double } @_ZN3JPH4Vec34sOneEv()
  %88 = extractvalue { double, double } %87, 0
  %89 = extractvalue { double, double } %87, 1
  %90 = load ptr, ptr %86, align 8, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %90, i64 48
  %92 = load ptr, ptr %91, align 8
  call void %92(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %8, ptr noundef nonnull align 8 dereferenceable(26) %86, ptr noundef nonnull align 16 dereferenceable(64) %7, double %88, double %89)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, ptr noundef nonnull align 16 dereferenceable(32) %8, i64 32, i1 false), !tbaa.struct !8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #7
  br label %93

93:                                               ; preds = %78, %74
  %.sroa.017.0.copyload.3 = load double, ptr %6, align 16
  %.sroa.218.0.copyload.3 = load double, ptr %.sroa.218.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %4, i32 noundef 3, double %.sroa.017.0.copyload.3, double %.sroa.218.0.copyload.3)
  %.sroa.016.0.copyload.3 = load double, ptr %15, align 16
  %.sroa.2.0.copyload.3 = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !9
  call void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %5, i32 noundef 3, double %.sroa.016.0.copyload.3, double %.sroa.2.0.copyload.3)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  call void @_ZNK3JPH5Mat4410TransposedEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %9, ptr noundef nonnull align 16 dereferenceable(64) %4)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  call void @_ZNK3JPH5Mat4410TransposedEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %10, ptr noundef nonnull align 16 dereferenceable(64) %5)
  %94 = lshr exact i32 %.046, 2
  %95 = zext nneg i32 %94 to i64
  %96 = call noundef nonnull align 16 dereferenceable(96) ptr @_ZN3JPH5ArrayINS_20MutableCompoundShape6BoundsENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %95)
  %97 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %9, i32 noundef 0)
  %98 = extractvalue { double, double } %97, 0
  %99 = extractvalue { double, double } %97, 1
  store double %98, ptr %96, align 16
  %.sroa.410.0..sroa_idx = getelementptr inbounds i8, ptr %96, i64 8
  store double %99, ptr %.sroa.410.0..sroa_idx, align 8, !tbaa !9
  %100 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %9, i32 noundef 1)
  %101 = extractvalue { double, double } %100, 0
  %102 = extractvalue { double, double } %100, 1
  %103 = getelementptr inbounds i8, ptr %96, i64 16
  store double %101, ptr %103, align 16
  %.sroa.48.0..sroa_idx = getelementptr inbounds i8, ptr %96, i64 24
  store double %102, ptr %.sroa.48.0..sroa_idx, align 8, !tbaa !9
  %104 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %9, i32 noundef 2)
  %105 = extractvalue { double, double } %104, 0
  %106 = extractvalue { double, double } %104, 1
  %107 = getelementptr inbounds i8, ptr %96, i64 32
  store double %105, ptr %107, align 16
  %.sroa.46.0..sroa_idx = getelementptr inbounds i8, ptr %96, i64 40
  store double %106, ptr %.sroa.46.0..sroa_idx, align 8, !tbaa !9
  %108 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %10, i32 noundef 0)
  %109 = extractvalue { double, double } %108, 0
  %110 = extractvalue { double, double } %108, 1
  %111 = getelementptr inbounds i8, ptr %96, i64 48
  store double %109, ptr %111, align 16
  %.sroa.44.0..sroa_idx = getelementptr inbounds i8, ptr %96, i64 56
  store double %110, ptr %.sroa.44.0..sroa_idx, align 8, !tbaa !9
  %112 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %10, i32 noundef 1)
  %113 = extractvalue { double, double } %112, 0
  %114 = extractvalue { double, double } %112, 1
  %115 = getelementptr inbounds i8, ptr %96, i64 64
  store double %113, ptr %115, align 16
  %.sroa.42.0..sroa_idx = getelementptr inbounds i8, ptr %96, i64 72
  store double %114, ptr %.sroa.42.0..sroa_idx, align 8, !tbaa !9
  %116 = call { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %10, i32 noundef 2)
  %117 = extractvalue { double, double } %116, 0
  %118 = extractvalue { double, double } %116, 1
  %119 = getelementptr inbounds i8, ptr %96, i64 80
  store double %117, ptr %119, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %96, i64 88
  store double %118, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #7
  %120 = add i32 %.046, 4
  %121 = icmp ult i32 %120, %12
  br i1 %121, label %17, label %._crit_edge, !llvm.loop !11
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20MutableCompoundShape20CalculateLocalBoundsEv(ptr noundef nonnull align 16 dereferenceable(144)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20MutableCompoundShape28EnsureSubShapeBoundsCapacityEv(ptr noundef nonnull align 16 dereferenceable(144)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(37) ptr @_ZN3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4420sRotationTranslationENS_4QuatENS_4Vec3E(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double, double, double) local_unnamed_addr #4 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat4410SetColumn3EjNS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), i32 noundef, double, double) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH5Mat4410TransposedEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(96) ptr @_ZN3JPH5ArrayINS_20MutableCompoundShape6BoundsENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { alwaysinline mustprogress nounwind 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 #7 = { 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 = !{i64 0, i64 16, !9, i64 16, i64 16, !9}
!9 = !{!10, !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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