	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_alloc_rx_buffers          ## -- Begin function i40e_alloc_rx_buffers
	.p2align	4, 0x90
_i40e_alloc_rx_buffers:                 ## @i40e_alloc_rx_buffers
	.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
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.1:
	movq	%rdi, %r14
	cmpl	$0, 32(%rdi)
	je	LBB0_12
## %bb.2:
	movq	%rsi, %r13
	movq	(%r14), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_I40E_RX_DESC
	movq	%rax, %r12
	movq	%r15, %rbx
	shlq	$4, %rbx
	addq	16(%r14), %rbx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_I40E_RX_DESC
	movq	%rax, %r12
	movq	16(%r14), %rbx
	xorl	%r15d, %r15d
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, (%r12)
	decq	%r13
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i40e_alloc_mapped_page
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	24(%r14), %ecx
	movl	28(%r14), %edi
	movq	(%rbx), %rdx
	movq	8(%rbx), %rsi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_dma_sync_single_range_for_device
	movq	(%rbx), %rdi
	addq	8(%rbx), %rdi
	callq	_cpu_to_le64
	movl	%eax, (%r12)
	incq	%r15
	xorl	%edi, %edi
	cmpq	8(%r14), %r15
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$8, %r12
	addq	$16, %rbx
	jmp	LBB0_7
LBB0_8:
	xorl	%ebx, %ebx
	cmpq	%r15, (%r14)
	jne	LBB0_11
	jmp	LBB0_12
LBB0_9:
	movl	$1, %ebx
	cmpq	%r15, (%r14)
	je	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_i40e_release_rx_desc
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_alloc_rx_buffers          ; -- Begin function i40e_alloc_rx_buffers
	.p2align	2
_i40e_alloc_rx_buffers:                 ; @i40e_alloc_rx_buffers
	.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	x19, x0
	mov	w0, #0
	cbz	x1, LBB0_11
; %bb.1:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_11
; %bb.2:
	mov	x21, x1
	ldr	x20, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_I40E_RX_DESC
	mov	x22, x0
	ldr	x8, [x19, #16]
	add	x23, x8, x20, lsl #4
Lloh0:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, #0
	bl	_I40E_RX_DESC
	mov	x22, x0
	mov	x20, #0
	ldr	x23, [x19, #16]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x22]
	subs	x21, x21, #1
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_i40e_alloc_mapped_page
	cbz	w0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x2, x1, [x23]
	ldp	w3, w0, [x19, #24]
	ldr	w4, [x24]
	bl	_dma_sync_single_range_for_device
	ldp	x9, x8, [x23]
	add	x0, x9, x8
	bl	_cpu_to_le64
	str	w0, [x22], #8
	add	x20, x20, #1
	ldr	x8, [x19, #8]
	cmp	x20, x8
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #16
	b	LBB0_4
LBB0_8:
	mov	w0, #0
	ldr	x8, [x19]
	cmp	x8, x20
	b.ne	LBB0_10
	b	LBB0_11
LBB0_9:
	ldr	x8, [x19]
	mov	w21, #1
	mov	w0, #1
	cmp	x8, x20
	b.eq	LBB0_11
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	bl	_i40e_release_rx_desc
	mov	x0, x21
LBB0_11:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
.subsections_via_symbols
