; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics/qjoint.ll (ZN6QJointC2EP10QRigidBody7QVectorS2_S1_)

; 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.QJoint = type <{ ptr, ptr, ptr, %struct.QVector, %struct.QVector, %struct.QVector, %struct.QVector, i8, i8, [2 x i8], float, float, float, i8, [7 x i8], ptr, i8, [7 x i8] }>

@_ZTV6QJoint = external dso_local unnamed_addr constant { [3 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6QJointC2EP10QRigidBody7QVectorS2_S1_(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, ptr noundef %4) unnamed_addr #0 align 2 {
  %6 = alloca %struct.QVector, align 4
  %7 = alloca %struct.QVector, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct.QVector, align 4
  %12 = alloca %struct.QVector, align 4
  %13 = alloca %struct.QVector, align 4
  %14 = alloca %struct.QVector, align 4
  %15 = alloca %struct.QVector, align 4
  %16 = alloca %struct.QVector, align 4
  %17 = alloca %struct.QVector, align 4
  %18 = alloca %struct.QVector, align 4
  %19 = alloca %struct.QVector, align 4
  %20 = alloca %struct.QVector, align 4
  %21 = alloca %struct.QVector, align 4
  store <2 x float> %2, ptr %6, align 4
  store <2 x float> %3, ptr %7, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8
  store ptr getelementptr inbounds inrange(-16, 8) ({ [3 x ptr] }, ptr @_ZTV6QJoint, i32 0, i32 0, i32 2), ptr %22, align 8, !tbaa !9
  %23 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 1
  store ptr null, ptr %23, align 8, !tbaa !11
  %24 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 2
  store ptr null, ptr %24, align 8, !tbaa !16
  %25 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 3
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %25)
  %26 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 4
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %26)
  %27 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 5
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %27)
  %28 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 6
  call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %28)
  %29 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 7
  store i8 0, ptr %29, align 8, !tbaa !17
  %30 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 8
  store i8 1, ptr %30, align 1, !tbaa !18
  %31 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 10
  store float 1.000000e+00, ptr %31, align 4, !tbaa !19
  %32 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 11
  store float 5.000000e-01, ptr %32, align 8, !tbaa !20
  %33 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 12
  store float 0.000000e+00, ptr %33, align 4, !tbaa !21
  %34 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 13
  store i8 0, ptr %34, align 8, !tbaa !22
  %35 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 16
  store i8 0, ptr %35, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !24
  %36 = load <2 x float>, ptr %12, align 4
  %37 = load <2 x float>, ptr %13, align 4
  %38 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %36, <2 x float> %37)
  store <2 x float> %38, ptr %11, align 4
  %39 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %11)
  %40 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 12
  store float %39, ptr %40, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 1
  store ptr %41, ptr %42, align 8, !tbaa !11
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %56

45:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !24
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = call <2 x float> @_ZN5QBody11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(293) %46)
  store <2 x float> %47, ptr %17, align 4
  %48 = load <2 x float>, ptr %16, align 4
  %49 = load <2 x float>, ptr %17, align 4
  %50 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %48, <2 x float> %49)
  store <2 x float> %50, ptr %15, align 4
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = call noundef float @_ZN5QBody11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(293) %51)
  %53 = fneg float %52
  %54 = call <2 x float> @_ZNK7QVector7RotatedEf(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef %53)
  store <2 x float> %54, ptr %14, align 4
  %55 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %55, ptr align 4 %14, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %58

56:                                               ; preds = %5
  %57 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %57, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !24
  br label %58

58:                                               ; preds = %56, %45
  %59 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %59, ptr align 4 %6, i64 8, i1 false), !tbaa.struct !24
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 2
  store ptr %60, ptr %61, align 8, !tbaa !16
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %75

64:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !24
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = call <2 x float> @_ZN5QBody11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(293) %65)
  store <2 x float> %66, ptr %21, align 4
  %67 = load <2 x float>, ptr %20, align 4
  %68 = load <2 x float>, ptr %21, align 4
  %69 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %67, <2 x float> %68)
  store <2 x float> %69, ptr %19, align 4
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = call noundef float @_ZN5QBody11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(293) %70)
  %72 = fneg float %71
  %73 = call <2 x float> @_ZNK7QVector7RotatedEf(ptr noundef nonnull align 4 dereferenceable(8) %19, float noundef %72)
  store <2 x float> %73, ptr %18, align 4
  %74 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %74, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %77

75:                                               ; preds = %58
  %76 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %76, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !24
  br label %77

77:                                               ; preds = %75, %64
  %78 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %78, ptr align 4 %7, i64 8, i1 false), !tbaa.struct !24
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %90

81:                                               ; preds = %77
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %82)
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %89

85:                                               ; preds = %81
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %86)
  %88 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 15
  store ptr %87, ptr %88, align 8, !tbaa !26
  br label %89

89:                                               ; preds = %85, %81
  br label %90

90:                                               ; preds = %89, %77
  %91 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 15
  %92 = load ptr, ptr %91, align 8, !tbaa !26
  %93 = icmp eq ptr %92, null
  br i1 %93, label %94, label %106

94:                                               ; preds = %90
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %106

97:                                               ; preds = %94
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %98)
  %100 = icmp ne ptr %99, null
  br i1 %100, label %101, label %105

101:                                              ; preds = %97
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %102)
  %104 = getelementptr inbounds %class.QJoint, ptr %22, i32 0, i32 15
  store ptr %103, ptr %104, align 8, !tbaa !26
  br label %105

105:                                              ; preds = %101, %97
  br label %106

106:                                              ; preds = %105, %94, %90
  %107 = call noundef ptr @_ZN6QJoint19SetCollisionEnabledEb(ptr noundef nonnull align 8 dereferenceable(89) %22, i1 noundef zeroext false)
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) #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) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN5QBody11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(293)) #5 align 2

declare <2 x float> @_ZNK7QVector7RotatedEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6QJoint19SetCollisionEnabledEb(ptr noundef nonnull align 8 dereferenceable(89), i1 noundef zeroext) #1 align 2

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="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 #6 = { "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 8}
!12 = !{!"_ZTS6QJoint", !6, i64 8, !6, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !15, i64 56, !15, i64 57, !14, i64 60, !14, i64 64, !14, i64 68, !15, i64 72, !6, i64 80, !15, i64 88}
!13 = !{!"_ZTS7QVector", !14, i64 0, !14, i64 4}
!14 = !{!"float", !7, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!12, !6, i64 16}
!17 = !{!12, !15, i64 56}
!18 = !{!12, !15, i64 57}
!19 = !{!12, !14, i64 60}
!20 = !{!12, !14, i64 64}
!21 = !{!12, !14, i64 68}
!22 = !{!12, !15, i64 72}
!23 = !{!12, !15, i64 88}
!24 = !{i64 0, i64 4, !25, i64 4, i64 4, !25}
!25 = !{!14, !14, i64 0}
!26 = !{!12, !6, i64 80}


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

%struct.QVector = type { float, float }

@_ZTV6QJoint = external dso_local unnamed_addr constant { [3 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6QJointC2EP10QRigidBody7QVectorS2_S1_(ptr noundef nonnull align 8 dereferenceable(89) %0, ptr noundef %1, <2 x float> %2, <2 x float> %3, ptr noundef %4) unnamed_addr #0 align 2 {
  %6 = alloca %struct.QVector, align 8
  %7 = alloca %struct.QVector, align 8
  %8 = alloca %struct.QVector, align 8
  store ptr getelementptr inbounds inrange(-16, 8) (i8, ptr @_ZTV6QJoint, i64 16), ptr %0, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  tail call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %11)
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  store i8 0, ptr %15, align 8, !tbaa !8
  %16 = getelementptr inbounds i8, ptr %0, i64 57
  store i8 1, ptr %16, align 1, !tbaa !15
  %17 = getelementptr inbounds i8, ptr %0, i64 60
  store <2 x float> <float 1.000000e+00, float 5.000000e-01>, ptr %17, align 4, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %0, i64 68
  store float 0.000000e+00, ptr %18, align 4, !tbaa !17
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  store i8 0, ptr %19, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %0, i64 88
  store i8 0, ptr %20, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %21 = tail call <2 x float> @_Zmi7QVectorS_(<2 x float> %2, <2 x float> %3)
  store <2 x float> %21, ptr %6, align 8
  %22 = call noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8) %6)
  store float %22, ptr %18, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  store ptr %1, ptr %9, align 8, !tbaa !20
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %29, label %23

23:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %24 = call <2 x float> @_ZN5QBody11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(293) %1)
  %25 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %2, <2 x float> %24)
  store <2 x float> %25, ptr %7, align 8
  %26 = call noundef float @_ZN5QBody11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(293) %1)
  %27 = fneg float %26
  %28 = call <2 x float> @_ZNK7QVector7RotatedEf(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %27)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br label %29

29:                                               ; preds = %5, %23
  %.sink = phi <2 x float> [ %28, %23 ], [ %2, %5 ]
  store <2 x float> %.sink, ptr %11, align 8
  store <2 x float> %2, ptr %13, align 8
  store ptr %4, ptr %10, align 8, !tbaa !21
  %30 = icmp ne ptr %4, null
  br i1 %30, label %31, label %37

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %32 = call <2 x float> @_ZN5QBody11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(293) %4)
  %33 = call <2 x float> @_Zmi7QVectorS_(<2 x float> %3, <2 x float> %32)
  store <2 x float> %33, ptr %8, align 8
  %34 = call noundef float @_ZN5QBody11GetRotationEv(ptr noundef nonnull align 8 dereferenceable(293) %4)
  %35 = fneg float %34
  %36 = call <2 x float> @_ZNK7QVector7RotatedEf(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %35)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %37

37:                                               ; preds = %29, %31
  %.sink33 = phi <2 x float> [ %36, %31 ], [ %3, %29 ]
  store <2 x float> %.sink33, ptr %12, align 8
  store <2 x float> %3, ptr %14, align 8
  br i1 %.not, label %43, label %38

38:                                               ; preds = %37
  %39 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %1)
  %.not31 = icmp eq ptr %39, null
  br i1 %.not31, label %43, label %40

40:                                               ; preds = %38
  %41 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %1)
  %42 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr %41, ptr %42, align 8, !tbaa !22
  br label %43

43:                                               ; preds = %38, %40, %37
  %44 = getelementptr inbounds i8, ptr %0, i64 80
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = icmp eq ptr %45, null
  %or.cond = and i1 %30, %46
  br i1 %or.cond, label %47, label %51

47:                                               ; preds = %43
  %48 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %4)
  %.not32 = icmp eq ptr %48, null
  br i1 %.not32, label %51, label %49

49:                                               ; preds = %47
  %50 = call noundef ptr @_ZN5QBody8GetWorldEv(ptr noundef nonnull align 8 dereferenceable(293) %4)
  store ptr %50, ptr %44, align 8, !tbaa !22
  br label %51

51:                                               ; preds = %47, %49, %43
  %52 = call noundef ptr @_ZN6QJoint19SetCollisionEnabledEb(ptr noundef nonnull align 8 dereferenceable(89) %0, i1 noundef zeroext false)
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7QVectorC2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_Zmi7QVectorS_(<2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK7QVector6LengthEv(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN5QBody11GetPositionEv(ptr noundef nonnull align 8 dereferenceable(293)) local_unnamed_addr #4 align 2

declare <2 x float> @_ZNK7QVector7RotatedEf(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN6QJoint19SetCollisionEnabledEb(ptr noundef nonnull align 8 dereferenceable(89), i1 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7

attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !14, i64 56}
!9 = !{!"_ZTS6QJoint", !10, i64 8, !10, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !14, i64 56, !14, i64 57, !13, i64 60, !13, i64 64, !13, i64 68, !14, i64 72, !10, i64 80, !14, i64 88}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"_ZTS7QVector", !13, i64 0, !13, i64 4}
!13 = !{!"float", !11, i64 0}
!14 = !{!"bool", !11, i64 0}
!15 = !{!9, !14, i64 57}
!16 = !{!13, !13, i64 0}
!17 = !{!9, !13, i64 68}
!18 = !{!9, !14, i64 72}
!19 = !{!9, !14, i64 88}
!20 = !{!9, !10, i64 8}
!21 = !{!9, !10, i64 16}
!22 = !{!9, !10, i64 80}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,MergedLoadStoreMotionPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass