	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ucan_set_mode
_ucan_set_mode:                         ## @ucan_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
	callq	_netdev_priv
	cmpl	$128, %ebx
	jne	LBB0_4
## %bb.1:
	movq	%rax, %r15
	movl	4(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_dbg
	movq	_UCAN_COMMAND_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ucan_ctrl_command_out
	movl	%eax, %r14d
	movq	_CAN_STATE_ERROR_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	cmpl	$0, 8(%r15)
	jle	LBB0_3
## %bb.2:
	movl	4(%r15), %edi
	callq	_netif_wake_queue
LBB0_3:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_5
LBB0_4:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"restarting device\n"

	.comm	_UCAN_COMMAND_RESTART,4,2       ## @UCAN_COMMAND_RESTART
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ## @CAN_STATE_ERROR_ACTIVE
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.no_dead_strip	_ucan_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ucan_set_mode
_ucan_set_mode:                         ; @ucan_set_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	bl	_netdev_priv
	cmp	w20, #128
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_dbg
Lloh2:
	adrp	x8, _UCAN_COMMAND_RESTART@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UCAN_COMMAND_RESTART@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_ucan_ctrl_command_out
	mov	x20, x0
Lloh5:
	adrp	x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_netif_wake_queue
LBB0_3:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"restarting device\n"

	.comm	_UCAN_COMMAND_RESTART,4,2       ; @UCAN_COMMAND_RESTART
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ; @CAN_STATE_ERROR_ACTIVE
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.no_dead_strip	_ucan_set_mode
.subsections_via_symbols
