	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_dma_prepare_ctllo
_dw_dma_prepare_ctllo:                  ## @dw_dma_prepare_ctllo
	.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, %rbx
	movq	(%rdi), %rdi
	callq	_is_slave_direction
	leaq	16(%rbx), %rcx
	leaq	20(%rbx), %rdx
	testl	%eax, %eax
	movq	_DW_DMA_MSIZE_16@GOTPCREL(%rip), %rax
	cmoveq	%rax, %rdx
	cmoveq	%rax, %rcx
	movl	12(%rbx), %eax
	movl	8(%rbx), %r14d
	movq	(%rbx), %rsi
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	movl	%r14d, %r12d
	cmovel	%eax, %r12d
	movl	(%rdx), %r15d
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	movl	(%rcx), %edi
	cmovel	%eax, %r14d
	movq	_DWC_CTLL_LLP_D_EN@GOTPCREL(%rip), %rax
	movq	_DWC_CTLL_LLP_S_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	callq	_DWC_CTLL_DST_MSIZE
	movl	%eax, %r13d
	orl	%ebx, %r13d
	movl	%r15d, %edi
	callq	_DWC_CTLL_SRC_MSIZE
	movl	%eax, %r15d
	movl	%r12d, %edi
	callq	_DWC_CTLL_DMS
	movl	%eax, %ebx
	orl	%r15d, %ebx
	orl	%r13d, %ebx
	movl	%r14d, %edi
	callq	_DWC_CTLL_SMS
	orl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DW_DMA_MSIZE_16,4,2            ## @DW_DMA_MSIZE_16
	.comm	_DMA_MEM_TO_DEV,8,3             ## @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.comm	_DWC_CTLL_LLP_D_EN,4,2          ## @DWC_CTLL_LLP_D_EN
	.comm	_DWC_CTLL_LLP_S_EN,4,2          ## @DWC_CTLL_LLP_S_EN
	.no_dead_strip	_dw_dma_prepare_ctllo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_dma_prepare_ctllo
_dw_dma_prepare_ctllo:                  ; @dw_dma_prepare_ctllo
	.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
	ldr	x0, [x0]
	bl	_is_slave_direction
	add	x8, x19, #16
	add	x9, x19, #20
Lloh0:
	adrp	x10, _DW_DMA_MSIZE_16@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DW_DMA_MSIZE_16@GOTPAGEOFF]
	cmp	w0, #0
	csel	x9, x10, x9, eq
	ldr	w20, [x9]
	csel	x8, x10, x8, eq
	ldr	w0, [x8]
	ldp	w9, w8, [x19, #8]
	ldr	x10, [x19]
Lloh2:
	adrp	x11, _DMA_MEM_TO_DEV@GOTPAGE
Lloh3:
	ldr	x11, [x11, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh4:
	ldr	x11, [x11]
	cmp	x10, x11
	csel	w19, w8, w9, eq
Lloh5:
	adrp	x11, _DMA_DEV_TO_MEM@GOTPAGE
Lloh6:
	ldr	x11, [x11, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x10, x11
Lloh8:
	adrp	x10, _DWC_CTLL_LLP_D_EN@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DWC_CTLL_LLP_D_EN@GOTPAGEOFF]
	csel	w21, w8, w9, eq
Lloh10:
	ldr	w8, [x10]
Lloh11:
	adrp	x9, _DWC_CTLL_LLP_S_EN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DWC_CTLL_LLP_S_EN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w22, w9, w8
	bl	_DWC_CTLL_DST_MSIZE
	orr	w22, w22, w0
	mov	x0, x20
	bl	_DWC_CTLL_SRC_MSIZE
	orr	w20, w22, w0
	mov	x0, x19
	bl	_DWC_CTLL_DMS
	orr	w19, w20, w0
	mov	x0, x21
	bl	_DWC_CTLL_SMS
	orr	w0, w19, w0
	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	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DW_DMA_MSIZE_16,4,2            ; @DW_DMA_MSIZE_16
	.comm	_DMA_MEM_TO_DEV,8,3             ; @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.comm	_DWC_CTLL_LLP_D_EN,4,2          ; @DWC_CTLL_LLP_D_EN
	.comm	_DWC_CTLL_LLP_S_EN,4,2          ; @DWC_CTLL_LLP_S_EN
	.no_dead_strip	_dw_dma_prepare_ctllo
.subsections_via_symbols
