	.file	"extr_zstd_v07.c_HUFv07_readStats.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	HUFv07_readStats
	.type	HUFv07_readStats, @function
HUFv07_readStats:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 80[rsp]
	test	rax, rax
	je	.L6
	movsx	r15, DWORD PTR [r9]
	mov	r12, rdi
	mov	r13, rdx
	mov	rbp, rcx
	mov	rbx, r8
	cmp	r15, 127
	jbe	.L3
	cmp	r15, 241
	ja	.L29
	lea	r14, -127[r15]
	sub	r15, 126
	shr	r15
	lea	rdx, 1[r15]
	cmp	rdx, rax
	ja	.L6
	xor	eax, eax
	cmp	rsi, r14
	jbe	.L16
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edx, eax
	sar	edx
	movsx	rdx, edx
	lea	rcx, 4[r9+rdx*4]
	mov	edx, DWORD PTR [rcx]
	sar	edx, 4
	mov	DWORD PTR [r12+rax*4], edx
	mov	edx, DWORD PTR [rcx]
	and	edx, 15
	mov	DWORD PTR 4[r12+rax*4], edx
	add	rax, 2
	cmp	r14, rax
	ja	.L7
	mov	eax, DWORD PTR HUFv07_TABLELOG_ABSOLUTEMAX[rip]
	xor	esi, esi
	mov	rdi, r13
	lea	edx, 4[0+rax*4]
	call	memset@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rdx, 1[r15]
	cmp	rdx, rax
	ja	.L6
	sub	rsi, 1
	lea	rdx, 4[r9]
	mov	rcx, r15
	call	FSEv07_decompress@PLT
	mov	rdi, rax
	mov	r14, rax
	call	FSEv07_isError@PLT
	test	rax, rax
	jne	.L1
.L5:
	mov	eax, DWORD PTR HUFv07_TABLELOG_ABSOLUTEMAX[rip]
	xor	esi, esi
	mov	rdi, r13
	lea	edx, 4[0+rax*4]
	call	memset@PLT
	test	r14, r14
	je	.L16
.L10:
	xor	edx, edx
	xor	edi, edi
	mov	esi, 1
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	add	DWORD PTR 0[r13+rax*4], 1
	mov	ecx, DWORD PTR [r12+rdx*4]
	mov	eax, esi
	add	rdx, 1
	sal	eax, cl
	sar	eax
	add	edi, eax
	cmp	r14, rdx
	jbe	.L30
.L12:
	movsx	rax, DWORD PTR [r12+rdx*4]
	cmp	eax, DWORD PTR HUFv07_TABLELOG_ABSOLUTEMAX[rip]
	jl	.L11
.L16:
	mov	edi, DWORD PTR corruption_detected[rip]
.L27:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	ERROR@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR srcSize_wrong[rip]
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L30:
	test	edi, edi
	je	.L16
	mov	DWORD PTR 12[rsp], edi
	call	BITv07_highbit32@PLT
	mov	edi, DWORD PTR 12[rsp]
	mov	esi, 1
	lea	ecx, 1[rax]
	cmp	DWORD PTR HUFv07_TABLELOG_ABSOLUTEMAX[rip], ecx
	jl	.L16
	mov	edx, esi
	mov	DWORD PTR [rbx], ecx
	sal	edx, cl
	mov	ebx, edx
	sub	ebx, edi
	mov	edi, ebx
	call	BITv07_highbit32@PLT
	mov	edi, ebx
	mov	DWORD PTR 12[rsp], eax
	call	BITv07_highbit32@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	esi, 1
	sal	esi, cl
	cmp	ebx, esi
	jne	.L16
	add	eax, 1
	mov	DWORD PTR [r12+r14*4], eax
	cdqe
	add	DWORD PTR 0[r13+rax*4], 1
	mov	eax, DWORD PTR 4[r13]
	cmp	eax, 1
	jle	.L16
	test	al, 1
	jne	.L16
	add	r14d, 1
	mov	DWORD PTR 0[rbp], r14d
	lea	r14, 1[r15]
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r14
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L29:
	.cfi_restore_state
	lea	rax, l.1948[rip]
	mov	edx, esi
	mov	esi, 1
	movsx	r14, DWORD PTR -968[rax+r15*4]
	xor	r15d, r15d
	call	memset@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	HUFv07_readStats, .-HUFv07_readStats
	.section	.rodata
	.align 32
	.type	l.1948, @object
	.size	l.1948, 56
l.1948:
	.long	1
	.long	2
	.long	3
	.long	4
	.long	7
	.long	8
	.long	15
	.long	16
	.long	31
	.long	32
	.long	63
	.long	64
	.long	127
	.long	128
	.comm	srcSize_wrong,4,4
	.comm	corruption_detected,4,4
	.comm	HUFv07_TABLELOG_ABSOLUTEMAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_zstd_v07.c_HUFv07_readStats.c"
	.text
	.align	2
	.global	HUFv07_readStats
	.syntax unified
	.arm
	.fpu softvfp
	.type	HUFv07_readStats, %function
HUFv07_readStats:
	@ args = 12, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	ip, [sp, #48]
	mov	r4, r2
	cmp	ip, #0
	ldr	r9, [sp, #40]
	ldr	r2, [sp, #44]
	beq	.L6
	ldr	r10, [r2]
	mov	r8, r3
	cmp	r10, #127
	mov	r7, r0
	bls	.L3
	cmp	r10, #241
	bhi	.L27
	sub	r3, r10, #126
	sub	r5, r10, #127
	lsr	r10, r3, #1
	add	r3, r10, #1
	cmp	r3, ip
	bhi	.L6
	cmp	r1, r5
	movhi	r3, #0
	addhi	ip, r0, #4
	bls	.L16
.L7:
	asr	r1, r3, #1
	add	r1, r1, #1
	ldr	r0, [r2, r1, lsl #2]
	asr	r0, r0, #4
	str	r0, [r7, r3, lsl #2]
	ldr	r1, [r2, r1, lsl #2]
	and	r1, r1, #15
	str	r1, [ip, r3, lsl #2]
	add	r3, r3, #2
	cmp	r5, r3
	bhi	.L7
	ldr	r6, .L29
	mov	r1, #0
	ldr	r2, [r6]
	mov	r0, r4
	add	r2, r2, #1
	lsl	r2, r2, #2
	bl	memset
	b	.L10
.L3:
	add	r3, r10, #1
	cmp	r3, ip
	bhi	.L6
	mov	r3, r10
	add	r2, r2, #4
	sub	r1, r1, #1
	bl	FSEv07_decompress
	mov	r5, r0
	bl	FSEv07_isError
	cmp	r0, #0
	bne	.L1
.L5:
	ldr	r6, .L29
	mov	r1, #0
	ldr	r2, [r6]
	mov	r0, r4
	add	r2, r2, #1
	lsl	r2, r2, #2
	bl	memset
	cmp	r5, #0
	beq	.L16
.L10:
	mov	r2, #0
	mov	r3, #1
	mov	fp, r2
	sub	r0, r7, #4
	b	.L12
.L11:
	ldr	ip, [r4, r1, lsl #2]
	cmp	r5, r2
	add	ip, ip, #1
	str	ip, [r4, r1, lsl #2]
	ldr	r1, [r0]
	lsl	r1, r3, r1
	add	fp, fp, r1, asr #1
	bls	.L28
.L12:
	ldr	r1, [r0, #4]!
	ldr	ip, [r6]
	add	r2, r2, #1
	cmp	r1, ip
	blt	.L11
.L16:
	ldr	r3, .L29+4
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERROR
.L6:
	ldr	r3, .L29+8
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERROR
.L28:
	cmp	fp, #0
	beq	.L16
	mov	r0, fp
	bl	BITv07_highbit32
	ldr	r2, [r6]
	add	r0, r0, #1
	cmp	r2, r0
	mov	r3, #1
	blt	.L16
	rsb	fp, fp, r3, lsl r0
	str	r0, [r9]
	mov	r0, fp
	bl	BITv07_highbit32
	mov	r6, r0
	mov	r0, fp
	bl	BITv07_highbit32
	mov	r3, #1
	cmp	fp, r3, lsl r6
	bne	.L16
	add	r3, r0, #1
	str	r3, [r7, r5, lsl #2]
	ldr	r2, [r4, r3, lsl #2]
	add	r2, r2, #1
	str	r2, [r4, r3, lsl #2]
	ldr	r3, [r4, #4]
	cmp	r3, #1
	ble	.L16
	tst	r3, #1
	addeq	r5, r5, #1
	streq	r5, [r8]
	addeq	r5, r10, #1
	bne	.L16
.L1:
	mov	r0, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	ldr	r3, .L29+12
	mov	r2, r1
	sub	r10, r10, #242
	mov	r1, #1
	ldr	r5, [r3, r10, lsl #2]
	bl	memset
	mov	r10, #0
	b	.L5
.L30:
	.align	2
.L29:
	.word	HUFv07_TABLELOG_ABSOLUTEMAX
	.word	corruption_detected
	.word	srcSize_wrong
	.word	.LANCHOR0
	.size	HUFv07_readStats, .-HUFv07_readStats
	.comm	srcSize_wrong,4,4
	.comm	corruption_detected,4,4
	.comm	HUFv07_TABLELOG_ABSOLUTEMAX,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	l.4232, %object
	.size	l.4232, 56
l.4232:
	.word	1
	.word	2
	.word	3
	.word	4
	.word	7
	.word	8
	.word	15
	.word	16
	.word	31
	.word	32
	.word	63
	.word	64
	.word	127
	.word	128
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
