	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_huffman_tree
_read_huffman_tree:                     ## @read_huffman_tree
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	%rsi, %rdi
	callq	_get_bits1
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpl	$32, (%rbx)
	jge	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	movl	$5, %esi
	callq	_get_bits
	movl	%eax, %r15d
	movq	8(%rbx), %rdx
	movl	16(%rbx), %ecx
	movl	(%rbx), %r9d
	movl	20(%rbx), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %r8d
	callq	_ff_dlog
	movl	16(%rbx), %eax
	movq	24(%rbx), %rcx
	movq	8(%rbx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movslq	%r15d, %rdx
	movq	(%rcx,%rdx,8), %rcx
	movl	%eax, (%rcx)
	movl	20(%rbx), %eax
	movl	%eax, 4(%rcx)
	incl	(%rbx)
LBB0_8:
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_4:
	movl	20(%rbx), %eax
	cmpl	$32, %eax
	jl	LBB0_5
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movl	$-1, %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	incl	%eax
	movl	%eax, 20(%rbx)
	shll	16(%rbx)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_read_huffman_tree
	movl	$-1, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	orb	$1, 16(%rbx)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_read_huffman_tree
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	sarl	16(%rbx)
	decl	20(%rbx)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"huffman tree overflow\n"

L_.str.1:                               ## @.str.1
	.asciz	"hti %d hbits %x token %d entry : %d size %d\n"

	.no_dead_strip	_read_huffman_tree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_huffman_tree
_read_huffman_tree:                     ; @read_huffman_tree
	.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
	ldr	x21, [x0]
	mov	x0, x1
	bl	_get_bits1
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, #32
	b.ge	LBB0_4
; %bb.2:
	mov	x0, x20
	mov	w1, #5
	bl	_get_bits
	mov	x20, x0
	ldr	x2, [x21, #8]
	ldr	w5, [x21]
	ldp	w3, w6, [x21, #16]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x4, x20
	bl	_ff_dlog
	mov	w0, #0
	ldr	w8, [x21, #16]
	ldr	x9, [x21, #24]
	ldr	x10, [x21, #8]
	ldr	x9, [x9, x10, lsl #3]
	ldr	x9, [x9, w20, sxtw #3]
	str	w8, [x9]
	ldr	w8, [x21, #20]
	str	w8, [x9, #4]
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	b	LBB0_6
LBB0_3:
	ldr	w8, [x21, #20]
	cmp	w8, #32
	b.lt	LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_5:
	mov	w0, #-1
LBB0_6:
	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
LBB0_7:
	add	w8, w8, #1
	ldr	w9, [x21, #16]
	lsl	w9, w9, #1
	stp	w9, w8, [x21, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_read_huffman_tree
	cbnz	w0, LBB0_5
; %bb.8:
	ldr	w8, [x21, #16]
	orr	w8, w8, #0x1
	str	w8, [x21, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_read_huffman_tree
	cbnz	w0, LBB0_5
; %bb.9:
	ldr	d0, [x21, #16]
	sshr.2s	v1, v0, #1
	movi.2d	v2, #0xffffffffffffffff
	add.2s	v0, v0, v2
	mov.s	v1[1], v0[1]
	str	d1, [x21, #16]
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"huffman tree overflow\n"

l_.str.1:                               ; @.str.1
	.asciz	"hti %d hbits %x token %d entry : %d size %d\n"

	.no_dead_strip	_read_huffman_tree
.subsections_via_symbols
