; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/Character (CharacterVirtualTest)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Color" = type { %union.anon.39 }
%union.anon.39 = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.12 }
%union.anon.12 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%class.CharacterBaseTest = type <{ %class.Test, %"class.JPH::RefConst", %"class.JPH::RefConst", %"class.JPH::RefConst", %"class.JPH::RefConst", %"class.JPH::Array", float, %"class.JPH::BodyID", %"class.JPH::BodyID", [4 x i8], %"class.JPH::CharacterVsCharacterCollisionSimple", float, [4 x i8], %"class.JPH::Vec3", %"class.JPH::BodyID", %"class.JPH::BodyID", %"class.JPH::BodyID", %"class.JPH::BodyID", %"class.JPH::BodyID", float, %"class.JPH::BodyID", [4 x i8], %"class.JPH::Ref", %"class.JPH::Ref.7", %"class.JPH::Ref.7", [8 x i8], %"class.JPH::Vec3", i8, i8, i8, i8, [12 x i8] }>
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::CharacterVsCharacterCollisionSimple" = type { %"class.JPH::CharacterVsCharacterCollision", %"class.JPH::Array.4" }
%"class.JPH::CharacterVsCharacterCollision" = type { ptr }
%"class.JPH::Array.4" = type { i64, i64, ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Ref.7" = type { ptr }
%"class.JPH::CharacterContactSettings" = type { i8, i8 }
%class.CharacterVirtualTest = type { %class.CharacterBaseTest.base, %"class.JPH::CharacterContactListener", %"class.JPH::Ref.7", %"class.JPH::Vec3", i8, %"class.JPH::Array.8" }
%class.CharacterBaseTest.base = type <{ %class.Test, %"class.JPH::RefConst", %"class.JPH::RefConst", %"class.JPH::RefConst", %"class.JPH::RefConst", %"class.JPH::Array", float, %"class.JPH::BodyID", %"class.JPH::BodyID", [4 x i8], %"class.JPH::CharacterVsCharacterCollisionSimple", float, [4 x i8], %"class.JPH::Vec3", %"class.JPH::BodyID", %"class.JPH::BodyID", %"class.JPH::BodyID", %"class.JPH::BodyID", %"class.JPH::BodyID", float, %"class.JPH::BodyID", [4 x i8], %"class.JPH::Ref", %"class.JPH::Ref.7", %"class.JPH::Ref.7", [8 x i8], %"class.JPH::Vec3", i8, i8, i8, i8 }>
%"class.JPH::CharacterContactListener" = type { ptr }
%"class.JPH::Array.8" = type { i64, i64, ptr }

@_ZN3JPH5Color6sGreenE = external global %"class.JPH::Color", align 4

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN20CharacterVirtualTest15OnContactCommonEPKN3JPH16CharacterVirtualERKNS0_6BodyIDERKNS0_10SubShapeIDENS0_4Vec3ESA_RNS0_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(400) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, double %4, double %5, double %6, double %7, ptr noundef nonnull align 1 dereferenceable(2) %8) #3 align 2 {
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.JPH::AABox", align 16
  %18 = alloca %"class.JPH::Mat44", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Color", align 4
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %4, ptr %23, align 16
  %24 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %5, ptr %24, align 8
  %25 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  store double %6, ptr %25, align 16
  %26 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  store double %7, ptr %26, align 8
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %8, ptr %16, align 8, !tbaa !5
  %27 = load ptr, ptr %12, align 8
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = getelementptr inbounds %class.CharacterBaseTest, ptr %27, i32 0, i32 8
  %30 = call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %29)
  br i1 %30, label %31, label %54

31:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #8
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = call noundef ptr @_ZNK3JPH13CharacterBase8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(144) %32)
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #8
  %34 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNK3JPH16CharacterVirtual24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %18, ptr noundef nonnull align 16 dereferenceable(372) %34)
  %35 = call { double, double } @_ZN3JPH4Vec34sOneEv()
  %36 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %37 = getelementptr inbounds %union.anon, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %39 = extractvalue { double, double } %35, 0
  store double %39, ptr %38, align 16
  %40 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %41 = extractvalue { double, double } %35, 1
  store double %41, ptr %40, align 8
  %42 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %43 = load double, ptr %42, align 16
  %44 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %45 = load double, ptr %44, align 8
  %46 = load ptr, ptr %33, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %46, i64 6
  %48 = load ptr, ptr %47, align 8
  call void %48(ptr dead_on_unwind writable sret(%"class.JPH::AABox") align 16 %17, ptr noundef nonnull align 8 dereferenceable(26) %33, ptr noundef nonnull align 16 dereferenceable(64) %18, double %43, double %45)
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #8
  %49 = getelementptr inbounds %class.Test, ptr %27, i32 0, i32 4
  %50 = load ptr, ptr %49, align 16, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 @_ZN3JPH5Color6sGreenE, i64 4, i1 false), !tbaa.struct !20
  %51 = getelementptr inbounds %"class.JPH::Color", ptr %20, i32 0, i32 0
  %52 = getelementptr inbounds %union.anon.39, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 4
  call void @_ZN3JPH13DebugRenderer7DrawBoxERKNS_5AABoxENS_5ColorENS0_11ECastShadowENS0_9EDrawModeE(ptr noundef nonnull align 8 dereferenceable(320) %50, ptr noundef nonnull align 16 dereferenceable(32) %17, i32 %53, i32 noundef 1, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #8
  br label %54

54:                                               ; preds = %31, %9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %55 = getelementptr inbounds %class.CharacterBaseTest, ptr %27, i32 0, i32 5
  %56 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %55)
  %57 = getelementptr inbounds %class.CharacterBaseTest, ptr %27, i32 0, i32 5
  %58 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %57)
  %59 = load ptr, ptr %14, align 8, !tbaa !5
  %60 = call noundef ptr @_ZSt4findIPN3JPH6BodyIDES1_ET_S3_S3_RKT0_(ptr noundef %56, ptr noundef %58, ptr noundef nonnull align 4 dereferenceable(4) %59)
  store ptr %60, ptr %21, align 8, !tbaa !5
  %61 = load ptr, ptr %21, align 8, !tbaa !5
  %62 = getelementptr inbounds %class.CharacterBaseTest, ptr %27, i32 0, i32 5
  %63 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %62)
  %64 = icmp ne ptr %61, %63
  br i1 %64, label %65, label %85

65:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %66 = load ptr, ptr %21, align 8, !tbaa !5
  %67 = getelementptr inbounds %class.CharacterBaseTest, ptr %27, i32 0, i32 5
  %68 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %67)
  %69 = ptrtoint ptr %66 to i64
  %70 = ptrtoint ptr %68 to i64
  %71 = sub i64 %69, %70
  %72 = sdiv exact i64 %71, 4
  store i64 %72, ptr %22, align 8, !tbaa !22
  %73 = load i64, ptr %22, align 8, !tbaa !22
  %74 = and i64 %73, 1
  %75 = icmp ne i64 %74, 0
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.JPH::CharacterContactSettings", ptr %76, i32 0, i32 0
  %78 = zext i1 %75 to i8
  store i8 %78, ptr %77, align 1, !tbaa !23
  %79 = load i64, ptr %22, align 8, !tbaa !22
  %80 = and i64 %79, 2
  %81 = icmp ne i64 %80, 0
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.JPH::CharacterContactSettings", ptr %82, i32 0, i32 1
  %84 = zext i1 %81 to i8
  store i8 %84, ptr %83, align 1, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %85

85:                                               ; preds = %65, %54
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.CharacterVirtualTest, ptr %27, i32 0, i32 2
  %88 = call noundef ptr @_ZNK3JPH3RefINS_16CharacterVirtualEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %87)
  %89 = icmp eq ptr %86, %88
  br i1 %89, label %90, label %104

90:                                               ; preds = %85
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.JPH::CharacterContactSettings", ptr %91, i32 0, i32 0
  %93 = load i8, ptr %92, align 1, !tbaa !23, !range !26, !noundef !27
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %104

95:                                               ; preds = %90
  %96 = getelementptr inbounds %class.Test, ptr %27, i32 0, i32 2
  %97 = load ptr, ptr %96, align 16, !tbaa !28
  %98 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %97)
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = call noundef zeroext i8 @_ZNK3JPH13BodyInterface13GetMotionTypeERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 4 dereferenceable(4) %99)
  %101 = icmp ne i8 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %95
  %103 = getelementptr inbounds %class.CharacterVirtualTest, ptr %27, i32 0, i32 4
  store i8 1, ptr %103, align 16, !tbaa !29
  br label %104

104:                                              ; preds = %102, %95, %90, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  ret void
}

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

declare void @_ZN3JPH13DebugRenderer7DrawBoxERKNS_5AABoxENS_5ColorENS0_11ECastShadowENS0_9EDrawModeE(ptr noundef nonnull align 8 dereferenceable(320), ptr noundef nonnull align 16 dereferenceable(32), i32, i32 noundef, i32 noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4findIPN3JPH6BodyIDES1_ET_S3_S3_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) #7 align 2

declare noundef zeroext i8 @_ZNK3JPH13BodyInterface13GetMotionTypeERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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"="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 = { "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 = { 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 #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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48, !14, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !15, i64 0}
!15 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !16, i64 8, !17, i64 16, !16, i64 24, !18, i64 32, !6, i64 48}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!18 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !19, i64 0, !16, i64 8}
!19 = !{!"float", !7, i64 0}
!20 = !{i64 0, i64 4, !21}
!21 = !{!7, !7, i64 0}
!22 = !{!16, !16, i64 0}
!23 = !{!24, !13, i64 0}
!24 = !{!"_ZTSN3JPH24CharacterContactSettingsE", !13, i64 0, !13, i64 1}
!25 = !{!24, !13, i64 1}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!12, !6, i64 16}
!29 = !{!30, !13, i64 368}
!30 = !{!"_ZTS20CharacterVirtualTest", !31, i64 0, !42, i64 328, !41, i64 336, !39, i64 352, !13, i64 368, !43, i64 376}
!31 = !{!"_ZTS17CharacterBaseTest", !12, i64 0, !32, i64 112, !32, i64 120, !32, i64 128, !32, i64 136, !33, i64 144, !19, i64 168, !34, i64 172, !34, i64 176, !36, i64 184, !19, i64 216, !39, i64 224, !34, i64 240, !34, i64 244, !34, i64 248, !34, i64 252, !34, i64 256, !19, i64 260, !34, i64 264, !40, i64 272, !41, i64 280, !41, i64 288, !39, i64 304, !13, i64 320, !13, i64 321, !13, i64 322, !13, i64 323}
!32 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!33 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!34 = !{!"_ZTSN3JPH6BodyIDE", !35, i64 0}
!35 = !{!"int", !7, i64 0}
!36 = !{!"_ZTSN3JPH35CharacterVsCharacterCollisionSimpleE", !37, i64 0, !38, i64 8}
!37 = !{!"_ZTSN3JPH29CharacterVsCharacterCollisionE"}
!38 = !{!"_ZTSN3JPH5ArrayIPNS_16CharacterVirtualENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!39 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!40 = !{!"_ZTSN3JPH3RefINS_9CharacterEEE", !6, i64 0}
!41 = !{!"_ZTSN3JPH3RefINS_16CharacterVirtualEEE", !6, i64 0}
!42 = !{!"_ZTSN3JPH24CharacterContactListenerE"}
!43 = !{!"_ZTSN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}


; 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::Color" = type { %union.anon.39 }
%union.anon.39 = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.12 }
%union.anon.12 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }

@_ZN3JPH5Color6sGreenE = external local_unnamed_addr global %"class.JPH::Color", align 4

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN20CharacterVirtualTest15OnContactCommonEPKN3JPH16CharacterVirtualERKNS0_6BodyIDERKNS0_10SubShapeIDENS0_4Vec3ESA_RNS0_24CharacterContactSettingsE(ptr noundef nonnull align 16 dereferenceable(400) %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr nocapture noundef nonnull readnone align 4 dereferenceable(4) %3, double %4, double %5, double %6, double %7, ptr nocapture noundef nonnull align 1 dereferenceable(2) %8) local_unnamed_addr #2 align 2 {
  %10 = alloca %"class.JPH::AABox", align 16
  %11 = alloca %"class.JPH::Mat44", align 16
  %12 = getelementptr inbounds i8, ptr %0, i64 176
  %13 = tail call noundef zeroext i1 @_ZNK3JPH6BodyIDeqERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %12)
  br i1 %13, label %14, label %24

14:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  %15 = tail call noundef ptr @_ZNK3JPH13CharacterBase8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(144) %1)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #7
  call void @_ZNK3JPH16CharacterVirtual24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %11, ptr noundef nonnull align 16 dereferenceable(372) %1)
  %16 = call { double, double } @_ZN3JPH4Vec34sOneEv()
  %17 = extractvalue { double, double } %16, 0
  %18 = extractvalue { double, double } %16, 1
  %19 = load ptr, ptr %15, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 48
  %21 = load ptr, ptr %20, align 8
  call void %21(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %10, ptr noundef nonnull align 8 dereferenceable(26) %15, ptr noundef nonnull align 16 dereferenceable(64) %11, double %17, double %18)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = load ptr, ptr %22, align 16, !tbaa !8
  %.sroa.0.0.copyload = load i32, ptr @_ZN3JPH5Color6sGreenE, align 4, !tbaa !19
  call void @_ZN3JPH13DebugRenderer7DrawBoxERKNS_5AABoxENS_5ColorENS0_11ECastShadowENS0_9EDrawModeE(ptr noundef nonnull align 8 dereferenceable(320) %23, ptr noundef nonnull align 16 dereferenceable(32) %10, i32 %.sroa.0.0.copyload, i32 noundef 1, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  br label %24

24:                                               ; preds = %14, %9
  %25 = getelementptr inbounds i8, ptr %0, i64 144
  %26 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %27 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %28 = call noundef ptr @_ZSt4findIPN3JPH6BodyIDES1_ET_S3_S3_RKT0_(ptr noundef %26, ptr noundef %27, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %29 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %.not = icmp eq ptr %28, %29
  br i1 %.not, label %41, label %30

30:                                               ; preds = %24
  %31 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %32 = ptrtoint ptr %28 to i64
  %33 = ptrtoint ptr %31 to i64
  %34 = sub i64 %32, %33
  %35 = trunc i64 %34 to i8
  %36 = lshr i8 %35, 2
  %37 = and i8 %36, 1
  store i8 %37, ptr %8, align 1, !tbaa !20
  %38 = getelementptr inbounds i8, ptr %8, i64 1
  %39 = lshr i8 %35, 3
  %40 = and i8 %39, 1
  store i8 %40, ptr %38, align 1, !tbaa !22
  br label %41

41:                                               ; preds = %30, %24
  %42 = getelementptr inbounds i8, ptr %0, i64 336
  %43 = call noundef ptr @_ZNK3JPH3RefINS_16CharacterVirtualEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %42)
  %44 = icmp eq ptr %43, %1
  br i1 %44, label %45, label %55

45:                                               ; preds = %41
  %46 = load i8, ptr %8, align 1, !tbaa !20, !range !23, !noundef !24
  %47 = trunc nuw i8 %46 to i1
  br i1 %47, label %48, label %55

48:                                               ; preds = %45
  %49 = getelementptr inbounds i8, ptr %0, i64 16
  %50 = load ptr, ptr %49, align 16, !tbaa !25
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %50)
  %52 = call noundef zeroext i8 @_ZNK3JPH13BodyInterface13GetMotionTypeERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %51, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %.not17 = icmp eq i8 %52, 0
  br i1 %.not17, label %55, label %53

53:                                               ; preds = %48
  %54 = getelementptr inbounds i8, ptr %0, i64 368
  store i8 1, ptr %54, align 16, !tbaa !26
  br label %55

55:                                               ; preds = %53, %48, %45, %41
  ret void
}

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

declare void @_ZN3JPH13DebugRenderer7DrawBoxERKNS_5AABoxENS_5ColorENS0_11ECastShadowENS0_9EDrawModeE(ptr noundef nonnull align 8 dereferenceable(320), ptr noundef nonnull align 16 dereferenceable(32), i32, i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4findIPN3JPH6BodyIDES1_ET_S3_S3_RKT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) local_unnamed_addr #6 align 2

declare noundef zeroext i8 @_ZNK3JPH13BodyInterface13GetMotionTypeERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 32}
!9 = !{!"_ZTS4Test", !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !12, i64 48, !13, i64 56}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"bool", !11, i64 0}
!13 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !10, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !10, i64 48}
!15 = !{!"long", !11, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !10, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !11, i64 0}
!19 = !{!11, !11, i64 0}
!20 = !{!21, !12, i64 0}
!21 = !{!"_ZTSN3JPH24CharacterContactSettingsE", !12, i64 0, !12, i64 1}
!22 = !{!21, !12, i64 1}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!9, !10, i64 16}
!26 = !{!27, !12, i64 368}
!27 = !{!"_ZTS20CharacterVirtualTest", !28, i64 0, !39, i64 328, !38, i64 336, !36, i64 352, !12, i64 368, !40, i64 376}
!28 = !{!"_ZTS17CharacterBaseTest", !9, i64 0, !29, i64 112, !29, i64 120, !29, i64 128, !29, i64 136, !30, i64 144, !18, i64 168, !31, i64 172, !31, i64 176, !33, i64 184, !18, i64 216, !36, i64 224, !31, i64 240, !31, i64 244, !31, i64 248, !31, i64 252, !31, i64 256, !18, i64 260, !31, i64 264, !37, i64 272, !38, i64 280, !38, i64 288, !36, i64 304, !12, i64 320, !12, i64 321, !12, i64 322, !12, i64 323}
!29 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !10, i64 0}
!30 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !15, i64 0, !15, i64 8, !10, i64 16}
!31 = !{!"_ZTSN3JPH6BodyIDE", !32, i64 0}
!32 = !{!"int", !11, i64 0}
!33 = !{!"_ZTSN3JPH35CharacterVsCharacterCollisionSimpleE", !34, i64 0, !35, i64 8}
!34 = !{!"_ZTSN3JPH29CharacterVsCharacterCollisionE"}
!35 = !{!"_ZTSN3JPH5ArrayIPNS_16CharacterVirtualENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !10, i64 16}
!36 = !{!"_ZTSN3JPH4Vec3E", !11, i64 0}
!37 = !{!"_ZTSN3JPH3RefINS_9CharacterEEE", !10, i64 0}
!38 = !{!"_ZTSN3JPH3RefINS_16CharacterVirtualEEE", !10, i64 0}
!39 = !{!"_ZTSN3JPH24CharacterContactListenerE"}
!40 = !{!"_ZTSN3JPH5ArrayINS_16CharacterVirtual10ContactKeyENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !10, i64 16}


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