	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scd_reset                      ## -- Begin function scd_reset
	.p2align	4, 0x90
_scd_reset:                             ## @scd_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %eax
	movq	_scd@GOTPCREL(%rip), %rbx
	movq	32(%rbx), %rdi
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	$0, 56(%rbx)
	movq	_m68k@GOTPCREL(%rip), %r14
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movl	$255, 112(%rax)
	movl	$65535, 114(%rax)               ## imm = 0xFFFF
	movq	32(%rbx), %rax
	movl	$2, (%rax)
	movl	$1, 8(%rax)
	xorl	%edi, %edi
	callq	_word_ram_switch
	movl	48(%rbx), %eax
	addl	$2, %eax
	movq	40(%rbx), %rcx
	movq	8(%r14), %rdx
	leaq	65536(%rcx), %rsi
	cltq
	movq	%rcx, (%rdx,%rax,8)
	movq	%rsi, 8(%rdx,%rax,8)
	movq	%rcx, 32(%rdx,%rax,8)
	movq	%rsi, 40(%rdx,%rax,8)
	movq	%rcx, 64(%rdx,%rax,8)
	movq	%rsi, 72(%rdx,%rax,8)
	movq	%rcx, 96(%rdx,%rax,8)
	movq	%rsi, 104(%rdx,%rax,8)
	movq	%rcx, 128(%rdx,%rax,8)
	movq	%rsi, 136(%rdx,%rax,8)
	movq	%rcx, 160(%rdx,%rax,8)
	movq	%rsi, 168(%rdx,%rax,8)
	movq	%rcx, 192(%rdx,%rax,8)
	movq	%rsi, 200(%rdx,%rax,8)
	movq	%rcx, 224(%rdx,%rax,8)
	movq	%rsi, 232(%rdx,%rax,8)
	jmp	LBB0_3
LBB0_1:
	addq	$16, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
LBB0_3:
	movq	32(%rbx), %rax
	movl	$65535, 40(%rax)                ## imm = 0xFFFF
	movl	$256, 216(%rax)                 ## imm = 0x100
	movl	$15, 256(%rax)
	movl	$65535, 264(%rax)               ## imm = 0xFFFF
	movl	$65535, 272(%rax)               ## imm = 0xFFFF
	movl	$65535, 280(%rax)               ## imm = 0xFFFF
	movl	$65535, 288(%rax)               ## imm = 0xFFFF
	movl	$65535, 296(%rax)               ## imm = 0xFFFF
	movabsq	$281470681743361, %rcx          ## imm = 0xFFFF00000001
	movq	%rcx, 28(%rax)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movups	%xmm0, (%rbx)
	movq	_m68k@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_s68k@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	xorl	%eax, %eax
	callq	_cdd_reset
	xorl	%eax, %eax
	callq	_cdc_reset
	xorl	%eax, %eax
	callq	_gfx_reset
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pcm_reset                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_scd,64,3                       ## @scd
	.comm	_m68k,16,3                      ## @m68k
	.comm	_s68k,8,2                       ## @s68k
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function scd_reset
lCPI0_0:
	.long	1                               ; 0x1
	.long	65535                           ; 0xffff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_scd_reset
	.p2align	2
_scd_reset:                             ; @scd_reset
	.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, x0
Lloh0:
	adrp	x19, _scd@GOTPAGE
Lloh1:
	ldr	x19, [x19, _scd@GOTPAGEOFF]
	ldr	x0, [x19, #32]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh2:
	adrp	x20, _m68k@GOTPAGE
Lloh3:
	ldr	x20, [x20, _m68k@GOTPAGEOFF]
	str	xzr, [x19, #56]
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	mov	w9, #255
	str	w9, [x8, #112]
	mov	w9, #65535
	stur	w9, [x8, #114]
	ldr	x8, [x19, #32]
	mov	w9, #2
	str	w9, [x8]
	mov	w9, #1
	str	w9, [x8, #8]
	mov	w0, #0
	bl	_word_ram_switch
	ldr	w8, [x19, #48]
	add	w8, w8, #2
	ldr	x9, [x19, #40]
	ldr	x10, [x20, #8]
	add	x11, x9, #16, lsl #12           ; =65536
	add	x8, x10, w8, sxtw #3
	stp	x9, x11, [x8]
	stp	x9, x11, [x8, #32]
	stp	x9, x11, [x8, #64]
	stp	x9, x11, [x8, #96]
	stp	x9, x11, [x8, #128]
	stp	x9, x11, [x8, #160]
	stp	x9, x11, [x8, #192]
	stp	x9, x11, [x8, #224]
	b	LBB0_3
LBB0_2:
	add	x0, x0, #16
	mov	w1, #0
	mov	w2, #4
	bl	_memset
LBB0_3:
	ldr	x8, [x19, #32]
	mov	w9, #65535
	str	w9, [x8, #40]
	mov	w10, #256
	str	w10, [x8, #216]
	mov	w10, #15
	str	w10, [x8, #256]
	str	w9, [x8, #264]
	str	w9, [x8, #272]
	str	w9, [x8, #280]
	str	w9, [x8, #288]
	str	w9, [x8, #296]
Lloh4:
	adrp	x9, lCPI0_0@PAGE
Lloh5:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	stur	d0, [x8, #28]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19]
Lloh6:
	adrp	x0, _m68k@GOTPAGE
Lloh7:
	ldr	x0, [x0, _m68k@GOTPAGEOFF]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh8:
	adrp	x0, _s68k@GOTPAGE
Lloh9:
	ldr	x0, [x0, _s68k@GOTPAGEOFF]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	bl	_cdd_reset
	bl	_cdc_reset
	bl	_gfx_reset
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pcm_reset
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdr	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_scd,64,3                       ; @scd
	.comm	_m68k,16,3                      ; @m68k
	.comm	_s68k,8,2                       ; @s68k
.subsections_via_symbols
