; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Character (Character)

; 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.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.JPH::CharacterBase" = type { ptr, %"class.JPH::RefTarget", ptr, %"class.JPH::RefConst", %"class.JPH::Vec3", %"class.JPH::Plane", float, i32, %"class.JPH::BodyID", %"class.JPH::SubShapeID", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::RefConst.1", i64 }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::Character" = type <{ %"class.JPH::CharacterBase", %"class.JPH::BodyID", i16, [10 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: mustprogress uwtable
declare dso_local void @_ZNK3JPH9Character14CheckCollisionERKNS_5Mat44ENS_4Vec3EfPKNS_5ShapeES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEEb(ptr noundef nonnull align 16 dereferenceable(150), ptr noundef nonnull align 16 dereferenceable(64), double, double, float noundef, ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH9Character14CheckCollisionEPKNS_5ShapeEfNS_4Vec3ERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEEb(ptr noundef nonnull align 16 dereferenceable(150) %0, ptr noundef %1, float noundef %2, double %3, double %4, ptr noundef nonnull align 8 dereferenceable(24) %5, i1 noundef zeroext %6) #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca %"class.JPH::Mat44", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::BodyLockRead", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca %"class.JPH::Mat44", align 16
  %22 = alloca %"class.JPH::Mat44", align 16
  %23 = alloca %"class.JPH::Vec3", align 16
  %24 = alloca %"class.JPH::Vec3", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Vec3", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  store double %3, ptr %29, align 16
  %30 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  store double %4, ptr %30, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store float %2, ptr %11, align 4, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  %31 = zext i1 %6 to i8
  store i8 %31, ptr %13, align 1, !tbaa !11
  %32 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #8
  %33 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %32, i32 0, i32 2
  %34 = load ptr, ptr %33, align 16, !tbaa !13
  %35 = load i8, ptr %13, align 1, !tbaa !11, !range !28, !noundef !29
  %36 = trunc i8 %35 to i1
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPHL21sGetBodyLockInterfaceEPKNS_13PhysicsSystemEb(ptr noundef %34, i1 noundef zeroext %36)
  %38 = getelementptr inbounds %"class.JPH::Character", ptr %32, i32 0, i32 1
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %39 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %40 unwind label %42

40:                                               ; preds = %7
  br i1 %39, label %46, label %41

41:                                               ; preds = %40
  store i32 1, ptr %19, align 4
  br label %103

42:                                               ; preds = %7
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %17, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %18, align 4
  br label %140

46:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %47 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %48 unwind label %122

48:                                               ; preds = %46
  store ptr %47, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #8
  %49 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %22, ptr noundef nonnull align 16 dereferenceable(122) %49)
          to label %50 unwind label %126

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load ptr, ptr %51, align 8, !tbaa !30
  %53 = getelementptr inbounds ptr, ptr %52, i64 3
  %54 = load ptr, ptr %53, align 8
  %55 = invoke { double, double } %54(ptr noundef nonnull align 8 dereferenceable(26) %51)
          to label %56 unwind label %130

56:                                               ; preds = %50
  %57 = getelementptr inbounds %"class.JPH::Vec3", ptr %24, i32 0, i32 0
  %58 = getelementptr inbounds %union.anon, ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 0
  %60 = extractvalue { double, double } %55, 0
  store double %60, ptr %59, align 16
  %61 = getelementptr inbounds { double, double }, ptr %58, i32 0, i32 1
  %62 = extractvalue { double, double } %55, 1
  store double %62, ptr %61, align 8
  %63 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %32, i32 0, i32 3
  %64 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %63)
          to label %65 unwind label %130

65:                                               ; preds = %56
  %66 = load ptr, ptr %64, align 8, !tbaa !30
  %67 = getelementptr inbounds ptr, ptr %66, i64 3
  %68 = load ptr, ptr %67, align 8
  %69 = invoke { double, double } %68(ptr noundef nonnull align 8 dereferenceable(26) %64)
          to label %70 unwind label %130

70:                                               ; preds = %65
  %71 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %72 = getelementptr inbounds %union.anon, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 0
  %74 = extractvalue { double, double } %69, 0
  store double %74, ptr %73, align 16
  %75 = getelementptr inbounds { double, double }, ptr %72, i32 0, i32 1
  %76 = extractvalue { double, double } %69, 1
  store double %76, ptr %75, align 8
  %77 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %78 = load double, ptr %77, align 16
  %79 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %80 = load double, ptr %79, align 8
  %81 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %24, double %78, double %80)
          to label %82 unwind label %130

82:                                               ; preds = %70
  %83 = getelementptr inbounds %"class.JPH::Vec3", ptr %23, i32 0, i32 0
  %84 = getelementptr inbounds %union.anon, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds { double, double }, ptr %84, i32 0, i32 0
  %86 = extractvalue { double, double } %81, 0
  store double %86, ptr %85, align 16
  %87 = getelementptr inbounds { double, double }, ptr %84, i32 0, i32 1
  %88 = extractvalue { double, double } %81, 1
  store double %88, ptr %87, align 8
  %89 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 0
  %90 = load double, ptr %89, align 16
  %91 = getelementptr inbounds { double, double }, ptr %23, i32 0, i32 1
  %92 = load double, ptr %91, align 8
  invoke void @_ZNK3JPH5Mat4413PreTranslatedENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %21, ptr noundef nonnull align 16 dereferenceable(64) %22, double %90, double %92)
          to label %93 unwind label %130

93:                                               ; preds = %82
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %21, i64 64, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  %94 = load ptr, ptr %20, align 8, !tbaa !5
  %95 = invoke { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %94)
          to label %96 unwind label %135

96:                                               ; preds = %93
  %97 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %98 = getelementptr inbounds %union.anon, ptr %97, i32 0, i32 0
  %99 = getelementptr inbounds { double, double }, ptr %98, i32 0, i32 0
  %100 = extractvalue { double, double } %95, 0
  store double %100, ptr %99, align 16
  %101 = getelementptr inbounds { double, double }, ptr %98, i32 0, i32 1
  %102 = extractvalue { double, double } %95, 1
  store double %102, ptr %101, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 %26, i64 16, i1 false), !tbaa.struct !34
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  store i32 0, ptr %19, align 4
  br label %103

103:                                              ; preds = %96, %41
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  %104 = load i32, ptr %19, align 4
  switch i32 %104, label %119 [
    i32 0, label %105
  ]

105:                                              ; preds = %103
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %27, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !34
  %106 = load float, ptr %11, align 4, !tbaa !9
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %8, i64 16, i1 false), !tbaa.struct !34
  %108 = load ptr, ptr %12, align 8, !tbaa !5
  %109 = load i8, ptr %13, align 1, !tbaa !11, !range !28, !noundef !29
  %110 = trunc i8 %109 to i1
  %111 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 0
  %112 = load double, ptr %111, align 16
  %113 = getelementptr inbounds { double, double }, ptr %27, i32 0, i32 1
  %114 = load double, ptr %113, align 8
  %115 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %116 = load double, ptr %115, align 16
  %117 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %118 = load double, ptr %117, align 8
  call void @_ZNK3JPH9Character14CheckCollisionERKNS_5Mat44ENS_4Vec3EfPKNS_5ShapeES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEEb(ptr noundef nonnull align 16 dereferenceable(150) %32, ptr noundef nonnull align 16 dereferenceable(64) %14, double %112, double %114, float noundef %106, ptr noundef %107, double %116, double %118, ptr noundef nonnull align 8 dereferenceable(24) %108, i1 noundef zeroext %110)
  store i32 0, ptr %19, align 4
  br label %119

119:                                              ; preds = %105, %103
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #8
  %120 = load i32, ptr %19, align 4
  switch i32 %120, label %146 [
    i32 0, label %121
    i32 1, label %121
  ]

121:                                              ; preds = %119, %119
  ret void

122:                                              ; preds = %46
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %17, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %18, align 4
  br label %139

126:                                              ; preds = %48
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %17, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %18, align 4
  br label %134

130:                                              ; preds = %82, %70, %65, %56, %50
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %17, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #8
  br label %134

134:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %21) #8
  br label %139

135:                                              ; preds = %93
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %17, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %139

139:                                              ; preds = %135, %134, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %140

140:                                              ; preds = %139, %42
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #8
  br label %141

141:                                              ; preds = %140
  %142 = load ptr, ptr %17, align 8
  %143 = load i32, ptr %18, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145

146:                                              ; preds = %119
  unreachable
}

; 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 @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(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 } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #6 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="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 = { 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 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTSN3JPH13CharacterBaseE", !15, i64 8, !6, i64 16, !19, i64 24, !20, i64 32, !21, i64 48, !10, i64 64, !23, i64 68, !24, i64 72, !25, i64 76, !20, i64 80, !20, i64 96, !20, i64 112, !26, i64 128, !27, i64 136}
!15 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !16, i64 0}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!20 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!21 = !{!"_ZTSN3JPH5PlaneE", !22, i64 0}
!22 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!23 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !7, i64 0}
!24 = !{!"_ZTSN3JPH6BodyIDE", !18, i64 0}
!25 = !{!"_ZTSN3JPH10SubShapeIDE", !18, i64 0}
!26 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!27 = !{!"long", !7, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !8, i64 0}
!32 = !{i64 0, i64 64, !33}
!33 = !{!7, !7, i64 0}
!34 = !{i64 0, i64 16, !33}


; 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.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"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: mustprogress uwtable
declare dso_local void @_ZNK3JPH9Character14CheckCollisionERKNS_5Mat44ENS_4Vec3EfPKNS_5ShapeES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEEb(ptr noundef nonnull align 16 dereferenceable(150), ptr noundef nonnull align 16 dereferenceable(64), double, double, float noundef, ptr noundef, double, double, ptr noundef nonnull align 8 dereferenceable(24), i1 noundef zeroext) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH9Character14CheckCollisionEPKNS_5ShapeEfNS_4Vec3ERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEEb(ptr noundef nonnull align 16 dereferenceable(150) %0, ptr noundef %1, float noundef %2, double %3, double %4, ptr noundef nonnull align 8 dereferenceable(24) %5, i1 noundef zeroext %6) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.JPH::Mat44", align 16
  %9 = alloca %"class.JPH::BodyLockRead", align 8
  %10 = alloca %"class.JPH::Mat44", align 16
  %11 = alloca %"class.JPH::Mat44", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  %13 = getelementptr inbounds i8, ptr %0, i64 16
  %14 = load ptr, ptr %13, align 16, !tbaa !5
  %15 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3JPHL21sGetBodyLockInterfaceEPKNS_13PhysicsSystemEb(ptr noundef %14, i1 noundef zeroext %6)
  %16 = getelementptr inbounds i8, ptr %0, i64 144
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %17 = call noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  br i1 %17, label %18, label %45

18:                                               ; preds = %7
  %19 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %20 unwind label %50

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #8
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %11, ptr noundef nonnull align 16 dereferenceable(122) %19)
          to label %21 unwind label %52

21:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  %22 = load ptr, ptr %1, align 8, !tbaa !24
  %23 = getelementptr inbounds i8, ptr %22, i64 24
  %24 = load ptr, ptr %23, align 8
  %25 = invoke { double, double } %24(ptr noundef nonnull align 8 dereferenceable(26) %1)
          to label %26 unwind label %54

26:                                               ; preds = %21
  %27 = extractvalue { double, double } %25, 0
  store double %27, ptr %12, align 16
  %28 = getelementptr inbounds i8, ptr %12, i64 8
  %29 = extractvalue { double, double } %25, 1
  store double %29, ptr %28, align 8
  %30 = getelementptr inbounds i8, ptr %0, i64 24
  %31 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30)
  %32 = load ptr, ptr %31, align 8, !tbaa !24
  %33 = getelementptr inbounds i8, ptr %32, i64 24
  %34 = load ptr, ptr %33, align 8
  %35 = invoke { double, double } %34(ptr noundef nonnull align 8 dereferenceable(26) %31)
          to label %36 unwind label %54

36:                                               ; preds = %26
  %37 = extractvalue { double, double } %35, 0
  %38 = extractvalue { double, double } %35, 1
  %39 = invoke { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %12, double %37, double %38)
          to label %40 unwind label %54

40:                                               ; preds = %36
  %41 = extractvalue { double, double } %39, 0
  %42 = extractvalue { double, double } %39, 1
  invoke void @_ZNK3JPH5Mat4413PreTranslatedENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %10, ptr noundef nonnull align 16 dereferenceable(64) %11, double %41, double %42)
          to label %43 unwind label %54

43:                                               ; preds = %40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %8, ptr noundef nonnull align 16 dereferenceable(64) %10, i64 64, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #8
  %44 = invoke { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %19)
          to label %46 unwind label %57

45:                                               ; preds = %7
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  br label %49

46:                                               ; preds = %43
  %47 = extractvalue { double, double } %44, 0
  %48 = extractvalue { double, double } %44, 1
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNK3JPH9Character14CheckCollisionERKNS_5Mat44ENS_4Vec3EfPKNS_5ShapeES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEEb(ptr noundef nonnull align 16 dereferenceable(150) %0, ptr noundef nonnull align 16 dereferenceable(64) %8, double %47, double %48, float noundef %2, ptr noundef nonnull %1, double %3, double %4, ptr noundef nonnull align 8 dereferenceable(24) %5, i1 noundef zeroext %6)
  br label %49

49:                                               ; preds = %45, %46
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #8
  ret void

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

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

54:                                               ; preds = %40, %36, %26, %21
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  br label %56

56:                                               ; preds = %54, %52
  %.pn = phi { ptr, i32 } [ %55, %54 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #8
  br label %59

57:                                               ; preds = %43
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %59

59:                                               ; preds = %57, %56, %50
  %.pn26 = phi { ptr, i32 } [ %58, %57 ], [ %.pn, %56 ], [ %51, %50 ]
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #8
  resume { ptr, i32 } %.pn26
}

; 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 @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(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 } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #6 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #7 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="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 = { 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 = { 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 16}
!6 = !{!"_ZTSN3JPH13CharacterBaseE", !7, i64 8, !13, i64 16, !14, i64 24, !15, i64 32, !16, i64 48, !18, i64 64, !19, i64 68, !20, i64 72, !21, i64 76, !15, i64 80, !15, i64 96, !15, i64 112, !22, i64 128, !23, i64 136}
!7 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !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 = !{!"any pointer", !11, i64 0}
!14 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !13, i64 0}
!15 = !{!"_ZTSN3JPH4Vec3E", !11, i64 0}
!16 = !{!"_ZTSN3JPH5PlaneE", !17, i64 0}
!17 = !{!"_ZTSN3JPH4Vec4E", !11, i64 0}
!18 = !{!"float", !11, i64 0}
!19 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !11, i64 0}
!20 = !{!"_ZTSN3JPH6BodyIDE", !10, i64 0}
!21 = !{!"_ZTSN3JPH10SubShapeIDE", !10, i64 0}
!22 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !13, i64 0}
!23 = !{!"long", !11, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"vtable pointer", !12, i64 0}
!26 = !{i64 0, i64 64, !27}
!27 = !{!11, !11, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass