	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_can_err
_sun4i_can_err:                         ## @sun4i_can_err
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r13
	callq	_netdev_priv
	movq	%rax, %r15
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	-56(%rbp), %rsi
	movq	%r13, %rdi
	callq	_alloc_can_err_skb
	movq	%rax, %r14
	movq	_SUN4I_REG_ERRC_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movzbl	%al, %ecx
                                        ## kill: def $eax killed $eax killed $rax
	shrl	$16, %eax
	movzbl	%al, %edx
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rax
	movq	(%rax), %rax
	movl	%ecx, 24(%rax)
	movl	%edx, 28(%rax)
LBB0_2:
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movq	_SUN4I_INT_DATA_OR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_netdev_dbg
	movq	%r14, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_CAN_ERR_CRTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx
	orl	%eax, 8(%rcx)
	movq	_CAN_ERR_CRTL_RX_OVERFLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rcx), %rcx
	movl	%eax, 4(%rcx)
LBB0_5:
	incl	16(%r13)
	incl	12(%r13)
	movq	%r13, %rdi
	callq	_set_reset_mode
	movq	%r13, %rdi
	callq	_set_normal_mode
	movq	_SUN4I_CMD_CLEAR_OR_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_sun4i_can_write_cmdreg
LBB0_6:
	movq	_SUN4I_INT_ERR_WRN@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_13
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_netdev_dbg
	movq	_SUN4I_STA_BUS_OFF@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_CAN_STATE_BUS_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_9:
	movq	_SUN4I_STA_ERR_STA@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	movq	_CAN_STATE_ERROR_WARNING@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_CAN_STATE_ERROR_ACTIVE@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_13:
	movq	_SUN4I_INT_BUS_ERR@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_25
## %bb.14:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_netdev_dbg
	incl	8(%r15)
	incl	12(%r13)
	movq	%r14, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_25
## %bb.15:
	movq	_SUN4I_REG_STA_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	movq	_CAN_ERR_PROT@GOTPCREL(%rip), %rcx
	movq	_CAN_ERR_BUSERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	-56(%rbp), %rcx
	orl	%edx, 8(%rcx)
	movq	_SUN4I_STA_MASK_ERR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	cmpl	$128, %edx
	je	LBB0_21
## %bb.16:
	cmpl	$129, %edx
	je	LBB0_20
## %bb.17:
	cmpl	$130, %edx
	jne	LBB0_22
## %bb.18:
	movq	_CAN_ERR_PROT_BIT@GOTPCREL(%rip), %rdx
	jmp	LBB0_19
LBB0_21:
	movq	_CAN_ERR_PROT_STUFF@GOTPCREL(%rip), %rdx
	jmp	LBB0_19
LBB0_20:
	movq	_CAN_ERR_PROT_FORM@GOTPCREL(%rip), %rdx
LBB0_19:
	movl	(%rdx), %edx
	movq	(%rcx), %rcx
	orl	%edx, 8(%rcx)
	jmp	LBB0_23
LBB0_22:
	movq	_SUN4I_STA_ERR_SEG_CODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	sarl	$16, %edx
	movq	(%rcx), %rcx
	movl	%edx, 12(%rcx)
LBB0_23:
	movq	_SUN4I_STA_ERR_DIR@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	jne	LBB0_25
## %bb.24:
	movq	_CAN_ERR_PROT_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rcx)
LBB0_25:
	movq	_SUN4I_INT_ERR_PASSIVE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_29
## %bb.26:
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	callq	_netdev_dbg
	movq	_CAN_STATE_ERROR_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_28
## %bb.27:
	movq	_CAN_STATE_ERROR_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_28:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_29:
	movq	_SUN4I_INT_ARB_LOST@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_32
## %bb.30:
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	callq	_netdev_dbg
	movq	_SUN4I_REG_STA_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	incl	4(%r15)
	movq	%rax, %rbx
	incl	8(%r13)
	movq	%r14, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_32
## %bb.31:
	movq	_CAN_ERR_LOSTARB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx
	orl	%eax, 8(%rcx)
	shrl	$8, %ebx
	andl	$31, %ebx
	movq	(%rcx), %rax
	movl	%ebx, (%rax)
LBB0_32:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpl	(%r15), %ebx
	je	LBB0_38
## %bb.33:
	movq	%r14, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_35
## %bb.34:
	xorl	%edx, %edx
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, -64(%rbp)                 ## 4-byte Folded Reload
	movl	%ebx, %ecx
	cmoval	%edx, %ecx
	cmovael	%ebx, %edx
	movq	-56(%rbp), %rsi
	movq	%r13, %rdi
	callq	_can_change_state
	jmp	LBB0_36
LBB0_35:
	movl	%ebx, (%r15)
LBB0_36:
	movq	_CAN_STATE_BUS_OFF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_38
## %bb.37:
	movq	%r13, %rdi
	callq	_can_bus_off
LBB0_38:
	movq	%r14, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_40
## %bb.39:
	incl	4(%r13)
	movq	-56(%rbp), %rax
	movl	16(%rax), %eax
	addl	%eax, (%r13)
	movq	%r14, %rdi
	callq	_netif_rx
	xorl	%eax, %eax
	jmp	LBB0_41
LBB0_40:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_41:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN4I_REG_ERRC_ADDR,8,3        ## @SUN4I_REG_ERRC_ADDR
	.comm	_SUN4I_INT_DATA_OR,4,2          ## @SUN4I_INT_DATA_OR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data overrun interrupt\n"

	.comm	_CAN_ERR_CRTL,4,2               ## @CAN_ERR_CRTL
	.comm	_CAN_ERR_CRTL_RX_OVERFLOW,4,2   ## @CAN_ERR_CRTL_RX_OVERFLOW
	.comm	_SUN4I_CMD_CLEAR_OR_FLAG,4,2    ## @SUN4I_CMD_CLEAR_OR_FLAG
	.comm	_SUN4I_INT_ERR_WRN,4,2          ## @SUN4I_INT_ERR_WRN
L_.str.1:                               ## @.str.1
	.asciz	"error warning interrupt\n"

	.comm	_SUN4I_STA_BUS_OFF,4,2          ## @SUN4I_STA_BUS_OFF
	.comm	_CAN_STATE_BUS_OFF,4,2          ## @CAN_STATE_BUS_OFF
	.comm	_SUN4I_STA_ERR_STA,4,2          ## @SUN4I_STA_ERR_STA
	.comm	_CAN_STATE_ERROR_WARNING,4,2    ## @CAN_STATE_ERROR_WARNING
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ## @CAN_STATE_ERROR_ACTIVE
	.comm	_SUN4I_INT_BUS_ERR,4,2          ## @SUN4I_INT_BUS_ERR
L_.str.2:                               ## @.str.2
	.asciz	"bus error interrupt\n"

	.comm	_SUN4I_REG_STA_ADDR,8,3         ## @SUN4I_REG_STA_ADDR
	.comm	_CAN_ERR_PROT,4,2               ## @CAN_ERR_PROT
	.comm	_CAN_ERR_BUSERROR,4,2           ## @CAN_ERR_BUSERROR
	.comm	_SUN4I_STA_MASK_ERR,4,2         ## @SUN4I_STA_MASK_ERR
	.comm	_CAN_ERR_PROT_BIT,4,2           ## @CAN_ERR_PROT_BIT
	.comm	_CAN_ERR_PROT_FORM,4,2          ## @CAN_ERR_PROT_FORM
	.comm	_CAN_ERR_PROT_STUFF,4,2         ## @CAN_ERR_PROT_STUFF
	.comm	_SUN4I_STA_ERR_SEG_CODE,4,2     ## @SUN4I_STA_ERR_SEG_CODE
	.comm	_SUN4I_STA_ERR_DIR,4,2          ## @SUN4I_STA_ERR_DIR
	.comm	_CAN_ERR_PROT_TX,4,2            ## @CAN_ERR_PROT_TX
	.comm	_SUN4I_INT_ERR_PASSIVE,4,2      ## @SUN4I_INT_ERR_PASSIVE
L_.str.3:                               ## @.str.3
	.asciz	"error passive interrupt\n"

	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ## @CAN_STATE_ERROR_PASSIVE
	.comm	_SUN4I_INT_ARB_LOST,4,2         ## @SUN4I_INT_ARB_LOST
L_.str.4:                               ## @.str.4
	.asciz	"arbitration lost interrupt\n"

	.comm	_CAN_ERR_LOSTARB,4,2            ## @CAN_ERR_LOSTARB
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sun4i_can_err
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_can_err
_sun4i_can_err:                         ; @sun4i_can_err
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	w24, [x0]
	add	x1, sp, #8
	mov	x0, x19
	bl	_alloc_can_err_skb
	mov	x20, x0
	ldr	x8, [x21, #16]
Lloh0:
	adrp	x9, _SUN4I_REG_ERRC_ADDR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SUN4I_REG_ERRC_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ubfx	w25, w0, #16, #8
	and	w26, w0, #0xff
	cbz	x20, LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	x8, [x8]
	stp	w26, w25, [x8, #24]
LBB0_2:
Lloh3:
	adrp	x8, _SUN4I_INT_DATA_OR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SUN4I_INT_DATA_OR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
	mov	x0, x20
	bl	_likely
	cbz	x0, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _CAN_ERR_CRTL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAN_ERR_CRTL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	w10, [x9, #8]
	orr	w8, w10, w8
	str	w8, [x9, #8]
Lloh11:
	adrp	x8, _CAN_ERR_CRTL_RX_OVERFLOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CAN_ERR_CRTL_RX_OVERFLOW@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	x9, [x9]
	str	w8, [x9, #4]
LBB0_5:
	ldur	d0, [x19, #12]
	movi.2s	v1, #1
	add.2s	v0, v0, v1
	stur	d0, [x19, #12]
	mov	x0, x19
	bl	_set_reset_mode
	mov	x0, x19
	bl	_set_normal_mode
Lloh14:
	adrp	x8, _SUN4I_CMD_CLEAR_OR_FLAG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SUN4I_CMD_CLEAR_OR_FLAG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_sun4i_can_write_cmdreg
LBB0_6:
Lloh17:
	adrp	x8, _SUN4I_INT_ERR_WRN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SUN4I_INT_ERR_WRN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_13
; %bb.7:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
Lloh22:
	adrp	x8, _SUN4I_STA_BUS_OFF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SUN4I_STA_BUS_OFF@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_9
; %bb.8:
Lloh25:
	adrp	x8, _CAN_STATE_BUS_OFF@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CAN_STATE_BUS_OFF@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh27:
	adrp	x8, _SUN4I_STA_ERR_STA@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SUN4I_STA_ERR_STA@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w23
	b.eq	LBB0_11
; %bb.10:
Lloh30:
	adrp	x8, _CAN_STATE_ERROR_WARNING@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CAN_STATE_ERROR_WARNING@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh32:
	adrp	x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGEOFF]
LBB0_12:
	ldr	w24, [x8]
LBB0_13:
Lloh34:
	adrp	x8, _SUN4I_INT_BUS_ERR@GOTPAGE
Lloh35:
	ldr	x8, [x8, _SUN4I_INT_BUS_ERR@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x23, _SUN4I_REG_STA_ADDR@GOTPAGE
Lloh38:
	ldr	x23, [x23, _SUN4I_REG_STA_ADDR@GOTPAGEOFF]
	tst	w8, w22
	b.eq	LBB0_25
; %bb.14:
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
	ldr	w8, [x21, #8]
	add	w8, w8, #1
	str	w8, [x21, #8]
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	mov	x0, x20
	bl	_likely
	cbz	x0, LBB0_25
; %bb.15:
	ldr	x8, [x21, #16]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
Lloh41:
	adrp	x8, _CAN_ERR_PROT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CAN_ERR_PROT@GOTPAGEOFF]
Lloh43:
	adrp	x9, _CAN_ERR_BUSERROR@GOTPAGE
Lloh44:
	ldr	x9, [x9, _CAN_ERR_BUSERROR@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
Lloh46:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	x8, [sp, #8]
	ldr	w10, [x8, #8]
	orr	w9, w9, w10
	str	w9, [x8, #8]
Lloh47:
	adrp	x9, _SUN4I_STA_MASK_ERR@GOTPAGE
Lloh48:
	ldr	x9, [x9, _SUN4I_STA_MASK_ERR@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	and	w9, w9, w0
	cmp	w9, #128
	b.eq	LBB0_19
; %bb.16:
	cmp	w9, #129
	b.eq	LBB0_20
; %bb.17:
	cmp	w9, #130
	b.ne	LBB0_22
; %bb.18:
Lloh50:
	adrp	x9, _CAN_ERR_PROT_BIT@GOTPAGE
Lloh51:
	ldr	x9, [x9, _CAN_ERR_PROT_BIT@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
Lloh52:
	adrp	x9, _CAN_ERR_PROT_STUFF@GOTPAGE
Lloh53:
	ldr	x9, [x9, _CAN_ERR_PROT_STUFF@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh54:
	adrp	x9, _CAN_ERR_PROT_FORM@GOTPAGE
Lloh55:
	ldr	x9, [x9, _CAN_ERR_PROT_FORM@GOTPAGEOFF]
LBB0_21:
	ldr	w9, [x9]
	ldr	x8, [x8]
	ldr	w10, [x8, #8]
	orr	w9, w10, w9
	str	w9, [x8, #8]
	b	LBB0_23
LBB0_22:
Lloh56:
	adrp	x9, _SUN4I_STA_ERR_SEG_CODE@GOTPAGE
Lloh57:
	ldr	x9, [x9, _SUN4I_STA_ERR_SEG_CODE@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	and	w9, w9, w0
	asr	w9, w9, #16
	ldr	x8, [x8]
	str	w9, [x8, #12]
LBB0_23:
Lloh59:
	adrp	x9, _SUN4I_STA_ERR_DIR@GOTPAGE
Lloh60:
	ldr	x9, [x9, _SUN4I_STA_ERR_DIR@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	tst	w9, w0
	b.ne	LBB0_25
; %bb.24:
Lloh62:
	adrp	x9, _CAN_ERR_PROT_TX@GOTPAGE
Lloh63:
	ldr	x9, [x9, _CAN_ERR_PROT_TX@GOTPAGEOFF]
Lloh64:
	ldr	w9, [x9]
	ldr	w10, [x8, #8]
	orr	w9, w10, w9
	str	w9, [x8, #8]
LBB0_25:
Lloh65:
	adrp	x8, _SUN4I_INT_ERR_PASSIVE@GOTPAGE
Lloh66:
	ldr	x8, [x8, _SUN4I_INT_ERR_PASSIVE@GOTPAGEOFF]
Lloh67:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_27
; %bb.26:
Lloh68:
	adrp	x1, l_.str.3@PAGE
Lloh69:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
Lloh70:
	adrp	x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGE
Lloh71:
	ldr	x8, [x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGEOFF]
Lloh72:
	ldr	w8, [x8]
Lloh73:
	adrp	x9, _CAN_STATE_ERROR_WARNING@GOTPAGE
Lloh74:
	ldr	x9, [x9, _CAN_STATE_ERROR_WARNING@GOTPAGEOFF]
Lloh75:
	ldr	w9, [x9]
	cmp	w24, w8
	csel	w24, w9, w8, eq
LBB0_27:
Lloh76:
	adrp	x8, _SUN4I_INT_ARB_LOST@GOTPAGE
Lloh77:
	ldr	x8, [x8, _SUN4I_INT_ARB_LOST@GOTPAGEOFF]
Lloh78:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_30
; %bb.28:
Lloh79:
	adrp	x1, l_.str.4@PAGE
Lloh80:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_netdev_dbg
	ldr	x8, [x21, #16]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	ldr	w8, [x21, #4]
	add	w8, w8, #1
	str	w8, [x21, #4]
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_likely
	cbz	x0, LBB0_30
; %bb.29:
Lloh81:
	adrp	x8, _CAN_ERR_LOSTARB@GOTPAGE
Lloh82:
	ldr	x8, [x8, _CAN_ERR_LOSTARB@GOTPAGEOFF]
Lloh83:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	w10, [x9, #8]
	orr	w8, w10, w8
	str	w8, [x9, #8]
	ubfx	w8, w22, #8, #5
	ldr	x9, [x9]
	str	w8, [x9]
LBB0_30:
	ldr	w8, [x21]
	cmp	w24, w8
	b.eq	LBB0_36
; %bb.31:
	mov	x0, x20
	bl	_likely
	cbz	x0, LBB0_33
; %bb.32:
	cmp	w26, w25
	csel	w3, wzr, w24, hi
	csel	w2, wzr, w24, lo
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_can_change_state
	b	LBB0_34
LBB0_33:
	str	w24, [x21]
LBB0_34:
Lloh84:
	adrp	x8, _CAN_STATE_BUS_OFF@GOTPAGE
Lloh85:
	ldr	x8, [x8, _CAN_STATE_BUS_OFF@GOTPAGEOFF]
Lloh86:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_36
; %bb.35:
	mov	x0, x19
	bl	_can_bus_off
LBB0_36:
	mov	x0, x20
	bl	_likely
	cbz	x0, LBB0_38
; %bb.37:
	ldr	x8, [sp, #8]
	add	x8, x8, #16
	ldr	d0, [x19]
	movi.2s	v1, #1
	ld1.s	{ v1 }[0], [x8]
	add.2s	v0, v0, v1
	str	d0, [x19]
	mov	x0, x20
	bl	_netif_rx
	mov	w0, #0
	b	LBB0_39
LBB0_38:
Lloh87:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh88:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh89:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_39:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh45
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpAdd	Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_REG_ERRC_ADDR,8,3        ; @SUN4I_REG_ERRC_ADDR
	.comm	_SUN4I_INT_DATA_OR,4,2          ; @SUN4I_INT_DATA_OR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data overrun interrupt\n"

	.comm	_CAN_ERR_CRTL,4,2               ; @CAN_ERR_CRTL
	.comm	_CAN_ERR_CRTL_RX_OVERFLOW,4,2   ; @CAN_ERR_CRTL_RX_OVERFLOW
	.comm	_SUN4I_CMD_CLEAR_OR_FLAG,4,2    ; @SUN4I_CMD_CLEAR_OR_FLAG
	.comm	_SUN4I_INT_ERR_WRN,4,2          ; @SUN4I_INT_ERR_WRN
l_.str.1:                               ; @.str.1
	.asciz	"error warning interrupt\n"

	.comm	_SUN4I_STA_BUS_OFF,4,2          ; @SUN4I_STA_BUS_OFF
	.comm	_CAN_STATE_BUS_OFF,4,2          ; @CAN_STATE_BUS_OFF
	.comm	_SUN4I_STA_ERR_STA,4,2          ; @SUN4I_STA_ERR_STA
	.comm	_CAN_STATE_ERROR_WARNING,4,2    ; @CAN_STATE_ERROR_WARNING
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ; @CAN_STATE_ERROR_ACTIVE
	.comm	_SUN4I_INT_BUS_ERR,4,2          ; @SUN4I_INT_BUS_ERR
l_.str.2:                               ; @.str.2
	.asciz	"bus error interrupt\n"

	.comm	_SUN4I_REG_STA_ADDR,8,3         ; @SUN4I_REG_STA_ADDR
	.comm	_CAN_ERR_PROT,4,2               ; @CAN_ERR_PROT
	.comm	_CAN_ERR_BUSERROR,4,2           ; @CAN_ERR_BUSERROR
	.comm	_SUN4I_STA_MASK_ERR,4,2         ; @SUN4I_STA_MASK_ERR
	.comm	_CAN_ERR_PROT_BIT,4,2           ; @CAN_ERR_PROT_BIT
	.comm	_CAN_ERR_PROT_FORM,4,2          ; @CAN_ERR_PROT_FORM
	.comm	_CAN_ERR_PROT_STUFF,4,2         ; @CAN_ERR_PROT_STUFF
	.comm	_SUN4I_STA_ERR_SEG_CODE,4,2     ; @SUN4I_STA_ERR_SEG_CODE
	.comm	_SUN4I_STA_ERR_DIR,4,2          ; @SUN4I_STA_ERR_DIR
	.comm	_CAN_ERR_PROT_TX,4,2            ; @CAN_ERR_PROT_TX
	.comm	_SUN4I_INT_ERR_PASSIVE,4,2      ; @SUN4I_INT_ERR_PASSIVE
l_.str.3:                               ; @.str.3
	.asciz	"error passive interrupt\n"

	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ; @CAN_STATE_ERROR_PASSIVE
	.comm	_SUN4I_INT_ARB_LOST,4,2         ; @SUN4I_INT_ARB_LOST
l_.str.4:                               ; @.str.4
	.asciz	"arbitration lost interrupt\n"

	.comm	_CAN_ERR_LOSTARB,4,2            ; @CAN_ERR_LOSTARB
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sun4i_can_err
.subsections_via_symbols
