	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function AimAtTarget
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
LCPI0_1:
	.long	0x7fc00000                      ## float NaN
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_AimAtTarget
	.p2align	4, 0x90
_AimAtTarget:                           ## @AimAtTarget
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	20(%rdi), %esi
	movl	24(%rdi), %edi
	callq	_VectorAdd
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_VectorScale
	movl	16(%rbx), %edi
	callq	_G_PickTarget
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	movq	_g_gravity@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -24(%rbp)                ## 4-byte Spill
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_sqrt
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jne	LBB0_2
	jnp	LBB0_3
LBB0_2:
	movq	(%r14), %rdi
	movq	8(%rbx), %rdx
	movss	%xmm0, -20(%rbp)                ## 4-byte Spill
	callq	_VectorSubtract
	movq	8(%rbx), %rdi
	movl	$0, 8(%rdi)
	callq	_VectorNormalize
	divss	-20(%rbp), %xmm0                ## 4-byte Folded Reload
	movq	8(%rbx), %rdi
	movq	%rdi, %rsi
	callq	_VectorScale
	movss	-24(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	mulss	-20(%rbp), %xmm0                ## 4-byte Folded Reload
	movq	8(%rbx), %rax
	movss	%xmm0, 8(%rax)
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_G_FreeEntity                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_g_gravity,4,2                  ## @g_gravity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AimAtTarget                    ; -- Begin function AimAtTarget
	.p2align	2
_AimAtTarget:                           ; @AimAtTarget
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	mov	x19, x0
	ldr	w0, [x0, #24]
	ldr	w1, [x19, #20]
	bl	_VectorAdd
	fmov	s0, #0.50000000
	bl	_VectorScale
	ldr	w0, [x19, #16]
	bl	_G_PickTarget
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _g_gravity@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_gravity@GOTPAGEOFF]
Lloh2:
	ldr	s9, [x8]
	mov	w8, #2143289344
	fmov	s0, w8
	fsqrt	s8, s0
	fcmp	s8, s8
	b.vs	LBB0_4
; %bb.2:
	fcmp	s8, #0.0
	b.eq	LBB0_5
LBB0_3:
	ldr	x0, [x0]
	ldr	x2, [x19, #8]
	bl	_VectorSubtract
	ldr	x0, [x19, #8]
	str	wzr, [x0, #8]
	bl	_VectorNormalize
	ldr	x0, [x19, #8]
	fdiv	s0, s0, s8
	mov	x1, x0
	bl	_VectorScale
	fmul	s0, s9, s8
	ldr	x8, [x19, #8]
	str	s0, [x8, #8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	mov	w8, #2143289344
	fmov	s0, w8
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	bl	_sqrt
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	fmov	s8, s0
	fcmp	s8, #0.0
	b.ne	LBB0_3
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_G_FreeEntity
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_g_gravity,4,2                  ; @g_gravity
.subsections_via_symbols
