	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_huffman2
_decode_huffman2:                       ## @decode_huffman2
	.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	$1080, %rsp                     ## imm = 0x438
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	16(%rdi), %r13
	leaq	32(%r13), %r12
	leaq	28(%r13), %rdi
	movl	28(%r13), %ebx
	callq	_bytestream2_get_bytes_left
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_init_get_bits8
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_get_bits_long
	movq	%rax, (%r13)
	movq	(%r14), %rcx
	imulq	8(%r14), %rcx
	leaq	(%rcx,%rcx,8), %rcx
	addq	$10000, %rcx                    ## imm = 0x2710
	cmpq	%rcx, %rax
	jle	LBB0_6
LBB0_2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_4
LBB0_6:
	leaq	8(%r13), %rbx
	leaq	24(%r13), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_av_fast_padded_malloc
	cmpq	$0, 8(%r13)
	je	LBB0_13
## %bb.7:
	movq	%rbx, -1112(%rbp)               ## 8-byte Spill
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_get_bits
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_get_bits
	movl	%eax, %r14d
	addl	$4, %r14d
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.8:
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -1088(%rbp)
	movaps	%xmm0, -1104(%rbp)
	movq	%r12, %rdi
	movl	$3, %esi
	callq	_get_bits
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movl	%eax, %r15d
	incl	%r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_get_bits
	movl	%eax, -1104(%rbp,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_10
LBB0_11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$3, %esi
	callq	_get_bits
	cltq
	movl	-1104(%rbp,%rax,4), %eax
	movl	%eax, -1072(%rbp,%rbx,4)
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_12
	jmp	LBB0_17
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.14:
	addq	$1080, %rsp                     ## imm = 0x438
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_15:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_get_bits
	movl	%eax, -1072(%rbp,%rbx,4)
	incq	%rbx
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_16
LBB0_17:
	leaq	16(%r13), %rsi
	leaq	-1072(%rbp), %rdi
	callq	_build_huff
	testl	%eax, %eax
	js	LBB0_3
## %bb.18:
	movq	%r12, %rdi
	callq	_get_bits_left
	xorl	%r15d, %r15d
	testq	%rax, %rax
	jle	LBB0_4
## %bb.19:
	xorl	%ebx, %ebx
	movq	-1112(%rbp), %r14               ## 8-byte Reload
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%r13)
	jle	LBB0_4
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movl	16(%r13), %edx
	movl	20(%r13), %esi
	movq	%r12, %rdi
	movl	$3, %ecx
	callq	_get_vlc2
	testl	%eax, %eax
	js	LBB0_2
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movq	%r12, %rdi
	callq	_get_bits_left
	testq	%rax, %rax
	jg	LBB0_20
	jmp	LBB0_4
LBB0_3:
	movl	%eax, %r15d
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.5:
	movl	%r15d, %eax
	addq	$1080, %rsp                     ## imm = 0x438
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_decode_huffman2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_huffman2
_decode_huffman2:                       ; @decode_huffman2
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #1072
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x23, [x0, #16]
	add	x19, x23, #32
	mov	x0, x23
	ldr	w21, [x0, #28]!
	bl	_bytestream2_get_bytes_left
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_init_get_bits8
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #32
	bl	_get_bits_long
	str	x0, [x23]
	ldp	x8, x9, [x20]
	mul	x8, x8, x9
	add	x8, x8, x8, lsl #3
	mov	w9, #10000
	add	x8, x8, x9
	cmp	x0, x8
	b.le	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_3:
	ldur	x8, [x29, #-72]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.4:
	add	sp, sp, #1072
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x2, x0
	add	x20, x23, #8
	add	x1, x23, #24
	mov	x0, x20
	bl	_av_fast_padded_malloc
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_12
; %bb.6:
	mov	x0, x19
	mov	w1, #1
	bl	_get_bits
	mov	x22, x0
	mov	x0, x19
	mov	w1, #1
	bl	_get_bits
	add	w21, w0, #4
	cbz	w22, LBB0_14
; %bb.7:
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	mov	x0, x19
	mov	w1, #3
	bl	_get_bits
	tbnz	w0, #31, LBB0_10
; %bb.8:
	add	w22, w0, #1
	mov	x24, sp
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_get_bits
	str	w0, [x24], #4
	subs	x22, x22, #1
	b.ne	LBB0_9
LBB0_10:
	mov	x21, #0
	mov	x22, sp
	add	x24, sp, #40
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #3
	bl	_get_bits
	ldr	w8, [x22, w0, sxtw #2]
	str	w8, [x24, x21]
	add	x21, x21, #4
	cmp	x21, #1024
	b.ne	LBB0_11
	b	LBB0_16
LBB0_12:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldur	x8, [x29, #-72]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.13:
	add	sp, sp, #1072
	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	x28, x27, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_14:
	mov	x22, #0
	add	x24, sp, #40
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_get_bits
	str	w0, [x24, x22]
	add	x22, x22, #4
	cmp	x22, #1024
	b.ne	LBB0_15
LBB0_16:
	add	x1, x23, #16
	add	x0, sp, #40
	bl	_build_huff
	tbnz	w0, #31, LBB0_3
; %bb.17:
	mov	x0, x19
	bl	_get_bits_left
	cmp	x0, #1
	b.lt	LBB0_22
; %bb.18:
	mov	x21, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	cmp	x8, x21
	b.le	LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldp	w2, w1, [x23, #16]
	mov	x0, x19
	mov	w3, #3
	bl	_get_vlc2
	tbnz	w0, #31, LBB0_2
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x20]
	add	x22, x21, #1
	str	w0, [x8, x21, lsl #2]
	mov	x0, x19
	bl	_get_bits_left
	mov	x8, x0
	mov	w0, #0
	mov	x21, x22
	cmp	x8, #0
	b.gt	LBB0_19
	b	LBB0_3
LBB0_22:
	mov	w0, #0
	b	LBB0_3
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_decode_huffman2
.subsections_via_symbols
