	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function niu_rx_error
_niu_rx_error:                          ## @niu_rx_error
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	(%rsi), %edi
	callq	_RX_DMA_CTL_STAT
	movl	%eax, %edi
	callq	_nr64
	movl	%eax, %r15d
	movq	_RX_DMA_CTL_STAT_CHAN_FATAL@GOTPCREL(%rip), %rax
	movq	_RX_DMA_CTL_STAT_PORT_FATAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	andl	%r15d, %ecx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ecx, %ecx
	cmovel	%ecx, %ebx
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movl	(%r12), %edi
	movl	(%r14), %edx
	movslq	%r15d, %rcx
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_niu_log_rxchan_errors
LBB0_2:
	movl	(%r14), %edi
	callq	_RX_DMA_CTL_STAT
	movq	_RX_DMA_CTL_WRITE_CLEAR_ERRS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%r15d, %esi
	movl	%eax, %edi
	callq	_nw64
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_DMA_CTL_STAT_CHAN_FATAL,4,2 ## @RX_DMA_CTL_STAT_CHAN_FATAL
	.comm	_RX_DMA_CTL_STAT_PORT_FATAL,4,2 ## @RX_DMA_CTL_STAT_PORT_FATAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RX channel %u error, stat[%llx]\n"

	.comm	_RX_DMA_CTL_WRITE_CLEAR_ERRS,4,2 ## @RX_DMA_CTL_WRITE_CLEAR_ERRS
	.no_dead_strip	_niu_rx_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function niu_rx_error
_niu_rx_error:                          ; @niu_rx_error
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x1]
	bl	_RX_DMA_CTL_STAT
	bl	_nr64
	mov	x20, x0
Lloh0:
	adrp	x8, _RX_DMA_CTL_STAT_CHAN_FATAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RX_DMA_CTL_STAT_CHAN_FATAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _RX_DMA_CTL_STAT_PORT_FATAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RX_DMA_CTL_STAT_PORT_FATAL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _EINVAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w8, w0
	csneg	w22, wzr, w9, eq
	cbz	w22, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	ldr	w2, [x19]
	sxtw	x3, w20
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_niu_log_rxchan_errors
LBB0_2:
	ldr	w0, [x19]
	bl	_RX_DMA_CTL_STAT
Lloh11:
	adrp	x8, _RX_DMA_CTL_WRITE_CLEAR_ERRS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RX_DMA_CTL_WRITE_CLEAR_ERRS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w1, w8, w20
	bl	_nw64
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_DMA_CTL_STAT_CHAN_FATAL,4,2 ; @RX_DMA_CTL_STAT_CHAN_FATAL
	.comm	_RX_DMA_CTL_STAT_PORT_FATAL,4,2 ; @RX_DMA_CTL_STAT_PORT_FATAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RX channel %u error, stat[%llx]\n"

	.comm	_RX_DMA_CTL_WRITE_CLEAR_ERRS,4,2 ; @RX_DMA_CTL_WRITE_CLEAR_ERRS
	.no_dead_strip	_niu_rx_error
.subsections_via_symbols
