	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_canfd_stop
_rcar_canfd_stop:                       ## @rcar_canfd_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	%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	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_netdev_priv
	movq	%rax, %r12
	movl	(%rax), %r15d
	movq	_RCANFD_RFFIFO_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	8(%r12), %r13
	movl	%r15d, %edi
	callq	_RCANFD_CCTR
	movq	_RCANFD_CCTR_CHMDC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_RCANFD_CCTR_CHDMC_CRESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_rcar_canfd_update_bit
	movq	8(%r12), %rbx
	movl	%r15d, %edi
	callq	_RCANFD_CSTS
	addq	%rax, %rbx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	$2, %ecx
	movl	$500000, %r8d                   ## imm = 0x7A120
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_netdev_err
LBB0_2:
	addl	%r15d, %r14d
	movq	%r12, %rdi
	callq	_rcar_canfd_disable_channel_interrupts
	movq	8(%r12), %rbx
	movq	_RCANFD_CFFIFO_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_RCANFD_CFCC
	movq	_RCANFD_CFCC_CFE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_rcar_canfd_clear_bit
	movq	8(%r12), %rbx
	movl	%r14d, %edi
	callq	_RCANFD_RFCC
	movq	_RCANFD_RFCC_RFE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_rcar_canfd_clear_bit
	movq	_CAN_STATE_STOPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCANFD_RFFIFO_IDX,4,2          ## @RCANFD_RFFIFO_IDX
	.comm	_RCANFD_CCTR_CHMDC_MASK,4,2     ## @RCANFD_CCTR_CHMDC_MASK
	.comm	_RCANFD_CCTR_CHDMC_CRESET,4,2   ## @RCANFD_CCTR_CHDMC_CRESET
	.comm	_RCANFD_CSTS_CRSTSTS,4,2        ## @RCANFD_CSTS_CRSTSTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel %u reset failed\n"

	.comm	_RCANFD_CFFIFO_IDX,4,2          ## @RCANFD_CFFIFO_IDX
	.comm	_RCANFD_CFCC_CFE,4,2            ## @RCANFD_CFCC_CFE
	.comm	_RCANFD_RFCC_RFE,4,2            ## @RCANFD_RFCC_RFE
	.comm	_CAN_STATE_STOPPED,4,2          ## @CAN_STATE_STOPPED
	.no_dead_strip	_rcar_canfd_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_canfd_stop
_rcar_canfd_stop:                       ; @rcar_canfd_stop
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	w20, [x0]
Lloh0:
	adrp	x8, _RCANFD_RFFIFO_IDX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RCANFD_RFFIFO_IDX@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x22, [x0, #8]
	mov	x0, x20
	bl	_RCANFD_CCTR
	mov	x1, x0
Lloh3:
	adrp	x8, _RCANFD_CCTR_CHMDC_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RCANFD_CCTR_CHMDC_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _RCANFD_CCTR_CHDMC_CRESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RCANFD_CCTR_CHDMC_CRESET@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x22
	bl	_rcar_canfd_update_bit
	ldr	x22, [x19, #8]
	mov	x0, x20
	bl	_RCANFD_CSTS
	add	x0, x0, x22
	mov	w2, #0
	mov	w3, #2
	mov	w4, #41248
	movk	w4, #7, lsl #16
	bl	_readl_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_netdev_err
LBB0_2:
	add	w21, w23, w20
	mov	x0, x19
	bl	_rcar_canfd_disable_channel_interrupts
	ldr	x22, [x19, #8]
Lloh11:
	adrp	x8, _RCANFD_CFFIFO_IDX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RCANFD_CFFIFO_IDX@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_RCANFD_CFCC
	mov	x1, x0
Lloh14:
	adrp	x8, _RCANFD_CFCC_CFE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RCANFD_CFCC_CFE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_rcar_canfd_clear_bit
	ldr	x20, [x19, #8]
	mov	x0, x21
	bl	_RCANFD_RFCC
	mov	x1, x0
Lloh17:
	adrp	x8, _RCANFD_RFCC_RFE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RCANFD_RFCC_RFE@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_rcar_canfd_clear_bit
Lloh20:
	adrp	x8, _CAN_STATE_STOPPED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CAN_STATE_STOPPED@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RCANFD_RFFIFO_IDX,4,2          ; @RCANFD_RFFIFO_IDX
	.comm	_RCANFD_CCTR_CHMDC_MASK,4,2     ; @RCANFD_CCTR_CHMDC_MASK
	.comm	_RCANFD_CCTR_CHDMC_CRESET,4,2   ; @RCANFD_CCTR_CHDMC_CRESET
	.comm	_RCANFD_CSTS_CRSTSTS,4,2        ; @RCANFD_CSTS_CRSTSTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel %u reset failed\n"

	.comm	_RCANFD_CFFIFO_IDX,4,2          ; @RCANFD_CFFIFO_IDX
	.comm	_RCANFD_CFCC_CFE,4,2            ; @RCANFD_CFCC_CFE
	.comm	_RCANFD_RFCC_RFE,4,2            ; @RCANFD_RFCC_RFE
	.comm	_CAN_STATE_STOPPED,4,2          ; @CAN_STATE_STOPPED
	.no_dead_strip	_rcar_canfd_stop
.subsections_via_symbols
