	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flexcop_pci_stream_control
_flexcop_pci_stream_control:            ## @flexcop_pci_stream_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %r14
	movq	16(%r14), %rsi
	movq	_FC_DMA_1@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_flexcop_dma_config
	movq	16(%r14), %rsi
	addq	$4, %rsi
	movq	_FC_DMA_2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_flexcop_dma_config
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_flexcop_dma_config_timer
	movl	(%r15), %esi
	movq	_FC_DMA_SUBADDR_0@GOTPCREL(%rip), %rax
	movq	_FC_DMA_SUBADDR_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_flexcop_dma_xfer_control
	leaq	L_.str(%rip), %rdi
	callq	_deb_irq
	movq	$0, 8(%r14)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_flexcop_dma_control_timer_irq
	leaq	L_.str.1(%rip), %rdi
	callq	_deb_irq
	movl	(%r14), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_3
LBB0_2:
	movq	_FC_DMA_1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_flexcop_dma_control_timer_irq
	leaq	L_.str.2(%rip), %rdi
	callq	_deb_irq
	movl	(%r14), %esi
	movq	_FC_DMA_SUBADDR_0@GOTPCREL(%rip), %rax
	movq	_FC_DMA_SUBADDR_1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_flexcop_dma_xfer_control
	leaq	L_.str.3(%rip), %rdi
	callq	_deb_irq
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FC_DMA_1,4,2                   ## @FC_DMA_1
	.comm	_FC_DMA_2,4,2                   ## @FC_DMA_2
	.comm	_FC_DMA_SUBADDR_0,4,2           ## @FC_DMA_SUBADDR_0
	.comm	_FC_DMA_SUBADDR_1,4,2           ## @FC_DMA_SUBADDR_1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA xfer enabled\n"

L_.str.1:                               ## @.str.1
	.asciz	"IRQ enabled\n"

L_.str.2:                               ## @.str.2
	.asciz	"IRQ disabled\n"

L_.str.3:                               ## @.str.3
	.asciz	"DMA xfer disabled\n"

	.no_dead_strip	_flexcop_pci_stream_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flexcop_pci_stream_control
_flexcop_pci_stream_control:            ; @flexcop_pci_stream_control
	.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
	cbz	w1, LBB0_2
; %bb.1:
	ldr	x20, [x19]
	ldr	x1, [x20, #16]
Lloh0:
	adrp	x21, _FC_DMA_1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FC_DMA_1@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	bl	_flexcop_dma_config
	ldr	x8, [x20, #16]
	add	x1, x8, #4
Lloh2:
	adrp	x8, _FC_DMA_2@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FC_DMA_2@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_flexcop_dma_config
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_flexcop_dma_config_timer
Lloh5:
	adrp	x8, _FC_DMA_SUBADDR_0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FC_DMA_SUBADDR_0@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _FC_DMA_SUBADDR_1@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FC_DMA_SUBADDR_1@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #1
	bl	_flexcop_dma_xfer_control
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_irq
	str	xzr, [x20, #8]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_flexcop_dma_control_timer_irq
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_deb_irq
	ldr	w8, [x20]
	str	w8, [x20, #4]
	b	LBB0_3
LBB0_2:
Lloh15:
	adrp	x20, _FC_DMA_1@GOTPAGE
Lloh16:
	ldr	x20, [x20, _FC_DMA_1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_flexcop_dma_control_timer_irq
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_deb_irq
Lloh19:
	adrp	x8, _FC_DMA_SUBADDR_0@GOTPAGE
Lloh20:
	ldr	x8, [x8, _FC_DMA_SUBADDR_0@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _FC_DMA_SUBADDR_1@GOTPAGE
Lloh23:
	ldr	x9, [x9, _FC_DMA_SUBADDR_1@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w3, #0
	bl	_flexcop_dma_xfer_control
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_deb_irq
LBB0_3:
	mov	w0, #0
	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 AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_FC_DMA_1,4,2                   ; @FC_DMA_1
	.comm	_FC_DMA_2,4,2                   ; @FC_DMA_2
	.comm	_FC_DMA_SUBADDR_0,4,2           ; @FC_DMA_SUBADDR_0
	.comm	_FC_DMA_SUBADDR_1,4,2           ; @FC_DMA_SUBADDR_1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA xfer enabled\n"

l_.str.1:                               ; @.str.1
	.asciz	"IRQ enabled\n"

l_.str.2:                               ; @.str.2
	.asciz	"IRQ disabled\n"

l_.str.3:                               ; @.str.3
	.asciz	"DMA xfer disabled\n"

	.no_dead_strip	_flexcop_pci_stream_control
.subsections_via_symbols
