	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_rings_init
_ag71xx_rings_init:                     ## @ag71xx_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, %r15
	movl	64(%rdi), %edi
	callq	_BIT
	movl	%eax, %r14d
	movl	32(%r15), %edi
	callq	_BIT
	movl	%eax, %ebx
	addl	%r14d, %ebx
	movl	64(%r15), %edi
	callq	_BIT
	movl	%eax, %r14d
	leal	(,%rbx,4), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_kzalloc
	movq	%rax, 56(%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	(%r15), %rdi
	movq	_AG71XX_DESC_SIZE@GOTPCREL(%rip), %r12
	imull	(%r12), %ebx
	leaq	40(%r15), %rdx
	movl	(%r13), %ecx
	movl	%ebx, %esi
	callq	_dma_alloc_coherent
	movq	%rax, 48(%r15)
	movq	56(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movslq	%r14d, %rcx
	leaq	(%rdi,%rcx,4), %rdx
	movq	%rdx, 24(%r15)
	movslq	(%r12), %rdx
	imulq	%rcx, %rdx
	addq	%rdx, %rax
	movq	%rax, 16(%r15)
	addq	40(%r15), %rdx
	movq	%rdx, 8(%r15)
	movq	%r15, %rdi
	callq	_ag71xx_ring_tx_init
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ag71xx_ring_rx_init            ## TAILCALL
LBB0_2:
	callq	_kfree
	movq	$0, 56(%r15)
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AG71XX_DESC_SIZE,4,2           ## @AG71XX_DESC_SIZE
	.no_dead_strip	_ag71xx_rings_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_rings_init
_ag71xx_rings_init:                     ; @ag71xx_rings_init
	.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
	ldr	w0, [x0, #64]
	bl	_BIT
	mov	x20, x0
	ldr	w0, [x19, #32]
	bl	_BIT
	add	w21, w0, w20
	ldr	w0, [x19, #64]
	bl	_BIT
	mov	x20, x0
	lsl	w0, w21, #2
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_kzalloc
	str	x0, [x19, #56]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x0, [x19]
Lloh2:
	adrp	x22, _AG71XX_DESC_SIZE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _AG71XX_DESC_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	mul	w1, w8, w21
	add	x2, x19, #40
	ldr	w3, [x23]
	bl	_dma_alloc_coherent
	str	x0, [x19, #48]
	ldr	x8, [x19, #56]
	cbz	x0, LBB0_3
; %bb.2:
	sxtw	x9, w20
	add	x11, x8, w20, sxtw #2
	ldrsw	x8, [x22]
	mul	x8, x8, x9
	add	x9, x0, x8
	ldr	x10, [x19, #40]
	add	x8, x10, x8
	stp	x9, x11, [x19, #16]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_ag71xx_ring_tx_init
	mov	x0, x19
	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
	b	_ag71xx_ring_rx_init
LBB0_3:
	mov	x0, x8
	bl	_kfree
	str	xzr, [x19, #56]
LBB0_4:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AG71XX_DESC_SIZE,4,2           ; @AG71XX_DESC_SIZE
	.no_dead_strip	_ag71xx_rings_init
.subsections_via_symbols
