	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_voice
_setup_voice:                           ## @setup_voice
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	32(%rdi), %r15
	movq	%r15, %rdi
	movl	$128, %edx
	callq	_EMU8000_DCYSUSV_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_EMU8000_VTFT_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$65535, %edx                    ## imm = 0xFFFF
	callq	_EMU8000_CVCF_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_EMU8000_PTRX_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_EMU8000_CPF_WRITE
	movl	24(%r14), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_EMU8000_IP_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_EMU8000_ENVVAL_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$32639, %edx                    ## imm = 0x7F7F
	callq	_EMU8000_ATKHLD_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$32639, %edx                    ## imm = 0x7F7F
	callq	_EMU8000_DCYSUS_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_EMU8000_ENVVOL_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$32639, %edx                    ## imm = 0x7F7F
	callq	_EMU8000_ATKHLDV_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_EMU8000_PEFE_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_EMU8000_LFO1VAL_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$32768, %edx                    ## imm = 0x8000
	callq	_EMU8000_LFO2VAL_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_EMU8000_FMMOD_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_EMU8000_TREMFRQ_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_EMU8000_FM2FRQ2_WRITE
	movslq	%ebx, %rbx
	movq	(%r14), %rax
	movq	16(%r14), %rcx
	movl	(%rax,%rbx,4), %eax
	shll	$24, %eax
	movl	(%rcx,%rbx,8), %edx
	decl	%edx
	orl	%eax, %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_EMU8000_PSST_WRITE
	movq	16(%r14), %rax
	movl	(%rax,%rbx,8), %eax
	movl	8(%r14), %ecx
	leal	(%rax,%rcx), %edx
	decl	%edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_EMU8000_CSL_WRITE
	movq	16(%r14), %rax
	movl	(%rax,%rbx,8), %edx
	decl	%edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_EMU8000_CCCA_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_EMU8000_00A0_WRITE
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EMU8000_0080_WRITE             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_setup_voice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_voice
_setup_voice:                           ; @setup_voice
	.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	x21, x0
	ldr	x20, [x0, #32]
	mov	x0, x20
	mov	w2, #128
	bl	_EMU8000_DCYSUSV_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #65535
	bl	_EMU8000_VTFT_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #65535
	bl	_EMU8000_CVCF_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_PTRX_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_CPF_WRITE
	ldr	w2, [x21, #24]
	mov	x0, x20
	mov	x1, x19
	bl	_EMU8000_IP_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32768
	bl	_EMU8000_ENVVAL_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32639
	bl	_EMU8000_ATKHLD_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32639
	bl	_EMU8000_DCYSUS_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32768
	bl	_EMU8000_ENVVOL_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32639
	bl	_EMU8000_ATKHLDV_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_PEFE_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32768
	bl	_EMU8000_LFO1VAL_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #32768
	bl	_EMU8000_LFO2VAL_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_FMMOD_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_TREMFRQ_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_FM2FRQ2_WRITE
	ldr	x8, [x21]
	ldr	w8, [x8, w19, sxtw #2]
	ldr	x9, [x21, #16]
	sbfiz	x22, x19, #3, #32
	ldr	w9, [x9, x22]
	sub	w9, w9, #1
	orr	w2, w9, w8, lsl #24
	mov	x0, x20
	mov	x1, x19
	bl	_EMU8000_PSST_WRITE
	ldr	x8, [x21, #16]
	ldr	w8, [x8, x22]
	ldr	w9, [x21, #8]
	add	w8, w8, w9
	sub	w2, w8, #1
	mov	x0, x20
	mov	x1, x19
	bl	_EMU8000_CSL_WRITE
	ldr	x8, [x21, #16]
	ldr	w8, [x8, x22]
	sub	w2, w8, #1
	mov	x0, x20
	mov	x1, x19
	bl	_EMU8000_CCCA_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_EMU8000_00A0_WRITE
	mov	x0, x20
	mov	x1, x19
	mov	w2, #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
	b	_EMU8000_0080_WRITE
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_setup_voice
.subsections_via_symbols
