	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nicvf_alloc_rcv_buffer
_nicvf_alloc_rcv_buffer:                ## @nicvf_alloc_rcv_buffer
	.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	%r8, %r15
	movq	%rcx, %r14
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	cmpq	$0, (%rsi)
	je	LBB0_1
LBB0_5:
	movq	%r13, %rdi
	callq	_nicvf_get_page
	movq	$0, 8(%r13)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_nicvf_alloc_page
	testq	%rax, %rax
	je	LBB0_6
## %bb.11:
	movq	%rax, %r12
	movq	$0, (%r13)
	movq	(%rbx), %rax
	movq	%rax, %rcx
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_XDP_PACKET_HEADROOM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_13:
	addq	%rcx, %r14
	movq	8(%r12), %rsi
	movq	%rsi, 8(%r13)
	movb	$1, %bl
	testq	%rax, %rax
	je	LBB0_14
## %bb.20:
	movq	(%r12), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.21:
	movq	%rcx, (%r15)
	jmp	LBB0_25
LBB0_1:
	movq	8(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.2:
	movq	(%r13), %rax
	leaq	(%rax,%r14), %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_5
## %bb.3:
	incl	32(%r13)
	jmp	LBB0_4
LBB0_6:
	movq	8(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.7:
	movq	$0, (%r13)
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_XDP_PACKET_HEADROOM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_9:
	addq	%rax, %r14
	xorl	%eax, %eax
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	movq	16(%r13), %rdi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_DMA_ATTR_SKIP_CPU_SYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%rax, %rdx
	movq	%r14, %rcx
	callq	_dma_map_page_attrs
	movq	%rax, (%r15)
	movq	16(%r13), %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_22
## %bb.16:
	cmpq	$0, (%r13)
	jne	LBB0_18
## %bb.17:
	movq	8(%r13), %rdi
	xorl	%esi, %esi
	callq	___free_pages
LBB0_18:
	movq	$0, 8(%r13)
	jmp	LBB0_19
LBB0_22:
	testb	%bl, %bl
	je	LBB0_24
## %bb.23:
	movq	_XDP_PACKET_HEADROOM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%r15), %rax
	movq	%rax, (%r12)
LBB0_24:
	addq	%r14, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_10:
	movq	24(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_this_cpu_inc
LBB0_19:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_25:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_XDP_PACKET_HEADROOM,8,3        ## @XDP_PACKET_HEADROOM
	.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_alloc_rcv_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nicvf_alloc_rcv_buffer
_nicvf_alloc_rcv_buffer:                ; @nicvf_alloc_rcv_buffer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x1]
	cbz	x8, LBB0_5
LBB0_1:
	mov	x0, x19
	bl	_nicvf_get_page
	str	xzr, [x19, #8]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_nicvf_alloc_page
	cbz	x0, LBB0_8
; %bb.2:
	mov	x22, x0
	ldr	x1, [x0, #8]
	str	xzr, [x19]
Lloh0:
	adrp	x8, _XDP_PACKET_HEADROOM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XDP_PACKET_HEADROOM@GOTPAGEOFF]
	ldr	x9, [x23]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, #0
	csel	x8, xzr, x8, eq
	add	x20, x8, x20
	str	x1, [x19, #8]
	cbz	x9, LBB0_10
; %bb.3:
	ldr	x8, [x22]
	cbz	x8, LBB0_10
; %bb.4:
	mov	w0, #0
	str	x8, [x21]
	b	LBB0_20
LBB0_5:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_1
; %bb.6:
	ldr	x2, [x19]
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x9, x2, x20
	cmp	x9, x8
	b.gt	LBB0_1
; %bb.7:
	mov	w24, #0
	mov	x22, #0
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	b	LBB0_11
LBB0_8:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_18
; %bb.9:
	mov	x2, #0
	mov	w24, #0
	mov	x22, #0
	str	xzr, [x19]
	ldr	x8, [x23]
Lloh6:
	adrp	x9, _XDP_PACKET_HEADROOM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XDP_PACKET_HEADROOM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x8, xzr, x9, eq
	add	x20, x8, x20
	b	LBB0_11
LBB0_10:
	mov	x2, #0
	mov	w24, #1
LBB0_11:
	ldr	x0, [x19, #16]
Lloh9:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGEOFF]
Lloh14:
	ldr	w5, [x8]
	mov	x3, x20
	bl	_dma_map_page_attrs
	mov	x1, x0
	str	x0, [x21]
	ldr	x0, [x19, #16]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_dma_mapping_error
	cbz	x0, LBB0_15
; %bb.12:
	ldr	x8, [x19]
	cbnz	x8, LBB0_14
; %bb.13:
	ldr	x0, [x19, #8]
	mov	w1, #0
	bl	___free_pages
LBB0_14:
	str	xzr, [x19, #8]
	b	LBB0_19
LBB0_15:
	cbz	w24, LBB0_17
; %bb.16:
	ldr	x8, [x21]
Lloh15:
	adrp	x9, _XDP_PACKET_HEADROOM@GOTPAGE
Lloh16:
	ldr	x9, [x9, _XDP_PACKET_HEADROOM@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x22]
LBB0_17:
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, x20
	str	x8, [x19]
	b	LBB0_20
LBB0_18:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_this_cpu_inc
LBB0_19:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_XDP_PACKET_HEADROOM,8,3        ; @XDP_PACKET_HEADROOM
	.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_alloc_rcv_buffer
.subsections_via_symbols
