	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OPLL_reset                     ## -- Begin function OPLL_reset
	.p2align	4, 0x90
_OPLL_reset:                            ## @OPLL_reset
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	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	%rdi, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rdi)
	movups	%xmm0, 40(%rdi)
	movq	$0, 72(%rdi)
	movq	32(%rdi), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$4, %rdi
	movl	$1, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$8, %rdi
	xorl	%esi, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$12, %rdi
	movl	$1, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$16, %rdi
	xorl	%esi, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$20, %rdi
	movl	$1, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$24, %rdi
	xorl	%esi, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$28, %rdi
	movl	$1, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$32, %rdi
	xorl	%esi, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$36, %rdi
	movl	$1, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$40, %rdi
	xorl	%esi, %esi
	callq	_OPLL_SLOT_reset
	movq	32(%r14), %rdi
	addq	$44, %rdi
	movl	$1, %esi
	callq	_OPLL_SLOT_reset
	movq	24(%r14), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movups	%xmm0, 16(%rax)
	movups	%xmm0, 32(%rax)
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_OPLL_writeReg
	incl	%ebx
	cmpl	$64, %ebx
	jne	LBB0_2
## %bb.3:
	movq	_rate@GOTPCREL(%rip), %rcx
	movl	$-2147483648, %eax              ## imm = 0x80000000
	cltd
	idivl	(%rcx)
	cltq
	movq	%rax, 16(%r14)
	movq	_clk@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$954437177, %rax, %rcx          ## imm = 0x38E38E39
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$36, %rcx
	addl	%eax, %ecx
	movl	$-2147483648, %eax              ## imm = 0x80000000
	cltd
	idivl	%ecx
	cltq
	movq	%rax, 8(%r14)
	movq	$0, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
LBB0_4:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rate,4,2                       ## @rate
	.comm	_clk,4,2                        ## @clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OPLL_reset                     ; -- Begin function OPLL_reset
	.p2align	2
_OPLL_reset:                            ; @OPLL_reset
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_4
; %bb.1:
	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
	mov	x19, x0
	str	xzr, [x0, #72]
	movi.2d	v0, #0000000000000000
	stur	q0, [x0, #56]
	stur	q0, [x0, #40]
	ldr	x0, [x0, #32]
	mov	w1, #0
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #4
	mov	w1, #1
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #8
	mov	w1, #0
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #12
	mov	w1, #1
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #16
	mov	w1, #0
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #20
	mov	w1, #1
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #24
	mov	w1, #0
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #28
	mov	w1, #1
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #32
	mov	w1, #0
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #36
	mov	w1, #1
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #40
	mov	w1, #0
	bl	_OPLL_SLOT_reset
	ldr	x8, [x19, #32]
	add	x0, x8, #44
	mov	w1, #1
	bl	_OPLL_SLOT_reset
	mov	w20, #0
	ldr	x8, [x19, #24]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x8]
	str	q0, [x8, #32]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_OPLL_writeReg
	add	w20, w20, #1
	cmp	w20, #64
	b.ne	LBB0_2
; %bb.3:
Lloh0:
	adrp	x8, _rate@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rate@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #-2147483648
	sdiv	w8, w9, w8
	sxtw	x8, w8
	str	x8, [x19, #16]
Lloh3:
	adrp	x8, _clk@GOTPAGE
Lloh4:
	ldr	x8, [x8, _clk@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	mov	w10, #36409
	movk	w10, #14563, lsl #16
	mul	x8, x8, x10
	lsr	x10, x8, #63
	asr	x8, x8, #36
	add	w8, w8, w10
	sdiv	w8, w9, w8
	sxtw	x8, w8
	stp	xzr, x8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_rate,4,2                       ; @rate
	.comm	_clk,4,2                        ; @clk
.subsections_via_symbols
