	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_drif_start_channel
_rcar_drif_start_channel:               ## @rcar_drif_start_channel
	.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, %r15
	movq	16(%rdi), %r14
	movq	_RCAR_DRIF_SICTR@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	_RCAR_DRIF_SICTR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_rcar_drif_write
	movq	(%r13), %rdi
	addq	8(%r15), %rdi
	movl	$1, %edx
	movl	$7, %ecx
	movl	$100000, %r8d                   ## imm = 0x186A0
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	(%r15), %r12d
	movq	(%r13), %rsi
	movq	%r15, %rdi
	callq	_rcar_drif_read
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_rdrif_err
	jmp	LBB0_4
LBB0_2:
	movq	%r15, %rdi
	callq	_rcar_drif_qbuf
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_RCAR_DRIF_RFFUL@GOTPCREL(%rip), %rax
	movq	_RCAR_DRIF_REOF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_RCAR_DRIF_RFSERR@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_RCAR_DRIF_RFUDF@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_RCAR_DRIF_RFOVF@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_RCAR_DRIF_SISTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	callq	_rcar_drif_write
	movq	_RCAR_DRIF_SIIER@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movl	$36864, %edx                    ## imm = 0x9000
	callq	_rcar_drif_write
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RCAR_DRIF_SICTR,8,3            ## @RCAR_DRIF_SICTR
	.comm	_RCAR_DRIF_SICTR_RESET,4,2      ## @RCAR_DRIF_SICTR_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ch%u: failed to reset rx. ctr 0x%08x\n"

	.comm	_RCAR_DRIF_RFFUL,4,2            ## @RCAR_DRIF_RFFUL
	.comm	_RCAR_DRIF_REOF,4,2             ## @RCAR_DRIF_REOF
	.comm	_RCAR_DRIF_RFSERR,4,2           ## @RCAR_DRIF_RFSERR
	.comm	_RCAR_DRIF_RFUDF,4,2            ## @RCAR_DRIF_RFUDF
	.comm	_RCAR_DRIF_RFOVF,4,2            ## @RCAR_DRIF_RFOVF
	.comm	_RCAR_DRIF_SISTR,8,3            ## @RCAR_DRIF_SISTR
	.comm	_RCAR_DRIF_SIIER,8,3            ## @RCAR_DRIF_SIIER
	.no_dead_strip	_rcar_drif_start_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_drif_start_channel
_rcar_drif_start_channel:               ; @rcar_drif_start_channel
	.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	x19, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x23, _RCAR_DRIF_SICTR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _RCAR_DRIF_SICTR@GOTPAGEOFF]
	ldr	x1, [x23]
Lloh2:
	adrp	x8, _RCAR_DRIF_SICTR_RESET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RCAR_DRIF_SICTR_RESET@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_rcar_drif_write
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x0, x9, x8
	mov	w2, #1
	mov	w3, #7
	mov	w4, #34464
	movk	w4, #1, lsl #16
	bl	_readl_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w22, [x19]
	ldr	x1, [x23]
	mov	x0, x19
	bl	_rcar_drif_read
	mov	x3, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_rdrif_err
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_rcar_drif_qbuf
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _RCAR_DRIF_RFFUL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RCAR_DRIF_RFFUL@GOTPAGEOFF]
Lloh9:
	adrp	x9, _RCAR_DRIF_REOF@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RCAR_DRIF_REOF@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _RCAR_DRIF_RFSERR@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RCAR_DRIF_RFSERR@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _RCAR_DRIF_RFUDF@GOTPAGE
Lloh17:
	ldr	x9, [x9, _RCAR_DRIF_RFUDF@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _RCAR_DRIF_RFOVF@GOTPAGE
Lloh20:
	ldr	x10, [x10, _RCAR_DRIF_RFOVF@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh21:
	ldr	w9, [x10]
	orr	w2, w8, w9
Lloh22:
	adrp	x8, _RCAR_DRIF_SISTR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RCAR_DRIF_SISTR@GOTPAGEOFF]
Lloh24:
	ldr	x1, [x8]
	mov	x0, x19
	bl	_rcar_drif_write
Lloh25:
	adrp	x8, _RCAR_DRIF_SIIER@GOTPAGE
Lloh26:
	ldr	x8, [x8, _RCAR_DRIF_SIIER@GOTPAGEOFF]
Lloh27:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #36864
	bl	_rcar_drif_write
LBB0_4:
	mov	x0, x21
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_RCAR_DRIF_SICTR,8,3            ; @RCAR_DRIF_SICTR
	.comm	_RCAR_DRIF_SICTR_RESET,4,2      ; @RCAR_DRIF_SICTR_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ch%u: failed to reset rx. ctr 0x%08x\n"

	.comm	_RCAR_DRIF_RFFUL,4,2            ; @RCAR_DRIF_RFFUL
	.comm	_RCAR_DRIF_REOF,4,2             ; @RCAR_DRIF_REOF
	.comm	_RCAR_DRIF_RFSERR,4,2           ; @RCAR_DRIF_RFSERR
	.comm	_RCAR_DRIF_RFUDF,4,2            ; @RCAR_DRIF_RFUDF
	.comm	_RCAR_DRIF_RFOVF,4,2            ; @RCAR_DRIF_RFOVF
	.comm	_RCAR_DRIF_SISTR,8,3            ; @RCAR_DRIF_SISTR
	.comm	_RCAR_DRIF_SIIER,8,3            ; @RCAR_DRIF_SIIER
	.no_dead_strip	_rcar_drif_start_channel
.subsections_via_symbols
