	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alx_refill_rx_ring
_alx_refill_rx_ring:                    ## @alx_refill_rx_ring
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	24(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	(%r12), %rdx
	movq	16(%r12), %rax
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_2
LBB0_16:
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_2:
	movl	%esi, %ecx
	movq	%rdi, %r15
	leaq	(%rax,%rdx,8), %rsi
	leaq	1(%rdx), %rax
	xorl	%r14d, %r14d
	cmpq	(%rdi), %rax
	cmoveq	%r14, %rax
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	8(%r12), %rax
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r12), %r13
	movl	16(%r15), %esi
	movl	20(%r15), %edi
	addl	$64, %esi
	movl	%ecx, %edx
	callq	___netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rsi
	movl	%esi, %eax
	andl	$4095, %eax                     ## imm = 0xFFF
	cmpl	$4032, %eax                     ## imm = 0xFC0
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	$64, %esi
	callq	_skb_reserve
	movq	(%r15), %rsi
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	8(%r13), %rdi
	movl	16(%r13), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movl	%eax, %r14d
	movq	8(%r13), %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	andl	$3, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%r15, (%r12)
	movq	_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	16(%r15), %edx
	movq	%r12, %rdi
	callq	_dma_unmap_len_set
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r14d, %edx
	callq	_dma_unmap_addr_set
	movl	%r14d, %edi
	callq	_cpu_to_le64
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, (%rdx,%rcx,4)
	leaq	1(%rbx), %rcx
	cmpq	(%r15), %rcx
	movl	$0, %eax
	cmovneq	%rcx, %rax
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	16(%r12), %rcx
	leaq	(%rcx,%rbx,8), %rsi
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	incq	%r14
	cmpq	$0, (%rcx,%rbx,8)
	movq	%rbx, %rdx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	je	LBB0_3
	jmp	LBB0_12
LBB0_10:
	movq	%r15, %rdi
	callq	_dev_kfree_skb
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_11:
	movq	%rdx, %rbx
LBB0_12:
	testq	%r14, %r14
	jne	LBB0_13
	jmp	LBB0_16
LBB0_14:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_15:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_16
LBB0_13:
	xorl	%eax, %eax
	callq	_wmb
	movq	%rbx, (%r12)
	addq	$8, %r15
	movq	_ALX_RFD_PIDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_alx_write_mem16
LBB0_17:
	movl	%r14d, %eax
	addq	$56, %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
	.comm	_size,4,2                       ## @size
	.comm	_ALX_RFD_PIDX,4,2               ## @ALX_RFD_PIDX
	.no_dead_strip	_alx_refill_rx_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alx_refill_rx_ring
_alx_refill_rx_ring:                    ; @alx_refill_rx_ring
	.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
	ldr	x8, [x0, #24]
	ldr	x8, [x8]
	ldr	x26, [x8]
	ldr	x27, [x26]
	ldr	x8, [x26, #16]
	add	x23, x8, x27, lsl #3
	ldr	x8, [x23]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x19, #0
	b	LBB0_14
LBB0_2:
	mov	x21, x1
	mov	x20, x0
	mov	x19, #0
	add	x8, x27, #1
	ldr	x9, [x0]
	cmp	x8, x9
	csinc	x8, xzr, x27, eq
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x8
	ldr	x8, [x26, #8]
	cmp	x22, x8
	b.eq	LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x28, [x26, #24]
	ldp	w8, w0, [x20, #16]
	add	w1, w8, #64
	mov	x2, x21
	bl	___netdev_alloc_skb
	cbz	x0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x24, x0
	ldr	x1, [x0]
	and	x8, x1, #0xfff
	cmp	x8, #4032
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	mov	w1, #64
	bl	_skb_reserve
	ldr	x1, [x24]
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x20, #8]
	ldr	w2, [x20, #16]
Lloh0:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x25, x0
	ldr	x0, [x20, #8]
	mov	x1, x25
	bl	_dma_mapping_error
	cbnz	x0, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w0, w25, #0x3
	bl	_WARN_ON
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x24, [x23]
Lloh3:
	adrp	x8, _size@GOTPAGE
Lloh4:
	ldr	x8, [x8, _size@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x20, #16]
	mov	x0, x23
	bl	_dma_unmap_len_set
	mov	x0, x23
	mov	x1, x25
	mov	x2, x25
	bl	_dma_unmap_addr_set
	mov	x0, x25
	bl	_cpu_to_le64
	str	w0, [x28, x27, lsl #2]
	add	x8, x22, #1
	ldr	x9, [x20]
	cmp	x8, x9
	csinc	x8, xzr, x22, eq
	ldr	x9, [x26, #16]
	add	x23, x9, x22, lsl #3
	add	x19, x19, #1
	ldr	x9, [x23]
	mov	x27, x22
	cbz	x9, LBB0_3
	b	LBB0_12
LBB0_10:
	mov	x0, x24
	bl	_dev_kfree_skb
LBB0_11:
	mov	x22, x27
LBB0_12:
	cbz	x19, LBB0_14
; %bb.13:
	bl	_wmb
	str	x22, [x26]
	add	x0, x20, #8
Lloh6:
	adrp	x8, _ALX_RFD_PIDX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ALX_RFD_PIDX@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_alx_write_mem16
LBB0_14:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_size,4,2                       ; @size
	.comm	_ALX_RFD_PIDX,4,2               ; @ALX_RFD_PIDX
	.no_dead_strip	_alx_refill_rx_ring
.subsections_via_symbols
