	.file	"extr_cg_newdraw.c_CG_DrawSelectedPlayerHead.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	CG_DrawSelectedPlayerHead, @function
CG_DrawSelectedPlayerHead:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, QWORD PTR cgs[rip+8]
	test	rdx, rdx
	je	.L2
	movsx	rax, DWORD PTR cgs[rip]
	lea	rax, [rax+rax*2]
	sal	rax, 3
.L3:
	add	rbx, rax
	je	.L1
	cmp	QWORD PTR cg_draw3dIcons[rip], 0
	jne	.L14
	cmp	QWORD PTR cg_drawIcons[rip], 0
	jne	.L15
.L8:
	cmp	QWORD PTR [rbx], 0
	jne	.L16
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbx]
	test	edi, edi
	je	.L1
	xor	r13d, r13d
	xor	r14d, r14d
	xor	r12d, r12d
	mov	rdx, r14
	mov	rsi, r13
	call	trap_R_ModelBounds@PLT
	mov	esi, DWORD PTR 20[rbx]
	mov	rdx, r12
	mov	rdi, r12
	movsd	xmm0, QWORD PTR 16[r13]
	addsd	xmm0, xmm0
	mulsd	xmm0, QWORD PTR .LC0[rip]
	movsd	QWORD PTR 16[r12], xmm0
	movsd	xmm0, QWORD PTR 8[r13]
	addsd	xmm0, xmm0
	mulsd	xmm0, QWORD PTR .LC1[rip]
	movsd	QWORD PTR 8[r12], xmm0
	movsd	xmm0, QWORD PTR 16[r14]
	subsd	xmm0, xmm0
	mulsd	xmm0, QWORD PTR .LC2[rip]
	cvtsd2ss	xmm0, xmm0
	cvtss2sd	xmm0, xmm0
	divsd	xmm0, QWORD PTR .LC3[rip]
	movsd	QWORD PTR [r12], xmm0
	call	VectorAdd@PLT
	mov	r9d, DWORD PTR 12[rbx]
	mov	r8d, DWORD PTR 16[rbx]
	push	0
	.cfi_def_cfa_offset 56
	mov	edx, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR 8[rbp]
	push	r12
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR 12[rbp]
	mov	ecx, DWORD PTR 0[rbp]
	call	CG_Draw3DModel@PLT
	cmp	QWORD PTR [rbx], 0
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	je	.L1
.L16:
	mov	edx, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 12[rbp]
	mov	ecx, DWORD PTR 0[rbp]
	mov	r8d, DWORD PTR cgs[rip+4]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	CG_DrawPic@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r12, QWORD PTR sortedTeamPlayers[rip]
	xor	eax, eax
	call	CG_GetSelectedPlayer@PLT
	movsx	rax, DWORD PTR [r12+rax*4]
	lea	rax, [rax+rax*2]
	sal	rax, 3
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edx, DWORD PTR 4[rbp]
	mov	esi, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 12[rbp]
	mov	r8d, DWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 0[rbp]
	call	CG_DrawPic@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	CG_DrawSelectedPlayerHead, .-CG_DrawSelectedPlayerHead
	.comm	sortedTeamPlayers,8,8
	.comm	cgs,16,16
	.comm	cg_drawIcons,8,8
	.comm	cg_draw3dIcons,8,8
	.comm	YAW,8,8
	.comm	ROLL,8,8
	.comm	PITCH,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	-1075838976
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC2:
	.long	1717986918
	.long	1072064102
	.align 8
.LC3:
	.long	2027224564
	.long	1070671593
	.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_newdraw.c_CG_DrawSelectedPlayerHead.c"
	.text
	.global	__aeabi_dadd
	.global	__aeabi_dmul
	.global	__aeabi_dsub
	.global	__aeabi_d2f
	.global	__aeabi_f2d
	.global	__aeabi_ddiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_DrawSelectedPlayerHead, %function
CG_DrawSelectedPlayerHead:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, .L23
	cmp	r2, #0
	mov	r5, r0
	ldr	r4, [r6, #8]
	sub	sp, sp, #20
	beq	.L2
	ldr	r3, [r6]
	add	r3, r3, r3, lsl #2
	lsl	r3, r3, #2
.L3:
	adds	r4, r4, r3
	beq	.L1
	ldr	r3, .L23+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	ldr	r3, .L23+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L21
.L8:
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L22
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	ldr	r0, [r4, #12]
	cmp	r0, #0
	beq	.L1
	mov	r10, #0
	mov	r2, r10
	mov	r1, r10
	bl	trap_R_ModelBounds
	add	r3, r10, #16
	ldmia	r3, {r2-r3}
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_dadd
	mov	r2, #0
	ldr	r3, .L23+12
	bl	__aeabi_dmul
	add	r3, r10, #8
	ldmia	r3, {r2-r3}
	mov	r8, r0
	mov	r9, r1
	mov	r0, r2
	str	r8, [r10, #16]
	str	r9, [r10, #20]
	mov	r1, r3
	bl	__aeabi_dadd
	mov	r2, #0
	ldr	r3, .L23+16
	bl	__aeabi_dmul
	add	r3, r10, #16
	ldmia	r3, {r2-r3}
	mov	r8, r0
	mov	r9, r1
	mov	r0, r2
	mov	r1, r3
	str	r8, [r10, #8]
	str	r9, [r10, #12]
	bl	__aeabi_dsub
	ldr	r2, .L23+20
	ldr	r3, .L23+24
	bl	__aeabi_dmul
	bl	__aeabi_d2f
	bl	__aeabi_f2d
	ldr	r3, .L23+28
	ldr	r2, .L23+32
	bl	__aeabi_ddiv
	mov	r2, r10
	stm	r10, {r0-r1}
	ldr	r1, [r4, #16]
	mov	r0, r10
	bl	VectorAdd
	str	r10, [sp, #8]
	str	r10, [sp, #12]
	ldr	r2, [r4, #8]
	ldr	r3, [r5]
	str	r2, [sp, #4]
	ldr	r1, [r4, #12]
	ldr	r2, [r5, #4]
	str	r1, [sp]
	ldr	r1, [r5, #8]
	ldr	r0, [r5, #12]
	bl	CG_Draw3DModel
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L1
.L22:
	ldr	r2, [r6, #4]
	ldr	r3, [r5]
	str	r2, [sp]
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #8]
	ldr	r0, [r5, #12]
	bl	CG_DrawPic
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L23+36
	ldr	r7, [r3]
	bl	CG_GetSelectedPlayer
	ldr	r3, [r7, r0, lsl #2]
	add	r3, r3, r3, lsl #2
	lsl	r3, r3, #2
	b	.L3
.L21:
	ldr	r2, [r4, #4]
	ldr	r3, [r5]
	str	r2, [sp]
	ldr	r2, [r5, #4]
	ldr	r1, [r5, #8]
	ldr	r0, [r5, #12]
	bl	CG_DrawPic
	b	.L8
.L24:
	.align	2
.L23:
	.word	cgs
	.word	cg_draw3dIcons
	.word	cg_drawIcons
	.word	-1075838976
	.word	1071644672
	.word	1717986918
	.word	1072064102
	.word	1070671593
	.word	2027224564
	.word	sortedTeamPlayers
	.size	CG_DrawSelectedPlayerHead, .-CG_DrawSelectedPlayerHead
	.comm	sortedTeamPlayers,4,4
	.comm	cgs,12,4
	.comm	cg_drawIcons,4,4
	.comm	cg_draw3dIcons,4,4
	.comm	YAW,4,4
	.comm	ROLL,4,4
	.comm	PITCH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
