	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huffman_import_tree_huffman    ## -- Begin function huffman_import_tree_huffman
	.p2align	4, 0x90
_huffman_import_tree_huffman:           ## @huffman_import_tree_huffman
	.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	%rsi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$24, %edi
	movl	$6, %esi
	callq	_create_huffman_decoder
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_bitstream_read
	movq	8(%r15), %rcx
	movl	%eax, (%rcx)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_bitstream_read
	incl	%eax
	movslq	%eax, %r13
	xorl	%r14d, %r14d
	movl	$1, %ebx
	xorl	%eax, %eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ecx, %ecx
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rdx
	movl	%ecx, (%rdx,%rbx,4)
	incq	%rbx
	cmpq	$24, %rbx
	je	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, %rbx
	jl	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, %ecx
	cmpl	$7, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$3, %esi
	callq	_bitstream_read
	cmpl	$7, %eax
	movl	%eax, %ecx
	cmovel	%r14d, %ecx
	jmp	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	callq	_huffman_assign_canonical_codes
	movl	%eax, %ebx
	movq	_HUFFERR_NONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_30
## %bb.7:
	movq	%r15, %rdi
	callq	_huffman_build_lookup_table
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %eax
	xorl	%r13d, %r13d
	movl	%eax, %ecx
	movl	$0, %ebx
	addl	$-9, %ecx
	je	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	movl	%ecx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%edx
	incl	%ebx
	cmpl	$2, %ecx
	movl	%edx, %ecx
	jae	LBB0_9
## %bb.10:
	testl	%eax, %eax
	jle	LBB0_11
LBB0_12:
	xorl	%r14d, %r14d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_22:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rdi), %eax
	cmpl	%eax, %r14d
	jge	LBB0_23
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	movq	%r15, %r12
	movq	%r15, %rdi
	movq	%rsi, %r15
	callq	_huffman_decode_one
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	decl	%eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rcx
	movslq	%r14d, %rdx
	incl	%r14d
	movl	%eax, (%rcx,%rdx,4)
	movl	%eax, %r13d
	movq	%r15, %rsi
	movq	%r12, %r15
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_bitstream_read
	addl	$2, %eax
	cmpl	$9, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_bitstream_read
	addl	$9, %eax
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	testl	%eax, %eax
	movq	%r12, %r15
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rdi), %ecx
	cmpl	%ecx, %r14d
	cmovgl	%r14d, %ecx
	movslq	%r14d, %r14
	movslq	%ecx, %rcx
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r14, %rcx
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	movq	8(%rdi), %rdx
	movl	%r13d, (%rdx,%r14,4)
	incq	%r14
	decl	%eax
	jne	LBB0_19
	jmp	LBB0_21
LBB0_11:
	xorl	%r14d, %r14d
LBB0_23:
	cmpl	%eax, %r14d
	jne	LBB0_24
## %bb.25:
	movq	%rdi, %r14
	callq	_huffman_assign_canonical_codes
	movq	_HUFFERR_NONE@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jne	LBB0_26
## %bb.27:
	movq	%r14, %rdi
	callq	_huffman_build_lookup_table
	movq	%r15, %rdi
	callq	_delete_huffman_decoder
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_bitstream_overflow
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movq	_HUFFERR_INPUT_BUFFER_TOO_SMALL@GOTPCREL(%rip), %r12
LBB0_29:
	movl	(%r12), %ebx
	jmp	LBB0_30
LBB0_24:
	movq	%r15, %rdi
	callq	_delete_huffman_decoder
	movq	_HUFFERR_INVALID_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_30
LBB0_26:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_delete_huffman_decoder
LBB0_30:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HUFFERR_NONE,4,2               ## @HUFFERR_NONE
	.comm	_HUFFERR_INVALID_DATA,4,2       ## @HUFFERR_INVALID_DATA
	.comm	_HUFFERR_INPUT_BUFFER_TOO_SMALL,4,2 ## @HUFFERR_INPUT_BUFFER_TOO_SMALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huffman_import_tree_huffman    ; -- Begin function huffman_import_tree_huffman
	.p2align	2
_huffman_import_tree_huffman:           ; @huffman_import_tree_huffman
	.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
	mov	x19, x1
	mov	x21, x0
	mov	w0, #24
	mov	w1, #6
	bl	_create_huffman_decoder
	mov	x20, x0
	mov	x0, x19
	mov	w1, #3
	bl	_bitstream_read
	ldr	x8, [x20, #8]
	str	w0, [x8]
	mov	x0, x19
	mov	w1, #3
	bl	_bitstream_read
	mov	x8, x0
	mov	w0, #0
	add	w8, w8, #1
	sxtw	x22, w8
	mov	w23, #1
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x20, #8]
	str	w8, [x9, x23, lsl #2]
	add	x23, x23, #1
	cmp	x23, #24
	b.eq	LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w8, #0
	cmp	x23, x22
	b.lt	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #7
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	w1, #3
	bl	_bitstream_read
	cmp	w0, #7
	csel	w8, wzr, w0, eq
	b	LBB0_1
LBB0_5:
	mov	x0, x20
	bl	_huffman_assign_canonical_codes
	mov	x22, x0
Lloh0:
	adrp	x23, _HUFFERR_NONE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _HUFFERR_NONE@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_31
; %bb.6:
	mov	x0, x20
	bl	_huffman_build_lookup_table
	ldr	w8, [x21]
	mov	w22, #0
	subs	w9, w8, #9
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	asr	w10, w9, #1
	add	w22, w22, #1
	cmp	w9, #2
	mov	x9, x10
	b.hs	LBB0_7
; %bb.8:
	cmp	w8, #1
	b.lt	LBB0_24
LBB0_9:
	mov	w24, #0
	mov	w26, #0
	mov	w25, #4
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	sub	w24, w0, #1
	ldr	x8, [x21, #8]
	str	w24, [x8, w26, sxtw #2]
	add	w8, w26, #1
	mov	x26, x8
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w8, [x21]
	cmp	w26, w8
	b.ge	LBB0_25
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
                                        ;     Child Loop BB0_20 Depth 2
	mov	x0, x20
	mov	x1, x19
	bl	_huffman_decode_one
	cbnz	w0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	w1, #3
	bl	_bitstream_read
	add	w8, w0, #2
	cmp	w8, #9
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_bitstream_read
	add	w8, w0, #9
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	cbz	w8, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x21]
	sxtw	x11, w26
	cmp	w26, w9
	csel	w9, w26, w9, gt
	sxtw	x9, w9
	sub	w10, w8, #1
	sub	x12, x9, x11
	cmp	x12, x10
	csel	x10, x12, x10, lo
	cmp	x10, #4
	b.hs	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x10, x11
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x10, x10, #1
	ands	x12, x10, #0x3
	csel	x12, x25, x12, eq
	sub	x12, x10, x12
	add	x10, x12, x11
	sub	w8, w8, w12
	dup.4s	v0, w24
	ldr	x13, [x21, #8]
	add	x11, x13, x11, lsl #2
LBB0_19:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	q0, [x11], #16
	subs	x12, x12, #4
	b.ne	LBB0_19
LBB0_20:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x9, x10
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	x11, [x21, #8]
	add	x26, x10, #1
	str	w24, [x11, x10, lsl #2]
	mov	x10, x26
	subs	w8, w8, #1
	b.ne	LBB0_20
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x26, x10
LBB0_23:                                ;   in Loop: Header=BB0_12 Depth=1
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	b	LBB0_11
LBB0_24:
	mov	w26, #0
LBB0_25:
	cmp	w26, w8
	b.ne	LBB0_28
; %bb.26:
	mov	x0, x21
	bl	_huffman_assign_canonical_codes
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_30
; %bb.27:
	mov	x0, x21
	bl	_huffman_build_lookup_table
	mov	x0, x20
	bl	_delete_huffman_decoder
	mov	x0, x19
	bl	_bitstream_overflow
Lloh2:
	adrp	x8, _HUFFERR_INPUT_BUFFER_TOO_SMALL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HUFFERR_INPUT_BUFFER_TOO_SMALL@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x23, x8, eq
	b	LBB0_29
LBB0_28:
	mov	x0, x20
	bl	_delete_huffman_decoder
Lloh4:
	adrp	x8, _HUFFERR_INVALID_DATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HUFFERR_INVALID_DATA@GOTPAGEOFF]
LBB0_29:
	ldr	w22, [x8]
	b	LBB0_31
LBB0_30:
	mov	x22, x0
	mov	x0, x20
	bl	_delete_huffman_decoder
LBB0_31:
	mov	x0, x22
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HUFFERR_NONE,4,2               ; @HUFFERR_NONE
	.comm	_HUFFERR_INVALID_DATA,4,2       ; @HUFFERR_INVALID_DATA
	.comm	_HUFFERR_INPUT_BUFFER_TOO_SMALL,4,2 ; @HUFFERR_INPUT_BUFFER_TOO_SMALL
.subsections_via_symbols
