	.file	"extr_huf_decompress.c_HUF_readDTableX1_wksp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	HUF_readDTableX1_wksp
	.type	HUF_readDTableX1_wksp, @function
HUF_readDTableX1_wksp:
.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
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	mov	esi, 8
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR HUF_TABLELOG_ABSOLUTEMAX[rip]
	mov	QWORD PTR [rsp], 0
	mov	QWORD PTR 8[rsp], 0
	lea	r15, 1[rax]
	mov	rax, QWORD PTR HUF_SYMBOLVALUE_MAX[rip]
	lea	rdi, 1[rax]
	call	HUF_ALIGN@PLT
	sar	eax, 2
	cdqe
	add	rax, r15
	sal	rax, 2
	cmp	rax, r13
	ja	.L20
	xor	edi, edi
	lea	r13, 0[rbp+r15*8]
	call	DEBUG_STATIC_ASSERT@PLT
	lea	rcx, 8[rsp]
	mov	r9, rbx
	mov	rdx, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	rax, QWORD PTR HUF_SYMBOLVALUE_MAX[rip]
	mov	rdi, r13
	push	r14
	.cfi_def_cfa_offset 128
	lea	rsi, 1[rax]
	lea	r8, 16[rsp]
	call	HUF_readStats@PLT
	mov	rdi, rax
	mov	r14, rax
	call	HUF_isError@PLT
	mov	rbx, rax
	pop	rax
	.cfi_def_cfa_offset 120
	pop	rdx
	.cfi_def_cfa_offset 112
	test	rbx, rbx
	je	.L22
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 56
	.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
.L22:
	.cfi_restore_state
	lea	r15, 16[rsp]
	mov	rsi, r12
	mov	rdi, r15
	call	HUF_getDTableDesc@PLT
	mov	rax, QWORD PTR 32[rsp]
	mov	rdx, QWORD PTR [rsp]
	add	rax, 1
	cmp	rax, rdx
	jl	.L20
	mov	QWORD PTR 16[rsp], rdx
	mov	rsi, r15
	mov	edx, 24
	mov	rdi, r12
	mov	QWORD PTR 24[rsp], 0
	call	memcpy@PLT
	mov	r8, QWORD PTR [rsp]
	xor	edx, edx
	xor	ecx, ecx
	test	r8, r8
	jle	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR 8[rbp+rcx*8]
	mov	rsi, rdx
	mov	QWORD PTR 8[rbp+rcx*8], rsi
	sal	rax, cl
	add	rcx, 1
	add	rdx, rax
	cmp	r8, rcx
	jne	.L7
.L8:
	mov	r9, QWORD PTR 8[rsp]
	add	r8, 1
	mov	r10d, 1
	test	r9, r9
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rcx, QWORD PTR 0[r13+rbx*8]
	mov	edx, r10d
	mov	rsi, r8
	sal	edx, cl
	lea	rdi, 0[rbp+rcx*8]
	sub	rsi, rcx
	mov	ecx, edx
	mov	rax, QWORD PTR [rdi]
	sar	ecx
	movsx	rcx, ecx
	add	rcx, rax
	cmp	rax, rcx
	jge	.L12
	mov	rdx, rcx
	sal	rax, 4
	sal	rdx, 4
	add	rax, r12
	add	rdx, r12
	.p2align 4,,10
	.p2align 3
.L11:
	mov	QWORD PTR 4[rax], rsi
	add	rax, 16
	mov	QWORD PTR -4[rax], rbx
	cmp	rax, rdx
	jne	.L11
.L12:
	add	rbx, 1
	mov	QWORD PTR [rdi], rcx
	cmp	rbx, r9
	jne	.L10
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR tableLog_tooLarge[rip]
	call	ERROR@PLT
	mov	r14, rax
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	HUF_readDTableX1_wksp, .-HUF_readDTableX1_wksp
	.comm	tableLog_tooLarge,4,4
	.comm	HUF_TABLELOG_ABSOLUTEMAX,8,8
	.comm	HUF_SYMBOLVALUE_MAX,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_huf_decompress.c_HUF_readDTableX1_wksp.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	HUF_readDTableX1_wksp
	.syntax unified
	.arm
	.fpu softvfp
	.type	HUF_readDTableX1_wksp, %function
HUF_readDTableX1_wksp:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r9, #0
	ldr	r10, .L22
	mov	r6, r0
	mov	r4, r1
	ldr	r0, [r10]
	ldr	r1, .L22+4
	mov	r5, r3
	ldr	r3, .L22+8
	sub	sp, sp, #44
	ldr	fp, [r1]
	add	r0, r0, #1
	mov	r1, #4
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r8, [sp, #80]
	mov	r7, r2
	str	r9, [sp, #16]
	str	r9, [sp, #20]
	bl	HUF_ALIGN
	add	fp, fp, #1
	add	r0, fp, r0, asr #2
	cmp	r8, r0, lsl #2
	bcc	.L18
	mov	r0, r9
	bl	DEBUG_STATIC_ASSERT
	ldr	r1, [r10]
	add	r3, sp, #16
	add	fp, r5, fp, lsl #2
	stmib	sp, {r4, r7}
	mov	r2, r5
	add	r1, r1, #1
	str	r3, [sp]
	mov	r0, fp
	add	r3, sp, #20
	bl	HUF_readStats
	mov	r7, r0
	bl	HUF_isError
	subs	r4, r0, #0
	beq	.L20
.L1:
	ldr	r3, .L22+8
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L21
	mov	r0, r7
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	mov	r1, r6
	add	r0, sp, #24
	bl	HUF_getDTableDesc
	ldr	r3, [sp, #32]
	ldr	r8, [sp, #16]
	add	r3, r3, #1
	cmp	r3, r8
	blt	.L18
	mov	r2, #12
	add	r1, sp, #24
	mov	r0, r6
	str	r4, [sp, #28]
	str	r8, [sp, #24]
	bl	memcpy
	cmp	r8, #0
	movgt	r1, r5
	movgt	r2, r4
	movgt	r3, r4
	ble	.L8
.L7:
	mov	r0, r2
	ldr	ip, [r1, #4]!
	add	r2, r2, ip, lsl r3
	add	r3, r3, #1
	cmp	r8, r3
	str	r0, [r1]
	bne	.L7
.L8:
	ldr	r3, [sp, #20]
	cmp	r3, #0
	ble	.L1
	mov	r10, #1
	add	r3, fp, r3, lsl #2
	sub	r9, r3, #4
	add	r8, r8, r10
	sub	lr, fp, #4
.L10:
	ldr	r0, [lr, #4]!
	ldr	r2, [r5, r0, lsl #2]
	lsl	r3, r10, r0
	add	r3, r2, r3, asr #1
	cmp	r2, r3
	sub	r1, r8, r0
	addlt	r2, r6, r2, lsl #3
	addlt	ip, r6, r3, lsl #3
	bge	.L12
.L11:
	str	r1, [r2, #4]
	str	r4, [r2, #8]!
	cmp	r2, ip
	bne	.L11
.L12:
	cmp	r9, lr
	str	r3, [r5, r0, lsl #2]
	add	r4, r4, #1
	bne	.L10
	b	.L1
.L18:
	ldr	r3, .L22+12
	ldr	r0, [r3]
	bl	ERROR
	mov	r7, r0
	b	.L1
.L21:
	bl	__stack_chk_fail
.L23:
	.align	2
.L22:
	.word	HUF_SYMBOLVALUE_MAX
	.word	HUF_TABLELOG_ABSOLUTEMAX
	.word	.LC0
	.word	tableLog_tooLarge
	.size	HUF_readDTableX1_wksp, .-HUF_readDTableX1_wksp
	.comm	tableLog_tooLarge,4,4
	.comm	HUF_TABLELOG_ABSOLUTEMAX,4,4
	.comm	HUF_SYMBOLVALUE_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
