	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_ethtool_set_ringparam
_ag71xx_ethtool_set_ringparam:          ## @ag71xx_ethtool_set_ringparam
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_netdev_priv
	cmpq	$0, (%rbx)
	jne	LBB0_4
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rax, %r14
	movl	16(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	20(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.5:
	movq	_AG71XX_TX_RING_SIZE_MAX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	cmpl	%ebx, %ecx
	cmovbl	%ecx, %ebx
	movq	_AG71XX_RX_RING_SIZE_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	cmpl	%r15d, %eax
	cmovbl	%eax, %r15d
	movq	%r12, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_11
LBB0_7:
	cmpq	$0, 16(%r14)
	movl	$1, %edi
	je	LBB0_9
## %bb.8:
	movq	_AG71XX_TX_RING_DS_PER_PKT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_9:
	imull	%ebx, %edi
	callq	_ag71xx_ring_size_order
	movq	%rax, 8(%r14)
	movl	%r15d, %edi
	callq	_ag71xx_ring_size_order
	movq	%rax, (%r14)
	movq	%r12, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:
	movq	(%r12), %rax
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rax)                        ## TAILCALL
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AG71XX_TX_RING_SIZE_MAX,4,2    ## @AG71XX_TX_RING_SIZE_MAX
	.comm	_AG71XX_RX_RING_SIZE_MAX,4,2    ## @AG71XX_RX_RING_SIZE_MAX
	.comm	_AG71XX_TX_RING_DS_PER_PKT,4,2  ## @AG71XX_TX_RING_DS_PER_PKT
	.no_dead_strip	_ag71xx_ethtool_set_ringparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_ethtool_set_ringparam
_ag71xx_ethtool_set_ringparam:          ; @ag71xx_ethtool_set_ringparam
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_netdev_priv
	ldr	x8, [x21]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_2
; %bb.5:
	ldr	w9, [x21, #20]
	cbz	w9, LBB0_2
; %bb.6:
	mov	x20, x0
Lloh3:
	adrp	x10, _AG71XX_TX_RING_SIZE_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AG71XX_TX_RING_SIZE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	csel	w22, w9, w10, lo
Lloh6:
	adrp	x9, _AG71XX_RX_RING_SIZE_MAX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AG71XX_RX_RING_SIZE_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w21, w8, w9, lo
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_3
LBB0_8:
	ldr	x8, [x20, #16]
Lloh9:
	adrp	x9, _AG71XX_TX_RING_DS_PER_PKT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AG71XX_TX_RING_DS_PER_PKT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	x8, #0
	csinc	w8, w9, wzr, ne
	mul	w0, w8, w22
	bl	_ag71xx_ring_size_order
	str	x0, [x20, #8]
	mov	x0, x21
	bl	_ag71xx_ring_size_order
	str	x0, [x20]
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_3
; %bb.9:
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AG71XX_TX_RING_SIZE_MAX,4,2    ; @AG71XX_TX_RING_SIZE_MAX
	.comm	_AG71XX_RX_RING_SIZE_MAX,4,2    ; @AG71XX_RX_RING_SIZE_MAX
	.comm	_AG71XX_TX_RING_DS_PER_PKT,4,2  ; @AG71XX_TX_RING_DS_PER_PKT
	.no_dead_strip	_ag71xx_ethtool_set_ringparam
.subsections_via_symbols
