	.file	"extr_cg_players.c_CG_PlayerPowerups.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	CG_PlayerPowerups, @function
CG_PlayerPowerups:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	ebx, DWORD PTR 8[rdi]
	test	ebx, ebx
	je	.L1
	mov	eax, DWORD PTR PW_QUAD[rip]
	mov	rbp, rdi
	mov	r12, rsi
	bt	ebx, eax
	jc	.L36
	mov	eax, DWORD PTR PW_FLIGHT[rip]
	bt	ebx, eax
	jc	.L37
.L5:
	mov	rax, QWORD PTR cgs[rip+32]
	mov	rdx, QWORD PTR 16[rbp]
	lea	r13, [rax+rdx*8]
	mov	eax, DWORD PTR PW_REDFLAG[rip]
	bt	ebx, eax
	jnc	.L6
	cmp	QWORD PTR 0[r13], 0
	jne	.L38
	mov	esi, DWORD PTR cgs[rip+16]
	mov	rdi, rbp
	call	CG_TrailItem@PLT
.L8:
	xor	eax, eax
	call	rand@PLT
	movsd	xmm1, QWORD PTR .LC1[rip]
	movsd	xmm0, QWORD PTR .LC0[rip]
	and	eax, 31
	mov	edi, DWORD PTR 0[rbp]
	lea	esi, 200[rax]
	movapd	xmm2, xmm1
	call	trap_R_AddLightToScene@PLT
.L6:
	mov	eax, DWORD PTR PW_BLUEFLAG[rip]
	bt	ebx, eax
	jnc	.L9
	cmp	QWORD PTR 0[r13], 0
	jne	.L39
	mov	esi, DWORD PTR cgs[rip+8]
	mov	rdi, rbp
	call	CG_TrailItem@PLT
.L11:
	xor	eax, eax
	call	rand@PLT
	movsd	xmm0, QWORD PTR .LC1[rip]
	movsd	xmm2, QWORD PTR .LC0[rip]
	and	eax, 31
	mov	edi, DWORD PTR 0[rbp]
	lea	esi, 200[rax]
	movapd	xmm1, xmm0
	call	trap_R_AddLightToScene@PLT
.L9:
	mov	eax, DWORD PTR PW_NEUTRALFLAG[rip]
	bt	ebx, eax
	jnc	.L12
	cmp	QWORD PTR 0[r13], 0
	jne	.L40
	mov	esi, DWORD PTR cgs[rip]
	mov	rdi, rbp
	call	CG_TrailItem@PLT
.L14:
	xor	eax, eax
	call	rand@PLT
	movsd	xmm0, QWORD PTR .LC0[rip]
	mov	edi, DWORD PTR 0[rbp]
	and	eax, 31
	lea	esi, 200[rax]
	movapd	xmm2, xmm0
	movapd	xmm1, xmm0
	call	trap_R_AddLightToScene@PLT
.L12:
	mov	eax, DWORD PTR PW_HASTE[rip]
	bt	ebx, eax
	jc	.L41
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	mov	edi, DWORD PTR 24[rbp]
	mov	ecx, DWORD PTR cgs[rip+24]
	mov	edx, DWORD PTR vec3_origin[rip]
	mov	esi, DWORD PTR 0[rbp]
	call	trap_S_AddLoopingSound@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L36:
	xor	eax, eax
	call	rand@PLT
	movsd	xmm0, QWORD PTR .LC1[rip]
	movsd	xmm2, QWORD PTR .LC0[rip]
	and	eax, 31
	mov	edi, DWORD PTR 0[rbp]
	lea	esi, 200[rax]
	movapd	xmm1, xmm0
	call	trap_R_AddLightToScene@PLT
	mov	eax, DWORD PTR PW_FLIGHT[rip]
	bt	ebx, eax
	jnc	.L5
	jmp	.L37
	.p2align 4,,10
	.p2align 3
.L41:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	CG_HasteTrail@PLT
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	esi, DWORD PTR cgs[rip+20]
	mov	rdx, r12
	mov	rdi, rbp
	call	CG_PlayerFlag@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L39:
	mov	esi, DWORD PTR cgs[rip+12]
	mov	rdx, r12
	mov	rdi, rbp
	call	CG_PlayerFlag@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	mov	esi, DWORD PTR cgs[rip+4]
	mov	rdx, r12
	mov	rdi, rbp
	call	CG_PlayerFlag@PLT
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	CG_PlayerPowerups, .-CG_PlayerPowerups
	.comm	vec3_origin,4,4
	.comm	cgs,40,32
	.comm	PW_REDFLAG,4,4
	.comm	PW_QUAD,4,4
	.comm	PW_NEUTRALFLAG,4,4
	.comm	PW_HASTE,4,4
	.comm	PW_FLIGHT,4,4
	.comm	PW_BLUEFLAG,4,4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1072693248
	.align 8
.LC1:
	.long	2684354560
	.long	1070176665
	.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_players.c_CG_PlayerPowerups.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_PlayerPowerups, %function
CG_PlayerPowerups:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r5, [r0, #4]
	sub	sp, sp, #28
	cmp	r5, #0
	beq	.L1
	ldr	r3, .L41
	mov	r4, r0
	ldr	r3, [r3]
	mov	r6, r1
	asr	r3, r5, r3
	tst	r3, #1
	bne	.L36
.L4:
	ldr	r3, .L41+4
	ldr	r7, .L41+8
	ldr	r3, [r3]
	asr	r3, r5, r3
	tst	r3, #1
	bne	.L33
.L5:
	ldr	r3, .L41+12
	ldr	r9, [r4, #8]
	ldr	r3, [r3]
	ldr	r8, [r7, #28]
	asr	r3, r5, r3
	tst	r3, #1
	beq	.L6
	ldr	r3, [r8, r9, lsl #2]
	cmp	r3, #0
	bne	.L37
	mov	r0, r4
	ldr	r1, [r7, #16]
	bl	CG_TrailItem
.L8:
	ldr	r10, [r4]
	bl	rand
	mov	r2, #-1610612736
	ldr	r3, .L41+16
	and	r1, r0, #31
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	stm	sp, {r2-r3}
	mov	r0, r10
	mov	r2, #0
	ldr	r3, .L41+20
	add	r1, r1, #200
	bl	trap_R_AddLightToScene
.L6:
	ldr	r3, .L41+24
	ldr	r3, [r3]
	asr	r3, r5, r3
	tst	r3, #1
	beq	.L9
	ldr	r3, [r8, r9, lsl #2]
	cmp	r3, #0
	bne	.L38
	mov	r0, r4
	ldr	r1, [r7, #8]
	bl	CG_TrailItem
.L11:
	ldr	r3, [r4]
	mov	r10, #0
	str	r3, [sp, #20]
	bl	rand
	mov	r2, #-1610612736
	ldr	r3, [sp, #20]
	and	r1, r0, #31
	ldr	fp, .L41+20
	mov	r0, r3
	ldr	r3, .L41+16
	str	r10, [sp, #8]
	str	fp, [sp, #12]
	stm	sp, {r2-r3}
	add	r1, r1, #200
	bl	trap_R_AddLightToScene
.L9:
	ldr	r3, .L41+28
	ldr	r3, [r3]
	asr	r3, r5, r3
	tst	r3, #1
	beq	.L12
	ldr	r3, [r8, r9, lsl #2]
	cmp	r3, #0
	bne	.L39
	mov	r0, r4
	ldr	r1, [r7]
	bl	CG_TrailItem
.L14:
	ldr	r6, [r4]
	bl	rand
	mov	r2, #0
	ldr	r3, .L41+20
	and	r1, r0, #31
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	mov	r0, r6
	stm	sp, {r2-r3}
	add	r1, r1, #200
	bl	trap_R_AddLightToScene
.L12:
	ldr	r3, .L41+32
	ldr	r3, [r3]
	asr	r5, r5, r3
	tst	r5, #1
	bne	.L40
.L1:
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L33:
	ldr	r2, .L41+36
	ldr	r3, [r7, #24]
	ldr	r2, [r2]
	ldr	r1, [r4]
	ldr	r0, [r4, #12]
	bl	trap_S_AddLoopingSound
	b	.L5
.L36:
	ldr	r7, [r0]
	bl	rand
	mov	r8, #0
	mov	r2, #-1610612736
	ldr	r9, .L41+20
	ldr	r3, .L41+16
	and	r1, r0, #31
	str	r8, [sp, #8]
	str	r9, [sp, #12]
	mov	r0, r7
	stm	sp, {r2-r3}
	add	r1, r1, #200
	bl	trap_R_AddLightToScene
	b	.L4
.L40:
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	CG_HasteTrail
.L37:
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7, #20]
	bl	CG_PlayerFlag
	b	.L8
.L38:
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7, #12]
	bl	CG_PlayerFlag
	b	.L11
.L39:
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r7, #4]
	bl	CG_PlayerFlag
	b	.L14
.L42:
	.align	2
.L41:
	.word	PW_QUAD
	.word	PW_FLIGHT
	.word	cgs
	.word	PW_REDFLAG
	.word	1070176665
	.word	1072693248
	.word	PW_BLUEFLAG
	.word	PW_NEUTRALFLAG
	.word	PW_HASTE
	.word	vec3_origin
	.size	CG_PlayerPowerups, .-CG_PlayerPowerups
	.comm	vec3_origin,4,4
	.comm	cgs,32,4
	.comm	PW_REDFLAG,4,4
	.comm	PW_QUAD,4,4
	.comm	PW_NEUTRALFLAG,4,4
	.comm	PW_HASTE,4,4
	.comm	PW_FLIGHT,4,4
	.comm	PW_BLUEFLAG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
