	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_opl3_set_mode
_snd_opl3_set_mode:                     ## @snd_opl3_set_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_SNDRV_DM_FM_MODE_OPL3@GOTPCREL(%rip), %rdx
	movq	(%rdi), %rax
	movq	_OPL3_HW_OPL3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	%esi, (%rdx)
	jne	LBB0_3
## %bb.1:
	cmpq	%rcx, %rax
	jge	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
	movl	%esi, 8(%rdi)
	cmpq	%rcx, %rax
	jl	LBB0_5
## %bb.4:
	movq	_OPL3_RIGHT@GOTPCREL(%rip), %rax
	movq	_OPL3_REG_CONNECTION_SELECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	*16(%rdi)
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_DM_FM_MODE_OPL3,4,2      ## @SNDRV_DM_FM_MODE_OPL3
	.comm	_OPL3_HW_OPL3,8,3               ## @OPL3_HW_OPL3
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OPL3_RIGHT,4,2                 ## @OPL3_RIGHT
	.comm	_OPL3_REG_CONNECTION_SELECT,4,2 ## @OPL3_REG_CONNECTION_SELECT
	.no_dead_strip	_snd_opl3_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_opl3_set_mode
_snd_opl3_set_mode:                     ; @snd_opl3_set_mode
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _SNDRV_DM_FM_MODE_OPL3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SNDRV_DM_FM_MODE_OPL3@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _OPL3_HW_OPL3@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPL3_HW_OPL3@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	w10, w1
	ccmp	x8, x9, #0, eq
	b.lt	LBB0_4
; %bb.1:
	str	w1, [x0, #8]
	cmp	x8, x9
	b.lt	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _OPL3_RIGHT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPL3_RIGHT@GOTPAGEOFF]
	ldr	x9, [x0, #16]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x10, _OPL3_REG_CONNECTION_SELECT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _OPL3_REG_CONNECTION_SELECT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w1, w10, w8
	mov	w2, #0
	blr	x9
LBB0_3:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_DM_FM_MODE_OPL3,4,2      ; @SNDRV_DM_FM_MODE_OPL3
	.comm	_OPL3_HW_OPL3,8,3               ; @OPL3_HW_OPL3
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OPL3_RIGHT,4,2                 ; @OPL3_RIGHT
	.comm	_OPL3_REG_CONNECTION_SELECT,4,2 ; @OPL3_REG_CONNECTION_SELECT
	.no_dead_strip	_snd_opl3_set_mode
.subsections_via_symbols
