	.file	"extr_zstd_v05.c_HUFv05_readDTableX2.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	HUFv05_readDTableX2
	.type	HUFv05_readDTableX2, @function
HUFv05_readDTableX2:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	rbx, rdi
	sub	rsp, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR HUFv05_MAX_SYMBOL_VALUE[rip]
	mov	rdi, rsp
	add	eax, 1
	cdqe
	lea	rax, 15[0+rax*8]
	mov	rcx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rcx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L3
.L32:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L32
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L33
.L4:
	mov	eax, DWORD PTR HUFv05_ABSOLUTEMAX_TABLELOG[rip]
	mov	rdi, rsp
	mov	r12, rsp
	add	eax, 1
	cdqe
	lea	rax, 15[0+rax*8]
	mov	rcx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rcx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L6
.L34:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L34
.L6:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L35
.L7:
	xor	edi, edi
	mov	QWORD PTR -72[rbp], rdx
	mov	r13, rsp
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	call	HUFv05_STATIC_ASSERT@PLT
	mov	rdx, QWORD PTR -72[rbp]
	sub	rsp, 8
	mov	r9, r14
	mov	eax, DWORD PTR HUFv05_MAX_SYMBOL_VALUE[rip]
	lea	rcx, -48[rbp]
	lea	r8, -56[rbp]
	mov	rdi, r12
	push	rdx
	mov	rdx, r13
	lea	esi, 1[rax]
	call	HUFv05_readStats@PLT
	mov	rdi, rax
	mov	r14, rax
	call	HUFv05_isError@PLT
	pop	rdx
	pop	rcx
	test	rax, rax
	jne	.L1
	mov	r8, QWORD PTR -56[rbp]
	cmp	QWORD PTR [rbx], r8
	jb	.L36
	mov	QWORD PTR [rbx], r8
	mov	eax, 1
	xor	esi, esi
	test	r8, r8
	je	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdx, QWORD PTR 0[r13+rax*8]
	mov	rdi, rsi
	lea	ecx, -1[rax]
	mov	QWORD PTR 0[r13+rax*8], rdi
	add	rax, 1
	sal	rdx, cl
	add	rsi, rdx
	cmp	r8, rax
	jnb	.L10
.L12:
	mov	r9, QWORD PTR -48[rbp]
	add	r8, 1
	xor	edx, edx
	mov	r10d, 1
	test	r9, r9
	je	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rcx, QWORD PTR [r12+rdx*8]
	mov	r11d, r10d
	mov	rsi, r8
	sal	r11d, cl
	lea	rdi, 0[r13+rcx*8]
	sub	rsi, rcx
	mov	ecx, r11d
	mov	rax, QWORD PTR [rdi]
	sar	ecx
	movsx	rcx, ecx
	add	rcx, rax
	cmp	rax, rcx
	jnb	.L16
	mov	r11, rcx
	sal	rax, 4
	sal	r11, 4
	add	rax, rbx
	add	r11, rbx
	.p2align 4,,10
	.p2align 3
.L15:
	mov	QWORD PTR 8[rax], rsi
	add	rax, 16
	mov	QWORD PTR [rax], rdx
	cmp	rax, r11
	jne	.L15
.L16:
	add	rdx, 1
	mov	QWORD PTR [rdi], rcx
	cmp	rdx, r9
	jne	.L14
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L37
	lea	rsp, -32[rbp]
	mov	rax, r14
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L33:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L36:
	mov	edi, DWORD PTR tableLog_tooLarge[rip]
	call	ERROR@PLT
	mov	r14, rax
	jmp	.L1
.L35:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L7
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	HUFv05_readDTableX2, .-HUFv05_readDTableX2
	.comm	tableLog_tooLarge,4,4
	.comm	HUFv05_MAX_SYMBOL_VALUE,4,4
	.comm	HUFv05_ABSOLUTEMAX_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_HUFv05_readDTableX2.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	HUFv05_readDTableX2
	.syntax unified
	.arm
	.fpu softvfp
	.type	HUFv05_readDTableX2, %function
HUFv05_readDTableX2:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #36
	mov	ip, #0
	mov	r7, r1
	mov	r8, r2
	ldr	r6, .L20
	ldr	r3, .L20+4
	mov	r5, r0
	ldr	r0, [r6]
	ldr	r3, [r3]
	lsl	r0, r0, #2
	add	r0, r0, #11
	lsl	r3, r3, #2
	bic	r0, r0, #7
	add	r3, r3, #11
	sub	sp, sp, r0
	bic	r3, r3, #7
	add	r9, sp, #16
	sub	sp, sp, r3
	ldr	r3, .L20+8
	mov	r0, ip
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	str	ip, [fp, #-48]
	str	ip, [fp, #-44]
	bl	HUFv05_STATIC_ASSERT
	ldr	r1, [r6]
	sub	r3, fp, #48
	add	r6, sp, #16
	mov	r2, r6
	stmib	sp, {r7, r8}
	add	r1, r1, #1
	str	r3, [sp]
	mov	r0, r9
	sub	r3, fp, #44
	bl	HUFv05_readStats
	mov	r7, r0
	bl	HUFv05_isError
	cmp	r0, #0
	bne	.L1
	ldr	r2, [fp, #-48]
	ldr	r3, [r5]
	cmp	r3, r2
	bcc	.L18
	cmp	r2, #0
	movne	r1, r6
	movne	r3, #1
	str	r2, [r5]
	beq	.L7
.L6:
	mov	ip, r0
	ldr	r8, [r1, #4]!
	sub	lr, r3, #1
	add	r3, r3, #1
	cmp	r2, r3
	add	r0, r0, r8, lsl lr
	str	ip, [r1]
	bcs	.L6
.L7:
	ldr	r0, [fp, #-44]
	cmp	r0, #0
	movne	r8, #1
	movne	r1, #0
	addne	r2, r2, r8
	subne	r9, r9, #4
	beq	.L1
.L9:
	ldr	r4, [r9, #4]!
	ldr	r3, [r6, r4, lsl #2]
	lsl	lr, r8, r4
	add	lr, r3, lr, asr #1
	cmp	r3, lr
	sub	ip, r2, r4
	addcc	r3, r5, r3, lsl #3
	addcc	r10, r5, lr, lsl #3
	bcs	.L11
.L10:
	str	ip, [r3, #4]
	str	r1, [r3, #8]!
	cmp	r10, r3
	bne	.L10
.L11:
	add	r1, r1, #1
	cmp	r1, r0
	str	lr, [r6, r4, lsl #2]
	bne	.L9
.L1:
	ldr	r3, .L20+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r7
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	ldr	r3, .L20+12
	ldr	r0, [r3]
	bl	ERROR
	mov	r7, r0
	b	.L1
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	HUFv05_MAX_SYMBOL_VALUE
	.word	HUFv05_ABSOLUTEMAX_TABLELOG
	.word	.LC0
	.word	tableLog_tooLarge
	.size	HUFv05_readDTableX2, .-HUFv05_readDTableX2
	.comm	tableLog_tooLarge,4,4
	.comm	HUFv05_MAX_SYMBOL_VALUE,4,4
	.comm	HUFv05_ABSOLUTEMAX_TABLELOG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
