	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netcp_free_rx_desc_chain
_netcp_free_rx_desc_chain:              ## @netcp_free_rx_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
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	callq	_get_words
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	$4, %edx
	callq	_knav_pool_desc_unmap
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-56(%rbp), %rdi
	leaq	-60(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rcx
	callq	_get_pkt_info
	movq	%r15, %rdi
	callq	_GET_SW_DATA0
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_GET_SW_DATA1
	movl	4(%r12), %edi
	movq	-56(%rbp), %rsi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	callq	_dma_unmap_page
	movq	%rbx, %rdi
	callq	___free_page
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_knav_pool_desc_put
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_5:
	movq	%r14, %rdi
	callq	_GET_SW_DATA0
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_GET_SW_DATA1
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	%eax, (%rcx)
	setae	%dil
	movq	%r15, %rsi
	callq	_netcp_frag_free
LBB0_7:
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_knav_pool_desc_put
	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	"failed to unmap Rx desc\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_netcp_free_rx_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_rx_desc_chain
_netcp_free_rx_desc_chain:              ; @netcp_free_rx_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
	mov	x19, x1
	mov	x20, x0
	add	x0, sp, #24
	mov	w1, #1
	mov	x2, x19
	bl	_get_words
	ldr	x1, [sp, #24]
Lloh0:
	adrp	x22, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PAGE_SIZE@GOTPAGEOFF]
	cbz	x1, LBB0_5
; %bb.1:
Lloh2:
	adrp	x23, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DMA_FROM_DEVICE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	w2, #4
	bl	_knav_pool_desc_unmap
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, sp, #16
	add	x1, sp, #12
	add	x2, sp, #24
	mov	x3, x21
	bl	_get_pkt_info
	mov	x0, x21
	bl	_GET_SW_DATA0
	mov	x21, x0
	mov	x0, x19
	bl	_GET_SW_DATA1
	ldr	w0, [x20, #4]
	ldr	x1, [sp, #16]
	ldr	w2, [x22]
	ldr	w3, [x23]
	bl	_dma_unmap_page
	mov	x0, x21
	bl	___free_page
	ldr	w0, [x20]
	mov	x1, x19
	bl	_knav_pool_desc_put
	ldr	x1, [sp, #24]
	cbnz	x1, LBB0_2
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x19
	bl	_GET_SW_DATA0
	mov	x21, x0
	mov	x0, x19
	bl	_GET_SW_DATA1
	cbz	x21, LBB0_7
; %bb.6:
	ldr	w8, [x22]
	cmp	w8, w0
	cset	w0, hs
	mov	x1, x21
	bl	_netcp_frag_free
LBB0_7:
	ldr	w0, [x20]
	mov	x1, x19
	bl	_knav_pool_desc_put
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to unmap Rx desc\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_netcp_free_rx_desc_chain
.subsections_via_symbols
