	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_vlc_codeword
_encode_vlc_codeword:                   ## @encode_vlc_codeword
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	%esi, %ebx
	andl	$3, %ebx
	incl	%ebx
	movl	%esi, %r13d
	shrl	$5, %r13d
	movl	%ebx, %eax
	movl	%r13d, %ecx
	shll	%cl, %eax
	cmpl	%edx, %eax
	jbe	LBB0_5
## %bb.1:
	movl	%r15d, %esi
	movl	%r13d, %ecx
	sarl	%cl, %esi
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_put_bits
LBB0_3:
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	cmpl	$32, %r12d
	jae	LBB0_6
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	shrl	$2, %r12d
	andl	$7, %r12d
	movl	$1, %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	subl	%eax, %r15d
	addl	%edx, %r15d
	movl	%r15d, %edi
	callq	_av_log2
	movl	%eax, %r13d
	subl	%r12d, %ebx
	addl	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_put_bits
	incl	%r13d
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
LBB0_6:
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_sbits                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_vlc_codeword
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_vlc_codeword
_encode_vlc_codeword:                   ; @encode_vlc_codeword
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	and	w8, w1, #0x3
	add	w23, w8, #1
	lsr	w21, w1, #5
	lsl	w8, w23, w21
	cmp	w8, w2
	b.ls	LBB0_5
; %bb.1:
	asr	w1, w20, w21
	cbz	w1, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w2, #0
	bl	_put_bits
LBB0_3:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	cmp	w22, #32
	b.hs	LBB0_6
; %bb.4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ubfx	w22, w22, #2, #3
	mov	w9, #1
	lsl	w9, w9, w22
	sub	w8, w20, w8
	add	w20, w8, w9
	mov	x0, x20
	bl	_av_log2
	mov	x21, x0
	sub	w8, w23, w22
	add	w1, w8, w0
	mov	x0, x19
	mov	w2, #0
	bl	_put_bits
	add	w1, w21, #1
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_put_bits
LBB0_6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_put_sbits
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_vlc_codeword
.subsections_via_symbols
