	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__vp_tonemask                   ## -- Begin function _vp_tonemask
	.p2align	4, 0x90
__vp_tonemask:                          ## @_vp_tonemask
	.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
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %r13d
	movl	4(%rdi), %edi
	shll	$2, %edi
	callq	_alloca
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movq	%rax, %rbx
	movq	24(%r14), %r9
	addss	(%r9), %xmm1
	movl	4(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_20
## %bb.1:
	cmpl	$8, %ecx
	jb	LBB0_2
## %bb.3:
	movq	_NEGINF@GOTPCREL(%rip), %r8
	leaq	4(%r8), %rax
	cmpq	%rax, %rbx
	jae	LBB0_6
## %bb.4:
	leaq	(%rbx,%rcx,4), %rax
	cmpq	_NEGINF@GOTPCREL(%rip), %rax
	jbe	LBB0_6
LBB0_2:
	xorl	%edx, %edx
LBB0_14:
	movq	%rdx, %rax
	notq	%rax
	addq	%rcx, %rax
	movq	%rcx, %rsi
	andq	$3, %rsi
	je	LBB0_17
## %bb.15:
	movq	_NEGINF@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbx,%rdx,4)
	incq	%rdx
	decq	%rsi
	jne	LBB0_16
LBB0_17:
	cmpq	$3, %rax
	jb	LBB0_20
## %bb.18:
	movq	_NEGINF@GOTPCREL(%rip), %rax
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rbx,%rdx,4)
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%rbx,%rdx,4)
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 8(%rbx,%rdx,4)
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 12(%rbx,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_19
	jmp	LBB0_20
LBB0_6:
	movl	%ecx, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rax
	movq	%rax, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %esi
	andl	$3, %esi
	cmpq	$24, %rax
	jae	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	andq	$-4, %rdi
	movss	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	shufps	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movups	%xmm0, (%rbx,%rax,4)
	movups	%xmm0, 16(%rbx,%rax,4)
	movups	%xmm0, 32(%rbx,%rax,4)
	movups	%xmm0, 48(%rbx,%rax,4)
	movups	%xmm0, 64(%rbx,%rax,4)
	movups	%xmm0, 80(%rbx,%rax,4)
	movups	%xmm0, 96(%rbx,%rax,4)
	movups	%xmm0, 112(%rbx,%rax,4)
	addq	$32, %rax
	addq	$-4, %rdi
	jne	LBB0_9
LBB0_10:
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.11:
	movss	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	shufps	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	(%rbx,%rax,4), %rax
	addq	$16, %rax
	shlq	$5, %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movups	%xmm0, -16(%rax,%rdi)
	movups	%xmm0, (%rax,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %rsi
	jne	LBB0_12
LBB0_13:
	cmpq	%rcx, %rdx
	jne	LBB0_14
LBB0_20:
	testl	%r13d, %r13d
	jle	LBB0_33
## %bb.21:
	movss	4(%r9), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	maxss	%xmm1, %xmm0
	movq	8(%r14), %rax
	xorl	%ecx, %ecx
	cmpl	$8, %r13d
	jb	LBB0_29
## %bb.22:
	movq	%r12, %rdx
	subq	%rax, %rdx
	cmpq	$32, %rdx
	jb	LBB0_29
## %bb.23:
	movl	%r13d, %ecx
	andl	$-8, %ecx
	movaps	%xmm0, %xmm1
	shufps	$0, %xmm0, %xmm1                ## xmm1 = xmm1[0,0],xmm0[0,0]
	leaq	-8(%rcx), %rsi
	movq	%rsi, %rdx
	shrq	$3, %rdx
	incq	%rdx
	testq	%rsi, %rsi
	je	LBB0_34
## %bb.24:
	movabsq	$4611686018427387900, %rdi      ## imm = 0x3FFFFFFFFFFFFFFC
	orq	$2, %rdi
	andq	%rdx, %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rax,%rsi,4), %xmm2
	movups	16(%rax,%rsi,4), %xmm3
	addps	%xmm1, %xmm2
	addps	%xmm1, %xmm3
	movups	%xmm2, (%r12,%rsi,4)
	movups	%xmm3, 16(%r12,%rsi,4)
	movups	32(%rax,%rsi,4), %xmm2
	movups	48(%rax,%rsi,4), %xmm3
	addps	%xmm1, %xmm2
	addps	%xmm1, %xmm3
	movups	%xmm2, 32(%r12,%rsi,4)
	movups	%xmm3, 48(%r12,%rsi,4)
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_25
## %bb.26:
	testb	$1, %dl
	je	LBB0_28
LBB0_27:
	movups	(%rax,%rsi,4), %xmm2
	movups	16(%rax,%rsi,4), %xmm3
	addps	%xmm1, %xmm2
	addps	%xmm1, %xmm3
	movups	%xmm2, (%r12,%rsi,4)
	movups	%xmm3, 16(%r12,%rsi,4)
LBB0_28:
	cmpq	%r13, %rcx
	je	LBB0_33
LBB0_29:
	movq	%rcx, %rdx
	notq	%rdx
	addq	%r13, %rdx
	movq	%r13, %rsi
	andq	$3, %rsi
	je	LBB0_31
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rax,%rcx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, (%r12,%rcx,4)
	incq	%rcx
	decq	%rsi
	jne	LBB0_30
LBB0_31:
	cmpq	$3, %rdx
	jb	LBB0_33
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rax,%rcx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, (%r12,%rcx,4)
	movss	4(%rax,%rcx,4), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, 4(%r12,%rcx,4)
	movss	8(%rax,%rcx,4), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, 8(%r12,%rcx,4)
	movss	12(%rax,%rcx,4), %xmm1          ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, 12(%r12,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r13
	jne	LBB0_32
LBB0_33:
	movq	16(%r14), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movq	%r12, %rcx
	movq	%rbx, %r8
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_seed_loop
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_max_seeds                      ## TAILCALL
LBB0_34:
	xorl	%esi, %esi
	testb	$1, %dl
	jne	LBB0_27
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_NEGINF,4,2                     ## @NEGINF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__vp_tonemask                   ; -- Begin function _vp_tonemask
	.p2align	2
__vp_tonemask:                          ; @_vp_tonemask
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -72
	.cfi_offset b9, -80
	fmov	s9, s1
	fmov	s8, s0
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldp	w23, w8, [x0]
	lsl	w0, w8, #2
	bl	_alloca
	mov	x22, x0
	ldr	x8, [x20, #24]
	ldr	s0, [x8]
	fadd	s0, s0, s9
	ldr	w10, [x20, #4]
	cmp	w10, #1
	b.lt	LBB0_9
; %bb.1:
Lloh0:
	adrp	x9, _NEGINF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NEGINF@GOTPAGEOFF]
	cmp	w10, #16
	b.lo	LBB0_6
; %bb.2:
	add	x11, x22, x10, lsl #2
	add	x12, x9, #4
	cmp	x22, x12
	ccmp	x11, x9, #0, lo
	b.hi	LBB0_6
; %bb.3:
	and	x11, x10, #0xfffffff0
	ld1r.4s	{ v1 }, [x9]
	add	x12, x22, #32
	mov	x13, x11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	stp	q1, q1, [x12, #-32]
	stp	q1, q1, [x12], #64
	subs	x13, x13, #16
	b.ne	LBB0_4
; %bb.5:
	cmp	x11, x10
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	x11, #0
LBB0_7:
	add	x12, x22, x11, lsl #2
	sub	x10, x10, x11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x9]
	str	s1, [x12], #4
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	s1, [x8, #4]
	fcmp	s0, s1
	fcsel	s0, s1, s0, mi
	cmp	w23, #1
	b.lt	LBB0_17
; %bb.10:
	mov	x8, #0
	ldr	x9, [x20, #8]
	cmp	w23, #16
	b.lo	LBB0_15
; %bb.11:
	sub	x10, x19, x9
	cmp	x10, #64
	b.lo	LBB0_15
; %bb.12:
	and	x8, x23, #0xfffffff0
	dup.4s	v1, v0[0]
	add	x10, x19, #32
	add	x11, x9, #32
	mov	x12, x8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	q2, q3, [x11, #-32]
	ldp	q4, q5, [x11], #64
	fadd.4s	v2, v1, v2
	fadd.4s	v3, v1, v3
	fadd.4s	v4, v1, v4
	fadd.4s	v5, v1, v5
	stp	q2, q3, [x10, #-32]
	stp	q4, q5, [x10], #64
	subs	x12, x12, #16
	b.ne	LBB0_13
; %bb.14:
	cmp	x8, x23
	b.eq	LBB0_17
LBB0_15:
	lsl	x11, x8, #2
	add	x10, x19, x11
	add	x9, x9, x11
	sub	x8, x23, x8
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x9], #4
	fadd	s1, s0, s1
	str	s1, [x10], #4
	subs	x8, x8, #1
	b.ne	LBB0_16
LBB0_17:
	ldr	x1, [x20, #16]
	mov	x0, x20
	mov	x2, x21
	mov	x3, x19
	mov	x4, x22
	fmov	s0, s8
	bl	_seed_loop
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	b	_max_seeds
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NEGINF,4,2                     ; @NEGINF
.subsections_via_symbols
