	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_eth_error
_sh_eth_error:                          ## @sh_eth_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	%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
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	_EESR_TWB@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_EESR_TABT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	incl	24(%r15)
	movq	_tx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_netif_err
LBB0_3:
	movq	_EESR_RABT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.4:
	movq	_EESR_RFRMER@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	incl	20(%r15)
LBB0_6:
	movq	_EESR_TDE@GOTPCREL(%rip), %r13
	testl	%ebx, (%r13)
	je	LBB0_8
## %bb.7:
	incl	8(%r15)
	movq	_tx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_netif_err
LBB0_8:
	movq	_EESR_TFE@GOTPCREL(%rip), %r12
	testl	%ebx, (%r12)
	je	LBB0_10
## %bb.9:
	incl	8(%r15)
	movq	_tx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_netif_err
LBB0_10:
	movq	_EESR_RDE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.11:
	incl	16(%r15)
LBB0_12:
	movq	_EESR_RFE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.13:
	incl	12(%r15)
LBB0_14:
	movq	(%r14), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_18
## %bb.15:
	movq	_EESR_ADE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_16
## %bb.17:
	incl	8(%r15)
	movq	_tx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rcx
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_netif_err
	movq	(%r14), %rax
	movq	8(%rax), %rax
	jmp	LBB0_18
LBB0_16:
	xorl	%eax, %eax
LBB0_18:
	movq	_EESR_TABT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_EESR_TWB@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_EESR_ADE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%edx, %ecx
	orl	(%r13), %ecx
	orl	(%r12), %ecx
	xorl	%esi, %esi
	cmpq	$1, %rax
	sbbl	%esi, %esi
	notl	%edx
	orl	%edx, %esi
	andl	%ebx, %ecx
	testl	%esi, %ecx
	je	LBB0_22
## %bb.19:
	movq	_EDTRR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_sh_eth_read
	movl	%eax, %r12d
	movl	8(%r14), %r8d
	movl	12(%r14), %ecx
	movl	(%r15), %r9d
	movl	%eax, (%rsp)
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_netdev_err
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_sh_eth_tx_free
	movq	(%r14), %rax
	movl	(%rax), %esi
	cmpl	%esi, %r12d
	je	LBB0_21
## %bb.20:
	movl	(%r13), %edx
	movq	%r15, %rdi
	callq	_sh_eth_write
LBB0_21:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_wake_queue               ## TAILCALL
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EESR_TWB,4,2                   ## @EESR_TWB
	.comm	_EESR_TABT,4,2                  ## @EESR_TABT
	.comm	_tx_err,4,2                     ## @tx_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transmit Abort\n"

	.comm	_EESR_RABT,4,2                  ## @EESR_RABT
	.comm	_EESR_RFRMER,4,2                ## @EESR_RFRMER
	.comm	_EESR_TDE,4,2                   ## @EESR_TDE
L_.str.1:                               ## @.str.1
	.asciz	"Transmit Descriptor Empty\n"

	.comm	_EESR_TFE,4,2                   ## @EESR_TFE
L_.str.2:                               ## @.str.2
	.asciz	"Transmit FIFO Under flow\n"

	.comm	_EESR_RDE,4,2                   ## @EESR_RDE
	.comm	_EESR_RFE,4,2                   ## @EESR_RFE
	.comm	_EESR_ADE,4,2                   ## @EESR_ADE
L_.str.3:                               ## @.str.3
	.asciz	"Address Error\n"

	.comm	_EDTRR,4,2                      ## @EDTRR
L_.str.4:                               ## @.str.4
	.asciz	"TX error. status=%8.8x cur_tx=%8.8x dirty_tx=%8.8x state=%8.8x EDTRR=%8.8x.\n"

	.no_dead_strip	_sh_eth_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_eth_error
_sh_eth_error:                          ; @sh_eth_error
	.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	x21, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
Lloh0:
	adrp	x22, _EESR_TWB@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EESR_TWB@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x24, _tx_err@GOTPAGE
Lloh3:
	ldr	x24, [x24, _tx_err@GOTPAGEOFF]
Lloh4:
	adrp	x23, _EESR_TABT@GOTPAGE
Lloh5:
	ldr	x23, [x23, _EESR_TABT@GOTPAGEOFF]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.2:
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	ldr	w1, [x24]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_err
LBB0_3:
Lloh8:
	adrp	x8, _EESR_RABT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EESR_RABT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.4:
Lloh11:
	adrp	x8, _EESR_RFRMER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EESR_RFRMER@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
LBB0_6:
Lloh14:
	adrp	x25, _EESR_TDE@GOTPAGE
Lloh15:
	ldr	x25, [x25, _EESR_TDE@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.7:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	w1, [x24]
Lloh16:
	adrp	x3, l_.str.1@PAGE
Lloh17:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_err
LBB0_8:
Lloh18:
	adrp	x26, _EESR_TFE@GOTPAGE
Lloh19:
	ldr	x26, [x26, _EESR_TFE@GOTPAGEOFF]
	ldr	w8, [x26]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.9:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	w1, [x24]
Lloh20:
	adrp	x3, l_.str.2@PAGE
Lloh21:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_err
LBB0_10:
Lloh22:
	adrp	x8, _EESR_RDE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EESR_RDE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_12
; %bb.11:
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
LBB0_12:
Lloh25:
	adrp	x8, _EESR_RFE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EESR_RFE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_14
; %bb.13:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
LBB0_14:
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
Lloh28:
	adrp	x27, _EESR_ADE@GOTPAGE
Lloh29:
	ldr	x27, [x27, _EESR_ADE@GOTPAGEOFF]
	cbnz	x8, LBB0_18
; %bb.15:
	ldr	w8, [x27]
	tst	w8, w21
	b.eq	LBB0_17
; %bb.16:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	w1, [x24]
Lloh30:
	adrp	x3, l_.str.3@PAGE
Lloh31:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_netif_err
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	b	LBB0_18
LBB0_17:
	mov	x8, #0
LBB0_18:
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w9, w10, w9
	ldr	w10, [x27]
	orr	w9, w9, w10
	ldr	w11, [x25]
	orr	w9, w9, w11
	ldr	w11, [x26]
	orr	w9, w9, w11
	cmp	x8, #0
	mov	w8, #-1
	csinv	w8, w8, w10, eq
	and	w9, w9, w21
	tst	w9, w8
	b.eq	LBB0_22
; %bb.19:
Lloh32:
	adrp	x23, _EDTRR@GOTPAGE
Lloh33:
	ldr	x23, [x23, _EDTRR@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_sh_eth_read
	mov	x22, x0
	ldp	w4, w3, [x20, #8]
	ldr	w5, [x19]
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x6, x22
	bl	_netdev_err
	mov	x0, x19
	mov	w1, #1
	bl	_sh_eth_tx_free
	ldr	x8, [x20]
	ldr	w1, [x8]
	cmp	w22, w1
	b.eq	LBB0_21
; %bb.20:
	ldr	w2, [x23]
	mov	x0, x19
	bl	_sh_eth_write
LBB0_21:
	mov	x0, x19
	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
	b	_netif_wake_queue
LBB0_22:
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_EESR_TWB,4,2                   ; @EESR_TWB
	.comm	_EESR_TABT,4,2                  ; @EESR_TABT
	.comm	_tx_err,4,2                     ; @tx_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transmit Abort\n"

	.comm	_EESR_RABT,4,2                  ; @EESR_RABT
	.comm	_EESR_RFRMER,4,2                ; @EESR_RFRMER
	.comm	_EESR_TDE,4,2                   ; @EESR_TDE
l_.str.1:                               ; @.str.1
	.asciz	"Transmit Descriptor Empty\n"

	.comm	_EESR_TFE,4,2                   ; @EESR_TFE
l_.str.2:                               ; @.str.2
	.asciz	"Transmit FIFO Under flow\n"

	.comm	_EESR_RDE,4,2                   ; @EESR_RDE
	.comm	_EESR_RFE,4,2                   ; @EESR_RFE
	.comm	_EESR_ADE,4,2                   ; @EESR_ADE
l_.str.3:                               ; @.str.3
	.asciz	"Address Error\n"

	.comm	_EDTRR,4,2                      ; @EDTRR
l_.str.4:                               ; @.str.4
	.asciz	"TX error. status=%8.8x cur_tx=%8.8x dirty_tx=%8.8x state=%8.8x EDTRR=%8.8x.\n"

	.no_dead_strip	_sh_eth_error
.subsections_via_symbols
