	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function scsp_slot_set_w
LCPI0_0:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_scsp_slot_set_w:                       ## @scsp_slot_set_w
	.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
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_scsp@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	%esi, %ebx
	andl	$30, %ebx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_SCSPLOG
	movq	_scsp_isr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	$2, %r12d
	movslq	%r12d, %rcx
	movl	%r14d, (%rax,%rcx,4)
	cmpl	$22, %ebx
	ja	LBB0_58
## %bb.1:
	imulq	$184, %r15, %rax
	leaq	(%rax,%r13), %rdi
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rbx,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_2:
	movl	%r14d, %ecx
	shrl	$11, %ecx
	andl	$1, %ecx
	movl	%ecx, (%rdi)
	movl	%r14d, %ecx
	shrl	$9, %ecx
	movl	%r14d, %edx
	shrl	$7, %edx
	movl	%r14d, %esi
	shrl	$5, %esi
	movd	%ecx, %xmm0
	pinsrd	$1, %edx, %xmm0
	pinsrd	$2, %esi, %xmm0
	pinsrd	$3, %r14d, %xmm0
	pand	LCPI0_0(%rip), %xmm0
	movdqu	%xmm0, 4(%r13,%rax)
	movzwl	20(%r13,%rax), %ecx
	movl	%r14d, %edx
	andl	$15, %edx
	shll	$16, %edx
	orl	%ecx, %edx
	movl	%edx, 20(%r13,%rax)
	movq	_SCSP_RAM_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	movl	%edx, 20(%r13,%rax)
	movl	176(%r13,%rax), %eax
	movq	_SCSP_ENV_DE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_4
## %bb.3:
	callq	_scsp_slot_update_keyon
LBB0_4:
	testl	$4096, %r14d                    ## imm = 0x1000
	je	LBB0_58
## %bb.5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scsp_slot_keyonoff             ## TAILCALL
LBB0_6:
	movl	$983040, %ecx                   ## imm = 0xF0000
	andl	20(%r13,%rax), %ecx
	orl	%r14d, %ecx
	movl	%ecx, 20(%r13,%rax)
	movq	_SCSP_RAM_MASK@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	movl	%ecx, 20(%r13,%rax)
	movl	176(%r13,%rax), %eax
	movq	_SCSP_ENV_DE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_58
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scsp_slot_update_keyon         ## TAILCALL
LBB0_8:
	movq	_SCSP_FREQ_LB@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	movl	%r14d, 24(%r13,%rax)
	jmp	LBB0_58
LBB0_9:
	movq	_SCSP_FREQ_LB@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	movl	%r14d, 28(%r13,%rax)
	jmp	LBB0_58
LBB0_10:
	movl	%r14d, %esi
	shrl	$11, %esi
	andl	$31, %esi
	movl	%esi, 32(%r13,%rax)
	movl	%r14d, %ecx
	shrl	$6, %ecx
	andl	$31, %ecx
	movl	%ecx, 36(%r13,%rax)
	movl	%r14d, %edx
	andl	$32, %edx
	movl	%edx, 40(%r13,%rax)
	andl	$31, %r14d
	movl	%r14d, 44(%r13,%rax)
	movq	_scsp_decay_rate@GOTPCREL(%rip), %rbx
	movq	_scsp_null_rate@GOTPCREL(%rip), %rdx
	testl	%esi, %esi
	jne	LBB0_28
## %bb.11:
	movq	(%rdx), %rsi
	jmp	LBB0_29
LBB0_12:
	movl	%r14d, %ecx
	shrl	$8, %ecx
	andl	$64, %ecx
	movl	%r14d, %edx
	shrl	$10, %edx
	andl	$15, %edx
	movl	%edx, %esi
	shrl	$2, %esi
	cmpl	$15, %edx
	movl	$4, %edx
	cmovnel	%esi, %edx
	movl	%ecx, 48(%r13,%rax)
	movl	%edx, 52(%r13,%rax)
	movl	%r14d, %edx
	andl	$992, %edx                      ## imm = 0x3E0
	movq	_SCSP_ENV_LB@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_SCSP_ENV_DS@GOTPCREL(%rip), %rcx
	addl	(%rcx), %edx
	movl	%edx, 56(%r13,%rax)
	andl	$31, %r14d
	movl	%r14d, 60(%r13,%rax)
	jne	LBB0_31
## %bb.13:
	movq	_scsp_null_rate@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	jmp	LBB0_32
LBB0_14:
	movl	%r14d, %ecx
	sarl	$8, %ecx
	movl	%ecx, %edx
	andl	$2, %edx
	movl	%edx, 64(%r13,%rax)
	andl	$1, %ecx
	movl	%ecx, 68(%r13,%rax)
	movq	_scsp_tl_table@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movzbl	%r14b, %edx
	movl	(%rcx,%rdx,4), %ecx
	movl	%ecx, 136(%r13,%rax)
	jmp	LBB0_58
LBB0_15:
	movl	%r14d, %ecx
	shrl	$12, %ecx
	andl	$15, %ecx
	movl	%ecx, 72(%r13,%rax)
	movl	%r14d, %ecx
	shrl	$6, %ecx
	andl	$63, %ecx
	movl	%ecx, 76(%r13,%rax)
	andl	$63, %r14d
	movl	%r14d, 80(%r13,%rax)
	jmp	LBB0_58
LBB0_16:
	leaq	(%rax,%r13), %rcx
	addq	$92, %rcx
	testl	$32768, %r14d                   ## imm = 0x8000
	jne	LBB0_34
## %bb.17:
	cmpl	$-1, (%rcx)
	jne	LBB0_19
## %bb.18:
	movl	$0, 132(%r13,%rax)
LBB0_19:
	movq	_scsp_lfo_step@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%r14d, %esi
	shrl	$10, %esi
	andl	$31, %esi
	movl	(%rdx,%rsi,4), %edx
	movl	%r14d, %esi
	shrl	$5, %esi
	andl	$7, %esi
	leal	7(%rsi), %edi
	testl	%esi, %esi
	movl	$31, %esi
	cmovel	%esi, %edi
	movl	%edx, (%rcx)
	movl	%edi, 96(%r13,%rax)
	movl	%r14d, %ecx
	andl	$7, %ecx
	movl	$11, %edx
	subl	%ecx, %edx
	testl	%ecx, %ecx
	cmovel	%esi, %edx
	movl	%edx, 100(%r13,%rax)
	movl	%r14d, %ecx
	shrl	$8, %ecx
	andl	$3, %ecx
	leaq	l_switch.table.scsp_slot_set_w(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 128(%r13,%rax)
	shrl	$3, %r14d
	andl	$3, %r14d
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%r14,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_20:
	movq	_scsp_lfo_sawt_e@GOTPCREL(%rip), %rcx
	jmp	LBB0_57
LBB0_21:
	andl	$7, %r14d
	je	LBB0_41
## %bb.22:
	xorl	$7, %r14d
	movq	_SCSP_ENV_HB@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r14d
	movl	%r14d, 104(%r13,%rax)
	jmp	LBB0_58
LBB0_23:
	testl	$57344, %r14d                   ## imm = 0xE000
	je	LBB0_42
## %bb.24:
	movl	%r14d, %ecx
	shrl	$13, %ecx
	notl	%ecx
	andl	$7, %ecx
	movq	_SCSP_ENV_HB@GOTPCREL(%rip), %rdx
	addl	(%rdx), %ecx
	movl	%ecx, 112(%r13,%rax)
	movl	%ecx, 108(%r13,%rax)
	movl	%r14d, %esi
	andl	$3840, %esi                     ## imm = 0xF00
	testl	$4096, %r14d                    ## imm = 0x1000
	jne	LBB0_43
## %bb.25:
	leaq	(%rax,%r13), %rdx
	addq	$112, %rdx
	cmpl	$3840, %esi                     ## imm = 0xF00
	je	LBB0_44
LBB0_45:
	movl	%r14d, %esi
	shrl	$9, %esi
	andl	$7, %esi
	addl	%esi, %ecx
	movl	%ecx, (%rdx)
	testb	$-32, %r14b
	jne	LBB0_47
	jmp	LBB0_50
LBB0_27:
	movl	%r14d, %edx
	shrl	$11, %edx
	movl	%edx, %esi
	notl	%esi
	andl	$7, %esi
	andl	$15, %edx
	movl	$23, %ecx
	subl	%edx, %ecx
	testl	$16384, %r14d                   ## imm = 0x4000
	cmovel	%esi, %ecx
	shll	$7, %r14d
	andl	$130944, %r14d                  ## imm = 0x1FF80
	orl	$131072, %r14d                  ## imm = 0x20000
	shrl	%cl, %r14d
	movl	%ecx, 84(%r13,%rax)
	movl	%r14d, 88(%r13,%rax)
	jmp	LBB0_33
LBB0_28:
	addl	%esi, %esi
	shlq	$2, %rsi
	addq	(%rbx), %rsi
LBB0_29:
	movq	%rsi, 168(%r13,%rax)
	testl	%ecx, %ecx
	jne	LBB0_35
## %bb.30:
	movq	(%rdx), %rcx
	jmp	LBB0_36
LBB0_31:
	movq	_scsp_decay_rate@GOTPCREL(%rip), %rcx
	addl	%r14d, %r14d
	shlq	$2, %r14
	addq	(%rcx), %r14
LBB0_32:
	movq	%r14, 144(%r13,%rax)
LBB0_33:
	movl	$15, %esi
	jmp	LBB0_40
LBB0_34:
	movl	$-1, (%rcx)
	jmp	LBB0_58
LBB0_35:
	addl	%ecx, %ecx
	shlq	$2, %rcx
	addq	(%rbx), %rcx
LBB0_36:
	movq	%rcx, 160(%r13,%rax)
	testl	%r14d, %r14d
	jne	LBB0_38
## %bb.37:
	movq	(%rdx), %r14
	jmp	LBB0_39
LBB0_38:
	movq	_scsp_attack_rate@GOTPCREL(%rip), %rcx
	addl	%r14d, %r14d
	shlq	$2, %r14
	addq	(%rcx), %r14
LBB0_39:
	movq	%r14, 152(%r13,%rax)
	movl	$7, %esi
LBB0_40:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_scsp_slot_refresh_einc         ## TAILCALL
LBB0_41:
	movl	$31, 104(%r13,%rax)
	jmp	LBB0_58
LBB0_42:
	movabsq	$133143986207, %rcx             ## imm = 0x1F0000001F
	movq	%rcx, 108(%r13,%rax)
	testb	$-32, %r14b
	je	LBB0_50
LBB0_47:
	movl	%r14d, %ecx
	shrl	$5, %ecx
	notl	%ecx
	andl	$7, %ecx
	movq	_SCSP_ENV_HB@GOTPCREL(%rip), %rdx
	addl	(%rdx), %ecx
	movl	%ecx, 120(%r13,%rax)
	movl	%ecx, 116(%r13,%rax)
	movl	%r14d, %edx
	andl	$15, %edx
	testb	$16, %r14b
	jne	LBB0_51
## %bb.48:
	addq	%r13, %rax
	addq	$120, %rax
	cmpl	$15, %edx
	je	LBB0_52
LBB0_53:
	shrl	%r14d
	andl	$7, %r14d
	addl	%r14d, %ecx
	movl	%ecx, (%rax)
	jmp	LBB0_58
LBB0_43:
	leaq	(%rax,%r13), %rdx
	addq	$108, %rdx
	cmpl	$3840, %esi                     ## imm = 0xF00
	jne	LBB0_45
LBB0_44:
	movl	$31, (%rdx)
	testb	$-32, %r14b
	jne	LBB0_47
LBB0_50:
	movabsq	$133143986207, %rcx             ## imm = 0x1F0000001F
	movq	%rcx, 116(%r13,%rax)
	jmp	LBB0_58
LBB0_51:
	addq	%r13, %rax
	addq	$116, %rax
	cmpl	$15, %edx
	jne	LBB0_53
LBB0_52:
	movl	$31, (%rax)
	jmp	LBB0_58
LBB0_54:
	movq	_scsp_lfo_squa_e@GOTPCREL(%rip), %rcx
	jmp	LBB0_57
LBB0_55:
	movq	_scsp_lfo_tri_e@GOTPCREL(%rip), %rcx
	jmp	LBB0_57
LBB0_56:
	movq	_scsp_lfo_noi_e@GOTPCREL(%rip), %rcx
LBB0_57:
	movl	(%rcx), %ecx
	movl	%ecx, 124(%r13,%rax)
LBB0_58:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_58, LBB0_58-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_58
	.long	L0_0_set_6
	.long	L0_0_set_58
	.long	L0_0_set_8
	.long	L0_0_set_58
	.long	L0_0_set_9
	.long	L0_0_set_58
	.long	L0_0_set_10
	.long	L0_0_set_58
	.long	L0_0_set_12
	.long	L0_0_set_58
	.long	L0_0_set_14
	.long	L0_0_set_58
	.long	L0_0_set_15
	.long	L0_0_set_58
	.long	L0_0_set_27
	.long	L0_0_set_58
	.long	L0_0_set_16
	.long	L0_0_set_58
	.long	L0_0_set_21
	.long	L0_0_set_58
	.long	L0_0_set_23
.set L0_1_set_20, LBB0_20-LJTI0_1
.set L0_1_set_54, LBB0_54-LJTI0_1
.set L0_1_set_55, LBB0_55-LJTI0_1
.set L0_1_set_56, LBB0_56-LJTI0_1
LJTI0_1:
	.long	L0_1_set_20
	.long	L0_1_set_54
	.long	L0_1_set_55
	.long	L0_1_set_56
	.end_data_region
                                        ## -- End function
	.comm	_scsp,8,3                       ## @scsp
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"slot %d : reg %.2X = %.4X\n"

	.comm	_scsp_isr,8,3                   ## @scsp_isr
	.comm	_SCSP_RAM_MASK,4,2              ## @SCSP_RAM_MASK
	.comm	_SCSP_ENV_DE,4,2                ## @SCSP_ENV_DE
	.comm	_SCSP_FREQ_LB,4,2               ## @SCSP_FREQ_LB
	.comm	_scsp_decay_rate,8,3            ## @scsp_decay_rate
	.comm	_scsp_null_rate,8,3             ## @scsp_null_rate
	.comm	_scsp_attack_rate,8,3           ## @scsp_attack_rate
	.comm	_SCSP_ENV_LB,4,2                ## @SCSP_ENV_LB
	.comm	_SCSP_ENV_DS,4,2                ## @SCSP_ENV_DS
	.comm	_scsp_tl_table,8,3              ## @scsp_tl_table
	.comm	_scsp_lfo_step,8,3              ## @scsp_lfo_step
	.comm	_scsp_lfo_sawt_f,4,2            ## @scsp_lfo_sawt_f
	.comm	_scsp_lfo_squa_f,4,2            ## @scsp_lfo_squa_f
	.comm	_scsp_lfo_tri_f,4,2             ## @scsp_lfo_tri_f
	.comm	_scsp_lfo_noi_f,4,2             ## @scsp_lfo_noi_f
	.comm	_scsp_lfo_sawt_e,4,2            ## @scsp_lfo_sawt_e
	.comm	_scsp_lfo_squa_e,4,2            ## @scsp_lfo_squa_e
	.comm	_scsp_lfo_tri_e,4,2             ## @scsp_lfo_tri_e
	.comm	_scsp_lfo_noi_e,4,2             ## @scsp_lfo_noi_e
	.comm	_SCSP_ENV_HB,4,2                ## @SCSP_ENV_HB
	.comm	_new_scsp,4,2                   ## @new_scsp
	.no_dead_strip	_scsp_slot_set_w
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.scsp_slot_set_w
l_switch.table.scsp_slot_set_w:
	.quad	_scsp_lfo_sawt_f
	.quad	_scsp_lfo_squa_f
	.quad	_scsp_lfo_tri_f
	.quad	_scsp_lfo_noi_f

.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 scsp_slot_set_w
lCPI0_0:
	.long	4294967284                      ; 0xfffffff4
	.long	4294967290                      ; 0xfffffffa
lCPI0_1:
	.long	15                              ; 0xf
	.long	63                              ; 0x3f
lCPI0_2:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
lCPI0_3:
	.long	4294967285                      ; 0xfffffff5
	.long	4294967287                      ; 0xfffffff7
	.long	4294967289                      ; 0xfffffff9
	.long	4294967291                      ; 0xfffffffb
lCPI0_4:
	.long	1                               ; 0x1
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_scsp_slot_set_w:                       ; @scsp_slot_set_w
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _scsp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _scsp@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	and	w21, w1, #0x1e
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x19
	bl	_SCSPLOG
Lloh5:
	adrp	x8, _scsp_isr@GOTPAGE
Lloh6:
	ldr	x8, [x8, _scsp_isr@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	eor	w9, w22, #0x2
	str	w19, [x8, w9, sxtw #2]
	cmp	w21, #22
	b.hi	LBB0_49
; %bb.1:
	mov	w8, #184
	madd	x0, x20, x8, x23
Lloh8:
	adrp	x8, lJTI0_0@PAGE
Lloh9:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_2
	ldrh	w10, [x8, x21, lsl #1]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_2:
	dup.4s	v0, w19
Lloh10:
	adrp	x8, lCPI0_3@PAGE
Lloh11:
	ldr	q1, [x8, lCPI0_3@PAGEOFF]
	ushl.4s	v0, v0, v1
Lloh12:
	adrp	x8, lCPI0_4@PAGE
Lloh13:
	ldr	q1, [x8, lCPI0_4@PAGEOFF]
	and.16b	v0, v0, v1
	str	q0, [x0]
	and	w8, w19, #0x10
	mov	w9, #184
	madd	x9, x20, x9, x23
	ldrh	w10, [x9, #20]
	bfi	w10, w19, #16, #4
	stp	w8, w10, [x9, #16]
Lloh14:
	adrp	x8, _SCSP_RAM_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SCSP_RAM_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w8, w10, w8
	str	w8, [x9, #20]
	ldr	w8, [x9, #176]
Lloh17:
	adrp	x9, _SCSP_ENV_DE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SCSP_ENV_DE@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.3:
	bl	_scsp_slot_update_keyon
LBB0_4:
	tbz	w19, #12, LBB0_49
; %bb.5:
	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_slot_keyonoff
LBB0_6:
	mov	w8, #184
	madd	x8, x20, x8, x23
	ldr	w9, [x8, #20]
	and	w9, w9, #0xf0000
	orr	w9, w9, w19
	str	w9, [x8, #20]
Lloh20:
	adrp	x10, _SCSP_RAM_MASK@GOTPAGE
Lloh21:
	ldr	x10, [x10, _SCSP_RAM_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	and	w9, w9, w10
	str	w9, [x8, #20]
	ldr	w8, [x8, #176]
Lloh23:
	adrp	x9, _SCSP_ENV_DE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SCSP_ENV_DE@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_49
; %bb.7:
	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_slot_update_keyon
LBB0_8:
Lloh26:
	adrp	x8, _SCSP_FREQ_LB@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SCSP_FREQ_LB@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	lsl	w8, w19, w8
	mov	w9, #184
	madd	x9, x20, x9, x23
	str	w8, [x9, #24]
	b	LBB0_49
LBB0_9:
Lloh29:
	adrp	x8, _SCSP_FREQ_LB@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SCSP_FREQ_LB@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	lsl	w8, w19, w8
	mov	w9, #184
	madd	x9, x20, x9, x23
	str	w8, [x9, #28]
	b	LBB0_49
LBB0_10:
	mov	w8, #184
	madd	x8, x20, x8, x23
	mov	w9, #31
	ands	w10, w9, w19, lsr #6
	ands	w11, w19, #0x1f
	ands	w12, w9, w19, lsr #11
	stp	w12, w10, [x8, #32]
	and	w10, w19, #0x20
	stp	w10, w11, [x8, #40]
Lloh32:
	adrp	x10, _scsp_null_rate@GOTPAGE
Lloh33:
	ldr	x10, [x10, _scsp_null_rate@GOTPAGEOFF]
Lloh34:
	adrp	x11, _scsp_decay_rate@GOTPAGE
Lloh35:
	ldr	x11, [x11, _scsp_decay_rate@GOTPAGEOFF]
	ldr	x13, [x10]
	ldr	x14, [x11]
	lsl	w12, w12, #1
	add	x12, x14, w12, uxtw #2
	csel	x12, x13, x12, eq
	ands	w9, w9, w19, lsr #6
	str	x12, [x8, #168]
	ldr	x12, [x10]
	ldr	x11, [x11]
	lsl	w9, w9, #1
	add	x9, x11, w9, uxtw #2
	csel	x9, x12, x9, eq
	ands	w11, w19, #0x1f
	str	x9, [x8, #160]
	ldr	x9, [x10]
Lloh36:
	adrp	x10, _scsp_attack_rate@GOTPAGE
Lloh37:
	ldr	x10, [x10, _scsp_attack_rate@GOTPAGEOFF]
Lloh38:
	ldr	x10, [x10]
	lsl	w11, w11, #1
	add	x10, x10, w11, uxtw #2
	csel	x9, x9, x10, eq
	str	x9, [x8, #152]
	mov	w1, #7
	b	LBB0_27
LBB0_11:
	lsr	w8, w19, #8
	and	w8, w8, #0x40
	mov	w9, #184
	madd	x9, x20, x9, x23
	lsr	w10, w19, #10
	ubfx	w11, w19, #10, #4
	ubfx	w10, w10, #2, #2
	mov	w12, #4
	cmp	w11, #15
	csel	w10, w12, w10, eq
	stp	w8, w10, [x9, #48]
	and	w8, w19, #0x3e0
Lloh39:
	adrp	x10, _SCSP_ENV_LB@GOTPAGE
Lloh40:
	ldr	x10, [x10, _SCSP_ENV_LB@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
Lloh42:
	adrp	x11, _SCSP_ENV_DS@GOTPAGE
Lloh43:
	ldr	x11, [x11, _SCSP_ENV_DS@GOTPAGEOFF]
	lsl	w8, w8, w10
Lloh44:
	ldr	w10, [x11]
	add	w8, w8, w10
	ands	w10, w19, #0x1f
	stp	w8, w10, [x9, #56]
Lloh45:
	adrp	x8, _scsp_null_rate@GOTPAGE
Lloh46:
	ldr	x8, [x8, _scsp_null_rate@GOTPAGEOFF]
Lloh47:
	ldr	x8, [x8]
Lloh48:
	adrp	x11, _scsp_decay_rate@GOTPAGE
Lloh49:
	ldr	x11, [x11, _scsp_decay_rate@GOTPAGEOFF]
Lloh50:
	ldr	x11, [x11]
	lsl	w10, w10, #1
	add	x10, x11, w10, uxtw #2
	csel	x8, x8, x10, eq
	str	x8, [x9, #144]
	b	LBB0_26
LBB0_12:
	lsr	w8, w19, #8
	mov	w9, #184
	dup.2s	v0, w8
	madd	x8, x20, x9, x23
Lloh51:
	adrp	x9, lCPI0_2@PAGE
Lloh52:
	ldr	d1, [x9, lCPI0_2@PAGEOFF]
	and.8b	v0, v0, v1
Lloh53:
	adrp	x9, _scsp_tl_table@GOTPAGE
Lloh54:
	ldr	x9, [x9, _scsp_tl_table@GOTPAGEOFF]
	str	d0, [x8, #64]
Lloh55:
	ldr	x9, [x9]
	and	w10, w19, #0xff
	ldr	w9, [x9, w10, uxtw #2]
	str	w9, [x8, #136]
	b	LBB0_49
LBB0_13:
	dup.2s	v0, w19
Lloh56:
	adrp	x8, lCPI0_0@PAGE
Lloh57:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
	ushl.2s	v0, v0, v1
	mov	w8, #184
	madd	x8, x20, x8, x23
Lloh58:
	adrp	x9, lCPI0_1@PAGE
Lloh59:
	ldr	d1, [x9, lCPI0_1@PAGEOFF]
	and.8b	v0, v0, v1
	str	d0, [x8, #72]
	and	w9, w19, #0x3f
	str	w9, [x8, #80]
	b	LBB0_49
LBB0_14:
	mov	w8, #184
	madd	x8, x20, x8, x23
	add	x8, x8, #92
	tbnz	w19, #15, LBB0_28
; %bb.15:
	ldr	w9, [x8]
	cmn	w9, #1
	b.ne	LBB0_17
; %bb.16:
	mov	w9, #184
	madd	x9, x20, x9, x23
	str	wzr, [x9, #132]
LBB0_17:
	ands	w9, w19, #0x7
	mov	w10, #11
	sub	w9, w10, w9
Lloh60:
	adrp	x10, _scsp_lfo_step@GOTPAGE
Lloh61:
	ldr	x10, [x10, _scsp_lfo_step@GOTPAGEOFF]
	tst	w19, #0x7
Lloh62:
	ldr	x10, [x10]
	ubfx	w11, w19, #10, #5
	ldr	w10, [x10, w11, uxtw #2]
	str	w10, [x8]
	mov	w8, #31
	csel	w9, w8, w9, eq
	mov	w10, #7
	ands	w10, w10, w19, lsr #5
	add	w10, w10, #7
	csel	w8, w8, w10, eq
	mov	w10, #184
	madd	x10, x20, x10, x23
	stp	w8, w9, [x10, #96]
Lloh63:
	adrp	x8, l_switch.table.scsp_slot_set_w@PAGE
Lloh64:
	add	x8, x8, l_switch.table.scsp_slot_set_w@PAGEOFF
	ubfx	w9, w19, #8, #2
	ldr	x8, [x8, w9, uxtw #3]
	ldr	w8, [x8]
	str	w8, [x10, #128]
	ubfx	w8, w19, #3, #2
Lloh65:
	adrp	x9, lJTI0_1@PAGE
Lloh66:
	add	x9, x9, lJTI0_1@PAGEOFF
	adr	x10, LBB0_18
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_18:
Lloh67:
	adrp	x8, _scsp_lfo_sawt_e@GOTPAGE
Lloh68:
	ldr	x8, [x8, _scsp_lfo_sawt_e@GOTPAGEOFF]
	b	LBB0_48
LBB0_19:
	ands	w8, w19, #0x7
	b.eq	LBB0_29
; %bb.20:
Lloh69:
	adrp	x9, _SCSP_ENV_HB@GOTPAGE
Lloh70:
	ldr	x9, [x9, _SCSP_ENV_HB@GOTPAGEOFF]
	eor	w8, w8, #0x7
Lloh71:
	ldr	w9, [x9]
	add	w8, w9, w8
	mov	w9, #184
	madd	x9, x20, x9, x23
	str	w8, [x9, #104]
	b	LBB0_49
LBB0_21:
Lloh72:
	adrp	x8, _SCSP_ENV_HB@GOTPAGE
Lloh73:
	ldr	x8, [x8, _SCSP_ENV_HB@GOTPAGEOFF]
	tst	w19, #0xe000
	b.eq	LBB0_30
; %bb.22:
	mov	w9, #7
	bic	w9, w9, w19, lsr #13
	ldr	w10, [x8]
	add	w9, w10, w9
	mov	w10, #184
	madd	x10, x20, x10, x23
	str	w9, [x10, #112]!
	mov	x11, x10
	str	w9, [x11, #-4]!
	and	w12, w19, #0xf00
	cmp	w12, #3840
	tbnz	w19, #12, LBB0_31
; %bb.23:
	b.ne	LBB0_33
; %bb.24:
	mov	w9, #31
	str	w9, [x10]
	b	LBB0_36
LBB0_25:
	mov	w8, #-1
	eor	w8, w8, w19, lsr #11
	and	w8, w8, #0x7
	ubfx	w9, w19, #11, #4
	mov	w10, #23
	sub	w9, w10, w9
	tst	w19, #0x4000
	csel	w8, w8, w9, eq
	mov	w9, #184
	madd	x9, x20, x9, x23
	mov	w10, #131072
	bfi	w10, w19, #7, #10
	lsr	w10, w10, w8
	stp	w8, w10, [x9, #84]
LBB0_26:
	mov	w1, #15
LBB0_27:
	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_slot_refresh_einc
LBB0_28:
	mov	w9, #-1
	str	w9, [x8]
	b	LBB0_49
LBB0_29:
	mov	w8, #184
	madd	x8, x20, x8, x23
	mov	w9, #31
	str	w9, [x8, #104]
	b	LBB0_49
LBB0_30:
	mov	w9, #184
	madd	x9, x20, x9, x23
	movi.2s	v0, #31
	stur	d0, [x9, #108]
	b	LBB0_36
LBB0_31:
	b.ne	LBB0_34
; %bb.32:
	mov	w9, #31
	b	LBB0_35
LBB0_33:
	ubfx	w11, w19, #9, #3
	add	w9, w9, w11
	str	w9, [x10]
	b	LBB0_36
LBB0_34:
	ubfx	w10, w19, #9, #3
	add	w9, w9, w10
LBB0_35:
	str	w9, [x11]
LBB0_36:
	tst	w19, #0xe0
	b.eq	LBB0_40
; %bb.37:
	mov	w9, #7
	bic	w9, w9, w19, lsr #5
	ldr	w8, [x8]
	add	w8, w8, w9
	mov	w9, #184
	madd	x9, x20, x9, x23
	str	w8, [x9, #120]!
	mov	x10, x9
	str	w8, [x10, #-4]!
	and	w11, w19, #0xf
	cmp	w11, #15
	tbnz	w19, #4, LBB0_41
; %bb.38:
	b.ne	LBB0_43
; %bb.39:
	mov	w8, #31
	str	w8, [x9]
	b	LBB0_49
LBB0_40:
	mov	w8, #184
	madd	x8, x20, x8, x23
	movi.2s	v0, #31
	stur	d0, [x8, #116]
	b	LBB0_49
LBB0_41:
	b.ne	LBB0_44
; %bb.42:
	mov	w8, #31
	str	w8, [x10]
	b	LBB0_49
LBB0_43:
	ubfx	w10, w19, #1, #3
	add	w8, w8, w10
	str	w8, [x9]
	b	LBB0_49
LBB0_44:
	ubfx	w9, w19, #1, #3
	add	w8, w8, w9
	str	w8, [x10]
	b	LBB0_49
LBB0_45:
Lloh74:
	adrp	x8, _scsp_lfo_squa_e@GOTPAGE
Lloh75:
	ldr	x8, [x8, _scsp_lfo_squa_e@GOTPAGEOFF]
	b	LBB0_48
LBB0_46:
Lloh76:
	adrp	x8, _scsp_lfo_tri_e@GOTPAGE
Lloh77:
	ldr	x8, [x8, _scsp_lfo_tri_e@GOTPAGEOFF]
	b	LBB0_48
LBB0_47:
Lloh78:
	adrp	x8, _scsp_lfo_noi_e@GOTPAGE
Lloh79:
	ldr	x8, [x8, _scsp_lfo_noi_e@GOTPAGEOFF]
LBB0_48:
	ldr	w8, [x8]
	mov	w9, #184
	madd	x9, x20, x9, x23
	str	w8, [x9, #124]
LBB0_49:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpAdrp	Lloh10, Lloh12
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdrp	Lloh51, Lloh53
	.loh AdrpLdr	Lloh51, Lloh52
	.loh AdrpLdr	Lloh58, Lloh59
	.loh AdrpLdr	Lloh56, Lloh57
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGot	Lloh72, Lloh73
	.loh AdrpLdrGot	Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGot	Lloh78, Lloh79
	.cfi_endproc
	.section	__TEXT,__const
	.p2align	1
lJTI0_0:
	.short	(LBB0_2-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_6-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_8-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_9-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_10-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_11-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_12-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_13-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_25-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_14-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_19-LBB0_2)>>2
	.short	(LBB0_49-LBB0_2)>>2
	.short	(LBB0_21-LBB0_2)>>2
lJTI0_1:
	.byte	(LBB0_18-LBB0_18)>>2
	.byte	(LBB0_45-LBB0_18)>>2
	.byte	(LBB0_46-LBB0_18)>>2
	.byte	(LBB0_47-LBB0_18)>>2
                                        ; -- End function
	.comm	_scsp,8,3                       ; @scsp
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"slot %d : reg %.2X = %.4X\n"

	.comm	_scsp_isr,8,3                   ; @scsp_isr
	.comm	_SCSP_RAM_MASK,4,2              ; @SCSP_RAM_MASK
	.comm	_SCSP_ENV_DE,4,2                ; @SCSP_ENV_DE
	.comm	_SCSP_FREQ_LB,4,2               ; @SCSP_FREQ_LB
	.comm	_scsp_decay_rate,8,3            ; @scsp_decay_rate
	.comm	_scsp_null_rate,8,3             ; @scsp_null_rate
	.comm	_scsp_attack_rate,8,3           ; @scsp_attack_rate
	.comm	_SCSP_ENV_LB,4,2                ; @SCSP_ENV_LB
	.comm	_SCSP_ENV_DS,4,2                ; @SCSP_ENV_DS
	.comm	_scsp_tl_table,8,3              ; @scsp_tl_table
	.comm	_scsp_lfo_step,8,3              ; @scsp_lfo_step
	.comm	_scsp_lfo_sawt_f,4,2            ; @scsp_lfo_sawt_f
	.comm	_scsp_lfo_squa_f,4,2            ; @scsp_lfo_squa_f
	.comm	_scsp_lfo_tri_f,4,2             ; @scsp_lfo_tri_f
	.comm	_scsp_lfo_noi_f,4,2             ; @scsp_lfo_noi_f
	.comm	_scsp_lfo_sawt_e,4,2            ; @scsp_lfo_sawt_e
	.comm	_scsp_lfo_squa_e,4,2            ; @scsp_lfo_squa_e
	.comm	_scsp_lfo_tri_e,4,2             ; @scsp_lfo_tri_e
	.comm	_scsp_lfo_noi_e,4,2             ; @scsp_lfo_noi_e
	.comm	_SCSP_ENV_HB,4,2                ; @SCSP_ENV_HB
	.comm	_new_scsp,4,2                   ; @new_scsp
	.no_dead_strip	_scsp_slot_set_w
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.scsp_slot_set_w
l_switch.table.scsp_slot_set_w:
	.quad	_scsp_lfo_sawt_f
	.quad	_scsp_lfo_squa_f
	.quad	_scsp_lfo_tri_f
	.quad	_scsp_lfo_noi_f

.subsections_via_symbols
