	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m_can_handle_state_change
_m_can_handle_state_change:             ## @m_can_handle_state_change
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r12
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$130, %ebx
	je	LBB0_5
## %bb.2:
	cmpl	$129, %ebx
	jne	LBB0_6
## %bb.3:
	incl	12(%r12)
	movq	_CAN_STATE_ERROR_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	jmp	LBB0_6
LBB0_4:
	incl	8(%r12)
	movl	$128, (%r12)
	jmp	LBB0_6
LBB0_5:
	movl	$130, (%r12)
	movq	%r12, %rdi
	callq	_m_can_disable_all_interrupts
	incl	4(%r12)
	movq	%r15, %rdi
	callq	_can_bus_off
LBB0_6:
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_alloc_can_err_skb
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_23
## %bb.7:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	___m_can_get_berr_counter
	cmpl	$128, %ebx
	je	LBB0_15
## %bb.8:
	cmpl	$129, %ebx
	je	LBB0_11
## %bb.9:
	cmpl	$130, %ebx
	jne	LBB0_10
## %bb.21:
	movq	_CAN_ERR_BUSOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-40(%rbp), %rax
	orl	%ecx, 16(%rax)
	jmp	LBB0_22
LBB0_11:
	movq	_CAN_ERR_CRTL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-40(%rbp), %rax
	orl	%ecx, 16(%rax)
	movl	-48(%rbp), %ecx
	cmpl	-44(%rbp), %ecx
	jle	LBB0_12
## %bb.13:
	movq	_CAN_ERR_CRTL_TX_WARNING@GOTPCREL(%rip), %rdx
	jmp	LBB0_14
LBB0_15:
	movq	_CAN_ERR_CRTL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-40(%rbp), %rcx
	orl	%eax, 16(%rcx)
	movq	_M_CAN_ECR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_m_can_read
	movq	_ECR_RP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.16:
	movq	_CAN_ERR_CRTL_RX_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-40(%rbp), %rcx
	movq	(%rcx), %rcx
	orl	%eax, 4(%rcx)
LBB0_17:
	movl	-48(%rbp), %ecx
	cmpl	$127, %ecx
	jle	LBB0_18
## %bb.19:
	movq	_CAN_ERR_CRTL_TX_PASSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-40(%rbp), %rax
	movq	(%rax), %rdx
	orl	%esi, 4(%rdx)
	jmp	LBB0_20
LBB0_10:
	movq	-40(%rbp), %rax
	jmp	LBB0_22
LBB0_12:
	movq	_CAN_ERR_CRTL_RX_WARNING@GOTPCREL(%rip), %rdx
LBB0_14:
	movl	(%rdx), %edx
	movq	(%rax), %rsi
	movl	%edx, 4(%rsi)
	movl	%ecx, 24(%rsi)
	movl	-44(%rbp), %ecx
	movl	%ecx, 28(%rsi)
	jmp	LBB0_22
LBB0_18:
	movq	-40(%rbp), %rax
	movq	(%rax), %rdx
LBB0_20:
	movl	%ecx, 24(%rdx)
	movl	-44(%rbp), %ecx
	movl	%ecx, 28(%rdx)
LBB0_22:
	incl	4(%r15)
	movl	8(%rax), %eax
	addl	%eax, (%r15)
	movq	%r14, %rdi
	callq	_netif_receive_skb
	movl	$1, %eax
LBB0_23:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAN_STATE_ERROR_WARNING,4,2    ## @CAN_STATE_ERROR_WARNING
	.comm	_CAN_ERR_CRTL,4,2               ## @CAN_ERR_CRTL
	.comm	_CAN_ERR_CRTL_TX_WARNING,4,2    ## @CAN_ERR_CRTL_TX_WARNING
	.comm	_CAN_ERR_CRTL_RX_WARNING,4,2    ## @CAN_ERR_CRTL_RX_WARNING
	.comm	_M_CAN_ECR,4,2                  ## @M_CAN_ECR
	.comm	_ECR_RP,4,2                     ## @ECR_RP
	.comm	_CAN_ERR_CRTL_RX_PASSIVE,4,2    ## @CAN_ERR_CRTL_RX_PASSIVE
	.comm	_CAN_ERR_CRTL_TX_PASSIVE,4,2    ## @CAN_ERR_CRTL_TX_PASSIVE
	.comm	_CAN_ERR_BUSOFF,4,2             ## @CAN_ERR_BUSOFF
	.no_dead_strip	_m_can_handle_state_change
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m_can_handle_state_change
_m_can_handle_state_change:             ; @m_can_handle_state_change
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x22, x0
	cmp	w21, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #130
	b.eq	LBB0_5
; %bb.2:
	cmp	w21, #129
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x22, #12]
	add	w8, w8, #1
	str	w8, [x22, #12]
Lloh0:
	adrp	x8, _CAN_STATE_ERROR_WARNING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAN_STATE_ERROR_WARNING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x22]
	b	LBB0_6
LBB0_4:
	ldr	w8, [x22, #8]
	add	w8, w8, #1
	str	w8, [x22, #8]
	mov	w8, #128
	str	w8, [x22]
	b	LBB0_6
LBB0_5:
	mov	w8, #130
	str	w8, [x22]
	mov	x0, x22
	bl	_m_can_disable_all_interrupts
	ldr	w8, [x22, #4]
	add	w8, w8, #1
	str	w8, [x22, #4]
	mov	x0, x19
	bl	_can_bus_off
LBB0_6:
	add	x1, sp, #8
	mov	x0, x19
	bl	_alloc_can_err_skb
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_21
LBB0_8:
	mov	x1, sp
	mov	x0, x19
	bl	___m_can_get_berr_counter
	cmp	w21, #128
	b.eq	LBB0_13
; %bb.9:
	cmp	w21, #129
	b.eq	LBB0_12
; %bb.10:
	cmp	w21, #130
	b.ne	LBB0_17
; %bb.11:
Lloh3:
	adrp	x8, _CAN_ERR_BUSOFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAN_ERR_BUSOFF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldr	x8, [sp, #8]
	ldr	w10, [x8, #16]
	orr	w9, w10, w9
	str	w9, [x8, #16]
	b	LBB0_20
LBB0_12:
Lloh6:
	adrp	x8, _CAN_ERR_CRTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CAN_ERR_CRTL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
	ldr	x8, [sp, #8]
	ldr	w10, [x8, #16]
	orr	w9, w10, w9
	str	w9, [x8, #16]
	ldp	w9, w10, [sp]
Lloh9:
	adrp	x11, _CAN_ERR_CRTL_TX_WARNING@GOTPAGE
Lloh10:
	ldr	x11, [x11, _CAN_ERR_CRTL_TX_WARNING@GOTPAGEOFF]
Lloh11:
	adrp	x12, _CAN_ERR_CRTL_RX_WARNING@GOTPAGE
Lloh12:
	ldr	x12, [x12, _CAN_ERR_CRTL_RX_WARNING@GOTPAGEOFF]
	cmp	w9, w10
	csel	x10, x11, x12, gt
	ldr	w10, [x10]
	ldr	x11, [x8]
	str	w10, [x11, #4]
	ldr	w10, [sp, #4]
	stp	w9, w10, [x11, #24]
	b	LBB0_20
LBB0_13:
Lloh13:
	adrp	x8, _CAN_ERR_CRTL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CAN_ERR_CRTL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	w10, [x9, #16]
	orr	w8, w10, w8
	str	w8, [x9, #16]
Lloh16:
	adrp	x8, _M_CAN_ECR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _M_CAN_ECR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_m_can_read
Lloh19:
	adrp	x8, _ECR_RP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ECR_RP@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_15
; %bb.14:
Lloh22:
	adrp	x8, _CAN_ERR_CRTL_RX_PASSIVE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CAN_ERR_CRTL_RX_PASSIVE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	x9, [sp, #8]
	ldr	x9, [x9]
	ldr	w10, [x9, #4]
	orr	w8, w10, w8
	str	w8, [x9, #4]
LBB0_15:
	ldr	w9, [sp]
	cmp	w9, #127
	b.le	LBB0_18
; %bb.16:
Lloh25:
	adrp	x8, _CAN_ERR_CRTL_TX_PASSIVE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CAN_ERR_CRTL_TX_PASSIVE@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x8]
	ldr	x8, [sp, #8]
	ldr	x10, [x8]
	ldr	w12, [x10, #4]
	orr	w11, w12, w11
	str	w11, [x10, #4]
	b	LBB0_19
LBB0_17:
	ldr	x8, [sp, #8]
	b	LBB0_20
LBB0_18:
	ldr	x8, [sp, #8]
	ldr	x10, [x8]
LBB0_19:
	ldr	w11, [sp, #4]
	stp	w9, w11, [x10, #24]
LBB0_20:
	add	x8, x8, #8
	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_receive_skb
	mov	w0, #1
LBB0_21:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CAN_STATE_ERROR_WARNING,4,2    ; @CAN_STATE_ERROR_WARNING
	.comm	_CAN_ERR_CRTL,4,2               ; @CAN_ERR_CRTL
	.comm	_CAN_ERR_CRTL_TX_WARNING,4,2    ; @CAN_ERR_CRTL_TX_WARNING
	.comm	_CAN_ERR_CRTL_RX_WARNING,4,2    ; @CAN_ERR_CRTL_RX_WARNING
	.comm	_M_CAN_ECR,4,2                  ; @M_CAN_ECR
	.comm	_ECR_RP,4,2                     ; @ECR_RP
	.comm	_CAN_ERR_CRTL_RX_PASSIVE,4,2    ; @CAN_ERR_CRTL_RX_PASSIVE
	.comm	_CAN_ERR_CRTL_TX_PASSIVE,4,2    ; @CAN_ERR_CRTL_TX_PASSIVE
	.comm	_CAN_ERR_BUSOFF,4,2             ; @CAN_ERR_BUSOFF
	.no_dead_strip	_m_can_handle_state_change
.subsections_via_symbols
