	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspReceiveCDDA                ## -- Begin function ScspReceiveCDDA
	.p2align	4, 0x90
_ScspReceiveCDDA:                       ## @ScspReceiveCDDA
	.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
	movq	%rdi, %r12
	movq	_cdda_out_left@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	cmpl	$3, %eax
	ja	LBB0_2
## %bb.1:
	movq	_Cs2Area@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	$0, (%rax)
	movl	$1, %edi
	callq	_Cs2SetTiming
	movq	(%r15), %rax
	movl	$1, (%rax)
	jmp	LBB0_6
LBB0_2:
	cmpl	$7, %eax
	jb	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	jmp	LBB0_5
LBB0_4:
	movq	_Cs2Area@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	movl	$1, %edi
LBB0_5:
	callq	_Cs2SetTiming
LBB0_6:
	movq	_cddabuf@GOTPCREL(%rip), %rax
	movq	_cdda_next_in@GOTPCREL(%rip), %r15
	movslq	(%r15), %rdi
	addq	(%rax), %rdi
	movl	$2352, %ebx                     ## imm = 0x930
	movq	%r12, %rsi
	movl	$2352, %edx                     ## imm = 0x930
	callq	_memcpy
	movslq	(%r15), %rax
	leal	2352(%rax), %ecx
	addq	$2344, %rax                     ## imm = 0x928
	xorl	%edx, %edx
	cmpq	$2353, %rax                     ## imm = 0x931
	cmovael	%ecx, %edx
	movl	%edx, (%r15)
	addl	(%r14), %ebx
	movl	%ebx, (%r14)
	cmpl	$9, %ebx
	jb	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_SCSPLOG
	movl	$8, (%r14)
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cdda_out_left,4,2              ## @cdda_out_left
	.comm	_Cs2Area,8,3                    ## @Cs2Area
	.comm	_cddabuf,8,3                    ## @cddabuf
	.comm	_cdda_next_in,4,2               ## @cdda_next_in
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: CDDA buffer overrun\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspReceiveCDDA                ; -- Begin function ScspReceiveCDDA
	.p2align	2
_ScspReceiveCDDA:                       ; @ScspReceiveCDDA
	.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
Lloh0:
	adrp	x20, _cdda_out_left@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cdda_out_left@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #3
	b.hi	LBB0_2
; %bb.1:
Lloh2:
	adrp	x21, _Cs2Area@GOTPAGE
Lloh3:
	ldr	x21, [x21, _Cs2Area@GOTPAGEOFF]
	ldr	x8, [x21]
	str	wzr, [x8]
	mov	w22, #1
	mov	w0, #1
	bl	_Cs2SetTiming
	ldr	x8, [x21]
	str	w22, [x8]
	b	LBB0_6
LBB0_2:
	cmp	w8, #7
	b.lo	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _Cs2Area@GOTPAGE
Lloh5:
	ldr	x8, [x8, _Cs2Area@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	mov	w9, #1
	str	w9, [x8]
	mov	w0, #1
LBB0_5:
	bl	_Cs2SetTiming
LBB0_6:
Lloh7:
	adrp	x8, _cddabuf@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cddabuf@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x21, _cdda_next_in@GOTPAGE
Lloh11:
	ldr	x21, [x21, _cdda_next_in@GOTPAGEOFF]
	ldrsw	x9, [x21]
	add	x0, x8, x9
	mov	x1, x19
	mov	w2, #2352
	bl	_memcpy
	ldrsw	x8, [x21]
	add	x9, x8, #2344
	add	w8, w8, #2352
	cmp	x9, #2353
	csel	w8, wzr, w8, lo
	str	w8, [x21]
	ldr	w8, [x20]
	add	w8, w8, #2352
	str	w8, [x20]
	cmp	w8, #9
	b.lo	LBB0_8
; %bb.7:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SCSPLOG
	mov	w8, #8
	str	w8, [x20]
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cdda_out_left,4,2              ; @cdda_out_left
	.comm	_Cs2Area,8,3                    ; @Cs2Area
	.comm	_cddabuf,8,3                    ; @cddabuf
	.comm	_cdda_next_in,4,2               ; @cdda_next_in
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: CDDA buffer overrun\n"

.subsections_via_symbols
