	.file	"extr_zstd_v05.c_ZSTDv05_decodeSeqHeaders.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ZSTDv05_decodeSeqHeaders, @function
ZSTDv05_decodeSeqHeaders:
.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
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, r8
	push	r13
	push	r12
	push	rbx
	sub	rsp, 88
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	r8, QWORD PTR 24[rbp]
	mov	rbx, QWORD PTR 16[rbp]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR MIN_SEQUENCES_SIZE[rip], r8
	ja	.L43
	mov	r12, rcx
	mov	ecx, DWORD PTR [rbx]
	mov	eax, 1
	mov	DWORD PTR [rdi], ecx
	test	ecx, ecx
	je	.L1
	mov	r13, r9
	lea	r9, [rbx+r8*4]
	lea	r8, 4[rbx]
	cmp	ecx, 127
	jle	.L4
	cmp	r9, r8
	jbe	.L43
	add	ecx, -128
	lea	r8, 8[rbx]
	sal	ecx, 8
	add	ecx, DWORD PTR 4[rbx]
	mov	DWORD PTR [rdi], ecx
.L4:
	cmp	r8, r9
	jnb	.L43
	mov	ecx, DWORD PTR [r8]
	test	cl, 2
	jne	.L45
	lea	rdi, 8[r8]
	cmp	rdi, r9
	ja	.L43
	mov	eax, ecx
	movsx	r8, DWORD PTR 4[r8]
	sal	eax, 8
	and	eax, 256
	cdqe
	add	rax, r8
.L9:
	mov	QWORD PTR [rsi], rdi
	lea	r10, [rdi+rax*4]
	mov	QWORD PTR [rdx], rax
	lea	rax, -12[r9]
	cmp	r10, rax
	ja	.L43
	mov	eax, DWORD PTR MaxML[rip]
	mov	rsi, rsp
	mov	QWORD PTR -88[rbp], rsp
	add	eax, 1
	lea	rax, 15[0+rax*4]
	shr	rax, 4
	sal	rax, 4
	mov	rdx, rax
	and	rdx, -4096
	sub	rsi, rdx
	mov	rdx, rsi
	cmp	rsp, rdx
	je	.L12
.L46:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rdx
	jne	.L46
.L12:
	and	eax, 4095
	sub	rsp, rax
	test	rax, rax
	jne	.L47
.L13:
	sar	ecx, 6
	mov	r15, rsp
	cmp	ecx, 129
	je	.L14
	cmp	ecx, 130
	je	.L15
	cmp	ecx, 128
	je	.L48
	mov	r8, r9
	lea	r11, -60[rbp]
	mov	eax, DWORD PTR MaxLL[rip]
	mov	rcx, r10
	sub	r8, r10
	lea	rdx, -72[rbp]
	mov	rsi, r11
	mov	rdi, r15
	sar	r8, 2
	mov	QWORD PTR -120[rbp], r9
	mov	QWORD PTR -112[rbp], r10
	mov	QWORD PTR -104[rbp], r11
	mov	DWORD PTR -60[rbp], eax
	call	FSEv05_readNCount@PLT
	mov	rdi, rax
	mov	QWORD PTR -96[rbp], rax
	call	FSEv05_isError@PLT
	mov	rdx, QWORD PTR -96[rbp]
	mov	r11, QWORD PTR -104[rbp]
	test	eax, eax
	mov	r10, QWORD PTR -112[rbp]
	mov	r9, QWORD PTR -120[rbp]
	jne	.L41
	mov	ecx, DWORD PTR -72[rbp]
	cmp	ecx, DWORD PTR LLFSEv05Log[rip]
	ja	.L40
	lea	r10, [r10+rdx*4]
	mov	edx, DWORD PTR -60[rbp]
	mov	rsi, r15
	mov	rdi, r12
	mov	QWORD PTR -112[rbp], r11
	mov	QWORD PTR -104[rbp], r9
	mov	QWORD PTR -96[rbp], r10
	call	FSEv05_buildDTable@PLT
	mov	r11, QWORD PTR -112[rbp]
	mov	r9, QWORD PTR -104[rbp]
	mov	r10, QWORD PTR -96[rbp]
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r8, r9
	mov	eax, DWORD PTR MaxOff[rip]
	mov	rcx, r10
	mov	rsi, r11
	sub	r8, r10
	lea	rdx, -68[rbp]
	mov	rdi, r15
	mov	QWORD PTR -112[rbp], r9
	sar	r8, 2
	mov	QWORD PTR -104[rbp], r10
	mov	QWORD PTR -96[rbp], r11
	mov	DWORD PTR -60[rbp], eax
	call	FSEv05_readNCount@PLT
	mov	rdi, rax
	mov	r12, rax
	call	FSEv05_isError@PLT
	mov	r11, QWORD PTR -96[rbp]
	mov	r10, QWORD PTR -104[rbp]
	test	eax, eax
	mov	r9, QWORD PTR -112[rbp]
	jne	.L41
	mov	ecx, DWORD PTR -68[rbp]
	cmp	ecx, DWORD PTR OffFSEv05Log[rip]
	ja	.L40
	mov	edx, DWORD PTR -60[rbp]
	mov	rdi, r13
	mov	rsi, r15
	lea	r12, [r10+r12*4]
	mov	QWORD PTR -104[rbp], r11
	mov	QWORD PTR -96[rbp], r9
	call	FSEv05_buildDTable@PLT
	mov	r9, QWORD PTR -96[rbp]
	mov	r11, QWORD PTR -104[rbp]
	mov	rdi, r15
	mov	eax, DWORD PTR MaxML[rip]
	lea	rdx, -64[rbp]
	mov	rcx, r12
	sub	r9, r12
	mov	rsi, r11
	mov	r8, r9
	mov	DWORD PTR -60[rbp], eax
	sar	r8, 2
	call	FSEv05_readNCount@PLT
	mov	rdi, rax
	mov	r13, rax
	call	FSEv05_isError@PLT
	test	eax, eax
	jne	.L41
	mov	ecx, DWORD PTR -64[rbp]
	cmp	ecx, DWORD PTR MLFSEv05Log[rip]
	ja	.L40
	mov	edx, DWORD PTR -60[rbp]
	lea	r12, [r12+r13*4]
	mov	rsi, r15
	mov	rdi, r14
	call	FSEv05_buildDTable@PLT
	mov	rax, r12
	mov	rsp, QWORD PTR -88[rbp]
	sub	rax, rbx
	sar	rax, 2
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rbx, QWORD PTR -56[rbp]
	xor	rbx, QWORD PTR fs:40
	jne	.L49
	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
	.p2align 4,,10
	.p2align 3
.L43:
	.cfi_restore_state
	mov	edi, DWORD PTR srcSize_wrong[rip]
	call	ERROR@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L45:
	lea	rdi, 12[r8]
	cmp	rdi, r9
	ja	.L43
	mov	eax, DWORD PTR 4[r8]
	movsx	r10, DWORD PTR 8[r8]
	sal	eax, 8
	cdqe
	add	rax, r10
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L41:
	mov	edi, DWORD PTR GENERIC[rip]
	call	ERROR@PLT
.L19:
	mov	rsp, QWORD PTR -88[rbp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L48:
	mov	eax, DWORD PTR 32[rbp]
	lea	r11, -60[rbp]
	test	eax, eax
	jne	.L18
	.p2align 4,,10
	.p2align 3
.L40:
	mov	edi, DWORD PTR corruption_detected[rip]
	call	ERROR@PLT
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, DWORD PTR LLbits[rip]
	mov	rdi, r12
	mov	QWORD PTR -104[rbp], r9
	mov	QWORD PTR -96[rbp], r10
	mov	DWORD PTR -72[rbp], esi
	call	FSEv05_buildDTable_raw@PLT
	mov	r10, QWORD PTR -96[rbp]
	mov	r9, QWORD PTR -104[rbp]
	lea	r11, -60[rbp]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L14:
	mov	DWORD PTR -72[rbp], 0
	mov	esi, DWORD PTR [r10]
	lea	rax, 4[r10]
	mov	rdi, r12
	mov	QWORD PTR -104[rbp], r9
	mov	QWORD PTR -96[rbp], rax
	call	FSEv05_buildDTable_rle@PLT
	mov	r10, QWORD PTR -96[rbp]
	mov	r9, QWORD PTR -104[rbp]
	lea	r11, -60[rbp]
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L47:
	or	QWORD PTR -8[rsp+rax], 0
	jmp	.L13
.L49:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ZSTDv05_decodeSeqHeaders, .-ZSTDv05_decodeSeqHeaders
	.comm	srcSize_wrong,4,4
	.comm	corruption_detected,4,4
	.comm	Offbits,4,4
	.comm	OffFSEv05Log,4,4
	.comm	MaxOff,4,4
	.comm	MaxML,4,4
	.comm	MaxLL,4,4
	.comm	MLbits,4,4
	.comm	MLFSEv05Log,4,4
	.comm	MIN_SEQUENCES_SIZE,8,8
	.comm	LLbits,4,4
	.comm	LLFSEv05Log,4,4
	.comm	GENERIC,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_ZSTDv05_decodeSeqHeaders.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ZSTDv05_decodeSeqHeaders, %function
ZSTDv05_decodeSeqHeaders:
	@ args = 20, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #52
	ldr	ip, .L42
	ldr	r5, [fp, #16]
	ldr	ip, [ip]
	mov	r7, r3
	ldr	r3, .L42+4
	cmp	ip, r5
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r9, [fp, #4]
	ldr	r8, [fp, #8]
	ldr	r6, [fp, #12]
	bhi	.L37
	ldr	r3, [r6]
	cmp	r3, #0
	str	r3, [r0]
	moveq	r0, #1
	beq	.L1
	cmp	r3, #127
	add	r5, r6, r5, lsl #2
	add	ip, r6, #4
	ble	.L4
	cmp	r5, ip
	bls	.L37
	ldr	ip, [r6, #4]
	sub	r3, r3, #128
	add	r3, ip, r3, lsl #8
	str	r3, [r0]
	add	ip, r6, #8
.L4:
	cmp	ip, r5
	bcs	.L37
	ldr	r3, [ip]
	tst	r3, #2
	bne	.L39
	add	lr, ip, #8
	cmp	lr, r5
	bhi	.L37
	ldr	ip, [ip, #4]
	lsl	r0, r3, #8
	and	r0, r0, #256
	add	r0, r0, ip
.L9:
	str	lr, [r1]
	add	r4, lr, r0, lsl #2
	sub	r1, r5, #12
	cmp	r4, r1
	str	r0, [r2]
	bhi	.L37
	ldr	r2, .L42+8
	asr	r3, r3, #6
	ldr	r2, [r2]
	str	sp, [fp, #-68]
	lsl	r2, r2, #2
	add	r2, r2, #11
	bic	r2, r2, #7
	sub	sp, sp, r2
	cmp	r3, #129
	add	r10, sp, #8
	beq	.L11
	cmp	r3, #130
	beq	.L12
	cmp	r3, #128
	beq	.L40
	ldr	r2, .L42+12
	sub	r3, r5, r4
	ldr	r2, [r2]
	sub	r1, fp, #44
	asr	r3, r3, #2
	str	r1, [fp, #-64]
	str	r2, [fp, #-44]
	mov	r0, r10
	str	r3, [sp]
	sub	r2, fp, #56
	mov	r3, r4
	bl	FSEv05_readNCount
	str	r0, [fp, #-72]
	bl	FSEv05_isError
	cmp	r0, #0
	bne	.L35
	ldr	r2, .L42+16
	ldr	r3, [fp, #-56]
	ldr	r2, [r2]
	cmp	r3, r2
	bhi	.L34
	ldr	ip, [fp, #-72]
	mov	r0, r7
	mov	r1, r10
	ldr	r2, [fp, #-44]
	add	r4, r4, ip, lsl #2
	bl	FSEv05_buildDTable
	b	.L15
.L12:
	ldr	r3, .L42+20
	mov	r0, r7
	ldr	r1, [r3]
	sub	r3, fp, #44
	str	r3, [fp, #-64]
	str	r1, [fp, #-56]
	bl	FSEv05_buildDTable_raw
.L15:
	ldr	r3, .L42+24
	sub	r2, r5, r4
	ldr	r3, [r3]
	asr	r2, r2, #2
	str	r3, [fp, #-44]
	str	r2, [sp]
	mov	r3, r4
	ldr	r1, [fp, #-64]
	sub	r2, fp, #52
	mov	r0, r10
	bl	FSEv05_readNCount
	mov	r7, r0
	bl	FSEv05_isError
	cmp	r0, #0
	bne	.L35
	ldr	r2, .L42+28
	ldr	r3, [fp, #-52]
	ldr	r2, [r2]
	cmp	r3, r2
	bhi	.L34
	mov	r1, r10
	ldr	r2, [fp, #-44]
	mov	r0, r8
	bl	FSEv05_buildDTable
	ldr	r3, .L42+8
	add	r4, r4, r7, lsl #2
	ldr	r3, [r3]
	sub	r5, r5, r4
	asr	r5, r5, #2
	ldr	r1, [fp, #-64]
	str	r3, [fp, #-44]
	sub	r2, fp, #48
	mov	r3, r4
	mov	r0, r10
	str	r5, [sp]
	bl	FSEv05_readNCount
	mov	r7, r0
	bl	FSEv05_isError
	cmp	r0, #0
	bne	.L35
	ldr	r2, .L42+32
	ldr	r3, [fp, #-48]
	ldr	r2, [r2]
	cmp	r3, r2
	bhi	.L34
	mov	r1, r10
	mov	r0, r9
	ldr	r2, [fp, #-44]
	add	r4, r4, r7, lsl #2
	bl	FSEv05_buildDTable
	sub	r0, r4, r6
	ldr	sp, [fp, #-68]
	asr	r0, r0, #2
.L1:
	ldr	r3, .L42+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L41
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L37:
	ldr	r3, .L42+36
	ldr	r0, [r3]
	bl	ERROR
	b	.L1
.L39:
	add	lr, ip, #12
	cmp	lr, r5
	bhi	.L37
	ldr	r0, [ip, #8]
	ldr	ip, [ip, #4]
	add	r0, r0, ip, lsl #8
	b	.L9
.L35:
	ldr	r3, .L42+40
	ldr	r0, [r3]
	bl	ERROR
.L16:
	ldr	sp, [fp, #-68]
	b	.L1
.L40:
	ldr	r3, [fp, #20]
	cmp	r3, #0
	subne	r3, fp, #44
	strne	r3, [fp, #-64]
	bne	.L15
.L34:
	ldr	r3, .L42+44
	ldr	r0, [r3]
	bl	ERROR
	b	.L16
.L11:
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r0, r7
	ldr	r1, [r4], #4
	bl	FSEv05_buildDTable_rle
	sub	r3, fp, #44
	str	r3, [fp, #-64]
	b	.L15
.L41:
	bl	__stack_chk_fail
.L43:
	.align	2
.L42:
	.word	MIN_SEQUENCES_SIZE
	.word	.LC0
	.word	MaxML
	.word	MaxLL
	.word	LLFSEv05Log
	.word	LLbits
	.word	MaxOff
	.word	OffFSEv05Log
	.word	MLFSEv05Log
	.word	srcSize_wrong
	.word	GENERIC
	.word	corruption_detected
	.size	ZSTDv05_decodeSeqHeaders, .-ZSTDv05_decodeSeqHeaders
	.comm	srcSize_wrong,4,4
	.comm	corruption_detected,4,4
	.comm	Offbits,4,4
	.comm	OffFSEv05Log,4,4
	.comm	MaxOff,4,4
	.comm	MaxML,4,4
	.comm	MaxLL,4,4
	.comm	MLbits,4,4
	.comm	MLFSEv05Log,4,4
	.comm	MIN_SEQUENCES_SIZE,4,4
	.comm	LLbits,4,4
	.comm	LLFSEv05Log,4,4
	.comm	GENERIC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
