	.file	"extr_zstd_v01.c_FSE_readNCount.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	FSE_readNCount, @function
FSE_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 64[rsp], r8
	cmp	r8, 3
	ja	.L2
.L40:
	mov	rax, QWORD PTR FSE_ERROR_srcSize_wrong[rip]
	neg	rax
.L1:
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, QWORD PTR 56[rsp]
	mov	rbp, rdx
	call	FSE_readLE32@PLT
	mov	ecx, eax
	and	ecx, 15
	add	ecx, DWORD PTR FSE_MIN_TABLELOG[rip]
	cmp	DWORD PTR FSE_TABLELOG_ABSOLUTE_MAX[rip], ecx
	jl	.L42
	mov	edx, 1
	mov	DWORD PTR 0[rbp], ecx
	mov	r14, 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 64[rsp]
	mov	r15d, ebp
	mov	ebp, edx
	mov	DWORD PTR 12[rsp], 0
	mov	r13d, 4
	lea	rsi, [r14+rbx*4]
	lea	rbx, -28[rsi]
	mov	QWORD PTR 72[rsp], rsi
	mov	QWORD PTR 40[rsp], rbx
	lea	rbx, -16[rsi]
	mov	QWORD PTR 48[rsp], rbx
	.p2align 4,,10
	.p2align 3
.L6:
	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	.L20
	lea	ebx, -1[rbp]
	lea	r13d, -1[r13+r15]
	and	eax, ebx
.L21:
	lea	ebx, -1[rax]
	movsx	edi, bx
	call	FSE_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	.L23
	.p2align 4,,10
	.p2align 3
.L24:
	sar	ebp
	sub	r15d, 1
	cmp	r11d, ebp
	jl	.L24
.L23:
	mov	eax, r13d
	sar	eax, 3
	cdqe
	lea	rax, [r14+rax*4]
	cmp	r14, QWORD PTR 40[rsp]
	jbe	.L25
	cmp	QWORD PTR 48[rsp], rax
	jnb	.L25
	mov	rsi, QWORD PTR 48[rsp]
	mov	rax, rsi
	sub	rax, r14
	mov	r14, rsi
	sar	rax, 2
	sal	eax, 3
	sub	r13d, eax
	mov	r12d, r13d
	and	r12d, 31
.L27:
	mov	rdi, r14
	mov	DWORD PTR 20[rsp], r10d
	mov	DWORD PTR 16[rsp], r11d
	call	FSE_readLE32@PLT
	mov	r11d, DWORD PTR 16[rsp]
	mov	ecx, r12d
	mov	r10d, DWORD PTR 20[rsp]
	sar	eax, cl
	cmp	r11d, 1
	jle	.L5
	mov	rsi, QWORD PTR 24[rsp]
	mov	edi, DWORD PTR [rsi]
	cmp	edi, r10d
	jb	.L29
	test	bx, bx
	je	.L43
.L7:
	mov	DWORD PTR 12[rsp], r10d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L25:
	and	r13d, 7
	mov	r14, rax
	mov	r12d, r13d
	jmp	.L27
	.p2align 4,,10
	.p2align 3
.L20:
	lea	ebx, -1[rcx]
	and	eax, ebx
	movsx	ecx, ax
	mov	ebx, eax
	sub	ebx, edi
	cmp	ecx, ebp
	cmovge	eax, ebx
	add	r13d, r15d
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L43:
	movzx	ecx, ax
	cmp	ecx, 65535
	jne	.L31
	mov	rsi, QWORD PTR 72[rsp]
	mov	DWORD PTR 16[rsp], r10d
	mov	r12d, r10d
	lea	rbx, -20[rsi]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L9:
	sar	eax, 16
	add	r13d, 16
	movzx	edx, ax
	cmp	edx, 65535
	jne	.L44
.L11:
	add	r12d, 24
	cmp	r14, rbx
	jnb	.L9
	add	r14, 8
	mov	rdi, r14
	call	FSE_readLE32@PLT
	mov	ecx, r13d
	sar	eax, cl
	movzx	edx, ax
	cmp	edx, 65535
	je	.L11
.L44:
	mov	rsi, QWORD PTR 24[rsp]
	mov	r10d, DWORD PTR 16[rsp]
	mov	edi, DWORD PTR [rsi]
.L8:
	mov	ecx, eax
	and	ecx, 3
	cmp	ecx, 3
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	sar	eax, 2
	add	r12d, 3
	add	r13d, 2
	mov	edx, eax
	and	edx, 3
	cmp	edx, 3
	je	.L13
.L12:
	mov	ecx, eax
	add	r13d, 2
	and	ecx, 3
	add	r12d, ecx
	cmp	r12d, edi
	ja	.L14
	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
.L17:
	xor	edx, edx
	add	rcx, 2
	mov	WORD PTR -2[rcx], dx
	cmp	rdi, rcx
	jne	.L17
.L16:
	mov	ecx, r13d
	sar	ecx, 3
	movsx	rcx, ecx
	lea	rbx, [r14+rcx*4]
	cmp	r14, QWORD PTR 40[rsp]
	jbe	.L18
	cmp	rbx, QWORD PTR 48[rsp]
	jbe	.L18
	sar	eax, 2
	mov	r10d, r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L18:
	and	r13d, 7
	mov	rdi, rbx
	mov	r14, rbx
	call	FSE_readLE32@PLT
	mov	ecx, r13d
	mov	r10d, r12d
	sar	eax, cl
	jmp	.L7
.L42:
	mov	rax, QWORD PTR FSE_ERROR_tableLog_tooLarge[rip]
	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
	neg	rax
	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
.L30:
	.cfi_restore_state
	xor	r10d, r10d
	mov	r13d, 4
.L5:
	cmp	DWORD PTR 8[rsp], 1
	jne	.L29
	mov	rax, QWORD PTR 24[rsp]
	sub	r10d, 1
	mov	DWORD PTR [rax], r10d
	lea	eax, 7[r13]
	sar	eax, 3
	cdqe
	lea	rax, [r14+rax*4]
	sub	rax, QWORD PTR 56[rsp]
	sar	rax, 2
	cmp	rax, QWORD PTR 64[rsp]
	jbe	.L1
	jmp	.L40
.L29:
	mov	rax, QWORD PTR FSE_ERROR_GENERIC[rip]
	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
	neg	rax
	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
.L31:
	.cfi_restore_state
	mov	r12d, r10d
	jmp	.L8
.L45:
	mov	r12d, r10d
	jmp	.L16
.L14:
	mov	rax, QWORD PTR FSE_ERROR_maxSymbolValue_tooSmall[rip]
	neg	rax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	FSE_readNCount, .-FSE_readNCount
	.comm	FSE_TABLELOG_ABSOLUTE_MAX,4,4
	.comm	FSE_MIN_TABLELOG,4,4
	.comm	FSE_ERROR_tableLog_tooLarge,8,8
	.comm	FSE_ERROR_srcSize_wrong,8,8
	.comm	FSE_ERROR_maxSymbolValue_tooSmall,8,8
	.comm	FSE_ERROR_GENERIC,8,8
	.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_v01.c_FSE_readNCount.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FSE_readNCount, %function
FSE_readNCount:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #36
	str	r0, [sp, #4]
	ldr	r0, [sp, #72]
	str	r1, [sp, #8]
	cmp	r0, #3
	str	r3, [sp, #20]
	bhi	.L2
.L39:
	ldr	r3, .L44
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r0, [sp, #20]
	mov	r6, r2
	bl	FSE_readLE32
	ldr	r2, .L44+4
	ldr	r3, .L44+8
	ldr	r2, [r2]
	ldr	r3, [r3]
	and	r5, r0, #15
	add	r5, r5, r2
	cmp	r3, r5
	blt	.L41
	mov	r4, #1
	lsl	r4, r4, r5
	add	r7, r4, #1
	cmp	r7, #1
	str	r5, [r6]
	ldr	r9, [sp, #20]
	asr	r0, r0, #4
	add	r5, r5, #1
	ble	.L30
	mov	r8, #0
	mov	r6, #4
	ldr	r3, [sp, #72]
	add	r3, r9, r3, lsl #2
	sub	r2, r3, #28
	str	r3, [sp, #24]
	sub	r3, r3, #16
	str	r3, [sp, #16]
	ldr	r3, [sp, #4]
	str	r2, [sp, #12]
	sub	r3, r3, #2
	str	r3, [sp, #28]
.L6:
	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	.L20
	sub	r1, r1, #1
	and	r0, r0, r1
	lsl	r0, r0, #16
	sub	r2, r5, #1
	lsr	r0, r0, #16
	add	r6, r2, r6
.L21:
	sub	r0, r0, #1
	lsl	fp, r0, #16
	asr	fp, fp, #16
	mov	r0, fp
	bl	FSE_abs
	ldr	r3, [sp, #4]
	sub	r7, r7, r0
	lsl	r2, r8, #1
	cmp	r4, r7
	strh	fp, [r3, r2]	@ movhi
	add	r10, r8, #1
	ble	.L23
.L24:
	asr	r4, r4, #1
	cmp	r7, r4
	sub	r5, r5, #1
	blt	.L24
.L23:
	ldr	r3, [sp, #12]
	asr	r0, r6, #3
	cmp	r9, r3
	add	r0, r9, r0, lsl #2
	bls	.L25
	ldr	r3, [sp, #16]
	cmp	r3, r0
	bcs	.L25
	ldr	r3, [sp, #16]
	sub	r0, r3, r9
	sub	r6, r6, r0, lsl #1
	mov	r9, r3
	and	r3, r6, #31
	str	r3, [sp]
.L27:
	mov	r0, r9
	bl	FSE_readLE32
	ldr	r3, [sp]
	cmp	r7, #1
	asr	r0, r0, r3
	ble	.L5
	ldr	r3, [sp, #8]
	ldr	ip, [r3]
	cmp	ip, r10
	bcc	.L29
	cmp	fp, #0
	beq	.L42
.L7:
	mov	r8, r10
	b	.L6
.L25:
	and	r6, r6, #7
	mov	r9, r0
	str	r6, [sp]
	b	.L27
.L20:
	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	.L21
.L42:
	ldr	r3, .L44+12
	mov	fp, r10
	bics	r3, r3, r0
	bne	.L8
	ldr	r3, [sp, #24]
	str	r4, [sp]
	sub	r1, r3, #20
	mov	r4, r1
	b	.L11
.L10:
	ldr	r3, .L44+12
	bics	r3, r3, r0
	bne	.L43
.L11:
	cmp	r9, r4
	add	fp, fp, #24
	asrcs	r0, r0, #16
	addcs	r6, r6, #16
	bcs	.L10
	add	r9, r9, #8
	mov	r0, r9
	bl	FSE_readLE32
	ldr	r3, .L44+12
	asr	r0, r0, r6
	bics	r3, r3, r0
	beq	.L11
.L43:
	ldr	r3, [sp, #8]
	ldr	r4, [sp]
	ldr	ip, [r3]
.L8:
	and	r1, r0, #3
	cmp	r1, #3
	bne	.L12
.L13:
	asr	r0, r0, #2
	and	r1, r0, #3
	cmp	r1, #3
	add	fp, fp, #3
	add	r6, r6, #2
	beq	.L13
.L12:
	add	fp, r1, fp
	cmp	fp, ip
	add	r6, r6, #2
	bhi	.L14
	cmp	fp, r10
	movls	fp, r10
	bls	.L16
	mov	r2, #0
	ldr	r3, [sp, #4]
	add	r8, r3, r8, lsl #1
	ldr	r3, [sp, #28]
	add	r1, r3, fp, lsl #1
.L17:
	strh	r2, [r8, #2]!	@ movhi
	cmp	r1, r8
	bne	.L17
.L16:
	ldr	r3, [sp, #12]
	asr	r8, r6, #3
	cmp	r9, r3
	add	r8, r9, r8, lsl #2
	bls	.L18
	ldr	r3, [sp, #16]
	cmp	r8, r3
	movhi	r10, fp
	asrhi	r0, r0, #2
	bhi	.L7
.L18:
	mov	r0, r8
	bl	FSE_readLE32
	and	r6, r6, #7
	mov	r10, fp
	mov	r9, r8
	asr	r0, r0, r6
	b	.L7
.L41:
	ldr	r3, .L44+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	mov	r10, #0
	mov	r6, #4
.L5:
	cmp	r7, #1
	bne	.L29
	add	r1, r6, #7
	ldr	r3, [sp, #20]
	asr	r1, r1, #3
	add	r0, r9, r1, lsl #2
	sub	r0, r0, r3
	ldr	r3, [sp, #72]
	sub	r2, r10, #1
	cmp	r3, r0, asr #2
	ldr	r3, [sp, #8]
	asr	r0, r0, #2
	str	r2, [r3]
	bcs	.L1
	b	.L39
.L29:
	ldr	r3, .L44+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r3, .L44+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L45:
	.align	2
.L44:
	.word	FSE_ERROR_srcSize_wrong
	.word	FSE_MIN_TABLELOG
	.word	FSE_TABLELOG_ABSOLUTE_MAX
	.word	65535
	.word	FSE_ERROR_tableLog_tooLarge
	.word	FSE_ERROR_GENERIC
	.word	FSE_ERROR_maxSymbolValue_tooSmall
	.size	FSE_readNCount, .-FSE_readNCount
	.comm	FSE_TABLELOG_ABSOLUTE_MAX,4,4
	.comm	FSE_MIN_TABLELOG,4,4
	.comm	FSE_ERROR_tableLog_tooLarge,4,4
	.comm	FSE_ERROR_srcSize_wrong,4,4
	.comm	FSE_ERROR_maxSymbolValue_tooSmall,4,4
	.comm	FSE_ERROR_GENERIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
