	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function huf_uncompress
_huf_uncompress:                        ## @huf_uncompress
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_bytestream2_get_le32
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_bytestream2_get_le32
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_bytestream2_get_le32
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_bytestream2_skip
	movq	%rbx, %rdi
	callq	_bytestream2_get_le32
	testq	%r15, %r15
	jns	LBB0_1
LBB0_5:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_21:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_HUF_ENCSIZE@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	cmpq	%r15, %rcx
	jle	LBB0_5
## %bb.2:
	testq	%r14, %r14
	js	LBB0_5
## %bb.3:
	cmpq	%r14, %rcx
	jle	LBB0_5
## %bb.4:
	testq	%r12, %r12
	js	LBB0_5
## %bb.6:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_bytestream2_skip
	movl	(%r13), %edi
	movl	$4, %esi
	callq	_av_mallocz_array
	movq	%rax, %r13
	movq	_HUF_DECSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_av_mallocz_array
	movq	%rax, %r12
	testq	%r13, %r13
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_8
## %bb.7:
	testq	%r12, %r12
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_huf_unpack_enc_table
	testl	%eax, %eax
	js	LBB0_14
## %bb.10:
	movq	%rbx, %rdi
	callq	_bytestream2_get_bytes_left
	shll	$3, %eax
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_12
## %bb.11:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_15
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_14:
	movl	%eax, %r13d
LBB0_15:
	movq	_HUF_DECSIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_20
## %bb.16:
	xorl	%ebx, %ebx
	movq	%r12, %r14
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addq	$4, %r14
	cmpq	%rcx, %rbx
	jge	LBB0_20
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	testq	%r12, %r12
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r14, %rdi
	callq	_av_freep
	movl	(%r15), %eax
	jmp	LBB0_19
LBB0_20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_free
	movq	%r12, %rdi
	callq	_av_free
	jmp	LBB0_21
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_huf_build_dec_table
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	movq	%r14, %r8
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	callq	_huf_decode
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_HUF_ENCSIZE,8,3                ## @HUF_ENCSIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_HUF_DECSIZE,4,2                ## @HUF_DECSIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_huf_uncompress
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function huf_uncompress
_huf_uncompress:                        ; @huf_uncompress
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x21, x1
	mov	x23, x0
	bl	_bytestream2_get_le32
	mov	x19, x0
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x25, x0
	mov	x0, x23
	bl	_bytestream2_get_le32
	mov	x24, x0
	mov	x0, x23
	mov	w1, #4
	bl	_bytestream2_skip
	mov	x0, x23
	bl	_bytestream2_get_le32
	tbz	x25, #63, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w27, [x8]
LBB0_2:
	mov	x0, x27
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh3:
	adrp	x20, _HUF_ENCSIZE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _HUF_ENCSIZE@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, x25
	b.le	LBB0_1
; %bb.4:
	tbnz	x24, #63, LBB0_1
; %bb.5:
	cmp	x8, x24
	b.le	LBB0_1
; %bb.6:
	tbnz	x19, #63, LBB0_1
; %bb.7:
	mov	x26, x0
	mov	x0, x23
	mov	w1, #4
	bl	_bytestream2_skip
	ldr	w0, [x20]
	mov	w1, #4
	bl	_av_mallocz_array
	mov	x19, x0
Lloh5:
	adrp	x28, _HUF_DECSIZE@GOTPAGE
Lloh6:
	ldr	x28, [x28, _HUF_DECSIZE@GOTPAGEOFF]
	ldr	w0, [x28]
	mov	w1, #4
	bl	_av_mallocz_array
	mov	x20, x0
	cbz	x19, LBB0_12
; %bb.8:
	cbz	x20, LBB0_12
; %bb.9:
	mov	x0, x23
	mov	x1, x25
	mov	x2, x24
	mov	x3, x19
	bl	_huf_unpack_enc_table
	tbnz	w0, #31, LBB0_13
; %bb.10:
	mov	x0, x23
	bl	_bytestream2_get_bytes_left
	cmp	w26, w0, lsl #3
	b.le	LBB0_20
; %bb.11:
Lloh7:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh9:
	ldr	w27, [x8]
	b	LBB0_14
LBB0_12:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_13:
	mov	x27, x0
LBB0_14:
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.15:
	mov	x22, #0
	mov	x21, x20
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x22, x22, #1
	add	x21, x21, #4
	cmp	x22, w8, sxtw
	b.ge	LBB0_19
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	cbz	x20, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x21
	bl	_av_freep
	ldr	w8, [x28]
	b	LBB0_16
LBB0_19:
	mov	x0, x19
	bl	_av_free
	mov	x0, x20
	bl	_av_free
	b	LBB0_2
LBB0_20:
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	mov	x3, x20
	bl	_huf_build_dec_table
	tbnz	w0, #31, LBB0_13
; %bb.21:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x26
	mov	x4, x24
	mov	x5, x22
	mov	x6, x21
	bl	_huf_decode
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HUF_ENCSIZE,8,3                ; @HUF_ENCSIZE
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_HUF_DECSIZE,4,2                ; @HUF_DECSIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_huf_uncompress
.subsections_via_symbols
