	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nicvf_free_rbdr
_nicvf_free_rbdr:                       ## @nicvf_free_rbdr
	.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, -56(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.1:
	movq	%rsi, %r13
	movl	$0, (%rsi)
	cmpl	$0, 20(%rsi)
	je	LBB0_18
## %bb.2:
	leaq	16(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %ebx
	movl	8(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	%eax, %ebx
	jne	LBB0_3
LBB0_7:
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_GET_RBDR_DESC
	movq	(%rax), %r15
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_nicvf_iova_to_phys
	movq	%rax, %r14
	movq	(%rbx), %rdi
	movq	_RCV_FRAG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DMA_ATTR_SKIP_CPU_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	callq	_dma_unmap_page_attrs
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_phys_to_virt
	movl	%eax, %edi
	callq	_virt_to_page
	movq	%rax, %rdi
	callq	_put_page
LBB0_9:
	xorl	%eax, %eax
	callq	_smp_rmb
	cmpl	$0, 12(%r13)
	jle	LBB0_17
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r15,%rbx), %rdi
	callq	_put_page
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r14
	movslq	12(%r13), %rax
	addq	$16, %rbx
	cmpq	%rax, %r14
	jge	LBB0_17
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r13), %r15
	movq	(%r15,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	callq	_page_ref_count
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	$0, 24(%r13)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r15,%rbx), %rdi
	movq	8(%r15,%rbx), %rsi
	decq	%rsi
	callq	_page_ref_sub
	jmp	LBB0_15
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nicvf_free_q_desc_mem          ## TAILCALL
LBB0_3:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	decl	%eax
	andl	%eax, %ebx
	cmpl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_GET_RBDR_DESC
	movq	(%rax), %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_nicvf_iova_to_phys
	movq	%rax, %r15
	movq	(%r12), %rdi
	movq	_RCV_FRAG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DMA_ATTR_SKIP_CPU_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rsi
	callq	_dma_unmap_page_attrs
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_phys_to_virt
	movl	%eax, %edi
	callq	_virt_to_page
	movq	%rax, %rdi
	callq	_put_page
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_RCV_FRAG_LEN,4,2               ## @RCV_FRAG_LEN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ## @DMA_ATTR_SKIP_CPU_SYNC
	.no_dead_strip	_nicvf_free_rbdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nicvf_free_rbdr
_nicvf_free_rbdr:                       ; @nicvf_free_rbdr
	.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
	cbz	x1, LBB0_7
; %bb.1:
	mov	x20, x1
	str	wzr, [x1]
	ldr	w8, [x1, #20]
	cbz	w8, LBB0_7
; %bb.2:
	mov	x19, x0
	add	x21, x20, #16
Lloh0:
	adrp	x26, _RCV_FRAG_LEN@GOTPAGE
Lloh1:
	ldr	x26, [x26, _RCV_FRAG_LEN@GOTPAGEOFF]
	ldp	w23, w22, [x20, #4]
Lloh2:
	adrp	x27, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh4:
	adrp	x28, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGE
Lloh5:
	ldr	x28, [x28, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w23, #1
	ldr	w9, [x21]
	sub	w9, w9, #1
	and	w23, w9, w8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	cmp	w23, w22
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x23
	bl	_GET_RBDR_DESC
	ldr	x25, [x0]
	mov	x0, x19
	mov	x1, x25
	bl	_nicvf_iova_to_phys
	mov	x24, x0
	ldr	x0, [x19]
	ldr	w2, [x26]
	ldr	w3, [x27]
	ldr	w4, [x28]
	mov	x1, x25
	bl	_dma_unmap_page_attrs
	cbz	x24, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_phys_to_virt
	bl	_virt_to_page
	bl	_put_page
	b	LBB0_3
LBB0_7:
	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_8:
	mov	x1, x22
	bl	_GET_RBDR_DESC
	ldr	x23, [x0]
	mov	x0, x19
	mov	x1, x23
	bl	_nicvf_iova_to_phys
	mov	x22, x0
	ldr	x0, [x19]
	ldr	w2, [x26]
	ldr	w3, [x27]
	ldr	w4, [x28]
	mov	x1, x23
	bl	_dma_unmap_page_attrs
	cbz	x22, LBB0_10
; %bb.9:
	mov	x0, x22
	bl	_phys_to_virt
	bl	_virt_to_page
	bl	_put_page
LBB0_10:
	bl	_smp_rmb
	ldr	w8, [x20, #12]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.11:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x0, [x24, x22]
	bl	_put_page
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20, #12]
	add	x22, x22, #16
	cmp	x23, x8
	b.ge	LBB0_18
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x20, #32]
	ldr	x0, [x24, x22]
	cbz	x0, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	bl	_page_ref_count
	cbz	x0, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x24, x22
	ldp	x0, x8, [x8]
	sub	x1, x8, #1
	bl	_page_ref_sub
	b	LBB0_12
LBB0_18:
	mov	x0, x19
	mov	x1, x21
	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	_nicvf_free_q_desc_mem
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RCV_FRAG_LEN,4,2               ; @RCV_FRAG_LEN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ; @DMA_ATTR_SKIP_CPU_SYNC
	.no_dead_strip	_nicvf_free_rbdr
.subsections_via_symbols
