	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_emu8000_dma_chan           ## -- Begin function snd_emu8000_dma_chan
	.p2align	4, 0x90
_snd_emu8000_dma_chan:                  ## @snd_emu8000_dma_chan
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	_EMU8000_RAM_RIGHT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	testl	%edx, (%rax)
	setne	%al
	movq	_EMU8000_RAM_MODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_EMU8000_RAM_CLOSE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jne	LBB0_1
## %bb.5:
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_EMU8000_CCCA_WRITE
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$32895, %edx                    ## imm = 0x807F
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EMU8000_DCYSUSV_WRITE          ## TAILCALL
LBB0_1:
	movb	%al, %r14b
	shll	$24, %r14d
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$128, %edx
	callq	_EMU8000_DCYSUSV_WRITE
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_EMU8000_VTFT_WRITE
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_EMU8000_CVCF_WRITE
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$1073741824, %edx               ## imm = 0x40000000
	callq	_EMU8000_PTRX_WRITE
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	$1073741824, %edx               ## imm = 0x40000000
	callq	_EMU8000_CPF_WRITE
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_EMU8000_PSST_WRITE
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_EMU8000_CSL_WRITE
	movq	_EMU8000_RAM_WRITE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.2:
	orl	$100663296, %r14d               ## imm = 0x6000000
	jmp	LBB0_3
LBB0_4:
	orl	$67108864, %r14d                ## imm = 0x4000000
LBB0_3:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EMU8000_CCCA_WRITE             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EMU8000_RAM_RIGHT,4,2          ## @EMU8000_RAM_RIGHT
	.comm	_EMU8000_RAM_MODE_MASK,4,2      ## @EMU8000_RAM_MODE_MASK
	.comm	_EMU8000_RAM_CLOSE,4,2          ## @EMU8000_RAM_CLOSE
	.comm	_EMU8000_RAM_WRITE,4,2          ## @EMU8000_RAM_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_emu8000_dma_chan           ; -- Begin function snd_emu8000_dma_chan
	.p2align	2
_snd_emu8000_dma_chan:                  ; @snd_emu8000_dma_chan
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _EMU8000_RAM_RIGHT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMU8000_RAM_RIGHT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	cset	w8, ne
Lloh3:
	adrp	x9, _EMU8000_RAM_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EMU8000_RAM_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w21, w9, w2
Lloh6:
	adrp	x9, _EMU8000_RAM_CLOSE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EMU8000_RAM_CLOSE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w21, w9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_CCCA_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32895
	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
	b	_EMU8000_DCYSUSV_WRITE
LBB0_2:
	lsl	w22, w8, #24
	mov	x0, x20
	mov	x1, x19
	mov	w2, #128
	bl	_EMU8000_DCYSUSV_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_VTFT_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_CVCF_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1073741824
	bl	_EMU8000_PTRX_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1073741824
	bl	_EMU8000_CPF_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_PSST_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_CSL_WRITE
Lloh9:
	adrp	x8, _EMU8000_RAM_WRITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EMU8000_RAM_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_4
; %bb.3:
	orr	w2, w22, #0x6000000
	b	LBB0_5
LBB0_4:
	orr	w2, w22, #0x4000000
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	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
	b	_EMU8000_CCCA_WRITE
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EMU8000_RAM_RIGHT,4,2          ; @EMU8000_RAM_RIGHT
	.comm	_EMU8000_RAM_MODE_MASK,4,2      ; @EMU8000_RAM_MODE_MASK
	.comm	_EMU8000_RAM_CLOSE,4,2          ; @EMU8000_RAM_CLOSE
	.comm	_EMU8000_RAM_WRITE,4,2          ; @EMU8000_RAM_WRITE
.subsections_via_symbols
