	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function am79c961_rx
_am79c961_rx:                           ## @am79c961_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	(%rsi), %ecx
	movslq	4(%rsi), %r14
	movq	8(%rsi), %rax
	movl	(%rax,%r14,4), %r12d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leal	(%rcx,%r14,8), %r13d
	addl	$2, %r13d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, %esi
	callq	_am_readword
	movl	%eax, %ebx
	movq	_RMD_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%ebx, %edx
	je	LBB0_1
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	(%rax,%r14,8), %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	16(%rax), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	12(%rax), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	addq	$8, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	_RMD_ERR@GOTPCREL(%rip), %rsi
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	(%rax)
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %eax
	movslq	4(%r15), %rcx
	leal	(%rax,%rcx,8), %r14d
	movq	8(%r15), %rdx
	movl	(%rdx,%rcx,4), %r12d
	leal	(%rax,%rcx,8), %r13d
	addl	$2, %r13d
	movl	%r13d, %esi
	callq	_am_readword
	movl	%eax, %ebx
	movq	_RMD_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%ebx, %edx
	movq	_RMD_ERR@GOTPCREL(%rip), %rsi
	jne	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movslq	4(%r15), %rax
	incq	%rax
	movq	_RX_BUFFERS@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	movl	$0, %ecx
	cmoval	%eax, %ecx
	movl	%ecx, 4(%r15)
	movq	_RMD_ENP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_RMD_STP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rsi), %ecx
	orl	%eax, %ecx
	andl	%ebx, %ecx
	cmpl	%eax, %ecx
	jne	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	$6, %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_am_readword
	movl	%eax, %r14d
	leal	2(%r14), %esi
	movq	%r15, %rdi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_skb_put
	movq	%r15, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_am_readbuffer
	movq	_RMD_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_am_writeword
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_eth_type_trans
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_netif_rx
	addl	%r14d, (%r15)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, %r12
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_am_writeword
	incl	24(%r14)
	testl	%ebx, (%r12)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_RMD_FRAM@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	20(%rax)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	_RMD_CRC@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	_RMD_STP@GOTPCREL(%rip), %rcx
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, (%rcx)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_11
	jmp	LBB0_12
LBB0_14:
	movq	_RMD_OWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_am_writeword
	incl	4(%r15)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_RMD_OWN,4,2                    ## @RMD_OWN
	.comm	_RX_BUFFERS,8,3                 ## @RX_BUFFERS
	.comm	_RMD_ERR,4,2                    ## @RMD_ERR
	.comm	_RMD_STP,4,2                    ## @RMD_STP
	.comm	_RMD_ENP,4,2                    ## @RMD_ENP
	.comm	_RMD_FRAM,4,2                   ## @RMD_FRAM
	.comm	_RMD_CRC,4,2                    ## @RMD_CRC
	.no_dead_strip	_am79c961_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function am79c961_rx
_am79c961_rx:                           ; @am79c961_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
	mov	x19, x0
	ldp	w8, w9, [x1]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	w24, w8, w9, lsl #3
	ldr	x8, [x1, #8]
	ldr	w22, [x8, x9, lsl #2]
	add	w21, w24, #2
	mov	x1, x21
	bl	_am_readword
Lloh0:
	adrp	x25, _RMD_OWN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _RMD_OWN@GOTPAGEOFF]
	ldr	w2, [x25]
	tst	w2, w0
	b.eq	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
	mov	x23, x0
	add	x9, x19, #16
	add	x8, x19, #12
	stp	x8, x9, [sp, #8]                ; 16-byte Folded Spill
	add	x8, x19, #8
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
Lloh2:
	adrp	x26, _RMD_ERR@GOTPAGE
Lloh3:
	ldr	x26, [x26, _RMD_ERR@GOTPAGEOFF]
Lloh4:
	adrp	x27, _RMD_STP@GOTPAGE
Lloh5:
	ldr	x27, [x27, _RMD_STP@GOTPAGEOFF]
Lloh6:
	adrp	x28, _RMD_ENP@GOTPAGE
Lloh7:
	ldr	x28, [x28, _RMD_ENP@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	w8, w9, [x20]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	w24, w8, w9, lsl #3
	ldr	x8, [x20, #8]
	ldr	w22, [x8, x9, lsl #2]
	add	w21, w24, #2
	mov	x0, x19
	mov	x1, x21
	bl	_am_readword
	mov	x23, x0
	ldr	w2, [x25]
	tst	w2, w0
	b.ne	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x20, #4]
	add	x8, x8, #1
Lloh8:
	adrp	x9, _RX_BUFFERS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RX_BUFFERS@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	csel	w8, w8, wzr, hi
	str	w8, [x20, #4]
	ldr	w8, [x26]
	ldr	w9, [x27]
	ldr	w10, [x28]
	orr	w9, w10, w9
	orr	w8, w9, w8
	and	w8, w8, w23
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w1, w24, #6
	mov	x0, x19
	bl	_am_readword
	mov	x23, x0
	add	w1, w0, #2
	mov	x0, x19
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x0
	mov	w1, #2
	bl	_skb_reserve
	mov	x0, x24
	mov	x1, x23
	bl	_skb_put
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	mov	x3, x23
	bl	_am_readbuffer
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x21
	bl	_am_writeword
	mov	x0, x24
	mov	x1, x19
	bl	_eth_type_trans
	str	w0, [x24]
	mov	x0, x24
	bl	_netif_rx
	ldr	w8, [x19]
	add	w8, w8, w23
	str	w8, [x19]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_am_writeword
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	ldr	w8, [x26]
	tst	w8, w23
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh11:
	adrp	x8, _RMD_FRAM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RMD_FRAM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x8, _RMD_CRC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RMD_CRC@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x27]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	tst	w9, w23
	b.ne	LBB0_3
	b	LBB0_4
LBB0_14:
	ldr	w2, [x25]
	mov	x0, x19
	mov	x1, x21
	bl	_am_writeword
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RMD_OWN,4,2                    ; @RMD_OWN
	.comm	_RX_BUFFERS,8,3                 ; @RX_BUFFERS
	.comm	_RMD_ERR,4,2                    ; @RMD_ERR
	.comm	_RMD_STP,4,2                    ; @RMD_STP
	.comm	_RMD_ENP,4,2                    ; @RMD_ENP
	.comm	_RMD_FRAM,4,2                   ; @RMD_FRAM
	.comm	_RMD_CRC,4,2                    ; @RMD_CRC
	.no_dead_strip	_am79c961_rx
.subsections_via_symbols
