	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsl_edma_prep_slave_dma
_fsl_edma_prep_slave_dma:               ## @fsl_edma_prep_slave_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	%rdi, %rbx
	cmpl	$129, %esi
	je	LBB0_4
## %bb.1:
	cmpl	$128, %esi
	jne	LBB0_2
## %bb.3:
	leaq	24(%rbx), %rcx
	leaq	20(%rbx), %rdx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	leaq	16(%rbx), %rcx
	leaq	12(%rbx), %rdx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rcx), %r12d
	movl	(%rdx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_6
LBB0_2:
	xorl	%r12d, %r12d
	movq	_DMA_NONE@GOTPCREL(%rip), %rax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_6:
	movl	(%rax), %r15d
	movl	$1, %r13d
	cmpl	%r15d, (%rbx)
	je	LBB0_9
## %bb.7:
	movq	32(%rbx), %rax
	movq	(%rax), %r14
	movq	%rbx, %rdi
	callq	_fsl_edma_unprep_slave_dma
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	callq	_dma_map_resource
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movl	%r12d, 4(%rbx)
	movl	%r15d, (%rbx)
	movl	$1, %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_NONE,4,2                   ## @DMA_NONE
	.no_dead_strip	_fsl_edma_prep_slave_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsl_edma_prep_slave_dma
_fsl_edma_prep_slave_dma:               ; @fsl_edma_prep_slave_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
	mov	x19, x0
	cmp	w1, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #128
	b.ne	LBB0_5
; %bb.2:
	add	x9, x19, #24
	add	x10, x19, #20
Lloh0:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	add	x9, x19, #16
	add	x10, x19, #12
Lloh2:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
LBB0_4:
	ldr	w22, [x9]
	ldr	w20, [x10]
	b	LBB0_6
LBB0_5:
	mov	w22, #0
	mov	w20, #0
Lloh4:
	adrp	x8, _DMA_NONE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DMA_NONE@GOTPAGEOFF]
LBB0_6:
	ldr	w21, [x8]
	ldr	w8, [x19]
	cmp	w8, w21
	b.eq	LBB0_9
; %bb.7:
	ldr	x8, [x19, #32]
	ldr	x23, [x8]
	mov	x0, x19
	bl	_fsl_edma_unprep_slave_dma
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	mov	x3, x21
	mov	w4, #0
	bl	_dma_map_resource
	mov	x1, x0
	str	w0, [x19, #8]
	mov	x0, x23
	bl	_dma_mapping_error
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_10
; %bb.8:
	stp	w21, w20, [x19]
LBB0_9:
	mov	w0, #1
LBB0_10:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_NONE,4,2                   ; @DMA_NONE
	.no_dead_strip	_fsl_edma_prep_slave_dma
.subsections_via_symbols
