	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function mzpokeysnd_process_16
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI0_1:
	.quad	0x40efffe000000000              ## double 65535
LCPI0_2:
	.quad	0x3fd0000000000000              ## double 0.25
LCPI0_3:
	.quad	0x3fee666666666666              ## double 0.94999999999999996
LCPI0_4:
	.quad	0xbfd0000000000000              ## double -0.25
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mzpokeysnd_process_16:                 ## @mzpokeysnd_process_16
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_num_cur_pokeys@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.1:
	movl	%esi, %r12d
	cmpl	%esi, %eax
	jg	LBB0_8
## %bb.2:
	movq	%rdi, %rbx
	movq	_pokey_states@GOTPCREL(%rip), %rax
	movq	_MAX_SAMPLE@GOTPCREL(%rip), %r14
	movq	_M_PI@GOTPCREL(%rip), %r15
	movq	_RAND_MAX@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	cltq
	leaq	(%rbx,%rax,8), %rbx
	subl	%eax, %r12d
	cmpl	%eax, %r12d
	movq	_pokey_states@GOTPCREL(%rip), %rax
	jl	LBB0_8
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	(%rax), %rdi
	callq	_generate_sample
	movapd	%xmm0, %xmm3
	movsd	(%r14), %xmm0                   ## xmm0 = mem[0],zero
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm0
	mulsd	LCPI0_2(%rip), %xmm1
	mulsd	(%r15), %xmm1
	subsd	%xmm0, %xmm3
	mulsd	LCPI0_3(%rip), %xmm1
	mulsd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	movsd	%xmm3, -48(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	callq	_rand
	mulsd	LCPI0_0(%rip), %xmm0
	divsd	(%r13), %xmm0
	addsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	LCPI0_4(%rip), %xmm0
	callq	_floor
	movq	_num_cur_pokeys@GOTPCREL(%rip), %rcx
	movq	%rax, (%rbx)
	movl	(%rcx), %eax
	cmpl	$2, %eax
	jl	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	$1, %r12d
	movq	%rbx, %r13
	movq	%r15, %rbx
	movq	%r14, %r15
	movq	_pokey_states@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rdi
	addq	%r12, %rdi
	callq	_generate_sample
	movapd	%xmm0, %xmm3
	movsd	(%r15), %xmm0                   ## xmm0 = mem[0],zero
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm0
	mulsd	LCPI0_2(%rip), %xmm1
	mulsd	(%rbx), %xmm1
	subsd	%xmm0, %xmm3
	mulsd	LCPI0_3(%rip), %xmm1
	mulsd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	movsd	%xmm3, -48(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	callq	_rand
	mulsd	LCPI0_0(%rip), %xmm0
	movq	_RAND_MAX@GOTPCREL(%rip), %rax
	divsd	(%rax), %xmm0
	addsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	LCPI0_4(%rip), %xmm0
	callq	_floor
	movq	_num_cur_pokeys@GOTPCREL(%rip), %rcx
	movq	%rax, (%r13,%r12,8)
	incq	%r12
	movslq	(%rcx), %rax
	cmpq	%rax, %r12
	jl	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	%r15, %r14
	movq	%rbx, %r15
	movq	%r13, %rbx
	movq	_RAND_MAX@GOTPCREL(%rip), %r13
	jmp	LBB0_7
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_num_cur_pokeys,4,2             ## @num_cur_pokeys
	.comm	_pokey_states,8,3               ## @pokey_states
	.comm	_MAX_SAMPLE,8,3                 ## @MAX_SAMPLE
	.comm	_M_PI,8,3                       ## @M_PI
	.comm	_RAND_MAX,8,3                   ## @RAND_MAX
	.comm	_POKEYSND_SAMPBUF_MAX,8,3       ## @POKEYSND_SAMPBUF_MAX
	.comm	_POKEYSND_sampbuf_cnt,8,3       ## @POKEYSND_sampbuf_cnt
	.comm	_POKEYSND_sampbuf_ptr,8,3       ## @POKEYSND_sampbuf_ptr
	.comm	_POKEYSND_sampbuf_rptr,8,3      ## @POKEYSND_sampbuf_rptr
	.comm	_POKEYSND_sampbuf_val,8,3       ## @POKEYSND_sampbuf_val
	.comm	_POKEYSND_sampout,8,3           ## @POKEYSND_sampout
	.no_dead_strip	_mzpokeysnd_process_16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mzpokeysnd_process_16
_mzpokeysnd_process_16:                 ; @mzpokeysnd_process_16
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-128]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
Lloh0:
	adrp	x21, _num_cur_pokeys@GOTPAGE
Lloh1:
	ldr	x21, [x21, _num_cur_pokeys@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	ccmp	w8, w1, #0, ge
	b.le	LBB0_2
LBB0_1:
	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
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #128            ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x1
	mov	x20, x0
Lloh2:
	adrp	x22, _pokey_states@GOTPAGE
Lloh3:
	ldr	x22, [x22, _pokey_states@GOTPAGEOFF]
Lloh4:
	adrp	x23, _MAX_SAMPLE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _MAX_SAMPLE@GOTPAGEOFF]
	fmov	d8, #0.50000000
	mov	x24, #281337537757184
	movk	x24, #16623, lsl #48
	fmov	d9, #0.25000000
Lloh6:
	adrp	x25, _M_PI@GOTPAGE
Lloh7:
	ldr	x25, [x25, _M_PI@GOTPAGEOFF]
	mov	x26, #7378697629483820646
	movk	x26, #16366, lsl #48
Lloh8:
	adrp	x27, _RAND_MAX@GOTPAGE
Lloh9:
	ldr	x27, [x27, _RAND_MAX@GOTPAGEOFF]
	fmov	d10, #-0.25000000
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, w8, sxtw #3
	sub	w19, w19, w8
	cmp	w19, w8
	b.lt	LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x0, [x22]
	bl	_generate_sample
	ldr	d1, [x23]
	fmul	d2, d1, d8
	fsub	d0, d0, d2
	fmov	d2, x24
	fdiv	d1, d2, d1
	fmul	d1, d1, d9
	ldr	d2, [x25]
	fmul	d1, d2, d1
	fmov	d2, x26
	fmul	d1, d1, d2
	fmadd	d11, d0, d1, d8
	bl	_rand
	fmul	d0, d0, d8
	ldr	d1, [x27]
	fdiv	d0, d0, d1
	fadd	d0, d0, d11
	fadd	d0, d0, d10
	bl	_floor
	str	x0, [x20]
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #1
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22]
	add	x0, x28, x8
	bl	_generate_sample
	ldr	d1, [x23]
	fmul	d2, d1, d8
	fsub	d0, d0, d2
	fmov	d2, x24
	fdiv	d1, d2, d1
	fmul	d1, d1, d9
	ldr	d2, [x25]
	fmul	d1, d2, d1
	fmov	d2, x26
	fmul	d1, d1, d2
	fmadd	d11, d0, d1, d8
	bl	_rand
	fmul	d0, d0, d8
	ldr	d1, [x27]
	fdiv	d0, d0, d1
	fadd	d0, d0, d11
	fadd	d0, d0, d10
	bl	_floor
	str	x0, [x20, x28, lsl #3]
	add	x28, x28, #1
	ldrsw	x8, [x21]
	cmp	x28, x8
	b.lt	LBB0_6
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_num_cur_pokeys,4,2             ; @num_cur_pokeys
	.comm	_pokey_states,8,3               ; @pokey_states
	.comm	_MAX_SAMPLE,8,3                 ; @MAX_SAMPLE
	.comm	_M_PI,8,3                       ; @M_PI
	.comm	_RAND_MAX,8,3                   ; @RAND_MAX
	.comm	_POKEYSND_SAMPBUF_MAX,8,3       ; @POKEYSND_SAMPBUF_MAX
	.comm	_POKEYSND_sampbuf_cnt,8,3       ; @POKEYSND_sampbuf_cnt
	.comm	_POKEYSND_sampbuf_ptr,8,3       ; @POKEYSND_sampbuf_ptr
	.comm	_POKEYSND_sampbuf_rptr,8,3      ; @POKEYSND_sampbuf_rptr
	.comm	_POKEYSND_sampbuf_val,8,3       ; @POKEYSND_sampbuf_val
	.comm	_POKEYSND_sampout,8,3           ; @POKEYSND_sampout
	.no_dead_strip	_mzpokeysnd_process_16
.subsections_via_symbols
