	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function xgmac_dma_desc_rings_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_xgmac_dma_desc_rings_init:             ## @xgmac_dma_desc_rings_init
	.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
	callq	_netdev_priv
	movq	_ETH_HLEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rbx), %rdi
	movq	_ETH_FCS_LEN@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rdi
	movq	%rax, %r12
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movl	$8, %esi
	callq	_ALIGN
	movl	%eax, %r14d
	movl	104(%r12), %edi
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_netdev_dbg
	movq	_DMA_RX_RING_SZ@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	32(%r12), %edi
	movl	(%rbx), %esi
	shll	$2, %esi
	leaq	16(%r12), %rdx
	movl	(%r13), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	_DMA_TX_RING_SZ@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%r13), %edx
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 40(%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	32(%r12), %edi
	movl	(%r15), %esi
	shll	$2, %esi
	movq	%r12, %rdx
	addq	$56, %rdx
	movl	(%r13), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 64(%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	104(%r12), %edi
	movq	24(%r12), %rdx
	movl	16(%r12), %r8d
	movl	56(%r12), %r9d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %r13
	xorl	%r15d, %r15d
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_netdev_dbg
	xorps	%xmm0, %xmm0
	movups	%xmm0, 88(%r12)
	movl	%r14d, (%r12)
	movq	24(%r12), %rdi
	movl	(%rbx), %esi
	movl	%r14d, %edx
	callq	_desc_init_rx_desc
	movq	%r12, %rdi
	callq	_xgmac_rx_refill
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%r12)
	movq	64(%r12), %rdi
	movl	(%r13), %esi
	callq	_desc_init_tx_desc
	movq	56(%r12), %rdi
	movq	_XGMAC_DMA_TX_BASE_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	48(%r12), %rsi
	callq	_writel
	movq	16(%r12), %rdi
	movq	_XGMAC_DMA_RX_BASE_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	48(%r12), %rsi
	callq	_writel
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	40(%r12), %rdi
	callq	_kfree
LBB0_7:
	movl	32(%r12), %edi
	movl	(%rbx), %esi
	shll	$2, %esi
	movq	16(%r12), %rcx
	movq	24(%r12), %rdx
	callq	_dma_free_coherent
LBB0_8:
	movq	8(%r12), %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_9:
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_HLEN,8,3                   ## @ETH_HLEN
	.comm	_ETH_FCS_LEN,8,3                ## @ETH_FCS_LEN
	.comm	_NET_IP_ALIGN,8,3               ## @NET_IP_ALIGN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtu [%d] bfsize [%d]\n"

	.comm	_DMA_RX_RING_SZ,4,2             ## @DMA_RX_RING_SZ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_TX_RING_SZ,4,2             ## @DMA_TX_RING_SZ
L_.str.1:                               ## @.str.1
	.asciz	"DMA desc rings: virt addr (Rx %p, Tx %p)\n\tDMA phy addr (Rx 0x%08x, Tx 0x%08x)\n"

	.comm	_XGMAC_DMA_TX_BASE_ADDR,8,3     ## @XGMAC_DMA_TX_BASE_ADDR
	.comm	_XGMAC_DMA_RX_BASE_ADDR,8,3     ## @XGMAC_DMA_RX_BASE_ADDR
	.no_dead_strip	_xgmac_dma_desc_rings_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgmac_dma_desc_rings_init
_xgmac_dma_desc_rings_init:             ; @xgmac_dma_desc_rings_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _ETH_HLEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ETH_HLEN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _ETH_FCS_LEN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ETH_FCS_LEN@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	add	x8, x9, x8
	add	x8, x8, x10
Lloh6:
	adrp	x9, _NET_IP_ALIGN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x0, x8, x9
	mov	w1, #8
	bl	_ALIGN
	mov	x20, x0
	ldr	w0, [x19, #104]
	ldr	x2, [x21]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_netdev_dbg
Lloh11:
	adrp	x21, _DMA_RX_RING_SZ@GOTPAGE
Lloh12:
	ldr	x21, [x21, _DMA_RX_RING_SZ@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh13:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.1:
	ldr	w0, [x19, #32]
	ldr	w8, [x21]
	lsl	w1, w8, #2
	add	x2, x19, #16
	ldr	w3, [x23]
	bl	_dma_alloc_coherent
	str	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.2:
Lloh15:
	adrp	x22, _DMA_TX_RING_SZ@GOTPAGE
Lloh16:
	ldr	x22, [x22, _DMA_TX_RING_SZ@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w2, [x23]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w0, [x19, #32]
	ldr	w8, [x22]
	lsl	w1, w8, #2
	add	x2, x19, #56
	ldr	w3, [x23]
	bl	_dma_alloc_coherent
	str	x0, [x19, #64]
	cbz	x0, LBB0_5
; %bb.4:
	mov	x3, x0
	ldr	w0, [x19, #104]
	ldp	x8, x2, [x19, #16]
	ldr	x9, [x19, #56]
	stp	x8, x9, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_netdev_dbg
	stp	xzr, xzr, [x19, #88]
	str	w20, [x19]
	ldr	x0, [x19, #24]
	ldr	w1, [x21]
	mov	x2, x20
	bl	_desc_init_rx_desc
	mov	x0, x19
	bl	_xgmac_rx_refill
	stp	xzr, xzr, [x19, #72]
	ldr	x0, [x19, #64]
	ldr	w1, [x22]
	bl	_desc_init_tx_desc
	ldp	x8, x0, [x19, #48]
Lloh19:
	adrp	x9, _XGMAC_DMA_TX_BASE_ADDR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _XGMAC_DMA_TX_BASE_ADDR@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x0, [x19, #16]
	ldr	x8, [x19, #48]
Lloh22:
	adrp	x9, _XGMAC_DMA_RX_BASE_ADDR@GOTPAGE
Lloh23:
	ldr	x9, [x9, _XGMAC_DMA_RX_BASE_ADDR@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	ldr	x0, [x19, #40]
	bl	_kfree
LBB0_6:
	ldr	w0, [x19, #32]
	ldr	w8, [x21]
	lsl	w1, w8, #2
	ldp	x3, x2, [x19, #16]
	bl	_dma_free_coherent
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_8:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_HLEN,8,3                   ; @ETH_HLEN
	.comm	_ETH_FCS_LEN,8,3                ; @ETH_FCS_LEN
	.comm	_NET_IP_ALIGN,8,3               ; @NET_IP_ALIGN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtu [%d] bfsize [%d]\n"

	.comm	_DMA_RX_RING_SZ,4,2             ; @DMA_RX_RING_SZ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_TX_RING_SZ,4,2             ; @DMA_TX_RING_SZ
l_.str.1:                               ; @.str.1
	.asciz	"DMA desc rings: virt addr (Rx %p, Tx %p)\n\tDMA phy addr (Rx 0x%08x, Tx 0x%08x)\n"

	.comm	_XGMAC_DMA_TX_BASE_ADDR,8,3     ; @XGMAC_DMA_TX_BASE_ADDR
	.comm	_XGMAC_DMA_RX_BASE_ADDR,8,3     ; @XGMAC_DMA_RX_BASE_ADDR
	.no_dead_strip	_xgmac_dma_desc_rings_init
.subsections_via_symbols
