	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function z8530_rx_done
_z8530_rx_done:                         ## @z8530_rx_done
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %r13d
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %r12
	movl	76(%rbx), %edi
	callq	_disable_dma
	movl	76(%rbx), %edi
	callq	_clear_dma_ff
	movl	$0, (%rbx)
	movl	24(%rbx), %r15d
	movl	76(%rbx), %edi
	callq	_get_dma_residue
	subl	%eax, %r15d
	movl	$2, %r14d
	cmovnsl	%r15d, %r14d
	movl	$0, 4(%rbx)
	testl	%r13d, %r13d
	je	LBB0_5
## %bb.2:
	xorb	$1, 16(%rbx)
	movl	76(%rbx), %edi
	movq	_DMA_MODE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	$16, %esi
	callq	_set_dma_mode
	movl	76(%rbx), %r13d
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_virt_to_bus
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_set_dma_addr
	movl	24(%rbx), %esi
	movl	76(%rbx), %edi
	callq	_set_dma_count
	movl	$1, (%rbx)
	movl	76(%rbx), %edi
	callq	_enable_dma
	movq	_R0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RES_Rx_CRC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_write_zsreg
	jmp	LBB0_6
LBB0_3:
	movq	64(%rbx), %r12
	movl	24(%rbx), %edi
	movl	28(%rbx), %r14d
	movq	56(%rbx), %rax
	movq	%rax, 64(%rbx)
	movl	$0, 28(%rbx)
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movl	%edi, %eax
	jmp	LBB0_12
LBB0_5:
	movq	40(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_warn
LBB0_6:
	movq	%r12, %rdi
	callq	_release_dma_lock
	movl	%r14d, %edi
	callq	_dev_alloc_skb
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_skb_put
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_skb_copy_to_linear_data
	movq	40(%rbx), %rax
	incl	8(%rax)
	addl	%r14d, (%rax)
	jmp	LBB0_9
LBB0_8:
	movq	40(%rbx), %rdi
	incl	4(%rdi)
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_warn
LBB0_9:
	movl	$1, 4(%rbx)
	testq	%r12, %r12
	je	LBB0_10
LBB0_16:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_skb_trim
	movq	48(%rbx), %rax
	movq	%rbx, %rdi
	movq	%r12, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	movl	%eax, 32(%rbx)
	callq	_dev_alloc_skb
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	24(%rbx), %esi
	movq	%rax, %rdi
	callq	_skb_put
	jmp	LBB0_15
LBB0_14:
	movq	40(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_warn
LBB0_15:
	movq	40(%rbx), %rax
	incl	8(%rax)
	addl	%r14d, (%rax)
	testq	%r12, %r12
	jne	LBB0_16
LBB0_10:
	movq	40(%rbx), %rdi
	incl	4(%rdi)
	leaq	L_.str.3(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netdev_err                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MODE_READ,4,2              ## @DMA_MODE_READ
	.comm	_R0,4,2                         ## @R0
	.comm	_RES_Rx_CRC,4,2                 ## @RES_Rx_CRC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA flip overrun!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Memory squeeze\n"

	.comm	_RT_LOCK,4,2                    ## @RT_LOCK
	.comm	_RT_UNLOCK,4,2                  ## @RT_UNLOCK
L_.str.2:                               ## @.str.2
	.asciz	"memory squeeze\n"

L_.str.3:                               ## @.str.3
	.asciz	"Lost a frame\n"

	.no_dead_strip	_z8530_rx_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function z8530_rx_done
_z8530_rx_done:                         ; @z8530_rx_done
	.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	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w23, [x19, #4]
	ldp	x8, x9, [x19, #8]
	ldr	x21, [x8, x9, lsl #3]
	bl	_claim_dma_lock
	mov	x22, x0
	ldr	w0, [x19, #76]
	bl	_disable_dma
	ldr	w0, [x19, #76]
	bl	_clear_dma_ff
	str	wzr, [x19]
	ldr	w20, [x19, #24]
	ldr	w0, [x19, #76]
	bl	_get_dma_residue
	sub	w8, w20, w0
	mov	w9, #2
	cmp	w8, #0
	csel	w20, w9, w8, lt
	str	wzr, [x19, #4]
	cbz	w23, LBB0_7
; %bb.2:
	ldr	x8, [x19, #16]
	eor	x8, x8, #0x1
	str	x8, [x19, #16]
	ldr	w0, [x19, #76]
Lloh0:
	adrp	x8, _DMA_MODE_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_MODE_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w1, w8, #0x10
	bl	_set_dma_mode
	ldr	w23, [x19, #76]
	ldp	x8, x9, [x19, #8]
	ldr	x0, [x8, x9, lsl #3]
	bl	_virt_to_bus
	mov	x1, x0
	mov	x0, x23
	bl	_set_dma_addr
	ldr	w0, [x19, #76]
	ldr	w1, [x19, #24]
	bl	_set_dma_count
	mov	w8, #1
	str	w8, [x19]
	ldr	w0, [x19, #76]
	bl	_enable_dma
Lloh3:
	adrp	x8, _R0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R0@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _RES_Rx_CRC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RES_Rx_CRC@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_write_zsreg
	b	LBB0_8
LBB0_3:
	ldp	x8, x22, [x19, #56]
	str	x8, [x19, #64]
	ldp	w0, w20, [x19, #24]
	str	wzr, [x19, #28]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w8, [x8]
	str	w8, [x19, #72]
	mov	x8, x0
LBB0_5:
	str	w8, [x19, #32]
	bl	_dev_alloc_skb
	str	x0, [x19, #56]
	cbz	x0, LBB0_13
; %bb.6:
	ldr	w1, [x19, #24]
	bl	_skb_put
	b	LBB0_14
LBB0_7:
	ldr	x0, [x19, #40]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_warn
LBB0_8:
	mov	x0, x22
	bl	_release_dma_lock
	mov	x0, x20
	bl	_dev_alloc_skb
	mov	x22, x0
	cbz	x0, LBB0_10
; %bb.9:
	mov	x0, x22
	mov	x1, x20
	bl	_skb_put
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_skb_copy_to_linear_data
	ldr	x8, [x19, #40]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
	ldr	w9, [x8]
	add	w9, w9, w20
	str	w9, [x8]
	b	LBB0_11
LBB0_10:
	ldr	x0, [x19, #40]
	ldr	w8, [x0, #4]
	add	w8, w8, #1
	str	w8, [x0, #4]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_warn
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #4]
	cbz	x22, LBB0_15
LBB0_12:
	mov	x0, x22
	mov	x1, x20
	bl	_skb_trim
	ldr	x2, [x19, #48]
	mov	x0, x19
	mov	x1, x22
	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
	br	x2
LBB0_13:
	ldr	x0, [x19, #40]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_warn
LBB0_14:
	ldr	x8, [x19, #40]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
	ldr	w9, [x8]
	add	w9, w9, w20
	str	w9, [x8]
	cbnz	x22, LBB0_12
LBB0_15:
	ldr	x0, [x19, #40]
	ldr	w8, [x0, #4]
	add	w8, w8, #1
	str	w8, [x0, #4]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	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
	b	_netdev_err
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MODE_READ,4,2              ; @DMA_MODE_READ
	.comm	_R0,4,2                         ; @R0
	.comm	_RES_Rx_CRC,4,2                 ; @RES_Rx_CRC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA flip overrun!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Memory squeeze\n"

	.comm	_RT_LOCK,4,2                    ; @RT_LOCK
	.comm	_RT_UNLOCK,4,2                  ; @RT_UNLOCK
l_.str.2:                               ; @.str.2
	.asciz	"memory squeeze\n"

l_.str.3:                               ; @.str.3
	.asciz	"Lost a frame\n"

	.no_dead_strip	_z8530_rx_done
.subsections_via_symbols
