	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_conf_tx
_ath5k_conf_tx:                         ## @ath5k_conf_tx
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	xorl	%ebx, %ebx
	cmpq	%rdx, 8(%r12)
	jle	LBB0_5
## %bb.1:
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%r12, %rdi
	callq	_mutex_lock
	leaq	-56(%rbp), %r15
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_ath5k_hw_get_tx_queueprops
	movl	12(%r13), %r8d
	movl	%r8d, -44(%rbp)
	movl	8(%r13), %r9d
	movl	%r9d, -48(%rbp)
	movl	4(%r13), %eax
	movl	%eax, -52(%rbp)
	movl	(%r13), %ebx
	movl	%ebx, %ecx
	shll	$5, %ecx
	movl	%ecx, -56(%rbp)
	movq	_ATH5K_DEBUG_ANY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movq	%r14, %rcx
	pushq	%rbx
	pushq	%rax
	callq	_ATH5K_DBG
	addq	$16, %rsp
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_ath5k_hw_set_tx_queueprops
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_ATH5K_ERR
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_3:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ath5k_hw_reset_tx_queue
	xorl	%ebx, %ebx
LBB0_4:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH5K_DEBUG_ANY,4,2            ## @ATH5K_DEBUG_ANY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configure tx [queue %d],  aifs: %d, cw_min: %d, cw_max: %d, txop: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to update hardware queue %u!\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ath5k_conf_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_conf_tx
_ath5k_conf_tx:                         ; @ath5k_conf_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x19, [x0]
	ldr	x8, [x19, #8]
	cmp	x8, x2
	b.le	LBB0_3
; %bb.1:
	mov	x21, x3
	mov	x20, x2
	mov	x0, x19
	bl	_mutex_lock
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_get_tx_queueprops
	ldp	w5, w4, [x21, #8]
	stp	w5, w4, [sp, #8]
	ldp	w7, w6, [x21]
	lsl	w8, w7, #5
	stp	w8, w6, [sp]
Lloh0:
	adrp	x8, _ATH5K_DEBUG_ANY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH5K_DEBUG_ANY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_ATH5K_DBG
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_set_tx_queueprops
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_ATH5K_ERR
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_3:
	mov	w20, #0
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_reset_tx_queue
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH5K_DEBUG_ANY,4,2            ; @ATH5K_DEBUG_ANY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configure tx [queue %d],  aifs: %d, cw_min: %d, cw_max: %d, txop: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to update hardware queue %u!\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ath5k_conf_tx
.subsections_via_symbols
