	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ethoc_set_ringparam
_ethoc_set_ringparam:                   ## @ethoc_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, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.2:
	addq	%rax, %rcx
	cmpq	%rcx, (%r14)
	jl	LBB0_3
## %bb.4:
	cmpq	$0, 16(%rbx)
	jne	LBB0_3
## %bb.5:
	cmpq	$0, 8(%rbx)
	je	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_netif_tx_disable
	movq	%r14, %rdi
	callq	_ethoc_disable_rx_and_tx
	movq	_INT_MASK_TX@GOTPCREL(%rip), %rax
	movq	_INT_MASK_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ethoc_disable_irq
	movl	4(%r15), %edi
	callq	_synchronize_irq
LBB0_8:
	movslq	(%rbx), %rdi
	callq	_rounddown_pow_of_two
	movl	%eax, 16(%r14)
	movslq	4(%rbx), %rax
	movq	%rax, 8(%r14)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_ethoc_init_ring
	movq	%r15, %rdi
	callq	_netif_running
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_INT_MASK_TX@GOTPCREL(%rip), %rax
	movq	_INT_MASK_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ethoc_enable_irq
	movq	%r14, %rdi
	callq	_ethoc_enable_rx_and_tx
	movq	%r15, %rdi
	callq	_netif_wake_queue
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INT_MASK_TX,4,2                ## @INT_MASK_TX
	.comm	_INT_MASK_RX,4,2                ## @INT_MASK_RX
	.no_dead_strip	_ethoc_set_ringparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ethoc_set_ringparam
_ethoc_set_ringparam:                   ; @ethoc_set_ringparam
	.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	x21, x1
	mov	x19, x0
	bl	_netdev_priv
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	ldr	w9, [x21, #4]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	x10, [x0]
	add	x8, x9, x8
	cmp	x10, x8
	b.lt	LBB0_5
; %bb.3:
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_7
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
	mov	x0, x19
	bl	_netif_running
Lloh3:
	adrp	x22, _INT_MASK_TX@GOTPAGE
Lloh4:
	ldr	x22, [x22, _INT_MASK_TX@GOTPAGEOFF]
Lloh5:
	adrp	x23, _INT_MASK_RX@GOTPAGE
Lloh6:
	ldr	x23, [x23, _INT_MASK_RX@GOTPAGEOFF]
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_netif_tx_disable
	mov	x0, x20
	bl	_ethoc_disable_rx_and_tx
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_ethoc_disable_irq
	ldr	w0, [x19, #4]
	bl	_synchronize_irq
LBB0_9:
	ldrsw	x0, [x21]
	bl	_rounddown_pow_of_two
	str	w0, [x20, #16]
	ldrsw	x8, [x21, #4]
	str	x8, [x20, #8]
	ldr	w1, [x19]
	mov	x0, x20
	bl	_ethoc_init_ring
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_6
; %bb.10:
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_ethoc_enable_irq
	mov	x0, x20
	bl	_ethoc_enable_rx_and_tx
	mov	x0, x19
	bl	_netif_wake_queue
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INT_MASK_TX,4,2                ; @INT_MASK_TX
	.comm	_INT_MASK_RX,4,2                ; @INT_MASK_RX
	.no_dead_strip	_ethoc_set_ringparam
.subsections_via_symbols
