	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_ItemPickup
_CG_ItemPickup:                         ## @CG_ItemPickup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_cg@GOTPCREL(%rip), %r8
	movl	%edi, (%r8)
	movl	16(%r8), %ecx
	movl	%ecx, 28(%r8)
	movl	%ecx, 24(%r8)
	movq	_bg_itemlist@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movslq	%edi, %rsi
	shlq	$4, %rsi
	movq	(%rdx,%rsi), %rdi
	movq	_IT_WEAPON@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_4
## %bb.1:
	movq	_cg_autoswitch@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.2:
	movq	8(%rdx,%rsi), %rdx
	movq	_WP_MACHINEGUN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_4
## %bb.3:
	movl	%ecx, 20(%r8)
	movq	%rdx, 8(%r8)
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg,32,3                        ## @cg
	.comm	_bg_itemlist,8,3                ## @bg_itemlist
	.comm	_IT_WEAPON,8,3                  ## @IT_WEAPON
	.comm	_cg_autoswitch,8,3              ## @cg_autoswitch
	.comm	_WP_MACHINEGUN,8,3              ## @WP_MACHINEGUN
	.no_dead_strip	_CG_ItemPickup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_ItemPickup
_CG_ItemPickup:                         ; @CG_ItemPickup
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _cg@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg@GOTPAGEOFF]
	str	w0, [x8]
	ldr	w9, [x8, #16]
	stp	w9, w9, [x8, #24]
Lloh2:
	adrp	x10, _bg_itemlist@GOTPAGE
Lloh3:
	ldr	x10, [x10, _bg_itemlist@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	sbfiz	x11, x0, #4, #32
	ldr	x11, [x10, x11]
Lloh5:
	adrp	x12, _IT_WEAPON@GOTPAGE
Lloh6:
	ldr	x12, [x12, _IT_WEAPON@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x12]
Lloh8:
	adrp	x13, _cg_autoswitch@GOTPAGE
Lloh9:
	ldr	x13, [x13, _cg_autoswitch@GOTPAGEOFF]
Lloh10:
	ldr	x13, [x13]
	cmp	x11, x12
	ccmp	x13, #0, #4, eq
	b.eq	LBB0_3
; %bb.1:
	sxtw	x11, w0
	add	x10, x10, x11, lsl #4
	ldr	x10, [x10, #8]
Lloh11:
	adrp	x11, _WP_MACHINEGUN@GOTPAGE
Lloh12:
	ldr	x11, [x11, _WP_MACHINEGUN@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	cmp	x10, x11
	b.eq	LBB0_3
; %bb.2:
	str	w9, [x8, #20]
	str	x10, [x8, #8]
LBB0_3:
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cg,32,3                        ; @cg
	.comm	_bg_itemlist,8,3                ; @bg_itemlist
	.comm	_IT_WEAPON,8,3                  ; @IT_WEAPON
	.comm	_cg_autoswitch,8,3              ; @cg_autoswitch
	.comm	_WP_MACHINEGUN,8,3              ; @WP_MACHINEGUN
	.no_dead_strip	_CG_ItemPickup
.subsections_via_symbols
