	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SoundSaveState                 ## -- Begin function SoundSaveState
	.p2align	4, 0x90
_SoundSaveState:                        ## @SoundSaveState
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -64(%rbp)
	movq	_scsp_thread_running@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_ScspSyncThread
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_StateWriteHeader
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_m68k_running@GOTPCREL(%rip), %rsi
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	_M68K@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	xorl	%edi, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$1, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$2, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$3, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$4, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$5, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$6, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$7, %edi
	callq	*(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	xorl	%edi, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$1, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$2, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$3, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$4, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$5, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$6, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rax
	movl	$7, %edi
	callq	*8(%rax)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rcx
	xorl	%eax, %eax
	callq	*16(%rcx)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	(%r13), %rcx
	xorl	%eax, %eax
	callq	*24(%rcx)
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	_scsp_regcache@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	_SoundRam@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	movl	$524288, %edx                   ## imm = 0x80000
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	$32, %r14d
	movq	_scsp@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, -48(%rbp)
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	leaq	(%rax,%r14), %rsi
	addq	$-20, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	leaq	(%rax,%r14), %rsi
	addq	$-24, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	addq	$40, %r14
	cmpq	$1312, %r14                     ## imm = 0x520
	je	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	152(%r13), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	leaq	(%rax,%r14), %rsi
	addq	$-4, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	leaq	(%rax,%r14), %rsi
	addq	$-8, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	leaq	(%rax,%r14), %rsi
	addq	$-12, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	leaq	(%rax,%r14), %rsi
	addq	$-16, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	leaq	(%rax,%r14), %rsi
	addq	$-32, %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	152(%r13), %rax
	movq	-32(%rax,%r14), %rax
	movq	_SCSP_ENV_RELEASE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SCSP_ENV_SUSTAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$2, -48(%rbp)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_SCSP_ENV_DECAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$3, -48(%rbp)
	jmp	LBB0_12
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_SCSP_ENV_ATTACK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$4, -48(%rbp)
	jmp	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$0, -48(%rbp)
	jmp	LBB0_12
LBB0_13:
	movl	(%r13), %eax
	movl	%eax, -44(%rbp)
	leaq	-64(%rbp), %r15
	leaq	-44(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	4(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	8(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	leaq	148(%r13), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	12(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	leaq	144(%r13), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	16(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	20(%r13), %eax
	movl	24(%r13), %ecx
	shll	$6, %eax
	shll	$5, %ecx
	orl	%eax, %ecx
	movl	28(%r13), %eax
	shll	$4, %eax
	orl	%ecx, %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	32(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	136(%r13), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$4, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	128(%r13), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$4, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	leaq	124(%r13), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	leaq	120(%r13), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	36(%r13), %eax
	movl	40(%r13), %ecx
	shll	$4, %eax
	shll	$3, %ecx
	orl	%eax, %ecx
	movl	44(%r13), %eax
	shll	$2, %eax
	movl	48(%r13), %edx
	addl	%edx, %edx
	orl	%eax, %edx
	orl	%ecx, %edx
	orl	52(%r13), %edx
	movl	%edx, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	56(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	60(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	64(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	68(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	72(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	76(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	80(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	84(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	88(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	92(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	96(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	100(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movl	104(%r13), %eax
	movl	%eax, -44(%rbp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	112(%r13), %rsi
	movq	%r15, %rdi
	movl	$4, %edx
	movl	$64, %ecx
	movq	%rbx, %r8
	callq	_ywrite
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_StateFinishHeader
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_scsp_thread_running,8,3        ## @scsp_thread_running
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCSP"

	.comm	_m68k_running,4,2               ## @m68k_running
	.comm	_M68K,8,3                       ## @M68K
	.comm	_scsp_regcache,8,3              ## @scsp_regcache
	.comm	_SoundRam,8,3                   ## @SoundRam
	.comm	_scsp,160,3                     ## @scsp
	.comm	_SCSP_ENV_RELEASE,8,3           ## @SCSP_ENV_RELEASE
	.comm	_SCSP_ENV_SUSTAIN,8,3           ## @SCSP_ENV_SUSTAIN
	.comm	_SCSP_ENV_DECAY,8,3             ## @SCSP_ENV_DECAY
	.comm	_SCSP_ENV_ATTACK,8,3            ## @SCSP_ENV_ATTACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SoundSaveState                 ; -- Begin function SoundSaveState
	.p2align	2
_SoundSaveState:                        ; @SoundSaveState
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	str	xzr, [sp, #16]
Lloh0:
	adrp	x8, _scsp_thread_running@GOTPAGE
Lloh1:
	ldr	x8, [x8, _scsp_thread_running@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_ScspSyncThread
LBB0_2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w21, #2
	mov	x0, x19
	mov	w2, #2
	bl	_StateWriteHeader
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
Lloh5:
	adrp	x1, _m68k_running@GOTPAGE
Lloh6:
	ldr	x1, [x1, _m68k_running@GOTPAGEOFF]
	mov	w22, #1
	add	x0, sp, #16
	mov	w2, #1
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
Lloh7:
	adrp	x24, _M68K@GOTPAGE
Lloh8:
	ldr	x24, [x24, _M68K@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w0, #0
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	x4, x19
	mov	w3, #1
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w0, #1
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w0, #2
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w25, #3
	mov	w0, #3
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w0, #4
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w0, #5
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w0, #6
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8]
	mov	w0, #7
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #0
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #1
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #2
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #3
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #4
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #5
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #6
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #8]
	mov	w0, #7
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #16]
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24]
	ldr	x8, [x8, #24]
	blr	x8
	str	w0, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
Lloh9:
	adrp	x8, _scsp_regcache@GOTPAGE
Lloh10:
	ldr	x8, [x8, _scsp_regcache@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x8]
	add	x0, sp, #16
	mov	w2, #4096
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
Lloh12:
	adrp	x8, _SoundRam@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SoundRam@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
	add	x0, sp, #16
	mov	w2, #524288
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	mov	w26, #32
Lloh15:
	adrp	x24, _scsp@GOTPAGE
Lloh16:
	ldr	x24, [x24, _scsp@GOTPAGEOFF]
Lloh17:
	adrp	x27, _SCSP_ENV_RELEASE@GOTPAGE
Lloh18:
	ldr	x27, [x27, _SCSP_ENV_RELEASE@GOTPAGEOFF]
Lloh19:
	adrp	x28, _SCSP_ENV_SUSTAIN@GOTPAGE
Lloh20:
	ldr	x28, [x28, _SCSP_ENV_SUSTAIN@GOTPAGEOFF]
Lloh21:
	adrp	x20, _SCSP_ENV_DECAY@GOTPAGE
Lloh22:
	ldr	x20, [x20, _SCSP_ENV_DECAY@GOTPAGEOFF]
Lloh23:
	adrp	x23, _SCSP_ENV_ATTACK@GOTPAGE
Lloh24:
	ldr	x23, [x23, _SCSP_ENV_ATTACK@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w22, [sp, #24]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #16
	add	x1, sp, #24
	mov	w2, #1
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	sub	x1, x8, #20
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	sub	x1, x8, #24
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	add	x26, x26, #40
	cmp	x26, #1312
	b.eq	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #152]
	add	x1, x8, x26
	add	x0, sp, #16
	mov	w2, #1
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	sub	x1, x8, #4
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	sub	x1, x8, #8
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	sub	x1, x8, #12
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	sub	x1, x8, #16
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	sub	x1, x8, #32
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x24, #152]
	add	x8, x8, x26
	ldur	x8, [x8, #-32]
	ldr	x9, [x27]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w21, [sp, #24]
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w25, [sp, #24]
	b	LBB0_4
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, #4
	str	w8, [sp, #24]
	b	LBB0_4
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [sp, #24]
	b	LBB0_4
LBB0_13:
	ldr	w8, [x24]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #4]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #8]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	add	x1, x24, #148
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #12]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	add	x1, x24, #144
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #16]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldp	w8, w9, [x24, #20]
	lsl	w9, w9, #5
	orr	w8, w9, w8, lsl #6
	ldr	w9, [x24, #28]
	orr	w8, w8, w9, lsl #4
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #32]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x1, [x24, #136]
	add	x0, sp, #16
	mov	w2, #1
	mov	w3, #4
	mov	x4, x19
	bl	_ywrite
	ldr	x1, [x24, #128]
	add	x0, sp, #16
	mov	w2, #1
	mov	w3, #4
	mov	x4, x19
	bl	_ywrite
	add	x1, x24, #124
	add	x0, sp, #16
	mov	w2, #1
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	add	x1, x24, #120
	add	x0, sp, #16
	mov	w2, #1
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldp	w8, w9, [x24, #36]
	lsl	w9, w9, #3
	orr	w8, w9, w8, lsl #4
	ldp	w9, w10, [x24, #44]
	orr	w8, w8, w9, lsl #2
	orr	w8, w8, w10, lsl #1
	ldr	w9, [x24, #52]
	orr	w8, w8, w9
	str	w8, [sp, #24]
	add	x0, sp, #16
	add	x1, sp, #24
	mov	w2, #1
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #56]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #60]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #64]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #68]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #72]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #76]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #80]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #84]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #88]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #92]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #96]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #100]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	w8, [x24, #104]
	str	w8, [sp, #28]
	add	x0, sp, #16
	add	x1, sp, #28
	mov	w2, #4
	mov	w3, #1
	mov	x4, x19
	bl	_ywrite
	ldr	x1, [x24, #112]
	add	x0, sp, #16
	mov	w2, #4
	mov	w3, #64
	mov	x4, x19
	bl	_ywrite
	mov	x0, x19
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_StateFinishHeader
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_scsp_thread_running,8,3        ; @scsp_thread_running
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCSP"

	.comm	_m68k_running,4,2               ; @m68k_running
	.comm	_M68K,8,3                       ; @M68K
	.comm	_scsp_regcache,8,3              ; @scsp_regcache
	.comm	_SoundRam,8,3                   ; @SoundRam
	.comm	_scsp,160,3                     ; @scsp
	.comm	_SCSP_ENV_RELEASE,8,3           ; @SCSP_ENV_RELEASE
	.comm	_SCSP_ENV_SUSTAIN,8,3           ; @SCSP_ENV_SUSTAIN
	.comm	_SCSP_ENV_DECAY,8,3             ; @SCSP_ENV_DECAY
	.comm	_SCSP_ENV_ATTACK,8,3            ; @SCSP_ENV_ATTACK
.subsections_via_symbols
