	.file	"extr_zstd_v05.c_FSEv05_readNCount.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	FSEv05_readNCount
	.type	FSEv05_readNCount, @function
FSEv05_readNCount:
.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, 88
	.cfi_def_cfa_offset 144
	mov	QWORD PTR 32[rsp], rdi
	mov	QWORD PTR 24[rsp], rsi
	mov	QWORD PTR 56[rsp], rcx
	mov	QWORD PTR 72[rsp], r8
	cmp	r8, 3
	jbe	.L40
	mov	rdi, QWORD PTR 56[rsp]
	mov	rbp, rdx
	call	MEM_readLE32@PLT
	mov	edi, DWORD PTR tableLog_tooLarge[rip]
	mov	ecx, eax
	and	ecx, 15
	add	ecx, DWORD PTR FSEv05_MIN_TABLELOG[rip]
	cmp	DWORD PTR FSEv05_TABLELOG_ABSOLUTE_MAX[rip], ecx
	jl	.L41
	mov	edx, 1
	mov	DWORD PTR 0[rbp], ecx
	mov	r15, QWORD PTR 56[rsp]
	sar	eax, 4
	sal	edx, cl
	lea	ebp, 1[rcx]
	lea	esi, 1[rdx]
	mov	DWORD PTR 8[rsp], esi
	cmp	esi, 1
	jle	.L30
	mov	rbx, QWORD PTR 72[rsp]
	mov	r13d, ebp
	mov	ebp, edx
	mov	DWORD PTR 12[rsp], 0
	mov	r14d, 4
	lea	rsi, [r15+rbx*4]
	lea	rbx, -28[rsi]
	mov	QWORD PTR 64[rsp], rsi
	sub	rsi, 16
	mov	QWORD PTR 40[rsp], rbx
	mov	QWORD PTR 48[rsp], rsi
	.p2align 4,,10
	.p2align 3
.L5:
	lea	ecx, [rbp+rbp]
	lea	r10d, -1[rbp]
	mov	edi, ecx
	sub	di, WORD PTR 8[rsp]
	and	r10d, eax
	sub	edi, 1
	movsx	r11d, di
	cmp	r10d, r11d
	jge	.L19
	lea	ebx, -1[rbp]
	lea	r14d, -1[r14+r13]
	and	eax, ebx
.L20:
	lea	ebx, -1[rax]
	movsx	edi, bx
	call	FSEv05_abs@PLT
	mov	r11d, DWORD PTR 8[rsp]
	mov	rdx, QWORD PTR 32[rsp]
	sub	r11d, eax
	mov	eax, DWORD PTR 12[rsp]
	mov	DWORD PTR 8[rsp], r11d
	mov	WORD PTR [rdx+rax*2], bx
	lea	r10d, 1[rax]
	cmp	ebp, r11d
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L23:
	sar	ebp
	sub	r13d, 1
	cmp	r11d, ebp
	jl	.L23
.L22:
	mov	eax, r14d
	sar	eax, 3
	cdqe
	lea	rax, [r15+rax*4]
	cmp	r15, QWORD PTR 40[rsp]
	jbe	.L24
	cmp	QWORD PTR 48[rsp], rax
	jnb	.L24
	mov	rsi, QWORD PTR 48[rsp]
	mov	rax, rsi
	sub	rax, r15
	mov	r15, rsi
	sar	rax, 2
	sal	eax, 3
	sub	r14d, eax
	mov	r12d, r14d
	and	r12d, 31
.L26:
	mov	rdi, r15
	mov	DWORD PTR 20[rsp], r10d
	mov	DWORD PTR 16[rsp], r11d
	call	MEM_readLE32@PLT
	mov	r11d, DWORD PTR 16[rsp]
	mov	ecx, r12d
	mov	r10d, DWORD PTR 20[rsp]
	sar	eax, cl
	cmp	r11d, 1
	jle	.L4
	mov	rsi, QWORD PTR 24[rsp]
	mov	edi, DWORD PTR [rsi]
	cmp	edi, r10d
	jb	.L28
	test	bx, bx
	je	.L43
.L6:
	mov	DWORD PTR 12[rsp], r10d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L24:
	and	r14d, 7
	mov	r15, rax
	mov	r12d, r14d
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L19:
	lea	ebx, -1[rcx]
	and	eax, ebx
	movsx	ecx, ax
	mov	ebx, eax
	sub	ebx, edi
	cmp	ecx, ebp
	cmovge	eax, ebx
	add	r14d, r13d
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L43:
	movzx	ecx, ax
	cmp	ecx, 65535
	jne	.L31
	mov	rsi, QWORD PTR 64[rsp]
	mov	DWORD PTR 16[rsp], r10d
	mov	r12d, r10d
	lea	rbx, -20[rsi]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	sar	eax, 16
	add	r14d, 16
	movzx	edx, ax
	cmp	edx, 65535
	jne	.L44
.L10:
	add	r12d, 24
	cmp	r15, rbx
	jnb	.L8
	add	r15, 8
	mov	rdi, r15
	call	MEM_readLE32@PLT
	mov	ecx, r14d
	sar	eax, cl
	movzx	edx, ax
	cmp	edx, 65535
	je	.L10
.L44:
	mov	rsi, QWORD PTR 24[rsp]
	mov	r10d, DWORD PTR 16[rsp]
	mov	edi, DWORD PTR [rsi]
.L7:
	mov	ecx, eax
	and	ecx, 3
	cmp	ecx, 3
	jne	.L11
	.p2align 4,,10
	.p2align 3
.L12:
	sar	eax, 2
	add	r12d, 3
	add	r14d, 2
	mov	edx, eax
	and	edx, 3
	cmp	edx, 3
	je	.L12
.L11:
	mov	ecx, eax
	add	r14d, 2
	and	ecx, 3
	add	r12d, ecx
	cmp	r12d, edi
	ja	.L13
	cmp	r12d, r10d
	jbe	.L45
	mov	rsi, QWORD PTR 32[rsp]
	mov	edi, r12d
	sub	edi, DWORD PTR 12[rsp]
	sub	edi, 2
	lea	rcx, [rsi+r10*2]
	add	r10, rdi
	lea	rdi, 2[rsi+r10*2]
	.p2align 4,,10
	.p2align 3
.L16:
	xor	edx, edx
	add	rcx, 2
	mov	WORD PTR -2[rcx], dx
	cmp	rdi, rcx
	jne	.L16
.L15:
	mov	ecx, r14d
	sar	ecx, 3
	movsx	rcx, ecx
	lea	rbx, [r15+rcx*4]
	cmp	r15, QWORD PTR 40[rsp]
	jbe	.L17
	cmp	rbx, QWORD PTR 48[rsp]
	jbe	.L17
	sar	eax, 2
	mov	r10d, r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	and	r14d, 7
	mov	rdi, rbx
	mov	r15, rbx
	call	MEM_readLE32@PLT
	mov	ecx, r14d
	mov	r10d, r12d
	sar	eax, cl
	jmp	.L6
.L40:
	mov	edi, DWORD PTR srcSize_wrong[rip]
.L41:
	add	rsp, 88
	.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
.L30:
	.cfi_restore_state
	xor	r10d, r10d
	mov	r14d, 4
.L4:
	cmp	DWORD PTR 8[rsp], 1
	jne	.L28
	mov	rax, QWORD PTR 24[rsp]
	sub	r10d, 1
	mov	DWORD PTR [rax], r10d
	lea	eax, 7[r14]
	sar	eax, 3
	cdqe
	lea	rax, [r15+rax*4]
	sub	rax, QWORD PTR 56[rsp]
	sar	rax, 2
	cmp	rax, QWORD PTR 72[rsp]
	ja	.L40
	add	rsp, 88
	.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
	ret
.L28:
	.cfi_restore_state
	mov	edi, DWORD PTR GENERIC[rip]
	jmp	.L41
.L31:
	mov	r12d, r10d
	jmp	.L7
.L45:
	mov	r12d, r10d
	jmp	.L15
.L13:
	mov	edi, DWORD PTR maxSymbolValue_tooSmall[rip]
	jmp	.L41
	.cfi_endproc
.LFE0:
	.size	FSEv05_readNCount, .-FSEv05_readNCount
	.comm	tableLog_tooLarge,4,4
	.comm	srcSize_wrong,4,4
	.comm	maxSymbolValue_tooSmall,4,4
	.comm	GENERIC,4,4
	.comm	FSEv05_TABLELOG_ABSOLUTE_MAX,4,4
	.comm	FSEv05_MIN_TABLELOG,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_v05.c_FSEv05_readNCount.c"
	.text
	.align	2
	.global	FSEv05_readNCount
	.syntax unified
	.arm
	.fpu softvfp
	.type	FSEv05_readNCount, %function
FSEv05_readNCount:
	@ args = 4, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #44
	ldr	ip, [sp, #80]
	str	r0, [sp, #8]
	cmp	ip, #3
	str	ip, [sp, #36]
	str	r1, [sp, #12]
	str	r3, [sp, #24]
	bls	.L39
	ldr	r0, [sp, #24]
	mov	r6, r2
	bl	MEM_readLE32
	ldr	r2, .L44
	ldr	r3, .L44+4
	ldr	r2, [r2]
	ldr	r3, [r3]
	and	r5, r0, #15
	add	r5, r5, r2
	cmp	r3, r5
	ldrlt	r3, .L44+8
	blt	.L40
	mov	r4, #1
	lsl	r4, r4, r5
	add	r7, r4, #1
	cmp	r7, #1
	str	r5, [r6]
	ldr	r9, [sp, #24]
	asr	r0, r0, #4
	add	r5, r5, #1
	ble	.L30
	mov	r8, #0
	mov	r6, #4
	ldr	r3, [sp, #36]
	add	r3, r9, r3, lsl #2
	sub	r2, r3, #28
	str	r3, [sp, #28]
	sub	r3, r3, #16
	str	r3, [sp, #20]
	ldr	r3, [sp, #8]
	str	r2, [sp, #16]
	sub	r3, r3, #2
	str	r3, [sp, #32]
.L5:
	lsl	ip, r4, #17
	rsb	r2, r7, ip, lsr #16
	sub	r2, r2, #1
	lsl	lr, r2, #16
	sub	r1, r4, #1
	and	r1, r1, r0
	asr	lr, lr, #16
	lsl	r2, r2, #16
	cmp	r1, lr
	lsl	r0, r0, #16
	lsl	r1, r4, #16
	lsr	ip, ip, #16
	lsr	r2, r2, #16
	asr	r0, r0, #16
	lsr	r1, r1, #16
	bge	.L19
	sub	r1, r1, #1
	and	r0, r0, r1
	lsl	r0, r0, #16
	sub	r2, r5, #1
	lsr	r0, r0, #16
	add	r6, r2, r6
.L20:
	sub	r0, r0, #1
	lsl	r10, r0, #16
	asr	r10, r10, #16
	mov	r0, r10
	bl	FSEv05_abs
	ldr	r3, [sp, #8]
	sub	r7, r7, r0
	lsl	r2, r8, #1
	cmp	r4, r7
	strh	r10, [r3, r2]	@ movhi
	add	fp, r8, #1
	ble	.L22
.L23:
	asr	r4, r4, #1
	cmp	r7, r4
	sub	r5, r5, #1
	blt	.L23
.L22:
	ldr	r3, [sp, #16]
	asr	r0, r6, #3
	cmp	r9, r3
	add	r0, r9, r0, lsl #2
	bls	.L24
	ldr	r3, [sp, #20]
	cmp	r3, r0
	bcs	.L24
	ldr	r3, [sp, #20]
	sub	r0, r3, r9
	sub	r6, r6, r0, lsl #1
	mov	r9, r3
	and	r3, r6, #31
	str	r3, [sp, #4]
.L26:
	mov	r0, r9
	bl	MEM_readLE32
	ldr	r3, [sp, #4]
	cmp	r7, #1
	asr	r0, r0, r3
	ble	.L4
	ldr	r3, [sp, #12]
	ldr	ip, [r3]
	cmp	ip, fp
	bcc	.L28
	cmp	r10, #0
	beq	.L42
.L6:
	mov	r8, fp
	b	.L5
.L24:
	and	r6, r6, #7
	mov	r9, r0
	str	r6, [sp, #4]
	b	.L26
.L19:
	sub	ip, ip, #1
	and	r0, r0, ip
	lsl	r1, r0, #16
	asr	r1, r1, #16
	lsl	r0, r0, #16
	cmp	r1, r4
	lsr	r0, r0, #16
	subge	r0, r0, r2
	lslge	r0, r0, #16
	lsrge	r0, r0, #16
	add	r6, r5, r6
	b	.L20
.L42:
	ldr	r3, .L44+12
	mov	r10, fp
	bics	r3, r3, r0
	bne	.L7
	ldr	r3, [sp, #28]
	str	r4, [sp, #4]
	sub	r1, r3, #20
	mov	r4, r1
	b	.L10
.L9:
	ldr	r3, .L44+12
	bics	r3, r3, r0
	bne	.L43
.L10:
	cmp	r9, r4
	add	r10, r10, #24
	asrcs	r0, r0, #16
	addcs	r6, r6, #16
	bcs	.L9
	add	r9, r9, #8
	mov	r0, r9
	bl	MEM_readLE32
	ldr	r3, .L44+12
	asr	r0, r0, r6
	bics	r3, r3, r0
	beq	.L10
.L43:
	ldr	r3, [sp, #12]
	ldr	r4, [sp, #4]
	ldr	ip, [r3]
.L7:
	and	r1, r0, #3
	cmp	r1, #3
	bne	.L11
.L12:
	asr	r0, r0, #2
	and	r1, r0, #3
	cmp	r1, #3
	add	r10, r10, #3
	add	r6, r6, #2
	beq	.L12
.L11:
	add	r10, r1, r10
	cmp	r10, ip
	add	r6, r6, #2
	bhi	.L13
	cmp	r10, fp
	movls	r10, fp
	bls	.L15
	mov	r2, #0
	ldr	r3, [sp, #8]
	add	r8, r3, r8, lsl #1
	ldr	r3, [sp, #32]
	add	r1, r3, r10, lsl #1
.L16:
	strh	r2, [r8, #2]!	@ movhi
	cmp	r1, r8
	bne	.L16
.L15:
	ldr	r3, [sp, #16]
	asr	r8, r6, #3
	cmp	r9, r3
	add	r8, r9, r8, lsl #2
	bls	.L17
	ldr	r3, [sp, #20]
	cmp	r8, r3
	movhi	fp, r10
	asrhi	r0, r0, #2
	bhi	.L6
.L17:
	mov	r0, r8
	bl	MEM_readLE32
	and	r6, r6, #7
	mov	fp, r10
	mov	r9, r8
	asr	r0, r0, r6
	b	.L6
.L39:
	ldr	r3, .L44+16
.L40:
	ldr	r0, [r3]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERROR
.L30:
	mov	fp, #0
	mov	r6, #4
.L4:
	cmp	r7, #1
	bne	.L28
	add	r1, r6, #7
	ldr	r2, [sp, #24]
	asr	r1, r1, #3
	add	r3, r9, r1, lsl #2
	sub	r3, r3, r2
	ldr	r2, [sp, #36]
	asr	r0, r3, #2
	cmp	r2, r3, asr #2
	ldr	r3, [sp, #12]
	sub	r2, fp, #1
	str	r2, [r3]
	bcc	.L39
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	ldr	r3, .L44+20
	ldr	r0, [r3]
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERROR
.L13:
	ldr	r3, .L44+24
	b	.L40
.L45:
	.align	2
.L44:
	.word	FSEv05_MIN_TABLELOG
	.word	FSEv05_TABLELOG_ABSOLUTE_MAX
	.word	tableLog_tooLarge
	.word	65535
	.word	srcSize_wrong
	.word	GENERIC
	.word	maxSymbolValue_tooSmall
	.size	FSEv05_readNCount, .-FSEv05_readNCount
	.comm	tableLog_tooLarge,4,4
	.comm	srcSize_wrong,4,4
	.comm	maxSymbolValue_tooSmall,4,4
	.comm	GENERIC,4,4
	.comm	FSEv05_TABLELOG_ABSOLUTE_MAX,4,4
	.comm	FSEv05_MIN_TABLELOG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
