	.file	"extr_buffer_dec.c_CheckDecBuffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	CheckDecBuffer, @function
CheckDecBuffer:
.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
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rbp, QWORD PTR [rdi]
	mov	r12d, DWORD PTR 8[rdi]
	mov	r13d, DWORD PTR 12[rdi]
	mov	rdi, rbp
	call	IsValidColorspace@PLT
	test	eax, eax
	jne	.L16
.L2:
	mov	eax, DWORD PTR VP8_STATUS_INVALID_PARAM[rip]
	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
.L16:
	.cfi_restore_state
	mov	rdi, rbp
	call	WebPIsRGBMode@PLT
	test	eax, eax
	jne	.L3
	lea	eax, 1[r12]
	mov	r9d, DWORD PTR 116[rbx]
	mov	r8d, DWORD PTR 112[rbx]
	mov	esi, r13d
	mov	r14d, eax
	mov	ecx, DWORD PTR 108[rbx]
	mov	r10d, DWORD PTR 104[rbx]
	mov	edi, r12d
	shr	r14d, 31
	add	r14d, eax
	lea	eax, 1[r13]
	mov	r15d, eax
	sar	r14d
	shr	r15d, 31
	add	r15d, eax
	mov	eax, DWORD PTR 116[rbx]
	sar	r15d
	sar	eax, 31
	xor	r9d, eax
	sub	r9d, eax
	mov	eax, DWORD PTR 112[rbx]
	mov	edx, r9d
	mov	DWORD PTR 28[rsp], r9d
	sar	eax, 31
	xor	r8d, eax
	sub	r8d, eax
	mov	eax, DWORD PTR 108[rbx]
	mov	DWORD PTR [rsp], r8d
	sar	eax, 31
	xor	ecx, eax
	sub	ecx, eax
	mov	eax, DWORD PTR 104[rbx]
	mov	DWORD PTR 12[rsp], ecx
	sar	eax, 31
	xor	r10d, eax
	sub	r10d, eax
	mov	DWORD PTR 8[rsp], r10d
	call	MIN_BUFFER_SIZE@PLT
	mov	r8d, DWORD PTR [rsp]
	mov	esi, r15d
	mov	edi, r14d
	mov	QWORD PTR 16[rsp], rax
	mov	edx, r8d
	mov	DWORD PTR 24[rsp], r8d
	call	MIN_BUFFER_SIZE@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	esi, r15d
	mov	edi, r14d
	mov	QWORD PTR [rsp], rax
	mov	edx, ecx
	call	MIN_BUFFER_SIZE@PLT
	mov	r10d, DWORD PTR 8[rsp]
	mov	esi, r13d
	mov	edi, r12d
	mov	r15, rax
	mov	edx, r10d
	call	MIN_BUFFER_SIZE@PLT
	cmp	QWORD PTR 96[rbx], 0
	mov	r9d, DWORD PTR 28[rsp]
	mov	rdx, rax
	setne	al
	cmp	QWORD PTR 88[rbx], 0
	mov	r8d, DWORD PTR 24[rsp]
	setne	sil
	mov	ecx, DWORD PTR 12[rsp]
	mov	r11, QWORD PTR 16[rsp]
	and	eax, esi
	cmp	QWORD PTR 80[rbx], 0
	mov	r10d, DWORD PTR 8[rsp]
	setne	sil
	and	eax, esi
	cmp	r12d, r9d
	setle	sil
	and	eax, esi
	cmp	r14d, r8d
	setle	sil
	and	eax, esi
	cmp	r14d, ecx
	mov	rsi, QWORD PTR [rsp]
	setle	cl
	and	eax, ecx
	cmp	QWORD PTR 40[rbx], r11
	setge	cl
	and	eax, ecx
	cmp	QWORD PTR 48[rbx], rsi
	setge	cl
	and	eax, ecx
	cmp	QWORD PTR 56[rbx], r15
	setge	cl
	and	eax, ecx
	cmp	QWORD PTR MODE_YUVA[rip], rbp
	jne	.L14
	cmp	QWORD PTR 72[rbx], 0
	setne	cl
	cmp	r12d, r10d
	setle	sil
	and	ecx, esi
	cmp	QWORD PTR 64[rbx], rdx
	setge	dl
	and	edx, ecx
	and	eax, edx
.L14:
	movzx	eax, al
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR 32[rbx]
	mov	r14d, DWORD PTR 32[rbx]
	mov	esi, r13d
	sar	eax, 31
	xor	r14d, eax
	sub	r14d, eax
	mov	rax, QWORD PTR kModeBpp[rip]
	mov	edx, r14d
	mov	edi, DWORD PTR [rax+rbp*4]
	imul	edi, r12d
	call	MIN_BUFFER_SIZE@PLT
	mov	r8, rax
	mov	rax, QWORD PTR kModeBpp[rip]
	imul	r12d, DWORD PTR [rax+rbp*4]
	cmp	r12d, r14d
	setle	al
	cmp	QWORD PTR 24[rbx], 0
	setne	dl
	and	edx, eax
	xor	eax, eax
	cmp	QWORD PTR 16[rbx], r8
	setge	al
	and	eax, edx
.L5:
	test	eax, eax
	je	.L2
	mov	eax, DWORD PTR VP8_STATUS_OK[rip]
	add	rsp, 40
	.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
	.cfi_endproc
.LFE0:
	.size	CheckDecBuffer, .-CheckDecBuffer
	.comm	kModeBpp,8,8
	.comm	VP8_STATUS_OK,4,4
	.comm	VP8_STATUS_INVALID_PARAM,4,4
	.comm	MODE_YUVA,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_buffer_dec.c_CheckDecBuffer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	CheckDecBuffer, %function
CheckDecBuffer:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldm	r0, {r5, r6}
	mov	r4, r0
	sub	sp, sp, #20
	mov	r0, r5
	ldr	r8, [r4, #8]
	bl	IsValidColorspace
	cmp	r0, #0
	bne	.L15
.L2:
	ldr	r3, .L17
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r0, r5
	bl	WebPIsRGBMode
	cmp	r0, #0
	beq	.L16
	ldr	r9, .L17+4
	ldr	r7, [r4, #20]
	ldr	r3, [r9]
	cmp	r7, #0
	ldr	r0, [r3, r5, lsl #2]
	rsblt	r7, r7, #0
	mov	r1, r8
	mov	r2, r7
	mul	r0, r6, r0
	bl	MIN_BUFFER_SIZE
	ldr	r2, [r9]
	ldr	r3, [r4, #16]
	ldr	r2, [r2, r5, lsl #2]
	ldr	r8, [r4, #12]
	mul	r6, r2, r6
	cmp	r6, r7
	movgt	r6, #0
	movle	r6, #1
	cmp	r3, #0
	moveq	r6, #0
	cmp	r8, r0
	movlt	r8, #0
	andge	r8, r6, #1
.L5:
	cmp	r8, #0
	beq	.L2
	ldr	r3, .L17+8
	ldr	r0, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, [r4, #68]
	ldr	fp, [r4, #64]
	cmp	r3, #0
	ldr	r10, [r4, #60]
	rsblt	r3, r3, #0
	ldr	ip, [r4, #56]
	cmp	fp, #0
	rsblt	fp, fp, #0
	cmp	r10, #0
	rsblt	r10, r10, #0
	cmp	ip, #0
	rsblt	ip, ip, #0
	mov	r2, r3
	mov	r1, r8
	mov	r0, r6
	str	r3, [sp, #12]
	str	ip, [sp, #4]
	bl	MIN_BUFFER_SIZE
	mov	ip, r0
	add	r9, r8, #1
	add	r7, r6, #1
	add	r7, r7, r7, lsr #31
	add	r9, r9, r9, lsr #31
	asr	r7, r7, #1
	asr	r9, r9, #1
	mov	r1, r9
	mov	r2, fp
	mov	r0, r7
	str	ip, [sp, #8]
	bl	MIN_BUFFER_SIZE
	mov	ip, r0
	mov	r1, r9
	mov	r2, r10
	mov	r0, r7
	mov	r9, ip
	bl	MIN_BUFFER_SIZE
	mov	ip, r0
	mov	r1, r8
	ldr	r2, [sp, #4]
	mov	r0, r6
	mov	r8, ip
	bl	MIN_BUFFER_SIZE
	ldr	r2, [r4, #48]
	ldr	r1, [r4, #52]
	subs	r2, r2, #0
	movne	r2, #1
	cmp	r1, #0
	ldr	r1, [r4, #44]
	moveq	r2, #0
	cmp	r1, #0
	moveq	r2, #0
	ldr	r3, [sp, #12]
	cmp	r6, r3
	movgt	r3, #0
	andle	r3, r2, #1
	cmp	r7, fp
	movgt	fp, #0
	andle	fp, r3, #1
	cmp	r7, r10
	movgt	r7, #0
	andle	r7, fp, #1
	ldr	r2, [sp, #8]
	ldr	r10, [r4, #24]
	ldr	r3, [r4, #28]
	cmp	r10, r2
	movlt	r7, #0
	andge	r7, r7, #1
	cmp	r3, r9
	movlt	r9, #0
	andge	r9, r7, #1
	ldr	r3, .L17+12
	ldr	r2, [r4, #32]
	ldr	r3, [r3]
	cmp	r2, r8
	movlt	r8, #0
	andge	r8, r9, #1
	cmp	r3, r5
	bne	.L5
	ldr	r3, [sp, #4]
	ldr	r2, [r4, #40]
	cmp	r6, r3
	movgt	r6, #0
	movle	r6, #1
	cmp	r2, #0
	moveq	r6, #0
	ldr	r3, [r4, #36]
	cmp	r3, r0
	movlt	r0, #0
	andge	r0, r6, #1
	and	r8, r8, r0
	b	.L5
.L18:
	.align	2
.L17:
	.word	VP8_STATUS_INVALID_PARAM
	.word	kModeBpp
	.word	VP8_STATUS_OK
	.word	MODE_YUVA
	.size	CheckDecBuffer, .-CheckDecBuffer
	.comm	kModeBpp,4,4
	.comm	VP8_STATUS_OK,4,4
	.comm	VP8_STATUS_INVALID_PARAM,4,4
	.comm	MODE_YUVA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
