	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspInit                       ## -- Begin function ScspInit
	.p2align	4, 0x90
_ScspInit:                              ## @ScspInit
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movl	$524288, %edi                   ## imm = 0x80000
	callq	_T2MemoryInit
	movq	_SoundRam@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movl	$1, %edi
	movl	$48, %esi
	callq	_calloc
	movq	_ScspInternalVars@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	_M68K@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	testq	%rax, %rax
	je	LBB0_3
LBB0_7:
	movl	$-1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	(%r15), %rax
	movq	_c68k_byte_read@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	callq	*48(%rax)
	movq	(%r15), %rax
	movq	_c68k_word_read@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	callq	*40(%rax)
	movq	(%r15), %rax
	movq	_c68k_byte_write@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	callq	*32(%rax)
	movq	(%r15), %rax
	movq	_c68k_word_write@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	callq	*24(%rax)
	movq	(%r15), %rax
	movl	(%rbx), %edx
	xorl	%edi, %edi
	movl	$262144, %esi                   ## imm = 0x40000
	callq	*16(%rax)
	movq	(%r15), %rax
	movl	(%rbx), %edx
	movl	$262144, %edi                   ## imm = 0x40000
	movl	$524288, %esi                   ## imm = 0x80000
	callq	*16(%rax)
	movq	(%r15), %rax
	movl	(%rbx), %edx
	movl	$524288, %edi                   ## imm = 0x80000
	movl	$786432, %esi                   ## imm = 0xC0000
	callq	*16(%rax)
	movq	(%r15), %rax
	movl	(%rbx), %edx
	movl	$786432, %edi                   ## imm = 0xC0000
	movl	$1048576, %esi                  ## imm = 0x100000
	callq	*16(%rax)
	movq	_IsM68KRunning@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	(%rbx), %rdi
	movq	_c68k_interrupt_handler@GOTPCREL(%rip), %rsi
	movq	_scu_interrupt_handler@GOTPCREL(%rip), %rdx
	callq	_scsp_init
	movq	(%r12), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rax)
	movq	_MAX_BREAKPOINTS@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_6
## %bb.4:
	movq	24(%rax), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rdx,%rsi,4)
	incq	%rsi
	movslq	(%rcx), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_5
LBB0_6:
	movups	%xmm0, (%rax)
	movq	$0, 16(%rax)
	movq	(%r15), %rax
	movl	8(%rax), %eax
	movq	_m68kexecptr@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_scspsoundlen@GOTPCREL(%rip), %rax
	movl	$735, (%rax)                    ## imm = 0x2DF
	movq	_scsplines@GOTPCREL(%rip), %rax
	movl	$263, (%rax)                    ## imm = 0x107
	movq	_scspsoundbufs@GOTPCREL(%rip), %rax
	movl	$10, (%rax)
	movq	_scspsoundbufsize@GOTPCREL(%rip), %rax
	movl	$7350, (%rax)                   ## imm = 0x1CB6
	xorl	%eax, %eax
	callq	_scsp_alloc_bufs
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	movq	_scspsoundgenpos@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_scspsoundoutleft@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_scspframeaccurate@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ScspChangeSoundCore            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SoundRam,8,3                   ## @SoundRam
	.comm	_ScspInternalVars,8,3           ## @ScspInternalVars
	.comm	_M68K,8,3                       ## @M68K
	.comm	_c68k_byte_read,8,3             ## @c68k_byte_read
	.comm	_c68k_word_read,8,3             ## @c68k_word_read
	.comm	_c68k_byte_write,8,3            ## @c68k_byte_write
	.comm	_c68k_word_write,8,3            ## @c68k_word_write
	.comm	_IsM68KRunning,8,3              ## @IsM68KRunning
	.comm	_c68k_interrupt_handler,4,2     ## @c68k_interrupt_handler
	.comm	_scu_interrupt_handler,4,2      ## @scu_interrupt_handler
	.comm	_MAX_BREAKPOINTS,4,2            ## @MAX_BREAKPOINTS
	.comm	_m68kexecptr,4,2                ## @m68kexecptr
	.comm	_scspsoundlen,4,2               ## @scspsoundlen
	.comm	_scsplines,4,2                  ## @scsplines
	.comm	_scspsoundbufs,4,2              ## @scspsoundbufs
	.comm	_scspsoundbufsize,4,2           ## @scspsoundbufsize
	.comm	_scspsoundgenpos,8,3            ## @scspsoundgenpos
	.comm	_scspsoundoutleft,8,3           ## @scspsoundoutleft
	.comm	_scspframeaccurate,8,3          ## @scspframeaccurate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspInit                       ; -- Begin function ScspInit
	.p2align	2
_ScspInit:                              ; @ScspInit
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	mov	w0, #524288
	bl	_T2MemoryInit
Lloh0:
	adrp	x21, _SoundRam@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SoundRam@GOTPAGEOFF]
	str	x0, [x21]
	cbz	x0, LBB0_3
; %bb.1:
	mov	w0, #1
	mov	w1, #48
	bl	_calloc
Lloh2:
	adrp	x22, _ScspInternalVars@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ScspInternalVars@GOTPAGEOFF]
	str	x0, [x22]
	cbz	x0, LBB0_3
; %bb.2:
Lloh4:
	adrp	x20, _M68K@GOTPAGE
Lloh5:
	ldr	x20, [x20, _M68K@GOTPAGEOFF]
	ldr	x8, [x20]
	ldr	x8, [x8]
	blr	x8
	cbz	x0, LBB0_4
LBB0_3:
	mov	w0, #-1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x8, [x20]
	ldr	x8, [x8, #48]
Lloh6:
	adrp	x9, _c68k_byte_read@GOTPAGE
Lloh7:
	ldr	x9, [x9, _c68k_byte_read@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x9]
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #40]
Lloh9:
	adrp	x9, _c68k_word_read@GOTPAGE
Lloh10:
	ldr	x9, [x9, _c68k_word_read@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x9]
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #32]
Lloh12:
	adrp	x9, _c68k_byte_write@GOTPAGE
Lloh13:
	ldr	x9, [x9, _c68k_byte_write@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x9]
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #24]
Lloh15:
	adrp	x9, _c68k_word_write@GOTPAGE
Lloh16:
	ldr	x9, [x9, _c68k_word_write@GOTPAGEOFF]
Lloh17:
	ldr	x0, [x9]
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w2, [x21]
	mov	w0, #0
	mov	w1, #262144
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w2, [x21]
	mov	w0, #262144
	mov	w1, #524288
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w2, [x21]
	mov	w0, #524288
	mov	w1, #786432
	blr	x8
	ldr	x8, [x20]
	ldr	x8, [x8, #16]
	ldr	w2, [x21]
	mov	w0, #786432
	mov	w1, #1048576
	blr	x8
Lloh18:
	adrp	x8, _IsM68KRunning@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IsM68KRunning@GOTPAGEOFF]
Lloh20:
	str	xzr, [x8]
	ldr	x0, [x21]
Lloh21:
	adrp	x1, _c68k_interrupt_handler@GOTPAGE
Lloh22:
	ldr	x1, [x1, _c68k_interrupt_handler@GOTPAGEOFF]
Lloh23:
	adrp	x2, _scu_interrupt_handler@GOTPAGE
Lloh24:
	ldr	x2, [x2, _scu_interrupt_handler@GOTPAGEOFF]
	bl	_scsp_init
	ldr	x8, [x22]
	stp	xzr, xzr, [x8, #32]
Lloh25:
	adrp	x9, _MAX_BREAKPOINTS@GOTPAGE
Lloh26:
	ldr	x9, [x9, _MAX_BREAKPOINTS@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x10, #0
	ldr	x11, [x8, #24]
	mov	w12, #-1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	w12, [x11, x10, lsl #2]
	add	x10, x10, #1
	ldrsw	x13, [x9]
	cmp	x10, x13
	b.lt	LBB0_6
LBB0_7:
	stp	xzr, xzr, [x8]
	str	xzr, [x8, #16]
	ldr	x8, [x20]
Lloh27:
	adrp	x9, _m68kexecptr@GOTPAGE
Lloh28:
	ldr	x9, [x9, _m68kexecptr@GOTPAGEOFF]
	ldr	w8, [x8, #8]
Lloh29:
	str	w8, [x9]
Lloh30:
	adrp	x8, _scspsoundlen@GOTPAGE
Lloh31:
	ldr	x8, [x8, _scspsoundlen@GOTPAGEOFF]
	mov	w9, #735
Lloh32:
	str	w9, [x8]
Lloh33:
	adrp	x8, _scsplines@GOTPAGE
Lloh34:
	ldr	x8, [x8, _scsplines@GOTPAGEOFF]
	mov	w9, #263
Lloh35:
	str	w9, [x8]
Lloh36:
	adrp	x8, _scspsoundbufs@GOTPAGE
Lloh37:
	ldr	x8, [x8, _scspsoundbufs@GOTPAGEOFF]
	mov	w9, #10
Lloh38:
	str	w9, [x8]
Lloh39:
	adrp	x8, _scspsoundbufsize@GOTPAGE
Lloh40:
	ldr	x8, [x8, _scspsoundbufsize@GOTPAGEOFF]
	mov	w9, #7350
Lloh41:
	str	w9, [x8]
	bl	_scsp_alloc_bufs
	tbnz	x0, #63, LBB0_3
; %bb.8:
Lloh42:
	adrp	x8, _scspsoundgenpos@GOTPAGE
Lloh43:
	ldr	x8, [x8, _scspsoundgenpos@GOTPAGEOFF]
Lloh44:
	adrp	x9, _scspsoundoutleft@GOTPAGE
Lloh45:
	ldr	x9, [x9, _scspsoundoutleft@GOTPAGEOFF]
Lloh46:
	str	xzr, [x8]
Lloh47:
	str	xzr, [x9]
Lloh48:
	adrp	x8, _scspframeaccurate@GOTPAGE
Lloh49:
	ldr	x8, [x8, _scspframeaccurate@GOTPAGEOFF]
Lloh50:
	str	xzr, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ScspChangeSoundCore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotStr	Lloh44, Lloh45, Lloh47
	.loh AdrpLdrGotStr	Lloh42, Lloh43, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_SoundRam,8,3                   ; @SoundRam
	.comm	_ScspInternalVars,8,3           ; @ScspInternalVars
	.comm	_M68K,8,3                       ; @M68K
	.comm	_c68k_byte_read,8,3             ; @c68k_byte_read
	.comm	_c68k_word_read,8,3             ; @c68k_word_read
	.comm	_c68k_byte_write,8,3            ; @c68k_byte_write
	.comm	_c68k_word_write,8,3            ; @c68k_word_write
	.comm	_IsM68KRunning,8,3              ; @IsM68KRunning
	.comm	_c68k_interrupt_handler,4,2     ; @c68k_interrupt_handler
	.comm	_scu_interrupt_handler,4,2      ; @scu_interrupt_handler
	.comm	_MAX_BREAKPOINTS,4,2            ; @MAX_BREAKPOINTS
	.comm	_m68kexecptr,4,2                ; @m68kexecptr
	.comm	_scspsoundlen,4,2               ; @scspsoundlen
	.comm	_scsplines,4,2                  ; @scsplines
	.comm	_scspsoundbufs,4,2              ; @scspsoundbufs
	.comm	_scspsoundbufsize,4,2           ; @scspsoundbufsize
	.comm	_scspsoundgenpos,8,3            ; @scspsoundgenpos
	.comm	_scspsoundoutleft,8,3           ; @scspsoundoutleft
	.comm	_scspframeaccurate,8,3          ; @scspframeaccurate
.subsections_via_symbols
