	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huffman_import_tree_rle        ## -- Begin function huffman_import_tree_rle
	.p2align	4, 0x90
_huffman_import_tree_rle:               ## @huffman_import_tree_rle
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rdi), %ecx
	movl	4(%rdi), %eax
	xorl	%edx, %edx
	cmpl	$8, %ecx
	setge	%dl
	addl	$3, %edx
	cmpl	$16, %ecx
	movl	$5, %r12d
	cmovll	%edx, %r12d
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jg	LBB0_1
LBB0_19:
	cmpl	%eax, %ebx
	jne	LBB0_20
## %bb.21:
	movq	%r15, %rdi
	callq	_huffman_assign_canonical_codes
	movq	_HUFFERR_NONE@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jne	LBB0_25
## %bb.22:
	movq	%r15, %rdi
	callq	_huffman_build_lookup_table
	movq	%r14, %rdi
	callq	_bitstream_overflow
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	_HUFFERR_INPUT_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rbx
LBB0_24:
	movl	(%rbx), %eax
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rcx
	movslq	%ebx, %rdx
	incl	%ebx
	movl	%eax, (%rcx,%rdx,4)
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%r15), %eax
	cmpl	%eax, %ebx
	jge	LBB0_19
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
                                        ##     Child Loop BB0_17 Depth 2
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_bitstream_read
	cmpl	$1, %eax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_bitstream_read
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %rax
	movslq	%ebx, %rcx
	incl	%ebx
	movl	$1, (%rax,%rcx,4)
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, %r13d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_bitstream_read
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	addl	$3, %ecx
	je	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r15), %r10
	movslq	%ebx, %rbx
	addl	$2, %eax
	cmpl	$7, %eax
	jb	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	%rax
	movq	%rax, %r8
	andq	$-8, %r8
	movd	%r13d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%r8), %rdx
	movq	%rdx, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r9d
	andl	$3, %r9d
	cmpq	$24, %rdx
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	andq	$-4, %rdi
	leaq	(%r10,%rbx,4), %rdx
	addq	$112, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -112(%rdx,%rsi,4)
	movdqu	%xmm0, -96(%rdx,%rsi,4)
	movdqu	%xmm0, -80(%rdx,%rsi,4)
	movdqu	%xmm0, -64(%rdx,%rsi,4)
	movdqu	%xmm0, -48(%rdx,%rsi,4)
	movdqu	%xmm0, -32(%rdx,%rsi,4)
	movdqu	%xmm0, -16(%rdx,%rsi,4)
	movdqu	%xmm0, (%rdx,%rsi,4)
	addq	$32, %rsi
	addq	$-4, %rdi
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	testq	%r9, %r9
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	addq	%rbx, %rsi
	leaq	(%r10,%rsi,4), %rdx
	addq	$16, %rdx
	shlq	$5, %r9
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -16(%rdx,%rsi)
	movdqu	%xmm0, (%rdx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	addq	%r8, %rbx
	cmpq	%r8, %rax
	je	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	subl	%r8d, %ecx
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rax
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	1(%rax), %rbx
	movl	%r13d, (%r10,%rax,4)
	movq	%rbx, %rax
	decl	%ecx
	jne	LBB0_17
	jmp	LBB0_18
LBB0_20:
	movq	_HUFFERR_INVALID_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HUFFERR_INVALID_DATA,4,2       ## @HUFFERR_INVALID_DATA
	.comm	_HUFFERR_NONE,4,2               ## @HUFFERR_NONE
	.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_rle        ; -- Begin function huffman_import_tree_rle
	.p2align	2
_huffman_import_tree_rle:               ; @huffman_import_tree_rle
	.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	x19, x1
	mov	x20, x0
	ldp	w9, w8, [x0]
	cmp	w9, #7
	mov	w10, #3
	cinc	w10, w10, gt
	mov	w11, #5
	cmp	w9, #15
	csel	w21, w11, w10, gt
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.1:
	mov	w24, #0
	mov	w23, #1
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	str	w0, [x8, w24, sxtw #2]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w24, #1
	mov	x24, x8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #4]
	cmp	w24, w8
	b.ge	LBB0_18
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_15 Depth 2
	mov	x0, x19
	mov	x1, x21
	bl	_bitstream_read
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_bitstream_read
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	str	w23, [x8, w24, sxtw #2]
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_bitstream_read
	adds	w8, w0, #3
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20, #8]
	sxtw	x12, w24
	add	w10, w0, #2
	cmp	w10, #15
	b.hs	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x12
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x10, x10, #1
	and	x11, x10, #0x1fffffff0
	add	x24, x11, x12
	sub	w8, w8, w11
	dup.4s	v0, w22
	add	x12, x9, x12, lsl #2
	add	x12, x12, #32
	mov	x13, x11
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	q0, q0, [x12, #-32]
	stp	q0, q0, [x12], #64
	subs	x13, x13, #16
	b.ne	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	x10, x11
	b.eq	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, x24
LBB0_15:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x24, x10, #1
	str	w22, [x9, x10, lsl #2]
	mov	x10, x24
	subs	w8, w8, #1
	b.ne	LBB0_15
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_4
LBB0_17:
	mov	w24, #0
LBB0_18:
	cmp	w24, w8
	b.ne	LBB0_21
; %bb.19:
	mov	x0, x20
	bl	_huffman_assign_canonical_codes
Lloh0:
	adrp	x21, _HUFFERR_NONE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HUFFERR_NONE@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_23
; %bb.20:
	mov	x0, x20
	bl	_huffman_build_lookup_table
	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, x21, x8, eq
	b	LBB0_22
LBB0_21:
Lloh4:
	adrp	x8, _HUFFERR_INVALID_DATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HUFFERR_INVALID_DATA@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
LBB0_23:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HUFFERR_INVALID_DATA,4,2       ; @HUFFERR_INVALID_DATA
	.comm	_HUFFERR_NONE,4,2               ; @HUFFERR_NONE
	.comm	_HUFFERR_INPUT_BUFFER_TOO_SMALL,4,2 ; @HUFFERR_INPUT_BUFFER_TOO_SMALL
.subsections_via_symbols
