	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ariadne_rx
_ariadne_rx:                            ## @ariadne_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
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r12
	movl	(%rax), %eax
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r15
	cltd
	idivl	(%r15)
                                        ## kill: def $edx killed $edx def $rdx
	movq	8(%r12), %rax
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movslq	%edx, %rbx
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edi
	callq	_lowb
	movq	_RF_OWN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_1
LBB0_23:
	movl	(%r12), %eax
	cltd
	idivl	(%r15)
	movl	%edx, (%r12)
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	orl	$65280, %ecx                    ## imm = 0xFF00
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	andl	%ecx, (%rax)
LBB0_22:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_RF_OWN@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movq	8(%r12), %rcx
	movq	(%rcx,%rbx,8), %rdx
	orl	%eax, (%rdx)
	movl	(%r12), %eax
	incl	%eax
	movl	%eax, (%r12)
	cltd
	idivl	(%r15)
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movslq	%edx, %rbx
	movq	(%rcx,%rbx,8), %rax
	movl	(%rax), %edi
	callq	_lowb
	testl	%eax, (%r13)
	jne	LBB0_23
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %edi
	callq	_lowb
	movq	_RF_ENP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_RF_STP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%edx, %ecx
	cmpl	%ecx, %eax
	jne	LBB0_2
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	4(%rax), %edi
	callq	_swapw
	movq	%r12, %r13
	movq	%rbx, %r12
	movl	%eax, %ebx
	leal	2(%rbx), %eax
	movswl	%ax, %esi
	movq	%r14, %rdi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_14
## %bb.21:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r15
	movq	%rax, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movswl	%bx, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_skb_put
	movq	16(%r13), %rax
	movq	(%rax,%r12,8), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_skb_copy_to_linear_data
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_eth_type_trans
	movl	%eax, 16(%r15)
	movq	8(%r15), %r8
	movl	24(%r8), %edx
	leaq	6(%r8), %rcx
	movl	(%r15), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r8, %r9
	callq	_netdev_dbg
	movq	%r15, %rdi
	callq	_netif_rx
	incl	4(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addw	%ax, (%r14)
	movq	%r12, %rbx
	movq	%r13, %r12
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r15
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %edx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	28(%r14)
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_RF_FRAM@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	24(%r14)
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_RF_OFLO@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	20(%r14)
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_RF_CRC@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	16(%r14)
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_RF_BUFF@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	incl	12(%r14)
	jmp	LBB0_12
LBB0_14:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	_RX_RING_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	xorl	%r14d, %r14d
	movq	%r13, %r12
	testl	%ecx, %ecx
	jle	LBB0_19
## %bb.15:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	leal	(%rbx,%r14), %eax
	cltd
	idivl	%ecx
	movslq	%edx, %rax
	movq	(%rsi,%rax,8), %rax
	movl	(%rax), %edi
	callq	_lowb
	movq	_RF_OWN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	incl	%r14d
	movl	(%r15), %ecx
	cmpl	%ecx, %r14d
	jl	LBB0_16
	jmp	LBB0_19
LBB0_17:
	movl	(%r15), %ecx
LBB0_19:
	addl	$-2, %ecx
	cmpl	%ecx, %r14d
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jle	LBB0_23
## %bb.20:
	incl	8(%r13)
	movq	_RF_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r12), %rcx
	movq	(%rcx,%rdx,8), %rcx
	orl	%eax, (%rcx)
	incl	(%r12)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_RING_SIZE,4,2               ## @RX_RING_SIZE
	.comm	_RF_OWN,4,2                     ## @RF_OWN
	.comm	_RF_STP,4,2                     ## @RF_STP
	.comm	_RF_ENP,4,2                     ## @RF_ENP
	.comm	_RF_FRAM,4,2                    ## @RF_FRAM
	.comm	_RF_OFLO,4,2                    ## @RF_OFLO
	.comm	_RF_CRC,4,2                     ## @RF_CRC
	.comm	_RF_BUFF,4,2                    ## @RF_BUFF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RX pkt type 0x%04x from %pM to %pM data %p len %u\n"

	.no_dead_strip	_ariadne_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ariadne_rx
_ariadne_rx:                            ; @ariadne_rx
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x24, _RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RX_RING_SIZE@GOTPAGEOFF]
	ldr	w9, [x24]
	sdiv	w10, w8, w9
	msub	w21, w10, w9, w8
	ldr	x8, [x0, #8]
	ldr	x8, [x8, w21, sxtw #3]
	ldr	w0, [x8]
	bl	_lowb
Lloh2:
	adrp	x25, _RF_OWN@GOTPAGE
Lloh3:
	ldr	x25, [x25, _RF_OWN@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_2
LBB0_1:
	ldr	w8, [x19]
	ldr	w9, [x24]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh4:
	adrp	x27, _RF_STP@GOTPAGE
Lloh5:
	ldr	x27, [x27, _RF_STP@GOTPAGEOFF]
Lloh6:
	adrp	x28, _RF_ENP@GOTPAGE
Lloh7:
	ldr	x28, [x28, _RF_ENP@GOTPAGEOFF]
	sxtw	x26, w21
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	orr	w8, w8, #0xff00
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x26, lsl #3]
	ldr	w10, [x9]
	and	w8, w10, w8
	str	w8, [x9]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	ldr	x9, [x19, #8]
	ldr	x10, [x9, x26, lsl #3]
	ldr	w11, [x10]
	orr	w8, w11, w8
	str	w8, [x10]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w10, [x24]
	sdiv	w11, w8, w10
	msub	w21, w11, w10, w8
	sxtw	x26, w21
	ldr	x8, [x9, w21, sxtw #3]
	ldr	w0, [x8]
	bl	_lowb
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x26, lsl #3]
	ldr	w0, [x8]
	bl	_lowb
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w8, w9, w8
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x26, lsl #3]
	ldr	w0, [x8, #4]
	bl	_swapw
	mov	x22, x0
	add	w8, w0, #2
	sxth	w1, w8
	mov	x0, x20
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	mov	w1, #2
	bl	_skb_reserve
	mov	x0, x23
	mov	x1, x22
	bl	_skb_put
	ldr	x8, [x19, #16]
	ldr	x1, [x8, x26, lsl #3]
	mov	x0, x23
	mov	x2, x22
	bl	_skb_copy_to_linear_data
	mov	x0, x23
	mov	x1, x20
	bl	_eth_type_trans
	str	w0, [x23, #16]
	ldr	x4, [x23, #8]
	ldr	w2, [x4, #24]
	add	x3, x4, #6
	ldr	w6, [x23]
	mov	x0, x20
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x5, x4
	bl	_netdev_dbg
	mov	x0, x23
	bl	_netif_rx
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
	ldrh	w8, [x20]
	add	w8, w8, w22
	strh	w8, [x20]
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	tst	w9, w0
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20, #28]
	add	w9, w9, #1
	str	w9, [x20, #28]
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh10:
	adrp	x9, _RF_FRAM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _RF_FRAM@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20, #24]
	add	w9, w9, #1
	str	w9, [x20, #24]
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh13:
	adrp	x9, _RF_OFLO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RF_OFLO@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20, #20]
	add	w9, w9, #1
	str	w9, [x20, #20]
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh16:
	adrp	x9, _RF_CRC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _RF_CRC@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20, #16]
	add	w9, w9, #1
	str	w9, [x20, #16]
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh19:
	adrp	x9, _RF_BUFF@GOTPAGE
Lloh20:
	ldr	x9, [x9, _RF_BUFF@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20, #12]
	add	w9, w9, #1
	str	w9, [x20, #12]
	b	LBB0_3
LBB0_18:
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.19:
	mov	w22, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	add	w10, w21, w22
	sdiv	w11, w10, w8
	msub	w8, w11, w8, w10
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w0, [x8]
	bl	_lowb
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	w22, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	b.lt	LBB0_20
	b	LBB0_24
LBB0_22:
	mov	w22, #0
	b	LBB0_24
LBB0_23:
	ldr	w8, [x24]
LBB0_24:
	sub	w8, w8, #2
	cmp	w22, w8
	b.le	LBB0_1
; %bb.25:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	ldr	w8, [x25]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x26, lsl #3]
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_RING_SIZE,4,2               ; @RX_RING_SIZE
	.comm	_RF_OWN,4,2                     ; @RF_OWN
	.comm	_RF_STP,4,2                     ; @RF_STP
	.comm	_RF_ENP,4,2                     ; @RF_ENP
	.comm	_RF_FRAM,4,2                    ; @RF_FRAM
	.comm	_RF_OFLO,4,2                    ; @RF_OFLO
	.comm	_RF_CRC,4,2                     ; @RF_CRC
	.comm	_RF_BUFF,4,2                    ; @RF_BUFF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RX pkt type 0x%04x from %pM to %pM data %p len %u\n"

	.no_dead_strip	_ariadne_rx
.subsections_via_symbols
