; LLVM IR from devlinzhou/deterministic_physics :: UnrealDemo/Source/UnrealDemo/gphysics/src/collision/glacier_collision_algorithm._e591e050 (P17GCollisionContact)

; 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.GCObject = type { ptr, %class.GCollisionShape, i32, i32, %class.GTransform_QT, %class.GTransform_QT, %class.GAABB, %class.GAABB, i32, ptr, i8, i32, %"class.std::set", %"class.std::vector" }
%class.GCollisionShape = type { i32, %class.GVector3, ptr }
%class.GTransform_QT = type { %class.GQuaternion, %class.GVector3 }
%class.GQuaternion = type { %class.GFloat, %class.GFloat, %class.GFloat, %class.GFloat }
%class.GAABB = type { %class.GVector3, %class.GVector3 }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.GCollisionContact = type { i64, i32, i32, [16 x %class.GManifoldPoint] }
%class.GManifoldPoint = type <{ %class.GVector3, %class.GVector3, %class.GFloat, i32, i8, [3 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN17GCG_Sphere_Sphere16ProcessCollisionEPK8GCObjectS2_P17GCollisionContact(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #0 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %class.GVector3, align 4
  %11 = alloca { i64, i32 }, align 8
  %12 = alloca %class.GFloat, align 4
  %13 = alloca %class.GFloat, align 4
  %14 = alloca %class.GFloat, align 4
  %15 = alloca %class.GFloat, align 4
  %16 = alloca %class.GFloat, align 4
  %17 = alloca %class.GFloat, align 4
  %18 = alloca %class.GFloat, align 4
  %19 = alloca %class.GFloat, align 4
  %20 = alloca %class.GVector3, align 4
  %21 = alloca %class.GFloat, align 4
  %22 = alloca { i64, i32 }, align 8
  %23 = alloca %class.GFloat, align 4
  %24 = alloca { i64, i32 }, align 8
  %25 = alloca %class.GVector3, align 4
  %26 = alloca %class.GVector3, align 4
  %27 = alloca %class.GFloat, align 4
  %28 = alloca { i64, i32 }, align 8
  %29 = alloca { i64, i32 }, align 8
  %30 = alloca %class.GFloat, align 4
  %31 = alloca %class.GFloat, align 4
  %32 = alloca %class.GFloat, align 4
  %33 = alloca %class.GFloat, align 4
  %34 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %35 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #7
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %class.GCObject, ptr %36, i32 0, i32 5
  %38 = getelementptr inbounds %class.GTransform_QT, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %class.GCObject, ptr %39, i32 0, i32 5
  %41 = getelementptr inbounds %class.GTransform_QT, ptr %40, i32 0, i32 1
  %42 = call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %41)
  store { i64, i32 } %42, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 8 %11, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %43 = call i32 @_ZNK8GVector310SizeSquareEv(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %44 = getelementptr inbounds %class.GFloat, ptr %12, i32 0, i32 0
  store i32 %43, ptr %44, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %class.GCObject, ptr %45, i32 0, i32 1
  %47 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %46)
  %48 = getelementptr inbounds %class.GFloat, ptr %14, i32 0, i32 0
  store i32 %47, ptr %48, align 4
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = getelementptr inbounds %class.GCObject, ptr %49, i32 0, i32 1
  %51 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %50)
  %52 = getelementptr inbounds %class.GFloat, ptr %15, i32 0, i32 0
  store i32 %51, ptr %52, align 4
  %53 = getelementptr inbounds %class.GFloat, ptr %15, i32 0, i32 0
  %54 = load i32, ptr %53, align 4
  %55 = call i32 @_ZNK6GFloatplES_(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 %54)
  %56 = getelementptr inbounds %class.GFloat, ptr %13, i32 0, i32 0
  store i32 %55, ptr %56, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %13, i64 4, i1 false), !tbaa.struct !9
  %57 = getelementptr inbounds %class.GFloat, ptr %17, i32 0, i32 0
  %58 = load i32, ptr %57, align 4
  %59 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 %58)
  %60 = getelementptr inbounds %class.GFloat, ptr %16, i32 0, i32 0
  store i32 %59, ptr %60, align 4
  %61 = getelementptr inbounds %class.GFloat, ptr %16, i32 0, i32 0
  %62 = load i32, ptr %61, align 4
  %63 = call noundef zeroext i1 @_ZNK6GFloatltES_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %62)
  br i1 %63, label %64, label %111

64:                                               ; preds = %4
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %110

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %12, i64 4, i1 false), !tbaa.struct !9
  %68 = getelementptr inbounds %class.GFloat, ptr %19, i32 0, i32 0
  %69 = load i32, ptr %68, align 4
  %70 = call i32 @_ZN5GMath7InvSqrtE6GFloat(i32 %69)
  %71 = getelementptr inbounds %class.GFloat, ptr %18, i32 0, i32 0
  store i32 %70, ptr %71, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #7
  %72 = call i32 @_ZN5GMath7EpsilonEv()
  %73 = getelementptr inbounds %class.GFloat, ptr %21, i32 0, i32 0
  store i32 %72, ptr %73, align 4
  %74 = getelementptr inbounds %class.GFloat, ptr %21, i32 0, i32 0
  %75 = load i32, ptr %74, align 4
  %76 = call noundef zeroext i1 @_ZNK6GFloatltES_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %75)
  br i1 %76, label %77, label %79

77:                                               ; preds = %67
  %78 = call { i64, i32 } @_ZN8GVector35UnitXEv()
  store { i64, i32 } %78, ptr %22, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %22, i64 12, i1 false)
  br label %83

79:                                               ; preds = %67
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %18, i64 4, i1 false), !tbaa.struct !9
  %80 = getelementptr inbounds %class.GFloat, ptr %23, i32 0, i32 0
  %81 = load i32, ptr %80, align 4
  %82 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 %81)
  store { i64, i32 } %82, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %24, i64 12, i1 false)
  br label %83

83:                                               ; preds = %79, %77
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #7
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = getelementptr inbounds %class.GCObject, ptr %84, i32 0, i32 5
  %86 = getelementptr inbounds %class.GTransform_QT, ptr %85, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #7
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.GCObject, ptr %87, i32 0, i32 1
  %89 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %88)
  %90 = getelementptr inbounds %class.GFloat, ptr %27, i32 0, i32 0
  store i32 %89, ptr %90, align 4
  %91 = getelementptr inbounds %class.GFloat, ptr %27, i32 0, i32 0
  %92 = load i32, ptr %91, align 4
  %93 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %20, i32 %92)
  store { i64, i32 } %93, ptr %28, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 8 %28, i64 12, i1 false)
  %94 = call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %86, ptr noundef nonnull align 4 dereferenceable(12) %26)
  store { i64, i32 } %94, ptr %29, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 8 %29, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #7
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %18, i64 4, i1 false), !tbaa.struct !9
  %96 = getelementptr inbounds %class.GFloat, ptr %32, i32 0, i32 0
  %97 = load i32, ptr %96, align 4
  %98 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %97)
  %99 = getelementptr inbounds %class.GFloat, ptr %31, i32 0, i32 0
  store i32 %98, ptr %99, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %13, i64 4, i1 false), !tbaa.struct !9
  %100 = getelementptr inbounds %class.GFloat, ptr %33, i32 0, i32 0
  %101 = load i32, ptr %100, align 4
  %102 = call i32 @_ZNK6GFloatmiES_(ptr noundef nonnull align 4 dereferenceable(4) %31, i32 %101)
  %103 = getelementptr inbounds %class.GFloat, ptr %30, i32 0, i32 0
  store i32 %102, ptr %103, align 4
  %104 = getelementptr inbounds %class.GFloat, ptr %30, i32 0, i32 0
  %105 = load i32, ptr %104, align 4
  call void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592) %95, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %20, i32 %105, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = call noundef i32 @_ZNK8GCObject5GetIdEv(ptr noundef nonnull align 8 dereferenceable(240) %106)
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = getelementptr inbounds %class.GCollisionContact, ptr %108, i32 0, i32 1
  store i32 %107, ptr %109, align 8, !tbaa !12
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %110

110:                                              ; preds = %83, %64
  store i1 true, ptr %5, align 1
  store i32 1, ptr %34, align 4
  br label %112

111:                                              ; preds = %4
  store i1 false, ptr %5, align 1
  store i32 1, ptr %34, align 4
  br label %112

112:                                              ; preds = %111, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #7
  %113 = load i1, ptr %5, align 1
  ret i1 %113
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6GFloatplES_(ptr noundef nonnull align 4 dereferenceable(4), i32) #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 noundef zeroext i1 @_ZNK6GFloatltES_(ptr noundef nonnull align 4 dereferenceable(4), i32) #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN5GMath7InvSqrtE6GFloat(i32) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath7EpsilonEv() #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12), i32) #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) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8GCObject5GetIdEv(ptr noundef nonnull align 8 dereferenceable(240)) #6 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 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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}
!12 = !{!13, !11, i64 8}
!13 = !{!"_ZTS17GCollisionContact", !14, i64 0, !11, i64 8, !11, i64 12, !7, i64 16}
!14 = !{!"long", !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
define dso_local noundef zeroext i1 @_ZN17GCG_Sphere_Sphere16ProcessCollisionEPK8GCObjectS2_P17GCollisionContact(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) unnamed_addr #0 align 2 {
  %5 = alloca %class.GVector3, align 8
  %6 = alloca %class.GFloat, align 4
  %7 = alloca %class.GFloat, align 4
  %8 = alloca %class.GFloat, align 4
  %9 = alloca %class.GVector3, align 8
  %10 = alloca %class.GVector3, align 8
  %11 = alloca %class.GVector3, align 8
  %12 = alloca %class.GFloat, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  %13 = getelementptr inbounds i8, ptr %1, i64 84
  %14 = getelementptr inbounds i8, ptr %2, i64 84
  %15 = tail call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %14)
  %.fca.0.extract25 = extractvalue { i64, i32 } %15, 0
  %.fca.1.extract26 = extractvalue { i64, i32 } %15, 1
  store i64 %.fca.0.extract25, ptr %5, align 8
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %5, i64 8
  store i32 %.fca.1.extract26, ptr %.sroa.228.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %16 = call i32 @_ZNK8GVector310SizeSquareEv(ptr noundef nonnull align 4 dereferenceable(12) %5)
  store i32 %16, ptr %6, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  store i32 %18, ptr %8, align 4
  %19 = getelementptr inbounds i8, ptr %2, i64 8
  %20 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %21 = call i32 @_ZNK6GFloatplES_(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 %20)
  store i32 %21, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %22 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %21)
  %23 = call noundef zeroext i1 @_ZNK6GFloatltES_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %22)
  %.not = icmp ne ptr %3, null
  %or.cond.not = and i1 %.not, %23
  br i1 %or.cond.not, label %24, label %41

24:                                               ; preds = %4
  %.sroa.019.0.copyload = load i32, ptr %6, align 4, !tbaa !5
  %25 = call i32 @_ZN5GMath7InvSqrtE6GFloat(i32 %.sroa.019.0.copyload)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  %26 = call i32 @_ZN5GMath7EpsilonEv()
  %27 = call noundef zeroext i1 @_ZNK6GFloatltES_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %26)
  br i1 %27, label %28, label %30

28:                                               ; preds = %24
  %29 = call { i64, i32 } @_ZN8GVector35UnitXEv()
  br label %32

30:                                               ; preds = %24
  %31 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %5, i32 %25)
  br label %32

32:                                               ; preds = %30, %28
  %.pn = phi { i64, i32 } [ %29, %28 ], [ %31, %30 ]
  %.fca.1.extract10.sink = extractvalue { i64, i32 } %.pn, 1
  %.fca.0.extract9.sink = extractvalue { i64, i32 } %.pn, 0
  store i64 %.fca.0.extract9.sink, ptr %9, align 8
  %33 = getelementptr inbounds i8, ptr %9, i64 8
  store i32 %.fca.1.extract10.sink, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #6
  %34 = call i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  %35 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %9, i32 %34)
  %.fca.0.extract4 = extractvalue { i64, i32 } %35, 0
  %.fca.1.extract5 = extractvalue { i64, i32 } %35, 1
  store i64 %.fca.0.extract4, ptr %11, align 8
  %.sroa.27.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store i32 %.fca.1.extract5, ptr %.sroa.27.0..sroa_idx, align 8
  %36 = call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %.fca.0.extract = extractvalue { i64, i32 } %36, 0
  %.fca.1.extract = extractvalue { i64, i32 } %36, 1
  store i64 %.fca.0.extract, ptr %10, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %37 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %25)
  store i32 %37, ptr %12, align 4
  %.sroa.0.0.copyload = load i32, ptr %7, align 4, !tbaa !5
  %38 = call i32 @_ZNK6GFloatmiES_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %.sroa.0.0.copyload)
  call void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592) %3, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %9, i32 %38, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  %39 = call noundef i32 @_ZNK8GCObject5GetIdEv(ptr noundef nonnull align 8 dereferenceable(240) %1)
  %40 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 %39, ptr %40, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  br label %41

41:                                               ; preds = %4, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  ret i1 %23
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @_ZNK15GCollisionShape9GetRaiudsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6GFloatplES_(ptr noundef nonnull align 4 dereferenceable(4), i32) 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 noundef zeroext i1 @_ZNK6GFloatltES_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN5GMath7InvSqrtE6GFloat(i32) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath7EpsilonEv() local_unnamed_addr #0 align 2

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

; 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

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 #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK8GCObject5GetIdEv(ptr noundef nonnull align 8 dereferenceable(240)) local_unnamed_addr #5 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 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress 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 #6 = { 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"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTS17GCollisionContact", !11, i64 0, !6, i64 8, !6, i64 12, !7, i64 16}
!11 = !{!"long", !7, i64 0}


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