	.file	"extr_gd_gif_out.c_GIFEncode.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"GIF87a"
.LC1:
	.string	"GIF89a"
	.text
	.p2align 4
	.type	GIFEncode, @function
GIFEncode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	xor	esi, esi
	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
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edx
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	DWORD PTR 24[rsp], r8d
	lea	rdi, 32[rsp]
	mov	r12, QWORD PTR 168[rsp]
	mov	DWORD PTR 8[rsp], r9d
	mov	r13, QWORD PTR 176[rsp]
	mov	DWORD PTR 12[rsp], ecx
	mov	r14, QWORD PTR 184[rsp]
	mov	rdx, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rdx
	xor	edx, edx
	mov	edx, 48
	mov	QWORD PTR 16[rsp], rdi
	call	memset@PLT
	mov	ecx, DWORD PTR 12[rsp]
	movsx	rdx, ebx
	mov	DWORD PTR 44[rsp], ebx
	mov	eax, 1
	mov	edi, 2
	mov	esi, 6
	mov	DWORD PTR 36[rsp], 1
	mov	DWORD PTR 32[rsp], ecx
	movzx	ecx, BYTE PTR 160[rsp]
	mov	DWORD PTR 40[rsp], r15d
	mov	QWORD PTR 72[rsp], 0
	sal	eax, cl
	mov	DWORD PTR 28[rsp], eax
	movsx	rax, r15d
	mov	QWORD PTR 56[rsp], 0
	imul	rax, rdx
	mov	edx, DWORD PTR 8[rsp]
	cmp	DWORD PTR 160[rsp], 2
	cmovge	edi, DWORD PTR 160[rsp]
	mov	QWORD PTR 64[rsp], 0
	test	edx, edx
	mov	edx, ebp
	mov	QWORD PTR 48[rsp], rax
	lea	rax, .LC1[rip]
	mov	DWORD PTR 12[rsp], edi
	lea	rdi, .LC0[rip]
	cmovns	rdi, rax
	call	gdPutBuf@PLT
	mov	esi, ebp
	mov	edi, r15d
	call	gifPutWord@PLT
	mov	edi, ebx
	mov	esi, ebp
	call	gifPutWord@PLT
	mov	eax, DWORD PTR 160[rsp]
	mov	esi, ebp
	lea	ebx, -1[rax]
	mov	edi, ebx
	sal	edi, 5
	or	edi, ebx
	or	dil, -128
	movsx	edi, dil
	call	gdPutC@PLT
	movsx	edi, BYTE PTR 24[rsp]
	mov	esi, ebp
	call	gdPutC@PLT
	mov	esi, ebp
	xor	edi, edi
	call	gdPutC@PLT
	mov	ecx, DWORD PTR 28[rsp]
	test	ecx, ecx
	jle	.L3
	lea	r15d, -1[rcx]
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L4:
	movsx	edi, BYTE PTR [r12+rbx*4]
	mov	esi, ebp
	call	gdPutC@PLT
	movsx	edi, BYTE PTR 0[r13+rbx*4]
	mov	esi, ebp
	call	gdPutC@PLT
	movsx	edi, BYTE PTR [r14+rbx*4]
	mov	esi, ebp
	call	gdPutC@PLT
	mov	rax, rbx
	add	rbx, 1
	cmp	r15, rax
	jne	.L4
.L3:
	mov	ebx, DWORD PTR 8[rsp]
	test	ebx, ebx
	js	.L5
	mov	esi, ebp
	mov	edi, 33
	call	gdPutC@PLT
	mov	esi, ebp
	mov	edi, -7
	call	gdPutC@PLT
	mov	esi, ebp
	mov	edi, 4
	call	gdPutC@PLT
	mov	esi, ebp
	mov	edi, 1
	call	gdPutC@PLT
	mov	esi, ebp
	xor	edi, edi
	call	gdPutC@PLT
	mov	esi, ebp
	xor	edi, edi
	call	gdPutC@PLT
	movsx	edi, bl
	mov	esi, ebp
	call	gdPutC@PLT
	mov	esi, ebp
	xor	edi, edi
	call	gdPutC@PLT
.L5:
	mov	esi, ebp
	mov	edi, 44
	call	gdPutC@PLT
	mov	esi, ebp
	xor	edi, edi
	call	gifPutWord@PLT
	mov	esi, ebp
	xor	edi, edi
	call	gifPutWord@PLT
	mov	edi, DWORD PTR 40[rsp]
	mov	esi, ebp
	call	gifPutWord@PLT
	mov	edi, DWORD PTR 44[rsp]
	mov	esi, ebp
	call	gifPutWord@PLT
	mov	eax, DWORD PTR 32[rsp]
	mov	esi, ebp
	test	eax, eax
	je	.L6
	mov	edi, 64
	call	gdPutC@PLT
.L7:
	mov	ebx, DWORD PTR 12[rsp]
	mov	esi, ebp
	movsx	edi, bl
	call	gdPutC@PLT
	mov	rcx, QWORD PTR 16[rsp]
	mov	edi, ebx
	mov	esi, ebp
	mov	edx, DWORD PTR 192[rsp]
	add	edi, 1
	call	compress@PLT
	xor	edi, edi
	mov	esi, ebp
	call	gdPutC@PLT
	mov	esi, ebp
	mov	edi, 59
	call	gdPutC@PLT
	mov	rax, QWORD PTR 88[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 104
	.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
.L6:
	.cfi_restore_state
	xor	edi, edi
	call	gdPutC@PLT
	jmp	.L7
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	GIFEncode, .-GIFEncode
	.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_gd_gif_out.c_GIFEncode.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"GIF87a\000"
	.align	2
.LC1:
	.ascii	"GIF89a\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	GIFEncode, %function
GIFEncode:
	@ args = 28, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r1
	mov	r7, r2
	mov	r5, #0
	mov	r4, r0
	mov	r10, #1
	sub	sp, sp, #52
	mul	ip, r2, r1
	ldr	r9, [sp, #96]
	ldr	lr, [sp, #92]
	str	r3, [sp, #12]
	ldr	r3, .L14
	cmp	r9, #2
	ldr	r1, .L14+4
	str	r8, [sp, #20]
	str	r7, [sp, #24]
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	movge	fp, r9
	ldr	r3, [sp, #100]
	str	ip, [sp, #28]
	movlt	fp, #2
	ldr	ip, [sp, #108]
	cmp	lr, r5
	mov	r2, r4
	ldr	r0, .L14+8
	movge	r0, r1
	mov	r1, #6
	str	ip, [sp, #4]
	str	r3, [sp]
	str	r10, [sp, #16]
	ldr	r6, [sp, #104]
	str	r5, [sp, #40]
	str	r5, [sp, #32]
	str	r5, [sp, #36]
	bl	gdPutBuf
	mov	r1, r4
	mov	r0, r8
	bl	gifPutWord
	mov	r1, r4
	mov	r0, r7
	bl	gifPutWord
	sub	r0, r9, #1
	orr	r0, r0, r0, lsl #5
	orr	r0, r0, #128
	mov	r1, r4
	and	r0, r0, #255
	bl	gdPutC
	ldr	r3, [sp, #88]
	mov	r1, r4
	and	r0, r3, #255
	bl	gdPutC
	lsl	r10, r10, r9
	mov	r1, r4
	mov	r0, r5
	bl	gdPutC
	cmp	r10, r5
	ble	.L3
	mov	r3, #4
	ldr	r2, [sp]
	ldr	ip, [sp, #4]
	sub	r5, r2, #4
	sub	r6, r6, #4
	sub	r7, ip, #4
	add	r9, r5, r3, lsl r9
.L4:
	ldr	r0, [r5, #4]!
	mov	r1, r4
	and	r0, r0, #255
	bl	gdPutC
	ldr	r0, [r6, #4]!
	mov	r1, r4
	and	r0, r0, #255
	bl	gdPutC
	ldr	r0, [r7, #4]!
	mov	r1, r4
	and	r0, r0, #255
	bl	gdPutC
	cmp	r5, r9
	bne	.L4
.L3:
	ldr	r3, [sp, #92]
	cmp	r3, #0
	blt	.L5
	mov	r1, r4
	mov	r0, #33
	bl	gdPutC
	mov	r1, r4
	mov	r0, #249
	bl	gdPutC
	mov	r1, r4
	mov	r0, #4
	bl	gdPutC
	mov	r1, r4
	mov	r0, #1
	bl	gdPutC
	mov	r1, r4
	mov	r0, #0
	bl	gdPutC
	mov	r1, r4
	mov	r0, #0
	bl	gdPutC
	ldr	r3, [sp, #92]
	mov	r1, r4
	and	r0, r3, #255
	bl	gdPutC
	mov	r1, r4
	mov	r0, #0
	bl	gdPutC
.L5:
	mov	r1, r4
	mov	r0, #44
	bl	gdPutC
	mov	r1, r4
	mov	r0, #0
	bl	gifPutWord
	mov	r1, r4
	mov	r0, #0
	bl	gifPutWord
	mov	r1, r4
	ldr	r0, [sp, #20]
	bl	gifPutWord
	mov	r1, r4
	ldr	r0, [sp, #24]
	bl	gifPutWord
	ldr	r0, [sp, #12]
	mov	r1, r4
	cmp	r0, #0
	movne	r0, #64
	bl	gdPutC
	mov	r1, r4
	and	r0, fp, #255
	bl	gdPutC
	ldr	r2, [sp, #112]
	add	r3, sp, #12
	mov	r1, r4
	add	r0, fp, #1
	bl	compress
	mov	r1, r4
	mov	r0, #0
	bl	gdPutC
	mov	r1, r4
	mov	r0, #59
	bl	gdPutC
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.size	GIFEncode, .-GIFEncode
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
