	.file	"extr_cg_newdraw.c_CG_OneFlagStatus.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	CG_OneFlagStatus, @function
CG_OneFlagStatus:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR GT_1FCTF[rip]
	cmp	QWORD PTR cgs[rip], rax
	je	.L17
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR PW_NEUTRALFLAG[rip]
	call	BG_FindItemForPowerup@PLT
	test	rax, rax
	je	.L1
	mov	eax, DWORD PTR cgs[rip+8]
	cmp	eax, 4
	ja	.L1
	cmp	eax, DWORD PTR FLAG_TAKEN_RED[rip]
	je	.L18
	cmp	eax, DWORD PTR FLAG_TAKEN_BLUE[rip]
	je	.L19
	xor	ebp, ebp
	cmp	eax, DWORD PTR FLAG_DROPPED[rip]
	sete	bpl
	sal	rbp, 3
.L6:
	mov	edi, 1
	call	trap_R_SetColor@PLT
	mov	rax, QWORD PTR cgs[rip+16]
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR 8[rbx]
	mov	edi, DWORD PTR 12[rbx]
	mov	r8d, DWORD PTR [rax+rbp]
	mov	ecx, DWORD PTR [rbx]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 8
	jmp	CG_DrawPic@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	add	rsp, 8
	.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
.L18:
	.cfi_restore_state
	mov	QWORD PTR ds:17, 0
	mov	ebp, 4
	mov	QWORD PTR ds:9, 0
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L19:
	mov	QWORD PTR ds:9, 0
	mov	ebp, 4
	mov	QWORD PTR ds:1, 0
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	CG_OneFlagStatus, .-CG_OneFlagStatus
	.comm	cgs,24,16
	.comm	PW_NEUTRALFLAG,4,4
	.comm	GT_1FCTF,8,8
	.comm	FLAG_TAKEN_RED,4,4
	.comm	FLAG_TAKEN_BLUE,4,4
	.comm	FLAG_DROPPED,4,4
	.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_OneFlagStatus.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_OneFlagStatus, %function
CG_OneFlagStatus:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L17
	ldr	r4, .L17+4
	ldr	r3, [r3]
	ldr	r2, [r4]
	sub	sp, sp, #8
	cmp	r2, r3
	beq	.L14
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L14:
	ldr	r3, .L17+8
	mov	r5, r0
	ldr	r0, [r3]
	bl	BG_FindItemForPowerup
	cmp	r0, #0
	beq	.L1
	ldr	r3, [r4, #4]
	cmp	r3, #4
	bhi	.L1
	ldr	r2, .L17+12
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L15
	ldr	r2, .L17+16
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L16
	ldr	r2, .L17+20
	ldr	r6, [r2]
	cmp	r3, r6
	moveq	r6, #8
	movne	r6, #0
.L6:
	mov	r0, #1
	bl	trap_R_SetColor
	ldr	r2, [r4, #8]
	ldr	r3, [r5]
	ldr	r1, [r2, r6]
	ldr	r2, [r5, #4]
	str	r1, [sp]
	ldr	r1, [r5, #8]
	ldr	r0, [r5, #12]
	bl	CG_DrawPic
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L15:
	mov	r3, #0
	mov	r6, #4
	strb	r3, [r3, #9]
	strb	r3, [r3, #10]
	strb	r3, [r3, #11]
	strb	r3, [r3, #12]
	strb	r3, [r3, #5]
	strb	r3, [r3, #6]
	strb	r3, [r3, #7]
	strb	r3, [r3, #8]
	b	.L6
.L16:
	mov	r3, #0
	mov	r6, #4
	strb	r3, [r3, #5]
	strb	r3, [r3, #6]
	strb	r3, [r3, #7]
	strb	r3, [r3, #8]
	strb	r3, [r3, #1]
	strb	r3, [r3, #2]
	strb	r3, [r3, #3]
	strb	r3, [r3, #4]
	b	.L6
.L18:
	.align	2
.L17:
	.word	GT_1FCTF
	.word	cgs
	.word	PW_NEUTRALFLAG
	.word	FLAG_TAKEN_RED
	.word	FLAG_TAKEN_BLUE
	.word	FLAG_DROPPED
	.size	CG_OneFlagStatus, .-CG_OneFlagStatus
	.comm	cgs,12,4
	.comm	PW_NEUTRALFLAG,4,4
	.comm	GT_1FCTF,4,4
	.comm	FLAG_TAKEN_RED,4,4
	.comm	FLAG_TAKEN_BLUE,4,4
	.comm	FLAG_DROPPED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
