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

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

; 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: 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 } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH13CompoundShape22GetSubShapeIndexFromIDENS_10SubShapeIDERS1_(ptr noundef nonnull align 16 dereferenceable(108), i32, ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13CompoundShape27GetSubShapeTransformedShapeERKNS_10SubShapeIDENS_4Vec3ENS_4QuatES4_RS1_(ptr dead_on_unwind noalias writable sret(%"class.JPH::TransformedShape") align 16 %0, ptr noundef nonnull align 16 dereferenceable(108) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, double %3, double %4, double %5, double %6, double %7, double %8, ptr noundef nonnull align 4 dereferenceable(4) %9) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %11 = alloca ptr, align 8
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Quat", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"class.JPH::SubShapeID", align 4
  %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::Quat", align 16
  %25 = alloca %"class.JPH::Quat", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca i1, align 1
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Quat", align 16
  %31 = alloca %"class.JPH::BodyID", align 4
  %32 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca ptr, align 8
  %35 = alloca i32, align 4
  store ptr %0, ptr %11, align 8
  %36 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  store double %3, ptr %36, align 16
  %37 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %4, ptr %37, align 8
  %38 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  store double %5, ptr %38, align 16
  %39 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  store double %6, ptr %39, align 8
  %40 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  store double %7, ptr %40, align 16
  %41 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  store double %8, ptr %41, align 8
  store ptr %1, ptr %15, align 8, !tbaa !5
  store ptr %2, ptr %16, align 8, !tbaa !5
  store ptr %9, ptr %17, align 8, !tbaa !5
  %42 = load ptr, ptr %15, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %43 = getelementptr inbounds %"class.JPH::CompoundShape", ptr %42, i32 0, i32 4
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %44, i64 4, i1 false), !tbaa.struct !9
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.JPH::SubShapeID", ptr %19, i32 0, i32 0
  %47 = load i32, ptr %46, align 4
  %48 = call noundef i32 @_ZNK3JPH13CompoundShape22GetSubShapeIndexFromIDENS_10SubShapeIDERS1_(ptr noundef nonnull align 16 dereferenceable(108) %42, i32 %47, ptr noundef nonnull align 4 dereferenceable(4) %45)
  %49 = zext i32 %48 to i64
  %50 = call noundef nonnull align 8 dereferenceable(37) ptr @_ZNK3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %49)
  store ptr %50, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #9
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  %52 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14GetPositionCOMEv(ptr noundef nonnull align 8 dereferenceable(37) %51)
  %53 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %54 = getelementptr inbounds %union.anon.7, ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 0
  %56 = extractvalue { double, double } %52, 0
  store double %56, ptr %55, align 16
  %57 = getelementptr inbounds { double, double }, ptr %54, i32 0, i32 1
  %58 = extractvalue { double, double } %52, 1
  store double %58, ptr %57, align 8
  %59 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %60 = load double, ptr %59, align 16
  %61 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %62 = load double, ptr %61, align 8
  %63 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %14, double %60, double %62)
  %64 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %65 = getelementptr inbounds %union.anon.7, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 0
  %67 = extractvalue { double, double } %63, 0
  store double %67, ptr %66, align 16
  %68 = getelementptr inbounds { double, double }, ptr %65, i32 0, i32 1
  %69 = extractvalue { double, double } %63, 1
  store double %69, ptr %68, align 8
  %70 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %71 = load double, ptr %70, align 16
  %72 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %73 = load double, ptr %72, align 8
  %74 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %13, double %71, double %73)
  %75 = getelementptr inbounds %"class.JPH::Vec3", ptr %21, i32 0, i32 0
  %76 = getelementptr inbounds %union.anon.7, ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 0
  %78 = extractvalue { double, double } %74, 0
  store double %78, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %76, i32 0, i32 1
  %80 = extractvalue { double, double } %74, 1
  store double %80, ptr %79, align 8
  %81 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %82 = load double, ptr %81, align 16
  %83 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %84 = load double, ptr %83, align 8
  %85 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %82, double %84)
  %86 = getelementptr inbounds %"class.JPH::Vec3", ptr %20, i32 0, i32 0
  %87 = getelementptr inbounds %union.anon.7, 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
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #9
  %92 = load ptr, ptr %18, align 8, !tbaa !5
  %93 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %92)
  %94 = getelementptr inbounds %"class.JPH::Quat", ptr %25, i32 0, i32 0
  %95 = getelementptr inbounds %"class.JPH::Vec4", ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds %union.anon.8, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 0
  %98 = extractvalue { double, double } %93, 0
  store double %98, ptr %97, align 16
  %99 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 1
  %100 = extractvalue { double, double } %93, 1
  store double %100, ptr %99, align 8
  %101 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %102 = load double, ptr %101, align 16
  %103 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %104 = load double, ptr %103, align 8
  %105 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %102, double %104)
  %106 = getelementptr inbounds %"class.JPH::Quat", ptr %24, i32 0, i32 0
  %107 = getelementptr inbounds %"class.JPH::Vec4", ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds %union.anon.8, ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds { double, double }, ptr %108, i32 0, i32 0
  %110 = extractvalue { double, double } %105, 0
  store double %110, ptr %109, align 16
  %111 = getelementptr inbounds { double, double }, ptr %108, i32 0, i32 1
  %112 = extractvalue { double, double } %105, 1
  store double %112, ptr %111, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #9
  %113 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !12
  %114 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %115 = load double, ptr %114, align 16
  %116 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %117 = load double, ptr %116, align 8
  %118 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14TransformScaleENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(37) %113, double %115, double %117)
  %119 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %120 = getelementptr inbounds %union.anon.7, ptr %119, i32 0, i32 0
  %121 = getelementptr inbounds { double, double }, ptr %120, i32 0, i32 0
  %122 = extractvalue { double, double } %118, 0
  store double %122, ptr %121, align 16
  %123 = getelementptr inbounds { double, double }, ptr %120, i32 0, i32 1
  %124 = extractvalue { double, double } %118, 1
  store double %124, ptr %123, align 8
  store i1 false, ptr %28, align 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %20, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %30, ptr align 16 %24, i64 16, i1 false), !tbaa.struct !12
  %125 = load ptr, ptr %18, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.JPH::CompoundShape::SubShape", ptr %125, i32 0, i32 0
  %127 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %126)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #9
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #9
  call void @llvm.memset.p0.i64(ptr align 4 %32, i8 0, i64 8, i1 false)
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %32) #9
  %128 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %129 = load double, ptr %128, align 16
  %130 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %131 = load double, ptr %130, align 8
  %132 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %133 = load double, ptr %132, align 16
  %134 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %135 = load double, ptr %134, align 8
  call void @_ZN3JPH16TransformedShapeC2ENS_4Vec3ENS_4QuatEPKNS_5ShapeERKNS_6BodyIDERKNS_17SubShapeIDCreatorE(ptr noundef nonnull align 16 dereferenceable(64) %0, double %129, double %131, double %133, double %135, ptr noundef %127, ptr noundef nonnull align 4 dereferenceable(4) %31, ptr noundef nonnull align 4 dereferenceable(8) %32)
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %33, ptr align 16 %26, i64 16, i1 false), !tbaa.struct !12
  %136 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %137 = load double, ptr %136, align 16
  %138 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %139 = load double, ptr %138, align 8
  invoke void @_ZN3JPH16TransformedShape13SetShapeScaleENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %0, double %137, double %139)
          to label %140 unwind label %142

140:                                              ; preds = %10
  store i1 true, ptr %28, align 1
  %141 = load i1, ptr %28, align 1
  br i1 %141, label %147, label %146

142:                                              ; preds = %10
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %34, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %35, align 4
  call void @_ZN3JPH16TransformedShapeD2Ev(ptr noundef nonnull align 16 dereferenceable(64) %0) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %148

146:                                              ; preds = %140
  call void @_ZN3JPH16TransformedShapeD2Ev(ptr noundef nonnull align 16 dereferenceable(64) %0) #9
  br label %147

147:                                              ; preds = %146, %140
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  ret void

148:                                              ; preds = %142
  %149 = load ptr, ptr %34, align 8
  %150 = load i32, ptr %35, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152
}

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

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH16TransformedShape13SetShapeScaleENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16TransformedShapeD2Ev(ptr noundef nonnull align 16 dereferenceable(64)) unnamed_addr #7 align 2

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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #7 = { 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 #8 = { 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 #9 = { 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 = !{i64 0, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{i64 0, i64 16, !13}
!13 = !{!7, !7, i64 0}


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

%"class.JPH::TransformedShape" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::RefConst.9", %"class.JPH::Float3", %"class.JPH::BodyID", %"class.JPH::SubShapeIDCreator" }
%"class.JPH::Vec3" = type { %union.anon.7 }
%union.anon.7 = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.8 }
%union.anon.8 = type { <4 x float> }
%"class.JPH::RefConst.9" = type { ptr }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SubShapeID" = type { i32 }

; 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 { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13CompoundShape27GetSubShapeTransformedShapeERKNS_10SubShapeIDENS_4Vec3ENS_4QuatES4_RS1_(ptr dead_on_unwind noalias writable sret(%"class.JPH::TransformedShape") align 16 %0, ptr noundef nonnull align 16 dereferenceable(108) %1, ptr nocapture noundef nonnull readonly align 4 dereferenceable(4) %2, double %3, double %4, double %5, double %6, double %7, double %8, ptr noundef nonnull align 4 dereferenceable(4) %9) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Quat", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::BodyID", align 4
  %15 = alloca %"class.JPH::SubShapeIDCreator", align 8
  store double %3, ptr %11, align 16
  %16 = getelementptr inbounds i8, ptr %11, i64 8
  store double %4, ptr %16, align 8
  store double %5, ptr %12, align 16
  %17 = getelementptr inbounds i8, ptr %12, i64 8
  store double %6, ptr %17, align 8
  store double %7, ptr %13, align 16
  %18 = getelementptr inbounds i8, ptr %13, i64 8
  store double %8, ptr %18, align 8
  %19 = getelementptr inbounds i8, ptr %1, i64 80
  %.sroa.021.0.copyload = load i32, ptr %2, align 4, !tbaa !5
  %20 = tail call noundef i32 @_ZNK3JPH13CompoundShape22GetSubShapeIndexFromIDENS_10SubShapeIDERS1_(ptr noundef nonnull align 16 dereferenceable(108) %1, i32 %.sroa.021.0.copyload, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %21 = zext i32 %20 to i64
  %22 = tail call noundef nonnull align 8 dereferenceable(37) ptr @_ZNK3JPH5ArrayINS_13CompoundShape8SubShapeENS_12STLAllocatorIS2_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %21)
  %23 = tail call { double, double } @_ZNK3JPH13CompoundShape8SubShape14GetPositionCOMEv(ptr noundef nonnull align 8 dereferenceable(37) %22)
  %24 = extractvalue { double, double } %23, 0
  %25 = extractvalue { double, double } %23, 1
  %26 = call { double, double } @_ZNK3JPH4Vec3mlES0_(ptr noundef nonnull align 16 dereferenceable(16) %13, double %24, double %25)
  %27 = extractvalue { double, double } %26, 0
  %28 = extractvalue { double, double } %26, 1
  %29 = call { double, double } @_ZNK3JPH4QuatmlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(16) %12, double %27, double %28)
  %30 = extractvalue { double, double } %29, 0
  %31 = extractvalue { double, double } %29, 1
  %32 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %11, double %30, double %31)
  %33 = extractvalue { double, double } %32, 0
  %34 = extractvalue { double, double } %32, 1
  %35 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(37) %22)
  %36 = extractvalue { double, double } %35, 0
  %37 = extractvalue { double, double } %35, 1
  %38 = call { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %36, double %37)
  %39 = extractvalue { double, double } %38, 0
  %40 = extractvalue { double, double } %38, 1
  %.sroa.06.0.copyload = load double, ptr %13, align 16
  %.sroa.27.0.copyload = load double, ptr %18, align 8, !tbaa !9
  %41 = call { double, double } @_ZNK3JPH13CompoundShape8SubShape14TransformScaleENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(37) %22, double %.sroa.06.0.copyload, double %.sroa.27.0.copyload)
  %42 = extractvalue { double, double } %41, 0
  %43 = extractvalue { double, double } %41, 1
  %44 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %22)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  store i64 0, ptr %15, align 8
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %15) #7
  call void @_ZN3JPH16TransformedShapeC2ENS_4Vec3ENS_4QuatEPKNS_5ShapeERKNS_6BodyIDERKNS_17SubShapeIDCreatorE(ptr noundef nonnull align 16 dereferenceable(64) %0, double %33, double %34, double %39, double %40, ptr noundef %44, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(8) %15)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  invoke void @_ZN3JPH16TransformedShape13SetShapeScaleENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %0, double %42, double %43)
          to label %47 unwind label %45

45:                                               ; preds = %10
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH16TransformedShapeD2Ev(ptr noundef nonnull align 16 dereferenceable(64) %0) #7
  resume { ptr, i32 } %46

47:                                               ; preds = %10
  ret void
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH16TransformedShapeC2ENS_4Vec3ENS_4QuatEPKNS_5ShapeERKNS_6BodyIDERKNS_17SubShapeIDCreatorE(ptr noundef nonnull align 16 dereferenceable(64), double, double, double, double, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH16TransformedShapeD2Ev(ptr noundef nonnull align 16 dereferenceable(64)) unnamed_addr #5 align 2

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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"="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 #5 = { 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 #6 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass