	.file	"extr_zstd_v04.c_ZSTDv04_findFrameSizeInfoLegacy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ZSTDv04_findFrameSizeInfoLegacy
	.type	ZSTDv04_findFrameSizeInfoLegacy, @function
ZSTDv04_findFrameSizeInfoLegacy:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR [rsp], rdx
	mov	QWORD PTR 8[rsp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR ZSTD_frameHeaderSize_min[rip], rsi
	ja	.L13
	mov	r13, rdi
	mov	r14, rsi
	call	MEM_readLE32@PLT
	cmp	rax, QWORD PTR ZSTD_MAGICNUMBER[rip]
	jne	.L15
	mov	rax, QWORD PTR ZSTD_frameHeaderSize_min[rip]
	xor	ebx, ebx
	lea	rbp, 20[rsp]
	lea	r15, 0[r13+rax*4]
	sub	r14, rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR ZSTD_blockHeaderSize[rip]
	mov	rsi, r14
	sub	rsi, rax
	lea	rdx, [r15+rax*4]
	cmp	r12, rsi
	ja	.L13
	test	r12, r12
	je	.L7
	sub	rsi, r12
	lea	r15, [rdx+r12*4]
	add	rbx, 1
	mov	r14, rsi
.L8:
	mov	rdi, r15
	mov	rdx, rbp
	mov	rsi, r14
	call	ZSTD_getcBlockSize@PLT
	mov	rdi, rax
	mov	r12, rax
	call	ZSTD_isError@PLT
	test	rax, rax
	je	.L5
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rsp]
	mov	rdx, r12
	call	ZSTD_errorFrameSizeInfoLegacy@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR prefix_unknown[rip]
.L12:
	call	ERROR@PLT
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rsp]
	mov	rdx, rax
	call	ZSTD_errorFrameSizeInfoLegacy@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L13:
	.cfi_restore_state
	mov	edi, DWORD PTR srcSize_wrong[rip]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rax, QWORD PTR [rsp]
	sub	rdx, r13
	sar	rdx, 2
	mov	QWORD PTR [rax], rdx
	imul	rbx, QWORD PTR BLOCKSIZE[rip]
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR [rax], rbx
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ZSTDv04_findFrameSizeInfoLegacy, .-ZSTDv04_findFrameSizeInfoLegacy
	.comm	srcSize_wrong,4,4
	.comm	prefix_unknown,4,4
	.comm	ZSTD_frameHeaderSize_min,8,8
	.comm	ZSTD_blockHeaderSize,8,8
	.comm	ZSTD_MAGICNUMBER,8,8
	.comm	BLOCKSIZE,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_zstd_v04.c_ZSTDv04_findFrameSizeInfoLegacy.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ZSTDv04_findFrameSizeInfoLegacy
	.syntax unified
	.arm
	.fpu softvfp
	.type	ZSTDv04_findFrameSizeInfoLegacy, %function
ZSTDv04_findFrameSizeInfoLegacy:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r5, .L17
	mov	r9, r2
	ldr	r2, [r5]
	mov	r8, r3
	ldr	r3, .L17+4
	sub	sp, sp, #12
	cmp	r2, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bhi	.L13
	mov	r4, r1
	mov	r10, r0
	bl	MEM_readLE32
	ldr	r3, .L17+8
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L15
	ldr	r6, [r5]
	mov	r7, #0
	sub	r4, r4, r6
	ldr	fp, .L17+12
	add	r6, r10, r6, lsl #2
	b	.L8
.L5:
	ldr	r3, [fp]
	sub	r4, r4, r3
	cmp	r5, r4
	add	r6, r6, r3, lsl #2
	bhi	.L13
	cmp	r5, #0
	beq	.L7
	add	r6, r6, r5, lsl #2
	sub	r4, r4, r5
	add	r7, r7, #1
.L8:
	mov	r2, sp
	mov	r1, r4
	mov	r0, r6
	bl	ZSTD_getcBlockSize
	mov	r5, r0
	bl	ZSTD_isError
	cmp	r0, #0
	beq	.L5
	mov	r2, r5
	mov	r1, r8
	mov	r0, r9
	bl	ZSTD_errorFrameSizeInfoLegacy
	b	.L1
.L15:
	ldr	r3, .L17+16
.L12:
	ldr	r0, [r3]
	bl	ERROR
	mov	r1, r8
	mov	r2, r0
	mov	r0, r9
	bl	ZSTD_errorFrameSizeInfoLegacy
.L1:
	ldr	r3, .L17+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r3, .L17+20
	b	.L12
.L7:
	sub	r6, r6, r10
	ldr	r3, .L17+24
	asr	r6, r6, #2
	str	r6, [r9]
	ldr	r3, [r3]
	str	r5, [r8, #4]
	mul	r7, r3, r7
	str	r7, [r8]
	b	.L1
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	ZSTD_frameHeaderSize_min
	.word	.LC0
	.word	ZSTD_MAGICNUMBER
	.word	ZSTD_blockHeaderSize
	.word	prefix_unknown
	.word	srcSize_wrong
	.word	BLOCKSIZE
	.size	ZSTDv04_findFrameSizeInfoLegacy, .-ZSTDv04_findFrameSizeInfoLegacy
	.comm	srcSize_wrong,4,4
	.comm	prefix_unknown,4,4
	.comm	ZSTD_frameHeaderSize_min,4,4
	.comm	ZSTD_blockHeaderSize,4,4
	.comm	ZSTD_MAGICNUMBER,4,4
	.comm	BLOCKSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
