	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grcan_set_mode
_grcan_set_mode:                        ## @grcan_set_mode
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	_CAN_MODE_START@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_7
## %bb.1:
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 16(%r15)
	jne	LBB0_3
## %bb.2:
	cmpq	$0, 8(%r15)
	je	LBB0_4
LBB0_3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_8
LBB0_7:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_info
	movq	%r14, %rdi
	callq	_grcan_start
	movq	_CAN_CTRLMODE_LISTENONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, 4(%r15)
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_netif_wake_queue
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_CAN_MODE_START,4,2             ## @CAN_MODE_START
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Restarting device\n"

	.comm	_CAN_CTRLMODE_LISTENONLY,4,2    ## @CAN_CTRLMODE_LISTENONLY
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_grcan_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grcan_set_mode
_grcan_set_mode:                        ; @grcan_set_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
	bl	_netdev_priv
Lloh0:
	adrp	x8, _CAN_MODE_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAN_MODE_START@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
LBB0_3:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_info
	mov	x0, x20
	bl	_grcan_start
	ldr	w8, [x19, #4]
Lloh11:
	adrp	x9, _CAN_CTRLMODE_LISTENONLY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CAN_CTRLMODE_LISTENONLY@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_netif_wake_queue
LBB0_9:
	mov	w20, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CAN_MODE_START,4,2             ; @CAN_MODE_START
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Restarting device\n"

	.comm	_CAN_CTRLMODE_LISTENONLY,4,2    ; @CAN_CTRLMODE_LISTENONLY
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_grcan_set_mode
.subsections_via_symbols
