	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_pciefd_stop
_kvaser_pciefd_stop:                    ## @kvaser_pciefd_stop
	.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
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%rax, %rbx
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_completion_done
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_kvaser_pciefd_start_controller_flush
LBB0_2:
	movq	_KVASER_PCIEFD_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wait_for_completion_timeout
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_KVASER_PCIEFD_KCAN_IEN_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_iowrite32
	movq	%r15, %rdi
	callq	_del_timer
	jmp	LBB0_5
LBB0_3:
	movl	16(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_close_candev
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_PCIEFD_WAIT_TIMEOUT,4,2 ## @KVASER_PCIEFD_WAIT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout during stop\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_KVASER_PCIEFD_KCAN_IEN_REG,8,3 ## @KVASER_PCIEFD_KCAN_IEN_REG
	.no_dead_strip	_kvaser_pciefd_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_pciefd_stop
_kvaser_pciefd_stop:                    ; @kvaser_pciefd_stop
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	add	x21, x0, #20
	mov	x0, x21
	bl	_completion_done
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_kvaser_pciefd_start_controller_flush
LBB0_2:
Lloh0:
	adrp	x8, _KVASER_PCIEFD_WAIT_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KVASER_PCIEFD_WAIT_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
Lloh3:
	adrp	x9, _KVASER_PCIEFD_KCAN_IEN_REG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KVASER_PCIEFD_KCAN_IEN_REG@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	mov	x0, x20
	bl	_del_timer
	mov	w20, #0
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x19
	bl	_close_candev
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_PCIEFD_WAIT_TIMEOUT,4,2 ; @KVASER_PCIEFD_WAIT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout during stop\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_KVASER_PCIEFD_KCAN_IEN_REG,8,3 ; @KVASER_PCIEFD_KCAN_IEN_REG
	.no_dead_strip	_kvaser_pciefd_stop
.subsections_via_symbols
