	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ena_refill_rx_bufs
_ena_refill_rx_bufs:                    ## @ena_refill_rx_bufs
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	jle	LBB0_1
## %bb.2:
	movb	$1, %r14b
	xorl	%eax, %eax
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rax
	movq	%rbx, %r15
	movq	(%rax,%rbx,8), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_validate_rx_req_id
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rbx
	leaq	(,%r13,4), %r12
	addq	48(%rbx), %r12
	movq	___GFP_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ena_alloc_rx_page
	shrl	$31, %eax
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	16(%rbx), %edi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_ena_com_add_single_rx_desc
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	36(%rbx), %esi
	movq	%r15, %rdi
	callq	_ENA_RX_RING_IDX_NEXT
	movq	%rbx, %r12
	movq	%rax, %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	setl	%r14b
	jne	LBB0_3
## %bb.11:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str(%rip), %rcx
	movq	_rx_err@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	movq	_rx_status@GOTPCREL(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
LBB0_6:
	movl	40(%rbx), %edi
	movl	(%rax), %esi
	movl	20(%rbx), %r8d
	movl	24(%rbx), %edx
	callq	_netif_warn
LBB0_7:
	movq	%r15, %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_12:
	movzbl	%r14b, %edi
	andl	$1, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	leaq	28(%r14), %r12
	movq	%r12, %rdi
	callq	_u64_stats_update_begin
	incl	32(%r14)
	movq	%r12, %rdi
	callq	_u64_stats_update_end
	movl	20(%r14), %edx
	movl	24(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rcx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	callq	_netdev_warn
LBB0_14:
	movq	%r15, %rdi
	callq	_likely
	testq	%rax, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_16
## %bb.15:
	movl	16(%r14), %edi
	callq	_ena_com_write_sq_doorbell
LBB0_16:
	movq	%rbx, (%r14)
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	___GFP_COMP,4,2                 ## @__GFP_COMP
	.comm	_rx_err,4,2                     ## @rx_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to alloc buffer for rx queue %d\n"

	.comm	_rx_status,4,2                  ## @rx_status
L_.str.1:                               ## @.str.1
	.asciz	"failed to add buffer for rx queue %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"refilled rx qid %d with only %d buffers (from %d)\n"

	.no_dead_strip	_ena_refill_rx_bufs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ena_refill_rx_bufs
_ena_refill_rx_bufs:                    ; @ena_refill_rx_bufs
	.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
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0]
	cmp	x1, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x21, #0
	mov	w26, #1
Lloh0:
	adrp	x28, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x28, [x28, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	adrp	x23, ___GFP_COMP@GOTPAGE
Lloh3:
	ldr	x23, [x23, ___GFP_COMP@GOTPAGEOFF]
Lloh4:
	adrp	x27, _rx_err@GOTPAGE
Lloh5:
	ldr	x27, [x27, _rx_err@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x24, [x8, x20, lsl #3]
	mov	x0, x19
	mov	x1, x24
	bl	_validate_rx_req_id
	lsr	w0, w0, #31
	bl	_unlikely
	cbnz	x0, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #48]
	add	x25, x8, x24, lsl #2
	ldr	w8, [x28]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x19
	mov	x1, x25
	bl	_ena_alloc_rx_page
	lsr	w0, w0, #31
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #16]
	mov	x1, x25
	mov	x2, x24
	bl	_ena_com_add_single_rx_desc
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x19, #36]
	mov	x0, x20
	bl	_ENA_RX_RING_IDX_NEXT
	mov	x20, x0
	add	x21, x21, #1
	cmp	x21, x22
	cset	w26, lt
	cmp	x22, x21
	b.ne	LBB0_2
; %bb.6:
	mov	x21, x22
	b	LBB0_11
LBB0_7:
	mov	x21, #0
	mov	w26, #0
	b	LBB0_11
LBB0_8:
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x27, _rx_status@GOTPAGE
Lloh9:
	ldr	x27, [x27, _rx_status@GOTPAGEOFF]
Lloh10:
	adrp	x3, l_.str.1@PAGE
Lloh11:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_10:
	ldr	w0, [x19, #40]
	ldr	w1, [x27]
	ldp	w4, w2, [x19, #20]
	bl	_netif_warn
LBB0_11:
	and	w0, w26, #0x1
	bl	_unlikely
	cbz	x0, LBB0_13
; %bb.12:
	add	x23, x19, #28
	mov	x0, x23
	bl	_u64_stats_update_begin
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	mov	x0, x23
	bl	_u64_stats_update_end
	ldp	w2, w0, [x19, #20]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x3, x21
	mov	x4, x22
	bl	_netdev_warn
LBB0_13:
	mov	x0, x21
	bl	_likely
	cbz	x0, LBB0_15
; %bb.14:
	ldr	w0, [x19, #16]
	bl	_ena_com_write_sq_doorbell
LBB0_15:
	str	x20, [x19]
	mov	x0, 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
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	___GFP_COMP,4,2                 ; @__GFP_COMP
	.comm	_rx_err,4,2                     ; @rx_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to alloc buffer for rx queue %d\n"

	.comm	_rx_status,4,2                  ; @rx_status
l_.str.1:                               ; @.str.1
	.asciz	"failed to add buffer for rx queue %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"refilled rx qid %d with only %d buffers (from %d)\n"

	.no_dead_strip	_ena_refill_rx_bufs
.subsections_via_symbols
