	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BG_CanItemBeGrabbed            ## -- Begin function BG_CanItemBeGrabbed
	.p2align	4, 0x90
_BG_CanItemBeGrabbed:                   ## @BG_CanItemBeGrabbed
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	%edi, %r15d
	movl	(%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.1:
	movq	_bg_numItems@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_3
LBB0_2:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
	movl	(%rbx), %eax
LBB0_3:
	movq	_bg_itemlist@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	leaq	(%rax,%rax,2), %rdx
	movl	(%rcx,%rdx,8), %esi
	leal	-128(%rsi), %edi
	cmpl	$8, %edi
	ja	LBB0_15
## %bb.4:
	movq	_qtrue@GOTPCREL(%rip), %r8
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rdi,4), %rdi
	addq	%rax, %rdi
	jmpq	*%rdi
LBB0_5:
	movq	_GT_CTF@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_26
## %bb.6:
	movq	24(%r14), %rax
	movq	_PERS_TEAM@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %esi
	movq	_TEAM_RED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_20
## %bb.7:
	movq	8(%rcx,%rdx,8), %rdx
	movq	_PW_BLUEFLAG@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	je	LBB0_27
## %bb.8:
	movq	_PW_REDFLAG@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_9:
	movq	8(%r14), %rax
	movq	_STAT_HOLDABLE_ITEM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_18
	jmp	LBB0_26
LBB0_10:
	movl	16(%rcx,%rdx,8), %eax
	cmpl	$100, %eax
	je	LBB0_12
## %bb.11:
	cmpl	$5, %eax
	jne	LBB0_19
LBB0_12:
	movq	8(%r14), %rax
	movq	_STAT_HEALTH@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_14:
	leaq	(%rcx,%rdx,8), %rbx
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_Com_Error
	movl	(%rbx), %esi
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_Com_Printf
	jmp	LBB0_26
LBB0_16:
	movq	8(%r14), %rax
	movq	_STAT_ARMOR@GOTPCREL(%rip), %rcx
LBB0_13:
	movq	(%rcx), %rcx
	movq	_STAT_MAX_HEALTH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rax,%rdx,8), %rdx
	addq	%rdx, %rdx
	cmpq	%rdx, (%rax,%rcx,8)
	jb	LBB0_18
	jmp	LBB0_26
LBB0_17:
	movq	(%r14), %rax
	movq	8(%rcx,%rdx,8), %rcx
	cmpl	$200, (%rax,%rcx,4)
	jge	LBB0_26
	jmp	LBB0_18
LBB0_19:
	movq	8(%r14), %rax
	movq	_STAT_HEALTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	_STAT_MAX_HEALTH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rax,%rdx,8), %rcx
	jae	LBB0_26
LBB0_18:
	movq	_qtrue@GOTPCREL(%rip), %r8
	jmp	LBB0_27
LBB0_20:
	movq	_TEAM_BLUE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_26
## %bb.21:
	movq	8(%rcx,%rdx,8), %rdx
	movq	_PW_REDFLAG@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	je	LBB0_27
## %bb.22:
	movq	_PW_BLUEFLAG@GOTPCREL(%rip), %rax
LBB0_23:
	cmpq	(%rax), %rdx
	jne	LBB0_26
## %bb.24:
	cmpl	$0, 8(%rbx)
	jne	LBB0_27
## %bb.25:
	movq	16(%r14), %rax
	cmpl	$0, (%rax,%rcx,4)
	jne	LBB0_27
LBB0_26:
	movq	_qfalse@GOTPCREL(%rip), %r8
LBB0_27:
	movl	(%r8), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_27
	.long	L0_0_set_5
	.long	L0_0_set_27
	.long	L0_0_set_15
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_14
	.long	L0_0_set_16
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_bg_numItems,4,2                ## @bg_numItems
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BG_CanItemBeGrabbed: index out of range"

	.comm	_bg_itemlist,8,3                ## @bg_itemlist
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_STAT_ARMOR,8,3                 ## @STAT_ARMOR
	.comm	_STAT_MAX_HEALTH,8,3            ## @STAT_MAX_HEALTH
	.comm	_STAT_HEALTH,8,3                ## @STAT_HEALTH
	.comm	_GT_CTF,4,2                     ## @GT_CTF
	.comm	_PERS_TEAM,8,3                  ## @PERS_TEAM
	.comm	_TEAM_RED,4,2                   ## @TEAM_RED
	.comm	_PW_BLUEFLAG,8,3                ## @PW_BLUEFLAG
	.comm	_PW_REDFLAG,8,3                 ## @PW_REDFLAG
	.comm	_TEAM_BLUE,4,2                  ## @TEAM_BLUE
	.comm	_STAT_HOLDABLE_ITEM,8,3         ## @STAT_HOLDABLE_ITEM
L_.str.1:                               ## @.str.1
	.asciz	"BG_CanItemBeGrabbed: IT_BAD"

L_.str.2:                               ## @.str.2
	.asciz	"BG_CanItemBeGrabbed: unknown enum %d\n"

	.comm	_GT_1FCTF,4,2                   ## @GT_1FCTF
	.comm	_GT_HARVESTER,4,2               ## @GT_HARVESTER
	.comm	_PW_GUARD,8,3                   ## @PW_GUARD
	.comm	_PW_NEUTRALFLAG,8,3             ## @PW_NEUTRALFLAG
	.comm	_PW_SCOUT,8,3                   ## @PW_SCOUT
	.comm	_STAT_PERSISTANT_POWERUP,8,3    ## @STAT_PERSISTANT_POWERUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BG_CanItemBeGrabbed            ; -- Begin function BG_CanItemBeGrabbed
	.p2align	2
_BG_CanItemBeGrabbed:                   ; @BG_CanItemBeGrabbed
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _bg_numItems@GOTPAGE
Lloh1:
	ldr	x9, [x9, _bg_numItems@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, #1
	ccmp	w8, w9, #0, ge
	b.lt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
	ldr	w8, [x20]
LBB0_2:
Lloh8:
	adrp	x9, _bg_itemlist@GOTPAGE
Lloh9:
	ldr	x9, [x9, _bg_itemlist@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	mov	w10, #24
	smaddl	x22, w8, w10, x9
	ldr	w1, [x22]
	sub	w11, w1, #128
	cmp	w11, #8
	b.hi	LBB0_12
; %bb.3:
	sxtw	x10, w8
Lloh11:
	adrp	x8, _qtrue@GOTPAGE
Lloh12:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh13:
	adrp	x12, lJTI0_0@PAGE
Lloh14:
	add	x12, x12, lJTI0_0@PAGEOFF
	adr	x13, LBB0_4
	ldrb	w14, [x12, x11]
	add	x13, x13, x14, lsl #2
	br	x13
LBB0_4:
Lloh15:
	adrp	x8, _GT_CTF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GT_CTF@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_13
; %bb.5:
	ldr	x8, [x19, #24]
Lloh18:
	adrp	x11, _PERS_TEAM@GOTPAGE
Lloh19:
	ldr	x11, [x11, _PERS_TEAM@GOTPAGEOFF]
Lloh20:
	ldr	x11, [x11]
	ldr	w8, [x8, x11, lsl #2]
Lloh21:
	adrp	x11, _TEAM_RED@GOTPAGE
Lloh22:
	ldr	x11, [x11, _TEAM_RED@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	cmp	w8, w11
	b.ne	LBB0_19
; %bb.6:
	mov	w8, #24
	madd	x8, x10, x8, x9
	ldr	x9, [x8, #8]
Lloh24:
	adrp	x8, _PW_BLUEFLAG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PW_BLUEFLAG@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_25
; %bb.7:
Lloh27:
	adrp	x10, _PW_REDFLAG@GOTPAGE
Lloh28:
	ldr	x10, [x10, _PW_REDFLAG@GOTPAGEOFF]
	b	LBB0_22
LBB0_8:
	ldr	x9, [x19, #8]
Lloh29:
	adrp	x10, _STAT_HOLDABLE_ITEM@GOTPAGE
Lloh30:
	ldr	x10, [x10, _STAT_HOLDABLE_ITEM@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
Lloh32:
	adrp	x10, _qfalse@GOTPAGE
Lloh33:
	ldr	x10, [x10, _qfalse@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
	b	LBB0_26
LBB0_9:
	mov	w11, #24
	madd	x9, x10, x11, x9
	ldr	w9, [x9, #16]
	cmp	w9, #100
	ccmp	w9, #5, #4, ne
	b.ne	LBB0_18
; %bb.10:
	ldr	x9, [x19, #8]
Lloh34:
	adrp	x10, _STAT_HEALTH@GOTPAGE
Lloh35:
	ldr	x10, [x10, _STAT_HEALTH@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
Lloh36:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_Com_Error
	ldr	w1, [x22]
LBB0_12:
Lloh41:
	adrp	x0, l_.str.2@PAGE
Lloh42:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Com_Printf
LBB0_13:
Lloh43:
	adrp	x8, _qfalse@GOTPAGE
Lloh44:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
	b	LBB0_26
LBB0_14:
	ldr	x9, [x19, #8]
Lloh45:
	adrp	x10, _STAT_ARMOR@GOTPAGE
Lloh46:
	ldr	x10, [x10, _STAT_ARMOR@GOTPAGEOFF]
LBB0_15:
	ldr	x10, [x10]
	ldr	x10, [x9, x10, lsl #3]
Lloh47:
	adrp	x11, _STAT_MAX_HEALTH@GOTPAGE
Lloh48:
	ldr	x11, [x11, _STAT_MAX_HEALTH@GOTPAGEOFF]
Lloh49:
	ldr	x11, [x11]
	ldr	x9, [x9, x11, lsl #3]
Lloh50:
	adrp	x11, _qfalse@GOTPAGE
Lloh51:
	ldr	x11, [x11, _qfalse@GOTPAGEOFF]
	cmp	x10, x9, lsl #1
LBB0_16:
	csel	x8, x8, x11, lo
	b	LBB0_26
LBB0_17:
	ldr	x11, [x19]
	mov	w12, #24
	madd	x9, x10, x12, x9
	ldr	x9, [x9, #8]
	ldr	w9, [x11, x9, lsl #2]
Lloh52:
	adrp	x10, _qfalse@GOTPAGE
Lloh53:
	ldr	x10, [x10, _qfalse@GOTPAGEOFF]
	cmp	w9, #199
	csel	x8, x10, x8, gt
	b	LBB0_26
LBB0_18:
	ldr	x9, [x19, #8]
Lloh54:
	adrp	x10, _STAT_HEALTH@GOTPAGE
Lloh55:
	ldr	x10, [x10, _STAT_HEALTH@GOTPAGEOFF]
Lloh56:
	ldr	x10, [x10]
	ldr	x10, [x9, x10, lsl #3]
Lloh57:
	adrp	x11, _STAT_MAX_HEALTH@GOTPAGE
Lloh58:
	ldr	x11, [x11, _STAT_MAX_HEALTH@GOTPAGEOFF]
Lloh59:
	ldr	x11, [x11]
	ldr	x9, [x9, x11, lsl #3]
Lloh60:
	adrp	x11, _qfalse@GOTPAGE
Lloh61:
	ldr	x11, [x11, _qfalse@GOTPAGEOFF]
	cmp	x10, x9
	b	LBB0_16
LBB0_19:
Lloh62:
	adrp	x11, _TEAM_BLUE@GOTPAGE
Lloh63:
	ldr	x11, [x11, _TEAM_BLUE@GOTPAGEOFF]
Lloh64:
	ldr	w11, [x11]
	cmp	w8, w11
	b.ne	LBB0_13
; %bb.20:
	mov	w8, #24
	madd	x8, x10, x8, x9
	ldr	x9, [x8, #8]
Lloh65:
	adrp	x8, _PW_REDFLAG@GOTPAGE
Lloh66:
	ldr	x8, [x8, _PW_REDFLAG@GOTPAGEOFF]
Lloh67:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_25
; %bb.21:
Lloh68:
	adrp	x10, _PW_BLUEFLAG@GOTPAGE
Lloh69:
	ldr	x10, [x10, _PW_BLUEFLAG@GOTPAGEOFF]
LBB0_22:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_13
; %bb.23:
	ldr	w9, [x20, #8]
	cbnz	w9, LBB0_25
; %bb.24:
	ldr	x9, [x19, #16]
	ldr	w8, [x9, x8, lsl #2]
	cbz	w8, LBB0_13
LBB0_25:
Lloh70:
	adrp	x8, _qtrue@GOTPAGE
Lloh71:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
LBB0_26:
	ldr	w0, [x8]
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGot	Lloh70, Lloh71
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_26-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_26-LBB0_4)>>2
	.byte	(LBB0_12-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_14-LBB0_4)>>2
	.byte	(LBB0_17-LBB0_4)>>2
                                        ; -- End function
	.comm	_bg_numItems,4,2                ; @bg_numItems
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BG_CanItemBeGrabbed: index out of range"

	.comm	_bg_itemlist,8,3                ; @bg_itemlist
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_STAT_ARMOR,8,3                 ; @STAT_ARMOR
	.comm	_STAT_MAX_HEALTH,8,3            ; @STAT_MAX_HEALTH
	.comm	_STAT_HEALTH,8,3                ; @STAT_HEALTH
	.comm	_GT_CTF,4,2                     ; @GT_CTF
	.comm	_PERS_TEAM,8,3                  ; @PERS_TEAM
	.comm	_TEAM_RED,4,2                   ; @TEAM_RED
	.comm	_PW_BLUEFLAG,8,3                ; @PW_BLUEFLAG
	.comm	_PW_REDFLAG,8,3                 ; @PW_REDFLAG
	.comm	_TEAM_BLUE,4,2                  ; @TEAM_BLUE
	.comm	_STAT_HOLDABLE_ITEM,8,3         ; @STAT_HOLDABLE_ITEM
l_.str.1:                               ; @.str.1
	.asciz	"BG_CanItemBeGrabbed: IT_BAD"

l_.str.2:                               ; @.str.2
	.asciz	"BG_CanItemBeGrabbed: unknown enum %d\n"

	.comm	_GT_1FCTF,4,2                   ; @GT_1FCTF
	.comm	_GT_HARVESTER,4,2               ; @GT_HARVESTER
	.comm	_PW_GUARD,8,3                   ; @PW_GUARD
	.comm	_PW_NEUTRALFLAG,8,3             ; @PW_NEUTRALFLAG
	.comm	_PW_SCOUT,8,3                   ; @PW_SCOUT
	.comm	_STAT_PERSISTANT_POWERUP,8,3    ; @STAT_PERSISTANT_POWERUP
.subsections_via_symbols
