	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imxdma_config_write
_imxdma_config_write:                   ## @imxdma_config_write
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	callq	_to_imxdma_chan
	movq	%rax, %rbx
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	cmpl	%r14d, (%rax)
	movq	40(%rbx), %r14
	setne	%cl
	sete	%sil
	movl	(%r15,%rcx,8), %eax
	movl	4(%r15,%rcx,8), %edx
	movl	16(%r15,%rsi,4), %ecx
	movl	%ecx, 32(%rbx)
	movl	%eax, (%rbx)
	movl	%edx, 4(%rbx)
	movq	_IMX_DMA_MEMSIZE_32@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	cmpl	$129, %edx
	jne	LBB0_2
## %bb.1:
	movq	_IMX_DMA_MEMSIZE_16@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	cmpl	$130, %edx
	jne	LBB0_4
## %bb.3:
	movq	_IMX_DMA_MEMSIZE_8@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	movq	$0, 24(%rbx)
	movq	_IMX_DMA_TYPE_FIFO@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_IMX_DMA_TYPE_LINEAR@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	leal	(,%rax,4), %edx
	movq	_CCR_REN@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	%esi, %edx
	orl	%ecx, %edx
	movl	%edx, 8(%rbx)
	shll	$2, %ecx
	orl	%esi, %eax
	orl	%ecx, %eax
	movl	%eax, 12(%rbx)
	movl	16(%rbx), %r15d
	movl	20(%rbx), %edi
	callq	_DMA_RSSR
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_imx_dmav1_writel
	movl	4(%rbx), %r15d
	movl	20(%rbx), %edi
	imull	(%rbx), %r15d
	callq	_DMA_BLR
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_imx_dmav1_writel
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_IMX_DMA_MEMSIZE_8,4,2          ## @IMX_DMA_MEMSIZE_8
	.comm	_IMX_DMA_MEMSIZE_16,4,2         ## @IMX_DMA_MEMSIZE_16
	.comm	_IMX_DMA_MEMSIZE_32,4,2         ## @IMX_DMA_MEMSIZE_32
	.comm	_IMX_DMA_TYPE_FIFO,4,2          ## @IMX_DMA_TYPE_FIFO
	.comm	_IMX_DMA_TYPE_LINEAR,4,2        ## @IMX_DMA_TYPE_LINEAR
	.comm	_CCR_REN,4,2                    ## @CCR_REN
	.no_dead_strip	_imxdma_config_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imxdma_config_write
_imxdma_config_write:                   ; @imxdma_config_write
	.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	x21, x2
	mov	x22, x1
	bl	_to_imxdma_chan
	mov	x20, x0
	ldr	x19, [x0, #40]
Lloh0:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	cset	w8, ne
	mov	w9, #16
	mov	w10, #20
	csel	x9, x10, x9, eq
	lsl	x8, x8, #3
	mov	w10, #12
	mov	w11, #4
	csel	x10, x11, x10, eq
	ldr	w10, [x22, x10]
	ldr	w8, [x22, x8]
	ldr	w9, [x22, x9]
	str	w9, [x0, #32]
	stp	w8, w10, [x0]
Lloh3:
	adrp	x8, _IMX_DMA_MEMSIZE_8@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IMX_DMA_MEMSIZE_8@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _IMX_DMA_MEMSIZE_16@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IMX_DMA_MEMSIZE_16@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x11, _IMX_DMA_MEMSIZE_32@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IMX_DMA_MEMSIZE_32@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	cmp	w10, #129
	csel	w9, w9, w11, eq
	cmp	w10, #130
	csel	w8, w8, w9, eq
Lloh12:
	adrp	x9, _IMX_DMA_TYPE_FIFO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IMX_DMA_TYPE_FIFO@GOTPAGEOFF]
	str	xzr, [x0, #24]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _IMX_DMA_TYPE_LINEAR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IMX_DMA_TYPE_LINEAR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w9, w9, w11
Lloh18:
	adrp	x10, _CCR_REN@GOTPAGE
Lloh19:
	ldr	x10, [x10, _CCR_REN@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w11, w10, w8
	orr	w11, w11, w9, lsl #2
	orr	w8, w9, w8, lsl #2
	orr	w8, w8, w10
	stp	w11, w8, [x0, #8]
	ldp	w21, w0, [x0, #16]
	bl	_DMA_RSSR
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_imx_dmav1_writel
	ldp	w8, w9, [x20]
	mul	w21, w9, w8
	ldr	w0, [x20, #20]
	bl	_DMA_BLR
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_imx_dmav1_writel
	mov	w0, #0
	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	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_IMX_DMA_MEMSIZE_8,4,2          ; @IMX_DMA_MEMSIZE_8
	.comm	_IMX_DMA_MEMSIZE_16,4,2         ; @IMX_DMA_MEMSIZE_16
	.comm	_IMX_DMA_MEMSIZE_32,4,2         ; @IMX_DMA_MEMSIZE_32
	.comm	_IMX_DMA_TYPE_FIFO,4,2          ; @IMX_DMA_TYPE_FIFO
	.comm	_IMX_DMA_TYPE_LINEAR,4,2        ; @IMX_DMA_TYPE_LINEAR
	.comm	_CCR_REN,4,2                    ; @CCR_REN
	.no_dead_strip	_imxdma_config_write
.subsections_via_symbols
