	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivi_create_huff_from_desc
_ivi_create_huff_from_desc:             ## @ivi_create_huff_from_desc
	.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	$2120, %rsp                     ## imm = 0x848
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -2136(%rbp)               ## 8-byte Spill
	movq	%rsi, -2128(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -2104(%rbp)               ## 8-byte Spill
	movl	(%rdi), %r8d
	testl	%r8d, %r8d
	jle	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-2144(%rbp), %rdx               ## 8-byte Reload
	addl	%ebx, %edx
	incl	%edx
	movq	-2104(%rbp), %rax               ## 8-byte Reload
	movl	(%rax), %r8d
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	%r8d, %rcx
	cmpq	%rcx, %r15
	jge	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	-2104(%rbp), %rcx               ## 8-byte Reload
	movq	8(%rcx), %rcx
	movl	(%rcx,%r15,4), %r14d
	movl	$1, %edi
	movl	%r14d, %ecx
	shll	%cl, %edi
	leal	-1(%r8), %ecx
	xorl	%ebx, %ebx
	cmpq	%rcx, %r15
	setne	%bl
	movl	$-1, %r13d
	movl	%r15d, %ecx
	shll	%cl, %r13d
	notl	%r13d
	leal	(%r14,%rbx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	movl	%edi, -2108(%rbp)               ## 4-byte Spill
	testl	%edi, %edi
	jle	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$255, %edx
	jg	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %rax
	addl	%r15d, %eax
	movq	%rdx, -2144(%rbp)               ## 8-byte Spill
	movslq	%edx, %rcx
	movq	%rax, -2152(%rbp)               ## 8-byte Spill
	addl	%eax, %r14d
	movq	%rcx, -2120(%rbp)               ## 8-byte Spill
	movl	%r14d, -2096(%rbp,%rcx,4)
	movq	_IVI_VLC_BITS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	-2092(%rbp), %rax
	movq	-2120(%rbp), %rcx               ## 8-byte Reload
	leaq	(%rax,%rcx,4), %r12
	leaq	-1072(,%rcx,4), %rax
	addq	%rbp, %rax
	movq	%rax, -2160(%rbp)               ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	orl	%r13d, %edi
	movl	%r14d, %esi
	callq	_inv_bits
	movq	-2160(%rbp), %rcx               ## 8-byte Reload
	movl	%eax, (%rcx,%rbx,4)
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, -4(%r12,%rbx,4)
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	leal	1(%rbx), %eax
	cmpl	-2108(%rbp), %eax               ## 4-byte Folded Reload
	jge	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	-2120(%rbp), %rax               ## 8-byte Reload
	addq	%rbx, %rax
	cmpq	$254, %rax
	jg	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	movq	-2104(%rbp), %rax               ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax,%r15,4), %r14d
	addl	-2152(%rbp), %r14d              ## 4-byte Folded Reload
	movl	%r14d, (%r12,%rbx,4)
	incq	%rbx
	movq	_IVI_VLC_BITS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jle	LBB0_7
LBB0_12:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_18
LBB0_1:
	xorl	%edx, %edx
LBB0_15:
	movq	_IVI_VLC_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-2136(%rbp), %rbx               ## 8-byte Reload
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.16:
	movq	_INIT_VLC_USE_NEW_STATIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_17:
	movq	_INIT_VLC_LE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	leaq	-1072(%rbp), %rax
	leaq	-2096(%rbp), %rcx
	movq	-2128(%rbp), %rdi               ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	$1, %r8d
	movl	$1, %r9d
	pushq	%rbx
	pushq	$2
	pushq	$2
	pushq	%rax
	callq	_init_vlc
	addq	$32, %rsp
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.19:
	addq	$2120, %rsp                     ## imm = 0x848
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IVI_VLC_BITS,4,2               ## @IVI_VLC_BITS
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_INIT_VLC_USE_NEW_STATIC,4,2    ## @INIT_VLC_USE_NEW_STATIC
	.comm	_INIT_VLC_LE,4,2                ## @INIT_VLC_LE
	.no_dead_strip	_ivi_create_huff_from_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivi_create_huff_from_desc
_ivi_create_huff_from_desc:             ; @ivi_create_huff_from_desc
	.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
	sub	sp, sp, #2112
	str	w2, [sp, #20]                   ; 4-byte Folded Spill
	str	x1, [sp, #24]                   ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x22, x0
	mov	x25, #0
	mov	w2, #0
	add	x12, sp, #48
	add	x9, x12, #4
	str	x9, [sp, #32]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	add	w8, w8, w21
	add	w2, w8, #1
	ldr	w8, [x22]
	add	x12, sp, #48
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	cmp	x25, w8, sxtw
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x9, [x22, #8]
	ldr	w10, [x9, x25, lsl #2]
	mov	w9, #1
	lsl	w19, w9, w10
	sub	w9, w8, #1
	cmp	x25, x9
	cset	w11, ne
	cinc	w9, w10, ne
	cmp	w19, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w2, #255
	b.gt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w25, w11
	add	w23, w26, w10
	str	x2, [sp, #40]                   ; 8-byte Folded Spill
	str	w23, [x12, w2, sxtw #2]
Lloh3:
	adrp	x8, _IVI_VLC_BITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IVI_VLC_BITS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w23, w8
	b.gt	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, #0
	mov	w8, #-1
	lsl	w8, w8, w25
	mvn	w8, w8
	lsl	w27, w8, w9
	ldp	x9, x8, [sp, #32]               ; 16-byte Folded Reload
	sxtw	x28, w8
	lsl	x8, x28, #2
	add	x20, x9, x8
	add	x9, sp, #1072
	add	x24, x9, x8
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	orr	w0, w21, w27
	mov	x1, x23
	bl	_inv_bits
	str	w0, [x24, x21, lsl #2]
	cbnz	w23, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	w8, #1
	stur	w8, [x20, #-4]
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=2
	add	w8, w21, #1
	cmp	w8, w19
	b.ge	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	add	x8, x28, x21
	cmp	x8, #254
	b.gt	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [x22, #8]
	ldr	w8, [x8, x25, lsl #2]
Lloh6:
	adrp	x9, _IVI_VLC_BITS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IVI_VLC_BITS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w23, w26, w8
	cmp	w23, w9
	str	w23, [x20], #4
	add	x21, x21, #1
	b.le	LBB0_8
LBB0_13:
Lloh9:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_14:
	mov	w2, #0
LBB0_15:
Lloh12:
	adrp	x8, _IVI_VLC_BITS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IVI_VLC_BITS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _INIT_VLC_USE_NEW_STATIC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INIT_VLC_USE_NEW_STATIC@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w9, #0
	csel	w8, wzr, w8, eq
Lloh18:
	adrp	x9, _INIT_VLC_LE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _INIT_VLC_LE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mov	w9, #2
	stp	w9, w8, [sp]
	add	x3, sp, #48
	add	x6, sp, #1072
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	mov	w4, #1
	mov	w5, #1
	mov	w7, #2
	bl	_init_vlc
LBB0_16:
	ldur	x8, [x29, #-96]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	add	sp, sp, #2112
	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_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IVI_VLC_BITS,4,2               ; @IVI_VLC_BITS
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_INIT_VLC_USE_NEW_STATIC,4,2    ; @INIT_VLC_USE_NEW_STATIC
	.comm	_INIT_VLC_LE,4,2                ; @INIT_VLC_LE
	.no_dead_strip	_ivi_create_huff_from_desc
.subsections_via_symbols
