	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_sample                ## -- Begin function generate_sample
	.p2align	4, 0x90
_generate_sample:                       ## @generate_sample
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -76(%rbp)                 ## 4-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movl	$31, %r14d
	xorl	%eax, %eax
	movq	_scsp_dsp@GOTPCREL(%rip), %r13
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rax
	shlq	$3, %r15
	leaq	(%r15,%r15,4), %r15
	movl	24(%rax,%r15), %edi
	callq	_get_sdl_shift
	movq	(%r12), %rcx
	movl	20(%rcx,%r15), %edi
	movl	32(%rcx,%r15), %r13d
	movl	%r13d, %ebx
	movl	%eax, %ecx
	sarl	%cl, %ebx
	callq	_get_sdl_shift
	movl	%eax, %ecx
	sarl	%cl, %r13d
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movq	(%r12), %rax
	movl	16(%rax,%r15), %edi
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_get_panning
	movzbl	-48(%rbp), %ecx
	movl	%ebx, %eax
	sarl	%cl, %eax
	sarl	$2, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, (%rcx)
	movzbl	-44(%rbp), %ecx
	sarl	%cl, %ebx
	sarl	$2, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%ebx, (%rax)
	shll	$4, %r13d
	movslq	%r13d, %rax
	movq	_scsp_dsp@GOTPCREL(%rip), %r13
	movq	24(%r13), %rcx
	movq	(%r12), %rdx
	movq	(%rdx,%r15), %rdx
	addq	%rax, (%rcx,%rdx,8)
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%r14
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rax
	cmpq	$63, %r14
	je	LBB0_5
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	leal	-5(%r14), %r15d
	andl	$31, %r15d
	movq	(%r12), %rdi
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	addq	%rax, %rdi
	callq	_op1
	movl	%r14d, %eax
	andl	$31, %eax
	leaq	(%rax,%rax,4), %rdi
	shlq	$3, %rdi
	addq	(%r12), %rdi
	movq	%r12, %rsi
	callq	_op2
	leal	-1(%r14), %eax
	andl	$31, %eax
	leaq	(%rax,%rax,4), %rdi
	shlq	$3, %rdi
	addq	(%r12), %rdi
	callq	_op3
	leal	-2(%r14), %eax
	andl	$31, %eax
	leaq	(%rax,%rax,4), %rdi
	shlq	$3, %rdi
	addq	(%r12), %rdi
	callq	_op4
	leal	-3(%r14), %eax
	andl	$31, %eax
	leaq	(%rax,%rax,4), %rdi
	shlq	$3, %rdi
	addq	(%r12), %rdi
	callq	_op5
	leal	-4(%r14), %eax
	andl	$31, %eax
	leaq	(%rax,%rax,4), %rdi
	shlq	$3, %rdi
	addq	(%r12), %rdi
	callq	_op6
	leaq	(%r15,%r15,4), %rbx
	leaq	(,%rbx,8), %rdi
	addq	(%r12), %rdi
	movq	%r12, %rsi
	callq	_op7
	movq	_new_scsp@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rax
	movl	28(%rax,%rbx,8), %edi
	callq	_scsp_debug_instrument_check_is_muted
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_3
LBB0_5:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movl	-72(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r13)
	movq	8(%r13), %rax
	movl	16(%rbp), %ecx
	movl	%ecx, (%rax)
	movl	24(%rbp), %ecx
	movl	%ecx, 4(%rax)
	xorl	%ebx, %ebx
	movq	_SoundRam@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_ScspDspExec
	incl	%ebx
	cmpl	$128, %ebx
	jne	LBB0_6
## %bb.7:
	decl	32(%r13)
	movq	24(%r13), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, 112(%rax)
	movups	%xmm0, 96(%rax)
	movups	%xmm0, 80(%rax)
	movups	%xmm0, 64(%rax)
	movups	%xmm0, 48(%rax)
	movups	%xmm0, 32(%rax)
	movups	%xmm0, 16(%rax)
	movups	%xmm0, (%rax)
	xorl	%r13d, %r13d
	leaq	-44(%rbp), %r14
	xorl	%r15d, %r15d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_scsp_dsp@GOTPCREL(%rip), %rcx
	movq	8(%rcx), %rcx
	addq	$4, %rcx
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rcx), %ebx
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %ecx
	sarl	%cl, %ebx
	movq	(%r12), %rax
	movl	8(%rax,%r13), %edi
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdx
	callq	_get_panning
	movzbl	-48(%rbp), %ecx
	movl	%ebx, %eax
	sarl	%cl, %eax
	movzbl	-44(%rbp), %ecx
	sarl	%cl, %ebx
	sarl	$2, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, (%rcx)
	sarl	$2, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%ebx, (%rax)
	incq	%r15
	addq	$40, %r13
	cmpq	$18, %r15
	je	LBB0_14
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	12(%rax,%r13), %edi
	callq	_get_sdl_shift
	movq	_scsp_dsp@GOTPCREL(%rip), %rcx
	movq	16(%rcx), %rcx
	movl	(%rcx,%r15,4), %ebx
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	cmpl	$17, %r15d
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$16, %r15d
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_scsp_dsp@GOTPCREL(%rip), %rcx
	movq	8(%rcx), %rcx
	jmp	LBB0_12
LBB0_14:
	movb	$15, %cl
	subb	-76(%rbp), %cl                  ## 1-byte Folded Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	sarl	%cl, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	sarl	%cl, (%rax)
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_new_scsp,8,3                   ## @new_scsp
	.comm	_scsp_dsp,40,3                  ## @scsp_dsp
	.comm	_SoundRam,4,2                   ## @SoundRam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_sample                ; -- Begin function generate_sample
	.p2align	2
_generate_sample:                       ; @generate_sample
	.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
	stp	w6, w7, [sp, #12]               ; 8-byte Folded Spill
	str	w5, [sp, #20]                   ; 4-byte Folded Spill
	mov	x19, x4
	mov	x20, x3
	stp	w1, w2, [sp, #4]                ; 8-byte Folded Spill
	mov	x22, x0
	mov	x28, #0
	mov	w21, #31
	mov	w24, #40
Lloh0:
	adrp	x23, _scsp_dsp@GOTPAGE
Lloh1:
	ldr	x23, [x23, _scsp_dsp@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	add	x9, x26, x26, lsl #2
	lsl	x26, x9, #3
	add	x8, x8, x26
	ldr	w0, [x8, #24]
	bl	_get_sdl_shift
	ldr	x8, [x22]
	add	x8, x8, x26
	ldr	w27, [x8, #32]
	asr	w25, w27, w0
	ldr	w0, [x8, #20]
	bl	_get_sdl_shift
	asr	w27, w27, w0
	str	xzr, [sp, #24]
	ldr	x8, [x22]
	add	x8, x8, x26
	ldr	w0, [x8, #16]
	add	x1, sp, #28
	add	x2, sp, #24
	bl	_get_panning
	ldr	w8, [x20]
	ldr	w9, [sp, #28]
	asr	w9, w25, w9
	add	w8, w8, w9, asr #2
	str	w8, [x20]
	ldr	w8, [x19]
	ldr	w9, [sp, #24]
	asr	w9, w25, w9
	add	w8, w8, w9, asr #2
	str	w8, [x19]
	lsl	w8, w27, #4
	ldr	x9, [x23, #24]
	ldr	x10, [x22]
	ldr	x10, [x10, x26]
	lsl	x10, x10, #3
	ldr	x11, [x9, x10]
	add	x8, x11, w8, sxtw
	str	x8, [x9, x10]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	x28, x28, #40
	cmp	x21, #63
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w21, #5
	and	x26, x8, #0x1f
	ldr	x8, [x22]
	add	x0, x8, x28
	bl	_op1
	ldr	x8, [x22]
	and	x9, x21, #0x1f
	madd	x0, x9, x24, x8
	mov	x1, x22
	bl	_op2
	ldr	x8, [x22]
	sub	w9, w21, #1
	and	x9, x9, #0x1f
	madd	x0, x9, x24, x8
	bl	_op3
	ldr	x8, [x22]
	sub	w9, w21, #2
	and	x9, x9, #0x1f
	madd	x0, x9, x24, x8
	bl	_op4
	ldr	x8, [x22]
	sub	w9, w21, #3
	and	x9, x9, #0x1f
	madd	x0, x9, x24, x8
	bl	_op5
	ldr	x8, [x22]
	sub	w9, w21, #4
	and	x9, x9, #0x1f
	madd	x0, x9, x24, x8
	bl	_op6
	ldr	x8, [x22]
	madd	x0, x26, x24, x8
	mov	x1, x22
	bl	_op7
Lloh2:
	adrp	x8, _new_scsp@GOTPAGE
Lloh3:
	ldr	x8, [x8, _new_scsp@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbz	x8, LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	madd	x8, x26, x24, x8
	ldr	w0, [x8, #28]
	bl	_scsp_debug_instrument_check_is_muted
	cbnz	x0, LBB0_2
	b	LBB0_1
LBB0_5:
	mov	w28, #0
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	stp	w9, w8, [x23]
	ldr	x8, [x23, #8]
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	stp	w10, w9, [x8]
Lloh5:
	adrp	x21, _SoundRam@GOTPAGE
Lloh6:
	ldr	x21, [x21, _SoundRam@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	mov	x0, x23
	mov	x1, x28
	bl	_ScspDspExec
	add	w28, w28, #1
	cmp	w28, #128
	b.ne	LBB0_6
; %bb.7:
	mov	x21, #0
	mov	x24, #0
	ldr	w8, [x23, #32]
	sub	w8, w8, #1
	str	w8, [x23, #32]
	ldr	x8, [x23, #24]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x8, #96]
	stp	q0, q0, [x8, #64]
	stp	q0, q0, [x8, #32]
	stp	q0, q0, [x8]
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x23, #8]
	add	x8, x8, #4
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x8]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	asr	w25, w8, w0
	ldr	x8, [x22]
	add	x8, x8, x21
	ldr	w0, [x8, #8]
	add	x1, sp, #28
	add	x2, sp, #24
	bl	_get_panning
	ldp	w9, w8, [sp, #24]
	asr	w8, w25, w8
	asr	w9, w25, w9
	ldr	w10, [x20]
	add	w8, w10, w8, asr #2
	str	w8, [x20]
	ldr	w8, [x19]
	add	w8, w8, w9, asr #2
	str	w8, [x19]
	add	x24, x24, #1
	add	x21, x21, #40
	cmp	x24, #18
	b.eq	LBB0_14
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x8, x8, x21
	ldr	w0, [x8, #12]
	bl	_get_sdl_shift
	ldr	x8, [x23, #16]
	ldr	w8, [x8, x24, lsl #2]
	str	xzr, [sp, #24]
	cmp	w24, #17
	b.eq	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	w24, #16
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x23, #8]
	b	LBB0_9
LBB0_14:
	mov	w8, #15
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	sub	w8, w8, w9
	ldr	w9, [x20]
	asr	w9, w9, w8
	str	w9, [x20]
	ldr	w9, [x19]
	asr	w8, w9, w8
	str	w8, [x19]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_new_scsp,8,3                   ; @new_scsp
	.comm	_scsp_dsp,40,3                  ; @scsp_dsp
	.comm	_SoundRam,4,2                   ; @SoundRam
.subsections_via_symbols
