	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_queue_tx_hcmd
_ipw_queue_tx_hcmd:                     ## @ipw_queue_tx_hcmd
	.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
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movq	%rdx, %r13
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	addq	$24, %rdi
	callq	_ipw_tx_queue_space
	xorl	%r14d, %r14d
	cmpl	$1, %r12d
	movl	$0, %ecx
	adcl	$1, %ecx
	cmpl	%ecx, %eax
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_IPW_ERROR
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_3
LBB0_2:
	movq	8(%rbx), %rax
	movq	16(%rbx), %r12
	movq	24(%rbx), %rcx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rcx,4), %r13
	leaq	(%r12,%r13,4), %rdi
	movq	$0, (%rax,%rcx,8)
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movq	_TX_HOST_COMMAND_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12,%r13,4)
	movq	_TFD_NEED_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12,%r13,4)
	incl	(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12,%r13,4)
	movl	%r15d, 4(%r12,%r13,4)
	movl	8(%r12,%r13,4), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_memcpy
	movq	24(%rbx), %rdi
	movl	36(%rbx), %esi
	callq	_ipw_queue_inc_wrap
	movq	%rax, 24(%rbx)
	movl	32(%rbx), %esi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_ipw_write32
	movq	%rbx, %rdi
	movl	$144, %esi
	callq	__ipw_read32
LBB0_3:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No space for Tx\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_TX_HOST_COMMAND_TYPE,4,2       ## @TX_HOST_COMMAND_TYPE
	.comm	_TFD_NEED_IRQ_MASK,4,2          ## @TFD_NEED_IRQ_MASK
	.no_dead_strip	_ipw_queue_tx_hcmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_queue_tx_hcmd
_ipw_queue_tx_hcmd:                     ; @ipw_queue_tx_hcmd
	.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	x23, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	add	x0, x0, #24
	bl	_ipw_tx_queue_space
	cmp	w23, #0
	mov	w8, #1
	cinc	w8, w8, eq
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_ERROR
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	ldp	x10, x8, [x19, #16]
	mov	w9, #20
	ldr	x11, [x19, #8]
	madd	x23, x8, x9, x10
	str	xzr, [x11, x8, lsl #3]
	mov	x0, x23
	mov	w1, #0
	mov	w2, #20
	bl	_memset
Lloh5:
	adrp	x8, _TX_HOST_COMMAND_TYPE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TX_HOST_COMMAND_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x23, #16]
Lloh8:
	adrp	x8, _TFD_NEED_IRQ_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TFD_NEED_IRQ_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x23, #12]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	stp	w22, w20, [x23]
	ldr	w0, [x23, #8]
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	ldr	x0, [x19, #24]
	ldr	w1, [x19, #36]
	bl	_ipw_queue_inc_wrap
	mov	x2, x0
	str	x0, [x19, #24]
	ldr	w1, [x19, #32]
	mov	x0, x19
	bl	_ipw_write32
	mov	x0, x19
	mov	w1, #144
	bl	__ipw_read32
	mov	w0, #0
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No space for Tx\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_TX_HOST_COMMAND_TYPE,4,2       ; @TX_HOST_COMMAND_TYPE
	.comm	_TFD_NEED_IRQ_MASK,4,2          ; @TFD_NEED_IRQ_MASK
	.no_dead_strip	_ipw_queue_tx_hcmd
.subsections_via_symbols
