	.file	"extr_cg_newdraw.c_CG_DrawAreaPowerUp.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%i"
	.text
	.p2align 4
	.type	CG_DrawAreaPowerUp, @function
CG_DrawAreaPowerUp:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 152
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -168[rbp], rdx
	movss	DWORD PTR -156[rbp], xmm0
	mov	rbx, rsp
	movss	DWORD PTR -160[rbp], xmm1
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_POWERUPS[rip]
	mov	QWORD PTR -192[rbp], rsp
	mov	rdx, rax
	lea	rax, 15[0+rax*4]
	mov	r8, rax
	mov	rcx, rax
	and	r8, -4096
	and	rcx, -16
	sub	rbx, r8
	mov	r8, rbx
	cmp	rsp, r8
	je	.L3
.L51:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, r8
	jne	.L51
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L52
.L4:
	mov	rcx, rax
	mov	rbx, rsp
	and	rax, -4096
	mov	r12, rsp
	sub	rbx, rax
	and	rcx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L6
.L53:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L53
.L6:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L54
.L7:
	mov	rax, QWORD PTR [rdi]
	movsd	xmm5, QWORD PTR 8[rdi]
	mov	rbx, rsp
	movss	xmm0, DWORD PTR 16[rdi]
	cmp	DWORD PTR HUD_VERTICAL[rip], esi
	mov	QWORD PTR -112[rbp], rax
	lea	rax, -108[rbp]
	mov	QWORD PTR -176[rbp], rax
	movsd	QWORD PTR -120[rbp], xmm5
	movsd	QWORD PTR -104[rbp], xmm5
	movss	DWORD PTR -96[rbp], xmm0
	je	.L8
	lea	rax, -112[rbp]
	mov	QWORD PTR -176[rbp], rax
.L8:
	mov	r14, QWORD PTR cg[rip+8]
	mov	rcx, QWORD PTR STAT_HEALTH[rip]
	mov	rax, QWORD PTR [r14]
	cmp	QWORD PTR [rax+rcx*8], 0
	jle	.L49
	test	edx, edx
	jle	.L11
	mov	esi, DWORD PTR cg[rip]
	mov	r13, QWORD PTR 8[r14]
	lea	r15d, -1[rdx]
	xor	edi, edi
	mov	eax, DWORD PTR INT_MAX[rip]
	mov	QWORD PTR -136[rbp], r14
	xor	r9d, r9d
	mov	DWORD PTR -124[rbp], esi
	mov	r14d, eax
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR 0[r13+rdi*4]
	mov	r11d, edi
	test	esi, esi
	je	.L13
	cmp	esi, r14d
	je	.L13
	sub	esi, DWORD PTR -124[rbp]
	test	esi, esi
	jle	.L13
	test	r9d, r9d
	je	.L26
	lea	r10d, -1[r9]
	xor	eax, eax
	mov	rdx, r10
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L15:
	lea	ecx, 1[rax]
	lea	r8, 1[rax]
	cmp	rax, r10
	je	.L14
	mov	rax, r8
.L17:
	mov	ecx, eax
	cmp	DWORD PTR [rbx+rax*4], esi
	jl	.L15
	cmp	edx, eax
	jl	.L14
	movsx	rdx, edx
	.p2align 4,,10
	.p2align 3
.L16:
	mov	eax, DWORD PTR [r12+rdx*4]
	mov	DWORD PTR 4[r12+rdx*4], eax
	mov	eax, DWORD PTR [rbx+rdx*4]
	mov	DWORD PTR 4[rbx+rdx*4], eax
	sub	rdx, 1
	cmp	ecx, edx
	jle	.L16
.L14:
	movsx	rcx, ecx
	add	r9d, 1
	mov	DWORD PTR [r12+rcx*4], r11d
	mov	DWORD PTR [rbx+rcx*4], esi
.L13:
	lea	rax, 1[rdi]
	cmp	rdi, r15
	je	.L55
	mov	rdi, rax
	jmp	.L18
.L52:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	xor	edi, edi
	call	trap_R_SetColor@PLT
.L49:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	mov	rsp, QWORD PTR -192[rbp]
	jne	.L56
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L55:
	.cfi_restore_state
	mov	r14, QWORD PTR -136[rbp]
	test	r9d, r9d
	je	.L11
	lea	eax, -1[r9]
	mov	QWORD PTR -184[rbp], r14
	lea	r13, -80[rbp]
	lea	rax, 4[r12+rax*4]
	mov	QWORD PTR -152[rbp], rax
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L57:
	xor	edi, edi
	call	trap_R_SetColor@PLT
.L22:
	mov	edi, DWORD PTR [r15]
	call	trap_R_RegisterShader@PLT
	movss	xmm3, DWORD PTR -96[rbp]
	movss	xmm1, DWORD PTR -108[rbp]
	movsd	xmm2, QWORD PTR .LC0[rip]
	mulsd	xmm2, QWORD PTR -120[rbp]
	mov	edi, eax
	movss	xmm0, DWORD PTR -112[rbp]
	movss	DWORD PTR -128[rbp], xmm3
	movss	DWORD PTR -136[rbp], xmm1
	movss	DWORD PTR -124[rbp], xmm0
	movsd	QWORD PTR -144[rbp], xmm2
	call	CG_DrawPic@PLT
	movsx	rcx, DWORD PTR [rbx]
	mov	esi, 16
	mov	rdi, r13
	lea	rdx, .LC1[rip]
	mov	rax, rcx
	imul	rcx, rcx, 274877907
	sar	eax, 31
	sar	rcx, 38
	sub	ecx, eax
	call	Com_sprintf@PLT
	movss	xmm0, DWORD PTR -124[rbp]
	xor	r8d, r8d
	xor	ecx, ecx
	movsd	xmm2, QWORD PTR -144[rbp]
	movss	xmm3, DWORD PTR -128[rbp]
	xor	edx, edx
	mov	rsi, r13
	movss	xmm1, DWORD PTR -136[rbp]
	cvtss2sd	xmm0, xmm0
	mov	rdi, QWORD PTR -168[rbp]
	addsd	xmm0, xmm2
	addsd	xmm0, QWORD PTR .LC2[rip]
	movss	xmm2, DWORD PTR -160[rbp]
	addss	xmm1, xmm3
	cvtsd2ss	xmm0, xmm0
	call	CG_Text_Paint@PLT
	pxor	xmm1, xmm1
	mov	rax, QWORD PTR -176[rbp]
	pxor	xmm0, xmm0
	cvtss2sd	xmm1, DWORD PTR -156[rbp]
	addsd	xmm1, QWORD PTR -120[rbp]
	cvtss2sd	xmm0, DWORD PTR [rax]
	addsd	xmm0, xmm1
	cvtsd2ss	xmm0, xmm0
	movss	DWORD PTR [rax], xmm0
.L20:
	add	r12, 4
	add	rbx, 4
	cmp	QWORD PTR -152[rbp], r12
	je	.L11
.L23:
	mov	r14d, DWORD PTR [r12]
	mov	edi, r14d
	call	BG_FindItemForPowerup@PLT
	mov	r15, rax
	test	rax, rax
	je	.L20
	mov	rax, QWORD PTR -184[rbp]
	movsx	rcx, r14d
	mov	esi, DWORD PTR POWERUP_BLINKS[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax+rcx*4]
	mov	ecx, DWORD PTR POWERUP_BLINK_TIME[rip]
	sub	eax, DWORD PTR cg[rip]
	imul	esi, ecx
	cmp	eax, esi
	jge	.L57
	pxor	xmm0, xmm0
	pxor	xmm1, xmm1
	xor	edi, edi
	cvtsi2ss	xmm1, ecx
	cvtsi2ss	xmm0, eax
	divss	xmm0, xmm1
	pxor	xmm1, xmm1
	cvttss2si	eax, xmm0
	cvtsi2ss	xmm1, eax
	subss	xmm0, xmm1
	movss	DWORD PTR 12[rdi], xmm0
	movss	DWORD PTR 8[rdi], xmm0
	movss	DWORD PTR 4[rdi], xmm0
	movss	DWORD PTR [rdi], xmm0
	call	trap_R_SetColor@PLT
	jmp	.L22
.L26:
	xor	ecx, ecx
	jmp	.L14
.L54:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L7
.L56:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	CG_DrawAreaPowerUp, .-CG_DrawAreaPowerUp
	.comm	cg,16,16
	.comm	STAT_HEALTH,8,8
	.comm	POWERUP_BLINK_TIME,4,4
	.comm	POWERUP_BLINKS,4,4
	.comm	MAX_POWERUPS,4,4
	.comm	INT_MAX,4,4
	.comm	HUD_VERTICAL,4,4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1072168960
	.align 8
.LC2:
	.long	0
	.long	1074266112
	.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_DrawAreaPowerUp.c"
	.text
	.global	__aeabi_i2f
	.global	__aeabi_fdiv
	.global	__aeabi_f2iz
	.global	__aeabi_fsub
	.global	__aeabi_dmul
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%i\000"
	.global	__aeabi_fadd
	.global	__aeabi_f2d
	.global	__aeabi_dadd
	.global	__aeabi_d2f
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_DrawAreaPowerUp, %function
CG_DrawAreaPowerUp:
	@ args = 4, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #116
	ldr	ip, .L40
	ldr	lr, .L40+4
	ldr	ip, [ip]
	ldr	r4, [lr]
	lsl	r5, ip, #2
	add	lr, r5, #7
	bic	lr, lr, #7
	add	r7, r0, #8
	ldmia	r7, {r6-r7}
	str	r6, [fp, #-100]
	str	r7, [fp, #-96]
	str	sp, [fp, #-128]
	str	r3, [fp, #-120]	@ float
	sub	sp, sp, lr
	ldr	r3, .L40+8
	str	r2, [fp, #-116]	@ float
	add	r9, sp, #16
	sub	sp, sp, lr
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	add	r3, sp, #16
	str	r3, [fp, #-92]
	ldr	r3, [fp, #4]
	cmp	r4, r1
	ldr	r2, .L40+12
	ldr	r1, [r0, #16]	@ float
	str	r3, [fp, #-124]
	subne	r3, fp, #84
	subeq	r3, fp, #80
	str	r1, [fp, #-68]	@ float
	str	r3, [fp, #-112]
	ldr	r1, [r2, #4]
	ldr	r3, .L40+16
	ldr	r4, [r0]	@ float
	ldr	r2, [r3]
	ldr	r3, [r1]
	ldr	lr, [r0, #4]	@ float
	ldr	r3, [r3, r2, lsl #2]
	str	r6, [fp, #-76]
	str	r7, [fp, #-72]
	cmp	r3, #0
	str	r4, [fp, #-84]	@ float
	str	lr, [fp, #-80]	@ float
	str	r1, [fp, #-108]
	ble	.L36
	cmp	ip, #0
	ble	.L5
	mov	r4, #0
	mov	r10, r4
	ldr	r3, [fp, #-108]
	ldr	r0, [r3, #4]
	ldr	r3, .L40+20
	add	r5, r0, r5
	ldr	r7, [r3]
	ldr	r3, .L40+12
	sub	r5, r5, #4
	ldr	r8, [r3]
	sub	r0, r0, #4
.L12:
	ldr	r2, [r0, #4]!
	cmp	r2, #0
	beq	.L7
	cmp	r2, r7
	beq	.L7
	sub	r2, r2, r8
	cmp	r2, #0
	ble	.L7
	cmp	r10, #0
	beq	.L20
	ldr	r1, [fp, #-92]
	mov	r3, #0
	sub	r1, r1, #4
	b	.L11
.L9:
	add	r3, r3, #1
	cmp	r3, r10
	beq	.L8
.L11:
	ldr	ip, [r1, #4]!
	cmp	ip, r2
	blt	.L9
	sub	r1, r10, #1
	cmp	r1, r3
	blt	.L8
	ldr	ip, [fp, #-92]
	add	lr, r9, r10, lsl #2
	add	ip, ip, r10, lsl #2
	sub	r6, r3, #1
	str	r3, [fp, #-88]
.L10:
	ldr	r3, [lr, #-4]
	sub	r1, r1, #1
	str	r3, [lr], #-4
	ldr	r3, [ip, #-4]
	cmp	r1, r6
	str	r3, [ip], #-4
	bne	.L10
	ldr	r3, [fp, #-88]
.L8:
	ldr	r1, [fp, #-92]
	str	r4, [r9, r3, lsl #2]
	str	r2, [r1, r3, lsl #2]
	add	r10, r10, #1
.L7:
	cmp	r0, r5
	add	r4, r4, #1
	bne	.L12
	cmp	r10, #0
	beq	.L5
	sub	r3, r9, #4
	mov	r4, #0
	str	r3, [fp, #-88]
	str	r10, [fp, #-104]
	b	.L17
.L38:
	mov	r0, #0
	bl	trap_R_SetColor
.L16:
	sub	r1, fp, #100
	ldmia	r1, {r0-r1}
	mov	r2, #0
	ldr	r3, .L40+24
	bl	__aeabi_dmul
	mov	r6, r0
	ldr	r0, [r5]
	mov	r7, r1
	ldr	r8, [fp, #-84]	@ float
	ldr	r9, [fp, #-80]	@ float
	ldr	r10, [fp, #-68]	@ float
	bl	trap_R_RegisterShader
	mov	r2, r6
	mov	r3, r7
	mov	r1, r9
	str	r0, [sp, #4]
	str	r10, [sp]	@ float
	mov	r0, r8
	bl	CG_DrawPic
	ldr	r3, [fp, #-92]
	sub	r5, fp, #56
	ldr	r2, [r3, r4, lsl #2]
	ldr	r3, .L40+28
	mov	r0, r5
	smull	r1, r3, r2, r3
	asr	r2, r2, #31
	rsb	r3, r2, r3, asr #6
	mov	r1, #16
	ldr	r2, .L40+32
	bl	Com_sprintf
	mov	r1, r10
	mov	r0, r9
	bl	__aeabi_fadd
	mov	r3, r0
	mov	r0, r8
	mov	r8, r3
	bl	__aeabi_f2d
	mov	r2, r6
	mov	r3, r7
	bl	__aeabi_dadd
	mov	r2, #0
	ldr	r3, .L40+36
	bl	__aeabi_dadd
	bl	__aeabi_d2f
	mov	r3, #0
	str	r5, [sp]
	str	r3, [sp, #12]
	str	r3, [sp, #8]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-124]
	ldr	r2, [fp, #-120]	@ float
	mov	r1, r8
	bl	CG_Text_Paint
	ldr	r5, [fp, #-112]
	ldr	r0, [r5]	@ float
	bl	__aeabi_f2d
	mov	r6, r0
	ldr	r0, [fp, #-116]	@ float
	mov	r7, r1
	bl	__aeabi_f2d
	sub	r3, fp, #100
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dadd
	bl	__aeabi_d2f
	str	r0, [r5]	@ float
.L14:
	ldr	r3, [fp, #-104]
	add	r4, r4, #1
	cmp	r3, r4
	beq	.L5
.L17:
	ldr	r3, [fp, #-88]
	ldr	r7, [r3, #4]!
	mov	r0, r7
	str	r3, [fp, #-88]
	bl	BG_FindItemForPowerup
	subs	r5, r0, #0
	beq	.L14
	ldr	r3, .L40+40
	ldr	r2, [fp, #-108]
	ldr	r6, [r3]
	ldr	r3, .L40+44
	ldr	r2, [r2, #4]
	ldr	r3, [r3]
	ldr	r0, [r2, r7, lsl #2]
	ldr	r2, .L40+12
	mul	r3, r6, r3
	ldr	r2, [r2]
	sub	r0, r0, r2
	cmp	r0, r3
	bge	.L38
	bl	__aeabi_i2f
	mov	r3, r0
	mov	r0, r6
	mov	r6, r3
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fdiv
	mov	r6, r0
	bl	__aeabi_f2iz
	bl	__aeabi_i2f
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_fsub
	mov	r3, r0
	mov	r0, #0
	str	r3, [r0, #12]	@ float
	str	r3, [r0, #8]	@ float
	str	r3, [r0, #4]	@ float
	str	r3, [r0]	@ float
	bl	trap_R_SetColor
	b	.L16
.L5:
	mov	r0, #0
	bl	trap_R_SetColor
.L36:
	ldr	r3, .L40+8
	ldr	sp, [fp, #-128]
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	mov	r3, r10
	b	.L8
.L39:
	bl	__stack_chk_fail
.L41:
	.align	2
.L40:
	.word	MAX_POWERUPS
	.word	HUD_VERTICAL
	.word	.LC1
	.word	cg
	.word	STAT_HEALTH
	.word	INT_MAX
	.word	1072168960
	.word	274877907
	.word	.LC0
	.word	1074266112
	.word	POWERUP_BLINK_TIME
	.word	POWERUP_BLINKS
	.size	CG_DrawAreaPowerUp, .-CG_DrawAreaPowerUp
	.comm	cg,8,4
	.comm	STAT_HEALTH,4,4
	.comm	POWERUP_BLINK_TIME,4,4
	.comm	POWERUP_BLINKS,4,4
	.comm	MAX_POWERUPS,4,4
	.comm	INT_MAX,4,4
	.comm	HUD_VERTICAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
