	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BG_FindItemForPowerup          ## -- Begin function BG_FindItemForPowerup
	.p2align	4, 0x90
_BG_FindItemForPowerup:                 ## @BG_FindItemForPowerup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_bg_numItems@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.1:
	movq	_bg_itemlist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_IT_POWERUP@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_IT_TEAM@GOTPCREL(%rip), %rsi
	movq	(%rsi), %r9
	movq	_IT_PERSISTANT_POWERUP@GOTPCREL(%rip), %rsi
	movq	(%rsi), %r8
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdi, 8(%rax)
	je	LBB0_8
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$16, %rax
	decq	%rcx
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rsi
	cmpq	%rdx, %rsi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r9, %rsi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r8, %rsi
	jne	LBB0_6
	jmp	LBB0_5
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bg_numItems,4,2                ## @bg_numItems
	.comm	_bg_itemlist,8,3                ## @bg_itemlist
	.comm	_IT_POWERUP,8,3                 ## @IT_POWERUP
	.comm	_IT_TEAM,8,3                    ## @IT_TEAM
	.comm	_IT_PERSISTANT_POWERUP,8,3      ## @IT_PERSISTANT_POWERUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BG_FindItemForPowerup          ; -- Begin function BG_FindItemForPowerup
	.p2align	2
_BG_FindItemForPowerup:                 ; @BG_FindItemForPowerup
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _bg_numItems@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bg_numItems@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _bg_itemlist@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bg_itemlist@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x10, _IT_POWERUP@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IT_POWERUP@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _IT_TEAM@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IT_TEAM@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
Lloh12:
	adrp	x12, _IT_PERSISTANT_POWERUP@GOTPAGE
Lloh13:
	ldr	x12, [x12, _IT_PERSISTANT_POWERUP@GOTPAGEOFF]
Lloh14:
	ldr	x12, [x12]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #16
	subs	x9, x9, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x8]
	cmp	x13, x10
	ccmp	x13, x11, #4, ne
	ccmp	x13, x12, #4, ne
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x13, [x8, #8]
	cmp	x13, x0
	b.ne	LBB0_2
; %bb.5:
	mov	x0, x8
	ret
LBB0_6:
	mov	x8, #0
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_bg_numItems,4,2                ; @bg_numItems
	.comm	_bg_itemlist,8,3                ; @bg_itemlist
	.comm	_IT_POWERUP,8,3                 ; @IT_POWERUP
	.comm	_IT_TEAM,8,3                    ; @IT_TEAM
	.comm	_IT_PERSISTANT_POWERUP,8,3      ; @IT_PERSISTANT_POWERUP
.subsections_via_symbols
