	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quant
_quant:                                 ## @quant
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	%esi, %ebx
	negl	%ebx
	cmovsl	%esi, %ebx
	movl	%ebx, %edi
	callq	_av_log2_16bit
	movl	%eax, %edx
	shll	$7, %edx
	shll	$7, %ebx
	movl	%eax, %ecx
	sarl	%cl, %ebx
	andl	$127, %ebx
	orl	%edx, %ebx
	movl	(%r14), %eax
	sarl	$2, %eax
	subl	%eax, %ebx
	movq	8(%r14), %rcx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-1, %eax
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %esi
	incl	%eax
	cmpl	%edx, %esi
	jge	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	addq	$4, %rcx
	cmpl	%ebx, %esi
	jl	LBB0_1
LBB0_3:
	sarl	$31, %r15d
	xorl	%eax, %r15d
	movl	$255, %eax
	cmovnel	%r15d, %eax
	cmpl	$2, 4(%r14)
	cmovel	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_quant
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quant
_quant:                                 ; @quant
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	cmp	w1, #0
	cneg	w21, w1, mi
	mov	x0, x21
	bl	_av_log2_16bit
	lsl	w8, w21, #7
	asr	w8, w8, w0
	bfi	w8, w0, #7, #25
	ldr	w9, [x19]
	sub	w8, w8, w9, asr #2
	ldr	x9, [x19, #8]
Lloh0:
	adrp	x10, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x10]
	mov	w10, #-1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9], #4
	add	w10, w10, #1
	cmp	w12, w11
	ccmp	w12, w8, #0, lt
	b.lt	LBB0_1
; %bb.2:
	eor	w8, w10, w20, asr #31
	ldr	w9, [x19, #4]
	cmp	w8, #0
	ccmp	w9, #2, #4, eq
	mov	w9, #255
	csel	w0, w9, w8, ne
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_quant
.subsections_via_symbols
