	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_low
_encode_low:                            ## @encode_low
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movslq	%esi, %rdi
	subq	8(%rbx), %rdi
	callq	_av_clip_int16
	movl	%eax, %edx
	sarl	$31, %edx
	xorl	%eax, %edx
	shll	$10, %edx
	addl	$1024, %edx                     ## imm = 0x400
	movq	_low_quant@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	movl	(%rbx), %edi
	movl	32(%rsi), %ecx
	imull	%edi, %ecx
	xorl	%ebx, %ebx
	cmpl	%ecx, %edx
	setg	%bl
	leaq	(%rbx,%rbx,8), %rcx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rcx,4), %ebx
	imull	%edi, %ebx
	cmpl	%ebx, %edx
	jle	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rcx
	cmpq	$29, %rcx
	jne	LBB0_1
## %bb.3:
	movl	$33, %edx
	movl	$29, %ecx
	jmp	LBB0_5
LBB0_4:
	cmpl	$2, %ecx
	movl	$63, %esi
	movl	$33, %edx
	cmovbl	%esi, %edx
LBB0_5:
	testl	%eax, %eax
	movl	$61, %eax
	cmovsl	%edx, %eax
	subl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_low_quant,8,3                  ## @low_quant
	.no_dead_strip	_encode_low
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_low
_encode_low:                            ; @encode_low
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
	sxtw	x8, w1
	ldr	x9, [x0, #8]
	sub	x0, x8, x9
	bl	_av_clip_int16
	eor	w8, w0, w0, asr #31
	lsl	w8, w8, #10
	add	w9, w8, #1024
Lloh0:
	adrp	x8, _low_quant@GOTPAGE
Lloh1:
	ldr	x8, [x8, _low_quant@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
	ldr	w8, [x10, #32]
	ldr	w11, [x19]
	mul	w8, w11, w8
	cmp	w9, w8
	mov	w8, #9
	csel	x8, x8, xzr, gt
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10, x8, lsl #2]
	mul	w12, w12, w11
	cmp	w9, w12
	b.le	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x8, x8, #1
	cmp	x8, #29
	b.ne	LBB0_1
; %bb.3:
	mov	w9, #33
	b	LBB0_5
LBB0_4:
	mov	w9, #33
	mov	w10, #63
	cmp	w8, #2
	csel	w9, w10, w9, lo
LBB0_5:
	mov	w10, #61
	cmp	w0, #0
	csel	w9, w9, w10, lt
	sub	w0, w9, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_low_quant,8,3                  ; @low_quant
	.no_dead_strip	_encode_low
.subsections_via_symbols
