	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opl3_setup_voice
_opl3_setup_voice:                      ## @opl3_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, %r14d
	movq	_synth_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rdi
	movq	(%rax,%rdi,8), %rax
	movq	(%rax), %r15
	movslq	%edx, %rbx
	shlq	$4, %rbx
	movl	12(%r15,%rbx), %edx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_opl3_set_instr
	movq	_devc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	$0, 16(%rax,%rcx,8)
	movl	8(%r15,%rbx), %edx
	movl	%edx, 8(%rax,%rcx,8)
	movq	(%r15,%rbx), %rdx
	movq	_CTL_MAIN_VOLUME@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rdx,%rsi,4), %esi
	movl	%esi, (%rax,%rcx,8)
	movq	_CTL_PAN@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rdx,%rsi,4), %edx
	addl	%edx, %edx
	addl	$-128, %edx
	movl	%edx, 4(%rax,%rcx,8)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_synth_devs,8,3                 ## @synth_devs
	.comm	_devc,8,3                       ## @devc
	.comm	_CTL_MAIN_VOLUME,8,3            ## @CTL_MAIN_VOLUME
	.comm	_CTL_PAN,8,3                    ## @CTL_PAN
	.no_dead_strip	_opl3_setup_voice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opl3_setup_voice
_opl3_setup_voice:                      ; @opl3_setup_voice
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _synth_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _synth_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldr	x8, [x8]
	add	x20, x8, w2, sxtw #4
	ldr	w2, [x20, #12]
	bl	_opl3_set_instr
Lloh3:
	adrp	x8, _devc@GOTPAGE
Lloh4:
	ldr	x8, [x8, _devc@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	w9, #24
	smaddl	x8, w19, w9, x8
	str	xzr, [x8, #16]
	ldr	w9, [x20, #8]
	str	w9, [x8, #8]
	ldr	x9, [x20]
Lloh6:
	adrp	x10, _CTL_MAIN_VOLUME@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CTL_MAIN_VOLUME@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	w10, [x9, x10, lsl #2]
	str	w10, [x8]
Lloh9:
	adrp	x10, _CTL_PAN@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CTL_PAN@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	lsl	w9, w9, #1
	sub	w9, w9, #128
	str	w9, [x8, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_synth_devs,8,3                 ; @synth_devs
	.comm	_devc,8,3                       ; @devc
	.comm	_CTL_MAIN_VOLUME,8,3            ; @CTL_MAIN_VOLUME
	.comm	_CTL_PAN,8,3                    ; @CTL_PAN
	.no_dead_strip	_opl3_setup_voice
.subsections_via_symbols
