	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_dcp_start_dma
_mxs_dcp_start_dma:                     ## @mxs_dcp_start_dma
	.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	_global_sdcp@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movslq	(%rdi), %r15
	movq	24(%r13), %rax
	movq	%r15, %r12
	shlq	$2, %r12
	movq	(%rax), %rsi
	addq	%r12, %rsi
	movl	(%r13), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %edx
	callq	_dma_map_single
	movl	%eax, %r14d
	movq	16(%r13), %rdi
	addq	%r12, %rdi
	callq	_reinit_completion
	movq	8(%r13), %rbx
	movl	%r15d, %edi
	callq	_MXS_DCP_CH_N_STAT_CLR
	addq	%rax, %rbx
	movl	$-1, %edi
	movq	%rbx, %rsi
	callq	_writel
	movq	8(%r13), %rbx
	movl	%r15d, %edi
	callq	_MXS_DCP_CH_N_CMDPTR
	addq	%rax, %rbx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_writel
	movq	8(%r13), %rbx
	movl	%r15d, %edi
	callq	_MXS_DCP_CH_N_SEMA
	addq	%rax, %rbx
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	_writel
	addq	16(%r13), %r12
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	8(%r13), %rbx
	movl	%r15d, %edi
	callq	_MXS_DCP_CH_N_STAT
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movl	(%r13), %edi
	testb	%al, %al
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_1:
	movl	(%r13), %ebx
	movq	_MXS_DCP_STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r13), %rdi
	callq	_readl
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movl	$4, %edx
	callq	_dma_unmap_single
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_global_sdcp,8,3                ## @global_sdcp
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Channel %i timeout (DCP_STAT=0x%08x)\n"

	.comm	_MXS_DCP_STAT,8,3               ## @MXS_DCP_STAT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"Channel %i error (CH_STAT=0x%08x)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mxs_dcp_start_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxs_dcp_start_dma
_mxs_dcp_start_dma:                     ; @mxs_dcp_start_dma
	.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
Lloh0:
	adrp	x8, _global_sdcp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _global_sdcp@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldrsw	x19, [x0]
	ldr	x8, [x22, #24]
	ldr	x8, [x8]
	lsl	x21, x19, #2
	add	x1, x8, x21
	ldr	w0, [x22]
Lloh3:
	adrp	x23, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	w2, #4
	bl	_dma_map_single
	mov	x20, x0
	ldr	x8, [x22, #16]
	add	x0, x8, x21
	bl	_reinit_completion
	ldr	x24, [x22, #8]
	mov	x0, x19
	bl	_MXS_DCP_CH_N_STAT_CLR
	add	x1, x0, x24
	mov	w0, #-1
	bl	_writel
	ldr	x24, [x22, #8]
	mov	x0, x19
	bl	_MXS_DCP_CH_N_CMDPTR
	add	x1, x0, x24
	mov	x0, x20
	bl	_writel
	ldr	x24, [x22, #8]
	mov	x0, x19
	bl	_MXS_DCP_CH_N_SEMA
	add	x1, x0, x24
	mov	w0, #1
	bl	_writel
	ldr	x8, [x22, #16]
	add	x21, x8, x21
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x21
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x21, [x22, #8]
	mov	x0, x19
	bl	_MXS_DCP_CH_N_STAT
	add	x0, x0, x21
	bl	_readl
	mov	x3, x0
	ldr	w0, [x22]
	tst	w3, #0xff
	b.eq	LBB0_5
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	ldr	w20, [x22]
	ldr	x8, [x22, #8]
Lloh9:
	adrp	x9, _MXS_DCP_STAT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MXS_DCP_STAT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x3, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	w3, [x23]
	mov	x1, x20
	mov	w2, #4
	bl	_dma_unmap_single
	mov	w0, #0
LBB0_6:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_global_sdcp,8,3                ; @global_sdcp
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channel %i timeout (DCP_STAT=0x%08x)\n"

	.comm	_MXS_DCP_STAT,8,3               ; @MXS_DCP_STAT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"Channel %i error (CH_STAT=0x%08x)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mxs_dcp_start_dma
.subsections_via_symbols
