	.file	"extr_zstd_decompress.c_FSE_decode_header.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"FSE accuracy too large"
	.text
	.p2align 4
	.type	FSE_decode_header, @function
FSE_decode_header:
.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
	push	r14
	push	r13
	push	r12
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12, rsi
	push	rbx
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 40
	mov	QWORD PTR -80[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR FSE_MAX_ACCURACY_LOG[rip], edx
	jl	.L34
.L2:
	mov	esi, 4
	mov	rdi, r12
	call	IO_read_bits@PLT
	add	eax, 5
	mov	DWORD PTR -72[rbp], eax
	cmp	ebx, eax
	jl	.L35
.L3:
	movsx	rdx, DWORD PTR FSE_MAX_SYMBS[rip]
	movzx	ecx, BYTE PTR -72[rbp]
	mov	ebx, 1
	mov	rdi, rsp
	mov	rax, rdx
	lea	rdx, 15[0+rdx*8]
	sal	ebx, cl
	mov	rcx, rdx
	and	rdx, -4096
	movsx	rbx, ebx
	sub	rdi, rdx
	and	rcx, -16
	mov	rdx, rdi
	cmp	rsp, rdx
	je	.L5
.L36:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L36
.L5:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L37
.L6:
	mov	r13, rsp
	xor	r15d, r15d
	test	rbx, rbx
	jg	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, eax
	sub	edx, ecx
	cmp	eax, esi
	cmovg	eax, edx
.L10:
	cdqe
	sub	rax, 1
	mov	rsi, rax
	sar	rsi, 63
	mov	rcx, rsi
	xor	rcx, rax
	sub	rcx, rsi
	sub	rbx, rcx
	movsx	rcx, r15d
	add	r15d, 1
	mov	QWORD PTR 0[r13+rcx*8], rax
	test	rax, rax
	je	.L32
.L11:
	test	rbx, rbx
	jle	.L8
	mov	eax, DWORD PTR FSE_MAX_SYMBS[rip]
.L7:
	cmp	eax, r15d
	jle	.L38
	lea	rdi, 1[rbx]
	call	highest_set_bit@PLT
	mov	rdi, r12
	lea	r14d, 1[rax]
	mov	DWORD PTR -68[rbp], eax
	mov	esi, r14d
	call	IO_read_bits@PLT
	mov	ecx, DWORD PTR -68[rbp]
	mov	esi, 1
	mov	edx, 1
	mov	r8d, eax
	sal	esi, cl
	mov	ecx, r14d
	sal	edx, cl
	sub	esi, 1
	mov	ecx, edx
	and	r8d, esi
	sub	ecx, ebx
	sub	ecx, 2
	cmp	r8d, ecx
	jge	.L9
	mov	esi, 1
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r8d
	call	IO_rewind_bits@PLT
	mov	r8d, DWORD PTR -68[rbp]
	mov	eax, r8d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L14:
	cmp	eax, 3
	jne	.L11
.L32:
	mov	esi, 2
	mov	rdi, r12
	call	IO_read_bits@PLT
	test	eax, eax
	jle	.L11
	movsx	rcx, r15d
	mov	esi, DWORD PTR FSE_MAX_SYMBS[rip]
	lea	edi, [r15+rax]
	lea	rcx, 0[r13+rcx*8]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	add	r15d, 1
	mov	QWORD PTR [rcx], 0
	add	rcx, 8
	cmp	r15d, edi
	je	.L14
.L13:
	cmp	esi, r15d
	jg	.L15
	cmp	eax, 3
	je	.L32
	jmp	.L11
.L8:
	mov	rdi, r12
	call	IO_align_stream@PLT
	test	rbx, rbx
	jne	.L20
	cmp	DWORD PTR FSE_MAX_SYMBS[rip], r15d
	jg	.L21
.L20:
	xor	eax, eax
	call	CORRUPTION@PLT
.L21:
	mov	ecx, DWORD PTR -72[rbp]
	mov	rdi, QWORD PTR -80[rbp]
	mov	edx, r15d
	mov	rsi, r13
	call	FSE_init_dtable@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L39
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L38:
	.cfi_restore_state
	mov	rdi, r12
	call	IO_align_stream@PLT
	jmp	.L20
.L35:
	lea	rdi, .LC0[rip]
	call	ERROR@PLT
	jmp	.L3
.L34:
	lea	rdi, .LC0[rip]
	call	ERROR@PLT
	jmp	.L2
.L37:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L6
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	FSE_decode_header, .-FSE_decode_header
	.comm	FSE_MAX_SYMBS,4,4
	.comm	FSE_MAX_ACCURACY_LOG,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_FSE_decode_header.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"FSE accuracy too large\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FSE_decode_header, %function
FSE_decode_header:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #28
	ldr	r3, .L34
	str	r0, [fp, #-60]
	ldr	r3, [r3]
	mov	r4, r2
	cmp	r3, r2
	ldr	r3, .L34+4
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	blt	.L30
.L2:
	mov	r1, #4
	mov	r0, r7
	bl	IO_read_bits
	add	r3, r0, #5
	cmp	r4, r3
	str	r3, [fp, #-56]
	blt	.L31
.L3:
	mov	r6, #1
	mov	r4, #0
	ldr	r3, [fp, #-56]
	ldr	r8, .L34+8
	lsl	r6, r6, r3
	ldr	r3, [r8]
	cmp	r6, #0
	lsl	r2, r3, #2
	add	r2, r2, #7
	bic	r2, r2, #7
	sub	sp, sp, r2
	mov	r9, sp
	movgt	r5, r4
	bgt	.L4
	b	.L5
.L6:
	cmp	r0, r10
	subgt	r0, r0, r1
.L7:
	sub	r0, r0, #1
	eor	r3, r0, r0, asr #31
	sub	r3, r3, r0, asr #31
	cmp	r0, #0
	str	r0, [r9, r4, lsl #2]
	sub	r6, r6, r3
	add	r4, r4, #1
	beq	.L28
.L8:
	cmp	r6, #0
	ble	.L5
	ldr	r3, [r8]
.L4:
	cmp	r4, r3
	bge	.L32
	add	r3, r6, #1
	mov	r0, r3
	str	r3, [fp, #-52]
	bl	highest_set_bit
	add	r1, r0, #1
	mov	r10, r0
	mov	r0, r7
	str	r1, [fp, #-48]
	bl	IO_read_bits
	mov	ip, #1
	ldr	r3, [fp, #-52]
	ldr	r1, [fp, #-48]
	mvn	r3, r3
	lsl	r10, ip, r10
	sub	r10, r10, #1
	add	r1, r3, ip, lsl r1
	and	r2, r0, r10
	cmp	r2, r1
	bge	.L6
	mov	r1, ip
	mov	r0, r7
	str	r2, [fp, #-48]
	bl	IO_rewind_bits
	ldr	r2, [fp, #-48]
	mov	r0, r2
	b	.L7
.L11:
	cmp	r0, #3
	bne	.L8
.L28:
	mov	r1, #2
	mov	r0, r7
	bl	IO_read_bits
	cmp	r0, #0
	ble	.L8
	add	r3, r9, r4, lsl #2
	ldr	r2, [r8]
	sub	r3, r3, #4
	add	r1, r0, r4
	b	.L10
.L12:
	add	r4, r4, #1
	cmp	r4, r1
	str	r5, [r3, #4]!
	beq	.L11
.L10:
	cmp	r2, r4
	bgt	.L12
	cmp	r0, #3
	beq	.L28
	b	.L8
.L5:
	mov	r0, r7
	bl	IO_align_stream
	cmp	r6, #0
	bne	.L17
	ldr	r3, [r8]
	cmp	r3, r4
	ble	.L17
.L18:
	mov	r2, r4
	ldr	r3, [fp, #-56]
	mov	r1, r9
	ldr	r0, [fp, #-60]
	bl	FSE_init_dtable
	ldr	r3, .L34+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L33
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	mov	r0, r7
	bl	IO_align_stream
.L17:
	bl	CORRUPTION
	b	.L18
.L30:
	ldr	r0, .L34+12
	bl	ERROR
	b	.L2
.L31:
	ldr	r0, .L34+12
	bl	ERROR
	b	.L3
.L33:
	bl	__stack_chk_fail
.L35:
	.align	2
.L34:
	.word	FSE_MAX_ACCURACY_LOG
	.word	.LC1
	.word	FSE_MAX_SYMBS
	.word	.LC0
	.size	FSE_decode_header, .-FSE_decode_header
	.comm	FSE_MAX_SYMBS,4,4
	.comm	FSE_MAX_ACCURACY_LOG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
