	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_residual_block
_decode_residual_block:                 ## @decode_residual_block
	.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	$600, %rsp                      ## imm = 0x258
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -624(%rbp)                 ## 8-byte Spill
	movl	%r8d, -604(%rbp)                ## 4-byte Spill
	movl	%ecx, -608(%rbp)                ## 4-byte Spill
	movq	%rdx, %r14
	movq	%rsi, -616(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -600(%rbp)                ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -632(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	_ESCAPE_CODE@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%ecx, -320(%rbp,%r12,4)
	movl	%esi, -592(%rbp,%r12,4)
	incq	%r12
	cmpq	$65, %r12
	je	LBB0_15
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	(%r14), %esi
	movq	-616(%rbp), %rdi                ## 8-byte Reload
	callq	_get_ue_code
	movq	%rax, %rbx
	movl	(%r15), %eax
	cmpl	%ebx, %eax
	jbe	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%r14), %rax
	movl	%ebx, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rax), %esi
	movslq	8(%rax), %rax
	shlq	$5, %rax
	addq	%rax, %r14
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edx
	subl	%eax, %edx
	movl	%edx, %r13d
	shrl	%r13d
	leal	1(%r13), %r15d
	cmpl	$128, %edx
	jae	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-616(%rbp), %rdi                ## 8-byte Reload
	movl	-608(%rbp), %esi                ## 4-byte Reload
	callq	_get_ue_code
	cmpl	$32768, %eax                    ## imm = 0x8000
	jae	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %ecx
	cmpl	4(%r14), %r13d
	movl	%r15d, %esi
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r14), %rcx
	movl	%esi, %edx
	movl	(%rcx,%rdx,4), %ecx
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	%eax, %ecx
	addq	$-32, %r14
	movq	_ESCAPE_CODE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rax
	addq	$32, %r14
	cmpl	48(%rax), %ecx
	jg	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	andl	$1, %ebx
	movl	%ebx, %eax
	negl	%eax
	xorl	%eax, %ecx
	addl	%ebx, %ecx
	jmp	LBB0_14
LBB0_15:
	movl	$65, %r12d
LBB0_16:
	movq	_dequant_mul@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-604(%rbp), %rcx                ## 4-byte Folded Reload
	movl	(%rax,%rcx,4), %r8d
	movq	_dequant_shift@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %r9d
	movl	%r12d, (%rsp)
	leaq	-320(%rbp), %rsi
	leaq	-592(%rbp), %rdx
	movq	-600(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	movq	-632(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_dequant
	testl	%eax, %eax
	js	LBB0_18
## %bb.17:
	movq	-624(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rsi
	movl	16(%rbp), %edx
	callq	*16(%r14)
	movq	%rbx, %rdi
	callq	*8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_3:
	movq	-600(%rbp), %rax                ## 8-byte Reload
	movl	24(%rax), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_6
LBB0_5:
	movq	-600(%rbp), %rax                ## 8-byte Reload
	movl	24(%rax), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
LBB0_6:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.19:
	addq	$600, %rsp                      ## imm = 0x258
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ESCAPE_CODE,4,2                ## @ESCAPE_CODE
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"run %d is too large\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"esc_code invalid\n"

	.comm	_dequant_mul,8,3                ## @dequant_mul
	.comm	_dequant_shift,8,3              ## @dequant_shift
	.no_dead_strip	_decode_residual_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_residual_block
_decode_residual_block:                 ; @decode_residual_block
	.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, #592
	str	w6, [sp, #28]                   ; 4-byte Folded Spill
	str	x5, [sp, #16]                   ; 8-byte Folded Spill
	str	x4, [sp, #32]                   ; 8-byte Folded Spill
	mov	x25, x3
	mov	x26, x2
	mov	x27, x1
	mov	x23, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	x8, [x0]
	stp	x8, x0, [sp, #40]               ; 16-byte Folded Spill
Lloh3:
	adrp	x19, _ESCAPE_CODE@GOTPAGE
Lloh4:
	ldr	x19, [x19, _ESCAPE_CODE@GOTPAGEOFF]
	add	x21, sp, #316
	add	x24, sp, #56
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	lsl	x9, x23, #2
	str	w8, [x21, x9]
	str	w22, [x24, x9]
	add	x23, x23, #1
	cmp	x23, #65
	b.eq	LBB0_13
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	w1, [x26]
	mov	x0, x27
	bl	_get_ue_code
	mov	x28, x0
	ldr	w8, [x19]
	cmp	w8, w28
	b.ls	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x26, #24]
	ldr	x9, [x8, w28, uxtw #3]
	ldr	w8, [x9]
	cbz	w8, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w22, w9, [x9, #4]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x26, x26, x9, lsl #5
	b	LBB0_1
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	sub	w8, w28, w8
	lsr	w20, w8, #1
	add	w22, w20, #1
	cmp	w8, #128
	b.hs	LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x27
	mov	x1, x25
	bl	_get_ue_code
	cmp	w0, #8, lsl #12                 ; =32768
	b.hs	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26, #4]
	cmp	w20, w8
	b.hs	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x26, #8]
	ldr	w8, [x8, w22, uxtw #2]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, #1
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w8, w0
	sub	x26, x26, #32
LBB0_11:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x26, #48]
	add	x26, x26, #32
	cmp	w8, w9
	b.gt	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	and	w9, w28, #0x1
	neg	w10, w9
	eor	w8, w8, w10
	add	w8, w8, w9
	b	LBB0_1
LBB0_13:
Lloh5:
	adrp	x8, _dequant_mul@GOTPAGE
Lloh6:
	ldr	x8, [x8, _dequant_mul@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldp	x9, x20, [sp, #32]              ; 16-byte Folded Reload
	sbfiz	x9, x9, #2, #32
	ldr	w4, [x8, x9]
Lloh8:
	adrp	x8, _dequant_shift@GOTPAGE
Lloh9:
	ldr	x8, [x8, _dequant_shift@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	w5, [x8, x9]
	add	x1, sp, #316
	add	x2, sp, #56
	ldr	x19, [sp, #48]                  ; 8-byte Folded Reload
	mov	x0, x19
	mov	x3, x20
	mov	x6, x23
	bl	_dequant
	tbnz	w0, #31, LBB0_18
; %bb.14:
	ldr	x8, [x19, #16]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x1, x20
	ldr	w2, [sp, #28]                   ; 4-byte Folded Reload
	blr	x8
	ldr	x8, [x19, #8]
	mov	x0, x20
	blr	x8
	mov	w0, #0
	b	LBB0_18
LBB0_15:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	ldr	w0, [x8, #24]
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	str	x22, [sp]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_17
LBB0_16:
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	ldr	w0, [x8, #24]
Lloh16:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.1@PAGE
Lloh20:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_17:
	bl	_av_log
Lloh21:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
LBB0_18:
	ldur	x8, [x29, #-96]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	add	sp, sp, #592
	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_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ESCAPE_CODE,4,2                ; @ESCAPE_CODE
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"run %d is too large\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"esc_code invalid\n"

	.comm	_dequant_mul,8,3                ; @dequant_mul
	.comm	_dequant_shift,8,3              ; @dequant_shift
	.no_dead_strip	_decode_residual_block
.subsections_via_symbols
