	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dv100_actual_quantize
_dv100_actual_quantize:                 ## @dv100_actual_quantize
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_dv100_qlevels@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%esi, %rbx
	movl	(%rax,%rbx,4), %edi
	callq	_DV100_QLEVEL_QNO
	movl	%eax, %r12d
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_DV100_QLEVEL_CNO
	movq	(%r13), %rsi
	cmpl	%r12d, (%rsi)
	jne	LBB0_3
## %bb.1:
	cmpl	%eax, 8(%r13)
	jne	LBB0_3
## %bb.2:
	addq	$16, %r13
	jmp	LBB0_10
LBB0_3:
	movq	_dv100_qstep_inv@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%r12d, %rdx
	movl	(%rcx,%rdx,4), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, (%rsi)
	movl	%eax, 8(%r13)
	leaq	16(%r13), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	16(%r13), %rcx
	movl	$4, (%rcx)
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	movl	%eax, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r13), %rcx
	movl	%eax, 4(%rcx,%rbx,4)
	leal	1(%rbx), %r12d
	movl	%ebx, %edi
	subl	%r14d, %edi
	movl	%eax, %esi
	callq	_dv_rl2vlc_size
	movq	16(%r13), %rcx
	addl	%eax, (%rcx)
	movq	32(%r13), %rax
	movslq	%r14d, %rcx
	movl	%r12d, (%rax,%rcx,4)
	movl	%r12d, %r14d
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	cmpq	$63, %rbx
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rax
	movl	4(%rax,%rbx,4), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_dv100_quantize
	movl	%r15d, %ecx
	sarl	%cl, %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$255, %eax
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$255, %eax
	jmp	LBB0_7
LBB0_9:
	movq	32(%r13), %rax
	movslq	%r14d, %rcx
	movl	$64, (%rax,%rcx,4)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_10:
	movq	(%r13), %rax
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dv100_qlevels,8,3              ## @dv100_qlevels
	.comm	_dv100_qstep_inv,8,3            ## @dv100_qstep_inv
	.no_dead_strip	_dv100_actual_quantize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dv100_actual_quantize
_dv100_actual_quantize:                 ; @dv100_actual_quantize
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
Lloh0:
	adrp	x20, _dv100_qlevels@GOTPAGE
Lloh1:
	ldr	x20, [x20, _dv100_qlevels@GOTPAGEOFF]
	ldr	x8, [x20]
	sbfiz	x21, x1, #2, #32
	ldr	w0, [x8, x21]
	bl	_DV100_QLEVEL_QNO
	mov	x22, x0
	ldr	x8, [x20]
	ldr	w0, [x8, x21]
	bl	_DV100_QLEVEL_CNO
	mov	x20, x0
	ldr	x8, [x19]
	ldr	w9, [x8]
	cmp	w9, w22
	b.ne	LBB0_3
; %bb.1:
	ldr	w9, [x19, #8]
	cmp	w9, w20
	b.ne	LBB0_3
; %bb.2:
	add	x22, x19, #16
	b	LBB0_8
LBB0_3:
	mov	x24, #0
	mov	w23, #0
Lloh2:
	adrp	x9, _dv100_qstep_inv@GOTPAGE
Lloh3:
	ldr	x9, [x9, _dv100_qstep_inv@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	w21, [x9, w22, sxtw #2]
	str	w22, [x8]
	mov	x22, x19
	ldr	x8, [x22, #16]!
	stur	w20, [x22, #-8]
	mov	w9, #4
	str	w9, [x8]
	mov	w25, #255
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	cmp	x24, #63
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	add	x8, x8, x24, lsl #2
	ldr	w0, [x8, #4]
	mov	x1, x21
	bl	_dv100_quantize
	asr	w8, w0, w20
	cbz	w8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #255
	csel	w1, w8, w25, lt
	ldr	x8, [x19, #24]
	add	x8, x8, x24, lsl #2
	str	w1, [x8, #4]
	add	w26, w24, #1
	sub	w0, w24, w23
	bl	_dv_rl2vlc_size
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
	add	w9, w9, w0
	str	w9, [x8]
	ldr	x8, [x19, #32]
	str	w26, [x8, w23, sxtw #2]
	mov	x23, x26
	b	LBB0_4
LBB0_7:
	ldr	x8, [x19, #32]
	mov	w9, #64
	str	w9, [x8, w23, sxtw #2]
LBB0_8:
	ldr	x8, [x22]
	ldr	w0, [x8]
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_dv100_qlevels,8,3              ; @dv100_qlevels
	.comm	_dv100_qstep_inv,8,3            ; @dv100_qstep_inv
	.no_dead_strip	_dv100_actual_quantize
.subsections_via_symbols
