	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgmac_rx_refill
_xgmac_rx_refill:                       ## @xgmac_rx_refill
	.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	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_ETH_HLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rax), %ecx
	movq	_ETH_FCS_LEN@GOTPCREL(%rip), %rax
	addl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rdi), %edi
	movl	4(%rbx), %esi
	movq	_DMA_RX_RING_SZ@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_dma_ring_space
	cmpl	$2, %eax
	jge	LBB0_1
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %rdi
	movl	4(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_netdev_dbg
	movl	(%rbx), %edi
	movl	(%r15), %esi
	callq	_dma_ring_incr
	movl	%eax, (%rbx)
	movq	%r12, %rdi
	callq	_desc_set_rx_owner
	movl	(%rbx), %edi
	movl	4(%rbx), %esi
	movl	(%r15), %edx
	callq	_dma_ring_space
	cmpl	$1, %eax
	jle	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movslq	%edx, %r14
	leaq	(,%r14,4), %r12
	movq	24(%rbx), %rax
	addq	40(%rbx), %r12
	cmpq	$0, (%rax,%r14,8)
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_netdev_alloc_skb_ip_align
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	32(%rbx), %edi
	movl	(%r13), %esi
	movq	16(%rbx), %rdx
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %rax
	subq	(%rax), %rdx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movl	%eax, %r15d
	movl	32(%rbx), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%rbx), %rax
	movq	%r13, (%rax,%r14,8)
	movq	16(%rbx), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_desc_set_buf_addr
	movl	(%rbx), %edx
	movq	_DMA_RX_RING_SZ@GOTPCREL(%rip), %r15
	jmp	LBB0_5
LBB0_7:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_kfree_skb_any              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ## @ETH_FCS_LEN
	.comm	_DMA_RX_RING_SZ,4,2             ## @DMA_RX_RING_SZ
	.comm	_NET_IP_ALIGN,8,3               ## @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx ring: head %d, tail %d\n"

	.no_dead_strip	_xgmac_rx_refill
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgmac_rx_refill
_xgmac_rx_refill:                       ; @xgmac_rx_refill
	.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	x19, x0
	ldr	x8, [x0, #8]
	ldr	w20, [x8]
Lloh0:
	adrp	x8, _ETH_HLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_HLEN@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _ETH_FCS_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETH_FCS_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	w0, [x0]
	ldr	w1, [x19, #4]
Lloh6:
	adrp	x26, _DMA_RX_RING_SZ@GOTPAGE
Lloh7:
	ldr	x26, [x26, _DMA_RX_RING_SZ@GOTPAGEOFF]
	ldr	w2, [x26]
	bl	_dma_ring_space
	cmp	w0, #2
	b.lt	LBB0_7
; %bb.1:
	add	w8, w21, w20
	add	w20, w8, w22
Lloh8:
	adrp	x27, _NET_IP_ALIGN@GOTPAGE
Lloh9:
	ldr	x27, [x27, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh10:
	adrp	x28, _DMA_FROM_DEVICE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh12:
	adrp	x21, l_.str@PAGE
Lloh13:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #8]
	ldr	w3, [x19, #4]
	mov	x1, x21
	mov	x2, x23
	bl	_netdev_dbg
	ldr	w0, [x19]
	ldr	w1, [x26]
	bl	_dma_ring_incr
	str	w0, [x19]
	mov	x0, x22
	bl	_desc_set_rx_owner
	ldp	w0, w1, [x19]
	ldr	w2, [x26]
	bl	_dma_ring_space
	cmp	w0, #1
	b.le	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x19]
	ldr	x8, [x19, #40]
	add	x22, x8, w23, sxtw #2
	ldr	x8, [x19, #24]
	ldr	x8, [x8, w23, sxtw #3]
	cbnz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_netdev_alloc_skb_ip_align
	mov	x24, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #32]
	ldr	w1, [x24]
	ldr	x8, [x19, #16]
	ldr	x9, [x27]
	sub	x2, x8, x9
	ldr	w3, [x28]
	bl	_dma_map_single
	mov	x25, x0
	ldr	w0, [x19, #32]
	mov	x1, x25
	bl	_dma_mapping_error
	cbnz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x8, w23
	ldp	x2, x9, [x19, #16]
	str	x24, [x9, x8, lsl #3]
	mov	x0, x22
	mov	x1, x25
	bl	_desc_set_buf_addr
	ldr	w23, [x19]
	b	LBB0_2
LBB0_7:
	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
LBB0_8:
	mov	x0, x24
	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
	b	_dev_kfree_skb_any
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ; @ETH_FCS_LEN
	.comm	_DMA_RX_RING_SZ,4,2             ; @DMA_RX_RING_SZ
	.comm	_NET_IP_ALIGN,8,3               ; @NET_IP_ALIGN
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx ring: head %d, tail %d\n"

	.no_dead_strip	_xgmac_rx_refill
.subsections_via_symbols
