	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspExec                       ## -- Begin function ScspExec
	.p2align	4, 0x90
_ScspExec:                              ## @ScspExec
	.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	_scspsoundlen@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	shll	$16, %ecx
	movq	_scsplines@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	addl	%ecx, %eax
	cltd
	idivl	%esi
	movq	_ScspInternalVars@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	addl	(%rcx), %eax
	movl	%eax, (%rcx)
	sarl	$16, %eax
	movl	%eax, %edi
	callq	_scsp_update_timer
	movq	(%rbx), %rax
	movzwl	(%rax), %ecx
	movl	%ecx, (%rax)
	movl	4(%rax), %ecx
	incl	%ecx
	movl	%ecx, 4(%rax)
	subl	(%r14), %ecx
	jl	LBB0_7
## %bb.1:
	movl	%ecx, 4(%rax)
	movl	$0, (%rax)
	movq	_scspframeaccurate@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.2:
	movq	_scspsoundgenpos@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	(%r15), %edx
	leal	(%rdx,%rax), %esi
	movq	_scspsoundbufsize@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %esi
	jle	LBB0_4
## %bb.3:
	movl	$0, (%r12)
	xorl	%eax, %eax
LBB0_4:
	movq	_scspsoundoutleft@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	addl	%edx, %esi
	subl	%ecx, %esi
	jle	LBB0_6
## %bb.5:
	movslq	%esi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_SCSPLOG
	subl	%ebx, (%r13)
	movl	(%r12), %eax
	movl	(%r15), %edx
LBB0_6:
	movq	_scspchannel@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rbx
	shlq	$2, %rbx
	movq	(%rcx), %r14
	addq	%rbx, %r14
	addq	8(%rcx), %rbx
	shll	$2, %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	movl	(%r15), %edx
	shll	$2, %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	(%r15), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_scsp_update
	movl	(%r15), %eax
	addl	%eax, (%r12)
	addl	%eax, (%r13)
LBB0_7:
	movq	_scspframeaccurate@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.8:
	movq	_scspsoundoutleft@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_16
## %bb.9:
	movq	_SNDCore@GOTPCREL(%rip), %r15
	movq	_scspsoundbufsize@GOTPCREL(%rip), %r13
	movq	_scspchannel@GOTPCREL(%rip), %r12
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r15), %rax
	movq	(%r12), %rcx
	shlq	$2, %rsi
	movq	(%rcx), %rdi
	addq	%rsi, %rdi
	addq	8(%rcx), %rsi
	movl	%ebx, %edx
	callq	*8(%rax)
	subl	%ebx, (%r14)
	jle	LBB0_16
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	testl	%eax, %eax
	jle	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_scspsoundgenpos@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	movslq	(%r14), %rcx
	subq	%rcx, %rsi
	cmpl	%ecx, %eax
	cmovgel	%ecx, %eax
	movslq	%eax, %rcx
	movslq	(%r13), %rbx
	subq	%rsi, %rbx
	cmpq	%rcx, %rbx
	jb	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_14:
	movq	_SNDCore@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	(%r15), %ebx
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	movq	_scspchannel@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax), %rdi
	leal	(,%rbx,4), %r14d
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	(%r15), %rax
	movq	8(%rax), %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_memset
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	8(%rax), %rsi
	movl	%ebx, %edx
	callq	_scsp_update
	movq	(%r12), %rax
	movq	(%r15), %rcx
	movq	(%rcx), %rdi
	movq	8(%rcx), %rsi
	movl	%ebx, %edx
	callq	*8(%rax)
LBB0_16:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scsp_update_monitor            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_scspsoundlen,4,2               ## @scspsoundlen
	.comm	_scsplines,4,2                  ## @scsplines
	.comm	_ScspInternalVars,8,3           ## @ScspInternalVars
	.comm	_scspframeaccurate,8,3          ## @scspframeaccurate
	.comm	_scspsoundgenpos,4,2            ## @scspsoundgenpos
	.comm	_scspsoundbufsize,4,2           ## @scspsoundbufsize
	.comm	_scspsoundoutleft,4,2           ## @scspsoundoutleft
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: Sound buffer overrun, %lu samples\n"

	.comm	_scspchannel,8,3                ## @scspchannel
	.comm	_SNDCore,8,3                    ## @SNDCore
	.comm	_stereodata16,8,3               ## @stereodata16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScspExec                       ; -- Begin function ScspExec
	.p2align	2
_ScspExec:                              ; @ScspExec
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x21, _scspsoundlen@GOTPAGE
Lloh1:
	ldr	x21, [x21, _scspsoundlen@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x19, _scsplines@GOTPAGE
Lloh3:
	ldr	x19, [x19, _scsplines@GOTPAGEOFF]
	ldr	w9, [x19]
	cmp	w9, #0
	cinc	w10, w9, lt
	asr	w10, w10, #1
	add	w8, w10, w8, lsl #16
Lloh4:
	adrp	x20, _ScspInternalVars@GOTPAGE
Lloh5:
	ldr	x20, [x20, _ScspInternalVars@GOTPAGEOFF]
	sdiv	w8, w8, w9
	ldr	x9, [x20]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
	asr	w0, w8, #16
	bl	_scsp_update_timer
	ldr	x8, [x20]
	ldrh	w9, [x8]
	ldr	w10, [x8, #4]
	add	w10, w10, #1
	stp	w9, w10, [x8]
	ldr	w9, [x19]
Lloh6:
	adrp	x22, _scspframeaccurate@GOTPAGE
Lloh7:
	ldr	x22, [x22, _scspframeaccurate@GOTPAGEOFF]
	subs	w9, w10, w9
	b.lt	LBB0_7
; %bb.1:
	stp	wzr, w9, [x8]
	ldr	x8, [x22]
	cbz	x8, LBB0_12
; %bb.2:
Lloh8:
	adrp	x23, _scspsoundgenpos@GOTPAGE
Lloh9:
	ldr	x23, [x23, _scspsoundgenpos@GOTPAGEOFF]
	ldr	w9, [x23]
	ldr	w8, [x21]
Lloh10:
	adrp	x10, _scspsoundbufsize@GOTPAGE
Lloh11:
	ldr	x10, [x10, _scspsoundbufsize@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	add	w11, w8, w9
	cmp	w11, w10
	b.le	LBB0_4
; %bb.3:
	mov	w9, #0
	str	wzr, [x23]
LBB0_4:
Lloh13:
	adrp	x24, _scspsoundoutleft@GOTPAGE
Lloh14:
	ldr	x24, [x24, _scspsoundoutleft@GOTPAGEOFF]
	ldr	w11, [x24]
	add	w11, w11, w8
	subs	w19, w11, w10
	b.le	LBB0_6
; %bb.5:
	sxtw	x1, w19
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_SCSPLOG
	ldr	w8, [x24]
	sub	w8, w8, w19
	str	w8, [x24]
	ldr	w9, [x23]
	ldr	w8, [x21]
LBB0_6:
Lloh17:
	adrp	x10, _scspchannel@GOTPAGE
Lloh18:
	ldr	x10, [x10, _scspchannel@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	sbfiz	x9, x9, #2, #32
	ldp	x11, x10, [x10]
	add	x19, x11, x9
	add	x20, x10, x9
	lsl	w2, w8, #2
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	w8, [x21]
	lsl	w2, w8, #2
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_scsp_update
	ldr	w8, [x21]
	ldr	w9, [x23]
	add	w9, w9, w8
	str	w9, [x23]
	ldr	w9, [x24]
	add	w8, w9, w8
	str	w8, [x24]
LBB0_7:
	ldr	x8, [x22]
	cbz	x8, LBB0_12
; %bb.8:
Lloh20:
	adrp	x20, _scspsoundoutleft@GOTPAGE
Lloh21:
	ldr	x20, [x20, _scspsoundoutleft@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.9:
Lloh22:
	adrp	x21, _SNDCore@GOTPAGE
Lloh23:
	ldr	x21, [x21, _SNDCore@GOTPAGEOFF]
Lloh24:
	adrp	x22, _scspsoundgenpos@GOTPAGE
Lloh25:
	ldr	x22, [x22, _scspsoundgenpos@GOTPAGEOFF]
Lloh26:
	adrp	x23, _scspsoundbufsize@GOTPAGE
Lloh27:
	ldr	x23, [x23, _scspsoundbufsize@GOTPAGEOFF]
Lloh28:
	adrp	x24, _scspchannel@GOTPAGE
Lloh29:
	ldr	x24, [x24, _scspchannel@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8]
	blr	x8
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldrsw	x8, [x22]
	ldrsw	x9, [x20]
	cmp	w0, w9
	csel	w10, w0, w9, lt
	ldrsw	x11, [x23]
	sub	x8, x8, x9
	sub	x9, x11, x8
	cmp	x9, w10, sxtw
	csel	w19, w9, w10, lo
	ldr	x9, [x21]
	ldr	x9, [x9, #8]
	ldr	x10, [x24]
	lsl	x8, x8, #2
	ldp	x11, x10, [x10]
	add	x0, x11, x8
	add	x1, x10, x8
	mov	x2, x19
	blr	x9
	ldr	w8, [x20]
	sub	w8, w8, w19
	str	w8, [x20]
	cmp	w8, #0
	b.gt	LBB0_10
	b	LBB0_14
LBB0_12:
Lloh30:
	adrp	x22, _SNDCore@GOTPAGE
Lloh31:
	ldr	x22, [x22, _SNDCore@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x8, [x8]
	blr	x8
	cbz	w0, LBB0_14
; %bb.13:
	ldr	w8, [x21]
	cmp	w0, w8
	csel	w19, w0, w8, lt
Lloh32:
	adrp	x21, _scspchannel@GOTPAGE
Lloh33:
	ldr	x21, [x21, _scspchannel@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x0, [x8]
	lsl	w20, w19, #2
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	ldr	x8, [x21]
	ldr	x0, [x8, #8]
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	ldr	x8, [x21]
	ldp	x0, x1, [x8]
	mov	x2, x19
	bl	_scsp_update
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldr	x9, [x21]
	ldp	x0, x1, [x9]
	mov	x2, x19
	blr	x8
LBB0_14:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_scsp_update_monitor
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_scspsoundlen,4,2               ; @scspsoundlen
	.comm	_scsplines,4,2                  ; @scsplines
	.comm	_ScspInternalVars,8,3           ; @ScspInternalVars
	.comm	_scspframeaccurate,8,3          ; @scspframeaccurate
	.comm	_scspsoundgenpos,4,2            ; @scspsoundgenpos
	.comm	_scspsoundbufsize,4,2           ; @scspsoundbufsize
	.comm	_scspsoundoutleft,4,2           ; @scspsoundoutleft
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: Sound buffer overrun, %lu samples\n"

	.comm	_scspchannel,8,3                ; @scspchannel
	.comm	_SNDCore,8,3                    ; @SNDCore
	.comm	_stereodata16,8,3               ; @stereodata16
.subsections_via_symbols
