	.file	"extr_zstd_decompress.c_decode_huf_table.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	decode_huf_table, @function
decode_huf_table:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rsi
	mov	esi, 8
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rdi
	mov	rdi, r15
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	call	IO_read_bits@PLT
	mov	rdi, rsp
	mov	r13d, eax
	movsx	rax, DWORD PTR HUF_MAX_SYMBS[rip]
	mov	rdx, rax
	lea	rax, 15[0+rax*4]
	mov	rcx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rcx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L3
.L17:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L17
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L18
.L4:
	mov	r14, rsp
	sal	edx, 2
	xor	esi, esi
	mov	rdi, r14
	call	memset@PLT
	cmp	r13d, 127
	jle	.L5
	lea	esi, -126[r13]
	lea	eax, -127[r13]
	mov	rdi, r15
	sar	esi
	mov	DWORD PTR -52[rbp], eax
	movsx	rsi, esi
	call	IO_get_read_ptr@PLT
	mov	r8d, DWORD PTR -52[rbp]
	test	r8d, r8d
	jle	.L6
	lea	edi, -1[r8]
	xor	ecx, ecx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rcx, rdx
.L9:
	mov	edx, ecx
	sar	edx
	movsx	rdx, edx
	mov	edx, DWORD PTR [rax+rdx*4]
	mov	esi, edx
	and	edx, 15
	sar	esi, 4
	test	cl, 1
	cmove	edx, esi
	mov	DWORD PTR [r14+rcx*4], edx
	lea	rdx, 1[rcx]
	cmp	rcx, rdi
	jne	.L11
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, r13d
	mov	rdi, r15
	call	IO_make_sub_istream@PLT
	mov	esi, DWORD PTR HUF_MAX_SYMBS[rip]
	mov	rdi, r14
	mov	DWORD PTR -48[rbp], eax
	call	IO_make_ostream@PLT
	lea	rdx, -52[rbp]
	lea	rsi, -48[rbp]
	lea	rdi, -44[rbp]
	mov	DWORD PTR -44[rbp], eax
	call	fse_decode_hufweights@PLT
	mov	r8d, DWORD PTR -52[rbp]
.L6:
	mov	edx, r8d
	mov	rsi, r14
	mov	rdi, r12
	call	HUF_init_dtable_usingweights@PLT
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	lea	rsp, -32[rbp]
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	decode_huf_table, .-decode_huf_table
	.comm	HUF_MAX_SYMBS,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_decompress.c_decode_huf_table.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	decode_huf_table, %function
decode_huf_table:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	mov	r7, r1
	add	fp, sp, #24
	sub	sp, sp, #20
	ldr	r3, .L12
	mov	r1, #8
	mov	r4, r0
	mov	r0, r7
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	IO_read_bits
	ldr	r8, .L12+4
	mov	r6, r0
	ldr	r2, [r8]
	mov	r1, #0
	lsl	r2, r2, #2
	add	r3, r2, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r5, sp
	mov	r0, r5
	bl	memset
	cmp	r6, #127
	ble	.L2
	sub	r1, r6, #126
	mov	r0, r7
	asr	r1, r1, #1
	sub	r6, r6, #127
	str	r6, [fp, #-44]
	bl	IO_get_read_ptr
	ldr	r2, [fp, #-44]
	cmp	r2, #0
	ble	.L3
	mov	r3, #0
	sub	ip, r5, #4
.L6:
	asr	r1, r3, #1
	ldr	r1, [r0, r1, lsl #2]
	tst	r3, #1
	add	r3, r3, #1
	asreq	r1, r1, #4
	andne	r1, r1, #15
	cmp	r3, r2
	str	r1, [ip, #4]!
	bne	.L6
.L3:
	mov	r1, r5
	mov	r0, r4
	bl	HUF_init_dtable_usingweights
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L2:
	mov	r1, r6
	mov	r0, r7
	bl	IO_make_sub_istream
	mov	r3, r0
	ldr	r1, [r8]
	mov	r0, r5
	str	r3, [fp, #-40]
	bl	IO_make_ostream
	mov	r3, r0
	sub	r2, fp, #44
	sub	r1, fp, #40
	sub	r0, fp, #36
	str	r3, [fp, #-36]
	bl	fse_decode_hufweights
	ldr	r2, [fp, #-44]
	b	.L3
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	HUF_MAX_SYMBS
	.size	decode_huf_table, .-decode_huf_table
	.comm	HUF_MAX_SYMBS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
