	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unpack_SQVH
_unpack_SQVH:                           ## @unpack_SQVH
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movslq	%edx, %r15
	movq	_vpr_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax,%r15,4)
	jle	LBB0_1
## %bb.2:
	movq	%rcx, %r13
	movq	_vd_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cltq
	leaq	1(%rax), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	shlq	$2, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %eax
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	incq	%rsi
	movq	_vpr_tab@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rcx,%r15,4), %rcx
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	addq	%rdx, %r13
	addq	%rdx, -72(%rbp)                 ## 8-byte Folded Spill
	movl	%eax, %r12d
	cmpq	%rcx, %rsi
	jge	LBB0_14
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_8 Depth 2
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	8(%r14), %rax
	movl	(%rax,%r15,8), %edx
	movl	4(%rax,%r15,8), %esi
	movq	%r14, %rdi
	movl	$3, %ecx
	callq	_get_vlc2
	movl	%eax, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_get_bits_count
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rax, %rdx
	movl	$1, %ecx
	cmovll	%ecx, %r12d
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rax, %rdx
	movl	$0, %eax
	cmovll	%eax, %ebx
	movq	_invradix_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_kmax_tab@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rax,%r15,4), %esi
	imull	%ebx, %esi
	leal	1048575(%rsi), %edi
	testl	%esi, %esi
	cmovnsl	%esi, %edi
	sarl	$20, %edi
	movl	(%rcx,%r15,4), %esi
	notl	%esi
	imull	%edi, %esi
	addl	%ebx, %esi
	movl	%esi, -8(%r13,%rdx,4)
	decq	%rdx
	movl	%edi, %ebx
	cmpq	$1, %rdx
	jg	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=2
	movl	%r12d, %eax
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, (%rcx,%r14,4)
	incq	%r14
	movl	%eax, %r12d
	cmpq	%r14, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_13
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%ebx, %ebx
	cmpl	$0, (%r13,%r14,4)
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits_count
	movq	%rax, %rcx
	movl	$1, %eax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	(%rdx), %rcx
	jge	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_bits1
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_1:
	xorl	%eax, %eax
LBB0_14:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vd_tab,8,3                     ## @vd_tab
	.comm	_vpr_tab,8,3                    ## @vpr_tab
	.comm	_invradix_tab,8,3               ## @invradix_tab
	.comm	_kmax_tab,8,3                   ## @kmax_tab
	.no_dead_strip	_unpack_SQVH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unpack_SQVH
_unpack_SQVH:                           ; @unpack_SQVH
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	x4, [sp, #40]                   ; 8-byte Folded Spill
                                        ; kill: def $w2 killed $w2 def $x2
Lloh0:
	adrp	x8, _vpr_tab@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vpr_tab@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8, w2, sxtw #2]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x20, x3
	mov	x21, x1
	mov	x22, x0
	mov	x26, #0
	mov	w23, #0
	sxtw	x10, w2
Lloh3:
	adrp	x8, _vd_tab@GOTPAGE
Lloh4:
	ldr	x8, [x8, _vd_tab@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w8, [x8, x10, lsl #2]
	str	x8, [sp]                        ; 8-byte Folded Spill
	sxtw	x8, w8
	sub	x28, x3, #4
	stp	x8, x10, [sp, #16]              ; 16-byte Folded Spill
	lsl	x8, x8, #2
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	lsl	x27, x10, #2
	mov	w25, #1048575
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
Lloh6:
	adrp	x8, _vpr_tab@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vpr_tab@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldp	x10, x20, [sp, #24]             ; 16-byte Folded Reload
	ldrsw	x8, [x8, x10, lsl #2]
	ldr	x11, [sp, #8]                   ; 8-byte Folded Reload
	add	x28, x28, x11
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	add	x9, x9, x11
	str	x9, [sp, #40]                   ; 8-byte Folded Spill
	add	x20, x20, x11
	cmp	x26, x8
	b.ge	LBB0_14
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x8, [x22, #8]
	add	x8, x8, x10, lsl #3
	ldp	w2, w1, [x8]
	mov	x0, x22
	mov	w3, #3
	bl	_get_vlc2
	mov	x24, x0
	ldr	x19, [x21]
	mov	x0, x22
	bl	_get_bits_count
	cmp	x19, x0
	csinc	w23, w23, wzr, ge
	ldr	x11, [sp, #16]                  ; 8-byte Folded Reload
	cmp	w11, #1
	str	x20, [sp, #32]                  ; 8-byte Folded Spill
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x19, x0
	csel	w9, wzr, w24, lt
Lloh9:
	adrp	x8, _invradix_tab@GOTPAGE
Lloh10:
	ldr	x8, [x8, _invradix_tab@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x10, _kmax_tab@GOTPAGE
Lloh13:
	ldr	x10, [x10, _kmax_tab@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w12, [x8, x27]
	mul	w12, w12, w9
	add	w13, w12, w25
	cmp	w12, #0
	csel	w12, w13, w12, lt
	asr	w12, w12, #20
	ldr	w13, [x10, x27]
	mvn	w13, w13
	madd	w9, w12, w13, w9
	str	w9, [x28, x11, lsl #2]
	mov	x9, x12
	subs	x11, x11, #1
	b.gt	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x24, [sp]                       ; 8-byte Folded Reload
	ldr	x19, [sp, #40]                  ; 8-byte Folded Reload
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	mov	w0, #0
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	str	w0, [x19], #4
	add	x20, x20, #4
	subs	x24, x24, #1
	b.eq	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x22
	bl	_get_bits_count
	ldr	x8, [x21]
	cmp	x0, x8
	b.ge	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x22
	bl	_get_bits1
	b	LBB0_8
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	w0, #0
	mov	w23, #1
	b	LBB0_8
LBB0_13:
	mov	w23, #0
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.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	_vd_tab,8,3                     ; @vd_tab
	.comm	_vpr_tab,8,3                    ; @vpr_tab
	.comm	_invradix_tab,8,3               ; @invradix_tab
	.comm	_kmax_tab,8,3                   ; @kmax_tab
	.no_dead_strip	_unpack_SQVH
.subsections_via_symbols
