	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p54_tx_qos_accounting_alloc
_p54_tx_qos_accounting_alloc:           ## @p54_tx_qos_accounting_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r14
	movq	_P54_QUEUE_NUM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rdx, (%rax)
	setbe	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	8(%r14), %r15
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	leaq	(%rbx,%rbx,2), %r12
	movq	(%r15,%r12,8), %rax
	xorl	%edi, %edi
	cmpq	8(%r15,%r12,8), %rax
	jl	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_IS_QOS_QUEUE
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
LBB0_5:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	(%r15,%r12,8), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movq	%rcx, (%rax)
	incl	16(%r15,%r12,8)
	xorl	%edi, %edi
	cmpq	8(%rax), %rcx
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_IS_QOS_QUEUE
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
LBB0_9:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_P54_QUEUE_DATA@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	movl	4(%r14), %edi
	movq	%rbx, %rsi
	callq	_ieee80211_stop_queue
LBB0_11:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_P54_QUEUE_NUM,8,3              ## @P54_QUEUE_NUM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_P54_QUEUE_DATA,8,3             ## @P54_QUEUE_DATA
	.no_dead_strip	_p54_tx_qos_accounting_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p54_tx_qos_accounting_alloc
_p54_tx_qos_accounting_alloc:           ; @p54_tx_qos_accounting_alloc
	.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
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _P54_QUEUE_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _P54_QUEUE_NUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x2
	cset	w0, ls
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	x21, [x19, #8]
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	w8, #24
	madd	x23, x20, x8, x21
	ldr	x8, [x23]
	mov	x22, x23
	ldr	x9, [x22, #8]!
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.3:
	mov	w0, #0
	bl	_unlikely
	cbz	x0, LBB0_8
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh5:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	x0, x20
	bl	_IS_QOS_QUEUE
	cmp	x0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_4
LBB0_8:
	ldr	x8, [x23]
	add	x8, x8, #1
	str	x8, [x23]
	mov	w9, #24
	madd	x9, x20, x9, x21
	ldr	w10, [x9, #16]
	add	w10, w10, #1
	str	w10, [x9, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_IS_QOS_QUEUE
	cmp	x0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	x0, LBB0_11
	b	LBB0_12
LBB0_10:
	mov	w0, #0
	bl	_unlikely
	cbz	x0, LBB0_12
LBB0_11:
Lloh7:
	adrp	x8, _P54_QUEUE_DATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _P54_QUEUE_DATA@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	sub	x1, x20, x8
	ldr	w0, [x19, #4]
	bl	_ieee80211_stop_queue
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_P54_QUEUE_NUM,8,3              ; @P54_QUEUE_NUM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_P54_QUEUE_DATA,8,3             ; @P54_QUEUE_DATA
	.no_dead_strip	_p54_tx_qos_accounting_alloc
.subsections_via_symbols
