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

; 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 uwtable
define dso_local noundef ptr @_ZN9QParticle17SetGlobalPositionE7QVector(ptr noundef nonnull align 8 dereferenceable(290) %0, <2 x float> %1) #2 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 1
  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 15
  store i8 1, ptr %8, align 8, !tbaa !12
  %9 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 5
  %10 = load ptr, ptr %9, align 8, !tbaa !28
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %15

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

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

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

29:                                               ; preds = %21
  %30 = getelementptr inbounds %class.QParticle, ptr %6, i32 0, i32 5
  %31 = load ptr, ptr %30, align 8, !tbaa !28
  %32 = getelementptr inbounds %struct.QMesh, ptr %31, i32 0, i32 19
  store i8 1, ptr %32, align 1, !tbaa !43
  br label %33

33:                                               ; preds = %29, %21
  br label %34

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

35:                                               ; preds = %34, %12
  ret ptr %6
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN5QBody11GetBodyTypeEv(ptr noundef nonnull align 8 dereferenceable(293)) #3 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"="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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !15, i64 112}
!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 = !{!13, !6, i64 32}
!29 = !{!30, !15, i64 80}
!30 = !{!"_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, !31, i64 76, !15, i64 80, !15, i64 81, !15, i64 82, !11, i64 84, !32, 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, !33, i64 132, !33, i64 136, !15, i64 140, !15, i64 141, !15, i64 142, !33, i64 144, !33, i64 148, !33, i64 152, !15, i64 156, !34, i64 160, !34, i64 192, !36, i64 224, !15, i64 256, !37, i64 264, !41, i64 288, !15, i64 292}
!31 = !{!"_ZTSN5QBody5ModesE", !7, i64 0}
!32 = !{!"_ZTSN5QBody9BodyTypesE", !7, i64 0}
!33 = !{!"int", !7, i64 0}
!34 = !{!"_ZTSSt8functionIFvP5QBodyEE", !35, i64 0, !6, i64 24}
!35 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!36 = !{!"_ZTSSt8functionIFbP5QBodyNS0_13CollisionInfoEEE", !35, i64 0, !6, i64 24}
!37 = !{!"_ZTSSt6vectorIP5QMeshSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIP5QMeshSaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSN5QBody16SimulationModelsE", !7, i64 0}
!42 = !{!30, !15, i64 81}
!43 = !{!44, !15, i64 253}
!44 = !{!"_ZTS5QMesh", !45, i64 0, !14, i64 24, !14, i64 32, !11, i64 40, !11, i64 44, !49, i64 48, !53, i64 72, !45, i64 96, !57, i64 120, !16, i64 144, !11, i64 168, !6, i64 176, !61, i64 184, !62, i64 192, !15, i64 216, !15, i64 217, !66, i64 224, !11, i64 248, !15, i64 252, !15, i64 253, !15, i64 254, !15, i64 255}
!45 = !{!"_ZTSSt6vectorIP9QParticleSaIS1_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIP9QParticleSaIS1_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!53 = !{!"_ZTSSt6vectorIP16QAngleConstraintSaIS1_EE", !54, i64 0}
!54 = !{!"_ZTSSt12_Vector_baseIP16QAngleConstraintSaIS1_EE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE12_Vector_implE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!57 = !{!"_ZTSSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE", !58, i64 0}
!58 = !{!"_ZTSSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE", !59, i64 0}
!59 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE12_Vector_implE", !60, i64 0}
!60 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!61 = !{!"_ZTSN5QMesh18CollisionBehaviorsE", !7, i64 0}
!62 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !63, i64 0}
!63 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !64, i64 0}
!64 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !65, i64 0}
!65 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!66 = !{!"_ZTSSt6vectorIfSaIfEE", !67, i64 0}
!67 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !68, i64 0}
!68 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !69, i64 0}
!69 = !{!"_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
define dso_local noundef nonnull ptr @_ZN9QParticle17SetGlobalPositionE7QVector(ptr noundef nonnull returned align 8 dereferenceable(290) %0, <2 x float> %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  store <2 x float> %1, ptr %3, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 112
  store i8 1, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !25
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %10

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

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

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

17:                                               ; preds = %12
  %18 = load ptr, ptr %5, align 8, !tbaa !25
  %19 = getelementptr inbounds i8, ptr %18, i64 253
  store i8 1, ptr %19, align 1, !tbaa !40
  br label %20

20:                                               ; preds = %10, %17, %12, %8
  ret ptr %0
}

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

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

attributes #0 = { 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" }
attributes #1 = { 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" }

!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, !12, i64 112}
!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 = !{!6, !11, i64 32}
!26 = !{!27, !12, i64 80}
!27 = !{!"_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, !28, i64 76, !12, i64 80, !12, i64 81, !12, i64 82, !7, i64 84, !29, 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, !30, i64 132, !30, i64 136, !12, i64 140, !12, i64 141, !12, i64 142, !30, i64 144, !30, i64 148, !30, i64 152, !12, i64 156, !31, i64 160, !31, i64 192, !33, i64 224, !12, i64 256, !34, i64 264, !38, i64 288, !12, i64 292}
!28 = !{!"_ZTSN5QBody5ModesE", !8, i64 0}
!29 = !{!"_ZTSN5QBody9BodyTypesE", !8, i64 0}
!30 = !{!"int", !8, i64 0}
!31 = !{!"_ZTSSt8functionIFvP5QBodyEE", !32, i64 0, !11, i64 24}
!32 = !{!"_ZTSSt14_Function_base", !8, i64 0, !11, i64 16}
!33 = !{!"_ZTSSt8functionIFbP5QBodyNS0_13CollisionInfoEEE", !32, i64 0, !11, i64 24}
!34 = !{!"_ZTSSt6vectorIP5QMeshSaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIP5QMeshSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIP5QMeshSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!38 = !{!"_ZTSN5QBody16SimulationModelsE", !8, i64 0}
!39 = !{!27, !12, i64 81}
!40 = !{!41, !12, i64 253}
!41 = !{!"_ZTS5QMesh", !42, i64 0, !10, i64 24, !10, i64 32, !7, i64 40, !7, i64 44, !46, i64 48, !50, i64 72, !42, i64 96, !54, i64 120, !13, i64 144, !7, i64 168, !11, i64 176, !58, i64 184, !59, i64 192, !12, i64 216, !12, i64 217, !63, i64 224, !7, i64 248, !12, i64 252, !12, i64 253, !12, i64 254, !12, i64 255}
!42 = !{!"_ZTSSt6vectorIP9QParticleSaIS1_EE", !43, i64 0}
!43 = !{!"_ZTSSt12_Vector_baseIP9QParticleSaIS1_EE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE12_Vector_implE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIP9QParticleSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!46 = !{!"_ZTSSt6vectorIP7QSpringSaIS1_EE", !47, i64 0}
!47 = !{!"_ZTSSt12_Vector_baseIP7QSpringSaIS1_EE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE12_Vector_implE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIP7QSpringSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!50 = !{!"_ZTSSt6vectorIP16QAngleConstraintSaIS1_EE", !51, i64 0}
!51 = !{!"_ZTSSt12_Vector_baseIP16QAngleConstraintSaIS1_EE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE12_Vector_implE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIP16QAngleConstraintSaIS1_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!54 = !{!"_ZTSSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE", !55, i64 0}
!55 = !{!"_ZTSSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE12_Vector_implE", !57, i64 0}
!57 = !{!"_ZTSNSt12_Vector_baseISt6vectorIP9QParticleSaIS2_EESaIS4_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!58 = !{!"_ZTSN5QMesh18CollisionBehaviorsE", !8, i64 0}
!59 = !{!"_ZTSSt6vectorIS_IiSaIiEESaIS1_EE", !60, i64 0}
!60 = !{!"_ZTSSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE", !61, i64 0}
!61 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE12_Vector_implE", !62, i64 0}
!62 = !{!"_ZTSNSt12_Vector_baseISt6vectorIiSaIiEESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!63 = !{!"_ZTSSt6vectorIfSaIfEE", !64, i64 0}
!64 = !{!"_ZTSSt12_Vector_baseIfSaIfEE", !65, i64 0}
!65 = !{!"_ZTSNSt12_Vector_baseIfSaIfEE12_Vector_implE", !66, i64 0}
!66 = !{!"_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