	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_opl4_update_pan
_snd_opl4_update_pan:                   ## @snd_opl4_update_pan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	16(%rsi), %rcx
	movq	24(%rsi), %rax
	movl	(%rax), %eax
	cmpl	$0, 8(%rcx)
	jne	LBB0_2
## %bb.1:
	movq	(%rcx), %rcx
	movq	_MIDI_CTL_MSB_PAN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %ecx
	addl	$-64, %ecx
	sarl	$3, %ecx
	addl	%ecx, %eax
LBB0_2:
	cmpl	$7, %eax
	movl	$7, %ecx
	cmovll	%eax, %ecx
	cmpl	$-6, %ecx
	movl	$-7, %edx
	cmovgel	%ecx, %edx
	movl	(%rsi), %eax
	movq	_OPL4_PAN_POT_MASK@GOTPCREL(%rip), %rcx
	xorl	%eax, %edx
	andl	(%rcx), %edx
	xorl	%eax, %edx
	movl	%edx, (%rsi)
	movq	_OPL4_REG_MISC@GOTPCREL(%rip), %rax
	movq	8(%rsi), %rsi
	addq	(%rax), %rsi
	popq	%rbp
	jmp	_snd_opl4_write                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MIDI_CTL_MSB_PAN,8,3           ## @MIDI_CTL_MSB_PAN
	.comm	_OPL4_PAN_POT_MASK,4,2          ## @OPL4_PAN_POT_MASK
	.comm	_OPL4_REG_MISC,8,3              ## @OPL4_REG_MISC
	.no_dead_strip	_snd_opl4_update_pan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_opl4_update_pan
_snd_opl4_update_pan:                   ; @snd_opl4_update_pan
	.cfi_startproc
; %bb.0:
	ldp	x9, x8, [x1, #16]
	ldr	w8, [x8]
	ldr	w10, [x9, #8]
	cbnz	w10, LBB0_2
; %bb.1:
Lloh0:
	adrp	x10, _MIDI_CTL_MSB_PAN@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MIDI_CTL_MSB_PAN@GOTPAGEOFF]
	ldr	x9, [x9]
Lloh2:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
	sub	w9, w9, #64
	add	w8, w8, w9, asr #3
LBB0_2:
	mov	w9, #7
	cmp	w8, #7
	csel	w8, w8, w9, lt
	cmn	w8, #7
	mov	w9, #-7
	csel	w8, w8, w9, gt
	ldr	w9, [x1]
Lloh3:
	adrp	x10, _OPL4_PAN_POT_MASK@GOTPAGE
Lloh4:
	ldr	x10, [x10, _OPL4_PAN_POT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	bic	w9, w9, w10
	and	w8, w8, w10
	orr	w2, w9, w8
	str	w2, [x1]
Lloh6:
	adrp	x8, _OPL4_REG_MISC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPL4_REG_MISC@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x1, #8]
	add	x1, x9, x8
	b	_snd_opl4_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MIDI_CTL_MSB_PAN,8,3           ; @MIDI_CTL_MSB_PAN
	.comm	_OPL4_PAN_POT_MASK,4,2          ; @OPL4_PAN_POT_MASK
	.comm	_OPL4_REG_MISC,8,3              ; @OPL4_REG_MISC
	.no_dead_strip	_snd_opl4_update_pan
.subsections_via_symbols
