	.file	"extr_cg_localents.c_CG_AddMoveScaleFade.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	CG_AddMoveScaleFade, @function
CG_AddMoveScaleFade:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pxor	xmm2, xmm2
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rdx, QWORD PTR cg[rip]
	mov	rax, QWORD PTR [rdi]
	mov	rcx, QWORD PTR 8[rdi]
	cvtsi2ss	xmm2, rdx
	cmp	rax, rcx
	jle	.L2
	cmp	rax, rdx
	jg	.L11
.L2:
	movss	xmm0, DWORD PTR 16[rbp]
	subss	xmm0, xmm2
	mulss	xmm0, DWORD PTR 20[rbp]
.L3:
	movss	xmm3, DWORD PTR .LC1[rip]
	mov	rax, QWORD PTR 24[rbp]
	pxor	xmm1, xmm1
	mov	rdx, QWORD PTR 56[rbp]
	mulss	xmm3, xmm0
	cvtsi2ss	xmm1, DWORD PTR 12[rax]
	mulss	xmm1, xmm3
	cvttss2si	eax, xmm1
	mov	DWORD PTR 12[rdx], eax
	mov	eax, DWORD PTR 32[rbp]
	test	DWORD PTR LEF_PUFF_DONT_SCALE[rip], eax
	jne	.L4
	movsd	xmm1, QWORD PTR .LC2[rip]
	cvtss2sd	xmm0, xmm0
	subsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR 40[rbp]
	mulsd	xmm0, xmm1
	addsd	xmm0, QWORD PTR .LC3[rip]
	movsd	QWORD PTR 64[rbp], xmm0
.L4:
	mov	esi, DWORD PTR 72[rbp]
	movaps	xmm0, xmm2
	lea	rdi, 48[rbp]
	xor	r12d, r12d
	call	BG_EvaluateTrajectory@PLT
	mov	edi, DWORD PTR 72[rbp]
	mov	esi, DWORD PTR cg[rip+8]
	mov	edx, r12d
	call	VectorSubtract@PLT
	mov	edi, r12d
	call	VectorLength@PLT
	movsd	xmm1, QWORD PTR 40[rbp]
	cvtss2sd	xmm0, xmm0
	comisd	xmm1, xmm0
	ja	.L12
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, 56[rbp]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	trap_R_AddRefEntityToScene@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rsi, rax
	pxor	xmm1, xmm1
	pxor	xmm0, xmm0
	sub	rax, rcx
	sub	rsi, rdx
	cvtsi2ss	xmm0, rax
	cvtsi2ss	xmm1, rsi
	divss	xmm1, xmm0
	movss	xmm0, DWORD PTR .LC0[rip]
	subss	xmm0, xmm1
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	CG_FreeLocalEntity@PLT
	.cfi_endproc
.LFE0:
	.size	CG_AddMoveScaleFade, .-CG_AddMoveScaleFade
	.comm	cg,16,16
	.comm	LEF_PUFF_DONT_SCALE,4,4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	1065353216
	.align 4
.LC1:
	.long	1132396544
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.align 8
.LC3:
	.long	0
	.long	1075838976
	.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_cg_localents.c_CG_AddMoveScaleFade.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fdiv
	.global	__aeabi_fsub
	.global	__aeabi_fmul
	.global	__aeabi_f2iz
	.global	__aeabi_f2d
	.global	__aeabi_dsub
	.global	__aeabi_dmul
	.global	__aeabi_dadd
	.global	__aeabi_dcmplt
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_AddMoveScaleFade, %function
CG_AddMoveScaleFade:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, .L13
	mov	r4, r0
	ldr	r7, [r8]
	ldr	r6, [r0]
	mov	r0, r7
	bl	__aeabi_i2f
	ldr	r9, [r4, #4]
	mov	r5, r0
	cmp	r6, r9
	ble	.L2
	cmp	r6, r7
	bgt	.L11
.L2:
	mov	r1, r5
	ldr	r0, [r4, #8]	@ float
	bl	__aeabi_fsub
	ldr	r1, [r4, #12]	@ float
	bl	__aeabi_fmul
	mov	r6, r0
.L3:
	ldr	r3, [r4, #16]
	ldr	r9, [r4, #40]
	ldr	r0, [r3, #12]
	bl	__aeabi_i2f
	ldr	r1, .L13+4
	mov	r7, r0
	mov	r0, r6
	bl	__aeabi_fmul
	mov	r1, r0
	mov	r0, r7
	bl	__aeabi_fmul
	bl	__aeabi_f2iz
	ldr	r3, .L13+8
	str	r0, [r9, #12]
	ldr	r2, [r4, #20]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L4
	mov	r0, r6
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, #0
	ldr	r1, .L13+12
	bl	__aeabi_dsub
	add	r3, r4, #24
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, #0
	ldr	r3, .L13+16
	bl	__aeabi_dadd
	str	r0, [r4, #48]
	str	r1, [r4, #52]
.L4:
	mov	r6, #0
	mov	r1, r5
	ldr	r2, [r4, #56]
	add	r0, r4, #32
	bl	BG_EvaluateTrajectory
	mov	r2, r6
	ldr	r1, [r8, #4]
	ldr	r0, [r4, #56]
	bl	VectorSubtract
	mov	r0, r6
	bl	VectorLength
	bl	__aeabi_f2d
	add	r3, r4, #24
	ldmia	r3, {r2-r3}
	bl	__aeabi_dcmplt
	cmp	r0, r6
	bne	.L12
	add	r0, r4, #40
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	trap_R_AddRefEntityToScene
.L11:
	sub	r0, r6, r7
	bl	__aeabi_i2f
	mov	r3, r0
	sub	r0, r6, r9
	mov	r6, r3
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fdiv
	mov	r1, r0
	mov	r0, #1065353216
	bl	__aeabi_fsub
	mov	r6, r0
	b	.L3
.L12:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	CG_FreeLocalEntity
.L14:
	.align	2
.L13:
	.word	cg
	.word	1132396544
	.word	LEF_PUFF_DONT_SCALE
	.word	1072693248
	.word	1075838976
	.size	CG_AddMoveScaleFade, .-CG_AddMoveScaleFade
	.comm	cg,8,4
	.comm	LEF_PUFF_DONT_SCALE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
