	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76_wcid_alloc
_mt76_wcid_alloc:                       ## @mt76_wcid_alloc
	.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	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_ARRAY_SIZE
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movl	(%rdi,%rbx,4), %eax
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_1
LBB0_4:
	xorl	%r14d, %r14d
	jmp	LBB0_5
LBB0_2:
	notl	%eax
	bsfl	%eax, %r14d
	movl	%r14d, %edi
	callq	_BIT
	movq	(%r15), %rcx
	orl	%eax, (%rcx,%rbx,4)
LBB0_5:
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	addl	%r14d, %ebx
	cmpl	$120, %ebx
	movl	$-1, %eax
	cmovll	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
	.no_dead_strip	_mt76_wcid_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76_wcid_alloc
_mt76_wcid_alloc:                       ; @mt76_wcid_alloc
	.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, x0
	ldr	x0, [x0]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	ldr	w8, [x0, x21, lsl #2]
	cmn	w8, #1
	b.ne	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	w20, #0
	b	LBB0_7
LBB0_6:
	mvn	w8, w8
	rbit	w8, w8
	clz	w20, w8
	mov	x0, x20
	bl	_BIT
	ldr	x8, [x19]
	lsl	x9, x21, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, w0
	str	w10, [x8, x9]
LBB0_7:
Lloh0:
	adrp	x8, _BITS_PER_LONG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BITS_PER_LONG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	madd	w8, w8, w21, w20
	cmp	w8, #119
	csinv	w0, w8, wzr, le
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
	.no_dead_strip	_mt76_wcid_alloc
.subsections_via_symbols
