	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function vorbis_encode_tonemask_setup
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_vorbis_encode_tonemask_setup:          ## @vorbis_encode_tonemask_setup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cvttsd2si	%xmm0, %eax
	cvttpd2dq	%xmm0, %xmm1
	cvtdq2pd	%xmm1, %xmm1
	subsd	%xmm1, %xmm0
	movq	(%rdi), %rdi
	movq	(%rdi), %rdi
	movslq	%esi, %rsi
	movq	(%rdi,%rsi,8), %r10
	movslq	%eax, %r11
	movq	%r11, %r12
	shlq	$4, %r12
	movq	(%rdx,%r12), %r15
	cvtsi2sdl	(%r15), %xmm2
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	leaq	1(%r11), %r9
	movq	%r9, %rax
	shlq	$4, %rax
	movq	(%rdx,%rax), %rbx
	cvtsi2sdl	(%rbx), %xmm3
	mulsd	%xmm0, %xmm3
	mulsd	%xmm1, %xmm2
	addsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %r14d
	movq	(%r10), %rdi
	movl	%r14d, (%rdi)
	xorps	%xmm2, %xmm2
	cvtsi2sdl	4(%r15), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	4(%rbx), %xmm3
	mulsd	%xmm0, %xmm3
	mulsd	%xmm1, %xmm2
	addsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %esi
	movl	%esi, 4(%rdi)
	xorps	%xmm2, %xmm2
	cvtsi2sdl	8(%r15), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	8(%rbx), %xmm3
	mulsd	%xmm0, %xmm3
	mulsd	%xmm1, %xmm2
	addsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %esi
	movl	%esi, 8(%rdi)
	xorps	%xmm2, %xmm2
	cvtsi2sdl	8(%rdx,%r12), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	8(%rdx,%rax), %xmm3
	mulsd	%xmm0, %xmm3
	mulsd	%xmm1, %xmm2
	addsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %esi
	movl	%esi, 8(%r10)
	xorps	%xmm2, %xmm2
	cvtsi2sdl	12(%rdx,%r12), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	12(%rdx,%rax), %xmm3
	mulsd	%xmm0, %xmm3
	mulsd	%xmm1, %xmm2
	addsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %eax
	movl	%eax, 12(%r10)
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%rcx,%r11,4), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	4(%rcx,%r11,4), %xmm3
	mulsd	%xmm0, %xmm3
	mulsd	%xmm1, %xmm2
	addsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %eax
	movl	%eax, 16(%r10)
	movq	_P_BANDS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	(%r8,%r11,8), %rcx
	movq	(%r8,%r9,8), %rdx
	movq	24(%r10), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm2, %xmm2
	cvtsi2sdl	(%rcx,%rdi,4), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2sdl	(%rdx,%rdi,4), %xmm3
	mulsd	%xmm0, %xmm3
	mulsd	%xmm1, %xmm2
	addsd	%xmm3, %xmm2
	cvttsd2si	%xmm2, %ebx
	movl	%ebx, (%rsi,%rdi,4)
	incq	%rdi
	movslq	(%rax), %rbx
	cmpq	%rbx, %rdi
	jl	LBB0_2
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P_BANDS,4,2                    ## @P_BANDS
	.no_dead_strip	_vorbis_encode_tonemask_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vorbis_encode_tonemask_setup
_vorbis_encode_tonemask_setup:          ; @vorbis_encode_tonemask_setup
	.cfi_startproc
; %bb.0:
	fcvtzs	w11, d0
	scvtf	d1, w11
	fsub	d0, d0, d1
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	x8, [x8, w1, sxtw #3]
	sxtw	x9, w11
	add	x12, x2, w11, sxtw #4
	ldr	x13, [x12]
	ldr	s1, [x13]
	sshll.2d	v1, v1, #0
	scvtf	d2, d1
	fmov	d1, #1.00000000
	fsub	d1, d1, d0
	add	x10, x9, #1
	add	x14, x2, x10, lsl #4
	ldr	x15, [x14]
	ldr	s3, [x15]
	sshll.2d	v3, v3, #0
	scvtf	d3, d3
	fmul	d3, d0, d3
	fmadd	d2, d2, d1, d3
	fcvtzs	w16, d2
	ldr	x17, [x8]
	str	w16, [x17]
	ldr	s2, [x13, #4]
	sshll.2d	v2, v2, #0
	scvtf	d2, d2
	ldr	s3, [x15, #4]
	sshll.2d	v3, v3, #0
	scvtf	d3, d3
	fmul	d3, d0, d3
	fmadd	d2, d2, d1, d3
	fcvtzs	w16, d2
	str	w16, [x17, #4]
	ldr	s2, [x13, #8]
	sshll.2d	v2, v2, #0
	scvtf	d2, d2
	ldr	s3, [x15, #8]
	sshll.2d	v3, v3, #0
	scvtf	d3, d3
	fmul	d3, d0, d3
	fmadd	d2, d2, d1, d3
	fcvtzs	w13, d2
	str	w13, [x17, #8]
	ldr	d2, [x12, #8]
	sshll.2d	v2, v2, #0
	scvtf.2d	v2, v2
	ldr	d3, [x14, #8]
	sshll.2d	v3, v3, #0
	scvtf.2d	v3, v3
	fmul.2d	v3, v3, v0[0]
	fmla.2d	v3, v2, v1[0]
	fcvtzs.2d	v2, v3
	xtn.2s	v2, v2
	str	d2, [x8, #8]
	ldr	s2, [x3, w11, sxtw #2]
	sshll.2d	v2, v2, #0
	scvtf	d2, d2
	ldr	s3, [x3, x10, lsl #2]
	sshll.2d	v3, v3, #0
	scvtf	d3, d3
	fmul	d3, d0, d3
	fmadd	d2, d2, d1, d3
	fcvtzs	w11, d2
	str	w11, [x8, #16]
Lloh0:
	adrp	x11, _P_BANDS@GOTPAGE
Lloh1:
	ldr	x11, [x11, _P_BANDS@GOTPAGEOFF]
	ldr	w12, [x11]
	cmp	w12, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x12, #0
	ldr	x9, [x4, x9, lsl #3]
	ldr	x10, [x4, x10, lsl #3]
	ldr	x8, [x8, #24]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x13, x12, #2
	ldr	s2, [x9, x13]
	sshll.2d	v2, v2, #0
	scvtf	d2, d2
	ldr	s3, [x10, x13]
	sshll.2d	v3, v3, #0
	scvtf	d3, d3
	fmul	d3, d0, d3
	fmadd	d2, d2, d1, d3
	fcvtzs	w14, d2
	str	w14, [x8, x13]
	add	x12, x12, #1
	ldrsw	x13, [x11]
	cmp	x12, x13
	b.lt	LBB0_2
LBB0_3:
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_P_BANDS,4,2                    ; @P_BANDS
	.no_dead_strip	_vorbis_encode_tonemask_setup
.subsections_via_symbols
