	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function waves_synth
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_1:
	.long	0x4172147b                      ## float 15.1300001
LCPI0_2:
	.long	0xbf800000                      ## float -1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_waves_synth:                           ## @waves_synth
	.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, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rbx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, 8(%rsi)
	jle	LBB0_7
## %bb.1:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %r13
	shlq	$3, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax), %r13
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	xorl	$1919, %r15d                    ## imm = 0x77F
	incl	%r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r13), %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	LCPI0_1(%rip), %xmm0
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_amp_sf_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r13), %rcx
	xorps	%xmm1, %xmm1
	cvtsi2ssl	(%rax,%rcx,4), %xmm1
	mulss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	movsd	%xmm0, -88(%rbp)                ## 8-byte Spill
	movl	12(%r13), %r12d
	movl	16(%r13), %edi
	callq	_DEQUANT_PHASE
	movsd	-88(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	movl	%r12d, %ecx
	imull	%r15d, %ecx
	addl	%eax, %ecx
	movq	_sine_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ecx, %esi
	andl	$2047, %esi                     ## imm = 0x7FF
	movss	(%rbx,%rdx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rbx,%rdx,4), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
	movsd	(%rax,%rsi,8), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm3, %xmm2
	addsd	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm2, %xmm0
	movss	%xmm0, (%rbx,%rdx,4)
	addl	%r12d, %ecx
	andl	$2047, %ecx                     ## imm = 0x7FF
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	movsd	(%rax,%rcx,8), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm3, %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, 4(%rbx,%rdx,4)
	addl	%r12d, %ecx
	addq	$2, %rdx
	cmpq	$128, %rdx
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	addq	$24, %r13
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	8(%rax), %r14d
	jl	LBB0_2
LBB0_7:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.8:
	movss	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movl	$128, %edx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
LBB0_9:
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	cmpq	$0, 16(%r15)
	je	LBB0_14
## %bb.10:
	movl	(%r15), %r14d
	shll	$2, %r14d
	subl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	leal	-1(%r14), %eax
	cmpl	$127, %eax
	ja	LBB0_14
## %bb.11:
	leal	(,%r14,4), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_memset
	cmpq	$0, 8(%r15)
	je	LBB0_13
## %bb.12:
	movl	(%r15), %eax
	cmpl	4(%r15), %eax
	je	LBB0_14
LBB0_13:
	movl	%r14d, %eax
	movq	_hann_window@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	(%rcx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	(%rbx,%rax,4), %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	movss	128(%rcx), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	4(%rbx,%rax,4), %xmm0
	movss	%xmm0, 4(%rbx,%rax,4)
	movss	256(%rcx), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	8(%rbx,%rax,4), %xmm0
	movss	%xmm0, 8(%rbx,%rax,4)
	movss	384(%rcx), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	12(%rbx,%rax,4), %xmm0
	movss	%xmm0, 12(%rbx,%rax,4)
LBB0_14:
	cmpq	$0, 8(%r15)
	je	LBB0_16
## %bb.15:
	movl	4(%r15), %ecx
	shll	$2, %ecx
	subl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	leal	3(%rcx), %eax
	cmpl	$127, %eax
	ja	LBB0_16
## %bb.17:
	addl	$4, %ecx
	movq	_hann_window@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movss	384(%rdx), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movslq	%ecx, %rcx
	mulss	-16(%rbx,%rcx,4), %xmm0
	movss	%xmm0, -16(%rbx,%rcx,4)
	movss	256(%rdx), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	-12(%rbx,%rcx,4), %xmm0
	movss	%xmm0, -12(%rbx,%rcx,4)
	movss	128(%rdx), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	-8(%rbx,%rcx,4), %xmm0
	movss	%xmm0, -8(%rbx,%rcx,4)
	movss	(%rdx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movl	%eax, %eax
	mulss	(%rbx,%rax,4), %xmm0
	movss	%xmm0, (%rbx,%rax,4)
	movl	%ecx, %eax
	leaq	(%rbx,%rax,4), %rdi
	shll	$2, %ecx
	movl	$512, %edx                      ## imm = 0x200
	subl	%ecx, %edx
	xorl	%esi, %esi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
LBB0_16:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_amp_sf_tab,8,3                 ## @amp_sf_tab
	.comm	_sine_table,8,3                 ## @sine_table
	.comm	_hann_window,8,3                ## @hann_window
	.no_dead_strip	_waves_synth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waves_synth
_waves_synth:                           ; @waves_synth
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x6
	str	w5, [sp, #24]                   ; 4-byte Folded Spill
	str	w4, [sp, #12]                   ; 4-byte Folded Spill
	str	x3, [sp]                        ; 8-byte Folded Spill
	str	x2, [sp, #16]                   ; 8-byte Folded Spill
	ldr	w8, [x1, #8]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x24, x1
	mov	x25, x0
	mov	w26, #0
	ldr	x8, [x0, #8]
	ldr	x9, [x1]
	mov	w10, #24
	madd	x27, x9, x10, x8
	mov	w8, #1919
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	eor	w8, w9, w8
	add	w28, w8, #1
	add	w9, w8, #2
	str	w9, [sp, #28]                   ; 4-byte Folded Spill
	add	w23, w8, #3
	add	w20, w8, #4
Lloh0:
	adrp	x21, _sine_table@GOTPAGE
Lloh1:
	ldr	x21, [x21, _sine_table@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
	add	x27, x27, #24
	ldr	w8, [x24, #8]
	cmp	w26, w8
	b.ge	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
	ldr	w8, [x25]
	fmov	s8, #1.00000000
	cbnz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27, #8]
	add	w8, w8, #1
	scvtf	s0, w8
	mov	w8, #5243
	movk	w8, #16754, lsl #16
	fmov	s1, w8
	fdiv	s8, s0, s1
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh2:
	adrp	x8, _amp_sf_tab@GOTPAGE
Lloh3:
	ldr	x8, [x8, _amp_sf_tab@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x27]
	ldr	s0, [x8, x9, lsl #2]
	scvtf	s9, s0
	ldp	w22, w0, [x27, #12]
	bl	_DEQUANT_PHASE
	sbfx	w12, w22, #0, #11
	madd	w8, w28, w22, w0
	and	w11, w8, #0x7ff
	cmp	w12, #0
	cneg	w9, w12, mi
	and	w9, w9, #0x7ff
	lsl	w10, w9, #7
	sub	w13, w10, w9
	and	w9, w13, #0x7ff
	mvn	w8, w8
	and	w8, w8, #0x7ff
	cmp	w9, w8
	cset	w14, hi
	cmp	w9, w11
	cset	w15, hi
	fmul	s0, s8, s9
	fcvt	d0, s0
	mul	w9, w22, w28
	add	w10, w0, w9
	ldr	x8, [x21]
	cmp	w12, #0
	csel	w14, w15, w14, lt
	tst	w13, #0x3f800
	cset	w12, ne
	tbnz	w14, #0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w12, #0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w10, w11
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w11, w22, #1024
	cmn	w11, #2049
	b.ls	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x10, #0
	ldr	w11, [sp, #28]                  ; 4-byte Folded Reload
	mul	w11, w11, w22
	lsl	w12, w22, #2
	mul	w13, w23, w22
	mul	w14, w20, w22
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w15, w9, w0
	add	w16, w11, w0
	add	w17, w13, w0
	add	w1, w14, w0
	ldr	d1, [x8, w15, uxtw #3]
	ldr	d2, [x8, w16, uxtw #3]
	ldr	d3, [x8, w17, uxtw #3]
	ldr	d4, [x8, w1, uxtw #3]
	add	x15, x19, x10
	ldp	s5, s6, [x15]
	ldp	s7, s16, [x15, #8]
	fcvt	d5, s5
	fcvt	d6, s6
	fcvt	d7, s7
	fcvt	d16, s16
	fmadd	d1, d1, d0, d5
	fmadd	d2, d2, d0, d6
	fmadd	d3, d3, d0, d7
	fmadd	d4, d4, d0, d16
	fcvt	s1, d1
	fcvt	s2, d2
	fcvt	s3, d3
	fcvt	s4, d4
	stp	s1, s2, [x15]
	stp	s3, s4, [x15, #8]
	add	w0, w0, w12
	add	x10, x10, #16
	cmp	x10, #512
	b.ne	LBB0_10
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, #0
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w10, w10, #0x7ff
	ldr	d1, [x8, w10, uxtw #3]
	ldr	s2, [x19, x9]
	fcvt	d2, s2
	fmadd	d1, d1, d0, d2
	fcvt	s1, d1
	str	s1, [x19, x9]
	add	w10, w10, w22
	add	x9, x9, #4
	cmp	x9, #512
	b.ne	LBB0_12
	b	LBB0_2
LBB0_13:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_15
; %bb.14:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	x8, [x8]
	fmov	s0, #-1.00000000
	mov	x0, x19
	mov	x1, x19
	mov	w2, #128
	blr	x8
LBB0_15:
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_20
; %bb.16:
	ldr	w8, [x21]
	lsl	w8, w8, #2
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	sub	w20, w8, w9
	sub	w8, w20, #1
	cmp	w8, #127
	b.hi	LBB0_20
; %bb.17:
	lsl	w2, w20, #2
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_19
; %bb.18:
	ldp	w8, w9, [x21]
	cmp	w8, w9
	b.eq	LBB0_20
LBB0_19:
Lloh5:
	adrp	x8, _hann_window@GOTPAGE
Lloh6:
	ldr	x8, [x8, _hann_window@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	s0, [x8]
	lsl	x9, x20, #2
	ldr	s1, [x19, x9]
	fmul	s0, s0, s1
	str	s0, [x19, x9]
	ldr	s0, [x8, #128]
	add	w9, w20, #1
	lsl	x9, x9, #2
	ldr	s1, [x19, x9]
	fmul	s0, s0, s1
	str	s0, [x19, x9]
	add	w9, w20, #2
	lsl	x9, x9, #2
	ldr	s0, [x19, x9]
	ldr	s1, [x8, #256]
	fmul	s0, s1, s0
	str	s0, [x19, x9]
	ldr	s0, [x8, #384]
	add	w8, w20, #3
	lsl	x8, x8, #2
	ldr	s1, [x19, x8]
	fmul	s0, s0, s1
	str	s0, [x19, x8]
LBB0_20:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_23
; %bb.21:
	ldr	w8, [x21, #4]
	lsl	w8, w8, #2
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	sub	w9, w8, w9
	add	w8, w9, #3
	cmp	w8, #127
	b.hi	LBB0_23
; %bb.22:
	add	w9, w9, #4
Lloh8:
	adrp	x10, _hann_window@GOTPAGE
Lloh9:
	ldr	x10, [x10, _hann_window@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	ldr	s0, [x10, #384]
	add	x11, x19, w9, sxtw #2
	ldp	s1, s2, [x11, #-16]
	fmul	s0, s0, s1
	stur	s0, [x11, #-16]
	ldr	s0, [x10, #256]
	fmul	s0, s0, s2
	stur	s0, [x11, #-12]
	ldr	s0, [x10, #128]
	ldur	s1, [x11, #-8]
	fmul	s0, s0, s1
	stur	s0, [x11, #-8]
	ldr	s0, [x10]
	lsl	x8, x8, #2
	ldr	s1, [x19, x8]
	fmul	s0, s0, s1
	str	s0, [x19, x8]
	add	x0, x19, w9, uxtw #2
	mov	w8, #512
	sub	w2, w8, w9, lsl #2
	mov	w1, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_memset
LBB0_23:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_amp_sf_tab,8,3                 ; @amp_sf_tab
	.comm	_sine_table,8,3                 ; @sine_table
	.comm	_hann_window,8,3                ; @hann_window
	.no_dead_strip	_waves_synth
.subsections_via_symbols
