	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function adaptive_quantization
LCPI0_0:
	.long	0x3f800000                      ## float 1
LCPI0_2:
	.long	0x40800000                      ## float 4
LCPI0_6:
	.long	0x3727c5ac                      ## float 9.99999974E-6
LCPI0_8:
	.long	0x3a83126f                      ## float 0.00100000005
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_3:
	.quad	0xbf10000000000000              ## double -6.103515625E-5
LCPI0_4:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_5:
	.quad	0x3ee4f8b588e368f1              ## double 1.0000000000000001E-5
LCPI0_7:
	.quad	0x3f50624dd2f1a9fc              ## double 0.001
LCPI0_9:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_adaptive_quantization:                 ## @adaptive_quantization
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	104(%rdi), %rcx
	movq	8(%rdi), %r9
	movq	16(%rdi), %rdi
	movl	28(%rcx), %r10d
	movl	32(%rcx), %r11d
	movl	32(%r15), %esi
	testl	%esi, %esi
	movsd	%xmm0, -104(%rbp)               ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movl	%r11d, -76(%rbp)                ## 4-byte Spill
	movl	%r10d, -80(%rbp)                ## 4-byte Spill
	movsd	(%rcx), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, -176(%rbp)               ## 8-byte Spill
	movsd	8(%rcx), %xmm0                  ## xmm0 = mem[0],zero
	movsd	%xmm0, -152(%rbp)               ## 8-byte Spill
	movss	(%r15), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -92(%rbp)                ## 4-byte Spill
	movslq	28(%r15), %rax
	movslq	24(%r15), %rdx
	movss	24(%rcx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	addss	LCPI0_0(%rip), %xmm0
	movss	%xmm0, -88(%rbp)                ## 4-byte Spill
	movss	16(%rcx), %xmm1                 ## xmm1 = mem[0],zero,zero,zero
	movss	20(%rcx), %xmm2                 ## xmm2 = mem[0],zero,zero,zero
	movaps	LCPI0_1(%rip), %xmm0            ## xmm0 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm0, %xmm1
	movaps	%xmm1, -192(%rbp)               ## 16-byte Spill
	xorps	%xmm0, %xmm2
	movaps	%xmm2, -208(%rbp)               ## 16-byte Spill
	imulq	$1717986919, %rdx, %rsi         ## imm = 0x66666667
	movq	%rsi, %rcx
	shrq	$63, %rcx
	sarq	$33, %rsi
	addl	%ecx, %esi
	leal	(,%rdx,4), %ecx
	movslq	%ecx, %rcx
	imulq	$1717986919, %rcx, %rdx         ## imm = 0x66666667
	movq	%rdx, %rcx
	shrq	$63, %rcx
	movq	%rsi, -168(%rbp)                ## 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2ss	%esi, %xmm0
	movss	%xmm0, -52(%rbp)                ## 4-byte Spill
	sarq	$33, %rdx
	addl	%ecx, %edx
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	imulq	$1717986919, %rax, %rdx         ## imm = 0x66666667
	movq	%rdx, %rcx
	shrq	$63, %rcx
	sarq	$33, %rdx
	addl	%ecx, %edx
	leal	(,%rax,4), %eax
	cltq
	imulq	$1717986919, %rax, %rcx         ## imm = 0x66666667
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$33, %rcx
	addl	%eax, %ecx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movq	%rdx, -160(%rbp)                ## 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2ss	%edx, %xmm0
	movss	%xmm0, -84(%rbp)                ## 4-byte Spill
	xorps	%xmm6, %xmm6
	xorl	%r13d, %r13d
	xorps	%xmm4, %xmm4
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	movq	%rdi, -112(%rbp)                ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	mulss	%xmm3, %xmm0
	addss	%xmm3, %xmm4
	addss	%xmm0, %xmm6
	movss	%xmm3, (%r9,%r13,4)
	movss	%xmm0, (%rdi,%r13,4)
	incq	%r13
	movslq	32(%r15), %rsi
	cmpq	%rsi, %r13
	jge	LBB0_21
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movss	%xmm6, -60(%rbp)                ## 4-byte Spill
	movss	%xmm4, -64(%rbp)                ## 4-byte Spill
	movq	40(%r15), %rax
	movq	96(%r15), %rcx
	movslq	(%rax,%r13,4), %rbx
	movl	(%rcx,%rbx,4), %edi
	callq	_sqrt
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	88(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_sqrt
	movq	56(%r15), %rcx
	movq	80(%r15), %rax
	movl	(%rax,%rbx,4), %r14d
	movl	%ebx, %eax
	cltd
	idivl	48(%r15)
	movl	%eax, %r15d
	movl	%edx, %r12d
	movss	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	maxss	%xmm0, %xmm1
	movq	_CANDIDATE_MB_TYPE_INTRA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movss	%xmm1, -48(%rbp)                ## 4-byte Spill
	movss	-88(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	testl	%eax, (%rcx,%rbx,4)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movss	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	maxss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	movaps	-192(%rbp), %xmm1               ## 16-byte Reload
	callq	_pow
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movaps	%xmm1, %xmm0
	movaps	-208(%rbp), %xmm1               ## 16-byte Reload
	callq	_pow
	movaps	%xmm0, %xmm2
	leal	-128(%r14), %eax
	imull	%eax, %eax
	movsd	-176(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	cmpl	$127, %r14d
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movsd	-152(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	mulsd	LCPI0_3(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	mulss	%xmm1, %xmm0
	xorps	%xmm5, %xmm5
	cvtss2sd	%xmm0, %xmm5
	addsd	LCPI0_4(%rip), %xmm5
	movq	-168(%rbp), %rax                ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	subl	%r12d, %eax
	jle	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorps	%xmm0, %xmm0
	subl	-144(%rbp), %r12d               ## 4-byte Folded Reload
	jle	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r12d, %xmm0
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	divss	-52(%rbp), %xmm0                ## 4-byte Folded Reload
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-160(%rbp), %rax                ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	subl	%r15d, %eax
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movsd	%xmm5, -128(%rbp)               ## 8-byte Spill
	movss	%xmm2, -56(%rbp)                ## 4-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	subl	-136(%rbp), %r15d               ## 4-byte Folded Reload
	jle	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movsd	%xmm5, -128(%rbp)               ## 8-byte Spill
	movss	%xmm2, -56(%rbp)                ## 4-byte Spill
	movl	%r15d, %eax
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	divss	-84(%rbp), %xmm1                ## 4-byte Folded Reload
	callq	_FFMAX
	movq	-120(%rbp), %r9                 ## 8-byte Reload
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movss	-64(%rbp), %xmm4                ## 4-byte Reload
                                        ## xmm4 = mem[0],zero,zero,zero
	movss	-60(%rbp), %xmm6                ## 4-byte Reload
                                        ## xmm6 = mem[0],zero,zero,zero
	movss	-48(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movss	-56(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	movsd	-128(%rbp), %xmm5               ## 8-byte Reload
                                        ## xmm5 = mem[0],zero
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-120(%rbp), %r9                 ## 8-byte Reload
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movss	-64(%rbp), %xmm4                ## 4-byte Reload
                                        ## xmm4 = mem[0],zero,zero,zero
	movss	-60(%rbp), %xmm6                ## 4-byte Reload
                                        ## xmm6 = mem[0],zero,zero,zero
	movss	-48(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	mulss	-92(%rbp), %xmm0                ## 4-byte Folded Reload
	mulss	%xmm2, %xmm1
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm1, %xmm5
	xorps	%xmm1, %xmm1
	cvtsd2ss	%xmm5, %xmm1
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI0_4(%rip), %xmm2            ## xmm2 = mem[0],zero
	subsd	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	mulsd	%xmm2, %xmm0
	xorps	%xmm1, %xmm1
	cvtsd2ss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	movsd	LCPI0_5(%rip), %xmm2            ## xmm2 = mem[0],zero
	ucomisd	%xmm0, %xmm2
	movss	LCPI0_6(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ja	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	movaps	%xmm1, %xmm0
	jmp	LBB0_20
LBB0_21:
	movl	-80(%rbp), %r10d                ## 4-byte Reload
	movl	-76(%rbp), %r11d                ## 4-byte Reload
	jmp	LBB0_22
LBB0_1:
	xorps	%xmm4, %xmm4
	xorps	%xmm6, %xmm6
LBB0_22:
	movl	64(%r15), %ecx
	movq	_FF_MPV_FLAG_NAQ@GOTPCREL(%rip), %r8
	movl	(%r8), %edx
	testl	%ecx, %edx
	je	LBB0_23
## %bb.24:
	testl	%esi, %esi
	movsd	-104(%rbp), %xmm1               ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	jle	LBB0_32
## %bb.25:
	cvtsi2ss	%r11d, %xmm11
	cvtsi2ss	%r10d, %xmm9
	movaps	%xmm6, %xmm2
	divss	%xmm4, %xmm2
	cvtsi2sd	%r10d, %xmm8
	cvtsi2sd	%r11d, %xmm10
	movl	%esi, %eax
	xorl	%ebx, %ebx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_26 Depth=1
	subss	%xmm0, %xmm6
	divsd	%xmm10, %xmm3
LBB0_30:                                ##   in Loop: Header=BB0_26 Depth=1
	xorps	%xmm5, %xmm5
	cvtss2sd	%xmm4, %xmm5
	subsd	%xmm3, %xmm5
	xorps	%xmm4, %xmm4
	cvtsd2ss	%xmm5, %xmm4
LBB0_31:                                ##   in Loop: Header=BB0_26 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	je	LBB0_32
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movss	(%r9,%rbx,4), %xmm5             ## xmm5 = mem[0],zero,zero,zero
	xorps	%xmm3, %xmm3
	cvtss2sd	%xmm5, %xmm3
	mulsd	%xmm1, %xmm3
	movss	(%rdi,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm7, %xmm7
	cvtss2sd	%xmm0, %xmm7
	movapd	%xmm3, %xmm5
	divsd	%xmm7, %xmm5
	xorps	%xmm7, %xmm7
	cvtsd2ss	%xmm5, %xmm7
	mulss	%xmm2, %xmm7
	ucomiss	%xmm11, %xmm7
	ja	LBB0_27
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	ucomiss	%xmm7, %xmm9
	jbe	LBB0_31
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	subss	%xmm0, %xmm6
	divsd	%xmm8, %xmm3
	jmp	LBB0_30
LBB0_32:
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm6, %xmm0
	movsd	LCPI0_7(%rip), %xmm2            ## xmm2 = mem[0],zero
	ucomisd	%xmm0, %xmm2
	movss	LCPI0_8(%rip), %xmm5            ## xmm5 = mem[0],zero,zero,zero
	movaps	%xmm5, %xmm0
	ja	LBB0_34
## %bb.33:
	movaps	%xmm6, %xmm0
LBB0_34:
	xorps	%xmm3, %xmm3
	cvtss2sd	%xmm4, %xmm3
	ucomisd	%xmm3, %xmm2
	ja	LBB0_36
## %bb.35:
	movaps	%xmm4, %xmm5
LBB0_36:
	movaps	%xmm5, %xmm4
	testl	%esi, %esi
	jg	LBB0_38
	jmp	LBB0_43
LBB0_23:
	movaps	%xmm6, %xmm0
	movsd	-104(%rbp), %xmm1               ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	testl	%esi, %esi
	jle	LBB0_43
LBB0_38:
	movq	40(%r15), %rsi
	movq	72(%r15), %rax
	movl	$1, %ebx
	movss	LCPI0_0(%rip), %xmm6            ## xmm6 = mem[0],zero,zero,zero
	movsd	LCPI0_9(%rip), %xmm2            ## xmm2 = mem[0],zero
	divss	%xmm4, %xmm0
	.p2align	4, 0x90
LBB0_39:                                ## =>This Inner Loop Header: Depth=1
	movaps	%xmm6, %xmm3
	testl	%ecx, %edx
	je	LBB0_41
## %bb.40:                              ##   in Loop: Header=BB0_39 Depth=1
	movaps	%xmm0, %xmm3
LBB0_41:                                ##   in Loop: Header=BB0_39 Depth=1
	movss	-4(%r9,%rbx,4), %xmm4           ## xmm4 = mem[0],zero,zero,zero
	cvtss2sd	%xmm4, %xmm4
	mulsd	%xmm1, %xmm4
	movss	-4(%rdi,%rbx,4), %xmm5          ## xmm5 = mem[0],zero,zero,zero
	cvtss2sd	%xmm5, %xmm5
	divsd	%xmm5, %xmm4
	cvtsd2ss	%xmm4, %xmm4
	mulss	%xmm3, %xmm4
	xorps	%xmm3, %xmm3
	cvtss2sd	%xmm4, %xmm3
	addsd	%xmm2, %xmm3
	cvttsd2si	%xmm3, %ecx
	cmpl	%ecx, %r10d
	movl	%ecx, %edx
	cmovgl	%r10d, %edx
	cmpl	%ecx, %r11d
	cmovll	%r11d, %edx
	movslq	-4(%rsi,%rbx,4), %rcx
	movl	%edx, (%rax,%rcx,4)
	movslq	32(%r15), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_43
## %bb.42:                              ##   in Loop: Header=BB0_39 Depth=1
	movl	64(%r15), %ecx
	movl	(%r8), %edx
	incq	%rbx
	jmp	LBB0_39
LBB0_43:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CANDIDATE_MB_TYPE_INTRA,4,2    ## @CANDIDATE_MB_TYPE_INTRA
	.comm	_FF_MPV_FLAG_NAQ,4,2            ## @FF_MPV_FLAG_NAQ
	.no_dead_strip	_adaptive_quantization
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adaptive_quantization
_adaptive_quantization:                 ; @adaptive_quantization
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	d15, d14, [sp, #64]             ; 16-byte Folded Spill
	stp	d13, d12, [sp, #80]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #96]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #112]              ; 16-byte Folded Spill
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	.cfi_offset b12, -136
	.cfi_offset b13, -144
	.cfi_offset b14, -152
	.cfi_offset b15, -160
	mov	x19, x0
	ldr	x8, [x0, #104]
	ldp	x22, x23, [x0, #8]
	ldp	w0, w1, [x8, #28]
	ldr	w11, [x19, #32]
	cmp	w11, #1
	b.lt	LBB0_12
; %bb.1:
	stp	w1, w0, [sp]                    ; 8-byte Folded Spill
	str	d0, [sp, #8]                    ; 8-byte Folded Spill
	mov	x24, #0
	ldr	d1, [x8]
	ldr	d0, [x8, #8]
	stp	d0, d1, [sp, #48]               ; 16-byte Folded Spill
	ldr	s4, [x19]
	ldpsw	x10, x9, [x19, #24]
	ldp	s1, s0, [x8, #20]
	ldr	s2, [x8, #16]
	fmov	s3, #1.00000000
	fadd	s0, s0, s3
	stp	s0, s4, [sp, #40]               ; 8-byte Folded Spill
	fneg	s0, s2
	str	s0, [sp, #20]                   ; 4-byte Folded Spill
	fneg	s10, s1
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	mul	x11, x10, x8
	lsr	x12, x11, #63
	asr	x11, x11, #33
	add	w25, w11, w12
	lsl	w10, w10, #2
	smull	x10, w10, w8
	lsr	x11, x10, #63
	asr	x10, x10, #33
	add	w10, w10, w11
	str	w10, [sp, #28]                  ; 4-byte Folded Spill
	scvtf	s1, w25
	mul	x10, x9, x8
	lsr	x11, x10, #63
	asr	x10, x10, #33
	add	w27, w10, w11
	lsl	w9, w9, #2
	smull	x8, w9, w8
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	scvtf	s0, w27
	stp	s0, s1, [sp, #32]               ; 8-byte Folded Spill
	movi	d15, #0000000000000000
	fmov	d8, #1.00000000
	movi	d9, #0000000000000000
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	scvtf	s1, w8
	ldr	s2, [sp, #32]                   ; 4-byte Folded Reload
	fdiv	s1, s1, s2
	bl	_FFMAX
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	fmul	s1, s12, s13
	mul	w8, w26, w26
	scvtf	s2, w8
	mov	x8, #-4679240012837945344
	fmov	d3, x8
	fmul	d3, d14, d3
	fcvt	s3, d3
	fmul	s2, s3, s2
	fcvt	d2, s2
	fadd	d2, d2, d8
	fcvt	d1, s1
	fmul	d1, d2, d1
	fcvt	s1, d1
	ldr	s2, [sp, #44]                   ; 4-byte Folded Reload
	fmul	s0, s2, s0
	fcvt	d0, s0
	fsub	d0, d8, d0
	fcvt	d1, s1
	fmul	d0, d0, d1
	fcvt	s0, d0
	fcvt	d1, s0
	mov	x8, #26865
	movk	x8, #35043, lsl #16
	movk	x8, #63669, lsl #32
	movk	x8, #16100, lsl #48
	fmov	d2, x8
	fcmp	d1, d2
	mov	w8, #50604
	movk	w8, #14119, lsl #16
	fmov	s1, w8
	fcsel	s0, s1, s0, mi
	fmul	s0, s11, s0
	fadd	s9, s9, s11
	lsl	x8, x24, #2
	str	s11, [x22, x8]
	fadd	s15, s15, s0
	str	s0, [x23, x8]
	add	x24, x24, #1
	ldrsw	x11, [x19, #32]
	cmp	x24, x11
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldrsw	x28, [x8, x24, lsl #2]
	ldr	x8, [x19, #96]
	lsl	x20, x28, #2
	ldr	w0, [x8, x20]
	bl	_sqrt
	fmov	s14, s0
	ldr	x8, [x19, #88]
	ldr	w0, [x8, x20]
	bl	_sqrt
	ldr	x8, [x19, #80]
	ldr	w26, [x8, x20]
	ldr	w21, [x19, #48]
	fmov	s1, #4.00000000
	fmax	s13, s0, s1
	ldr	x8, [x19, #56]
	ldr	w8, [x8, x20]
Lloh0:
	adrp	x9, _CANDIDATE_MB_TYPE_INTRA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CANDIDATE_MB_TYPE_INTRA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	fmov	s11, s13
	ldr	s12, [sp, #40]                  ; 4-byte Folded Reload
	tst	w9, w8
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	fmov	s0, #4.00000000
	fmax	s11, s14, s0
	fmov	s0, s11
	ldr	s1, [sp, #20]                   ; 4-byte Folded Reload
	bl	_pow
	fmov	s12, s0
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	sdiv	w20, w28, w21
	msub	w21, w20, w21, w28
	fmov	s0, s13
	fmov	s1, s10
	bl	_pow
	fmov	s13, s0
	cmp	w26, #127
	ldp	d1, d0, [sp, #48]               ; 16-byte Folded Reload
	fcsel	d14, d0, d1, gt
	subs	w8, w25, w21
	b.gt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	movi	d0, #0000000000000000
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	subs	w8, w21, w8
	b.le	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	scvtf	s0, w8
	ldr	s1, [sp, #36]                   ; 4-byte Folded Reload
	fdiv	s0, s0, s1
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w26, w26, #128
	subs	w8, w27, w20
	b.gt	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	subs	w8, w20, w8
	b.gt	LBB0_2
	b	LBB0_3
LBB0_11:
	ldr	d0, [sp, #8]                    ; 8-byte Folded Reload
	ldp	w1, w0, [sp]                    ; 8-byte Folded Reload
	b	LBB0_13
LBB0_12:
	movi	d9, #0000000000000000
	movi	d15, #0000000000000000
LBB0_13:
	ldr	w9, [x19, #64]
Lloh3:
	adrp	x8, _FF_MPV_FLAG_NAQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FF_MPV_FLAG_NAQ@GOTPAGEOFF]
	ldr	w10, [x8]
	tst	w10, w9
	b.eq	LBB0_23
; %bb.14:
	cmp	w11, #1
	b.lt	LBB0_22
; %bb.15:
	scvtf	s16, w1
	scvtf	s1, w0
	mov	w12, w11
	mov	x13, x22
	scvtf	d2, w0
	mov	x14, x23
	scvtf	d3, w1
	fdiv	s4, s15, s9
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_19 Depth=1
	fsub	s15, s15, s6
	fdiv	d5, d5, d3
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	fcvt	d6, s9
	fsub	d5, d6, d5
	fcvt	s9, d5
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x14, x14, #4
	add	x13, x13, #4
	subs	x12, x12, #1
	b.eq	LBB0_22
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	s5, [x13]
	fcvt	d5, s5
	fmul	d5, d5, d0
	ldr	s6, [x14]
	fcvt	d7, s6
	fdiv	d7, d5, d7
	fcvt	s7, d7
	fmul	s7, s4, s7
	fcmp	s7, s16
	b.gt	LBB0_16
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	fcmp	s7, s1
	b.pl	LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	fsub	s15, s15, s6
	fdiv	d5, d5, d2
	b	LBB0_17
LBB0_22:
	fcvt	d2, s15
	mov	x12, #43516
	movk	x12, #54001, lsl #16
	movk	x12, #25165, lsl #32
	movk	x12, #16208, lsl #48
	fmov	d1, x12
	fcmp	d2, d1
	mov	w12, #4719
	movk	w12, #14979, lsl #16
	fmov	s3, w12
	fcsel	s15, s3, s15, mi
	fcvt	d2, s9
	fcmp	d2, d1
	fcsel	s9, s3, s9, mi
LBB0_23:
	cmp	w11, #1
	b.lt	LBB0_27
; %bb.24:
	mov	x11, #0
	ldr	x12, [x19, #40]
	ldr	x13, [x19, #72]
	fmov	s5, #1.00000000
	fmov	d1, #0.50000000
	fdiv	s2, s15, s9
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	lsl	x14, x11, #2
	ldrsw	x15, [x12, x14]
	ldr	s3, [x22, x14]
	fcvt	d3, s3
	fmul	d3, d3, d0
	ldr	s4, [x23, x14]
	fcvt	d4, s4
	fdiv	d3, d3, d4
	fcvt	s3, d3
	tst	w10, w9
	fcsel	s4, s5, s2, eq
	fmul	s3, s4, s3
	fcvt	d3, s3
	fadd	d3, d3, d1
	fcvtzs	w9, d3
	cmp	w0, w9
	csel	w10, w0, w9, gt
	cmp	w1, w9
	csel	w9, w1, w10, lt
	str	w9, [x13, x15, lsl #2]
	add	x11, x11, #1
	ldrsw	x9, [x19, #32]
	cmp	x11, x9
	b.ge	LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	w9, [x19, #64]
	ldr	w10, [x8]
	b	LBB0_25
LBB0_27:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #112]              ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #96]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #80]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CANDIDATE_MB_TYPE_INTRA,4,2    ; @CANDIDATE_MB_TYPE_INTRA
	.comm	_FF_MPV_FLAG_NAQ,4,2            ; @FF_MPV_FLAG_NAQ
	.no_dead_strip	_adaptive_quantization
.subsections_via_symbols
