	.file	"extr_syntax_enc.c_GeneratePartition0.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	GeneratePartition0, @function
GeneratePartition0:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	lea	rbp, 40[rdi]
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13d, DWORD PTR [rdi]
	imul	r13d, DWORD PTR 4[rdi]
	mov	rdi, rbp
	call	VP8BitWriterPos@PLT
	mov	rdi, rbp
	mov	r12d, eax
	lea	esi, 0[0+r13*8]
	mov	eax, esi
	sub	eax, r13d
	lea	esi, 7[rax]
	cmovns	esi, eax
	sar	esi, 3
	call	VP8BitWriterInit@PLT
	test	eax, eax
	je	.L16
	xor	esi, esi
	mov	rdi, rbp
	call	VP8PutBitUniform@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	VP8PutBitUniform@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	call	PutSegmentHeader@PLT
	lea	rsi, 36[rbx]
	mov	rdi, rbp
	call	PutFilterHeader@PLT
	mov	eax, DWORD PTR 8[rbx]
	mov	esi, 3
	cmp	eax, 8
	je	.L3
	mov	esi, 2
	cmp	eax, 4
	je	.L3
	xor	esi, esi
	cmp	eax, 2
	sete	sil
.L3:
	mov	edx, 2
	mov	rdi, rbp
	call	VP8PutBits@PLT
	mov	rsi, rbx
	mov	rdi, rbp
	call	PutQuant@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	VP8PutBitUniform@PLT
	lea	rsi, 32[rbx]
	mov	rdi, rbp
	call	VP8WriteProbas@PLT
	mov	rdi, rbp
	call	VP8BitWriterPos@PLT
	mov	rdi, rbx
	mov	r13d, eax
	call	VP8CodeIntraModes@PLT
	mov	rdi, rbp
	call	VP8BitWriterFinish@PLT
	mov	rdi, rbp
	call	VP8BitWriterPos@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR [rdi]
	test	rcx, rcx
	je	.L4
	sub	eax, r13d
	mov	rsi, QWORD PTR [rcx]
	mov	edx, r13d
	add	eax, 7
	sub	edx, r12d
	sar	eax, 3
	add	edx, 7
	mov	DWORD PTR 4[rsi], eax
	mov	rax, QWORD PTR 24[rbx]
	sar	edx, 3
	mov	DWORD PTR [rsi], edx
	mov	DWORD PTR 8[rcx], eax
.L4:
	cmp	QWORD PTR 40[rbx], 0
	jne	.L14
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, QWORD PTR 16[rbx]
.L14:
	mov	esi, DWORD PTR VP8_ENC_ERROR_OUT_OF_MEMORY[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	WebPEncodingSetError@PLT
	.cfi_endproc
.LFE0:
	.size	GeneratePartition0, .-GeneratePartition0
	.comm	VP8_ENC_ERROR_OUT_OF_MEMORY,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_syntax_enc.c_GeneratePartition0.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	GeneratePartition0, %function
GeneratePartition0:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r1, [r4], #28
	ldr	r6, [r0, #4]
	mov	r5, r0
	mov	r0, r4
	mul	r6, r1, r6
	bl	VP8BitWriterPos
	rsb	r1, r6, r6, lsl #3
	cmp	r1, #0
	add	r2, r1, #7
	movlt	r1, r2
	mov	r3, r0
	asr	r1, r1, #3
	mov	r0, r4
	mov	r6, r3
	bl	VP8BitWriterInit
	cmp	r0, #0
	beq	.L13
	mov	r1, #0
	mov	r0, r4
	bl	VP8PutBitUniform
	mov	r1, #0
	mov	r0, r4
	bl	VP8PutBitUniform
	mov	r1, r5
	mov	r0, r4
	bl	PutSegmentHeader
	add	r1, r5, #24
	mov	r0, r4
	bl	PutFilterHeader
	ldr	r1, [r5, #8]
	cmp	r1, #8
	moveq	r1, #3
	beq	.L3
	cmp	r1, #4
	subne	r1, r1, #2
	clzne	r1, r1
	moveq	r1, #2
	lsrne	r1, r1, #5
.L3:
	mov	r2, #2
	mov	r0, r4
	bl	VP8PutBits
	mov	r1, r5
	mov	r0, r4
	bl	PutQuant
	mov	r1, #0
	mov	r0, r4
	bl	VP8PutBitUniform
	add	r1, r5, #20
	mov	r0, r4
	bl	VP8WriteProbas
	mov	r0, r4
	bl	VP8BitWriterPos
	mov	r7, r0
	mov	r0, r5
	bl	VP8CodeIntraModes
	mov	r0, r4
	bl	VP8BitWriterFinish
	mov	r0, r4
	bl	VP8BitWriterPos
	ldr	r1, [r5, #12]
	ldr	r2, [r1]
	cmp	r2, #0
	beq	.L4
	sub	r3, r0, r7
	sub	r6, r7, r6
	ldr	ip, [r5, #16]
	ldr	r0, [r2]
	add	r6, r6, #7
	add	r3, r3, #7
	asr	r6, r6, #3
	asr	r3, r3, #3
	str	r6, [r0]
	str	r3, [r0, #4]
	str	ip, [r2, #4]
.L4:
	ldr	r3, [r5, #28]
	cmp	r3, #0
	bne	.L14
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	ldr	r3, .L15
	ldr	r0, [r5, #12]
	ldr	r1, [r3]
	pop	{r4, r5, r6, r7, r8, lr}
	b	WebPEncodingSetError
.L14:
	ldr	r3, .L15
	mov	r0, r1
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r1, [r3]
	b	WebPEncodingSetError
.L16:
	.align	2
.L15:
	.word	VP8_ENC_ERROR_OUT_OF_MEMORY
	.size	GeneratePartition0, .-GeneratePartition0
	.comm	VP8_ENC_ERROR_OUT_OF_MEMORY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
