	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_config_channel
_sdma_config_channel:                   ## @sdma_config_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_to_sdma_chan
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_sdma_disable_channel
	movq	48(%rbx), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	$0, 40(%rbx)
	movq	$0, 24(%rbx)
	movl	(%rbx), %eax
	movq	%rbx, %rdi
	cmpl	$128, %eax
	je	LBB0_3
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_4
## %bb.2:
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$1, %ecx
	jmp	LBB0_6
LBB0_3:
	xorl	%esi, %esi
	jmp	LBB0_5
LBB0_4:
	movl	$1, %esi
LBB0_5:
	movl	$1, %edx
	xorl	%ecx, %ecx
LBB0_6:
	callq	_sdma_config_ownership
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_sdma_get_pc
	movslq	(%rbx), %rax
	movl	%eax, %ecx
	andl	$-2, %ecx
	cmpl	$128, %ecx
	jne	LBB0_7
## %bb.13:
	movq	$0, 8(%rbx)
	jmp	LBB0_14
LBB0_7:
	cmpq	$0, 64(%rbx)
	je	LBB0_11
## %bb.8:
	movq	_IMX_DMATYPE_ASRC_SP@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	_IMX_DMATYPE_ASRC@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_12
LBB0_10:
	movq	%rbx, %rdi
	callq	_sdma_set_watermarklevel_for_p2p
	jmp	LBB0_12
LBB0_11:
	movl	56(%rbx), %edi
	movq	48(%rbx), %rsi
	callq	___set_bit
LBB0_12:
	movq	16(%rbx), %rax
	movq	32(%rbx), %rcx
	movq	%rcx, 40(%rbx)
	movq	%rax, 24(%rbx)
LBB0_14:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sdma_load_context              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IMX_DMATYPE_ASRC_SP,8,3        ## @IMX_DMATYPE_ASRC_SP
	.comm	_IMX_DMATYPE_ASRC,8,3           ## @IMX_DMATYPE_ASRC
	.no_dead_strip	_sdma_config_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_config_channel
_sdma_config_channel:                   ; @sdma_config_channel
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_to_sdma_chan
	mov	x19, x0
	mov	x0, x20
	bl	_sdma_disable_channel
	ldr	x8, [x19, #48]
	stp	xzr, xzr, [x8]
	str	xzr, [x19, #40]
	str	xzr, [x19, #24]
	ldr	w8, [x19]
	mov	x0, x19
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_4
; %bb.2:
	mov	w1, #0
	mov	w2, #1
	mov	w3, #1
	b	LBB0_6
LBB0_3:
	mov	w1, #0
	b	LBB0_5
LBB0_4:
	mov	w1, #1
LBB0_5:
	mov	w2, #1
	mov	w3, #0
LBB0_6:
	bl	_sdma_config_ownership
	ldr	w1, [x19]
	mov	x0, x19
	bl	_sdma_get_pc
	ldrsw	x8, [x19]
	and	w9, w8, #0xfffffffe
	cmp	w9, #128
	b.ne	LBB0_8
; %bb.7:
	str	xzr, [x19, #8]
	b	LBB0_13
LBB0_8:
	ldr	x9, [x19, #64]
	cbz	x9, LBB0_11
; %bb.9:
Lloh0:
	adrp	x9, _IMX_DMATYPE_ASRC_SP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IMX_DMATYPE_ASRC_SP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _IMX_DMATYPE_ASRC@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IMX_DMATYPE_ASRC@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x8
	ccmp	x10, x8, #4, ne
	b.ne	LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_sdma_set_watermarklevel_for_p2p
	b	LBB0_12
LBB0_11:
	ldr	w0, [x19, #56]
	ldr	x1, [x19, #48]
	bl	___set_bit
LBB0_12:
	ldr	x8, [x19, #32]
	str	x8, [x19, #40]
	ldr	x8, [x19, #16]
	str	x8, [x19, #24]
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sdma_load_context
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IMX_DMATYPE_ASRC_SP,8,3        ; @IMX_DMATYPE_ASRC_SP
	.comm	_IMX_DMATYPE_ASRC,8,3           ; @IMX_DMATYPE_ASRC
	.no_dead_strip	_sdma_config_channel
.subsections_via_symbols
