	.file	"extr_cg_draw.c_CG_DrawHoldableItem.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	CG_DrawHoldableItem, @function
CG_DrawHoldableItem:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR cg[rip]
	mov	rdx, QWORD PTR STAT_HOLDABLE_ITEM[rip]
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rax, QWORD PTR [rax]
	movsx	rbx, DWORD PTR [rax+rdx*4]
	test	ebx, ebx
	jne	.L5
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, ebx
	call	CG_RegisterItemVisuals@PLT
	mov	edx, DWORD PTR ICON_SIZE[rip]
	mov	eax, DWORD PTR SCREEN_HEIGHT[rip]
	mov	edi, 640
	sub	eax, edx
	sub	edi, edx
	mov	ecx, edx
	mov	esi, eax
	shr	esi, 31
	add	esi, eax
	mov	rax, QWORD PTR cg_items[rip]
	sar	esi
	mov	r8d, DWORD PTR [rax+rbx*4]
	pop	rbx
	.cfi_def_cfa_offset 8
	jmp	CG_DrawPic@PLT
	.cfi_endproc
.LFE0:
	.size	CG_DrawHoldableItem, .-CG_DrawHoldableItem
	.comm	cg_items,8,8
	.comm	cg,8,8
	.comm	STAT_HOLDABLE_ITEM,8,8
	.comm	SCREEN_HEIGHT,4,4
	.comm	ICON_SIZE,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_draw.c_CG_DrawHoldableItem.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_DrawHoldableItem, %function
CG_DrawHoldableItem:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L9
	ldr	r2, .L9+4
	ldr	r3, [r3]
	push	{r4, lr}
	ldr	r2, [r2]
	ldr	r3, [r3]
	sub	sp, sp, #8
	ldr	r4, [r3, r2, lsl #2]
	cmp	r4, #0
	bne	.L8
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L8:
	mov	r0, r4
	bl	CG_RegisterItemVisuals
	ldr	r3, .L9+8
	ldr	r1, .L9+12
	ldr	r2, .L9+16
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	sub	r1, r1, r3
	ldr	r2, [r2, r4, lsl #2]
	add	r1, r1, r1, lsr #31
	str	r2, [sp]
	asr	r1, r1, #1
	mov	r2, r3
	rsb	r0, r3, #640
	bl	CG_DrawPic
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L10:
	.align	2
.L9:
	.word	cg
	.word	STAT_HOLDABLE_ITEM
	.word	ICON_SIZE
	.word	SCREEN_HEIGHT
	.word	cg_items
	.size	CG_DrawHoldableItem, .-CG_DrawHoldableItem
	.comm	cg_items,4,4
	.comm	cg,4,4
	.comm	STAT_HOLDABLE_ITEM,4,4
	.comm	SCREEN_HEIGHT,4,4
	.comm	ICON_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
