	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_net_rx_alloc_one
_nfp_net_rx_alloc_one:                  ## @nfp_net_rx_alloc_one
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_alloc_page
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %rdi
	callq	_page_address
	jmp	LBB0_4
LBB0_3:
	movl	8(%r15), %edi
	callq	_netdev_alloc_frag
LBB0_4:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_nfp_net_dma_map_rx
	movl	%eax, (%r14)
	movl	4(%r15), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_nfp_net_free_frag
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rsi
LBB0_9:
	movq	%r15, %rdi
	callq	_nn_dp_warn
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to alloc receive page frag\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to map DMA RX buffer\n"

	.no_dead_strip	_nfp_net_rx_alloc_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_net_rx_alloc_one
_nfp_net_rx_alloc_one:                  ; @nfp_net_rx_alloc_one
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_alloc_page
	cbz	x0, LBB0_6
; %bb.2:
	bl	_page_address
	mov	x21, x0
	cbz	x0, LBB0_6
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	bl	_nfp_net_dma_map_rx
	mov	x1, x0
	str	w0, [x20]
	ldr	w0, [x19, #4]
	bl	_dma_mapping_error
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w1, [x19]
	mov	x0, x21
	bl	_nfp_net_free_frag
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_netdev_alloc_frag
	mov	x21, x0
	cbnz	x0, LBB0_3
LBB0_6:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_nn_dp_warn
	mov	x21, #0
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to alloc receive page frag\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to map DMA RX buffer\n"

	.no_dead_strip	_nfp_net_rx_alloc_one
.subsections_via_symbols
