; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Ragdoll/Ragdoll.ll (ZN3JPH7Ragdoll7GetPoseERNS_4Vec3EPNS_5Mat44Eb)

; 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::BodyLockMultiRead" = type { %"class.JPH::BodyLockMultiBase.base", [4 x i8] }
%"class.JPH::BodyLockMultiBase.base" = type <{ ptr, i64, ptr, i32 }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.2 }
%union.anon.2 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Ragdoll" = type { %"class.JPH::RefTarget.76", %"class.JPH::RefConst.77", %"class.JPH::Array.78", %"class.JPH::Array.81", ptr }
%"class.JPH::RefTarget.76" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::RefConst.77" = type { ptr }
%"class.JPH::Array.78" = type { i64, i64, ptr }
%"class.JPH::Array.81" = type { i64, i64, ptr }

; 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 void @_ZN3JPH4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPHL21sGetBodyLockInterfaceEPKNS_13PhysicsSystemEb(ptr noundef, i1 noundef zeroext) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17BodyLockMultiReadCI2NS_17BodyLockMultiBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH17BodyLockMultiBaseILb0EKNS_4BodyEE7GetBodyEi(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH7Ragdoll7GetPoseERNS_4Vec3EPNS_5Mat44Eb(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 16 dereferenceable(16) %1, ptr noundef %2, i1 noundef zeroext %3) #7 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.JPH::BodyLockMultiRead", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.JPH::Mat44", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Mat44", align 16
  %18 = alloca %"class.JPH::Vec4", align 16
  %19 = alloca %"class.JPH::Vec4", align 16
  %20 = alloca %"class.JPH::Vec4", align 16
  %21 = alloca %"class.JPH::Vec4", align 16
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca %"class.JPH::Mat44", align 16
  %25 = alloca %"class.JPH::Mat44", align 16
  %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::Vec3", align 16
  %31 = alloca %"class.JPH::Vec3", align 16
  %32 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %33 = zext i1 %3 to i8
  store i8 %33, ptr %8, align 1, !tbaa !9
  %34 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %35 = getelementptr inbounds %"class.JPH::Ragdoll", ptr %34, i32 0, i32 2
  %36 = call noundef i64 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  %37 = trunc i64 %36 to i32
  store i32 %37, ptr %9, align 4, !tbaa !11
  %38 = load i32, ptr %9, align 4, !tbaa !11
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %4
  store i32 1, ptr %10, align 4
  br label %228

41:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #9
  %42 = getelementptr inbounds %"class.JPH::Ragdoll", ptr %34, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = load i8, ptr %8, align 1, !tbaa !9, !range !22, !noundef !23
  %45 = trunc i8 %44 to i1
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPHL21sGetBodyLockInterfaceEPKNS_13PhysicsSystemEb(ptr noundef %43, i1 noundef zeroext %45)
  %47 = getelementptr inbounds %"class.JPH::Ragdoll", ptr %34, i32 0, i32 2
  %48 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
  %49 = load i32, ptr %9, align 4, !tbaa !11
  call void @_ZN3JPH17BodyLockMultiReadCI2NS_17BodyLockMultiBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(28) %11, ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef %48, i32 noundef %49)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %50 = invoke noundef ptr @_ZNK3JPH17BodyLockMultiBaseILb0EKNS_4BodyEE7GetBodyEi(ptr noundef nonnull align 8 dereferenceable(28) %11, i32 noundef 0)
          to label %51 unwind label %112

51:                                               ; preds = %41
  store ptr %50, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #9
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body17GetWorldTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %15, ptr noundef nonnull align 16 dereferenceable(122) %52)
          to label %53 unwind label %116

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #9
  %54 = invoke { double, double } @_ZNK3JPH5Mat4414GetTranslationEv(ptr noundef nonnull align 16 dereferenceable(64) %15)
          to label %55 unwind label %120

55:                                               ; preds = %53
  %56 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %57 = getelementptr inbounds %union.anon, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %59 = extractvalue { double, double } %54, 0
  store double %59, ptr %58, align 16
  %60 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %61 = extractvalue { double, double } %54, 1
  store double %61, ptr %60, align 8
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %62, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #9
  %63 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %15, i32 noundef 0)
          to label %64 unwind label %124

64:                                               ; preds = %55
  %65 = getelementptr inbounds %"class.JPH::Vec4", ptr %18, i32 0, i32 0
  %66 = getelementptr inbounds %union.anon.2, 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 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %15, i32 noundef 1)
          to label %72 unwind label %124

72:                                               ; preds = %64
  %73 = getelementptr inbounds %"class.JPH::Vec4", ptr %19, i32 0, i32 0
  %74 = getelementptr inbounds %union.anon.2, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 0
  %76 = extractvalue { double, double } %71, 0
  store double %76, ptr %75, align 16
  %77 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 1
  %78 = extractvalue { double, double } %71, 1
  store double %78, ptr %77, align 8
  %79 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %15, i32 noundef 2)
          to label %80 unwind label %124

80:                                               ; preds = %72
  %81 = getelementptr inbounds %"class.JPH::Vec4", ptr %20, i32 0, i32 0
  %82 = getelementptr inbounds %union.anon.2, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 0
  %84 = extractvalue { double, double } %79, 0
  store double %84, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 1
  %86 = extractvalue { double, double } %79, 1
  store double %86, ptr %85, align 8
  invoke void @_ZN3JPH4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %21, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %87 unwind label %124

87:                                               ; preds = %80
  %88 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %89 = load double, ptr %88, align 16
  %90 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %91 = load double, ptr %90, align 8
  %92 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %93 = load double, ptr %92, align 16
  %94 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %95 = load double, ptr %94, align 8
  %96 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 0
  %97 = load double, ptr %96, align 16
  %98 = getelementptr inbounds { double, double }, ptr %20, i32 0, i32 1
  %99 = load double, ptr %98, align 8
  %100 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %101 = load double, ptr %100, align 16
  %102 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %103 = load double, ptr %102, align 8
  invoke void @_ZN3JPH5Mat44C2ENS_4Vec4ES1_S1_S1_(ptr noundef nonnull align 16 dereferenceable(64) %17, double %89, double %91, double %93, double %95, double %97, double %99, double %101, double %103)
          to label %104 unwind label %124

104:                                              ; preds = %87
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %"class.JPH::Mat44", ptr %105, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %106, ptr align 16 %17, i64 64, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 1, ptr %22, align 4, !tbaa !11
  br label %107

107:                                              ; preds = %205, %104
  %108 = load i32, ptr %22, align 4, !tbaa !11
  %109 = load i32, ptr %9, align 4, !tbaa !11
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %128, label %111

111:                                              ; preds = %107
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %227

112:                                              ; preds = %41
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %13, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %14, align 4
  br label %232

116:                                              ; preds = %51
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %13, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %14, align 4
  br label %231

120:                                              ; preds = %53
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %13, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #9
  br label %231

124:                                              ; preds = %87, %80, %72, %64, %55
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %13, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #9
  br label %231

128:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %129 = load i32, ptr %22, align 4, !tbaa !11
  %130 = invoke noundef ptr @_ZNK3JPH17BodyLockMultiBaseILb0EKNS_4BodyEE7GetBodyEi(ptr noundef nonnull align 8 dereferenceable(28) %11, i32 noundef %129)
          to label %131 unwind label %208

131:                                              ; preds = %128
  store ptr %130, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #9
  %132 = load ptr, ptr %23, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body17GetWorldTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %24, ptr noundef nonnull align 16 dereferenceable(122) %132)
          to label %133 unwind label %212

133:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #9
  %134 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %24, i32 noundef 0)
          to label %135 unwind label %216

135:                                              ; preds = %133
  %136 = getelementptr inbounds %"class.JPH::Vec4", ptr %26, i32 0, i32 0
  %137 = getelementptr inbounds %union.anon.2, ptr %136, i32 0, i32 0
  %138 = getelementptr inbounds { double, double }, ptr %137, i32 0, i32 0
  %139 = extractvalue { double, double } %134, 0
  store double %139, ptr %138, align 16
  %140 = getelementptr inbounds { double, double }, ptr %137, i32 0, i32 1
  %141 = extractvalue { double, double } %134, 1
  store double %141, ptr %140, align 8
  %142 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %24, i32 noundef 1)
          to label %143 unwind label %216

143:                                              ; preds = %135
  %144 = getelementptr inbounds %"class.JPH::Vec4", ptr %27, i32 0, i32 0
  %145 = getelementptr inbounds %union.anon.2, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds { double, double }, ptr %145, i32 0, i32 0
  %147 = extractvalue { double, double } %142, 0
  store double %147, ptr %146, align 16
  %148 = getelementptr inbounds { double, double }, ptr %145, i32 0, i32 1
  %149 = extractvalue { double, double } %142, 1
  store double %149, ptr %148, align 8
  %150 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %24, i32 noundef 2)
          to label %151 unwind label %216

151:                                              ; preds = %143
  %152 = getelementptr inbounds %"class.JPH::Vec4", ptr %28, i32 0, i32 0
  %153 = getelementptr inbounds %union.anon.2, ptr %152, i32 0, i32 0
  %154 = getelementptr inbounds { double, double }, ptr %153, i32 0, i32 0
  %155 = extractvalue { double, double } %150, 0
  store double %155, ptr %154, align 16
  %156 = getelementptr inbounds { double, double }, ptr %153, i32 0, i32 1
  %157 = extractvalue { double, double } %150, 1
  store double %157, ptr %156, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #9
  %158 = invoke { double, double } @_ZNK3JPH5Mat4414GetTranslationEv(ptr noundef nonnull align 16 dereferenceable(64) %24)
          to label %159 unwind label %220

159:                                              ; preds = %151
  %160 = getelementptr inbounds %"class.JPH::Vec3", ptr %31, i32 0, i32 0
  %161 = getelementptr inbounds %union.anon, ptr %160, i32 0, i32 0
  %162 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 0
  %163 = extractvalue { double, double } %158, 0
  store double %163, ptr %162, align 16
  %164 = getelementptr inbounds { double, double }, ptr %161, i32 0, i32 1
  %165 = extractvalue { double, double } %158, 1
  store double %165, ptr %164, align 8
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %32, ptr align 16 %166, i64 16, i1 false), !tbaa.struct !24
  %167 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %168 = load double, ptr %167, align 16
  %169 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %170 = load double, ptr %169, align 8
  %171 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %31, double %168, double %170)
          to label %172 unwind label %220

172:                                              ; preds = %159
  %173 = getelementptr inbounds %"class.JPH::Vec3", ptr %30, i32 0, i32 0
  %174 = getelementptr inbounds %union.anon, ptr %173, i32 0, i32 0
  %175 = getelementptr inbounds { double, double }, ptr %174, i32 0, i32 0
  %176 = extractvalue { double, double } %171, 0
  store double %176, ptr %175, align 16
  %177 = getelementptr inbounds { double, double }, ptr %174, i32 0, i32 1
  %178 = extractvalue { double, double } %171, 1
  store double %178, ptr %177, align 8
  %179 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %180 = load double, ptr %179, align 16
  %181 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %182 = load double, ptr %181, align 8
  invoke void @_ZN3JPH4Vec4C2ENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(16) %29, double %180, double %182, float noundef 1.000000e+00)
          to label %183 unwind label %220

183:                                              ; preds = %172
  %184 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %185 = load double, ptr %184, align 16
  %186 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %187 = load double, ptr %186, align 8
  %188 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %189 = load double, ptr %188, align 16
  %190 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %191 = load double, ptr %190, align 8
  %192 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %193 = load double, ptr %192, align 16
  %194 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %195 = load double, ptr %194, align 8
  %196 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %197 = load double, ptr %196, align 16
  %198 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %199 = load double, ptr %198, align 8
  invoke void @_ZN3JPH5Mat44C2ENS_4Vec4ES1_S1_S1_(ptr noundef nonnull align 16 dereferenceable(64) %25, double %185, double %187, double %189, double %191, double %193, double %195, double %197, double %199)
          to label %200 unwind label %220

200:                                              ; preds = %183
  %201 = load ptr, ptr %7, align 8, !tbaa !5
  %202 = load i32, ptr %22, align 4, !tbaa !11
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds %"class.JPH::Mat44", ptr %201, i64 %203
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %204, ptr align 16 %25, i64 64, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  br label %205

205:                                              ; preds = %200
  %206 = load i32, ptr %22, align 4, !tbaa !11
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %22, align 4, !tbaa !11
  br label %107, !llvm.loop !27

208:                                              ; preds = %128
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %13, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %14, align 4
  br label %226

212:                                              ; preds = %131
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %13, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %14, align 4
  br label %225

216:                                              ; preds = %143, %135, %133
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %13, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %14, align 4
  br label %224

220:                                              ; preds = %183, %172, %159, %151
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %13, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #9
  br label %224

224:                                              ; preds = %220, %216
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #9
  br label %225

225:                                              ; preds = %224, %212
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #9
  br label %226

226:                                              ; preds = %225, %208
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %231

227:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @_ZN3JPH17BodyLockMultiBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #9
  store i32 0, ptr %10, align 4
  br label %228

228:                                              ; preds = %227, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  %229 = load i32, ptr %10, align 4
  switch i32 %229, label %238 [
    i32 0, label %230
    i32 1, label %230
  ]

230:                                              ; preds = %228, %228
  ret void

231:                                              ; preds = %226, %124, %120, %116
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #9
  br label %232

232:                                              ; preds = %231, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @_ZN3JPH17BodyLockMultiBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %233

233:                                              ; preds = %232
  %234 = load ptr, ptr %13, align 8
  %235 = load i32, ptr %14, align 4
  %236 = insertvalue { ptr, i32 } poison, ptr %234, 0
  %237 = insertvalue { ptr, i32 } %236, i32 %235, 1
  resume { ptr, i32 } %237

238:                                              ; preds = %228
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body17GetWorldTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) #4 align 2

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH4Vec4C2ENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(16), double, double, float noundef) unnamed_addr #8 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"="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 = { 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 #4 = { 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 #5 = { 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 = { 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 #7 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 64}
!14 = !{!"_ZTSN3JPH7RagdollE", !15, i64 0, !18, i64 8, !19, i64 16, !21, i64 40, !6, i64 64}
!15 = !{!"_ZTSN3JPH9RefTargetINS_7RagdollEEE", !16, i64 0}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !12, i64 0}
!18 = !{!"_ZTSN3JPH8RefConstINS_15RagdollSettingsEEE", !6, i64 0}
!19 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !20, i64 0, !20, i64 8, !6, i64 16}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_17TwoBodyConstraintEEENS_12STLAllocatorIS3_EEEE", !20, i64 0, !20, i64 8, !6, i64 16}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{i64 0, i64 16, !25}
!25 = !{!7, !7, i64 0}
!26 = !{i64 0, i64 64, !25}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; 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::BodyLockMultiRead" = type { %"class.JPH::BodyLockMultiBase.base", [4 x i8] }
%"class.JPH::BodyLockMultiBase.base" = type <{ ptr, i64, ptr, i32 }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.2 }
%union.anon.2 = type { <4 x float> }
%"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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress 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 void @_ZN3JPH4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16), float noundef, float noundef, float noundef, float noundef) unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPHL21sGetBodyLockInterfaceEPKNS_13PhysicsSystemEb(ptr noundef, i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17BodyLockMultiReadCI2NS_17BodyLockMultiBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 noundef) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH17BodyLockMultiBaseILb0EKNS_4BodyEE7GetBodyEi(ptr noundef nonnull align 8 dereferenceable(28), i32 noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH7Ragdoll7GetPoseERNS_4Vec3EPNS_5Mat44Eb(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr nocapture noundef nonnull align 16 dereferenceable(16) %1, ptr nocapture noundef writeonly %2, i1 noundef zeroext %3) local_unnamed_addr #7 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.JPH::BodyLockMultiRead", align 8
  %6 = alloca %"class.JPH::Mat44", align 16
  %7 = alloca %"class.JPH::Mat44", align 16
  %8 = alloca %"class.JPH::Vec4", align 16
  %9 = alloca %"class.JPH::Mat44", align 16
  %10 = alloca %"class.JPH::Mat44", align 16
  %11 = alloca %"class.JPH::Vec4", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = tail call noundef i64 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  %15 = trunc i64 %14 to i32
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %94, label %17

17:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #9
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPHL21sGetBodyLockInterfaceEPKNS_13PhysicsSystemEb(ptr noundef %19, i1 noundef zeroext %3)
  %21 = tail call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @_ZN3JPH17BodyLockMultiReadCI2NS_17BodyLockMultiBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef %21, i32 noundef %15)
  %22 = invoke noundef ptr @_ZNK3JPH17BodyLockMultiBaseILb0EKNS_4BodyEE7GetBodyEi(ptr noundef nonnull align 8 dereferenceable(28) %5, i32 noundef 0)
          to label %23 unwind label %48

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #9
  invoke void @_ZNK3JPH4Body17GetWorldTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %6, ptr noundef nonnull align 16 dereferenceable(122) %22)
          to label %24 unwind label %50

24:                                               ; preds = %23
  %25 = invoke { double, double } @_ZNK3JPH5Mat4414GetTranslationEv(ptr noundef nonnull align 16 dereferenceable(64) %6)
          to label %26 unwind label %52

26:                                               ; preds = %24
  %27 = extractvalue { double, double } %25, 0
  %28 = extractvalue { double, double } %25, 1
  store double %27, ptr %1, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  store double %28, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #9
  %29 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %6, i32 noundef 0)
          to label %30 unwind label %54

30:                                               ; preds = %26
  %31 = extractvalue { double, double } %29, 0
  %32 = extractvalue { double, double } %29, 1
  %33 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %6, i32 noundef 1)
          to label %34 unwind label %54

34:                                               ; preds = %30
  %35 = extractvalue { double, double } %33, 0
  %36 = extractvalue { double, double } %33, 1
  %37 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %6, i32 noundef 2)
          to label %38 unwind label %54

38:                                               ; preds = %34
  invoke void @_ZN3JPH4Vec4C2Effff(ptr noundef nonnull align 16 dereferenceable(16) %8, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %39 unwind label %54

39:                                               ; preds = %38
  %40 = extractvalue { double, double } %37, 1
  %41 = extractvalue { double, double } %37, 0
  %42 = load double, ptr %8, align 16
  %43 = getelementptr inbounds i8, ptr %8, i64 8
  %44 = load double, ptr %43, align 8
  call void @_ZN3JPH5Mat44C2ENS_4Vec4ES1_S1_S1_(ptr noundef nonnull align 16 dereferenceable(64) %7, double %31, double %32, double %35, double %36, double %41, double %40, double %42, double %44)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %2, ptr noundef nonnull align 16 dereferenceable(64) %7, i64 64, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #9
  %45 = icmp sgt i32 %15, 1
  br i1 %45, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %39
  %46 = getelementptr inbounds i8, ptr %12, i64 8
  %47 = getelementptr inbounds i8, ptr %11, i64 8
  %wide.trip.count = and i64 %14, 2147483647
  br label %56

._crit_edge:                                      ; preds = %78, %39
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #9
  call void @_ZN3JPH17BodyLockMultiBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  br label %94

48:                                               ; preds = %17
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %96

50:                                               ; preds = %23
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %95

52:                                               ; preds = %24
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %95

54:                                               ; preds = %38, %34, %30, %26
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #9
  br label %95

56:                                               ; preds = %.lr.ph, %78
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %78 ]
  %57 = trunc nuw nsw i64 %indvars.iv to i32
  %58 = invoke noundef ptr @_ZNK3JPH17BodyLockMultiBaseILb0EKNS_4BodyEE7GetBodyEi(ptr noundef nonnull align 8 dereferenceable(28) %5, i32 noundef %57)
          to label %59 unwind label %84

59:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #9
  invoke void @_ZNK3JPH4Body17GetWorldTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %9, ptr noundef nonnull align 16 dereferenceable(122) %58)
          to label %60 unwind label %86

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #9
  %61 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %9, i32 noundef 0)
          to label %62 unwind label %88

62:                                               ; preds = %60
  %63 = extractvalue { double, double } %61, 0
  %64 = extractvalue { double, double } %61, 1
  %65 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %9, i32 noundef 1)
          to label %66 unwind label %88

66:                                               ; preds = %62
  %67 = extractvalue { double, double } %65, 0
  %68 = extractvalue { double, double } %65, 1
  %69 = invoke { double, double } @_ZNK3JPH5Mat4410GetColumn4Ej(ptr noundef nonnull align 16 dereferenceable(64) %9, i32 noundef 2)
          to label %70 unwind label %88

70:                                               ; preds = %66
  %71 = extractvalue { double, double } %69, 0
  %72 = extractvalue { double, double } %69, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #9
  %73 = invoke { double, double } @_ZNK3JPH5Mat4414GetTranslationEv(ptr noundef nonnull align 16 dereferenceable(64) %9)
          to label %74 unwind label %90

74:                                               ; preds = %70
  %75 = extractvalue { double, double } %73, 0
  store double %75, ptr %12, align 16
  %76 = extractvalue { double, double } %73, 1
  store double %76, ptr %46, align 8
  %.sroa.0.0.copyload = load double, ptr %1, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !18
  %77 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
          to label %78 unwind label %90

78:                                               ; preds = %74
  %79 = extractvalue { double, double } %77, 0
  %80 = extractvalue { double, double } %77, 1
  call void @_ZN3JPH4Vec4C2ENS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(16) %11, double %79, double %80, float noundef 1.000000e+00)
  %81 = load double, ptr %11, align 16
  %82 = load double, ptr %47, align 8
  call void @_ZN3JPH5Mat44C2ENS_4Vec4ES1_S1_S1_(ptr noundef nonnull align 16 dereferenceable(64) %10, double %63, double %64, double %67, double %68, double %71, double %72, double %81, double %82)
  %83 = getelementptr inbounds %"class.JPH::Mat44", ptr %2, i64 %indvars.iv
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %83, ptr noundef nonnull align 16 dereferenceable(64) %10, i64 64, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %56, !llvm.loop !20

84:                                               ; preds = %56
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %95

86:                                               ; preds = %59
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %93

88:                                               ; preds = %66, %62, %60
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %74, %70
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #9
  br label %92

92:                                               ; preds = %90, %88
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #9
  br label %93

93:                                               ; preds = %92, %86
  %.pn.pn = phi { ptr, i32 } [ %.pn, %92 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #9
  br label %95

94:                                               ; preds = %4, %._crit_edge
  ret void

95:                                               ; preds = %84, %93, %54, %52, %50
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ], [ %51, %50 ], [ %.pn.pn, %93 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #9
  br label %96

96:                                               ; preds = %95, %48
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %95 ], [ %49, %48 ]
  call void @_ZN3JPH17BodyLockMultiBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #9
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body17GetWorldTransformEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #4 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 #6 align 2

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

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

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

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


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