	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_queue_tx_free_tfd
_ipw_queue_tx_free_tfd:                 ## @ipw_queue_tx_free_tfd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rbx
	movq	16(%rsi), %r13
	shlq	$5, %rbx
	movq	24(%r13,%rbx), %rax
	movq	_TX_HOST_COMMAND_TYPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rsi, %r12
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	16(%r13,%rbx), %edi
	callq	_le32_to_cpu
	movl	%eax, %r15d
	movq	_NUM_TFD_CHUNKS@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	16(%r13,%rbx), %edi
	callq	_le32_to_cpu
	cmpl	%r14d, %r15d
	jle	LBB0_2
## %bb.8:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IPW_ERROR                      ## TAILCALL
LBB0_2:
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	leaq	(%rbx,%r13), %r15
	addq	$16, %r15
	addq	%rbx, %r13
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movl	(%r15), %edi
	callq	_le32_to_cpu
	cltq
	cmpq	%rax, %r14
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%r15), %rax
	movl	(%rax,%r14,4), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movq	(%r13), %rax
	movl	(%rax,%r14,4), %edi
	callq	_le16_to_cpu
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pci_unmap_single
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movq	(%rcx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	callq	_libipw_txb_free
	movq	(%r12), %rax
	movq	8(%r12), %rcx
	movq	$0, (%rcx,%rax,8)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_HOST_COMMAND_TYPE,8,3       ## @TX_HOST_COMMAND_TYPE
	.comm	_NUM_TFD_CHUNKS,4,2             ## @NUM_TFD_CHUNKS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too many chunks: %i\n"

	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.no_dead_strip	_ipw_queue_tx_free_tfd
.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_free_tfd
_ipw_queue_tx_free_tfd:                 ; @ipw_queue_tx_free_tfd
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x24, [x1, #16]
	ldr	x25, [x1]
	add	x22, x24, x25, lsl #5
	ldr	x8, [x22, #24]
Lloh0:
	adrp	x9, _TX_HOST_COMMAND_TYPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TX_HOST_COMMAND_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x1
	ldr	x20, [x0]
	ldr	w0, [x22, #16]!
	bl	_le32_to_cpu
	mov	x21, x0
Lloh3:
	adrp	x8, _NUM_TFD_CHUNKS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NUM_TFD_CHUNKS@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w0, [x22]
	bl	_le32_to_cpu
	mov	x1, x0
	cmp	w21, w23
	b.le	LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_IPW_ERROR
LBB0_4:
	cmp	w1, #1
	b.lt	LBB0_1
; %bb.5:
	mov	x23, #0
	add	x24, x24, x25, lsl #5
	add	x25, x24, #8
Lloh8:
	adrp	x26, _PCI_DMA_TODEVICE@GOTPAGE
Lloh9:
	ldr	x26, [x26, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldr	w0, [x22]
	bl	_le32_to_cpu
	cmp	x23, w0, sxtw
	b.ge	LBB0_1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	lsl	x27, x23, #2
	ldr	w0, [x8, x27]
	bl	_le32_to_cpu
	mov	x21, x0
	ldr	x8, [x24]
	ldr	w0, [x8, x27]
	bl	_le16_to_cpu
	mov	x2, x0
	ldr	w3, [x26]
	mov	x0, x20
	mov	x1, x21
	bl	_pci_unmap_single
	ldp	x9, x8, [x19]
	ldr	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_libipw_txb_free
	ldp	x9, x8, [x19]
	str	xzr, [x8, x9, lsl #3]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_HOST_COMMAND_TYPE,8,3       ; @TX_HOST_COMMAND_TYPE
	.comm	_NUM_TFD_CHUNKS,4,2             ; @NUM_TFD_CHUNKS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too many chunks: %i\n"

	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.no_dead_strip	_ipw_queue_tx_free_tfd
.subsections_via_symbols
