	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netcp_free_rx_buf
_netcp_free_rx_buf:                     ## @netcp_free_rx_buf
	.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	%rdi, %rbx
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r14
	movq	16(%rdi), %rax
	movl	(%rax,%r14,4), %edi
	leaq	-48(%rbp), %rsi
	callq	_knav_queue_pop
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	leaq	-48(%rbp), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rax
	movl	(%rax,%r14,4), %edi
	movq	%r13, %rsi
	callq	_knav_queue_pop
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	-48(%rbp), %edx
	movl	%eax, %esi
	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.6:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-44(%rbp), %rdi
	leaq	-52(%rbp), %rsi
	movq	%r15, %rdx
	callq	_get_org_pkt_info
	movq	%r15, %rdi
	callq	_GET_SW_DATA0
	movq	%rax, %r12
	xorl	%edi, %edi
	cmpl	$0, -44(%rbp)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %edi
	movl	-44(%rbp), %esi
	movl	-52(%rbp), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	callq	_dma_unmap_page
	movq	%r12, %rdi
	callq	___free_page
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_dma_unmap_single
	movl	-52(%rbp), %eax
	xorl	%edi, %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setbe	%dil
	movq	%r12, %rsi
	callq	_netcp_frag_free
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	movq	%r15, %rsi
	callq	_knav_pool_desc_put
	jmp	LBB0_4
LBB0_5:
	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"

L_.str.1:                               ## @.str.1
	.asciz	"NULL orig_buff in desc\n"

L_.str.2:                               ## @.str.2
	.asciz	"NULL bufptr in desc\n"

	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_netcp_free_rx_buf
.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_buf
_netcp_free_rx_buf:                     ; @netcp_free_rx_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8, w1, sxtw #2]
	add	x1, sp, #8
	bl	_knav_queue_pop
	str	w0, [sp, #4]
	cbz	w0, LBB0_13
; %bb.1:
	mov	x1, x0
	sxtw	x26, w19
Lloh0:
	adrp	x27, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh2:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str.2@PAGE
Lloh5:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh6:
	adrp	x22, l_.str.1@PAGE
Lloh7:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh8:
	adrp	x23, l_.str@PAGE
Lloh9:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #8]
	mov	x1, x23
	bl	_dev_err
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x26, lsl #2]
	add	x1, sp, #8
	bl	_knav_queue_pop
	mov	x1, x0
	str	w0, [sp, #4]
	cbz	w0, LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	w2, [sp, #8]
	bl	_knav_pool_desc_unmap
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #4
	add	x1, sp, #12
	mov	x2, x24
	bl	_get_org_pkt_info
	mov	x0, x24
	bl	_GET_SW_DATA0
	mov	x25, x0
	ldr	w8, [sp, #4]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #8]
	mov	x1, x22
	bl	_dev_err
	b	LBB0_12
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	x25, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #8]
	mov	x1, x21
	bl	_dev_err
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #4]
	ldr	w1, [sp, #4]
	ldr	w2, [sp, #12]
	ldr	w3, [x27]
	cbz	w19, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	bl	_dma_unmap_page
	mov	x0, x25
	bl	___free_page
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_dma_unmap_single
	ldr	w8, [sp, #12]
	ldr	w9, [x28]
	cmp	w8, w9
	cset	w0, ls
	mov	x1, x25
	bl	_netcp_frag_free
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20]
	mov	x1, x24
	bl	_knav_pool_desc_put
	b	LBB0_3
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to unmap Rx desc\n"

l_.str.1:                               ; @.str.1
	.asciz	"NULL orig_buff in desc\n"

l_.str.2:                               ; @.str.2
	.asciz	"NULL bufptr in desc\n"

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