	.file	"extr_g_items.c_FinishSpawningItem.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"FinishSpawningItem: %s startsolid at %s\n"
	.text
	.p2align 4
	.globl	FinishSpawningItem
	.type	FinishSpawningItem, @function
FinishSpawningItem:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 40
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR ITEM_RADIUS[rip]
	mov	edi, DWORD PTR 36[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	neg	esi
	mov	ecx, esi
	mov	edx, esi
	call	VectorSet@PLT
	mov	esi, DWORD PTR ITEM_RADIUS[rip]
	mov	edi, DWORD PTR 32[rbp]
	mov	ecx, esi
	mov	edx, esi
	call	VectorSet@PLT
	mov	eax, DWORD PTR ET_ITEM[rip]
	mov	rbx, QWORD PTR 88[rbp]
	mov	QWORD PTR 64[rbp], 0
	mov	DWORD PTR 80[rbp], eax
	movsx	rax, DWORD PTR bg_itemlist[rip]
	sal	rax, 3
	sub	rbx, rax
	mov	rax, QWORD PTR CONTENTS_TRIGGER[rip]
	mov	QWORD PTR 72[rbp], rbx
	mov	QWORD PTR 24[rbp], rax
	mov	eax, DWORD PTR Touch_Item[rip]
	mov	DWORD PTR 112[rbp], eax
	mov	eax, DWORD PTR Use_Item[rip]
	mov	DWORD PTR 108[rbp], eax
	test	BYTE PTR 0[rbp], 1
	je	.L2
	mov	rsi, QWORD PTR 40[rbp]
	mov	rdi, rbp
	call	G_SetOrigin@PLT
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR FL_TEAMSLAVE[rip], eax
	jne	.L6
.L16:
	cmp	QWORD PTR 96[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR 88[rbp]
	mov	rcx, QWORD PTR IT_POWERUP[rip]
	cmp	QWORD PTR [rax], rcx
	je	.L13
	mov	rdi, rbp
	call	trap_LinkEntity@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR 40[rbp]
	mov	ebx, DWORD PTR 8[rax]
	mov	edx, DWORD PTR 4[rax]
	mov	esi, DWORD PTR [rax]
	lea	ecx, -4096[rbx]
	xor	ebx, ebx
	mov	edi, ebx
	call	VectorSet@PLT
	mov	rdi, rsp
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	edx, DWORD PTR 36[rbp]
	mov	eax, DWORD PTR MASK_SOLID[rip]
	mov	ecx, DWORD PTR 32[rbp]
	mov	r8d, ebx
	mov	rsi, QWORD PTR 40[rbp]
	mov	r9d, DWORD PTR 56[rbp]
	push	rax
	.cfi_def_cfa_offset 80
	call	trap_Trace@PLT
	pop	rax
	.cfi_def_cfa_offset 72
	pop	rdx
	.cfi_def_cfa_offset 64
	cmp	QWORD PTR 16[rsp], 0
	jne	.L15
	mov	eax, DWORD PTR 8[rsp]
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rbp
	mov	DWORD PTR 52[rbp], eax
	call	G_SetOrigin@PLT
	mov	eax, DWORD PTR 4[rbp]
	test	DWORD PTR FL_TEAMSLAVE[rip], eax
	je	.L16
.L6:
	mov	eax, DWORD PTR EF_NODRAW[rip]
	mov	QWORD PTR 24[rbp], 0
	or	DWORD PTR 48[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, QWORD PTR 40[rbp]
	call	vtos@PLT
	mov	esi, DWORD PTR 104[rbp]
	lea	rdi, .LC0[rip]
	mov	edx, eax
	call	G_Printf@PLT
	mov	rdi, rbp
	call	G_FreeEntity@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	xor	eax, eax
	call	crandom@PLT
	pxor	xmm0, xmm0
	pxor	xmm1, xmm1
	mov	QWORD PTR 24[rbp], 0
	cvtsi2ss	xmm1, QWORD PTR level[rip]
	mov	r8d, eax
	mov	eax, DWORD PTR EF_NODRAW[rip]
	or	DWORD PTR 48[rbp], eax
	mov	eax, r8d
	sal	eax, 4
	sub	eax, r8d
	add	eax, 45
	cvtsi2ss	xmm0, eax
	mulss	xmm0, DWORD PTR .LC1[rip]
	addss	xmm0, xmm1
	cvttss2si	rax, xmm0
	mov	QWORD PTR 16[rbp], rax
	mov	eax, DWORD PTR RespawnItem[rip]
	mov	DWORD PTR 8[rbp], eax
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	FinishSpawningItem, .-FinishSpawningItem
	.comm	level,8,8
	.comm	bg_itemlist,4,4
	.comm	Use_Item,4,4
	.comm	Touch_Item,4,4
	.comm	RespawnItem,4,4
	.comm	MASK_SOLID,4,4
	.comm	IT_POWERUP,8,8
	.comm	ITEM_RADIUS,4,4
	.comm	FL_TEAMSLAVE,4,4
	.comm	ET_ITEM,4,4
	.comm	EF_NODRAW,4,4
	.comm	CONTENTS_TRIGGER,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC1:
	.long	1148846080
	.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_items.c_FinishSpawningItem.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"FinishSpawningItem: %s startsolid at %s\012\000"
	.global	__aeabi_i2f
	.global	__aeabi_fmul
	.global	__aeabi_fadd
	.global	__aeabi_f2iz
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	FinishSpawningItem
	.syntax unified
	.arm
	.fpu softvfp
	.type	FinishSpawningItem, %function
FinishSpawningItem:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r4, r0
	ldr	r5, .L16
	ldr	r2, .L16+4
	ldr	r3, [r5]
	sub	sp, sp, #36
	rsb	r3, r3, #0
	mov	r1, r3
	ldr	r2, [r2]
	str	r2, [sp, #28]
	mov	r2,#0
	ldr	r0, [r0, #24]
	mov	r2, r3
	bl	VectorSet
	ldr	r3, [r5]
	ldr	r0, [r4, #20]
	mov	r2, r3
	mov	r1, r3
	bl	VectorSet
	mov	ip, #0
	ldr	r0, .L16+8
	ldr	r1, .L16+12
	ldr	r2, .L16+16
	ldr	r3, .L16+20
	ldr	lr, .L16+24
	ldr	r5, [r0]
	ldr	lr, [lr]
	ldr	r0, [r1]
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, [r4, #56]
	str	r5, [r4, #52]
	sub	r3, r3, lr, lsl #2
	ldr	lr, [r4]
	str	r3, [r4, #48]
	tst	lr, #1
	str	ip, [r4, #44]
	str	r0, [r4, #16]
	str	r1, [r4, #72]
	str	r2, [r4, #68]
	beq	.L2
	mov	r0, r4
	ldr	r1, [r4, #28]
	bl	G_SetOrigin
.L3:
	ldr	r3, .L16+28
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L6
	ldr	r5, [r4, #60]
	cmp	r5, #0
	bne	.L6
	ldr	r2, [r4, #56]
	ldr	r3, .L16+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L13
	mov	r0, r4
	bl	trap_LinkEntity
.L1:
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, pc}
.L2:
	mov	r5, #0
	ldr	r1, [r4, #28]
	mov	r0, r5
	ldmib	r1, {r2, r3}
	ldr	r1, [r1]
	sub	r3, r3, #4096
	bl	VectorSet
	ldr	r2, .L16+36
	ldr	r3, [r4, #40]
	ldr	r2, [r2]
	str	r5, [sp]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	ldr	r3, [r4, #20]
	ldr	r2, [r4, #24]
	ldr	r1, [r4, #28]
	add	r0, sp, #16
	bl	trap_Trace
	ldr	r3, [sp, #24]
	cmp	r3, r5
	bne	.L15
	ldr	r3, [sp, #20]
	mov	r0, r4
	ldr	r1, [sp, #16]
	str	r3, [r4, #36]
	bl	G_SetOrigin
	b	.L3
.L6:
	mov	r1, #0
	ldr	r2, .L16+40
	ldr	r3, [r4, #32]
	ldr	r2, [r2]
	str	r1, [r4, #16]
	orr	r3, r3, r2
	str	r3, [r4, #32]
	b	.L1
.L15:
	ldr	r0, [r4, #28]
	ldr	r5, [r4, #64]
	bl	vtos
	mov	r1, r5
	mov	r2, r0
	ldr	r0, .L16+44
	bl	G_Printf
	mov	r0, r4
	bl	G_FreeEntity
	b	.L1
.L13:
	bl	crandom
	ldr	r2, .L16+40
	ldr	r3, [r4, #32]
	ldr	r2, [r2]
	rsb	r0, r0, r0, lsl #4
	orr	r3, r3, r2
	str	r3, [r4, #32]
	str	r5, [r4, #16]
	add	r0, r0, #45
	bl	__aeabi_i2f
	ldr	r1, .L16+48
	bl	__aeabi_fmul
	ldr	r3, .L16+52
	mov	r5, r0
	ldr	r0, [r3]
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r5
	bl	__aeabi_fadd
	bl	__aeabi_f2iz
	ldr	r3, .L16+56
	str	r0, [r4, #12]
	ldr	r3, [r3]
	str	r3, [r4, #8]
	b	.L1
.L14:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	ITEM_RADIUS
	.word	.LC1
	.word	ET_ITEM
	.word	CONTENTS_TRIGGER
	.word	Touch_Item
	.word	Use_Item
	.word	bg_itemlist
	.word	FL_TEAMSLAVE
	.word	IT_POWERUP
	.word	MASK_SOLID
	.word	EF_NODRAW
	.word	.LC0
	.word	1148846080
	.word	level
	.word	RespawnItem
	.size	FinishSpawningItem, .-FinishSpawningItem
	.comm	level,4,4
	.comm	bg_itemlist,4,4
	.comm	Use_Item,4,4
	.comm	Touch_Item,4,4
	.comm	RespawnItem,4,4
	.comm	MASK_SOLID,4,4
	.comm	IT_POWERUP,4,4
	.comm	ITEM_RADIUS,4,4
	.comm	FL_TEAMSLAVE,4,4
	.comm	ET_ITEM,4,4
	.comm	EF_NODRAW,4,4
	.comm	CONTENTS_TRIGGER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
