	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_aic_find_valid
_ar9003_aic_find_valid:                 ## @ar9003_aic_find_valid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	je	LBB0_5
## %bb.1:
	incl	%edx
	movslq	%edx, %rcx
	movq	_ATH_AIC_MAX_BT_CHANNEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rcx, %rax
	jbe	LBB0_8
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdi,%rcx,4)
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_2
## %bb.4:
	movq	%rax, %rcx
	jmp	LBB0_8
LBB0_5:
	movslq	%edx, %rcx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -4(%rdi,%rcx,4)
	leaq	-1(%rcx), %rcx
	je	LBB0_6
## %bb.7:
	movq	_ATH_AIC_MAX_BT_CHANNEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_8:
	cmpq	%rax, %rcx
	movq	$-1, %rax
	cmovbq	%rcx, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_AIC_MAX_BT_CHANNEL,8,3     ## @ATH_AIC_MAX_BT_CHANNEL
	.no_dead_strip	_ar9003_aic_find_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_aic_find_valid
_ar9003_aic_find_valid:                 ; @ar9003_aic_find_valid
	.cfi_startproc
; %bb.0:
	cbz	w1, LBB0_5
; %bb.1:
	add	w8, w2, #1
	sxtw	x9, w8
Lloh0:
	adrp	x8, _ATH_AIC_MAX_BT_CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH_AIC_MAX_BT_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x9
	b.ls	LBB0_8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x0, x9, lsl #2]
	cbnz	w10, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.4:
	mov	x9, x8
	b	LBB0_8
LBB0_5:
	sub	w8, w2, #1
	sxtw	x9, w8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x0, x9, lsl #2]
	sub	x9, x9, #1
	cbz	w8, LBB0_6
; %bb.7:
Lloh3:
	adrp	x8, _ATH_AIC_MAX_BT_CHANNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH_AIC_MAX_BT_CHANNEL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x9, x9, #1
LBB0_8:
	cmp	x9, x8
	csinv	x0, x9, xzr, lo
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_AIC_MAX_BT_CHANNEL,8,3     ; @ATH_AIC_MAX_BT_CHANNEL
	.no_dead_strip	_ar9003_aic_find_valid
.subsections_via_symbols
