	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_dma_xfer_control       ## -- Begin function flexcop_dma_xfer_control
	.p2align	4, 0x90
_flexcop_dma_xfer_control:              ## @flexcop_dma_xfer_control
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_FC_DMA_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %esi
	jne	LBB0_2
## %bb.1:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_dma1_000@GOTPCREL(%rip), %rax
	movq	_dma1_00c@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	movq	_FC_DMA_2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %esi
	jne	LBB0_6
## %bb.3:
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_dma2_010@GOTPCREL(%rip), %rax
	movq	_dma2_01c@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rax), %esi
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	(%rcx), %ebx
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	*8(%r13)
	movq	%rax, %r12
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	*8(%r13)
	movq	%rax, %r14
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movq	%rax, %r15
	shrq	$32, %r15
	leaq	L_.str.1(%rip), %rdi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_deb_rdump
	leaq	L_.str.1(%rip), %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_deb_rdump
	movq	_FC_DMA_SUBADDR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	andl	%edx, %eax
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	cmovnel	%esi, %ecx
	movq	_FC_DMA_SUBADDR_1@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	cmovnel	%esi, %r15d
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	*(%r13)
	shlq	$32, %r15
	movl	%r14d, %edx
	orq	%r15, %rdx
	movq	%r13, %rdi
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	callq	*(%r13)
	leaq	L_.str.1(%rip), %r15
	movq	%r15, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_deb_rdump
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_deb_rdump
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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_00c,4,2                   ## @dma1_00c
	.comm	_FC_DMA_2,4,2                   ## @FC_DMA_2
	.comm	_dma2_010,4,2                   ## @dma2_010
	.comm	_dma2_01c,4,2                   ## @dma2_01c
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"either transfer DMA1 or DMA2 can be started within one flexcop_dma_xfer_control call."

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"reg: %03x: %x\n"

	.comm	_FC_DMA_SUBADDR_0,4,2           ## @FC_DMA_SUBADDR_0
	.comm	_FC_DMA_SUBADDR_1,4,2           ## @FC_DMA_SUBADDR_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_dma_xfer_control       ; -- Begin function flexcop_dma_xfer_control
	.p2align	2
_flexcop_dma_xfer_control:              ; @flexcop_dma_xfer_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x21, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _FC_DMA_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FC_DMA_1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w1, w8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _dma1_000@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dma1_000@GOTPAGEOFF]
Lloh5:
	adrp	x9, _dma1_00c@GOTPAGE
Lloh6:
	ldr	x9, [x9, _dma1_00c@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh7:
	adrp	x8, _FC_DMA_2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FC_DMA_2@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bics	wzr, w1, w8
	b.ne	LBB0_5
; %bb.3:
Lloh10:
	adrp	x8, _dma2_010@GOTPAGE
Lloh11:
	ldr	x8, [x8, _dma2_010@GOTPAGEOFF]
Lloh12:
	adrp	x9, _dma2_01c@GOTPAGE
Lloh13:
	ldr	x9, [x9, _dma2_01c@GOTPAGEOFF]
LBB0_4:
	ldr	w23, [x8]
	ldr	w22, [x9]
	ldr	x8, [x19, #8]
	mov	x0, x19
	mov	x1, x23
	blr	x8
	mov	x24, x0
	mov	x25, x1
	ldr	x8, [x19, #8]
	mov	x0, x19
	mov	x1, x22
	blr	x8
	mov	x26, x0
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	lsr	x27, x0, #32
Lloh14:
	adrp	x28, l_.str.1@PAGE
Lloh15:
	add	x28, x28, l_.str.1@PAGEOFF
	mov	x0, x28
	mov	x1, x23
	mov	x2, x24
	bl	_deb_rdump
	mov	x0, x28
	mov	x1, x22
	mov	x2, x26
	bl	_deb_rdump
Lloh16:
	adrp	x8, _FC_DMA_SUBADDR_0@GOTPAGE
Lloh17:
	ldr	x8, [x8, _FC_DMA_SUBADDR_0@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w21
	csel	w3, w25, w20, eq
Lloh19:
	adrp	x8, _FC_DMA_SUBADDR_1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FC_DMA_SUBADDR_1@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	tst	w8, w21
	csel	w20, w27, w20, eq
	ldr	x8, [x19]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x24
	blr	x8
	ldr	x8, [x19]
	mov	x2, x26
	bfi	x2, x20, #32, #32
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	and	x3, x9, #0xffffffff
	mov	x0, x19
	mov	x1, x22
	blr	x8
	mov	x0, x28
	mov	x1, x23
	mov	x2, x24
	bl	_deb_rdump
	mov	x0, x28
	mov	x1, x22
	mov	x2, x26
	bl	_deb_rdump
	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, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.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_00c,4,2                   ; @dma1_00c
	.comm	_FC_DMA_2,4,2                   ; @FC_DMA_2
	.comm	_dma2_010,4,2                   ; @dma2_010
	.comm	_dma2_01c,4,2                   ; @dma2_01c
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"either transfer DMA1 or DMA2 can be started within one flexcop_dma_xfer_control call."

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"reg: %03x: %x\n"

	.comm	_FC_DMA_SUBADDR_0,4,2           ; @FC_DMA_SUBADDR_0
	.comm	_FC_DMA_SUBADDR_1,4,2           ; @FC_DMA_SUBADDR_1
.subsections_via_symbols
