	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function noise_normalize
LCPI0_0:
	.long	0x3e800000                      ## float 0.25
LCPI0_1:
	.long	0xbf800000                      ## float -1
LCPI0_2:
	.long	0x00000000                      ## float 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_noise_normalize:                       ## @noise_normalize
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, %r12d
	movl	24(%rbp), %r15d
	movl	16(%rbp), %r13d
	movq	(%rdi), %r14
	leal	(,%r15,8), %edi
	callq	_alloca
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rax
	cmpq	$0, 8(%r14)
	movl	%eax, %edx
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edx
	subl	%r13d, %edx
LBB0_2:
	cmpl	%eax, %edx
	cmovgel	%eax, %edx
	testl	%edx, %edx
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.11:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%edx, %esi
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%edx, %r14d
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movss	(%rdx,%r12,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movq	%rax, %r15
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	divss	(%rax,%r12,4), %xmm0
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax,%r12,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	callq	_sqrt
	movl	%eax, %edi
	callq	_rint
	movl	%r14d, %edx
	movl	%eax, %ecx
	negl	%ecx
	xorps	%xmm0, %xmm0
	ucomiss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	cmovbel	%eax, %ecx
	movq	32(%rbp), %rax
	movl	%ecx, (%rax,%r12,4)
	movq	%r15, %rax
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%r12
	cmpq	%r12, -80(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$0, (%rbx,%r12,4)
	jne	LBB0_15
	jmp	LBB0_14
LBB0_16:
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_4
LBB0_3:
	xorl	%edx, %edx
LBB0_4:
	xorps	%xmm1, %xmm1
	cmpl	%eax, %edx
	jge	LBB0_27
## %bb.5:
	testq	%rbx, %rbx
	setne	-48(%rbp)                       ## 1-byte Folded Spill
	subl	%r13d, %r12d
	movl	%edx, %r15d
	movslq	%r12d, %r13
	movl	%eax, %edi
	leaq	(,%r15,4), %r12
	xorl	%r14d, %r14d
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax,%r15,4), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movss	%xmm2, -80(%rbp)                ## 4-byte Spill
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	movq	%rdi, %rbx
	callq	_sqrt
	movl	%eax, %edi
	callq	_rint
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movq	%rbx, %rdi
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movl	%eax, %ecx
	negl	%ecx
	xorps	%xmm0, %xmm0
	ucomiss	-80(%rbp), %xmm0                ## 4-byte Folded Reload
	cmovbel	%eax, %ecx
	movq	32(%rbp), %rax
	movl	%ecx, (%rax,%r15,4)
	imull	%ecx, %ecx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ecx, %xmm0
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	mulss	(%rax,%r15,4), %xmm0
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movss	%xmm0, (%rax,%r15,4)
LBB0_18:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	addq	$4, %r12
	cmpq	%r15, %rdi
	je	LBB0_19
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$0, (%rbx,%r15,4)
	jne	LBB0_18
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax,%r15,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	divss	(%rax,%r15,4), %xmm0
	cmpq	%r13, %r15
	setl	%al
	ucomiss	%xmm0, %xmm2
	jbe	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	andb	-48(%rbp), %al                  ## 1-byte Folded Reload
	jne	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r12, %rax
	addss	%xmm0, %xmm1
	movslq	%r14d, %rcx
	incl	%r14d
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rdx,%rcx,8)
	jmp	LBB0_18
LBB0_19:
	testl	%r14d, %r14d
	je	LBB0_27
## %bb.20:
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	movq	_apsort@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	$8, %edx
	callq	_qsort
	testl	%r14d, %r14d
	jle	LBB0_21
## %bb.22:
	movl	%r14d, %r14d
	xorl	%ebx, %ebx
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_23 Depth=1
	movq	32(%rbp), %rax
	movl	$0, (%rax,%r15,4)
	xorps	%xmm0, %xmm0
LBB0_26:                                ##   in Loop: Header=BB0_23 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movss	%xmm0, (%rax,%r15,4)
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_27
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rbx,8), %rax
	subq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	shrq	$2, %rax
	ucomiss	4(%r12), %xmm1
	movslq	%eax, %r15
	jb	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax,%r15,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	callq	_unitnorm
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movq	32(%rbp), %rcx
	movl	%eax, (%rcx,%r15,4)
	addss	LCPI0_1(%rip), %xmm1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax,%r15,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	jmp	LBB0_26
LBB0_21:
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
LBB0_27:
	movaps	%xmm1, %xmm0
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_apsort,4,2                     ## @apsort
	.no_dead_strip	_noise_normalize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function noise_normalize
_noise_normalize:                       ; @noise_normalize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	d11, d10, [sp, #48]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #64]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	mov	x28, x7
	mov	x21, x6
	mov	x23, x5
	stp	x2, x4, [sp, #32]               ; 16-byte Folded Spill
	mov	x20, x3
	str	w1, [sp, #20]                   ; 4-byte Folded Spill
	ldr	x24, [x29, #16]
	ldr	x19, [x0]
	lsl	w0, w7, #3
	bl	_alloca
	mov	x22, x0
	ldr	x9, [x19, #8]
	mov	x8, x28
	cbz	x9, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	sub	w8, w8, w21
LBB0_2:
	cmp	w8, w28
	csel	w25, w8, w28, lt
	cmp	w25, #1
	str	x19, [sp]                       ; 8-byte Folded Spill
	b.lt	LBB0_9
; %bb.3:
	str	w21, [sp, #16]                  ; 4-byte Folded Spill
	str	w28, [sp, #24]                  ; 4-byte Folded Spill
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	mov	x26, x23
	mov	x27, x20
	ldp	x21, x28, [sp, #32]             ; 16-byte Folded Reload
	mov	x19, x24
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	s0, [x27]
	ldr	s1, [x28]
	ldr	s8, [x21]
	fdiv	s0, s0, s1
	bl	_sqrt
	bl	_rint
	fcmp	s8, #0.0
	cneg	w8, w0, mi
	str	w8, [x24]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #4
	add	x21, x21, #4
	add	x28, x28, #4
	add	x27, x27, #4
	add	x26, x26, #4
	subs	x25, x25, #1
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x23, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x26]
	cbnz	w8, LBB0_5
	b	LBB0_4
LBB0_8:
	mov	x24, x19
	ldr	w28, [sp, #24]                  ; 4-byte Folded Reload
	ldr	w21, [sp, #16]                  ; 4-byte Folded Reload
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	b	LBB0_10
LBB0_9:
	mov	w8, #0
LBB0_10:
	movi	d8, #0000000000000000
	cmp	w8, w28
	b.ge	LBB0_26
; %bb.11:
	str	x24, [sp, #24]                  ; 8-byte Folded Spill
	mov	w26, #0
	mov	w25, w8
	cmp	x23, #0
	cset	w27, ne
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	sub	w8, w8, w21
	sxtw	x21, w8
	mov	w24, w28
	lsl	x28, x25, #2
	movi	d8, #0000000000000000
	fmov	s9, #0.25000000
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	s10, [x8, x19]
	bl	_sqrt
	bl	_rint
	fcmp	s10, #0.0
	cneg	w8, w0, mi
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	str	w8, [x9, x19]
	mul	w8, w8, w8
	scvtf	s0, w8
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	s1, [x8, x19]
	fmul	s0, s1, s0
	str	s0, [x20, x19]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x25, x25, #1
	add	x28, x28, #4
	cmp	x24, x25
	b.eq	LBB0_19
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	cbz	x23, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x23, x25, lsl #2]
	cbnz	w8, LBB0_13
LBB0_16:                                ;   in Loop: Header=BB0_14 Depth=1
	lsl	x19, x25, #2
	ldr	s0, [x20, x19]
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	s1, [x8, x19]
	fdiv	s0, s0, s1
	cmp	x25, x21
	cset	w8, lt
	fcmp	s0, s9
	b.pl	LBB0_12
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	and	w8, w27, w8
	tbnz	w8, #0, LBB0_12
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x20, x28
	fadd	s8, s8, s0
	str	x8, [x22, w26, sxtw #3]
	add	w26, w26, #1
	b	LBB0_13
LBB0_19:
	cbz	w26, LBB0_26
; %bb.20:
Lloh0:
	adrp	x8, _apsort@GOTPAGE
Lloh1:
	ldr	x8, [x8, _apsort@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x22
	mov	x1, x26
	mov	w2, #8
	bl	_qsort
	cmp	w26, #1
	b.lt	LBB0_26
; %bb.21:
	mov	w21, w26
	fmov	s9, #-1.00000000
	ldr	x24, [sp, #24]                  ; 8-byte Folded Reload
	ldr	x25, [sp]                       ; 8-byte Folded Reload
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	str	wzr, [x24, x19, lsl #2]
	movi	d0, #0000000000000000
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	str	s0, [x20, x19, lsl #2]
	add	x22, x22, #8
	subs	x21, x21, #1
	b.eq	LBB0_26
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	sub	x8, x8, x20
	ldr	s0, [x25, #4]
	sbfx	x19, x8, #2, #32
	fcmp	s8, s0
	b.lt	LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	lsl	x23, x19, #2
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	s0, [x8, x23]
	bl	_unitnorm
	str	w0, [x24, x23]
	fadd	s8, s8, s9
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	s0, [x8, x23]
	b	LBB0_23
LBB0_26:
	fmov	s0, s8
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #64]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_apsort,4,2                     ; @apsort
	.no_dead_strip	_noise_normalize
.subsections_via_symbols
