	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function huf_decode
_huf_decode:                            ## @huf_decode
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movl	%r8d, %r13d
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rdx, %rbx
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rdx
	movslq	%r9d, %rax
	leaq	(%rdx,%rax,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leal	7(%rcx), %edx
	leal	14(%rcx), %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	testl	%ecx, %ecx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.7:
	sarl	$3, %eax
	cltq
	shlq	$2, %rax
	addq	(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_HUF_DECBITS@GOTPCREL(%rip), %r15
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##       Child Loop BB0_17 Depth 3
                                        ##         Child Loop BB0_22 Depth 4
	xorl	%edi, %edi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_get_char
	cmpl	(%r15), %r14d
	jge	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, (%rbx)
	jb	LBB0_9
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_17 Depth 3
                                        ##         Child Loop BB0_22 Depth 4
	movl	(%rsi), %eax
	movl	4(%rsi), %edi
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	subl	%eax, %r14d
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movq	%rbx, %r8
	movq	16(%rbp), %r9
	pushq	%r9
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_get_code
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addq	$16, %rsp
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	8(%rsi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_24
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=2
	xorl	%r15d, %r15d
	testl	%edi, %edi
	jg	LBB0_17
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_17 Depth=3
	cmpl	$63, %eax
	jbe	LBB0_19
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=3
	incq	%r15
	movq	%r13, %rdi
	cmpq	%r13, %r15
	je	LBB0_24
LBB0_17:                                ##   Parent Loop BB0_9 Depth=1
                                        ##     Parent Loop BB0_12 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_22 Depth 4
	movq	%rdi, %r13
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	(%rax,%r15,8), %rdi
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rdi,4), %eax
	movl	%eax, %ecx
	andl	$63, %ecx
	movl	%r14d, %r12d
	subl	%ecx, %r12d
	jge	LBB0_18
	.p2align	4, 0x90
LBB0_22:                                ##   Parent Loop BB0_9 Depth=1
                                        ##     Parent Loop BB0_12 Depth=2
                                        ##       Parent Loop BB0_17 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	testq	%rax, %rax
	jle	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_22 Depth=4
	xorl	%edi, %edi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_get_char
	jmp	LBB0_22
LBB0_19:                                ##   in Loop: Header=BB0_12 Depth=2
                                        ## kill: def $edi killed $edi killed $rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%edx, %edx
	movl	%r12d, %ecx
	movq	%rbx, %r8
	movq	16(%rbp), %r9
	pushq	%r9
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_get_code
	addq	$16, %rsp
	movl	%r12d, %r14d
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdi
LBB0_20:                                ##   in Loop: Header=BB0_12 Depth=2
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	cmpl	%edi, %r15d
	movq	_HUF_DECBITS@GOTPCREL(%rip), %r15
	je	LBB0_24
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=2
	cmpl	(%r15), %r14d
	jge	LBB0_12
	jmp	LBB0_8
LBB0_1:
	xorl	%r14d, %r14d
LBB0_2:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	negl	%eax
	andl	$7, %eax
	subl	%eax, %r14d
	jle	LBB0_6
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %r15d
	testl	%r15d, %r15d
	je	LBB0_24
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r15d, %r14d
	jl	LBB0_24
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rsi), %edi
	movl	%r14d, %ecx
	subl	%r15d, %ecx
	movl	%r13d, %esi
	xorl	%edx, %edx
	movq	%rbx, %r8
	movq	16(%rbp), %r9
	pushq	%r9
	pushq	-64(%rbp)                       ## 8-byte Folded Reload
	callq	_get_code
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addq	$16, %rsp
	subl	%r15d, %r14d
	jg	LBB0_3
LBB0_6:
	testl	%r12d, %r12d
	je	LBB0_25
LBB0_24:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_25:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HUF_DECBITS,4,2                ## @HUF_DECBITS
	.comm	_HUF_DECMASK,4,2                ## @HUF_DECMASK
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_huf_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function huf_decode
_huf_decode:                            ; @huf_decode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x6
	mov	x19, x5
	mov	x21, x4
	mov	x22, x2
	mov	x23, x1
	add	x24, x6, w5, sxtw #2
	add	w8, w3, #7
	add	w9, w3, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	cmp	w3, #1
	str	w3, [sp, #20]                   ; 4-byte Folded Spill
	b.lt	LBB0_19
; %bb.1:
	mov	x26, x0
	mov	w27, #0
	ldr	x9, [x22]
	asr	w8, w8, #3
	add	x8, x9, w8, sxtw #2
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x25, _HUF_DECBITS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _HUF_DECBITS@GOTPAGEOFF]
	str	w19, [sp, #4]                   ; 4-byte Folded Spill
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x8, x9
	b.hs	LBB0_20
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;         Child Loop BB0_14 Depth 4
	mov	w0, #0
	mov	x1, x27
	mov	x2, x22
	bl	_get_char
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;         Child Loop BB0_14 Depth 4
	ldr	w8, [x25]
	cmp	w27, w8
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	ldp	w8, w28, [x23]
	cbz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=2
	sub	w27, w27, w8
	mov	x0, x28
	mov	x1, x21
	mov	w2, #0
	mov	x3, x27
	mov	x4, x22
	mov	x5, x20
	mov	x6, x24
	mov	x7, x20
	bl	_get_code
	b	LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=2
	mov	x24, x21
	ldr	x21, [x23, #8]
	cbz	x21, LBB0_18
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=2
	cmp	w28, #1
	b.lt	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	x25, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=3
	cmp	w8, #63
	b.ls	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=3
	add	x25, x25, #1
	cmp	x25, x28
	b.eq	LBB0_18
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_14 Depth 4
	ldr	x0, [x21, x25, lsl #3]
	ldr	w8, [x26, x0, lsl #2]
	and	w9, w8, #0x3f
	subs	w19, w27, w9
	b.ge	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=3
	mov	x0, x22
	bl	_bytestream2_get_bytes_left
	cmp	x0, #1
	b.lt	LBB0_11
LBB0_14:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_4 Depth=2
                                        ;       Parent Loop BB0_12 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	mov	w0, #0
	mov	x1, x27
	mov	x2, x22
	bl	_get_char
	mov	x0, x22
	bl	_bytestream2_get_bytes_left
	cmp	x0, #0
	b.gt	LBB0_14
	b	LBB0_11
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=2
	mov	w25, #0
	mov	x21, x24
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=2
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x21, x24
	mov	x1, x24
	mov	w2, #0
	mov	x3, x19
	mov	x4, x22
	mov	x5, x20
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
	mov	x6, x24
	mov	x7, x20
	bl	_get_code
	mov	x27, x19
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=2
	cmp	w25, w28
Lloh2:
	adrp	x25, _HUF_DECBITS@GOTPAGE
Lloh3:
	ldr	x25, [x25, _HUF_DECBITS@GOTPAGEOFF]
	b.ne	LBB0_4
LBB0_18:
Lloh4:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	b	LBB0_24
LBB0_19:
	mov	w27, #0
LBB0_20:
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	neg	w8, w8
	and	w8, w8, #0x7
	sub	w25, w27, w8
	cmp	w25, #1
	b.lt	LBB0_23
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmp	w8, #0
	ccmp	w25, w8, #8, ne
	b.lt	LBB0_18
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	w0, [x23, #4]
	sub	w25, w25, w8
	mov	x1, x21
	mov	w2, #0
	mov	x3, x25
	mov	x4, x22
	mov	x5, x20
	mov	x6, x24
	mov	x7, x20
	bl	_get_code
	cmp	w25, #0
	b.gt	LBB0_21
LBB0_23:
Lloh7:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w19, #0
	csel	w0, wzr, w8, eq
LBB0_24:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_HUF_DECBITS,4,2                ; @HUF_DECBITS
	.comm	_HUF_DECMASK,4,2                ; @HUF_DECMASK
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_huf_decode
.subsections_via_symbols
