	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xcan_set_error_state
_xcan_set_error_state:                  ## @xcan_set_error_state
	.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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	_XCAN_ECR_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	*(%rax)
	movq	%rax, %rbx
	movq	_XCAN_ECR_TEC_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	andq	%rbx, %r13
	movq	_XCAN_ECR_REC_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	movq	_XCAN_ESR_REC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarq	%cl, %rbx
	movq	_CAN_STATE_ERROR_PASSIVE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%r12d, (%rax)
	setb	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	cmpq	%rbx, %r13
	movl	%r12d, %ecx
	cmovgl	%eax, %ecx
	cmovll	%eax, %r12d
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_can_change_state
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	movq	%r13, 48(%rax)
	movq	%rbx, 56(%rax)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XCAN_ECR_OFFSET,4,2            ## @XCAN_ECR_OFFSET
	.comm	_XCAN_ECR_TEC_MASK,8,3          ## @XCAN_ECR_TEC_MASK
	.comm	_XCAN_ECR_REC_MASK,8,3          ## @XCAN_ECR_REC_MASK
	.comm	_XCAN_ESR_REC_SHIFT,8,3         ## @XCAN_ESR_REC_SHIFT
	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ## @CAN_STATE_ERROR_PASSIVE
	.no_dead_strip	_xcan_set_error_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xcan_set_error_state
_xcan_set_error_state:                  ; @xcan_set_error_state
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_netdev_priv
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _XCAN_ECR_OFFSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XCAN_ECR_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	blr	x8
	mov	x22, x0
Lloh3:
	adrp	x8, _XCAN_ECR_TEC_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XCAN_ECR_TEC_MASK@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
Lloh6:
	adrp	x8, _XCAN_ECR_REC_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XCAN_ECR_REC_MASK@GOTPAGEOFF]
Lloh8:
	ldr	x24, [x8]
Lloh9:
	adrp	x8, _XCAN_ESR_REC_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XCAN_ESR_REC_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	x25, [x8]
Lloh12:
	adrp	x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAN_STATE_ERROR_PASSIVE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w21
	cset	w0, lo
	bl	_WARN_ON
	cbnz	x0, LBB0_3
; %bb.1:
	and	x23, x23, x22
	and	x8, x24, x22
	asr	x22, x8, x25
	cmp	x23, x22
	csel	w3, wzr, w21, gt
	csel	w2, wzr, w21, lt
	mov	x0, x20
	mov	x1, x19
	bl	_can_change_state
	cbz	x19, LBB0_3
; %bb.2:
	ldr	x8, [x19]
	stp	x23, x22, [x8, #48]
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XCAN_ECR_OFFSET,4,2            ; @XCAN_ECR_OFFSET
	.comm	_XCAN_ECR_TEC_MASK,8,3          ; @XCAN_ECR_TEC_MASK
	.comm	_XCAN_ECR_REC_MASK,8,3          ; @XCAN_ECR_REC_MASK
	.comm	_XCAN_ESR_REC_SHIFT,8,3         ; @XCAN_ESR_REC_SHIFT
	.comm	_CAN_STATE_ERROR_PASSIVE,4,2    ; @CAN_STATE_ERROR_PASSIVE
	.no_dead_strip	_xcan_set_error_state
.subsections_via_symbols
