	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function noise_scale
_noise_scale:                           ## @noise_scale
	.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	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rdi, %r15
	movl	%esi, %r13d
	negl	%r13d
	movq	_exp2tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r13d, %ecx
	andl	$3, %ecx
	movl	(%rax,%rcx,4), %r12d
	xorl	%edi, %edi
	testl	%esi, %esi
	setle	%dil
	callq	_av_assert0
	xorl	%esi, %esi
	cmpl	$32768, %ebx                    ## imm = 0x8000
	jl	LBB0_1
## %bb.2:
	xorl	%esi, %esi
	movl	%ebx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	shrl	%ecx
	incl	%esi
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	movl	%ecx, %ebx
	ja	LBB0_3
	jmp	LBB0_4
LBB0_1:
	movl	%ebx, %ecx
LBB0_4:
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	sarl	$2, %r13d
	subl	%r13d, %esi
	addl	$21, %esi
	cmpl	$32, %esi
	jl	LBB0_7
## %bb.5:
	testl	%r14d, %r14d
	jle	LBB0_31
## %bb.6:
	movl	%r14d, %esi
	shlq	$2, %rsi
	movq	%r15, %rdi
	callq	___bzero
	jmp	LBB0_31
LBB0_7:
	testl	%esi, %esi
	js	LBB0_8
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpl	$-32, %esi
	jbe	LBB0_9
## %bb.20:
	leal	31(%rsi), %ecx
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	testl	%r14d, %r14d
	jle	LBB0_31
## %bb.21:
	addl	$32, %esi
	movl	%r14d, %r9d
	cmpl	$8, %r14d
	jae	LBB0_23
## %bb.22:
	xorl	%edi, %edi
	jmp	LBB0_30
LBB0_9:
	testl	%r14d, %r14d
	jle	LBB0_31
## %bb.10:
	movl	$-32, %ecx
	subl	%esi, %ecx
	movl	%r14d, %edx
	cmpl	$8, %r14d
	jae	LBB0_12
## %bb.11:
	xorl	%esi, %esi
	jmp	LBB0_19
LBB0_23:
	movl	%r9d, %edi
	andl	$-8, %edi
	movd	%eax, %xmm0
	pshufd	$0, %xmm0, %xmm1                ## xmm1 = xmm0[0,0,0,0]
	movd	%edx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movd	%esi, %xmm2
	leaq	-8(%rdi), %rcx
	movq	%rcx, %r8
	shrq	$3, %r8
	incq	%r8
	pmovzxdq	%xmm2, %xmm2                    ## xmm2 = xmm2[0],zero,xmm2[1],zero
	testq	%rcx, %rcx
	je	LBB0_24
## %bb.25:
	movq	%r8, %rbx
	andq	$-2, %rbx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r15,%rcx,4), %xmm5
	movdqu	16(%r15,%rcx,4), %xmm6
	movdqu	32(%r15,%rcx,4), %xmm4
	movdqu	48(%r15,%rcx,4), %xmm3
	pmulld	%xmm1, %xmm5
	pmulld	%xmm1, %xmm6
	paddd	%xmm0, %xmm5
	paddd	%xmm0, %xmm6
	psrad	%xmm2, %xmm5
	psrad	%xmm2, %xmm6
	pxor	%xmm7, %xmm7
	psubd	%xmm5, %xmm7
	pxor	%xmm5, %xmm5
	psubd	%xmm6, %xmm5
	movdqu	%xmm7, (%r15,%rcx,4)
	movdqu	%xmm5, 16(%r15,%rcx,4)
	pmulld	%xmm1, %xmm4
	pmulld	%xmm1, %xmm3
	paddd	%xmm0, %xmm4
	paddd	%xmm0, %xmm3
	psrad	%xmm2, %xmm4
	psrad	%xmm2, %xmm3
	pxor	%xmm5, %xmm5
	psubd	%xmm4, %xmm5
	pxor	%xmm4, %xmm4
	psubd	%xmm3, %xmm4
	movdqu	%xmm5, 32(%r15,%rcx,4)
	movdqu	%xmm4, 48(%r15,%rcx,4)
	addq	$16, %rcx
	addq	$-2, %rbx
	jne	LBB0_26
	jmp	LBB0_27
LBB0_12:
	movl	%edx, %esi
	andl	$-8, %esi
	movd	%eax, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movd	%ecx, %xmm1
	leaq	-8(%rsi), %rdi
	movq	%rdi, %r8
	shrq	$3, %r8
	incq	%r8
	pmovzxdq	%xmm1, %xmm1                    ## xmm1 = xmm1[0],zero,xmm1[1],zero
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.14:
	movq	%r8, %rbx
	andq	$-2, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r15,%rdi,4), %xmm2
	movdqu	16(%r15,%rdi,4), %xmm3
	movdqu	32(%r15,%rdi,4), %xmm4
	movdqu	48(%r15,%rdi,4), %xmm5
	pmulld	%xmm0, %xmm2
	pmulld	%xmm0, %xmm3
	pslld	%xmm1, %xmm2
	pslld	%xmm1, %xmm3
	pxor	%xmm6, %xmm6
	psubd	%xmm2, %xmm6
	pxor	%xmm2, %xmm2
	psubd	%xmm3, %xmm2
	movdqu	%xmm6, (%r15,%rdi,4)
	movdqu	%xmm2, 16(%r15,%rdi,4)
	pmulld	%xmm0, %xmm4
	pmulld	%xmm0, %xmm5
	pslld	%xmm1, %xmm4
	pslld	%xmm1, %xmm5
	pxor	%xmm2, %xmm2
	psubd	%xmm4, %xmm2
	pxor	%xmm3, %xmm3
	psubd	%xmm5, %xmm3
	movdqu	%xmm2, 32(%r15,%rdi,4)
	movdqu	%xmm3, 48(%r15,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rbx
	jne	LBB0_15
	jmp	LBB0_16
LBB0_24:
	xorl	%ecx, %ecx
LBB0_27:
	testb	$1, %r8b
	je	LBB0_29
## %bb.28:
	movdqu	(%r15,%rcx,4), %xmm3
	movdqu	16(%r15,%rcx,4), %xmm4
	pmulld	%xmm1, %xmm3
	pmulld	%xmm1, %xmm4
	paddd	%xmm0, %xmm3
	paddd	%xmm0, %xmm4
	psrad	%xmm2, %xmm3
	psrad	%xmm2, %xmm4
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	psubd	%xmm3, %xmm1
	psubd	%xmm4, %xmm0
	movdqu	%xmm1, (%r15,%rcx,4)
	movdqu	%xmm0, 16(%r15,%rcx,4)
LBB0_29:
	cmpq	%r9, %rdi
	je	LBB0_31
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rdi,4), %ebx
	imull	%eax, %ebx
	addl	%edx, %ebx
	movl	%esi, %ecx
	sarl	%cl, %ebx
	negl	%ebx
	movl	%ebx, (%r15,%rdi,4)
	incq	%rdi
	cmpq	%rdi, %r9
	jne	LBB0_30
	jmp	LBB0_31
LBB0_13:
	xorl	%edi, %edi
LBB0_16:
	testb	$1, %r8b
	je	LBB0_18
## %bb.17:
	movdqu	(%r15,%rdi,4), %xmm2
	movdqu	16(%r15,%rdi,4), %xmm3
	pmulld	%xmm0, %xmm2
	pmulld	%xmm0, %xmm3
	pslld	%xmm1, %xmm2
	pslld	%xmm1, %xmm3
	pxor	%xmm0, %xmm0
	pxor	%xmm1, %xmm1
	psubd	%xmm2, %xmm1
	psubd	%xmm3, %xmm0
	movdqu	%xmm1, (%r15,%rdi,4)
	movdqu	%xmm0, 16(%r15,%rdi,4)
LBB0_18:
	cmpq	%rdx, %rsi
	je	LBB0_31
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rsi,4), %edi
	imull	%eax, %edi
	shll	%cl, %edi
	negl	%edi
	movl	%edi, (%r15,%rsi,4)
	incq	%rsi
	cmpq	%rsi, %rdx
	jne	LBB0_19
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_exp2tab,8,3                    ## @exp2tab
	.no_dead_strip	_noise_scale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function noise_scale
_noise_scale:                           ; @noise_scale
	.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	x20, x3
	mov	x21, x2
	mov	x19, x0
	neg	w23, w1
Lloh0:
	adrp	x8, _exp2tab@GOTPAGE
Lloh1:
	ldr	x8, [x8, _exp2tab@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	and	w9, w23, #0x3
	ldr	w22, [x8, w9, uxtw #2]
	cmp	w1, #1
	cset	w0, lt
	bl	_av_assert0
	cmp	w21, #8, lsl #12                ; =32768
	b.lt	LBB0_3
; %bb.1:
	mov	w9, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w8, w21, #1
	add	w9, w9, #1
	lsr	w10, w21, #16
	mov	x21, x8
	cbnz	w10, LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w9, #0
	mov	x8, x21
LBB0_4:
	sub	w9, w9, w23, asr #2
	add	w10, w9, #21
	cmp	w10, #32
	b.lt	LBB0_7
; %bb.5:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.6:
	mov	w8, w20
	lsl	x1, x8, #2
	mov	x0, x19
	bl	_bzero
	b	LBB0_8
LBB0_7:
	tbnz	w10, #31, LBB0_9
LBB0_8:
	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
LBB0_9:
	sdiv	w8, w22, w8
	cmn	w10, #32
	b.ls	LBB0_13
; %bb.10:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.11:
	add	w9, w10, #32
	add	w10, w10, #31
	mov	w11, #1
	lsl	w10, w11, w10
	mov	w11, w20
	cmp	w20, #16
	b.hs	LBB0_16
; %bb.12:
	mov	x12, #0
	b	LBB0_19
LBB0_13:
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.14:
	mov	w9, #-32
	sub	w9, w9, w10
	mov	w10, w20
	cmp	w20, #16
	b.hs	LBB0_21
; %bb.15:
	mov	x11, #0
	b	LBB0_24
LBB0_16:
	dup.4s	v0, w8
	dup.4s	v1, w10
	and	x12, x11, #0xfffffff0
	dup.4s	v2, w9
	add	x13, x19, #32
	neg.4s	v2, v2
	mov	x14, x12
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldp	q3, q4, [x13, #-32]
	ldp	q5, q6, [x13]
	mov.16b	v7, v1
	mla.4s	v7, v3, v0
	mov.16b	v3, v1
	mla.4s	v3, v4, v0
	mov.16b	v4, v1
	mla.4s	v4, v5, v0
	mov.16b	v5, v1
	mla.4s	v5, v6, v0
	sshl.4s	v6, v7, v2
	sshl.4s	v3, v3, v2
	sshl.4s	v4, v4, v2
	sshl.4s	v5, v5, v2
	neg.4s	v6, v6
	neg.4s	v3, v3
	neg.4s	v4, v4
	stp	q6, q3, [x13, #-32]
	neg.4s	v3, v5
	stp	q4, q3, [x13], #64
	subs	x14, x14, #16
	b.ne	LBB0_17
; %bb.18:
	cmp	x12, x11
	b.eq	LBB0_8
LBB0_19:
	add	x13, x19, x12, lsl #2
	sub	x11, x11, x12
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x13]
	madd	w12, w12, w8, w10
	asr	w12, w12, w9
	neg	w12, w12
	str	w12, [x13], #4
	subs	x11, x11, #1
	b.ne	LBB0_20
	b	LBB0_8
LBB0_21:
	and	x11, x10, #0xfffffff0
	dup.4s	v0, w8
	dup.4s	v1, w9
	add	x12, x19, #32
	mov	x13, x11
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldp	q2, q3, [x12, #-32]
	ldp	q4, q5, [x12]
	mul.4s	v2, v2, v0
	mul.4s	v3, v3, v0
	mul.4s	v4, v4, v0
	mul.4s	v5, v5, v0
	ushl.4s	v2, v2, v1
	ushl.4s	v3, v3, v1
	ushl.4s	v4, v4, v1
	ushl.4s	v5, v5, v1
	neg.4s	v2, v2
	neg.4s	v3, v3
	neg.4s	v4, v4
	stp	q2, q3, [x12, #-32]
	neg.4s	v2, v5
	stp	q4, q2, [x12], #64
	subs	x13, x13, #16
	b.ne	LBB0_22
; %bb.23:
	cmp	x11, x10
	b.eq	LBB0_8
LBB0_24:
	add	x12, x19, x11, lsl #2
	sub	x10, x10, x11
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x12]
	mul	w11, w11, w8
	lsl	w11, w11, w9
	neg	w11, w11
	str	w11, [x12], #4
	subs	x10, x10, #1
	b.ne	LBB0_25
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_exp2tab,8,3                    ; @exp2tab
	.no_dead_strip	_noise_scale
.subsections_via_symbols
