	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_config_memcpy
_d40_config_memcpy:                     ## @d40_config_memcpy
	.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
	movq	%rdi, %r14
	movq	32(%rdi), %rax
	movl	(%rax), %ebx
	movq	_DMA_MEMCPY@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_DMA_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_6
LBB0_2:
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	_DMA_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_dma40_memcpy_conf_phy@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_D40_SREG_CFG_TIM_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, (%r14)
	movq	_D40_SREG_CFG_EIM_POS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_BIT
	orl	%eax, 4(%r14)
	movl	(%rbx), %edi
	callq	_BIT
	orl	%eax, (%r14)
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_chan_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_6:
	leaq	8(%r14), %rdi
	movq	_dma40_memcpy_conf_log@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_dma40_memcpy_channels@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%r14), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 8(%r14)
	leaq	16(%r14), %rsi
	addq	$12, %r14
	movq	%r14, %rdx
	callq	_d40_log_cfg
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MEMCPY,4,2                 ## @DMA_MEMCPY
	.comm	_DMA_SLAVE,4,2                  ## @DMA_SLAVE
	.comm	_dma40_memcpy_conf_log,4,2      ## @dma40_memcpy_conf_log
	.comm	_dma40_memcpy_channels,8,3      ## @dma40_memcpy_channels
	.comm	_dma40_memcpy_conf_phy,4,2      ## @dma40_memcpy_conf_phy
	.comm	_D40_SREG_CFG_TIM_POS,4,2       ## @D40_SREG_CFG_TIM_POS
	.comm	_D40_SREG_CFG_EIM_POS,4,2       ## @D40_SREG_CFG_EIM_POS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No memcpy\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_config_memcpy
_d40_config_memcpy:                     ; @d40_config_memcpy
	.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	x8, [x0, #32]
	ldr	w20, [x8]
Lloh0:
	adrp	x22, _DMA_MEMCPY@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DMA_MEMCPY@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x20
	bl	_dma_has_cap
Lloh2:
	adrp	x21, _DMA_SLAVE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _DMA_SLAVE@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	mov	x1, x20
	bl	_dma_has_cap
	cbz	x0, LBB0_6
LBB0_2:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_dma_has_cap
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x21]
	mov	x1, x20
	bl	_dma_has_cap
	cbz	x0, LBB0_5
; %bb.4:
Lloh4:
	adrp	x8, _dma40_memcpy_conf_phy@GOTPAGE
Lloh5:
	ldr	x8, [x8, _dma40_memcpy_conf_phy@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x19, #8]
Lloh7:
	adrp	x8, _D40_SREG_CFG_TIM_POS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _D40_SREG_CFG_TIM_POS@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_BIT
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
Lloh10:
	adrp	x20, _D40_SREG_CFG_EIM_POS@GOTPAGE
Lloh11:
	ldr	x20, [x20, _D40_SREG_CFG_EIM_POS@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_BIT
	ldr	w8, [x19, #4]
	orr	w8, w8, w0
	str	w8, [x19, #4]
	ldr	w0, [x20]
	bl	_BIT
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_7
LBB0_5:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_chan_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
Lloh17:
	adrp	x8, _dma40_memcpy_conf_log@GOTPAGE
Lloh18:
	ldr	x8, [x8, _dma40_memcpy_conf_log@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #8]!
Lloh20:
	adrp	x8, _dma40_memcpy_channels@GOTPAGE
Lloh21:
	ldr	x8, [x8, _dma40_memcpy_channels@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x19]
	add	x1, x19, #8
	add	x2, x19, #4
	mov	x0, x19
	bl	_d40_log_cfg
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MEMCPY,4,2                 ; @DMA_MEMCPY
	.comm	_DMA_SLAVE,4,2                  ; @DMA_SLAVE
	.comm	_dma40_memcpy_conf_log,4,2      ; @dma40_memcpy_conf_log
	.comm	_dma40_memcpy_channels,8,3      ; @dma40_memcpy_channels
	.comm	_dma40_memcpy_conf_phy,4,2      ; @dma40_memcpy_conf_phy
	.comm	_D40_SREG_CFG_TIM_POS,4,2       ; @D40_SREG_CFG_TIM_POS
	.comm	_D40_SREG_CFG_EIM_POS,4,2       ; @D40_SREG_CFG_EIM_POS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No memcpy\n"

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