	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CG_TouchItem
_CG_TouchItem:                          ## @CG_TouchItem
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_cg_predictItems@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r15
	leaq	8(%rdi), %rbx
	movq	_cg@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	leaq	8(%r12), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_BG_PlayerTouchesItem
	testl	%eax, %eax
	je	LBB0_14
## %bb.2:
	movq	(%r15), %rax
	cmpq	(%r12), %rax
	je	LBB0_14
## %bb.3:
	movq	_cgs@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_BG_CanItemBeGrabbed
	testl	%eax, %eax
	je	LBB0_14
## %bb.4:
	movq	_bg_itemlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rsi
	movq	%rsi, %rbx
	shlq	$4, %rbx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rbx), %rdi
	movq	(%r13), %rax
	movq	_GT_CTF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.5:
	movq	8(%r12), %rax
	movq	_PERS_TEAM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_TEAM_RED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movq	(%rdi), %rcx
	movq	_IT_TEAM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rcx,%rbx), %ecx
	movq	_PW_REDFLAG@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_14
LBB0_8:
	movq	_TEAM_BLUE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.9:
	movq	(%rdi), %rax
	movq	_IT_TEAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax,%rbx), %eax
	movq	_PW_BLUEFLAG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_14
LBB0_11:
	movq	_EV_ITEM_PICKUP@GOTPCREL(%rip), %rax
	movq	%rdi, %r13
	movl	(%rax), %edi
	movq	%r14, %rdx
	callq	_BG_AddPredictableEventToPlayerstate
	movq	_EF_NODRAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r15)
	movq	(%r12), %rax
	movq	%rax, (%r15)
	movq	(%r13), %rax
	movq	_IT_WEAPON@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.12:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movb	8(%rsi,%rbx), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	16(%r12), %rcx
	movq	_STAT_WEAPONS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	orl	%eax, (%rcx,%rdx,4)
	movq	24(%r12), %rax
	movslq	8(%rsi,%rbx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	jne	LBB0_14
## %bb.13:
	movl	$1, (%rax,%rcx,4)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cg_predictItems,4,2            ## @cg_predictItems
	.comm	_cg,32,3                        ## @cg
	.comm	_cgs,8,3                        ## @cgs
	.comm	_bg_itemlist,8,3                ## @bg_itemlist
	.comm	_GT_CTF,8,3                     ## @GT_CTF
	.comm	_PERS_TEAM,8,3                  ## @PERS_TEAM
	.comm	_TEAM_RED,8,3                   ## @TEAM_RED
	.comm	_IT_TEAM,8,3                    ## @IT_TEAM
	.comm	_PW_REDFLAG,4,2                 ## @PW_REDFLAG
	.comm	_TEAM_BLUE,8,3                  ## @TEAM_BLUE
	.comm	_PW_BLUEFLAG,4,2                ## @PW_BLUEFLAG
	.comm	_EV_ITEM_PICKUP,4,2             ## @EV_ITEM_PICKUP
	.comm	_EF_NODRAW,4,2                  ## @EF_NODRAW
	.comm	_IT_WEAPON,8,3                  ## @IT_WEAPON
	.comm	_STAT_WEAPONS,8,3               ## @STAT_WEAPONS
	.comm	_GT_1FCTF,8,3                   ## @GT_1FCTF
	.comm	_PW_NEUTRALFLAG,4,2             ## @PW_NEUTRALFLAG
	.no_dead_strip	_CG_TouchItem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CG_TouchItem
_CG_TouchItem:                          ; @CG_TouchItem
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _cg_predictItems@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cg_predictItems@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
; %bb.1:
	mov	x19, x0
	add	x20, x0, #8
Lloh3:
	adrp	x21, _cg@GOTPAGE
Lloh4:
	ldr	x21, [x21, _cg@GOTPAGEOFF]
	mov	x0, x21
	ldr	x2, [x0], #8
	mov	x1, x20
	bl	_BG_PlayerTouchesItem
	cbz	w0, LBB0_14
; %bb.2:
	ldr	x8, [x19]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.3:
Lloh5:
	adrp	x24, _cgs@GOTPAGE
Lloh6:
	ldr	x24, [x24, _cgs@GOTPAGEOFF]
	ldr	x0, [x24]
	add	x2, x21, #8
	mov	x1, x20
	bl	_BG_CanItemBeGrabbed
	cbz	w0, LBB0_14
; %bb.4:
Lloh7:
	adrp	x8, _bg_itemlist@GOTPAGE
Lloh8:
	ldr	x8, [x8, _bg_itemlist@GOTPAGEOFF]
Lloh9:
	ldr	x22, [x8]
	ldr	x20, [x20]
	add	x23, x22, x20, lsl #4
	ldr	x8, [x24]
Lloh10:
	adrp	x9, _GT_CTF@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GT_CTF@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.5:
	ldr	x8, [x21, #8]
Lloh13:
	adrp	x9, _PERS_TEAM@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PERS_TEAM@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
Lloh16:
	adrp	x9, _TEAM_RED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TEAM_RED@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldr	x9, [x23]
Lloh19:
	adrp	x10, _IT_TEAM@GOTPAGE
Lloh20:
	ldr	x10, [x10, _IT_TEAM@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.7:
	add	x9, x22, x20, lsl #4
	ldr	w9, [x9, #8]
Lloh22:
	adrp	x10, _PW_REDFLAG@GOTPAGE
Lloh23:
	ldr	x10, [x10, _PW_REDFLAG@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	cmp	w9, w10
	b.eq	LBB0_14
LBB0_8:
Lloh25:
	adrp	x9, _TEAM_BLUE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _TEAM_BLUE@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x23]
Lloh28:
	adrp	x9, _IT_TEAM@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IT_TEAM@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	add	x8, x22, x20, lsl #4
	ldr	w8, [x8, #8]
Lloh31:
	adrp	x9, _PW_BLUEFLAG@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PW_BLUEFLAG@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_14
LBB0_11:
Lloh34:
	adrp	x8, _EV_ITEM_PICKUP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EV_ITEM_PICKUP@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	add	x2, x21, #8
	mov	x1, x20
	bl	_BG_AddPredictableEventToPlayerstate
Lloh37:
	adrp	x8, _EF_NODRAW@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EF_NODRAW@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	ldr	x8, [x21]
	str	x8, [x19]
	ldr	x8, [x23]
Lloh40:
	adrp	x9, _IT_WEAPON@GOTPAGE
Lloh41:
	ldr	x9, [x9, _IT_WEAPON@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	add	x10, x22, x20, lsl #4
	ldr	w9, [x10, #8]
	mov	w8, #1
	lsl	w11, w8, w9
Lloh43:
	adrp	x9, _STAT_WEAPONS@GOTPAGE
Lloh44:
	ldr	x9, [x9, _STAT_WEAPONS@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	lsl	x12, x9, #2
	ldp	x13, x9, [x21, #16]
	ldr	w14, [x13, x12]
	orr	w11, w14, w11
	str	w11, [x13, x12]
	ldrsw	x10, [x10, #8]
	ldr	w11, [x9, x10, lsl #2]
	cbnz	w11, LBB0_14
; %bb.13:
	str	w8, [x9, x10, lsl #2]
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_cg_predictItems,4,2            ; @cg_predictItems
	.comm	_cg,32,3                        ; @cg
	.comm	_cgs,8,3                        ; @cgs
	.comm	_bg_itemlist,8,3                ; @bg_itemlist
	.comm	_GT_CTF,8,3                     ; @GT_CTF
	.comm	_PERS_TEAM,8,3                  ; @PERS_TEAM
	.comm	_TEAM_RED,8,3                   ; @TEAM_RED
	.comm	_IT_TEAM,8,3                    ; @IT_TEAM
	.comm	_PW_REDFLAG,4,2                 ; @PW_REDFLAG
	.comm	_TEAM_BLUE,8,3                  ; @TEAM_BLUE
	.comm	_PW_BLUEFLAG,4,2                ; @PW_BLUEFLAG
	.comm	_EV_ITEM_PICKUP,4,2             ; @EV_ITEM_PICKUP
	.comm	_EF_NODRAW,4,2                  ; @EF_NODRAW
	.comm	_IT_WEAPON,8,3                  ; @IT_WEAPON
	.comm	_STAT_WEAPONS,8,3               ; @STAT_WEAPONS
	.comm	_GT_1FCTF,8,3                   ; @GT_1FCTF
	.comm	_PW_NEUTRALFLAG,4,2             ; @PW_NEUTRALFLAG
	.no_dead_strip	_CG_TouchItem
.subsections_via_symbols
