	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YM2413ResetChip                ## -- Begin function YM2413ResetChip
	.p2align	4, 0x90
_YM2413ResetChip:                       ## @YM2413ResetChip
	.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
	xorps	%xmm0, %xmm0
	movq	_ym2413@GOTPCREL(%rip), %r14
	movups	%xmm0, 24(%r14)
	movl	$1, (%r14)
	movq	_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r14), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rdx,8), %rsi
	movq	(%rcx,%rdx,8), %rdi
	movl	(%rsi), %ebx
	movl	%ebx, (%rdi)
	movl	4(%rsi), %ebx
	movl	%ebx, 4(%rdi)
	movl	8(%rsi), %ebx
	movl	%ebx, 8(%rdi)
	movl	12(%rsi), %ebx
	movl	%ebx, 12(%rdi)
	movl	16(%rsi), %ebx
	movl	%ebx, 16(%rdi)
	movl	20(%rsi), %ebx
	movl	%ebx, 20(%rdi)
	movl	24(%rsi), %ebx
	movl	%ebx, 24(%rdi)
	movl	28(%rsi), %esi
	movl	%esi, 28(%rdi)
	incq	%rdx
	cmpq	$19, %rdx
	jne	LBB0_1
## %bb.2:
	movl	$15, %edi
	xorl	%esi, %esi
	callq	_OPLLWriteReg
	movl	$64, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_OPLLWriteReg
	cmpl	$16, %ebx
	ja	LBB0_3
## %bb.4:
	movq	8(%r14), %rdx
	movq	(%rdx), %rsi
	movq	$0, 8(%rsi)
	movq	_EG_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, 4(%rsi)
	movq	_MAX_ATT_INDEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	8(%rdx), %rsi
	movq	$0, 8(%rsi)
	movl	%edi, 4(%rsi)
	movl	%ebx, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	16(%rdx), %rsi
	movq	$0, 8(%rsi)
	movl	%edi, 4(%rsi)
	movl	%ebx, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	24(%rdx), %rsi
	movq	$0, 8(%rsi)
	movl	%edi, 4(%rsi)
	movl	%ebx, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	32(%rdx), %rsi
	movq	$0, 8(%rsi)
	movl	%edi, 4(%rsi)
	movl	%ebx, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	40(%rdx), %rsi
	movq	$0, 8(%rsi)
	movl	%edi, 4(%rsi)
	movl	%ebx, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	48(%rdx), %rsi
	movq	$0, 8(%rsi)
	movl	%edi, 4(%rsi)
	movl	%ebx, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	56(%rdx), %rsi
	movq	$0, 8(%rsi)
	movl	%edi, 4(%rsi)
	movl	%ebx, (%rsi)
	movq	$0, 24(%rsi)
	movl	(%rax), %edi
	movl	%edi, 20(%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, 16(%rsi)
	movq	64(%rdx), %rdx
	movq	$0, 8(%rdx)
	movl	%edi, 4(%rdx)
	movl	%ebx, (%rdx)
	movq	$0, 24(%rdx)
	movl	(%rax), %eax
	movl	%eax, 20(%rdx)
	movl	(%rcx), %eax
	movl	%eax, 16(%rdx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ym2413,40,3                    ## @ym2413
	.comm	_table,8,3                      ## @table
	.comm	_EG_OFF,4,2                     ## @EG_OFF
	.comm	_MAX_ATT_INDEX,4,2              ## @MAX_ATT_INDEX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YM2413ResetChip                ; -- Begin function YM2413ResetChip
	.p2align	2
_YM2413ResetChip:                       ; @YM2413ResetChip
	.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
	mov	x8, #0
Lloh0:
	adrp	x20, _ym2413@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ym2413@GOTPAGEOFF]
	stp	xzr, xzr, [x20, #24]
	mov	w9, #1
	str	w9, [x20]
Lloh2:
	adrp	x9, _table@GOTPAGE
Lloh3:
	ldr	x9, [x9, _table@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x10, [x20, #16]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x8]
	ldr	x12, [x10, x8]
	ldr	w13, [x11]
	str	w13, [x12]
	ldr	w13, [x11, #4]
	str	w13, [x12, #4]
	ldr	w13, [x11, #8]
	str	w13, [x12, #8]
	ldr	w13, [x11, #12]
	str	w13, [x12, #12]
	ldr	w13, [x11, #16]
	str	w13, [x12, #16]
	ldr	w13, [x11, #20]
	str	w13, [x12, #20]
	ldr	w13, [x11, #24]
	str	w13, [x12, #24]
	ldr	w11, [x11, #28]
	str	w11, [x12, #28]
	add	x8, x8, #8
	cmp	x8, #152
	b.ne	LBB0_1
; %bb.2:
	mov	w0, #15
	mov	w1, #0
	bl	_OPLLWriteReg
	mov	w19, #64
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w19, w19, #1
	mov	x0, x19
	mov	w1, #0
	bl	_OPLLWriteReg
	cmp	w19, #16
	b.hi	LBB0_3
; %bb.4:
	ldr	x8, [x20, #8]
	ldp	x11, x12, [x8]
	str	xzr, [x11, #8]
Lloh5:
	adrp	x10, _EG_OFF@GOTPAGE
Lloh6:
	ldr	x10, [x10, _EG_OFF@GOTPAGEOFF]
	ldr	w13, [x10]
Lloh7:
	adrp	x9, _MAX_ATT_INDEX@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_ATT_INDEX@GOTPAGEOFF]
	ldr	w14, [x9]
	stp	w14, w13, [x11]
	str	xzr, [x11, #24]
	ldr	w13, [x10]
	ldr	w14, [x9]
	stp	w14, w13, [x11, #16]
	str	xzr, [x12, #8]
	stp	w14, w13, [x12]
	str	xzr, [x12, #24]
	ldr	w11, [x10]
	ldr	w13, [x9]
	stp	w13, w11, [x12, #16]
	ldp	x12, x14, [x8, #16]
	str	xzr, [x12, #8]
	stp	w13, w11, [x12]
	str	xzr, [x12, #24]
	ldr	w11, [x10]
	ldr	w13, [x9]
	stp	w13, w11, [x12, #16]
	str	xzr, [x14, #8]
	stp	w13, w11, [x14]
	str	xzr, [x14, #24]
	ldr	w11, [x10]
	ldr	w12, [x9]
	stp	w12, w11, [x14, #16]
	ldp	x13, x14, [x8, #32]
	str	xzr, [x13, #8]
	stp	w12, w11, [x13]
	str	xzr, [x13, #24]
	ldr	w11, [x10]
	ldr	w12, [x9]
	stp	w12, w11, [x13, #16]
	str	xzr, [x14, #8]
	stp	w12, w11, [x14]
	str	xzr, [x14, #24]
	ldr	w11, [x10]
	ldr	w12, [x9]
	stp	w12, w11, [x14, #16]
	ldp	x13, x14, [x8, #48]
	str	xzr, [x13, #8]
	stp	w12, w11, [x13]
	str	xzr, [x13, #24]
	ldr	w11, [x10]
	ldr	w12, [x9]
	stp	w12, w11, [x13, #16]
	str	xzr, [x14, #8]
	stp	w12, w11, [x14]
	str	xzr, [x14, #24]
	ldr	w11, [x10]
	ldr	w12, [x9]
	stp	w12, w11, [x14, #16]
	ldr	x8, [x8, #64]
	str	xzr, [x8, #8]
	stp	w12, w11, [x8]
	str	xzr, [x8, #24]
	ldr	w10, [x10]
	ldr	w9, [x9]
	stp	w9, w10, [x8, #16]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ym2413,40,3                    ; @ym2413
	.comm	_table,8,3                      ; @table
	.comm	_EG_OFF,4,2                     ; @EG_OFF
	.comm	_MAX_ATT_INDEX,4,2              ; @MAX_ATT_INDEX
.subsections_via_symbols
