	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_opl3_drum_switch           ## -- Begin function snd_opl3_drum_switch
	.p2align	4, 0x90
_snd_opl3_drum_switch:                  ## @snd_opl3_drum_switch
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $esi killed $esi def $rsi
	leal	-82(%rsi), %eax
	cmpl	$-47, %eax
	jb	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_OPL3_PERCUSSION_ENABLE@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%eax, %edi
	je	LBB0_9
## %bb.2:
	movq	_snd_opl3_drum_table@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	addl	$-35, %esi
	movzbl	(%rdi,%rsi), %ebx
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.3:
	leal	-128(%rbx), %eax
	cmpb	$4, %al
	ja	LBB0_4
## %bb.5:
	movsbq	%al, %rax
	leaq	l_switch.table.snd_opl3_drum_switch(%rip), %rcx
	movq	(%rcx,%rax,8), %rsi
	jmp	LBB0_6
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	notl	%ebx
	andl	%ebx, %eax
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_4:
	movq	_tomtom@GOTPCREL(%rip), %rsi
LBB0_6:
	movq	%r14, %rdi
	movq	%r8, %rcx
	callq	_snd_opl3_drum_vol_set
	orl	(%r14), %ebx
LBB0_8:
	movl	%ebx, (%r14)
	movq	8(%r14), %rax
	movq	_OPL3_LEFT@GOTPCREL(%rip), %rcx
	movq	_OPL3_REG_PERCUSSION@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movzbl	%bl, %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OPL3_PERCUSSION_ENABLE,4,2     ## @OPL3_PERCUSSION_ENABLE
	.comm	_snd_opl3_drum_table,8,3        ## @snd_opl3_drum_table
	.comm	_bass_op1,4,2                   ## @bass_op1
	.comm	_hihat,4,2                      ## @hihat
	.comm	_snare,4,2                      ## @snare
	.comm	_tomtom,4,2                     ## @tomtom
	.comm	_cymbal,4,2                     ## @cymbal
	.comm	_OPL3_LEFT,4,2                  ## @OPL3_LEFT
	.comm	_OPL3_REG_PERCUSSION,4,2        ## @OPL3_REG_PERCUSSION
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.snd_opl3_drum_switch
l_switch.table.snd_opl3_drum_switch:
	.quad	_tomtom
	.quad	_snare
	.quad	_hihat
	.quad	_cymbal
	.quad	_bass_op1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_opl3_drum_switch           ; -- Begin function snd_opl3_drum_switch
	.p2align	2
_snd_opl3_drum_switch:                  ; @snd_opl3_drum_switch
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _OPL3_PERCUSSION_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OPL3_PERCUSSION_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w9, w9, w8
	sub	w10, w1, #82
	cmn	w10, #47
	ccmp	w9, #0, #4, hs
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x9, _snd_opl3_drum_table@GOTPAGE
Lloh4:
	ldr	x9, [x9, _snd_opl3_drum_table@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	w10, w1, #35
	ldrb	w20, [x9, w10, uxtw]
	cbz	w3, LBB0_5
; %bb.3:
	sxtb	x8, w20
	eor	x8, x8, #0xffffffffffffff80
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.4:
Lloh6:
	adrp	x9, l_switch.table.snd_opl3_drum_switch@PAGE
Lloh7:
	add	x9, x9, l_switch.table.snd_opl3_drum_switch@PAGEOFF
	ldr	x1, [x9, x8, lsl #3]
	b	LBB0_7
LBB0_5:
	bic	w8, w8, w20
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x1, _tomtom@GOTPAGE
Lloh9:
	ldr	x1, [x1, _tomtom@GOTPAGEOFF]
LBB0_7:
	mov	x0, x19
	mov	x3, x4
	bl	_snd_opl3_drum_vol_set
	ldr	w8, [x19]
	orr	w8, w8, w20
LBB0_8:
	str	w8, [x19]
	ldr	x3, [x19, #8]
Lloh10:
	adrp	x9, _OPL3_LEFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _OPL3_LEFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _OPL3_REG_PERCUSSION@GOTPAGE
Lloh14:
	ldr	x10, [x10, _OPL3_REG_PERCUSSION@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w1, w10, w9
	and	w2, w8, #0xff
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_OPL3_PERCUSSION_ENABLE,4,2     ; @OPL3_PERCUSSION_ENABLE
	.comm	_snd_opl3_drum_table,8,3        ; @snd_opl3_drum_table
	.comm	_bass_op1,4,2                   ; @bass_op1
	.comm	_hihat,4,2                      ; @hihat
	.comm	_snare,4,2                      ; @snare
	.comm	_tomtom,4,2                     ; @tomtom
	.comm	_cymbal,4,2                     ; @cymbal
	.comm	_OPL3_LEFT,4,2                  ; @OPL3_LEFT
	.comm	_OPL3_REG_PERCUSSION,4,2        ; @OPL3_REG_PERCUSSION
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.snd_opl3_drum_switch
l_switch.table.snd_opl3_drum_switch:
	.quad	_tomtom
	.quad	_snare
	.quad	_hihat
	.quad	_cymbal
	.quad	_bass_op1

.subsections_via_symbols
