	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_DrawPickupItem
_CG_DrawPickupItem:                     ## @CG_DrawPickupItem
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_cg@GOTPCREL(%rip), %rax
	movq	8(%rax), %rcx
	movq	(%rcx), %rcx
	movq	_STAT_HEALTH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rcx,%rdx,8)
	jle	LBB0_4
## %bb.1:
	movq	_ICON_SIZE@GOTPCREL(%rip), %r12
	subl	(%r12), %ebx
	movslq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_4
## %bb.2:
	movl	4(%rax), %edi
	movl	$3000, %esi                     ## imm = 0xBB8
	callq	_CG_FadeColor
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r15
	movl	%r14d, %edi
	callq	_CG_RegisterItemVisuals
	movq	%r15, %rdi
	callq	_trap_R_SetColor
	movl	(%r12), %ecx
	movq	_cg_items@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %r8d
	movl	$8, %edi
	movl	%ebx, %esi
	movl	%ecx, %edx
	callq	_CG_DrawPic
	movl	(%r12), %eax
	leal	16(%rax), %edi
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	_BIGCHAR_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	addl	%ebx, %esi
	subl	%ecx, %esi
	movq	_bg_itemlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14,4), %edx
	movss	(%r15), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	callq	_CG_DrawBigString
	xorl	%edi, %edi
	callq	_trap_R_SetColor
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,16,3                        ## @cg
	.comm	_STAT_HEALTH,8,3                ## @STAT_HEALTH
	.comm	_ICON_SIZE,4,2                  ## @ICON_SIZE
	.comm	_cg_items,8,3                   ## @cg_items
	.comm	_BIGCHAR_HEIGHT,4,2             ## @BIGCHAR_HEIGHT
	.comm	_bg_itemlist,8,3                ## @bg_itemlist
	.no_dead_strip	_CG_DrawPickupItem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_DrawPickupItem
_CG_DrawPickupItem:                     ; @CG_DrawPickupItem
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, _cg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg@GOTPAGEOFF]
	ldr	x9, [x8, #8]
	ldr	x9, [x9]
Lloh2:
	adrp	x10, _STAT_HEALTH@GOTPAGE
Lloh3:
	ldr	x10, [x10, _STAT_HEALTH@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	cmp	x9, #1
	b.lt	LBB0_4
; %bb.1:
Lloh5:
	adrp	x22, _ICON_SIZE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ICON_SIZE@GOTPAGEOFF]
	ldr	w9, [x22]
	sub	w19, w19, w9
	ldrsw	x21, [x8]
	cbz	w21, LBB0_4
; %bb.2:
	ldr	w0, [x8, #4]
	mov	w1, #3000
	bl	_CG_FadeColor
	cbz	x0, LBB0_4
; %bb.3:
	mov	x20, x0
	mov	x0, x21
	bl	_CG_RegisterItemVisuals
	mov	x0, x20
	bl	_trap_R_SetColor
	ldr	w2, [x22]
Lloh7:
	adrp	x8, _cg_items@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cg_items@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	lsl	x21, x21, #2
	ldr	w4, [x8, x21]
	mov	w0, #8
	mov	x1, x19
	mov	x3, x2
	bl	_CG_DrawPic
	ldr	w8, [x22]
	add	w0, w8, #16
	cmp	w8, #0
Lloh10:
	adrp	x9, _BIGCHAR_HEIGHT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _BIGCHAR_HEIGHT@GOTPAGEOFF]
	cinc	w8, w8, lt
Lloh12:
	ldr	w9, [x9]
	cmp	w9, #0
	cinc	w9, w9, lt
	add	w8, w19, w8, asr #1
	sub	w1, w8, w9, asr #1
Lloh13:
	adrp	x8, _bg_itemlist@GOTPAGE
Lloh14:
	ldr	x8, [x8, _bg_itemlist@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	w2, [x8, x21]
	ldr	s0, [x20]
	bl	_CG_DrawBigString
	mov	x0, #0
	bl	_trap_R_SetColor
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,16,3                        ; @cg
	.comm	_STAT_HEALTH,8,3                ; @STAT_HEALTH
	.comm	_ICON_SIZE,4,2                  ; @ICON_SIZE
	.comm	_cg_items,8,3                   ; @cg_items
	.comm	_BIGCHAR_HEIGHT,4,2             ; @BIGCHAR_HEIGHT
	.comm	_bg_itemlist,8,3                ; @bg_itemlist
	.no_dead_strip	_CG_DrawPickupItem
.subsections_via_symbols
