	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ethoc_rx
_ethoc_rx:                              ## @ethoc_rx
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_netdev_priv
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	leaq	-48(%rbp), %r13
	movq	_RX_BD_EMPTY@GOTPCREL(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_RX_BD_STATS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-48(%rbp), %eax
	movq	_RX_BD_EMPTY@GOTPCREL(%rip), %r12
	orl	(%r12), %eax
	movl	%eax, -48(%rbp)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_ethoc_write_bd
	incl	4(%rbx)
	incl	%r14d
	cmpl	%r14d, -52(%rbp)                ## 4-byte Folded Reload
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rbx), %eax
	xorl	%edx, %edx
	divl	8(%rbx)
	movl	%edx, %r15d
	addl	(%rbx), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_ethoc_read_bd
	movl	(%r12), %eax
	testl	%eax, -48(%rbp)
	jne	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ethoc_update_rx_stats
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movswl	-46(%rbp), %r12d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_netdev_alloc_skb
	movq	%rax, %r13
	movq	%rax, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movq	%r13, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	$-4, %r12d
	movl	-44(%rbp), %edi
	callq	_phys_to_virt
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_skb_put
	movl	%eax, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_memcpy_fromio
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_eth_type_trans
	movl	%eax, (%r13)
	incl	20(%rbx)
	addl	%r12d, 12(%rbx)
	movq	%r13, %rdi
	callq	_netif_receive_skb
	leaq	-48(%rbp), %r13
	jmp	LBB0_10
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_11:
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_12
LBB0_6:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
LBB0_8:
	incl	16(%rbx)
LBB0_12:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_BD_EMPTY,4,2                ## @RX_BD_EMPTY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"low on memory - packet dropped\n"

	.comm	_RX_BD_STATS,4,2                ## @RX_BD_STATS
	.no_dead_strip	_ethoc_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ethoc_rx
_ethoc_rx:                              ; @ethoc_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x1
	mov	x21, x0
	bl	_netdev_priv
	cmp	w22, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, x0
	mov	w19, #0
Lloh0:
	adrp	x27, _RX_BD_EMPTY@GOTPAGE
Lloh1:
	ldr	x27, [x27, _RX_BD_EMPTY@GOTPAGEOFF]
Lloh2:
	adrp	x28, _RX_BD_STATS@GOTPAGE
Lloh3:
	ldr	x28, [x28, _RX_BD_STATS@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x28]
	ldr	w9, [sp, #8]
	bic	w8, w9, w8
	ldr	w9, [x27]
	orr	w8, w9, w8
	str	w8, [sp, #8]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x23
	bl	_ethoc_write_bd
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
	add	w19, w19, #1
	cmp	w22, w19
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w8, w9, [x20]
	ldr	w10, [x20, #8]
	udiv	w11, w9, w10
	msub	w9, w11, w10, w9
	add	w23, w9, w8
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x23
	bl	_ethoc_read_bd
	ldr	w8, [sp, #8]
	ldr	w9, [x27]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	bl	_ethoc_update_rx_stats
	cbnz	x0, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsh	w25, [sp, #10]
	mov	x0, x21
	mov	x1, x25
	bl	_netdev_alloc_skb
	mov	x24, x0
	mov	w1, #2
	bl	_skb_reserve
	mov	x0, x24
	bl	_likely
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w25, w25, #4
	ldr	w0, [sp, #12]
	bl	_phys_to_virt
	mov	x26, x0
	mov	x0, x24
	mov	x1, x25
	bl	_skb_put
	mov	x1, x26
	mov	x2, x25
	bl	_memcpy_fromio
	mov	x0, x24
	mov	x1, x21
	bl	_eth_type_trans
	str	w0, [x24]
	ldr	w8, [x20, #20]
	add	w8, w8, #1
	str	w8, [x20, #20]
	ldr	w8, [x20, #12]
	add	w8, w8, w25
	str	w8, [x20, #12]
	mov	x0, x24
	bl	_netif_receive_skb
	b	LBB0_2
LBB0_7:
	mov	w19, #0
	b	LBB0_12
LBB0_8:
	mov	x19, x22
	b	LBB0_12
LBB0_9:
	bl	_net_ratelimit
	cbz	x0, LBB0_11
; %bb.10:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
LBB0_11:
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x20, #16]
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_BD_EMPTY,4,2                ; @RX_BD_EMPTY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"low on memory - packet dropped\n"

	.comm	_RX_BD_STATS,4,2                ; @RX_BD_STATS
	.no_dead_strip	_ethoc_rx
.subsections_via_symbols
