	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mace_dma_intr
_mace_dma_intr:                         ## @mace_dma_intr
	.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	%rsi, %r14
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_PSC_MYSTERY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	callq	_psc_read_long
	movl	%eax, %ebx
	movq	(%r15), %rdi
	callq	_psc_read_long
	cmpl	%eax, %ebx
	jne	LBB0_1
## %bb.2:
	testl	$1610612736, %ebx               ## imm = 0x60000000
	je	LBB0_3
## %bb.4:
	movq	_PSC_ENETRD_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_psc_read_word
	testl	$8192, %eax                     ## imm = 0x2000
	jne	LBB0_5
## %bb.6:
	testl	$256, %eax                      ## imm = 0x100
	je	LBB0_13
## %bb.7:
	movq	_PSC_ENETRD_CMD@GOTPCREL(%rip), %rax
	movslq	(%r12), %rdi
	addq	(%rax), %rdi
	movl	$4352, %esi                     ## imm = 0x1100
	callq	_psc_write_word
	movq	_PSC_ENETRD_LEN@GOTPCREL(%rip), %rax
	movslq	(%r12), %rdi
	addq	(%rax), %rdi
	callq	_psc_read_long
	movl	%eax, %r15d
	movq	_N_RX_RING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	subl	%r15d, %ebx
	movl	4(%r12), %eax
	cmpl	%ebx, %eax
	jge	LBB0_10
## %bb.8:
	movq	_MACE_BUFF_SIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rcx
	movslq	%eax, %rsi
	imulq	%rcx, %rsi
	addq	16(%r12), %rsi
	movq	%r14, %rdi
	callq	_mace_dma_rx_frame
	movl	4(%r12), %eax
	incl	%eax
	movl	%eax, 4(%r12)
	cmpl	%ebx, %eax
	jl	LBB0_9
LBB0_10:
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.12:
	movslq	(%r12), %rdi
	movq	_PSC_ENETRD_CMD@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movl	$38912, %esi                    ## imm = 0x9800
	callq	_psc_write_word
	jmp	LBB0_13
LBB0_3:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rbx
	jmp	LBB0_17
LBB0_5:
	movq	%r14, %rdi
	callq	_mace_rxdma_reset
LBB0_13:
	movq	_PSC_ENETWR_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_psc_read_word
	testl	$8192, %eax                     ## imm = 0x2000
	jne	LBB0_14
## %bb.15:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rbx
	testl	$256, %eax                      ## imm = 0x100
	je	LBB0_17
## %bb.16:
	movq	_PSC_ENETWR_CMD@GOTPCREL(%rip), %rax
	movslq	8(%r12), %rdi
	addq	(%rax), %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_psc_write_word
	xorb	$16, 8(%r12)
	incl	12(%r12)
	jmp	LBB0_17
LBB0_14:
	movq	%r14, %rdi
	callq	_mace_txdma_reset
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rbx
LBB0_17:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_mace_load_rxdma_base
	xorb	$16, (%r12)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_PSC_MYSTERY,8,3                ## @PSC_MYSTERY
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_PSC_ENETRD_CTL,4,2             ## @PSC_ENETRD_CTL
	.comm	_PSC_ENETRD_CMD,8,3             ## @PSC_ENETRD_CMD
	.comm	_PSC_ENETRD_LEN,8,3             ## @PSC_ENETRD_LEN
	.comm	_N_RX_RING,4,2                  ## @N_RX_RING
	.comm	_MACE_BUFF_SIZE,4,2             ## @MACE_BUFF_SIZE
	.comm	_PSC_ENETWR_CTL,4,2             ## @PSC_ENETWR_CTL
	.comm	_PSC_ENETWR_CMD,8,3             ## @PSC_ENETWR_CMD
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mace_dma_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mace_dma_intr
_mace_dma_intr:                         ; @mace_dma_intr
	.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	x20, x1
	mov	x0, x1
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x22, _PSC_MYSTERY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PSC_MYSTERY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	bl	_psc_read_long
	mov	x21, x0
	ldr	x0, [x22]
	bl	_psc_read_long
	cmp	w21, w0
	b.ne	LBB0_1
; %bb.2:
	tst	w21, #0x60000000
	b.eq	LBB0_10
; %bb.3:
Lloh2:
	adrp	x8, _PSC_ENETRD_CTL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSC_ENETRD_CTL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_psc_read_word
	tbnz	w0, #13, LBB0_11
; %bb.4:
	tbz	w0, #8, LBB0_12
; %bb.5:
Lloh5:
	adrp	x22, _PSC_ENETRD_CMD@GOTPAGE
Lloh6:
	ldr	x22, [x22, _PSC_ENETRD_CMD@GOTPAGEOFF]
	ldr	x8, [x22]
	ldrsw	x9, [x19]
	add	x0, x8, x9
	mov	w1, #4352
	bl	_psc_write_word
Lloh7:
	adrp	x8, _PSC_ENETRD_LEN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PSC_ENETRD_LEN@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldrsw	x9, [x19]
	add	x0, x8, x9
	bl	_psc_read_long
	mov	x21, x0
Lloh10:
	adrp	x8, _N_RX_RING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _N_RX_RING@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
	ldr	w8, [x19, #4]
	sub	w23, w9, w0
	cmp	w8, w23
	b.ge	LBB0_8
; %bb.6:
Lloh13:
	adrp	x24, _MACE_BUFF_SIZE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _MACE_BUFF_SIZE@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldrsw	x10, [x24]
	sxtw	x8, w8
	madd	x1, x10, x8, x9
	mov	x0, x20
	bl	_mace_dma_rx_frame
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	cmp	w8, w23
	b.lt	LBB0_7
LBB0_8:
	cbz	w21, LBB0_18
; %bb.9:
	ldr	x8, [x22]
	ldrsw	x9, [x19]
	add	x0, x8, x9
	mov	w1, #38912
	bl	_psc_write_word
	b	LBB0_12
LBB0_10:
Lloh15:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_17
LBB0_11:
	mov	x0, x20
	bl	_mace_rxdma_reset
LBB0_12:
Lloh17:
	adrp	x8, _PSC_ENETWR_CTL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PSC_ENETWR_CTL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_psc_read_word
	tbnz	w0, #13, LBB0_15
; %bb.13:
	tbz	w0, #8, LBB0_16
; %bb.14:
Lloh20:
	adrp	x8, _PSC_ENETWR_CMD@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PSC_ENETWR_CMD@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldrsw	x9, [x19, #8]
	add	x0, x8, x9
	mov	w1, #256
	bl	_psc_write_word
	ldr	d0, [x19, #8]
	movi.2s	v1, #16
	eor.8b	v1, v0, v1
	movi.2s	v2, #1
	add.2s	v0, v0, v2
	mov.s	v1[1], v0[1]
	str	d1, [x19, #8]
	b	LBB0_16
LBB0_15:
	mov	x0, x20
	bl	_mace_txdma_reset
LBB0_16:
Lloh23:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	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
	ret
LBB0_18:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_mace_load_rxdma_base
	ldr	w8, [x19]
	eor	w8, w8, #0x10
	str	w8, [x19]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_PSC_MYSTERY,8,3                ; @PSC_MYSTERY
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_PSC_ENETRD_CTL,4,2             ; @PSC_ENETRD_CTL
	.comm	_PSC_ENETRD_CMD,8,3             ; @PSC_ENETRD_CMD
	.comm	_PSC_ENETRD_LEN,8,3             ; @PSC_ENETRD_LEN
	.comm	_N_RX_RING,4,2                  ; @N_RX_RING
	.comm	_MACE_BUFF_SIZE,4,2             ; @MACE_BUFF_SIZE
	.comm	_PSC_ENETWR_CTL,4,2             ; @PSC_ENETWR_CTL
	.comm	_PSC_ENETWR_CMD,8,3             ; @PSC_ENETWR_CMD
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mace_dma_intr
.subsections_via_symbols
