	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ape_decode_value_3990
_ape_decode_value_3990:                 ## @ape_decode_value_3990
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %r15d
	movl	%r15d, %r14d
	sarl	$5, %r14d
	cmpl	$32, %r15d
	movl	$1, %ebx
	cmovael	%r14d, %ebx
	movq	_counts_3980@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_counts_diff_3980@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_range_get_symbol
	movl	%eax, %r13d
	movq	_MODEL_ELEMENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	cmpl	%eax, %r13d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_range_decode_bits
	movl	%eax, %ebx
	shll	$16, %ebx
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_range_decode_bits
	movl	%eax, %r13d
	orl	%ebx, %r13d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_2:
	cmpl	$65536, %ebx                    ## imm = 0x10000
	jge	LBB0_3
## %bb.5:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_range_decode_culfreq
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_range_decode_update
	jmp	LBB0_9
LBB0_3:
	xorl	%ebx, %ebx
	cmpl	$2097152, %r15d                 ## imm = 0x200000
	jae	LBB0_6
## %bb.4:
	movl	%r14d, %esi
	jmp	LBB0_8
LBB0_6:
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	sarl	%esi
	incl	%ebx
	cmpl	$131071, %r14d                  ## imm = 0x1FFFF
	movl	%esi, %r14d
	ja	LBB0_7
LBB0_8:
	incl	%esi
	movq	%r12, %rdi
	callq	_range_decode_culfreq
	movl	%eax, %r14d
	movl	$1, %r15d
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_range_decode_update
	movl	%ebx, %ecx
	shll	%cl, %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_range_decode_culfreq
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_range_decode_update
	movl	%ebx, %ecx
	shll	%cl, %r14d
	addl	%r15d, %r14d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_9:
	imull	%ebx, %r13d
	addl	%r14d, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_update_rice
	movl	%r13d, %eax
	shrl	%eax
	andl	$1, %r13d
	decl	%r13d
	xorl	%eax, %r13d
	incl	%r13d
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_counts_3980,4,2                ## @counts_3980
	.comm	_counts_diff_3980,4,2           ## @counts_diff_3980
	.comm	_MODEL_ELEMENTS,4,2             ## @MODEL_ELEMENTS
	.no_dead_strip	_ape_decode_value_3990
.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_3990
_ape_decode_value_3990:                 ; @ape_decode_value_3990
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	w24, [x1]
	asr	w23, w24, #5
	cmp	w24, #32
	csinc	w20, w23, wzr, hs
Lloh0:
	adrp	x8, _counts_3980@GOTPAGE
Lloh1:
	ldr	x8, [x8, _counts_3980@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _counts_diff_3980@GOTPAGE
Lloh4:
	ldr	x8, [x8, _counts_diff_3980@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_range_get_symbol
	mov	x22, x0
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, x21
	mov	w1, #16
	bl	_range_decode_bits
	mov	x22, x0
	mov	x0, x21
	mov	w1, #16
	bl	_range_decode_bits
	orr	w22, w0, w22, lsl #16
LBB0_2:
	cmp	w20, #16, lsl #12               ; =65536
	b.ge	LBB0_4
; %bb.3:
	mov	x0, x21
	mov	x1, x20
	bl	_range_decode_culfreq
	mov	x23, x0
	mov	x0, x21
	mov	w1, #1
	mov	x2, x23
	bl	_range_decode_update
	b	LBB0_9
LBB0_4:
	cmp	w24, #512, lsl #12              ; =2097152
	b.hs	LBB0_6
; %bb.5:
	mov	w25, #0
	b	LBB0_8
LBB0_6:
	mov	w25, #0
	mov	x8, x23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	asr	w23, w8, #1
	add	w25, w25, #1
	lsr	w9, w8, #17
	mov	x8, x23
	cbnz	w9, LBB0_7
LBB0_8:
	add	w1, w23, #1
	mov	x0, x21
	bl	_range_decode_culfreq
	mov	x23, x0
	mov	w24, #1
	mov	x0, x21
	mov	w1, #1
	mov	x2, x23
	bl	_range_decode_update
	lsl	w1, w24, w25
	mov	x0, x21
	bl	_range_decode_culfreq
	mov	x24, x0
	mov	x0, x21
	mov	w1, #1
	mov	x2, x24
	bl	_range_decode_update
	lsl	w8, w23, w25
	add	w23, w24, w8
LBB0_9:
	madd	w20, w22, w20, w23
	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
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_counts_3980,4,2                ; @counts_3980
	.comm	_counts_diff_3980,4,2           ; @counts_diff_3980
	.comm	_MODEL_ELEMENTS,4,2             ; @MODEL_ELEMENTS
	.no_dead_strip	_ape_decode_value_3990
.subsections_via_symbols
