	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvneta_ethtool_set_ringparam
_mvneta_ethtool_set_ringparam:          ## @mvneta_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.3:
	movq	_MVNETA_MAX_RXD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovlq	%rax, %rcx
	movq	%rcx, 8(%r15)
	movq	_u16@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MVNETA_MAX_SKB_DESCS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	addl	%edx, %edx
	movq	_MVNETA_MAX_TXD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_clamp_t
	movl	%eax, (%r15)
	movl	8(%rbx), %ecx
	cmpl	%ecx, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_netdev_warn
LBB0_5:
	movq	%r14, %rdi
	callq	_netif_running
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	callq	_mvneta_stop
	movq	%r14, %rdi
	callq	_mvneta_open
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MVNETA_MAX_RXD,8,3             ## @MVNETA_MAX_RXD
	.comm	_u16,4,2                        ## @u16
	.comm	_MVNETA_MAX_SKB_DESCS,4,2       ## @MVNETA_MAX_SKB_DESCS
	.comm	_MVNETA_MAX_TXD,4,2             ## @MVNETA_MAX_TXD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TX queue size set to %u (requested %u)\n"

L_.str.1:                               ## @.str.1
	.asciz	"error on opening device after ring param change\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mvneta_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 mvneta_ethtool_set_ringparam
_mvneta_ethtool_set_ringparam:          ; @mvneta_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	x20, x1
	mov	x19, x0
	bl	_netdev_priv
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	w1, [x20, #8]
	cbz	w1, LBB0_7
; %bb.2:
	mov	x21, x0
Lloh0:
	adrp	x9, _MVNETA_MAX_RXD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MVNETA_MAX_RXD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x8, x8, x9, lt
	str	x8, [x0, #8]
Lloh3:
	adrp	x8, _u16@GOTPAGE
Lloh4:
	ldr	x8, [x8, _u16@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MVNETA_MAX_SKB_DESCS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MVNETA_MAX_SKB_DESCS@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	ldr	w8, [x9]
	lsl	w2, w8, #1
Lloh9:
	adrp	x8, _MVNETA_MAX_TXD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MVNETA_MAX_TXD@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	bl	_clamp_t
	str	w0, [x21]
	ldr	w3, [x20, #8]
	cmp	w0, w3
	b.eq	LBB0_4
; %bb.3:
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_warn
LBB0_4:
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_9
; %bb.5:
	mov	x0, x19
	bl	_mvneta_stop
	mov	x0, x19
	bl	_mvneta_open
	cbz	x0, LBB0_9
; %bb.6:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MVNETA_MAX_RXD,8,3             ; @MVNETA_MAX_RXD
	.comm	_u16,4,2                        ; @u16
	.comm	_MVNETA_MAX_SKB_DESCS,4,2       ; @MVNETA_MAX_SKB_DESCS
	.comm	_MVNETA_MAX_TXD,4,2             ; @MVNETA_MAX_TXD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TX queue size set to %u (requested %u)\n"

l_.str.1:                               ; @.str.1
	.asciz	"error on opening device after ring param change\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mvneta_ethtool_set_ringparam
.subsections_via_symbols
