	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_htc_mbox_tx
_ath6kl_htc_mbox_tx:                    ## @ath6kl_htc_mbox_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_ATH6KL_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rsi), %rdx
	movl	20(%rsi), %ecx
	movl	16(%rsi), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_ath6kl_dbg
	movq	(%rbx), %r14
	movq	_ENDPOINT_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jae	LBB0_1
## %bb.2:
	shlq	$2, %r14
	addq	8(%r15), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_ath6kl_htc_tx_try
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_HTC_OP_STATE_STOPPING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r15), %eax
	jne	LBB0_4
## %bb.5:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movl	$1, %edi
	callq	_WARN_ON
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_7
LBB0_4:
	movq	_ECANCELED@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 12(%rbx)
	leaq	-40(%rbp), %r15
	movq	%r15, %rdi
	callq	_INIT_LIST_HEAD
	addq	$8, %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_list_add
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_htc_tx_complete
LBB0_7:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH6KL_DBG_HTC,4,2             ## @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"htc tx ep id %d buf 0x%p len %d\n"

	.comm	_ENDPOINT_MAX,8,3               ## @ENDPOINT_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HTC_OP_STATE_STOPPING,4,2      ## @HTC_OP_STATE_STOPPING
	.comm	_ECANCELED,4,2                  ## @ECANCELED
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.no_dead_strip	_ath6kl_htc_mbox_tx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_htc_mbox_tx
_ath6kl_htc_mbox_tx:                    ; @ath6kl_htc_mbox_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
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ATH6KL_DBG_HTC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH6KL_DBG_HTC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x2, [x1]
	ldp	w4, w3, [x1, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _ENDPOINT_MAX@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ENDPOINT_MAX@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_4
; %bb.1:
	ldr	x9, [x21, #8]
	add	x20, x9, x8, lsl #2
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_ath6kl_htc_tx_try
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _HTC_OP_STATE_STOPPING@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HTC_OP_STATE_STOPPING@GOTPAGEOFF]
Lloh10:
	adrp	x10, _ECANCELED@GOTPAGE
Lloh11:
	ldr	x10, [x10, _ECANCELED@GOTPAGEOFF]
Lloh12:
	adrp	x11, _ENOSPC@GOTPAGE
Lloh13:
	ldr	x11, [x11, _ENOSPC@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19, #12]
	add	x0, sp, #8
	bl	_INIT_LIST_HEAD
	add	x0, x19, #8
	add	x1, sp, #8
	bl	_list_add
	add	x1, sp, #8
	mov	x0, x20
	bl	_htc_tx_complete
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	w0, #1
	bl	_WARN_ON
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH6KL_DBG_HTC,4,2             ; @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"htc tx ep id %d buf 0x%p len %d\n"

	.comm	_ENDPOINT_MAX,8,3               ; @ENDPOINT_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HTC_OP_STATE_STOPPING,4,2      ; @HTC_OP_STATE_STOPPING
	.comm	_ECANCELED,4,2                  ; @ECANCELED
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.no_dead_strip	_ath6kl_htc_mbox_tx
.subsections_via_symbols
