	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_opl3_drum_vol_set
_snd_opl3_drum_vol_set:                 ## @snd_opl3_drum_vol_set
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_snd_opl3_regmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rsi), %r12
	movq	8(%rsi), %rcx
	movq	(%rax,%r12,8), %rax
	movzbl	(%rax,%rcx), %r13d
	movb	16(%rsi), %al
	movb	%al, -41(%rbp)
	leaq	-41(%rbp), %rdi
	movl	%edx, %esi
	movq	%r15, %rdx
	callq	_snd_opl3_calc_volume
	movq	_OPL3_LEFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	movq	_OPL3_REG_KSL_LEVEL@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %esi
	addl	%r13d, %esi
	orl	%eax, %esi
	movzbl	-41(%rbp), %edx
	movq	%r14, %rdi
	callq	*(%r14)
	movq	_OPL3_STEREO_BITS@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	orb	17(%rbx), %al
	movb	%al, -41(%rbp)
	movl	(%r15), %ecx
	cmpl	$42, %ecx
	jg	LBB0_2
## %bb.1:
	movq	_OPL3_VOICE_TO_RIGHT@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_2:
	cmpl	$86, %ecx
	jb	LBB0_5
## %bb.3:
	movq	_OPL3_VOICE_TO_LEFT@GOTPCREL(%rip), %rcx
LBB0_4:
	movb	(%rcx), %cl
	notb	%cl
	andb	%cl, %al
	movb	%al, -41(%rbp)
LBB0_5:
	movq	_OPL3_LEFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movq	_OPL3_REG_FEEDBACK_CONNECTION@GOTPCREL(%rip), %rdx
	movzbl	(%rdx), %edx
	movzbl	%r12b, %esi
	addl	%edx, %esi
	orl	%ecx, %esi
	movzbl	%al, %edx
	movq	%r14, %rdi
	callq	*(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_snd_opl3_regmap,8,3            ## @snd_opl3_regmap
	.comm	_OPL3_LEFT,1,0                  ## @OPL3_LEFT
	.comm	_OPL3_REG_KSL_LEVEL,1,0         ## @OPL3_REG_KSL_LEVEL
	.comm	_OPL3_STEREO_BITS,1,0           ## @OPL3_STEREO_BITS
	.comm	_OPL3_VOICE_TO_RIGHT,1,0        ## @OPL3_VOICE_TO_RIGHT
	.comm	_OPL3_VOICE_TO_LEFT,1,0         ## @OPL3_VOICE_TO_LEFT
	.comm	_OPL3_REG_FEEDBACK_CONNECTION,1,0 ## @OPL3_REG_FEEDBACK_CONNECTION
	.no_dead_strip	_snd_opl3_drum_vol_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_opl3_drum_vol_set
_snd_opl3_drum_vol_set:                 ; @snd_opl3_drum_vol_set
	.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
	mov	x20, x3
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _snd_opl3_regmap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _snd_opl3_regmap@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldp	x22, x9, [x1]
	ldr	x8, [x8, x22, lsl #3]
	ldrb	w24, [x8, x9]
	ldrb	w8, [x1, #16]
	strb	w8, [sp, #15]
	add	x0, sp, #15
	mov	x1, x2
	mov	x2, x3
	bl	_snd_opl3_calc_volume
Lloh3:
	adrp	x23, _OPL3_LEFT@GOTPAGE
Lloh4:
	ldr	x23, [x23, _OPL3_LEFT@GOTPAGEOFF]
Lloh5:
	adrp	x8, _OPL3_REG_KSL_LEVEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OPL3_REG_KSL_LEVEL@GOTPAGEOFF]
	ldrb	w9, [x23]
	ldrb	w8, [x8]
	add	w8, w8, w24
	orr	w1, w8, w9
	ldr	x8, [x19]
	ldrb	w2, [sp, #15]
	mov	x0, x19
	blr	x8
Lloh7:
	adrp	x8, _OPL3_STEREO_BITS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _OPL3_STEREO_BITS@GOTPAGEOFF]
	ldrb	w9, [x21, #17]
	ldrb	w8, [x8]
	orr	w8, w8, w9
	strb	w8, [sp, #15]
	ldr	w9, [x20]
	cmp	w9, #42
	b.gt	LBB0_2
; %bb.1:
Lloh9:
	adrp	x9, _OPL3_VOICE_TO_RIGHT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _OPL3_VOICE_TO_RIGHT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	cmp	w9, #86
	b.lo	LBB0_5
; %bb.3:
Lloh11:
	adrp	x9, _OPL3_VOICE_TO_LEFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _OPL3_VOICE_TO_LEFT@GOTPAGEOFF]
LBB0_4:
	ldrb	w9, [x9]
	bic	w8, w8, w9
	strb	w8, [sp, #15]
LBB0_5:
	ldrb	w9, [x23]
Lloh13:
	adrp	x10, _OPL3_REG_FEEDBACK_CONNECTION@GOTPAGE
Lloh14:
	ldr	x10, [x10, _OPL3_REG_FEEDBACK_CONNECTION@GOTPAGEOFF]
	ldrb	w10, [x10]
	add	w10, w10, w22, uxtb
	orr	w1, w10, w9
	ldr	x9, [x19]
	and	w2, w8, #0xff
	mov	x0, x19
	blr	x9
	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 AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_snd_opl3_regmap,8,3            ; @snd_opl3_regmap
	.comm	_OPL3_LEFT,1,0                  ; @OPL3_LEFT
	.comm	_OPL3_REG_KSL_LEVEL,1,0         ; @OPL3_REG_KSL_LEVEL
	.comm	_OPL3_STEREO_BITS,1,0           ; @OPL3_STEREO_BITS
	.comm	_OPL3_VOICE_TO_RIGHT,1,0        ; @OPL3_VOICE_TO_RIGHT
	.comm	_OPL3_VOICE_TO_LEFT,1,0         ; @OPL3_VOICE_TO_LEFT
	.comm	_OPL3_REG_FEEDBACK_CONNECTION,1,0 ; @OPL3_REG_FEEDBACK_CONNECTION
	.no_dead_strip	_snd_opl3_drum_vol_set
.subsections_via_symbols
