	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_can_interrupt
_sun4i_can_interrupt:                   ## @sun4i_can_interrupt
	.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, %r15
	movq	%rsi, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movq	_SUN4I_REG_INT_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_SUN4I_CAN_MAX_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	setg	%al
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.1:
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.2:
	xorl	%r14d, %r14d
	movq	_SUN4I_REG_STA_ADDR@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	(%rcx), %rdi
	addq	(%r12), %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	_SUN4I_INT_WAKEUP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_warn
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_SUN4I_INT_TBUF_VLD@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SUN4I_REG_RBUF_RBACK_START_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	callq	_readl
	andl	$15, %eax
	addl	%eax, (%r15)
	incl	4(%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_can_get_echo_skb
	movq	%r15, %rdi
	callq	_netif_wake_queue
	movq	_CAN_LED_EVENT_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_can_led_event
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_SUN4I_INT_RBUF_VLD@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SUN4I_INT_DATA_OR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SUN4I_STA_RBUF_RDY@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	_SUN4I_REG_STA_ADDR@GOTPCREL(%rip), %r14
	movq	%r12, %rbx
	movq	%r15, %r12
	movq	_SUN4I_STA_RBUF_RDY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_sun4i_can_rx
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	testl	%eax, (%r15)
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movq	%r12, %r15
	movq	%rbx, %r12
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_SUN4I_INT_ERR_WRN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SUN4I_INT_DATA_OR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SUN4I_INT_BUS_ERR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_SUN4I_INT_ERR_PASSIVE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	incl	%r14d
	movq	_SUN4I_INT_ARB_LOST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%ebx, %eax
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_sun4i_can_err
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_SUN4I_REG_INT_ADDR@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	(%r12), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	callq	_readl
	movq	(%r13), %rdi
	addq	(%r12), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_SUN4I_CAN_MAX_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	setl	%al
	testl	%ebx, %ebx
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ecx, %r14d
	movq	_SUN4I_REG_STA_ADDR@GOTPCREL(%rip), %rcx
	jl	LBB0_3
LBB0_18:
	testb	%al, %al
	jne	LBB0_20
## %bb.19:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_netdev_dbg
LBB0_20:
	testl	%r14d, %r14d
	jne	LBB0_21
## %bb.22:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_21:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SUN4I_REG_INT_ADDR,8,3         ## @SUN4I_REG_INT_ADDR
	.comm	_SUN4I_CAN_MAX_IRQ,4,2          ## @SUN4I_CAN_MAX_IRQ
	.comm	_SUN4I_REG_STA_ADDR,8,3         ## @SUN4I_REG_STA_ADDR
	.comm	_SUN4I_INT_WAKEUP,4,2           ## @SUN4I_INT_WAKEUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wakeup interrupt\n"

	.comm	_SUN4I_INT_TBUF_VLD,4,2         ## @SUN4I_INT_TBUF_VLD
	.comm	_SUN4I_REG_RBUF_RBACK_START_ADDR,8,3 ## @SUN4I_REG_RBUF_RBACK_START_ADDR
	.comm	_CAN_LED_EVENT_TX,4,2           ## @CAN_LED_EVENT_TX
	.comm	_SUN4I_INT_RBUF_VLD,4,2         ## @SUN4I_INT_RBUF_VLD
	.comm	_SUN4I_INT_DATA_OR,4,2          ## @SUN4I_INT_DATA_OR
	.comm	_SUN4I_STA_RBUF_RDY,4,2         ## @SUN4I_STA_RBUF_RDY
	.comm	_SUN4I_INT_ERR_WRN,4,2          ## @SUN4I_INT_ERR_WRN
	.comm	_SUN4I_INT_BUS_ERR,4,2          ## @SUN4I_INT_BUS_ERR
	.comm	_SUN4I_INT_ERR_PASSIVE,4,2      ## @SUN4I_INT_ERR_PASSIVE
	.comm	_SUN4I_INT_ARB_LOST,4,2         ## @SUN4I_INT_ARB_LOST
L_.str.1:                               ## @.str.1
	.asciz	"can't allocate buffer - clearing pending interrupts\n"

L_.str.2:                               ## @.str.2
	.asciz	"%d messages handled in ISR"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.no_dead_strip	_sun4i_can_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_can_interrupt
_sun4i_can_interrupt:                   ; @sun4i_can_interrupt
	.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	x19, x1
	mov	x0, x1
	bl	_netdev_priv
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x26, _SUN4I_REG_INT_ADDR@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SUN4I_REG_INT_ADDR@GOTPAGEOFF]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x27, _SUN4I_CAN_MAX_IRQ@GOTPAGE
Lloh3:
	ldr	x27, [x27, _SUN4I_CAN_MAX_IRQ@GOTPAGEOFF]
	ldr	w9, [x27]
	cmp	w9, #0
	cset	w8, gt
	cmp	w0, #0
	ccmp	w9, #1, #8, ne
	b.ge	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_17
LBB0_2:
	mov	x22, x0
	mov	w20, #0
Lloh4:
	adrp	x28, _SUN4I_REG_STA_ADDR@GOTPAGE
Lloh5:
	ldr	x28, [x28, _SUN4I_REG_STA_ADDR@GOTPAGEOFF]
Lloh6:
	adrp	x24, _SUN4I_INT_DATA_OR@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SUN4I_INT_DATA_OR@GOTPAGEOFF]
Lloh8:
	adrp	x23, _SUN4I_STA_RBUF_RDY@GOTPAGE
Lloh9:
	ldr	x23, [x23, _SUN4I_STA_RBUF_RDY@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x8, [x21]
	ldr	x9, [x28]
	add	x0, x9, x8
	bl	_readl
	mov	x25, x0
Lloh10:
	adrp	x8, _SUN4I_INT_WAKEUP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SUN4I_INT_WAKEUP@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_warn
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh15:
	adrp	x8, _SUN4I_INT_TBUF_VLD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SUN4I_INT_TBUF_VLD@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
Lloh18:
	adrp	x9, _SUN4I_REG_RBUF_RBACK_START_ADDR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SUN4I_REG_RBUF_RBACK_START_ADDR@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	and	w8, w0, #0xf
	ldr	d0, [x19]
	movi.2s	v1, #1
	mov.s	v1[0], w8
	add.2s	v0, v0, v1
	str	d0, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_can_get_echo_skb
	mov	x0, x19
	bl	_netif_wake_queue
Lloh21:
	adrp	x8, _CAN_LED_EVENT_TX@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CAN_LED_EVENT_TX@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_can_led_event
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh24:
	adrp	x8, _SUN4I_INT_RBUF_VLD@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SUN4I_INT_RBUF_VLD@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	tst	w8, w22
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	tst	w8, w25
	b.eq	LBB0_12
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_sun4i_can_rx
	ldr	x8, [x21]
	ldr	x9, [x28]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x0
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
Lloh27:
	adrp	x9, _SUN4I_INT_ERR_WRN@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SUN4I_INT_ERR_WRN@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh30:
	adrp	x9, _SUN4I_INT_BUS_ERR@GOTPAGE
Lloh31:
	ldr	x9, [x9, _SUN4I_INT_BUS_ERR@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh33:
	adrp	x9, _SUN4I_INT_ERR_PASSIVE@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SUN4I_INT_ERR_PASSIVE@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh36:
	adrp	x9, _SUN4I_INT_ARB_LOST@GOTPAGE
Lloh37:
	ldr	x9, [x9, _SUN4I_INT_ARB_LOST@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w22
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x25
	bl	_sun4i_can_err
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	x8, [x21]
	ldr	x9, [x26]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x21]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x21]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x27]
	cmp	w20, w8
	cset	w8, lt
	cbz	w0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	b.lt	LBB0_3
LBB0_17:
	tbnz	w8, #0, LBB0_19
; %bb.18:
Lloh41:
	adrp	x1, l_.str.2@PAGE
Lloh42:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_netdev_dbg
LBB0_19:
Lloh43:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh44:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh45:
	adrp	x9, _IRQ_NONE@GOTPAGE
Lloh46:
	ldr	x9, [x9, _IRQ_NONE@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_SUN4I_REG_INT_ADDR,8,3         ; @SUN4I_REG_INT_ADDR
	.comm	_SUN4I_CAN_MAX_IRQ,4,2          ; @SUN4I_CAN_MAX_IRQ
	.comm	_SUN4I_REG_STA_ADDR,8,3         ; @SUN4I_REG_STA_ADDR
	.comm	_SUN4I_INT_WAKEUP,4,2           ; @SUN4I_INT_WAKEUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wakeup interrupt\n"

	.comm	_SUN4I_INT_TBUF_VLD,4,2         ; @SUN4I_INT_TBUF_VLD
	.comm	_SUN4I_REG_RBUF_RBACK_START_ADDR,8,3 ; @SUN4I_REG_RBUF_RBACK_START_ADDR
	.comm	_CAN_LED_EVENT_TX,4,2           ; @CAN_LED_EVENT_TX
	.comm	_SUN4I_INT_RBUF_VLD,4,2         ; @SUN4I_INT_RBUF_VLD
	.comm	_SUN4I_INT_DATA_OR,4,2          ; @SUN4I_INT_DATA_OR
	.comm	_SUN4I_STA_RBUF_RDY,4,2         ; @SUN4I_STA_RBUF_RDY
	.comm	_SUN4I_INT_ERR_WRN,4,2          ; @SUN4I_INT_ERR_WRN
	.comm	_SUN4I_INT_BUS_ERR,4,2          ; @SUN4I_INT_BUS_ERR
	.comm	_SUN4I_INT_ERR_PASSIVE,4,2      ; @SUN4I_INT_ERR_PASSIVE
	.comm	_SUN4I_INT_ARB_LOST,4,2         ; @SUN4I_INT_ARB_LOST
l_.str.1:                               ; @.str.1
	.asciz	"can't allocate buffer - clearing pending interrupts\n"

l_.str.2:                               ; @.str.2
	.asciz	"%d messages handled in ISR"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.no_dead_strip	_sun4i_can_interrupt
.subsections_via_symbols
