	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function huf_build_dec_table
_huf_build_dec_table:                   ## @huf_build_dec_table
	.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
	xorl	%eax, %eax
	cmpl	%edx, %esi
	jg	LBB0_16
## %bb.1:
	movq	%rcx, %r8
	movq	%rdi, %r15
	movslq	%esi, %r13
	incl	%edx
	movq	_HUF_DECBITS@GOTPCREL(%rip), %r12
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	cmpl	%r13d, %edx
	je	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movl	(%r15,%r13,4), %eax
	movl	%eax, %esi
	sarl	$6, %esi
	andl	$63, %eax
	movl	%esi, %ebx
	movl	%eax, %ecx
	sarl	%cl, %ebx
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %ecx
	movl	%eax, %ebx
	subl	%ecx, %ebx
	jle	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %ecx
	sarl	%cl, %esi
	movslq	%esi, %r14
	shlq	$4, %r14
	cmpl	$0, (%r8,%r14)
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ebx
	movl	4(%r8,%r14), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 4(%r8,%r14)
	movq	8(%r8,%r14), %rdi
	leal	4(,%rax,4), %esi
	callq	_av_realloc
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rax, 8(%r8,%r14)
	testq	%rax, %rax
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r8,%r14), %rcx
	addq	$4, %rcx
	movslq	(%rcx), %rcx
	movl	%r13d, -4(%rax,%rcx,4)
	movl	%ebx, %edx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	subl	%eax, %ecx
	cmpl	$31, %ecx
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %ebx
	shll	%cl, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movslq	%esi, %rcx
	shlq	$4, %rcx
	addq	%r8, %rcx
	incl	%ebx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$0, (%rcx)
	jne	LBB0_3
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	cmpq	$0, 8(%rcx)
	jne	LBB0_3
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	%eax, (%rcx)
	movl	%r13d, 4(%rcx)
	decl	%ebx
	addq	$16, %rcx
	cmpl	$1, %ebx
	jg	LBB0_11
	jmp	LBB0_14
LBB0_3:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_HUF_DECBITS,4,2                ## @HUF_DECBITS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_huf_build_dec_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function huf_build_dec_table
_huf_build_dec_table:                   ; @huf_build_dec_table
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
                                        ; kill: def $w1 killed $w1 def $x1
	cmp	w1, w2
	b.le	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_16
LBB0_2:
	mov	x19, x3
	mov	x20, x0
	sxtw	x21, w1
	add	w22, w2, #1
Lloh0:
	adrp	x23, _HUF_DECBITS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _HUF_DECBITS@GOTPAGEOFF]
	mov	w24, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	cmp	w22, w21
	b.eq	LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	w8, [x20, x21, lsl #2]
	asr	w9, w8, #6
	asr	w10, w9, w8
	cbnz	w10, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	and	x8, x8, #0x3f
	ldr	w10, [x23]
	subs	w11, w8, w10
	b.le	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	asr	w8, w9, w11
	sbfiz	x9, x8, #4, #32
	ldr	w9, [x19, x9]
	cbnz	w9, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x8, w8
	add	x25, x19, x8, lsl #4
	ldr	w8, [x25, #4]!
	add	w8, w8, #1
	str	w8, [x25]
	ldur	x0, [x25, #4]
	lsl	w1, w8, #2
	bl	_av_realloc
	stur	x0, [x25, #4]
	cbz	x0, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x8, [x25]
	add	x8, x0, x8, lsl #2
	stur	w21, [x8, #-4]
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w8, LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	sub	w10, w10, w8
	cmp	w10, #31
	b.eq	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	lsl	w11, w24, w10
	lsl	w9, w9, w10
	add	x9, x19, w9, sxtw #4
	add	w10, w11, #1
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x9]
	cbnz	w11, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x11, [x9, #8]
	cbnz	x11, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	stp	w8, w21, [x9], #16
	sub	w10, w10, #1
	cmp	w10, #1
	b.gt	LBB0_12
	b	LBB0_3
LBB0_15:
Lloh2:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
LBB0_16:
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_HUF_DECBITS,4,2                ; @HUF_DECBITS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_huf_build_dec_table
.subsections_via_symbols
