	.file	"extr_ym2612.c_YM2612ResetChip.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	YM2612ResetChip
	.type	YM2612ResetChip, @function
YM2612ResetChip:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	edi, 48
	mov	ebx, 178
	mov	QWORD PTR ym2612[rip+104], 0
	mov	QWORD PTR ym2612[rip+96], 0
	mov	QWORD PTR ym2612[rip+88], 0
	mov	QWORD PTR ym2612[rip+80], 0
	mov	QWORD PTR ym2612[rip+72], 0
	mov	DWORD PTR ym2612[rip+8], 126
	mov	QWORD PTR ym2612[rip+64], 0
	mov	QWORD PTR ym2612[rip+48], 0
	mov	QWORD PTR ym2612[rip+40], 0
	mov	QWORD PTR ym2612[rip+56], 0
	mov	QWORD PTR ym2612[rip+120], 0
	mov	QWORD PTR ym2612[rip+112], 0
	call	set_timers@PLT
	mov	rdi, QWORD PTR ym2612[rip]
	mov	esi, 6
	movabs	rax, 4398046515200
	mov	QWORD PTR ym2612[rip+16], rax
	mov	QWORD PTR ym2612[rip+24], 0
	mov	QWORD PTR ym2612[rip+32], 0
	call	reset_channels@PLT
	mov	esi, 192
	mov	edi, 182
	call	OPNWriteReg@PLT
	mov	esi, 192
	mov	edi, 438
	call	OPNWriteReg@PLT
	mov	esi, 192
	mov	edi, 181
	call	OPNWriteReg@PLT
	mov	esi, 192
	mov	edi, 437
	call	OPNWriteReg@PLT
	mov	esi, 192
	mov	edi, 180
	call	OPNWriteReg@PLT
	mov	esi, 192
	mov	edi, 436
	call	OPNWriteReg@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, ebx
	xor	esi, esi
	call	OPNWriteReg@PLT
	mov	edi, ebx
	xor	esi, esi
	sub	ebx, 1
	or	edi, 256
	call	OPNWriteReg@PLT
	cmp	ebx, 47
	jne	.L2
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	YM2612ResetChip, .-YM2612ResetChip
	.comm	ym2612,128,32
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ym2612.c_YM2612ResetChip.c"
	.text
	.align	2
	.global	YM2612ResetChip
	.syntax unified
	.arm
	.fpu softvfp
	.type	YM2612ResetChip, %function
YM2612ResetChip:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r3, #126
	mov	r5, #0
	ldr	r4, .L7
	mov	r0, #48
	str	r3, [r4, #4]
	str	r5, [r4, #56]
	str	r5, [r4, #52]
	str	r5, [r4, #48]
	str	r5, [r4, #44]
	str	r5, [r4, #40]
	str	r5, [r4, #36]
	str	r5, [r4, #28]
	str	r5, [r4, #24]
	str	r5, [r4, #32]
	str	r5, [r4, #64]
	str	r5, [r4, #60]
	bl	set_timers
	mov	r2, #4096
	mov	r3, #1024
	mov	r1, #6
	ldr	r0, [r4]
	str	r2, [r4, #8]
	str	r3, [r4, #12]
	str	r5, [r4, #20]
	str	r5, [r4, #16]
	bl	reset_channels
	mov	r1, #192
	mov	r0, #182
	bl	OPNWriteReg
	mov	r1, #192
	ldr	r0, .L7+4
	bl	OPNWriteReg
	mov	r1, #192
	mov	r0, #181
	bl	OPNWriteReg
	mov	r1, #192
	ldr	r0, .L7+8
	bl	OPNWriteReg
	mov	r1, #192
	mov	r0, #180
	bl	OPNWriteReg
	mov	r1, #192
	mov	r0, #436
	bl	OPNWriteReg
	mov	r4, #178
.L2:
	mov	r1, #0
	mov	r0, r4
	bl	OPNWriteReg
	orr	r0, r4, #256
	mov	r1, #0
	sub	r4, r4, #1
	bl	OPNWriteReg
	cmp	r4, #47
	bne	.L2
	pop	{r4, r5, r6, pc}
.L8:
	.align	2
.L7:
	.word	ym2612
	.word	438
	.word	437
	.size	YM2612ResetChip, .-YM2612ResetChip
	.comm	ym2612,68,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
