; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics/qparticle.ll (ZN9QParticle11SetPositionE7QVector)

; 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"

%struct.QVector = type { float, float }
%class.QParticle = type <{ float, %struct.QVector, %struct.QVector, %struct.QVector, float, ptr, i8, [3 x i8], %struct.QVector, [4 x i8], %"class.std::vector", i8, i8, [2 x i8], %class.QAABB, i8, [7 x i8], %"class.std::unordered_set", %"class.std::unordered_set.5", %"class.std::unordered_set.5", i8, i8, [6 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.QAABB = type { %struct.QVector, %struct.QVector, %struct.QVector, float }
%"class.std::unordered_set" = 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.std::unordered_set.5" = type { %"class.std::_Hashtable.6" }
%"class.std::_Hashtable.6" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%class.QBody = type <{ ptr, float, float, ptr, %struct.QVector, %struct.QVector, float, float, %class.QAABB, i32, i8, i8, i8, i8, float, i32, i8, [3 x i8], float, i8, i8, [2 x i8], %struct.QVector, float, float, float, float, float, i32, i32, i8, i8, i8, i8, i32, i32, i32, i8, [3 x i8], %"class.std::function", %"class.std::function", %"class.std::function.55", i8, [7 x i8], %"class.std::vector.58", i32, i8, [3 x i8] }>
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.std::function.55" = type { %"class.std::_Function_base", ptr }
%"class.std::vector.58" = type { %"struct.std::_Vector_base.59" }
%"struct.std::_Vector_base.59" = type { %"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl" }
%"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QMesh *, std::allocator<QMesh *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.QMesh = type { %"class.std::vector.25", %struct.QVector, %struct.QVector, float, float, %"class.std::vector.30", %"class.std::vector.35", %"class.std::vector.25", %"class.std::vector.40", %"class.std::vector", float, ptr, i32, %"class.std::vector.45", i8, i8, %"class.std::vector.50", float, i8, i8, i8, i8 }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl" }
%"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QSpring *, std::allocator<QSpring *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = type { %"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl" }
%"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QAngleConstraint *, std::allocator<QAngleConstraint *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = type { %"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<QParticle *>, std::allocator<std::vector<QParticle *>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.45" = type { %"struct.std::_Vector_base.46" }
%"struct.std::_Vector_base.46" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<int>, std::allocator<std::vector<int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.50" = type { %"struct.std::_Vector_base.51" }
%"struct.std::_Vector_base.51" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN9QParticle11SetPositionE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %0, <2 x float> %1) #3 align 2 {
  %3 = alloca %struct.QVector, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  store <2 x float> %1, ptr %3, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %4, align 8
  %7 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %7, ptr align 4 %3, i64 8, i1 false), !tbaa.struct !9
  %8 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 5
  %9 = load ptr, ptr %8, align 8, !tbaa !12
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %14

11:                                               ; preds = %2
  %12 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 3
  %13 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %12, i64 8, i1 false), !tbaa.struct !9
  br label %36

14:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %15 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 5
  %16 = load ptr, ptr %15, align 8, !tbaa !12
  %17 = call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %16)
  store ptr %17, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %35

20:                                               ; preds = %14
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %class.QBody, ptr %21, i32 0, i32 10
  store i8 1, ptr %22, align 8, !tbaa !28
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %class.QBody, ptr %23, i32 0, i32 11
  store i8 1, ptr %24, align 1, !tbaa !41
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call noundef i32 @_ZN5QBody11GetBodyTypeEv(ptr noundef nonnull align 8 dereferenceable(293) %25)
  %27 = icmp eq i32 %26, 2
  br i1 %27, label %28, label %31

28:                                               ; preds = %20
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noundef ptr @_ZN5QBody6WakeUpEv(ptr noundef nonnull align 8 dereferenceable(293) %29)
  br label %31

31:                                               ; preds = %28, %20
  %32 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 5
  %33 = load ptr, ptr %32, align 8, !tbaa !12
  %34 = getelementptr inbounds %struct.QMesh, ptr %33, i32 0, i32 18
  store i8 1, ptr %34, align 4, !tbaa !42
  br label %35

35:                                               ; preds = %31, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %36

36:                                               ; preds = %35, %11
  ret ptr %6
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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"="64" "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !7, i64 0}
!12 = !{!13, !6, i64 32}
!13 = !{!"_ZTS9QParticle", !11, i64 0, !14, i64 4, !14, i64 12, !14, i64 20, !11, i64 28, !6, i64 32, !15, i64 40, !14, i64 44, !16, i64 56, !15, i64 80, !15, i64 81, !20, i64 84, !15, i64 112, !21, i64 120, !26, i64 176, !26, i64 232, !15, i64 288, !15, i64 289}
!14 = !{!"_ZTS7QVector", !11, i64 0, !11, i64 4}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSSt6vectorI7QVectorSaIS0_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseI7QVectorSaIS0_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTS5QAABB", !14, i64 0, !14, i64 8, !14, i64 16, !11, i64 24}
!21 = !{!"_ZTSSt13unordered_setIP9QParticleSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSSt10_HashtableIP9QParticleS1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !23, i64 8, !24, i64 16, !23, i64 24, !25, i64 32, !6, i64 48}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!25 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !11, i64 0, !23, i64 8}
!26 = !{!"_ZTSSt13unordered_setIP5QBodySt4hashIS1_ESt8equal_toIS1_ESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt10_HashtableIP5QBodyS1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !23, i64 8, !24, i64 16, !23, i64 24, !25, i64 32, !6, i64 48}
!28 = !{!29, !15, i64 80}
!29 = !{!"_ZTS5QBody", !11, i64 8, !11, i64 12, !6, i64 16, !14, i64 24, !14, i64 32, !11, i64 40, !11, i64 44, !20, i64 48, !30, i64 76, !15, i64 80, !15, i64 81, !15, i64 82, !11, i64 84, !31, i64 88, !15, i64 92, !11, i64 96, !15, i64 100, !15, i64 101, !14, i64 104, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !32, i64 132, !32, i64 136, !15, i64 140, !15, i64 141, !15, i64 142, !32, i64 144, !32, i64 148, !32, i64 152, !15, i64 156, !33, i64 160, !33, i64 192, !35, i64 224, !15, i64 256, !36, i64 264, !40, i64 288, !15, i64 292}
!30 = !{!"_ZTSN5QBody5ModesE", !7, i64 0}
!31 = !{!"_ZTSN5QBody9BodyTypesE", !7, i64 0}
!32 = !{!"int", !7, i64 0}
!33 = !{!"_ZTSSt8functionIFvP5QBodyEE", !34, i64 0, !6, i64 24}
!34 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!35 = !{!"_ZTSSt8functionIFbP5QBodyNS0_13CollisionInfoEEE", !34, i64 0, !6, i64 24}
!36 = !{!"_ZTSSt6vectorIP5QMeshSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIP5QMeshSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!40 = !{!"_ZTSN5QBody16SimulationModelsE", !7, i64 0}
!41 = !{!29, !15, i64 81}
!42 = !{!43, !15, i64 252}
!43 = !{!"_ZTS5QMesh", !44, i64 0, !14, i64 24, !14, i64 32, !11, i64 40, !11, i64 44, !48, i64 48, !52, i64 72, !44, i64 96, !56, i64 120, !16, i64 144, !11, i64 168, !6, i64 176, !60, i64 184, !61, i64 192, !15, i64 216, !15, i64 217, !65, i64 224, !11, i64 248, !15, i64 252, !15, i64 253, !15, i64 254, !15, i64 255}
!44 = !{!"_ZTSSt6vectorIP9QParticleSaIS1_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseIP9QParticleSaIS1_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!48 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !49, i64 0}
!49 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!52 = !{!"_ZTSSt6vectorIP16QAngleConstraintSaIS1_EE", !53, i64 0}
!53 = !{!"_ZTSSt12_Vector_baseIP16QAngleConstraintSaIS1_EE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE12_Vector_implE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!56 = !{!"_ZTSSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE", !57, i64 0}
!57 = !{!"_ZTSSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE", !58, i64 0}
!58 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE12_Vector_implE", !59, i64 0}
!59 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!60 = !{!"_ZTSN5QMesh18CollisionBehaviorsE", !7, i64 0}
!61 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !62, i64 0}
!62 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !63, i64 0}
!63 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !64, i64 0}
!64 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!65 = !{!"_ZTSSt6vectorIfSaIfEE", !66, i64 0}
!66 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !67, i64 0}
!67 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !68, i64 0}
!68 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !6, i64 0, !6, 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"

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5QBody11GetBodyTypeEv(ptr noundef nonnull align 8 dereferenceable(293)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef nonnull ptr @_ZN9QParticle11SetPositionE7QVector(ptr noundef nonnull returned align 8 dereferenceable(290) %0, <2 x float> %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 20
  store <2 x float> %1, ptr %3, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %9

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 4
  store <2 x float> %1, ptr %8, align 4
  br label %21

9:                                                ; preds = %2
  %10 = tail call noundef ptr @_ZN5QMesh12GetOwnerBodyEv(ptr noundef nonnull align 8 dereferenceable(256) %5)
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %21, label %11

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %10, i64 80
  store i8 1, ptr %12, align 8, !tbaa !25
  %13 = getelementptr inbounds i8, ptr %10, i64 81
  store i8 1, ptr %13, align 1, !tbaa !38
  %14 = tail call noundef i32 @_ZN5QBody11GetBodyTypeEv(ptr noundef nonnull align 8 dereferenceable(293) %10)
  %15 = icmp eq i32 %14, 2
  br i1 %15, label %16, label %18

16:                                               ; preds = %11
  %17 = tail call noundef ptr @_ZN5QBody6WakeUpEv(ptr noundef nonnull align 8 dereferenceable(293) %10)
  br label %18

18:                                               ; preds = %16, %11
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 252
  store i8 1, ptr %20, align 4, !tbaa !39
  br label %21

21:                                               ; preds = %9, %18, %7
  ret ptr %0
}

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

attributes #0 = { 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="64" "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" }

!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, !11, i64 32}
!6 = !{!"_ZTS9QParticle", !7, i64 0, !10, i64 4, !10, i64 12, !10, i64 20, !7, i64 28, !11, i64 32, !12, i64 40, !10, i64 44, !13, i64 56, !12, i64 80, !12, i64 81, !17, i64 84, !12, i64 112, !18, i64 120, !23, i64 176, !23, i64 232, !12, i64 288, !12, i64 289}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS7QVector", !7, i64 0, !7, i64 4}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"_ZTSSt6vectorI7QVectorSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseI7QVectorSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseI7QVectorSaIS0_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!17 = !{!"_ZTS5QAABB", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24}
!18 = !{!"_ZTSSt13unordered_setIP9QParticleSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt10_HashtableIP9QParticleS1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE", !11, i64 0, !20, i64 8, !21, i64 16, !20, i64 24, !22, i64 32, !11, i64 48}
!20 = !{!"long", !8, i64 0}
!21 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !11, i64 0}
!22 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !7, i64 0, !20, i64 8}
!23 = !{!"_ZTSSt13unordered_setIP5QBodySt4hashIS1_ESt8equal_toIS1_ESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt10_HashtableIP5QBodyS1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE", !11, i64 0, !20, i64 8, !21, i64 16, !20, i64 24, !22, i64 32, !11, i64 48}
!25 = !{!26, !12, i64 80}
!26 = !{!"_ZTS5QBody", !7, i64 8, !7, i64 12, !11, i64 16, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 44, !17, i64 48, !27, i64 76, !12, i64 80, !12, i64 81, !12, i64 82, !7, i64 84, !28, i64 88, !12, i64 92, !7, i64 96, !12, i64 100, !12, i64 101, !10, i64 104, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !29, i64 132, !29, i64 136, !12, i64 140, !12, i64 141, !12, i64 142, !29, i64 144, !29, i64 148, !29, i64 152, !12, i64 156, !30, i64 160, !30, i64 192, !32, i64 224, !12, i64 256, !33, i64 264, !37, i64 288, !12, i64 292}
!27 = !{!"_ZTSN5QBody5ModesE", !8, i64 0}
!28 = !{!"_ZTSN5QBody9BodyTypesE", !8, i64 0}
!29 = !{!"int", !8, i64 0}
!30 = !{!"_ZTSSt8functionIFvP5QBodyEE", !31, i64 0, !11, i64 24}
!31 = !{!"_ZTSSt14_Function_base", !8, i64 0, !11, i64 16}
!32 = !{!"_ZTSSt8functionIFbP5QBodyNS0_13CollisionInfoEEE", !31, i64 0, !11, i64 24}
!33 = !{!"_ZTSSt6vectorIP5QMeshSaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIP5QMeshSaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!37 = !{!"_ZTSN5QBody16SimulationModelsE", !8, i64 0}
!38 = !{!26, !12, i64 81}
!39 = !{!40, !12, i64 252}
!40 = !{!"_ZTS5QMesh", !41, i64 0, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 44, !45, i64 48, !49, i64 72, !41, i64 96, !53, i64 120, !13, i64 144, !7, i64 168, !11, i64 176, !57, i64 184, !58, i64 192, !12, i64 216, !12, i64 217, !62, i64 224, !7, i64 248, !12, i64 252, !12, i64 253, !12, i64 254, !12, i64 255}
!41 = !{!"_ZTSSt6vectorIP9QParticleSaIS1_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseIP9QParticleSaIS1_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!45 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!49 = !{!"_ZTSSt6vectorIP16QAngleConstraintSaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseIP16QAngleConstraintSaIS1_EE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!53 = !{!"_ZTSSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE", !54, i64 0}
!54 = !{!"_ZTSSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE12_Vector_implE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!57 = !{!"_ZTSN5QMesh18CollisionBehaviorsE", !8, i64 0}
!58 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !59, i64 0}
!59 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !61, i64 0}
!61 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!62 = !{!"_ZTSSt6vectorIfSaIfEE", !63, i64 0}
!63 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !64, i64 0}
!64 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !65, i64 0}
!65 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}


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