	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_dma_config             ## -- Begin function flexcop_dma_config
	.p2align	4, 0x90
_flexcop_dma_config:                    ## @flexcop_dma_config
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	$0, -16(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -64(%rbp)
	movl	(%rsi), %eax
	sarl	$2, %eax
	movl	%eax, -72(%rbp)
	movl	4(%rsi), %eax
	sarl	$2, %eax
	movl	%eax, -28(%rbp)
	movl	8(%rsi), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, -56(%rbp)
	movq	_FC_DMA_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %edx
	jne	LBB0_3
## %bb.1:
	movq	_dma1_000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-80(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	*(%rbx)
	movq	_dma1_004@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-40(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-56(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	*(%rbx)
	movq	_dma1_00c@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_FC_DMA_2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %edx
	jne	LBB0_5
## %bb.4:
	movq	_dma2_010@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-80(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	*(%rbx)
	movq	_dma2_014@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-40(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-56(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	*(%rbx)
	movq	_dma2_01c@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	movq	-16(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-32(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	%rbx, %rdi
	callq	*(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$104, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FC_DMA_1,4,2                   ## @FC_DMA_1
	.comm	_dma1_000,4,2                   ## @dma1_000
	.comm	_dma1_004,4,2                   ## @dma1_004
	.comm	_dma1_00c,4,2                   ## @dma1_00c
	.comm	_FC_DMA_2,4,2                   ## @FC_DMA_2
	.comm	_dma2_010,4,2                   ## @dma2_010
	.comm	_dma2_014,4,2                   ## @dma2_014
	.comm	_dma2_01c,4,2                   ## @dma2_01c
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"either DMA1 or DMA2 can be configured within one flexcop_dma_config call."

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_dma_config             ; -- Begin function flexcop_dma_config
	.p2align	2
_flexcop_dma_config:                    ; @flexcop_dma_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldp	w8, w9, [x1]
	asr	w8, w8, #2
	asr	w20, w9, #2
	ldr	w9, [x1, #8]
	add	w10, w9, #3
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w21, w9, #2
Lloh0:
	adrp	x9, _FC_DMA_1@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FC_DMA_1@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bics	wzr, w2, w9
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x19]
Lloh3:
	adrp	x10, _dma1_000@GOTPAGE
Lloh4:
	ldr	x10, [x10, _dma1_000@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x10]
	str	w8, [sp, #16]
	str	xzr, [sp, #24]
	add	x2, sp, #8
	mov	x0, x19
	blr	x9
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _dma1_004@GOTPAGE
Lloh7:
	ldr	x9, [x9, _dma1_004@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	str	w21, [sp, #8]
	str	xzr, [sp, #24]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _dma1_00c@GOTPAGE
Lloh10:
	ldr	x9, [x9, _dma1_00c@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh11:
	adrp	x9, _FC_DMA_2@GOTPAGE
Lloh12:
	ldr	x9, [x9, _FC_DMA_2@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	bics	wzr, w2, w9
	b.ne	LBB0_5
; %bb.3:
	ldr	x9, [x19]
Lloh14:
	adrp	x10, _dma2_010@GOTPAGE
Lloh15:
	ldr	x10, [x10, _dma2_010@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x10]
	str	w8, [sp, #16]
	str	xzr, [sp, #24]
	add	x2, sp, #8
	mov	x0, x19
	blr	x9
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _dma2_014@GOTPAGE
Lloh18:
	ldr	x9, [x9, _dma2_014@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x9]
	str	w21, [sp, #8]
	str	xzr, [sp, #24]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _dma2_01c@GOTPAGE
Lloh21:
	ldr	x9, [x9, _dma2_01c@GOTPAGEOFF]
LBB0_4:
	ldr	w1, [x9]
	str	w20, [sp, #12]
	str	xzr, [sp, #24]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_FC_DMA_1,4,2                   ; @FC_DMA_1
	.comm	_dma1_000,4,2                   ; @dma1_000
	.comm	_dma1_004,4,2                   ; @dma1_004
	.comm	_dma1_00c,4,2                   ; @dma1_00c
	.comm	_FC_DMA_2,4,2                   ; @FC_DMA_2
	.comm	_dma2_010,4,2                   ; @dma2_010
	.comm	_dma2_014,4,2                   ; @dma2_014
	.comm	_dma2_01c,4,2                   ; @dma2_01c
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"either DMA1 or DMA2 can be configured within one flexcop_dma_config call."

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