	.file	"extr_g_trigger.c_AimAtTarget.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	AimAtTarget
	.type	AimAtTarget, @function
AimAtTarget:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	rdx, r12
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR 20[rdi]
	mov	edi, DWORD PTR 24[rdi]
	call	VectorAdd@PLT
	movss	xmm0, DWORD PTR .LC0[rip]
	mov	rdi, r12
	mov	rsi, r12
	call	VectorScale@PLT
	mov	edi, DWORD PTR 16[rbp]
	call	G_PickTarget@PLT
	test	rax, rax
	je	.L3
	movss	xmm2, DWORD PTR g_gravity[rip]
	pxor	xmm1, xmm1
	mov	rbx, rax
	mov	rax, QWORD PTR [rax]
	cvtss2sd	xmm1, xmm2
	movss	xmm0, DWORD PTR 8[rax]
	movss	DWORD PTR 8[rsp], xmm2
	mulsd	xmm1, QWORD PTR .LC1[rip]
	subss	xmm0, DWORD PTR ds:8
	cvtss2sd	xmm0, xmm0
	divsd	xmm0, xmm1
	cvtsd2ss	xmm0, xmm0
	call	sqrt@PLT
	ucomiss	xmm0, DWORD PTR .LC2[rip]
	movaps	xmm1, xmm0
	jnp	.L8
.L5:
	mov	rdx, QWORD PTR 8[rbp]
	mov	rdi, QWORD PTR [rbx]
	xor	r12d, r12d
	movss	DWORD PTR 12[rsp], xmm1
	mov	rsi, r12
	call	VectorSubtract@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	DWORD PTR 8[rdi], 0x00000000
	call	VectorNormalize@PLT
	movss	xmm1, DWORD PTR 12[rsp]
	mov	rdi, QWORD PTR 8[rbp]
	divss	xmm0, xmm1
	mov	rsi, rdi
	call	VectorScale@PLT
	movss	xmm1, DWORD PTR 12[rsp]
	mov	rax, QWORD PTR 8[rbp]
	mulss	xmm1, DWORD PTR 8[rsp]
	movss	DWORD PTR 8[rax], xmm1
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	jne	.L5
.L3:
	add	rsp, 16
	.cfi_def_cfa_offset 32
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	G_FreeEntity@PLT
	.cfi_endproc
.LFE0:
	.size	AimAtTarget, .-AimAtTarget
	.comm	g_gravity,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	1056964608
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.section	.rodata.cst4
	.align 4
.LC2:
	.long	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_g_trigger.c_AimAtTarget.c"
	.text
	.global	__aeabi_fsub
	.global	__aeabi_f2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.global	__aeabi_d2f
	.global	__aeabi_fcmpeq
	.global	__aeabi_fdiv
	.global	__aeabi_fmul
	.align	2
	.global	AimAtTarget
	.syntax unified
	.arm
	.fpu softvfp
	.type	AimAtTarget, %function
AimAtTarget:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r10, fp, lr}
	mov	r5, #0
	mov	r4, r0
	ldr	r1, [r0, #12]
	mov	r2, r5
	ldr	r0, [r0, #16]
	bl	VectorAdd
	mov	r2, r5
	mov	r1, #1056964608
	mov	r0, r5
	bl	VectorScale
	ldr	r0, [r4, #8]
	bl	G_PickTarget
	subs	r6, r0, #0
	beq	.L3
	mov	r5, #0
	ldr	r2, [r6]
	ldr	r3, .L6
	ldr	r0, [r2, #8]	@ float
	ldr	r1, [r5, #8]	@ float
	ldr	r8, [r3]	@ float
	bl	__aeabi_fsub
	bl	__aeabi_f2d
	mov	r10, r0
	mov	r0, r8
	mov	fp, r1
	bl	__aeabi_f2d
	mov	r2, #0
	ldr	r3, .L6+4
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r10
	mov	r1, fp
	bl	__aeabi_ddiv
	bl	__aeabi_d2f
	mov	r7, #0
	bl	sqrt
	mov	r1, r7
	mov	r5, r0
	bl	__aeabi_fcmpeq
	cmp	r0, #0
	bne	.L3
	ldr	r2, [r4, #4]
	mov	r1, #0
	ldr	r0, [r6]
	bl	VectorSubtract
	ldr	r0, [r4, #4]
	str	r7, [r0, #8]	@ float
	bl	VectorNormalize
	mov	r1, r5
	bl	__aeabi_fdiv
	ldr	r6, [r4, #4]
	mov	r1, r0
	mov	r2, r6
	mov	r0, r6
	bl	VectorScale
	mov	r1, r5
	mov	r0, r8
	bl	__aeabi_fmul
	ldr	r3, [r4, #4]
	str	r0, [r3, #8]	@ float
	pop	{r4, r5, r6, r7, r8, r10, fp, pc}
.L3:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r10, fp, lr}
	b	G_FreeEntity
.L7:
	.align	2
.L6:
	.word	g_gravity
	.word	1071644672
	.size	AimAtTarget, .-AimAtTarget
	.comm	g_gravity,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
