	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_voice_volume
_set_voice_volume:                      ## @set_voice_volume
	.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
	testl	%edi, %edi
	js	LBB0_17
## %bb.1:
	movq	_devc@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpl	%edi, (%rcx)
	jle	LBB0_17
## %bb.2:
	movl	%edx, %r14d
	movl	%esi, %ebx
	movl	%edi, %edx
	movq	32(%rcx), %rax
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	24(%rcx), %rax
LBB0_4:
	cmpq	$0, (%rax)
	js	LBB0_17
## %bb.5:
	movq	16(%rcx), %rsi
	movl	(%rsi,%rdx,4), %esi
	testl	%esi, %esi
	je	LBB0_17
## %bb.6:
	movq	8(%rcx), %rcx
	movq	_pv_map@GOTPCREL(%rip), %rdi
	movq	(%rcx,%rdx,8), %r15
	movq	(%rdi), %r12
	shlq	$4, %r15
	leaq	(%r12,%r15), %r13
	cmpl	$2, %esi
	jne	LBB0_11
## %bb.7:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rax
	movb	2(%rax), %r13b
	movb	%r13b, -42(%rbp)
	movb	3(%rax), %cl
	movb	%cl, -41(%rbp)
	testb	$1, 10(%rax)
	jne	LBB0_8
## %bb.9:
	leaq	-41(%rbp), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_calc_vol
	jmp	LBB0_10
LBB0_11:
	movq	8(%rax), %rax
	movb	2(%rax), %cl
	movb	%cl, -42(%rbp)
	movb	3(%rax), %cl
	movb	%cl, -41(%rbp)
	movq	_OFFS_4OP@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movb	2(%rcx,%rax), %dl
	movb	%dl, -44(%rbp)
	movb	3(%rcx,%rax), %dl
	movb	%dl, -43(%rbp)
	movzbl	10(%rax), %edx
	andl	$1, %edx
	movzbl	10(%rcx,%rax), %eax
	andl	$1, %eax
	leal	(%rax,%rdx,2), %eax
	leaq	-41(%rbp), %rdi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	leaq	-42(%rbp), %rdi
	jmp	LBB0_14
LBB0_8:
	leaq	-42(%rbp), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_calc_vol
	leaq	-41(%rbp), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_calc_vol
	movb	-42(%rbp), %r13b
LBB0_10:
	movl	8(%r12,%r15), %edi
	movq	_KSL_LEVEL@GOTPCREL(%rip), %r14
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movzbl	%r13b, %edx
	callq	_opl3_command
	movl	8(%r12,%r15), %edi
	movq	(%rbx), %rax
	movq	8(%rax), %rsi
	addq	(%r14), %rsi
	movzbl	-41(%rbp), %edx
	jmp	LBB0_16
LBB0_13:
	leaq	-42(%rbp), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_calc_vol
	leaq	-44(%rbp), %rdi
LBB0_14:
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_calc_vol
LBB0_15:
	leaq	-43(%rbp), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_calc_vol
	movl	8(%r12,%r15), %edi
	movq	_KSL_LEVEL@GOTPCREL(%rip), %rbx
	movq	(%r13), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movzbl	-42(%rbp), %edx
	callq	_opl3_command
	movl	8(%r12,%r15), %edi
	movq	(%r13), %rax
	movq	8(%rax), %rsi
	addq	(%rbx), %rsi
	movzbl	-41(%rbp), %edx
	callq	_opl3_command
	movl	8(%r12,%r15), %edi
	movq	(%r13), %rax
	movq	16(%rax), %rsi
	addq	(%rbx), %rsi
	movzbl	-44(%rbp), %edx
	callq	_opl3_command
	movl	8(%r12,%r15), %edi
	movq	(%r13), %rax
	movq	24(%rax), %rsi
	addq	(%rbx), %rsi
	movzbl	-43(%rbp), %edx
LBB0_16:
	callq	_opl3_command
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_14
	.long	L0_0_set_12
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_devc,8,3                       ## @devc
	.comm	_pv_map,8,3                     ## @pv_map
	.comm	_KSL_LEVEL,8,3                  ## @KSL_LEVEL
	.comm	_OFFS_4OP,4,2                   ## @OFFS_4OP
	.no_dead_strip	_set_voice_volume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_voice_volume
_set_voice_volume:                      ; @set_voice_volume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	tbnz	w0, #31, LBB0_17
; %bb.1:
Lloh0:
	adrp	x8, _devc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _devc@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x8]
	cmp	w9, w0
	b.le	LBB0_17
; %bb.2:
	mov	x19, x2
	mov	x20, x1
	mov	w11, w0
	lsl	x10, x11, #3
	ldr	x9, [x8, #32]
	ldr	x9, [x9, x10]
	cbnz	x9, LBB0_4
; %bb.3:
	ldr	x9, [x8, #24]
LBB0_4:
	ldr	x12, [x9]
	tbnz	x12, #63, LBB0_17
; %bb.5:
	ldr	x12, [x8, #16]
	ldr	w11, [x12, x11, lsl #2]
	cbz	w11, LBB0_17
; %bb.6:
Lloh3:
	adrp	x12, _pv_map@GOTPAGE
Lloh4:
	ldr	x12, [x12, _pv_map@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh5:
	ldr	x23, [x12]
	ldr	x24, [x8, x10]
	add	x22, x23, x24, lsl #4
	cmp	w11, #2
	b.ne	LBB0_9
; %bb.7:
	ldr	x8, [x9, #8]
	ldrb	w21, [x8, #2]
	strb	w21, [sp, #15]
	ldrb	w9, [x8, #3]
	strb	w9, [sp, #14]
	ldrb	w8, [x8, #10]
	tbnz	w8, #0, LBB0_11
; %bb.8:
	add	x0, sp, #14
	mov	x1, x20
	mov	x2, x19
	bl	_calc_vol
	b	LBB0_12
LBB0_9:
	ldr	x8, [x9, #8]
	ldrb	w9, [x8, #2]
	strb	w9, [sp, #15]
	ldrb	w9, [x8, #3]
Lloh6:
	adrp	x10, _OFFS_4OP@GOTPAGE
Lloh7:
	ldr	x10, [x10, _OFFS_4OP@GOTPAGEOFF]
	strb	w9, [sp, #14]
Lloh8:
	ldrsw	x9, [x10]
	add	x9, x9, x8
	ldrb	w10, [x9, #2]
	strb	w10, [sp, #13]
	ldrb	w10, [x9, #3]
	strb	w10, [sp, #12]
	ldrb	w10, [x8, #10]
	ldrb	w8, [x9, #10]
	and	w8, w8, #0x1
	bfi	w8, w10, #1, #1
	add	x0, sp, #14
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
	add	x0, sp, #15
	b	LBB0_14
LBB0_11:
	add	x0, sp, #15
	mov	x1, x20
	mov	x2, x19
	bl	_calc_vol
	add	x0, sp, #14
	mov	x1, x20
	mov	x2, x19
	bl	_calc_vol
	ldrb	w21, [sp, #15]
LBB0_12:
	add	x19, x23, x24, lsl #4
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x20, _KSL_LEVEL@GOTPAGE
Lloh12:
	ldr	x20, [x20, _KSL_LEVEL@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x2, x21
	bl	_opl3_command
	ldr	w0, [x19, #8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	x9, [x9, #8]
	add	x1, x9, x8
	ldrb	w2, [sp, #14]
	b	LBB0_16
LBB0_13:
	add	x0, sp, #15
	mov	x1, x20
	mov	x2, x19
	bl	_calc_vol
	add	x0, sp, #13
LBB0_14:
	mov	x1, x20
	mov	x2, x19
	bl	_calc_vol
LBB0_15:
	add	x0, sp, #12
	mov	x1, x20
	mov	x2, x19
	bl	_calc_vol
	add	x19, x23, x24, lsl #4
Lloh13:
	adrp	x20, _KSL_LEVEL@GOTPAGE
Lloh14:
	ldr	x20, [x20, _KSL_LEVEL@GOTPAGEOFF]
	ldr	w0, [x19, #8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	x9, [x9]
	add	x1, x9, x8
	ldrb	w2, [sp, #15]
	bl	_opl3_command
	ldr	w0, [x19, #8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	x9, [x9, #8]
	add	x1, x9, x8
	ldrb	w2, [sp, #14]
	bl	_opl3_command
	ldr	w0, [x19, #8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	x9, [x9, #16]
	add	x1, x9, x8
	ldrb	w2, [sp, #13]
	bl	_opl3_command
	ldr	w0, [x19, #8]
	ldr	x8, [x20]
	ldr	x9, [x22]
	ldr	x9, [x9, #24]
	add	x1, x9, x8
	ldrb	w2, [sp, #12]
LBB0_16:
	bl	_opl3_command
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_15-LBB0_10)>>2
	.byte	(LBB0_14-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_13-LBB0_10)>>2
                                        ; -- End function
	.comm	_devc,8,3                       ; @devc
	.comm	_pv_map,8,3                     ; @pv_map
	.comm	_KSL_LEVEL,8,3                  ; @KSL_LEVEL
	.comm	_OFFS_4OP,4,2                   ; @OFFS_4OP
	.no_dead_strip	_set_voice_volume
.subsections_via_symbols
