	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function opl3_reset
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	4                               ## 0x4
	.long	5                               ## 0x5
	.long	6                               ## 0x6
	.long	7                               ## 0x7
LCPI0_2:
	.long	8                               ## 0x8
	.long	9                               ## 0x9
	.long	10                              ## 0xa
	.long	11                              ## 0xb
LCPI0_3:
	.long	12                              ## 0xc
	.long	13                              ## 0xd
	.long	14                              ## 0xe
	.long	15                              ## 0xf
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_opl3_reset:                            ## @opl3_reset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_devc@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax), %rcx
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	movups	%xmm0, (%rcx)
	movaps	LCPI0_1(%rip), %xmm0            ## xmm0 = [4,5,6,7]
	movups	%xmm0, 16(%rcx)
	movaps	LCPI0_2(%rip), %xmm0            ## xmm0 = [8,9,10,11]
	movups	%xmm0, 32(%rcx)
	movaps	LCPI0_3(%rip), %xmm0            ## xmm0 = [12,13,14,15]
	movups	%xmm0, 48(%rcx)
	movabsq	$73014444048, %rdx              ## imm = 0x1100000010
	movq	%rdx, 64(%rcx)
	cmpl	$0, 8(%rax)
	jle	LBB0_6
## %bb.1:
	movl	%edi, %r14d
	xorl	%eax, %eax
	movq	_pv_map@GOTPCREL(%rip), %r12
	movq	_KSL_LEVEL@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	cltq
	leaq	(%rax,%rax,2), %rax
	movl	16(%rcx,%rax,8), %edi
	movq	8(%rcx,%rax,8), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	$255, %edx
	callq	_opl3_command
	movq	(%r12), %rax
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%rbx,4), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %edi
	movq	8(%rax,%rcx,8), %rax
	movq	8(%rax), %rsi
	addq	(%r13), %rsi
	movl	$255, %edx
	callq	_opl3_command
	movq	(%r12), %rax
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%rbx,4), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	cmpl	$4, (%rax,%rcx,8)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%rax,%rcx,8), %edi
	movq	8(%rax,%rcx,8), %rax
	movq	16(%rax), %rsi
	addq	(%r13), %rsi
	movl	$255, %edx
	callq	_opl3_command
	movq	(%r12), %rax
	movq	(%r15), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%rbx,4), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %edi
	movq	8(%rax,%rcx,8), %rax
	movq	24(%rax), %rsi
	addq	(%r13), %rsi
	movl	$255, %edx
	callq	_opl3_command
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	movl	$64, %ecx
	callq	_opl3_kill_note
	leaq	1(%rbx), %rcx
	movq	(%r15), %rax
	movslq	8(%rax), %rdx
	cmpq	%rdx, %rcx
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rax
	movl	4(%rax,%rbx,4), %eax
	movq	%rcx, %rbx
	jmp	LBB0_2
LBB0_6:
	cmpl	$2, 12(%rax)
	jne	LBB0_8
## %bb.7:
	movl	$18, 8(%rax)
	movq	16(%rax), %rax
	movl	$18, (%rax)
	movq	_pv_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$2, (%rax)
	movl	$2, 24(%rax)
	movl	$2, 48(%rax)
	movl	$2, 72(%rax)
	movl	$2, 96(%rax)
	movl	$2, 120(%rax)
	movl	$2, 144(%rax)
	movl	$2, 168(%rax)
	movl	$2, 192(%rax)
	movl	$2, 216(%rax)
	movl	$2, 240(%rax)
	movl	$2, 264(%rax)
	movl	$2, 288(%rax)
	movl	$2, 312(%rax)
	movl	$2, 336(%rax)
	movl	$2, 360(%rax)
	movl	$2, 384(%rax)
	movl	$2, 408(%rax)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_devc,8,3                       ## @devc
	.comm	_pv_map,8,3                     ## @pv_map
	.comm	_KSL_LEVEL,8,3                  ## @KSL_LEVEL
	.no_dead_strip	_opl3_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function opl3_reset
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
lCPI0_1:
	.long	4                               ; 0x4
	.long	5                               ; 0x5
	.long	6                               ; 0x6
	.long	7                               ; 0x7
lCPI0_2:
	.long	8                               ; 0x8
	.long	9                               ; 0x9
	.long	10                              ; 0xa
	.long	11                              ; 0xb
lCPI0_3:
	.long	12                              ; 0xc
	.long	13                              ; 0xd
	.long	14                              ; 0xe
	.long	15                              ; 0xf
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_4:
	.long	16                              ; 0x10
	.long	17                              ; 0x11
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_opl3_reset:                            ; @opl3_reset
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x21, _devc@GOTPAGE
Lloh1:
	ldr	x21, [x21, _devc@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x8]
Lloh2:
	adrp	x10, lCPI0_0@PAGE
Lloh3:
	ldr	q0, [x10, lCPI0_0@PAGEOFF]
Lloh4:
	adrp	x10, lCPI0_1@PAGE
Lloh5:
	ldr	q1, [x10, lCPI0_1@PAGEOFF]
	stp	q0, q1, [x9]
Lloh6:
	adrp	x10, lCPI0_2@PAGE
Lloh7:
	ldr	q0, [x10, lCPI0_2@PAGEOFF]
Lloh8:
	adrp	x10, lCPI0_3@PAGE
Lloh9:
	ldr	q1, [x10, lCPI0_3@PAGEOFF]
	stp	q0, q1, [x9, #32]
Lloh10:
	adrp	x10, lCPI0_4@PAGE
Lloh11:
	ldr	d0, [x10, lCPI0_4@PAGEOFF]
	str	d0, [x9, #64]
	ldr	w9, [x8, #8]
Lloh12:
	adrp	x22, _pv_map@GOTPAGE
Lloh13:
	ldr	x22, [x22, _pv_map@GOTPAGEOFF]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x19, x0
	mov	w8, #0
	mov	x20, #0
	mov	w23, #24
Lloh14:
	adrp	x24, _KSL_LEVEL@GOTPAGE
Lloh15:
	ldr	x24, [x24, _KSL_LEVEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	smaddl	x8, w8, w23, x9
	ldr	w0, [x8, #16]
	ldr	x9, [x24]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	add	x1, x8, x9
	mov	w2, #255
	bl	_opl3_command
	ldr	x8, [x22]
	ldr	x9, [x21]
	ldr	x9, [x9]
	lsl	x25, x20, #2
	ldrsw	x9, [x9, x25]
	madd	x8, x9, x23, x8
	ldr	w0, [x8, #16]
	ldr	x9, [x24]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #8]
	add	x1, x8, x9
	mov	w2, #255
	bl	_opl3_command
	ldr	x8, [x22]
	ldr	x9, [x21]
	ldr	x9, [x9]
	ldrsw	x9, [x9, x25]
	mul	x10, x9, x23
	ldr	w10, [x8, x10]
	cmp	w10, #4
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	madd	x8, x9, x23, x8
	ldr	w0, [x8, #16]
	ldr	x9, [x24]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #16]
	add	x1, x8, x9
	mov	w2, #255
	bl	_opl3_command
	ldr	x8, [x22]
	ldr	x9, [x21]
	ldr	x9, [x9]
	ldrsw	x9, [x9, x20, lsl #2]
	madd	x8, x9, x23, x8
	ldr	w0, [x8, #16]
	ldr	x9, [x24]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #24]
	add	x1, x8, x9
	mov	w2, #255
	bl	_opl3_command
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w3, #64
	bl	_opl3_kill_note
	add	x9, x20, #1
	ldr	x8, [x21]
	ldrsw	x10, [x8, #8]
	cmp	x9, x10
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x8]
	add	x8, x8, x20, lsl #2
	ldr	w8, [x8, #4]
	mov	x20, x9
	b	LBB0_2
LBB0_6:
	ldr	w9, [x8, #12]
	cmp	w9, #2
	b.ne	LBB0_8
; %bb.7:
	mov	w9, #18
	str	w9, [x8, #8]
	ldr	x8, [x8, #16]
	str	w9, [x8]
	ldr	x8, [x22]
	mov	w9, #2
	str	w9, [x8]
	str	w9, [x8, #24]
	str	w9, [x8, #48]
	str	w9, [x8, #72]
	str	w9, [x8, #96]
	str	w9, [x8, #120]
	str	w9, [x8, #144]
	str	w9, [x8, #168]
	str	w9, [x8, #192]
	str	w9, [x8, #216]
	str	w9, [x8, #240]
	str	w9, [x8, #264]
	str	w9, [x8, #288]
	str	w9, [x8, #312]
	str	w9, [x8, #336]
	str	w9, [x8, #360]
	str	w9, [x8, #384]
	str	w9, [x8, #408]
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpAdrp	Lloh8, Lloh10
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpAdrp	Lloh6, Lloh8
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpAdrp	Lloh4, Lloh6
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_devc,8,3                       ; @devc
	.comm	_pv_map,8,3                     ; @pv_map
	.comm	_KSL_LEVEL,8,3                  ; @KSL_LEVEL
	.no_dead_strip	_opl3_reset
.subsections_via_symbols
