	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ape_decode_value_3900
_ape_decode_value_3900:                 ## @ape_decode_value_3900
	.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
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_counts_3970@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_counts_diff_3970@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_range_get_symbol
	movl	%eax, %ebx
	movq	_MODEL_ELEMENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	cmpl	%eax, %ebx
	jne	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	$5, %esi
	callq	_range_decode_bits
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	cmpl	$17, %r15d
	jge	LBB0_5
	jmp	LBB0_9
LBB0_2:
	movl	(%r14), %r15d
	testl	%r15d, %r15d
	jle	LBB0_8
## %bb.3:
	decl	%r15d
	cmpl	$17, %r15d
	jl	LBB0_9
LBB0_5:
	cmpl	$3909, (%r12)                   ## imm = 0xF45
	jg	LBB0_10
## %bb.6:
	cmpl	$24, %r15d
	jae	LBB0_7
	jmp	LBB0_9
LBB0_10:
	cmpl	$31, %r15d
	ja	LBB0_7
## %bb.11:
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_range_decode_bits
	movl	%eax, %r13d
	leal	-16(%r15), %esi
	movq	%r12, %rdi
	callq	_range_decode_bits
	shll	$16, %eax
	orl	%r13d, %eax
	jmp	LBB0_12
LBB0_7:
	movl	4(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r15d, %ecx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	xorl	%r15d, %r15d
LBB0_9:
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_range_decode_bits
LBB0_12:
	movl	%r15d, %ecx
	shll	%cl, %ebx
	addl	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_update_rice
	movl	%ebx, %eax
	shrl	%eax
	andl	$1, %ebx
	decl	%ebx
	xorl	%eax, %ebx
	incl	%ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_counts_3970,4,2                ## @counts_3970
	.comm	_counts_diff_3970,4,2           ## @counts_diff_3970
	.comm	_MODEL_ELEMENTS,4,2             ## @MODEL_ELEMENTS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too many bits: %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_ape_decode_value_3900
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ape_decode_value_3900
_ape_decode_value_3900:                 ; @ape_decode_value_3900
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _counts_3970@GOTPAGE
Lloh1:
	ldr	x8, [x8, _counts_3970@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _counts_diff_3970@GOTPAGE
Lloh4:
	ldr	x8, [x8, _counts_diff_3970@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_range_get_symbol
Lloh6:
	adrp	x8, _MODEL_ELEMENTS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MODEL_ELEMENTS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	sub	w8, w8, #1
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x22
	mov	w1, #5
	bl	_range_decode_bits
	mov	x20, x0
	mov	w21, #0
	b	LBB0_3
LBB0_2:
	mov	x21, x0
	ldr	w8, [x19]
	subs	w20, w8, #1
	b.lt	LBB0_9
LBB0_3:
	cmp	w20, #17
	b.lt	LBB0_10
; %bb.4:
	ldr	w8, [x22]
	cmp	w8, #3909
	b.gt	LBB0_6
; %bb.5:
	cmp	w20, #24
	b.hs	LBB0_8
	b	LBB0_10
LBB0_6:
	cmp	w20, #31
	b.hi	LBB0_8
; %bb.7:
	mov	x0, x22
	mov	w1, #16
	bl	_range_decode_bits
	mov	x23, x0
	sub	w1, w20, #16
	mov	x0, x22
	bl	_range_decode_bits
	orr	w0, w23, w0, lsl #16
	b	LBB0_11
LBB0_8:
	ldr	w0, [x22, #4]
Lloh9:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x20
	bl	_av_log
Lloh14:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x22
	mov	x1, x20
	bl	_range_decode_bits
LBB0_11:
	lsl	w8, w21, w20
	add	w20, w0, w8
	mov	x0, x19
	mov	x1, x20
	bl	_update_rice
	and	w8, w20, #0x1
	sub	w8, w8, #1
	eor	w8, w8, w20, lsr #1
	add	w0, w8, #1
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_counts_3970,4,2                ; @counts_3970
	.comm	_counts_diff_3970,4,2           ; @counts_diff_3970
	.comm	_MODEL_ELEMENTS,4,2             ; @MODEL_ELEMENTS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too many bits: %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_ape_decode_value_3900
.subsections_via_symbols
