	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_opl3_play_note
_snd_opl3_play_note:                    ## @snd_opl3_play_note
	.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	(%rdi), %rax
	movq	_SNDRV_DM_FM_MODE_OPL3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movb	(%rsi), %al
	movq	_MAX_OPL3_VOICES@GOTPCREL(%rip), %rdx
	movq	_MAX_OPL2_VOICES@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movzbl	(%rdx), %edx
	cmovnel	%ecx, %edx
	cmpb	%al, %dl
	jbe	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	cmpb	%cl, %al
	movzbl	%cl, %ecx
	cmovbl	%r15d, %ecx
	movq	_OPL3_RIGHT@GOTPCREL(%rip), %rdx
	cmovbq	_OPL3_LEFT@GOTPCREL(%rip), %rdx
	subb	%cl, %al
	movzwl	(%rdx), %r12d
	movzbl	4(%rsi), %edx
	movq	_OPL3_REG_FNUM_LOW@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movzbl	%al, %r13d
	addl	%r13d, %ecx
	orl	%r12d, %ecx
	movzwl	%cx, %esi
	callq	*8(%rdi)
	cmpq	$0, 16(%rbx)
	movq	_OPL3_KEYON_BIT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	cmovel	%r15d, %eax
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	shll	$2, %edx
	movq	_OPL3_BLOCKNUM_MASK@GOTPCREL(%rip), %rsi
	andl	(%rsi), %edx
	shrl	$8, %ecx
	movq	_OPL3_FNUM_HIGH_MASK@GOTPCREL(%rip), %rsi
	movzbl	(%rsi), %edi
	andl	%ecx, %edi
	orl	%edx, %edi
	orl	%eax, %edi
	movq	_OPL3_REG_KEYON_BLOCK@GOTPCREL(%rip), %rax
	movzbl	(%rax), %eax
	addl	%r13d, %eax
	orl	%r12d, %eax
	movzwl	%ax, %esi
	movzbl	%dil, %edx
	movq	%r14, %rdi
	callq	*8(%r14)
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_DM_FM_MODE_OPL3,8,3      ## @SNDRV_DM_FM_MODE_OPL3
	.comm	_MAX_OPL3_VOICES,1,0            ## @MAX_OPL3_VOICES
	.comm	_MAX_OPL2_VOICES,1,0            ## @MAX_OPL2_VOICES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OPL3_LEFT,2,1                  ## @OPL3_LEFT
	.comm	_OPL3_RIGHT,2,1                 ## @OPL3_RIGHT
	.comm	_OPL3_REG_FNUM_LOW,1,0          ## @OPL3_REG_FNUM_LOW
	.comm	_OPL3_KEYON_BIT,1,0             ## @OPL3_KEYON_BIT
	.comm	_OPL3_BLOCKNUM_MASK,4,2         ## @OPL3_BLOCKNUM_MASK
	.comm	_OPL3_FNUM_HIGH_MASK,1,0        ## @OPL3_FNUM_HIGH_MASK
	.comm	_OPL3_REG_KEYON_BLOCK,1,0       ## @OPL3_REG_KEYON_BLOCK
	.no_dead_strip	_snd_opl3_play_note
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_opl3_play_note
_snd_opl3_play_note:                    ; @snd_opl3_play_note
	.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
	ldrb	w8, [x1]
	ldr	x10, [x0]
Lloh0:
	adrp	x9, _SNDRV_DM_FM_MODE_OPL3@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SNDRV_DM_FM_MODE_OPL3@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x9]
Lloh3:
	adrp	x9, _MAX_OPL3_VOICES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_OPL3_VOICES@GOTPAGEOFF]
	ldrb	w12, [x9]
Lloh5:
	adrp	x9, _MAX_OPL2_VOICES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_OPL2_VOICES@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	x10, x11
	csel	w10, w12, w9, eq
	cmp	w8, w10, uxtb
	b.hs	LBB0_2
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	cmp	w8, w9
	csel	w9, wzr, w9, lo
Lloh7:
	adrp	x10, _OPL3_LEFT@GOTPAGE
Lloh8:
	ldr	x10, [x10, _OPL3_LEFT@GOTPAGEOFF]
Lloh9:
	adrp	x11, _OPL3_RIGHT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _OPL3_RIGHT@GOTPAGEOFF]
	csel	x10, x10, x11, lo
	sub	w8, w8, w9
	ldrh	w21, [x10]
	ldrb	w2, [x1, #4]
Lloh11:
	adrp	x9, _OPL3_REG_FNUM_LOW@GOTPAGE
Lloh12:
	ldr	x9, [x9, _OPL3_REG_FNUM_LOW@GOTPAGEOFF]
	ldrb	w9, [x9]
	and	w22, w8, #0xff
	add	w8, w9, w22
	orr	w8, w21, w8
	ldr	x9, [x0, #8]
	and	w1, w8, #0xffff
	blr	x9
Lloh13:
	adrp	x8, _OPL3_KEYON_BIT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _OPL3_KEYON_BIT@GOTPAGEOFF]
	ldr	x9, [x20, #16]
	ldrb	w8, [x8]
	cmp	x9, #0
	csel	w8, wzr, w8, eq
Lloh15:
	adrp	x9, _OPL3_BLOCKNUM_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _OPL3_BLOCKNUM_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	ldp	w11, w10, [x20, #4]
	and	w9, w9, w10, lsl #2
Lloh18:
	adrp	x10, _OPL3_FNUM_HIGH_MASK@GOTPAGE
Lloh19:
	ldr	x10, [x10, _OPL3_FNUM_HIGH_MASK@GOTPAGEOFF]
	ldrb	w10, [x10]
	and	w10, w10, w11, lsr #8
	orr	w8, w9, w8
	orr	w8, w8, w10
Lloh20:
	adrp	x9, _OPL3_REG_KEYON_BLOCK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _OPL3_REG_KEYON_BLOCK@GOTPAGEOFF]
	ldrb	w9, [x9]
	add	w9, w9, w22
	orr	w9, w21, w9
	ldr	x10, [x19, #8]
	and	w1, w9, #0xffff
	and	w2, w8, #0xff
	mov	x0, x19
	blr	x10
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_DM_FM_MODE_OPL3,8,3      ; @SNDRV_DM_FM_MODE_OPL3
	.comm	_MAX_OPL3_VOICES,1,0            ; @MAX_OPL3_VOICES
	.comm	_MAX_OPL2_VOICES,1,0            ; @MAX_OPL2_VOICES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OPL3_LEFT,2,1                  ; @OPL3_LEFT
	.comm	_OPL3_RIGHT,2,1                 ; @OPL3_RIGHT
	.comm	_OPL3_REG_FNUM_LOW,1,0          ; @OPL3_REG_FNUM_LOW
	.comm	_OPL3_KEYON_BIT,1,0             ; @OPL3_KEYON_BIT
	.comm	_OPL3_BLOCKNUM_MASK,4,2         ; @OPL3_BLOCKNUM_MASK
	.comm	_OPL3_FNUM_HIGH_MASK,1,0        ; @OPL3_FNUM_HIGH_MASK
	.comm	_OPL3_REG_KEYON_BLOCK,1,0       ; @OPL3_REG_KEYON_BLOCK
	.no_dead_strip	_snd_opl3_play_note
.subsections_via_symbols
