	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netcp_free_tx_desc_chain
_netcp_free_tx_desc_chain:              ## @netcp_free_tx_desc_chain
	.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
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	-56(%rbp), %r15
	leaq	-64(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdx
	movq	%r12, %rcx
	callq	_get_pkt_info
	movq	-56(%rbp), %rsi
	movl	-44(%rbp), %ecx
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_dma_unmap_single
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_dev_warn
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	movq	%r12, %rsi
	callq	_knav_pool_desc_put
	movq	-64(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	movl	%r14d, %edx
	callq	_knav_pool_desc_unmap
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_2
## %bb.8:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad Tx desc buf(%pad), len(%d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to unmap Tx desc\n"

	.no_dead_strip	_netcp_free_tx_desc_chain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netcp_free_tx_desc_chain
_netcp_free_tx_desc_chain:              ; @netcp_free_tx_desc_chain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	cbz	x1, LBB0_8
; %bb.1:
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x21, l_.str@PAGE
Lloh1:
	add	x21, x21, l_.str@PAGEOFF
Lloh2:
	adrp	x23, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DMA_TO_DEVICE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #16
	add	x1, sp, #12
	add	x2, sp, #24
	mov	x3, x22
	bl	_get_pkt_info
	ldr	x1, [sp, #16]
	ldr	w8, [sp, #12]
	cmp	x1, #0
	ccmp	w8, #0, #4, ne
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20]
	add	x2, sp, #16
	mov	x1, x21
	mov	x3, x8
	bl	_dev_warn
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20, #8]
	ldr	w3, [x23]
	mov	x2, x8
	bl	_dma_unmap_single
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20, #4]
	mov	x1, x22
	bl	_knav_pool_desc_put
	ldr	x1, [sp, #24]
	cbz	x1, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20, #4]
	mov	x2, x19
	bl	_knav_pool_desc_unmap
	mov	x22, x0
	cbnz	x0, LBB0_2
; %bb.7:
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_8:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad Tx desc buf(%pad), len(%d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to unmap Tx desc\n"

	.no_dead_strip	_netcp_free_tx_desc_chain
.subsections_via_symbols
