	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ethoc_init_ring
_ethoc_init_ring:                       ## @ethoc_init_ring
	.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
	subq	$24, %rsp
	.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
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rdi)
	movq	$0, 40(%rdi)
	movq	_TX_BD_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rdi), %edx
	callq	_ethoc_write
	movq	%rbx, -56(%rbp)
	movq	_TX_BD_IRQ@GOTPCREL(%rip), %rax
	movq	_TX_BD_CRC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -48(%rbp)
	movq	16(%r15), %r12
	movl	(%r15), %esi
	testl	%esi, %esi
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r14
	movq	_ETHOC_BUFSIZ@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_ethoc_write_bd
	movq	(%r13), %rax
	addq	%rax, -56(%rbp)
	movq	8(%r15), %rcx
	movq	%r12, (%rcx,%rbx,8)
	addq	%rax, %r12
	incq	%rbx
	movslq	(%r15), %rsi
	cmpq	%rsi, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	decl	%esi
	cmpq	%rsi, %rbx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_TX_BD_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -48(%rbp)
	jmp	LBB0_4
LBB0_5:
	movq	_RX_BD_EMPTY@GOTPCREL(%rip), %rax
	movq	_RX_BD_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -48(%rbp)
	movl	4(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r14
	movq	_ETHOC_BUFSIZ@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	addl	%ebx, %esi
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r14, %rdx
	callq	_ethoc_write_bd
	movq	(%r13), %rax
	addq	%rax, -56(%rbp)
	movq	8(%r15), %rcx
	movslq	(%r15), %rsi
	movq	%rsi, %rdx
	addq	%rbx, %rdx
	movq	%r12, (%rcx,%rdx,8)
	addq	%rax, %r12
	movl	4(%r15), %eax
	incq	%rbx
	cmpl	%eax, %ebx
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	decl	%eax
	cmpl	%eax, %ebx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_RX_BD_WRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -48(%rbp)
	jmp	LBB0_9
LBB0_10:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_BD_NUM,4,2                  ## @TX_BD_NUM
	.comm	_TX_BD_IRQ,4,2                  ## @TX_BD_IRQ
	.comm	_TX_BD_CRC,4,2                  ## @TX_BD_CRC
	.comm	_TX_BD_WRAP,4,2                 ## @TX_BD_WRAP
	.comm	_ETHOC_BUFSIZ,8,3               ## @ETHOC_BUFSIZ
	.comm	_RX_BD_EMPTY,4,2                ## @RX_BD_EMPTY
	.comm	_RX_BD_IRQ,4,2                  ## @RX_BD_IRQ
	.comm	_RX_BD_WRAP,4,2                 ## @RX_BD_WRAP
	.no_dead_strip	_ethoc_init_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ethoc_init_ring
_ethoc_init_ring:                       ; @ethoc_init_ring
	.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	x20, x1
	mov	x19, x0
	stp	xzr, xzr, [x0, #24]
	str	xzr, [x0, #40]
Lloh0:
	adrp	x8, _TX_BD_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TX_BD_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x0]
	bl	_ethoc_write
Lloh3:
	adrp	x8, _TX_BD_IRQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TX_BD_IRQ@GOTPAGEOFF]
	str	x20, [sp]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _TX_BD_CRC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TX_BD_CRC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	ldr	x21, [x19, #16]
	ldr	w8, [x19]
Lloh9:
	adrp	x22, _ETHOC_BUFSIZ@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ETHOC_BUFSIZ@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, #0
Lloh11:
	adrp	x23, _TX_BD_WRAP@GOTPAGE
Lloh12:
	ldr	x23, [x23, _TX_BD_WRAP@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	bl	_ethoc_write_bd
	ldr	x8, [x22]
	ldr	x9, [sp]
	add	x9, x9, x8
	str	x9, [sp]
	ldr	x9, [x19, #8]
	str	x21, [x9, x20, lsl #3]
	add	x21, x21, x8
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w8, #1
	cmp	x20, x8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	ldr	w9, [sp, #8]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	b	LBB0_2
LBB0_5:
Lloh13:
	adrp	x9, _RX_BD_EMPTY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RX_BD_EMPTY@GOTPAGEOFF]
Lloh15:
	adrp	x10, _RX_BD_IRQ@GOTPAGE
Lloh16:
	ldr	x10, [x10, _RX_BD_IRQ@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [sp, #8]
	ldr	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x20, #0
Lloh19:
	adrp	x23, _RX_BD_WRAP@GOTPAGE
Lloh20:
	ldr	x23, [x23, _RX_BD_WRAP@GOTPAGEOFF]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w1, w20, w8
	mov	x2, sp
	mov	x0, x19
	bl	_ethoc_write_bd
	ldr	x9, [x22]
	ldr	x8, [sp]
	add	x8, x8, x9
	str	x8, [sp]
	ldr	x10, [x19, #8]
	ldrsw	x8, [x19]
	add	x11, x20, x8
	str	x21, [x10, x11, lsl #3]
	add	x21, x21, x9
	ldr	w9, [x19, #4]
	add	x20, x20, #1
	cmp	w20, w9
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sub	w9, w9, #1
	cmp	w20, w9
	b.ne	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w9, [x23]
	ldr	w10, [sp, #8]
	orr	w9, w10, w9
	str	w9, [sp, #8]
	b	LBB0_7
LBB0_10:
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh17
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_BD_NUM,4,2                  ; @TX_BD_NUM
	.comm	_TX_BD_IRQ,4,2                  ; @TX_BD_IRQ
	.comm	_TX_BD_CRC,4,2                  ; @TX_BD_CRC
	.comm	_TX_BD_WRAP,4,2                 ; @TX_BD_WRAP
	.comm	_ETHOC_BUFSIZ,8,3               ; @ETHOC_BUFSIZ
	.comm	_RX_BD_EMPTY,4,2                ; @RX_BD_EMPTY
	.comm	_RX_BD_IRQ,4,2                  ; @RX_BD_IRQ
	.comm	_RX_BD_WRAP,4,2                 ; @RX_BD_WRAP
	.no_dead_strip	_ethoc_init_ring
.subsections_via_symbols
