	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_residuals
_decode_residuals:                      ## @decode_residuals
	.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	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	4(%rdi), %eax
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_get_bits
	movl	%eax, %r13d
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_get_bits
	movl	(%r15), %r8d
	movl	%r8d, %ebx
	movl	%eax, %ecx
	sarl	%cl, %ebx
	leal	4(%r13), %esi
	movl	$-1, %r14d
	movl	%esi, %ecx
	shll	%cl, %r14d
	cmpl	$2, %r13d
	jl	LBB0_2
## %bb.1:
	movl	8(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_7
LBB0_2:
	movq	%r12, %r9
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%ebx, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	cmpl	%r8d, %edx
	jne	LBB0_5
## %bb.3:
	movl	%r12d, %r8d
	cmpl	%r12d, %ebx
	jge	LBB0_9
## %bb.4:
	movl	8(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movl	%r8d, %ecx
	movl	%ebx, %r8d
	jmp	LBB0_6
LBB0_5:
	movl	8(%r15), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%eax, %ecx
LBB0_6:
	xorl	%eax, %eax
	callq	_av_log
LBB0_7:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	cmpl	$31, %eax
	jne	LBB0_11
LBB0_10:
	movl	-44(%rbp), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_11:
	notl	%r14d
	movslq	%r8d, %rdx
	movl	$1, %edi
	movl	%eax, %ecx
	shll	%cl, %edi
	movl	$1, %eax
	cmpl	$2, %edi
	cmovll	%eax, %edi
	movl	%edi, -56(%rbp)                 ## 4-byte Spill
	leaq	(%r9,%rdx,4), %r13
	xorl	%eax, %eax
	leaq	-44(%rbp), %r12
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_14 Depth=1
	leaq	-44(%rbp), %r12
LBB0_13:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	xorl	%r8d, %r8d
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_10
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
                                        ##     Child Loop BB0_17 Depth 2
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rbx
	movl	%r8d, %r12d
	movq	%rbx, %rdi
	callq	_get_bits
	cmpl	%r14d, %eax
	jne	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_get_bits
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %r12d
	jge	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%eax, %r14d
	subl	%r12d, %ebx
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_get_sbits_long
	movl	%eax, (%r13)
	addq	$4, %r13
	decl	%ebx
	jne	LBB0_17
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	%eax, %r15d
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r14d
	movl	%r15d, %ecx
	sarl	%cl, %r14d
	addl	$2, %r14d
	testl	%r15d, %r15d
	cmovel	%eax, %r14d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %r12d
	jge	LBB0_12
## %bb.19:                              ##   in Loop: Header=BB0_14 Depth=1
	subl	%r12d, %ebx
	leaq	-44(%rbp), %r12
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_get_sr_golomb_flac
	cmpl	$-2147483648, %eax              ## imm = 0x80000000
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	movl	%eax, (%r13)
	addq	$4, %r13
	decl	%ebx
	jne	LBB0_20
	jmp	LBB0_13
LBB0_23:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"illegal residual coding method %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"invalid rice order: %i blocksize %i\n"

L_.str.2:                               ## @.str.2
	.asciz	"invalid predictor order: %i > %i\n"

	.comm	_INT_MAX,4,2                    ## @INT_MAX
L_.str.3:                               ## @.str.3
	.asciz	"invalid residual\n"

	.no_dead_strip	_decode_residuals
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_residuals
_decode_residuals:                      ; @decode_residuals
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w8, [x0, #4]
	str	w8, [sp, #28]
	add	x0, sp, #28
	mov	w1, #2
	bl	_get_bits
	mov	x20, x0
	add	x0, sp, #28
	mov	w1, #4
	bl	_get_bits
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w20, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	x20, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	ldr	w9, [x19]
	asr	w24, w9, w0
	lsl	w8, w24, w0
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
	cmp	w24, w21
	b.ge	LBB0_8
; %bb.4:
	ldr	w0, [x19, #8]
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	stp	x21, x24, [sp]
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:
	ldr	w8, [x19, #8]
Lloh10:
	adrp	x10, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x10]
	stp	x0, x9, [sp]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x8
LBB0_6:
	bl	_av_log
Lloh15:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	cmp	w0, #31
	b.ne	LBB0_10
LBB0_9:
	mov	w0, #0
	ldr	w8, [sp, #28]
	str	w8, [x19, #4]
	b	LBB0_7
LBB0_10:
	mov	w25, #0
	add	w20, w20, #4
	mov	w8, #-1
	lsl	w8, w8, w20
	mvn	w26, w8
	add	x27, x22, w21, sxtw #2
	mov	w8, #1
	lsl	w8, w8, w0
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	mov	w28, #-2147483648
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	w21, #0
	add	w25, w25, #1
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w25, w8
	b.eq	LBB0_9
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
                                        ;     Child Loop BB0_15 Depth 2
	add	x0, sp, #28
	mov	x1, x20
	bl	_get_bits
	cmp	w0, w26
	b.ne	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #28
	mov	w1, #5
	bl	_get_bits
	cmp	w21, w24
	b.ge	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x22, x0
	sub	w21, w24, w21
LBB0_15:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #28
	mov	x1, x22
	bl	_get_sbits_long
	str	w0, [x27], #4
	subs	w21, w21, #1
	b.ne	LBB0_15
	b	LBB0_11
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x22, x0
Lloh18:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	asr	w9, w8, w0
	add	w9, w9, #2
	cmp	w0, #0
	csel	w23, w8, w9, eq
	cmp	w21, w24
	b.ge	LBB0_11
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	sub	w21, w24, w21
LBB0_18:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #28
	mov	x1, x22
	mov	x2, x23
	mov	w3, #0
	bl	_get_sr_golomb_flac
	cmp	w0, w28
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	str	w0, [x27], #4
	subs	w21, w21, #1
	b.ne	LBB0_18
	b	LBB0_11
LBB0_20:
	ldr	w0, [x19, #8]
Lloh21:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x2, l_.str.3@PAGE
Lloh25:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"illegal residual coding method %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"invalid rice order: %i blocksize %i\n"

l_.str.2:                               ; @.str.2
	.asciz	"invalid predictor order: %i > %i\n"

	.comm	_INT_MAX,4,2                    ; @INT_MAX
l_.str.3:                               ; @.str.3
	.asciz	"invalid residual\n"

	.no_dead_strip	_decode_residuals
.subsections_via_symbols
