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

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

; 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)) #1 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) #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath4ZeroEv() #3 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN5GMath3OneEv() #3 align 2

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

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

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

64:                                               ; preds = %5
  store i32 0, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %115

65:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %16, i64 4, i1 false), !tbaa.struct !9
  %66 = getelementptr inbounds %class.GFloat, ptr %24, i32 0, i32 0
  %67 = load i32, ptr %66, align 4
  %68 = call i32 @_ZN5GMath4SqrtE6GFloat(i32 %67)
  %69 = getelementptr inbounds %class.GFloat, ptr %23, i32 0, i32 0
  store i32 %68, ptr %69, align 4
  %70 = call i32 @_ZN5GMath10Inv_100000Ev()
  %71 = getelementptr inbounds %class.GFloat, ptr %25, i32 0, i32 0
  store i32 %70, ptr %71, align 4
  %72 = getelementptr inbounds %class.GFloat, ptr %25, i32 0, i32 0
  %73 = load i32, ptr %72, align 4
  %74 = call noundef zeroext i1 @_ZNK6GFloatleES_(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 %73)
  br i1 %74, label %75, label %89

75:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #6
  %76 = call i32 @_ZN5GMath3OneEv()
  %77 = getelementptr inbounds %class.GFloat, ptr %27, i32 0, i32 0
  store i32 %76, ptr %77, align 4
  %78 = call i32 @_ZN5GMath4ZeroEv()
  %79 = getelementptr inbounds %class.GFloat, ptr %28, i32 0, i32 0
  store i32 %78, ptr %79, align 4
  %80 = call i32 @_ZN5GMath4ZeroEv()
  %81 = getelementptr inbounds %class.GFloat, ptr %29, i32 0, i32 0
  store i32 %80, ptr %81, align 4
  %82 = getelementptr inbounds %class.GFloat, ptr %27, i32 0, i32 0
  %83 = load i32, ptr %82, align 4
  %84 = getelementptr inbounds %class.GFloat, ptr %28, i32 0, i32 0
  %85 = load i32, ptr %84, align 4
  %86 = getelementptr inbounds %class.GFloat, ptr %29, i32 0, i32 0
  %87 = load i32, ptr %86, align 4
  call void @_ZN8GVector3C2E6GFloatS0_S0_(ptr noundef nonnull align 4 dereferenceable(12) %26, i32 %83, i32 %85, i32 %87)
  %88 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8GVector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %26)
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #6
  br label %99

89:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %90 = call i32 @_ZN5GMath3OneEv()
  %91 = getelementptr inbounds %class.GFloat, ptr %31, i32 0, i32 0
  store i32 %90, ptr %91, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 4 %23, i64 4, i1 false), !tbaa.struct !9
  %92 = getelementptr inbounds %class.GFloat, ptr %32, i32 0, i32 0
  %93 = load i32, ptr %92, align 4
  %94 = call i32 @_ZNK6GFloatdvES_(ptr noundef nonnull align 4 dereferenceable(4) %31, i32 %93)
  %95 = getelementptr inbounds %class.GFloat, ptr %30, i32 0, i32 0
  store i32 %94, ptr %95, align 4
  %96 = getelementptr inbounds %class.GFloat, ptr %30, i32 0, i32 0
  %97 = load i32, ptr %96, align 4
  %98 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8GVector3mLE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 %97)
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %99

99:                                               ; preds = %89, %75
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #6
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %class.GTransform_QT, ptr %100, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 12, ptr %34) #6
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.GShapeSphere, ptr %102, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %103, i64 4, i1 false), !tbaa.struct !9
  %104 = getelementptr inbounds %class.GFloat, ptr %35, i32 0, i32 0
  %105 = load i32, ptr %104, align 4
  %106 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %14, i32 %105)
  store { i64, i32 } %106, ptr %36, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %34, ptr align 8 %36, i64 12, i1 false)
  %107 = call { i64, i32 } @_ZNK8GVector3plERKS_(ptr noundef nonnull align 4 dereferenceable(12) %101, ptr noundef nonnull align 4 dereferenceable(12) %34)
  store { i64, i32 } %107, ptr %37, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 8 %37, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %34) #6
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %17, i64 4, i1 false), !tbaa.struct !9
  %109 = getelementptr inbounds %class.GFloat, ptr %39, i32 0, i32 0
  %110 = load i32, ptr %109, align 4
  %111 = call i32 @_ZNK6GFloatmiES_(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 %110)
  %112 = getelementptr inbounds %class.GFloat, ptr %38, i32 0, i32 0
  store i32 %111, ptr %112, align 4
  %113 = getelementptr inbounds %class.GFloat, ptr %38, i32 0, i32 0
  %114 = load i32, ptr %113, align 4
  call void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592) %108, ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %14, i32 %114, i32 noundef -1)
  store i32 1, ptr %6, align 4
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %115

115:                                              ; preds = %99, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %116 = load i32, ptr %6, align 4
  ret i32 %116
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 #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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; 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 #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8GVector3C2E6GFloatS0_S0_(ptr noundef nonnull align 4 dereferenceable(12), i32, i32, i32) unnamed_addr #3 align 2

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN17GCollision_Sphere21Sphere_Sphere_ContactERK12GShapeSphereRK13GTransform_QTS2_S5_P17GCollisionContact(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(28) %1, ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %2, ptr noundef nonnull align 4 dereferenceable(28) %3, ptr noundef %4) local_unnamed_addr #2 align 2 {
  %6 = alloca %class.GVector3, align 8
  %7 = alloca %class.GFloat, align 4
  %8 = alloca %class.GFloat, align 4
  %9 = alloca %class.GFloat, align 4
  %10 = alloca %class.GVector3, align 4
  %11 = alloca %class.GFloat, align 4
  %12 = alloca %class.GVector3, align 8
  %13 = alloca %class.GVector3, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  %15 = getelementptr inbounds i8, ptr %3, i64 16
  %16 = tail call { i64, i32 } @_ZNK8GVector3miERKS_(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %15)
  %.fca.0.extract19 = extractvalue { i64, i32 } %16, 0
  %.fca.1.extract20 = extractvalue { i64, i32 } %16, 1
  store i64 %.fca.0.extract19, ptr %6, align 8
  %.sroa.222.0..sroa_idx = getelementptr inbounds i8, ptr %6, i64 8
  store i32 %.fca.1.extract20, ptr %.sroa.222.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %17 = call i32 @_ZNK8GVector310SizeSquareEv(ptr noundef nonnull align 4 dereferenceable(12) %6)
  store i32 %17, ptr %7, align 4
  %18 = getelementptr inbounds i8, ptr %0, i64 12
  %19 = getelementptr inbounds i8, ptr %2, i64 12
  %.sroa.017.0.copyload = load i32, ptr %19, align 4, !tbaa !5
  %20 = call i32 @_ZNK6GFloatplES_(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 %.sroa.017.0.copyload)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 %20, ptr %8, align 4, !tbaa !5
  %21 = call i32 @_ZNK6GFloatmlES_(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 %20)
  %22 = call noundef zeroext i1 @_ZNK6GFloatgeES_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %21)
  br i1 %22, label %40, label %23

23:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  %.sroa.014.0.copyload = load i32, ptr %7, align 4, !tbaa !5
  %24 = call i32 @_ZN5GMath4SqrtE6GFloat(i32 %.sroa.014.0.copyload)
  store i32 %24, ptr %9, align 4
  %25 = call i32 @_ZN5GMath10Inv_100000Ev()
  %26 = call noundef zeroext i1 @_ZNK6GFloatleES_(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 %25)
  br i1 %26, label %27, label %32

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  %28 = call i32 @_ZN5GMath3OneEv()
  %29 = call i32 @_ZN5GMath4ZeroEv()
  %30 = call i32 @_ZN5GMath4ZeroEv()
  call void @_ZN8GVector3C2E6GFloatS0_S0_(ptr noundef nonnull align 4 dereferenceable(12) %10, i32 %28, i32 %29, i32 %30)
  %31 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8GVector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  br label %36

32:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %33 = call i32 @_ZN5GMath3OneEv()
  store i32 %33, ptr %11, align 4
  %.sroa.08.0.copyload = load i32, ptr %9, align 4, !tbaa !5
  %34 = call i32 @_ZNK6GFloatdvES_(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 %.sroa.08.0.copyload)
  %35 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN8GVector3mLE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 %34)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %36

36:                                               ; preds = %32, %27
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #5
  %.sroa.07.0.copyload = load i32, ptr %19, align 4, !tbaa !5
  %37 = call { i64, i32 } @_ZNK8GVector3mlE6GFloat(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 %.sroa.07.0.copyload)
  %.fca.0.extract3 = extractvalue { i64, i32 } %37, 0
  %.fca.1.extract4 = extractvalue { i64, i32 } %37, 1
  store i64 %.fca.0.extract3, ptr %13, align 8
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  store i32 %.fca.1.extract4, ptr %.sroa.26.0..sroa_idx, align 8
  %38 = call { i64, i32 } @_ZNK8GVector3plERKS_(ptr noundef nonnull align 4 dereferenceable(12) %15, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %.fca.0.extract = extractvalue { i64, i32 } %38, 0
  %.fca.1.extract = extractvalue { i64, i32 } %38, 1
  store i64 %.fca.0.extract, ptr %12, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %12, 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 %13) #5
  %39 = call i32 @_ZNK6GFloatmiES_(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 %20)
  call void @_ZN17GCollisionContact15AddContactPointERK8GVector3S2_6GFloatj(ptr noundef nonnull align 8 dereferenceable(592) %4, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %6, i32 %39, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %40

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN8GVector3mLE6GFloat(ptr noundef nonnull align 4 dereferenceable(12), i32) local_unnamed_addr #1 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

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