	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_huff_channels
_read_huff_channels:                    ## @read_huff_channels
	.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	%ecx, %r13d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r14
	movl	%edx, %eax
	leaq	(%rax,%rax,4), %r15
	movl	(%r14,%r15,8), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	leaq	(%r14,%r15,8), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	cmpq	%rcx, %rbx
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rcx
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movl	4(%r12), %edx
	addl	%r13d, %edx
	movq	(%rcx,%rdx,8), %rcx
	movl	%eax, (%rcx,%rbx,4)
	movl	(%r12), %eax
	jmp	LBB0_4
LBB0_5:
	movl	8(%r14,%r15,8), %ecx
	xorl	%eax, %eax
	cmpl	12(%r14,%r15,8), %ecx
	ja	LBB0_15
## %bb.6:
	leaq	(%r14,%r15,8), %rdx
	addq	$12, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addl	8(%r13,%r12), %r14d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	-8(%rdx), %ecx
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	addl	%r13d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	%r14d, (%rax,%r15,4)
	leal	1(%r15), %ecx
	cmpl	(%rdx), %ecx
	ja	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	12(%rdx), %r13
	movl	%ecx, %r15d
	movq	%r15, %r12
	shlq	$4, %r12
	movl	(%r13,%r12), %eax
	movl	4(%r13,%r12), %ebx
	movq	4(%rdx), %rcx
	movl	(%rcx,%r15,4), %ecx
	testl	%eax, %eax
	jle	LBB0_8
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%ecx, %r14d
	movq	_huff_vlc@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	decl	%eax
	movl	(%rcx,%rax,4), %esi
	movq	_VLC_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	8(%rcx), %eax
	cltd
	idivl	%ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_get_vlc2
	movl	%r14d, %ecx
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_9
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	xorl	%r14d, %r14d
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	subl	%ecx, %ebx
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ecx
	shll	%cl, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_get_bits
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	addl	%eax, %r14d
	jmp	LBB0_11
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_14:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_huff_vlc,8,3                   ## @huff_vlc
	.comm	_VLC_BITS,4,2                   ## @VLC_BITS
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_read_huff_channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_huff_channels
_read_huff_channels:                    ; @read_huff_channels
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x3
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x0, #16]
	mov	w24, w2
	mov	w8, #40
	umaddl	x22, w2, w8, x23
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x25, #0
	mov	w9, #40
	madd	x9, x24, x9, x23
	add	x26, x9, #32
	add	x27, x9, #4
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	cmp	x25, w8, uxtw
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x26]
	ldr	x9, [x9, x25, lsl #3]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_get_bits1
	ldr	x8, [x21, #8]
	ldr	w9, [x27]
	add	w9, w9, w19
	ldr	x8, [x8, w9, uxtw #3]
	str	w0, [x8, x25, lsl #2]
	ldr	w8, [x22]
	b	LBB0_2
LBB0_5:
	mov	w8, #40
	madd	x22, x24, x8, x23
	ldr	w8, [x22, #12]!
	ldur	w25, [x22, #-4]
	cmp	w25, w8
	b.ls	LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_15
LBB0_7:
	mov	w8, #40
	madd	x8, x24, x8, x23
	add	x9, x8, #24
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	add	x24, x8, #16
	add	x26, x8, #4
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	w8, w25
	add	x9, x28, x8, lsl #4
	ldr	w9, [x9, #8]
	add	w9, w0, w9
	ldr	x10, [x21]
	ldr	w11, [x26]
	add	w11, w11, w19
	ldr	x10, [x10, w11, uxtw #3]
	lsl	w9, w9, w27
	str	w9, [x10, x8, lsl #2]
	add	w25, w8, #1
	ldr	w8, [x22]
	cmp	w25, w8
	b.hi	LBB0_6
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x28, [x8]
	add	x8, x28, w25, uxtw #4
	ldr	x9, [x24]
	ldr	w27, [x9, w25, uxtw #2]
	ldp	w9, w23, [x8]
	subs	w8, w9, #1
	b.lt	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
Lloh0:
	adrp	x9, _huff_vlc@GOTPAGE
Lloh1:
	ldr	x9, [x9, _huff_vlc@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w1, [x9, w8, uxtw #2]
Lloh3:
	adrp	x8, _VLC_BITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VLC_BITS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	w8, w2, #8
	sdiv	w3, w8, w2
	mov	x0, x20
	bl	_get_vlc2
	tbz	w0, #31, LBB0_12
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #0
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	sub	w1, w23, w27
	cmp	w1, #1
	b.lt	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	lsl	w23, w0, w1
	mov	x0, x20
	bl	_get_bits
	add	w0, w0, w23
	b	LBB0_8
LBB0_14:
Lloh6:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_huff_vlc,8,3                   ; @huff_vlc
	.comm	_VLC_BITS,4,2                   ; @VLC_BITS
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_read_huff_channels
.subsections_via_symbols
