	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_set_ringparam
_xgbe_set_ringparam:                    ## @xgbe_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	%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	%rsi, %rbx
	movq	%rdi, %r15
	callq	_netdev_priv
	cmpq	$0, 16(%rbx)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 8(%rbx)
	je	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, %r14
	movl	(%rbx), %edi
	movq	_XGBE_RX_DESC_CNT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_XGBE_RX_DESC_CNT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%edx, %edi
	jb	LBB0_5
## %bb.4:
	cmpl	%ecx, %edi
	ja	LBB0_5
## %bb.8:
	movl	4(%rbx), %eax
	movq	_XGBE_TX_DESC_CNT_MIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_XGBE_TX_DESC_CNT_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%edx, %eax
	jb	LBB0_10
## %bb.9:
	cmpl	%ecx, %eax
	ja	LBB0_10
## %bb.11:
	callq	___rounddown_pow_of_two
	movl	%eax, %r12d
	cmpl	(%rbx), %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_netdev_notice
LBB0_13:
	movl	4(%rbx), %edi
	callq	___rounddown_pow_of_two
	movl	%eax, %r13d
	cmpl	4(%rbx), %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_netdev_notice
LBB0_15:
	cmpl	(%r14), %r12d
	jne	LBB0_17
## %bb.16:
	xorl	%ebx, %ebx
	cmpl	4(%r14), %r13d
	je	LBB0_18
LBB0_17:
	movl	%r12d, (%r14)
	movl	%r13d, 4(%r14)
	movq	%r14, %rdi
	callq	_xgbe_restart_dev
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
LBB0_6:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported ring parameter\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XGBE_RX_DESC_CNT_MIN,4,2       ## @XGBE_RX_DESC_CNT_MIN
	.comm	_XGBE_RX_DESC_CNT_MAX,4,2       ## @XGBE_RX_DESC_CNT_MAX
L_.str.1:                               ## @.str.1
	.asciz	"rx ring parameter must be between %u and %u\n"

	.comm	_XGBE_TX_DESC_CNT_MIN,4,2       ## @XGBE_TX_DESC_CNT_MIN
	.comm	_XGBE_TX_DESC_CNT_MAX,4,2       ## @XGBE_TX_DESC_CNT_MAX
L_.str.2:                               ## @.str.2
	.asciz	"tx ring parameter must be between %u and %u\n"

L_.str.3:                               ## @.str.3
	.asciz	"rx ring parameter rounded to power of two: %u\n"

L_.str.4:                               ## @.str.4
	.asciz	"tx ring parameter rounded to power of two: %u\n"

	.no_dead_strip	_xgbe_set_ringparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_set_ringparam
_xgbe_set_ringparam:                    ; @xgbe_set_ringparam
	.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, x1
	mov	x19, x0
	bl	_netdev_priv
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
LBB0_2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	bl	_netdev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
LBB0_5:
	mov	x20, x0
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _XGBE_RX_DESC_CNT_MIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XGBE_RX_DESC_CNT_MIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _XGBE_RX_DESC_CNT_MAX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _XGBE_RX_DESC_CNT_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #2, hs
	b.ls	LBB0_7
; %bb.6:
	stp	x8, x9, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_7:
	ldr	w10, [x21, #4]
Lloh13:
	adrp	x8, _XGBE_TX_DESC_CNT_MIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _XGBE_TX_DESC_CNT_MIN@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _XGBE_TX_DESC_CNT_MAX@GOTPAGE
Lloh17:
	ldr	x9, [x9, _XGBE_TX_DESC_CNT_MAX@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w10, w8
	ccmp	w10, w9, #2, hs
	b.ls	LBB0_9
; %bb.8:
	stp	x8, x9, [sp]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_9:
	bl	___rounddown_pow_of_two
	mov	x22, x0
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.10:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_netdev_notice
LBB0_11:
	ldr	w0, [x21, #4]
	bl	___rounddown_pow_of_two
	mov	x23, x0
	ldr	w8, [x21, #4]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.12:
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_netdev_notice
LBB0_13:
	ldr	w8, [x20]
	cmp	w22, w8
	b.ne	LBB0_15
; %bb.14:
	ldr	w8, [x20, #4]
	cmp	w23, w8
	b.eq	LBB0_16
LBB0_15:
	stp	w22, w23, [x20]
	mov	x0, x20
	bl	_xgbe_restart_dev
LBB0_16:
	mov	w0, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported ring parameter\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XGBE_RX_DESC_CNT_MIN,4,2       ; @XGBE_RX_DESC_CNT_MIN
	.comm	_XGBE_RX_DESC_CNT_MAX,4,2       ; @XGBE_RX_DESC_CNT_MAX
l_.str.1:                               ; @.str.1
	.asciz	"rx ring parameter must be between %u and %u\n"

	.comm	_XGBE_TX_DESC_CNT_MIN,4,2       ; @XGBE_TX_DESC_CNT_MIN
	.comm	_XGBE_TX_DESC_CNT_MAX,4,2       ; @XGBE_TX_DESC_CNT_MAX
l_.str.2:                               ; @.str.2
	.asciz	"tx ring parameter must be between %u and %u\n"

l_.str.3:                               ; @.str.3
	.asciz	"rx ring parameter rounded to power of two: %u\n"

l_.str.4:                               ; @.str.4
	.asciz	"tx ring parameter rounded to power of two: %u\n"

	.no_dead_strip	_xgbe_set_ringparam
.subsections_via_symbols
