; LLVM IR from devlinzhou/deterministic_physics :: UnrealDemo/Source/UnrealDemo/gphysics/src/collision (glacier_collision_sphere)

; 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.GVector3 = type { %class.GFloat, %class.GFloat, %class.GFloat }
%class.GFloat = type { i32 }
%class.GTransform_QT = type { %class.GQuaternion, %class.GVector3 }
%class.GQuaternion = type { %class.GFloat, %class.GFloat, %class.GFloat, %class.GFloat }
%class.GShapeSphere = type { %class.GShapeConvexBase.base, %class.GFloat }
%class.GShapeConvexBase.base = type <{ ptr, %class.GShapeBase }>
%class.GShapeBase = type { i32 }
%class.GShapeBox = type { %class.GShapeConvexBase.base, %class.GVector3 }

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN17GCollision_Sphere10Sphere_BoxERK8GVector36GFloatS2_S2_RS0_PS0_(ptr noundef nonnull align 4 dereferenceable(12), i32, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; 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 i32 @_ZNK6GFloatngEv(ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12), i32) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN8GVector38DistanceERKS_S1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

declare void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), i32, i32 noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK11GQuaternion14UnRotateVectorERK8GVector3(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK13GTransform_QT15TransformNormalERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17GCollision_Sphere18Sphere_Box_ContactERK12GShapeSphereRK13GTransform_QTRK9GShapeBoxS5_P17GCollisionContact(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(28) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(28) %3, ptr noundef %4) #0 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %class.GVector3, align 4
  %13 = alloca %class.GVector3, align 4
  %14 = alloca { i64, i32 }, align 8
  %15 = alloca { i64, i32 }, align 8
  %16 = alloca %class.GVector3, align 4
  %17 = alloca { i64, i32 }, align 8
  %18 = alloca %class.GVector3, align 4
  %19 = alloca %class.GFloat, align 4
  %20 = alloca %class.GVector3, align 4
  %21 = alloca { i64, i32 }, align 8
  %22 = alloca %class.GVector3, align 4
  %23 = alloca %class.GVector3, align 4
  %24 = alloca %class.GVector3, align 4
  %25 = alloca %class.GFloat, align 4
  %26 = alloca { i64, i32 }, align 8
  %27 = alloca { i64, i32 }, align 8
  %28 = alloca { i64, i32 }, align 8
  %29 = alloca %class.GVector3, align 4
  %30 = alloca { i64, i32 }, align 8
  %31 = alloca %class.GFloat, align 4
  %32 = alloca %class.GFloat, align 4
  %33 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %class.GTransform_QT, ptr %34, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %class.GTransform_QT, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.GTransform_QT, ptr %38, i32 0, i32 1
  %40 = call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %39)
  store { i64, i32 } %40, ptr %14, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 8 %14, i64 12, i1 false)
  %41 = call { i64, i32 } @_ZNK11GQuaternion14UnRotateVectorERK8GVector3(ptr noundef nonnull align 4 dereferenceable(16) %35, ptr noundef nonnull align 4 dereferenceable(12) %13)
  store { i64, i32 } %41, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 8 %15, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #5
  %42 = call { i64, i32 } @_ZN8GVector34ZeroEv()
  store { i64, i32 } %42, ptr %17, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 8 %17, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #5
  call void @_ZN8GVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %18)
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %class.GShapeSphere, ptr %43, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %44, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #5
  %45 = call { i64, i32 } @_ZN8GVector34ZeroEv()
  store { i64, i32 } %45, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = getelementptr inbounds %class.GShapeBox, ptr %46, i32 0, i32 1
  %48 = getelementptr inbounds %class.GFloat, ptr %19, i32 0, i32 0
  %49 = load i32, ptr %48, align 4
  %50 = call noundef zeroext i1 @_ZN17GCollision_Sphere10Sphere_BoxERK8GVector36GFloatS2_S2_RS0_PS0_(ptr noundef nonnull align 4 dereferenceable(12) %12, i32 %49, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %47, ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef %18)
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #5
  br i1 %50, label %51, label %73

51:                                               ; preds = %5
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %72

54:                                               ; preds = %51
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #5
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %class.GShapeSphere, ptr %57, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %58, i64 4, i1 false), !tbaa.struct !9
  %59 = getelementptr inbounds %class.GFloat, ptr %25, i32 0, i32 0
  %60 = load i32, ptr %59, align 4
  %61 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %18, i32 %60)
  store { i64, i32 } %61, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 8 %26, i64 12, i1 false)
  %62 = call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %24)
  store { i64, i32 } %62, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 8 %27, i64 12, i1 false)
  %63 = call { i64, i32 } @_ZNK13GTransform_QT17TransformPositionERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28) %56, ptr noundef nonnull align 4 dereferenceable(12) %23)
  store { i64, i32 } %63, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %28, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #5
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = call { i64, i32 } @_ZNK13GTransform_QT15TransformNormalERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28) %64, ptr noundef nonnull align 4 dereferenceable(12) %18)
  store { i64, i32 } %65, ptr %30, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 8 %30, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %66 = call i32 @_ZN8GVector38DistanceERKS_S1_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %16)
  %67 = getelementptr inbounds %class.GFloat, ptr %32, i32 0, i32 0
  store i32 %66, ptr %67, align 4
  %68 = call i32 @_ZNK6GFloatngEv(ptr noundef nonnull align 4 dereferenceable(4) %32)
  %69 = getelementptr inbounds %class.GFloat, ptr %31, i32 0, i32 0
  store i32 %68, ptr %69, align 4
  %70 = getelementptr inbounds %class.GFloat, ptr %31, i32 0, i32 0
  %71 = load i32, ptr %70, align 4
  call void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592) %55, ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %29, i32 %71, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  br label %72

72:                                               ; preds = %54, %51
  store i32 1, ptr %6, align 4
  store i32 1, ptr %33, align 4
  br label %74

73:                                               ; preds = %5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %33, align 4
  br label %74

74:                                               ; preds = %73, %72
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #5
  %75 = load i32, ptr %6, align 4
  ret i32 %75
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZN8GVector34ZeroEv() #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8GVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK13GTransform_QT17TransformPositionERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}


; 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.GVector3 = type { %class.GFloat, %class.GFloat, %class.GFloat }
%class.GFloat = type { i32 }

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN17GCollision_Sphere10Sphere_BoxERK8GVector36GFloatS2_S2_RS0_PS0_(ptr noundef nonnull align 4 dereferenceable(12), i32, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6GFloatngEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12), i32) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN8GVector38DistanceERKS_S1_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

declare void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), i32, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK11GQuaternion14UnRotateVectorERK8GVector3(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK13GTransform_QT15TransformNormalERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN17GCollision_Sphere18Sphere_Box_ContactERK12GShapeSphereRK13GTransform_QTRK9GShapeBoxS5_P17GCollisionContact(ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(28) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(28) %3, ptr noundef %4) local_unnamed_addr #0 align 2 {
  %6 = alloca %class.GVector3, align 8
  %7 = alloca %class.GVector3, align 8
  %8 = alloca %class.GVector3, align 8
  %9 = alloca %class.GVector3, align 4
  %10 = alloca %class.GVector3, align 8
  %11 = alloca %class.GVector3, align 8
  %12 = alloca %class.GVector3, align 8
  %13 = alloca %class.GVector3, align 8
  %14 = alloca %class.GVector3, align 8
  %15 = alloca %class.GFloat, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #4
  %16 = getelementptr inbounds i8, ptr %1, i64 16
  %17 = getelementptr inbounds i8, ptr %3, i64 16
  %18 = tail call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %.fca.0.extract28 = extractvalue { i64, i32 } %18, 0
  %.fca.1.extract29 = extractvalue { i64, i32 } %18, 1
  store i64 %.fca.0.extract28, ptr %7, align 8
  %.sroa.231.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store i32 %.fca.1.extract29, ptr %.sroa.231.0..sroa_idx, align 8
  %19 = call { i64, i32 } @_ZNK11GQuaternion14UnRotateVectorERK8GVector3(ptr noundef nonnull align 4 dereferenceable(16) %3, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %.fca.0.extract24 = extractvalue { i64, i32 } %19, 0
  %.fca.1.extract25 = extractvalue { i64, i32 } %19, 1
  store i64 %.fca.0.extract24, ptr %6, align 8
  %.sroa.227.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %.fca.1.extract25, ptr %.sroa.227.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #4
  %20 = call { i64, i32 } @_ZN8GVector34ZeroEv()
  %.fca.0.extract20 = extractvalue { i64, i32 } %20, 0
  %.fca.1.extract21 = extractvalue { i64, i32 } %20, 1
  store i64 %.fca.0.extract20, ptr %8, align 8
  %.sroa.223.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 8
  store i32 %.fca.1.extract21, ptr %.sroa.223.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #4
  call void @_ZN8GVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %9)
  %21 = getelementptr inbounds i8, ptr %0, i64 12
  %.sroa.019.0.copyload = load i32, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #4
  %22 = call { i64, i32 } @_ZN8GVector34ZeroEv()
  %.fca.0.extract15 = extractvalue { i64, i32 } %22, 0
  %.fca.1.extract16 = extractvalue { i64, i32 } %22, 1
  store i64 %.fca.0.extract15, ptr %10, align 8
  %.sroa.218.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store i32 %.fca.1.extract16, ptr %.sroa.218.0..sroa_idx, align 8
  %23 = getelementptr inbounds i8, ptr %2, i64 12
  %24 = call noundef zeroext i1 @_ZN17GCollision_Sphere10Sphere_BoxERK8GVector36GFloatS2_S2_RS0_PS0_(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 %.sroa.019.0.copyload, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull %9)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #4
  br i1 %24, label %25, label %33

25:                                               ; preds = %5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %33, label %26

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #4
  %.sroa.014.0.copyload = load i32, ptr %21, align 4, !tbaa !5
  %27 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 %.sroa.014.0.copyload)
  %.fca.0.extract10 = extractvalue { i64, i32 } %27, 0
  %.fca.1.extract11 = extractvalue { i64, i32 } %27, 1
  store i64 %.fca.0.extract10, ptr %13, align 8
  %.sroa.213.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  store i32 %.fca.1.extract11, ptr %.sroa.213.0..sroa_idx, align 8
  %28 = call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %.fca.0.extract6 = extractvalue { i64, i32 } %28, 0
  %.fca.1.extract7 = extractvalue { i64, i32 } %28, 1
  store i64 %.fca.0.extract6, ptr %12, align 8
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  store i32 %.fca.1.extract7, ptr %.sroa.29.0..sroa_idx, align 8
  %29 = call { i64, i32 } @_ZNK13GTransform_QT17TransformPositionERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %.fca.0.extract2 = extractvalue { i64, i32 } %29, 0
  %.fca.1.extract3 = extractvalue { i64, i32 } %29, 1
  store i64 %.fca.0.extract2, ptr %11, align 8
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store i32 %.fca.1.extract3, ptr %.sroa.25.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #4
  %30 = call { i64, i32 } @_ZNK13GTransform_QT15TransformNormalERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %.fca.0.extract = extractvalue { i64, i32 } %30, 0
  %.fca.1.extract = extractvalue { i64, i32 } %30, 1
  store i64 %.fca.0.extract, ptr %14, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  %31 = call i32 @_ZN8GVector38DistanceERKS_S1_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %8)
  store i32 %31, ptr %15, align 4
  %32 = call i32 @_ZNK6GFloatngEv(ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592) %4, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %14, i32 %32, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #4
  br label %33

33:                                               ; preds = %5, %25, %26
  %.0 = phi i32 [ 1, %26 ], [ 1, %25 ], [ 0, %5 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  ret i32 %.0
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZN8GVector34ZeroEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8GVector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK13GTransform_QT17TransformPositionERK8GVector3(ptr noundef nonnull align 4 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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