	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function OPNSetPres
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.space	4
	.space	4
LCPI0_1:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.space	4
	.space	4
LCPI0_2:
	.quad	0x4040000000000000              ## double 32
	.quad	0x4040000000000000              ## double 32
LCPI0_3:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.space	4
	.space	4
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_4:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_OPNSetPres:                            ## @OPNSetPres
	.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
	movq	_ym2612@GOTPCREL(%rip), %r14
	movsd	24(%r14), %xmm1                 ## xmm1 = mem[0],zero
	xorpd	%xmm0, %xmm0
	ucomisd	%xmm0, %xmm1
	jne	LBB0_1
	jnp	LBB0_2
LBB0_1:
	xorps	%xmm0, %xmm0
	cvtsi2sdq	32(%r14), %xmm0
	divsd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sd	%edi, %xmm1
	divsd	%xmm1, %xmm0
LBB0_2:
	movq	_EG_SH@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	movsd	%xmm0, 16(%r14)
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %eax
	movl	$1, %ebx
	movl	%eax, (%r14)
	movq	_dt_tab@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_init_timetables
	movq	_FREQ_SH@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	addb	$-10, %cl
	shll	%cl, %ebx
	movsd	16(%r14), %xmm8                 ## xmm8 = mem[0],zero
	movq	_fn_table@GOTPCREL(%rip), %rax
	cvtsi2sd	%ebx, %xmm2
	movq	(%rax), %rax
	movddup	%xmm8, %xmm1                    ## xmm1 = xmm8[0,0]
	movddup	%xmm2, %xmm2                    ## xmm2 = xmm2[0,0]
	movdqa	LCPI0_0(%rip), %xmm3            ## xmm3 = <0,1,u,u>
	xorl	%ecx, %ecx
	movdqa	LCPI0_1(%rip), %xmm9            ## xmm9 = <2,2,u,u>
	movapd	LCPI0_2(%rip), %xmm5            ## xmm5 = [3.2E+1,3.2E+1]
	movdqa	LCPI0_3(%rip), %xmm6            ## xmm6 = <4,4,u,u>
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm3, %xmm7
	paddd	%xmm9, %xmm7
	cvtdq2pd	%xmm3, %xmm0
	cvtdq2pd	%xmm7, %xmm7
	mulpd	%xmm5, %xmm0
	mulpd	%xmm5, %xmm7
	mulpd	%xmm1, %xmm0
	mulpd	%xmm1, %xmm7
	mulpd	%xmm2, %xmm0
	cvttsd2si	%xmm0, %rdx
	mulpd	%xmm2, %xmm7
	unpckhpd	%xmm0, %xmm0                    ## xmm0 = xmm0[1,1]
	cvttsd2si	%xmm0, %rsi
	movq	%rdx, %xmm0
	movq	%rsi, %xmm4
	cvttsd2si	%xmm7, %rdx
	unpckhpd	%xmm7, %xmm7                    ## xmm7 = xmm7[1,1]
	cvttsd2si	%xmm7, %rsi
	movq	%rdx, %xmm7
	punpcklqdq	%xmm4, %xmm0            ## xmm0 = xmm0[0],xmm4[0]
	movq	%rsi, %xmm4
	punpcklqdq	%xmm4, %xmm7            ## xmm7 = xmm7[0],xmm4[0]
	movdqu	%xmm0, (%rax,%rcx,8)
	movdqu	%xmm7, 16(%rax,%rcx,8)
	addq	$4, %rcx
	paddd	%xmm6, %xmm3
	cmpq	$4096, %rcx                     ## imm = 0x1000
	jne	LBB0_3
## %bb.4:
	movq	_lfo_samples_per_step@GOTPCREL(%rip), %rax
	movq	_LFO_SH@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	(%rax), %rcx
	xorps	%xmm2, %xmm2
	cvtsi2sd	%edx, %xmm2
	movq	8(%r14), %rax
	movsd	LCPI0_4(%rip), %xmm1            ## xmm1 = mem[0],zero
	movapd	%xmm1, %xmm0
	divsd	(%rcx), %xmm0
	mulsd	%xmm2, %xmm0
	mulsd	%xmm0, %xmm8
	movsd	%xmm8, (%rax)
	movapd	%xmm1, %xmm0
	divsd	8(%rcx), %xmm0
	mulsd	%xmm2, %xmm0
	mulsd	16(%r14), %xmm0
	movsd	%xmm0, 8(%rax)
	movapd	%xmm1, %xmm0
	divsd	16(%rcx), %xmm0
	mulsd	%xmm2, %xmm0
	mulsd	16(%r14), %xmm0
	movsd	%xmm0, 16(%rax)
	movapd	%xmm1, %xmm0
	divsd	24(%rcx), %xmm0
	mulsd	%xmm2, %xmm0
	movsd	16(%r14), %xmm3                 ## xmm3 = mem[0],zero
	mulsd	%xmm3, %xmm0
	movsd	%xmm0, 24(%rax)
	movapd	%xmm1, %xmm0
	divsd	32(%rcx), %xmm0
	mulsd	%xmm2, %xmm0
	mulsd	%xmm3, %xmm0
	movsd	%xmm0, 32(%rax)
	movapd	%xmm1, %xmm0
	divsd	40(%rcx), %xmm0
	mulsd	%xmm2, %xmm0
	mulsd	%xmm3, %xmm0
	movsd	%xmm0, 40(%rax)
	movapd	%xmm1, %xmm0
	divsd	48(%rcx), %xmm0
	mulsd	%xmm2, %xmm0
	mulsd	%xmm3, %xmm0
	movsd	%xmm0, 48(%rax)
	divsd	56(%rcx), %xmm1
	mulsd	%xmm2, %xmm1
	mulsd	%xmm3, %xmm1
	movsd	%xmm1, 56(%rax)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ym2612,40,3                    ## @ym2612
	.comm	_EG_SH,4,2                      ## @EG_SH
	.comm	_dt_tab,4,2                     ## @dt_tab
	.comm	_FREQ_SH,4,2                    ## @FREQ_SH
	.comm	_fn_table,8,3                   ## @fn_table
	.comm	_lfo_samples_per_step,8,3       ## @lfo_samples_per_step
	.comm	_LFO_SH,4,2                     ## @LFO_SH
	.no_dead_strip	_OPNSetPres
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function OPNSetPres
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_OPNSetPres:                            ; @OPNSetPres
	.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
Lloh0:
	adrp	x19, _ym2612@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ym2612@GOTPAGEOFF]
	ldr	d0, [x19, #24]
	fcmp	d0, #0.0
	b.eq	LBB0_2
; %bb.1:
	ldr	d1, [x19, #32]
	scvtf	d1, d1
	fdiv	d0, d1, d0
	scvtf	d1, w0
	fdiv	d0, d0, d1
	b	LBB0_3
LBB0_2:
	movi	d0, #0000000000000000
LBB0_3:
	str	d0, [x19, #16]
Lloh2:
	adrp	x8, _EG_SH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EG_SH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w20, #1
	lsl	w8, w20, w8
	scvtf	d1, w8
	fmul	d0, d0, d1
	fcvtzs	w8, d0
	str	w8, [x19]
Lloh5:
	adrp	x8, _dt_tab@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dt_tab@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_init_timetables
	mov	x8, #0
	ldr	d0, [x19, #16]
Lloh8:
	adrp	x9, _FREQ_SH@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FREQ_SH@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	sub	w9, w9, #10
	lsl	w9, w20, w9
Lloh11:
	adrp	x10, _fn_table@GOTPAGE
Lloh12:
	ldr	x10, [x10, _fn_table@GOTPAGEOFF]
	scvtf	d1, w9
	dup.2d	v2, v0[0]
Lloh13:
	ldr	x9, [x10]
	dup.2d	v3, v1[0]
Lloh14:
	adrp	x10, lCPI0_0@PAGE
Lloh15:
	ldr	d4, [x10, lCPI0_0@PAGEOFF]
	movi.2s	v5, #2
	movi.2s	v6, #4
	movi.2s	v7, #6
	mov	x10, #4629700416936869888
	dup.2d	v16, x10
	movi.2s	v17, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add.2s	v18, v4, v5
	add.2s	v19, v4, v6
	add.2s	v20, v4, v7
	sshll.2d	v21, v4, #0
	scvtf.2d	v21, v21
	sshll.2d	v18, v18, #0
	scvtf.2d	v18, v18
	sshll.2d	v19, v19, #0
	scvtf.2d	v19, v19
	sshll.2d	v20, v20, #0
	scvtf.2d	v20, v20
	fmul.2d	v21, v21, v16
	fmul.2d	v18, v18, v16
	fmul.2d	v19, v19, v16
	fmul.2d	v20, v20, v16
	fmul.2d	v21, v21, v2
	fmul.2d	v18, v18, v2
	fmul.2d	v19, v19, v2
	fmul.2d	v20, v20, v0[0]
	fmul.2d	v21, v21, v3
	fmul.2d	v18, v18, v3
	fmul.2d	v19, v19, v3
	fmul.2d	v20, v20, v1[0]
	fcvtzs.2d	v21, v21
	fcvtzs.2d	v18, v18
	fcvtzs.2d	v19, v19
	fcvtzs.2d	v20, v20
	add	x10, x9, x8
	stp	q21, q18, [x10]
	stp	q19, q20, [x10, #32]
	add.2s	v4, v4, v17
	add	x8, x8, #64
	cmp	x8, #8, lsl #12                 ; =32768
	b.ne	LBB0_4
; %bb.5:
Lloh16:
	adrp	x8, _lfo_samples_per_step@GOTPAGE
Lloh17:
	ldr	x8, [x8, _lfo_samples_per_step@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _LFO_SH@GOTPAGE
Lloh20:
	ldr	x9, [x9, _LFO_SH@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	scvtf	d1, w9
	ldr	x9, [x19, #8]
	ldr	d2, [x8]
	fmov	d3, #1.00000000
	fdiv	d2, d3, d2
	fmul	d2, d2, d1
	fmul	d0, d0, d2
	str	d0, [x9]
	ldr	d0, [x8, #8]
	fdiv	d0, d3, d0
	fmul	d0, d0, d1
	ldr	d2, [x19, #16]
	fmul	d0, d2, d0
	str	d0, [x9, #8]
	ldr	d0, [x8, #16]
	fdiv	d0, d3, d0
	fmul	d0, d0, d1
	ldr	d2, [x19, #16]
	fmul	d0, d2, d0
	str	d0, [x9, #16]
	ldr	d0, [x8, #24]
	fdiv	d0, d3, d0
	fmul	d0, d0, d1
	ldr	d2, [x19, #16]
	fmul	d0, d2, d0
	str	d0, [x9, #24]
	ldr	d0, [x8, #32]
	fdiv	d0, d3, d0
	fmul	d0, d0, d1
	fmul	d0, d2, d0
	str	d0, [x9, #32]
	ldr	d0, [x8, #40]
	fdiv	d0, d3, d0
	fmul	d0, d0, d1
	fmul	d0, d2, d0
	str	d0, [x9, #40]
	ldr	d0, [x8, #48]
	fdiv	d0, d3, d0
	fmul	d0, d0, d1
	fmul	d0, d2, d0
	str	d0, [x9, #48]
	ldr	d0, [x8, #56]
	fdiv	d0, d3, d0
	fmul	d0, d0, d1
	fmul	d0, d2, d0
	str	d0, [x9, #56]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ym2612,40,3                    ; @ym2612
	.comm	_EG_SH,4,2                      ; @EG_SH
	.comm	_dt_tab,4,2                     ; @dt_tab
	.comm	_FREQ_SH,4,2                    ; @FREQ_SH
	.comm	_fn_table,8,3                   ; @fn_table
	.comm	_lfo_samples_per_step,8,3       ; @lfo_samples_per_step
	.comm	_LFO_SH,4,2                     ; @LFO_SH
	.no_dead_strip	_OPNSetPres
.subsections_via_symbols
