	.file	"extr_fse_compress.c_FSE_normalizeCount.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	FSE_normalizeCount
	.type	FSE_normalizeCount, @function
FSE_normalizeCount:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	test	esi, esi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, esi
	cmove	r12d, DWORD PTR FSE_DEFAULT_TABLELOG[rip]
	cmp	DWORD PTR FSE_MIN_TABLELOG[rip], r12d
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	ja	.L16
	cmp	DWORD PTR FSE_MAX_TABLELOG[rip], r12d
	jb	.L19
	mov	rbp, rdi
	mov	esi, r8d
	mov	rdi, rcx
	mov	r14, rdx
	mov	r13, rcx
	mov	ebx, r8d
	call	FSE_minTableLog@PLT
	cmp	eax, r12d
	ja	.L16
	mov	ecx, r12d
	mov	edx, 1
	mov	r8, r13
	xor	eax, eax
	sal	edx, cl
	shr	r8, cl
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edi, -1
	add	eax, 1
	sub	edx, 1
	mov	WORD PTR [rsi], di
	cmp	ebx, eax
	jb	.L20
.L10:
	mov	esi, eax
	mov	edi, DWORD PTR [r14+rsi*4]
	cmp	rdi, r13
	je	.L13
	lea	rsi, 0[rbp+rsi*2]
	test	edi, edi
	je	.L9
	cmp	edi, r8d
	jbe	.L21
.L9:
	xor	ecx, ecx
	add	eax, 1
	mov	WORD PTR [rsi], cx
	cmp	ebx, eax
	jnb	.L10
.L20:
	movzx	ecx, WORD PTR 0[rbp]
	mov	esi, edx
	neg	esi
	mov	eax, ecx
	sar	ax
	cwde
	cmp	esi, eax
	jge	.L22
	add	edx, ecx
	mov	WORD PTR 0[rbp], dx
.L12:
	mov	r13d, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	rax, r13
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR GENERIC[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	ERROR@PLT
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	edi, DWORD PTR tableLog_tooLarge[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	ERROR@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	xor	r13d, r13d
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L22:
	.cfi_restore_state
	mov	rcx, r13
	mov	rdi, rbp
	mov	r8d, ebx
	mov	rdx, r14
	mov	esi, r12d
	call	FSE_normalizeM2@PLT
	mov	rdi, rax
	mov	r13, rax
	call	FSE_isError@PLT
	test	rax, rax
	je	.L12
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	FSE_normalizeCount, .-FSE_normalizeCount
	.comm	tableLog_tooLarge,4,4
	.comm	GENERIC,4,4
	.comm	FSE_MIN_TABLELOG,4,4
	.comm	FSE_MAX_TABLELOG,4,4
	.comm	FSE_DEFAULT_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_fse_compress.c_FSE_normalizeCount.c"
	.text
	.align	2
	.global	FSE_normalizeCount
	.syntax unified
	.arm
	.fpu softvfp
	.type	FSE_normalizeCount, %function
FSE_normalizeCount:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	subs	r5, r1, #0
	mov	r7, r3
	ldreq	r3, .L20
	sub	sp, sp, #8
	ldreq	r5, [r3]
	ldr	r3, .L20+4
	mov	r9, r0
	ldr	r3, [r3]
	mov	r10, r2
	cmp	r3, r5
	ldr	r8, [sp, #40]
	bhi	.L16
	ldr	r3, .L20+8
	ldr	r3, [r3]
	cmp	r3, r5
	ldrcc	r3, .L20+12
	bcc	.L17
	mov	r1, r8
	mov	r0, r7
	bl	FSE_minTableLog
	cmp	r0, r5
	bhi	.L16
	mov	lr, #0
	mov	r3, #1
	mov	r0, lr
	mov	r4, r9
	mvn	r1, #0
	lsl	r3, r3, r5
	lsr	r2, r7, r5
	sub	r6, r10, #4
.L10:
	ldr	ip, [r6, #4]!
	cmp	ip, r7
	beq	.L12
	cmp	ip, #0
	strheq	ip, [r4]	@ movhi
	beq	.L8
	cmp	r2, ip
	strhcs	r1, [r4]	@ movhi
	subcs	r3, r3, #1
	strhcc	r0, [r4]	@ movhi
.L8:
	add	lr, lr, #1
	cmp	r8, lr
	add	r4, r4, #2
	bcs	.L10
	ldrsh	r2, [r9]
	rsb	r1, r3, #0
	cmp	r1, r2, asr #1
	addlt	r3, r2, r3
	movlt	r4, r5
	strhlt	r3, [r9]	@ movhi
	bge	.L19
.L1:
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	ldr	r3, .L20+16
.L17:
	ldr	r0, [r3]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	ERROR
.L12:
	mov	r4, #0
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L19:
	mov	r3, r7
	mov	r2, r10
	mov	r1, r5
	mov	r0, r9
	str	r8, [sp]
	bl	FSE_normalizeM2
	mov	r4, r0
	bl	FSE_isError
	cmp	r0, #0
	moveq	r4, r5
	b	.L1
.L21:
	.align	2
.L20:
	.word	FSE_DEFAULT_TABLELOG
	.word	FSE_MIN_TABLELOG
	.word	FSE_MAX_TABLELOG
	.word	tableLog_tooLarge
	.word	GENERIC
	.size	FSE_normalizeCount, .-FSE_normalizeCount
	.comm	tableLog_tooLarge,4,4
	.comm	GENERIC,4,4
	.comm	FSE_MIN_TABLELOG,4,4
	.comm	FSE_MAX_TABLELOG,4,4
	.comm	FSE_DEFAULT_TABLELOG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
