	.file	"782787.c"
	.intel_syntax noprefix
	.text
	.local	OutFile
	.comm	OutFile,8,8
	.local	isCloseOutFile
	.comm	isCloseOutFile,4,4
	.local	Buffer
	.comm	Buffer,256,32
	.local	Index
	.comm	Index,4,4
	.local	BitsLeft
	.comm	BitsLeft,4,4
	.local	StrChr
	.comm	StrChr,8,8
	.local	StrNxt
	.comm	StrNxt,8,8
	.local	StrHsh
	.comm	StrHsh,8,8
	.local	NumStrings
	.comm	NumStrings,4,4
	.local	BitsPrPrimColor
	.comm	BitsPrPrimColor,4,4
	.local	NumColors
	.comm	NumColors,4,4
	.data
	.align 4
	.type	TransparentColorIndex, @object
	.size	TransparentColorIndex, 4
TransparentColorIndex:
	.long	-1
	.local	ColorTable
	.comm	ColorTable,8,8
	.local	ScreenHeight
	.comm	ScreenHeight,4,4
	.local	ScreenWidth
	.comm	ScreenWidth,4,4
	.local	ImageHeight
	.comm	ImageHeight,4,4
	.local	ImageWidth
	.comm	ImageWidth,4,4
	.local	ImageLeft
	.comm	ImageLeft,4,4
	.local	ImageTop
	.comm	ImageTop,4,4
	.local	RelPixX
	.comm	RelPixX,4,4
	.local	RelPixY
	.comm	RelPixY,4,4
	.local	GetPixel
	.comm	GetPixel,8,8
	.section	.rodata
.LC0:
	.string	"wb"
	.text
	.type	Create, @function
Create:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR stdout[rip]
	mov	QWORD PTR OutFile[rip], rax
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR OutFile[rip], rax
	mov	rax, QWORD PTR OutFile[rip]
	test	rax, rax
	jne	.L4
	mov	eax, 1
	jmp	.L5
.L4:
	mov	DWORD PTR isCloseOutFile[rip], 1
.L3:
	mov	eax, 0
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	Create, .-Create
	.type	Write, @function
Write:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	rcx, QWORD PTR OutFile[rip]
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	edx, DWORD PTR -12[rbp]
	cmp	rax, rdx
	jnb	.L7
	mov	eax, 2
	jmp	.L8
.L7:
	mov	eax, 0
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Write, .-Write
	.type	WriteByte, @function
WriteByte:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	mov	rdx, QWORD PTR OutFile[rip]
	movzx	eax, BYTE PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	putc@PLT
	cmp	eax, -1
	jne	.L10
	mov	eax, 2
	jmp	.L11
.L10:
	mov	eax, 0
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	WriteByte, .-WriteByte
	.type	WriteWord, @function
WriteWord:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	rdx, QWORD PTR OutFile[rip]
	mov	eax, DWORD PTR -4[rbp]
	movzx	eax, al
	mov	rsi, rdx
	mov	edi, eax
	call	putc@PLT
	cmp	eax, -1
	jne	.L13
	mov	eax, 2
	jmp	.L14
.L13:
	mov	rax, QWORD PTR OutFile[rip]
	mov	edx, DWORD PTR -4[rbp]
	shr	edx, 8
	mov	rsi, rax
	mov	edi, edx
	call	putc@PLT
	cmp	eax, -1
	jne	.L15
	mov	eax, 2
	jmp	.L14
.L15:
	mov	eax, 0
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	WriteWord, .-WriteWord
	.type	Close, @function
Close:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR isCloseOutFile[rip]
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR OutFile[rip]
	mov	rdi, rax
	call	fclose@PLT
.L18:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Close, .-Close
	.type	InitBitFile, @function
InitBitFile:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR Index[rip], 0
	mov	eax, DWORD PTR Index[rip]
	cdqe
	lea	rdx, Buffer[rip]
	mov	BYTE PTR [rax+rdx], 0
	mov	DWORD PTR BitsLeft[rip], 8
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	InitBitFile, .-InitBitFile
	.type	ResetOutBitFile, @function
ResetOutBitFile:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, DWORD PTR BitsLeft[rip]
	cmp	eax, 8
	setne	al
	mov	edx, eax
	mov	eax, DWORD PTR Index[rip]
	add	eax, edx
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 0
	je	.L21
	movzx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L22
	mov	eax, -1
	jmp	.L23
.L22:
	movzx	eax, BYTE PTR -1[rbp]
	mov	esi, eax
	lea	rdi, Buffer[rip]
	call	Write
	test	eax, eax
	je	.L24
	mov	eax, -1
	jmp	.L23
.L24:
	mov	DWORD PTR Index[rip], 0
	mov	eax, DWORD PTR Index[rip]
	cdqe
	lea	rdx, Buffer[rip]
	mov	BYTE PTR [rax+rdx], 0
	mov	DWORD PTR BitsLeft[rip], 8
.L21:
	mov	eax, 0
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	ResetOutBitFile, .-ResetOutBitFile
	.type	WriteBits, @function
WriteBits:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	mov	BYTE PTR -5[rbp], -1
.L34:
	mov	eax, DWORD PTR Index[rip]
	cmp	eax, 254
	jne	.L26
	mov	eax, DWORD PTR BitsLeft[rip]
	test	eax, eax
	je	.L27
.L26:
	mov	eax, DWORD PTR Index[rip]
	cmp	eax, 254
	jle	.L28
.L27:
	movzx	eax, BYTE PTR -5[rbp]
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L29
	mov	eax, -1
	jmp	.L30
.L29:
	movzx	eax, BYTE PTR -5[rbp]
	mov	esi, eax
	lea	rdi, Buffer[rip]
	call	Write
	test	eax, eax
	je	.L31
	mov	eax, -1
	jmp	.L30
.L31:
	mov	DWORD PTR Index[rip], 0
	mov	eax, DWORD PTR Index[rip]
	cdqe
	lea	rdx, Buffer[rip]
	mov	BYTE PTR [rax+rdx], 0
	mov	DWORD PTR BitsLeft[rip], 8
.L28:
	mov	eax, DWORD PTR BitsLeft[rip]
	cmp	DWORD PTR -24[rbp], eax
	jg	.L32
	mov	eax, DWORD PTR Index[rip]
	cdqe
	lea	rdx, Buffer[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	mov	esi, eax
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	sub	eax, 1
	and	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	ecx, DWORD PTR BitsLeft[rip]
	mov	eax, 8
	sub	eax, ecx
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	or	esi, eax
	mov	edx, esi
	mov	eax, DWORD PTR Index[rip]
	mov	ecx, edx
	cdqe
	lea	rdx, Buffer[rip]
	mov	BYTE PTR [rax+rdx], cl
	mov	eax, DWORD PTR -24[rbp]
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR BitsLeft[rip]
	sub	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR BitsLeft[rip], eax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L33
.L32:
	mov	eax, DWORD PTR Index[rip]
	cdqe
	lea	rdx, Buffer[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	mov	esi, eax
	mov	eax, DWORD PTR BitsLeft[rip]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	sub	eax, 1
	and	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	ecx, DWORD PTR BitsLeft[rip]
	mov	eax, 8
	sub	eax, ecx
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	or	esi, eax
	mov	edx, esi
	mov	eax, DWORD PTR Index[rip]
	mov	ecx, edx
	cdqe
	lea	rdx, Buffer[rip]
	mov	BYTE PTR [rax+rdx], cl
	mov	eax, DWORD PTR BitsLeft[rip]
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR BitsLeft[rip]
	mov	ecx, eax
	sar	DWORD PTR -20[rbp], cl
	mov	eax, DWORD PTR BitsLeft[rip]
	sub	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR Index[rip]
	add	eax, 1
	mov	DWORD PTR Index[rip], eax
	mov	eax, DWORD PTR Index[rip]
	cdqe
	lea	rdx, Buffer[rip]
	mov	BYTE PTR [rax+rdx], 0
	mov	DWORD PTR BitsLeft[rip], 8
.L33:
	cmp	DWORD PTR -24[rbp], 0
	jne	.L34
	mov	eax, DWORD PTR -4[rbp]
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	WriteBits, .-WriteBits
	.type	FreeStrtab, @function
FreeStrtab:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR StrHsh[rip]
	test	rax, rax
	je	.L36
	mov	rax, QWORD PTR StrHsh[rip]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR StrHsh[rip], 0
.L36:
	mov	rax, QWORD PTR StrNxt[rip]
	test	rax, rax
	je	.L37
	mov	rax, QWORD PTR StrNxt[rip]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR StrNxt[rip], 0
.L37:
	mov	rax, QWORD PTR StrChr[rip]
	test	rax, rax
	je	.L39
	mov	rax, QWORD PTR StrChr[rip]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR StrChr[rip], 0
.L39:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	FreeStrtab, .-FreeStrtab
	.type	AllocStrtab, @function
AllocStrtab:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	FreeStrtab
	mov	edi, 4096
	call	malloc@PLT
	mov	QWORD PTR StrChr[rip], rax
	mov	rax, QWORD PTR StrChr[rip]
	test	rax, rax
	jne	.L41
	call	FreeStrtab
	mov	eax, 3
	jmp	.L42
.L41:
	mov	edi, 16384
	call	malloc@PLT
	mov	QWORD PTR StrNxt[rip], rax
	mov	rax, QWORD PTR StrNxt[rip]
	test	rax, rax
	jne	.L43
	call	FreeStrtab
	mov	eax, 3
	jmp	.L42
.L43:
	mov	edi, 39892
	call	malloc@PLT
	mov	QWORD PTR StrHsh[rip], rax
	mov	rax, QWORD PTR StrHsh[rip]
	test	rax, rax
	jne	.L44
	call	FreeStrtab
	mov	eax, 3
	jmp	.L42
.L44:
	mov	eax, 0
.L42:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	AllocStrtab, .-AllocStrtab
	.type	AddCharString, @function
AddCharString:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	eax, esi
	mov	BYTE PTR -24[rbp], al
	mov	eax, DWORD PTR NumStrings[rip]
	cmp	eax, 4095
	jbe	.L46
	mov	eax, 65535
	jmp	.L47
.L46:
	movzx	eax, BYTE PTR -24[rbp]
	sal	eax, 8
	xor	eax, DWORD PTR -20[rbp]
	mov	ecx, eax
	mov	edx, 3527962709
	imul	rdx, rcx
	shr	rdx, 32
	shr	edx, 13
	mov	DWORD PTR -4[rbp], edx
	mov	edx, DWORD PTR -4[rbp]
	imul	edx, edx, 9973
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
	jmp	.L48
.L49:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 2039
	mov	ecx, eax
	mov	edx, 3527962709
	imul	rdx, rcx
	shr	rdx, 32
	shr	edx, 13
	mov	DWORD PTR -4[rbp], edx
	mov	edx, DWORD PTR -4[rbp]
	imul	edx, edx, 9973
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
.L48:
	mov	rdx, QWORD PTR StrHsh[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 65535
	jne	.L49
	mov	rdx, QWORD PTR StrHsh[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rdx, rax
	mov	eax, DWORD PTR NumStrings[rip]
	mov	DWORD PTR [rdx], eax
	mov	rax, QWORD PTR StrChr[rip]
	mov	edx, DWORD PTR NumStrings[rip]
	mov	edx, edx
	add	rdx, rax
	movzx	eax, BYTE PTR -24[rbp]
	mov	BYTE PTR [rdx], al
	mov	rax, QWORD PTR StrNxt[rip]
	mov	edx, DWORD PTR NumStrings[rip]
	mov	edx, edx
	sal	rdx, 2
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR NumStrings[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR NumStrings[rip], edx
.L47:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	AddCharString, .-AddCharString
	.type	FindCharString, @function
FindCharString:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	eax, esi
	mov	BYTE PTR -24[rbp], al
	cmp	DWORD PTR -20[rbp], 65535
	jne	.L51
	movzx	eax, BYTE PTR -24[rbp]
	jmp	.L52
.L51:
	movzx	eax, BYTE PTR -24[rbp]
	sal	eax, 8
	xor	eax, DWORD PTR -20[rbp]
	mov	ecx, eax
	mov	edx, 3527962709
	imul	rdx, rcx
	shr	rdx, 32
	shr	edx, 13
	mov	DWORD PTR -8[rbp], edx
	mov	edx, DWORD PTR -8[rbp]
	imul	edx, edx, 9973
	sub	eax, edx
	mov	DWORD PTR -8[rbp], eax
	jmp	.L53
.L55:
	mov	rdx, QWORD PTR StrNxt[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L54
	mov	rdx, QWORD PTR StrChr[rip]
	mov	eax, DWORD PTR -4[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -24[rbp], al
	jne	.L54
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L52
.L54:
	mov	eax, DWORD PTR -8[rbp]
	add	eax, 2039
	mov	ecx, eax
	mov	edx, 3527962709
	imul	rdx, rcx
	shr	rdx, 32
	shr	edx, 13
	mov	DWORD PTR -8[rbp], edx
	mov	edx, DWORD PTR -8[rbp]
	imul	edx, edx, 9973
	sub	eax, edx
	mov	DWORD PTR -8[rbp], eax
.L53:
	mov	rdx, QWORD PTR StrHsh[rip]
	mov	eax, DWORD PTR -8[rbp]
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 65535
	jne	.L55
	mov	eax, 65535
.L52:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	FindCharString, .-FindCharString
	.type	ClearStrtab, @function
ClearStrtab:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR NumStrings[rip], 0
	mov	rax, QWORD PTR StrHsh[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L57
.L58:
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 4[rax]
	mov	QWORD PTR -8[rbp], rdx
	mov	DWORD PTR [rax], 65535
	add	DWORD PTR -16[rbp], 1
.L57:
	cmp	DWORD PTR -16[rbp], 9972
	jle	.L58
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	add	eax, 2
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L59
.L60:
	mov	eax, DWORD PTR -16[rbp]
	movzx	eax, al
	mov	esi, eax
	mov	edi, 65535
	call	AddCharString
	add	DWORD PTR -16[rbp], 1
.L59:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L60
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	ClearStrtab, .-ClearStrtab
	.type	LZW_Compress, @function
LZW_Compress:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 48
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	DWORD PTR -32[rbp], 65535
	call	InitBitFile
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	add	eax, 1
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	add	eax, 1
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	sub	eax, 1
	mov	DWORD PTR -36[rbp], eax
	call	AllocStrtab
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L62
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L63
.L62:
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	ClearStrtab
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	edi, eax
	call	WriteBits
	jmp	.L64
.L68:
	mov	eax, ebx
	movzx	edx, al
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	edi, eax
	call	FindCharString
	mov	r12d, eax
	cmp	r12d, 65535
	je	.L65
	mov	DWORD PTR -32[rbp], r12d
	jmp	.L64
.L65:
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	esi, edx
	mov	edi, eax
	call	WriteBits
	mov	eax, ebx
	movzx	edx, al
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	edi, eax
	call	AddCharString
	mov	edx, DWORD PTR -36[rbp]
	cmp	eax, edx
	jbe	.L66
	add	DWORD PTR -40[rbp], 1
	cmp	DWORD PTR -40[rbp], 12
	jle	.L67
	mov	eax, DWORD PTR -40[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, edx
	mov	edi, eax
	call	WriteBits
	mov	eax, DWORD PTR -52[rbp]
	mov	edi, eax
	call	ClearStrtab
	mov	eax, DWORD PTR -52[rbp]
	add	eax, 1
	mov	DWORD PTR -40[rbp], eax
.L67:
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	sub	eax, 1
	mov	DWORD PTR -36[rbp], eax
.L66:
	mov	DWORD PTR -32[rbp], ebx
.L64:
	mov	rax, QWORD PTR -64[rbp]
	call	rax
	mov	ebx, eax
	cmp	ebx, -1
	jne	.L68
	cmp	DWORD PTR -32[rbp], 65535
	je	.L69
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, DWORD PTR -40[rbp]
	mov	esi, edx
	mov	edi, eax
	call	WriteBits
.L69:
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	WriteBits
	call	ResetOutBitFile
	call	FreeStrtab
	mov	eax, 0
.L63:
	add	rsp, 48
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	LZW_Compress, .-LZW_Compress
	.type	BitsNeeded, @function
BitsNeeded:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 1
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -20[rbp], edx
	test	eax, eax
	jne	.L73
	mov	eax, 0
	jmp	.L72
.L74:
	add	DWORD PTR -4[rbp], 1
.L73:
	shr	DWORD PTR -20[rbp]
	cmp	DWORD PTR -20[rbp], 0
	jne	.L74
	mov	eax, DWORD PTR -4[rbp]
.L72:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	BitsNeeded, .-BitsNeeded
	.type	InputByte, @function
InputByte:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	edx, DWORD PTR RelPixY[rip]
	mov	eax, DWORD PTR ImageHeight[rip]
	cmp	edx, eax
	jb	.L76
	mov	eax, -1
	jmp	.L77
.L76:
	mov	rax, QWORD PTR GetPixel[rip]
	mov	ecx, DWORD PTR ImageTop[rip]
	mov	edx, DWORD PTR RelPixY[rip]
	add	edx, ecx
	mov	ecx, edx
	mov	esi, DWORD PTR ImageLeft[rip]
	mov	edx, DWORD PTR RelPixX[rip]
	add	edx, esi
	mov	esi, ecx
	mov	edi, edx
	call	rax
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR RelPixX[rip]
	add	eax, 1
	mov	DWORD PTR RelPixX[rip], eax
	mov	edx, DWORD PTR RelPixX[rip]
	mov	eax, DWORD PTR ImageWidth[rip]
	cmp	edx, eax
	jb	.L78
	mov	DWORD PTR RelPixX[rip], 0
	mov	eax, DWORD PTR RelPixY[rip]
	add	eax, 1
	mov	DWORD PTR RelPixY[rip], eax
.L78:
	mov	eax, DWORD PTR -4[rbp]
.L77:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	InputByte, .-InputByte
	.type	WriteScreenDescriptor, @function
WriteScreenDescriptor:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	WriteWord
	test	eax, eax
	je	.L80
	mov	eax, 2
	jmp	.L81
.L80:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edi, eax
	call	WriteWord
	test	eax, eax
	je	.L82
	mov	eax, 2
	jmp	.L81
.L82:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 8[rax]
	shr	al, 7
	movzx	eax, al
	sal	eax, 7
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 8[rax]
	shr	al, 4
	and	eax, 7
	movzx	eax, al
	sal	eax, 4
	or	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 8[rax]
	shr	al, 3
	and	eax, 1
	movzx	eax, al
	sal	eax, 3
	or	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 8[rax]
	and	eax, 7
	or	eax, edx
	mov	BYTE PTR -1[rbp], al
	movzx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L83
	mov	eax, 2
	jmp	.L81
.L83:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 9[rax]
	movzx	eax, al
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L84
	mov	eax, 2
	jmp	.L81
.L84:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 10[rax]
	movzx	eax, al
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L85
	mov	eax, 2
	jmp	.L81
.L85:
	mov	eax, 0
.L81:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	WriteScreenDescriptor, .-WriteScreenDescriptor
	.type	WriteTransparentColorIndex, @function
WriteTransparentColorIndex:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 0
	jns	.L87
	mov	eax, 0
	jmp	.L88
.L87:
	mov	edi, 33
	call	WriteByte
	test	eax, eax
	je	.L89
	mov	eax, 2
	jmp	.L88
.L89:
	mov	edi, 249
	call	WriteByte
	test	eax, eax
	je	.L90
	mov	eax, 2
	jmp	.L88
.L90:
	mov	edi, 4
	call	WriteByte
	test	eax, eax
	je	.L91
	mov	eax, 2
	jmp	.L88
.L91:
	mov	edi, 1
	call	WriteByte
	test	eax, eax
	je	.L92
	mov	eax, 2
	jmp	.L88
.L92:
	mov	edi, 0
	call	WriteWord
	test	eax, eax
	je	.L93
	mov	eax, 2
	jmp	.L88
.L93:
	mov	eax, DWORD PTR -4[rbp]
	movzx	eax, al
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L94
	mov	eax, 2
	jmp	.L88
.L94:
	mov	edi, 0
	call	WriteByte
	test	eax, eax
	je	.L95
	mov	eax, 2
	jmp	.L88
.L95:
	mov	eax, 0
.L88:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	WriteTransparentColorIndex, .-WriteTransparentColorIndex
	.type	WriteImageDescriptor, @function
WriteImageDescriptor:
.LFB24:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L97
	mov	eax, 2
	jmp	.L98
.L97:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edi, eax
	call	WriteWord
	test	eax, eax
	je	.L99
	mov	eax, 2
	jmp	.L98
.L99:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	edi, eax
	call	WriteWord
	test	eax, eax
	je	.L100
	mov	eax, 2
	jmp	.L98
.L100:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	edi, eax
	call	WriteWord
	test	eax, eax
	je	.L101
	mov	eax, 2
	jmp	.L98
.L101:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	WriteWord
	test	eax, eax
	je	.L102
	mov	eax, 2
	jmp	.L98
.L102:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 20[rax]
	shr	al, 7
	movzx	eax, al
	sal	eax, 7
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 20[rax]
	shr	al, 6
	and	eax, 1
	movzx	eax, al
	sal	eax, 6
	or	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 20[rax]
	shr	al, 5
	and	eax, 1
	movzx	eax, al
	sal	eax, 5
	or	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 20[rax]
	shr	al, 3
	and	eax, 3
	movzx	eax, al
	sal	eax, 3
	or	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR 20[rax]
	and	eax, 7
	or	eax, edx
	mov	BYTE PTR -1[rbp], al
	movzx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L103
	mov	eax, 2
	jmp	.L98
.L103:
	mov	eax, 0
.L98:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	WriteImageDescriptor, .-WriteImageDescriptor
	.section	.rodata
.LC1:
	.string	"GIF87a"
	.text
	.globl	GIF_Create
	.type	GIF_Create, @function
GIF_Create:
.LFB25:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	DWORD PTR -64[rbp], edx
	mov	DWORD PTR -68[rbp], ecx
	mov	DWORD PTR -72[rbp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -68[rbp], 0
	je	.L105
	mov	eax, DWORD PTR -68[rbp]
	mov	edi, eax
	call	BitsNeeded
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	jmp	.L106
.L105:
	mov	eax, 0
.L106:
	mov	DWORD PTR NumColors[rip], eax
	mov	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR BitsPrPrimColor[rip], eax
	mov	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR ScreenHeight[rip], eax
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR ScreenWidth[rip], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	Create
	test	eax, eax
	je	.L107
	mov	eax, 1
	jmp	.L118
.L107:
	mov	esi, 6
	lea	rdi, .LC1[rip]
	call	Write
	test	eax, eax
	je	.L109
	mov	eax, 2
	jmp	.L118
.L109:
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR NumColors[rip]
	test	eax, eax
	je	.L110
	mov	eax, DWORD PTR NumColors[rip]
	mov	edi, eax
	call	BitsNeeded
	sub	eax, 1
	and	eax, 7
	and	eax, 7
	mov	edx, eax
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -8
	or	eax, edx
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	or	eax, -128
	mov	BYTE PTR -12[rbp], al
	jmp	.L111
.L110:
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -8
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, 127
	mov	BYTE PTR -12[rbp], al
.L111:
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -9
	mov	BYTE PTR -12[rbp], al
	mov	eax, DWORD PTR -72[rbp]
	sub	eax, 1
	and	eax, 7
	and	eax, 7
	sal	eax, 4
	mov	edx, eax
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -113
	or	eax, edx
	mov	BYTE PTR -12[rbp], al
	mov	BYTE PTR -11[rbp], 0
	mov	BYTE PTR -10[rbp], 0
	lea	rax, -20[rbp]
	mov	rdi, rax
	call	WriteScreenDescriptor
	test	eax, eax
	je	.L112
	mov	eax, 2
	jmp	.L118
.L112:
	mov	rax, QWORD PTR ColorTable[rip]
	test	rax, rax
	je	.L113
	mov	rax, QWORD PTR ColorTable[rip]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR ColorTable[rip], 0
.L113:
	mov	eax, DWORD PTR NumColors[rip]
	test	eax, eax
	je	.L114
	mov	edx, DWORD PTR NumColors[rip]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR ColorTable[rip], rax
	mov	rax, QWORD PTR ColorTable[rip]
	test	rax, rax
	jne	.L115
	mov	eax, 3
	jmp	.L118
.L115:
	mov	rax, QWORD PTR ColorTable[rip]
	mov	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -40[rbp], 0
	jmp	.L116
.L117:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -32[rbp], rdx
	mov	BYTE PTR [rax], 0
	add	DWORD PTR -40[rbp], 1
.L116:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L117
.L114:
	mov	eax, 0
.L118:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L119
	call	__stack_chk_fail@PLT
.L119:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	GIF_Create, .-GIF_Create
	.globl	GIF_SetColor
	.type	GIF_SetColor, @function
GIF_SetColor:
.LFB26:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	DWORD PTR -32[rbp], ecx
	mov	eax, DWORD PTR BitsPrPrimColor[rip]
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	sub	rax, 1
	mov	QWORD PTR -16[rbp], rax
	mov	rcx, QWORD PTR ColorTable[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	cdqe
	add	rax, rcx
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 8
	sub	rax, rdx
	cqo
	idiv	QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -8[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 8
	sub	rax, rdx
	cqo
	idiv	QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -8[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 8
	sub	rax, rdx
	cqo
	idiv	QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -8[rbp], rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	GIF_SetColor, .-GIF_SetColor
	.globl	GIF_SetTransparent
	.type	GIF_SetTransparent, @function
GIF_SetTransparent:
.LFB27:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR TransparentColorIndex[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	GIF_SetTransparent, .-GIF_SetTransparent
	.globl	GIF_CompressImage
	.type	GIF_CompressImage, @function
GIF_CompressImage:
.LFB28:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -52[rbp], edi
	mov	DWORD PTR -56[rbp], esi
	mov	DWORD PTR -60[rbp], edx
	mov	DWORD PTR -64[rbp], ecx
	mov	QWORD PTR -72[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L123
	mov	eax, DWORD PTR ScreenWidth[rip]
	mov	DWORD PTR -60[rbp], eax
	mov	DWORD PTR -52[rbp], 0
.L123:
	cmp	DWORD PTR -64[rbp], 0
	jns	.L124
	mov	eax, DWORD PTR ScreenHeight[rip]
	mov	DWORD PTR -64[rbp], eax
	mov	DWORD PTR -56[rbp], 0
.L124:
	cmp	DWORD PTR -52[rbp], 0
	jns	.L125
	mov	DWORD PTR -52[rbp], 0
.L125:
	cmp	DWORD PTR -56[rbp], 0
	jns	.L126
	mov	DWORD PTR -56[rbp], 0
.L126:
	mov	eax, DWORD PTR NumColors[rip]
	test	eax, eax
	je	.L127
	mov	edx, DWORD PTR NumColors[rip]
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	edx, eax
	mov	rax, QWORD PTR ColorTable[rip]
	mov	esi, edx
	mov	rdi, rax
	call	Write
	test	eax, eax
	je	.L127
	mov	eax, 2
	jmp	.L135
.L127:
	mov	eax, DWORD PTR TransparentColorIndex[rip]
	test	eax, eax
	js	.L129
	mov	eax, DWORD PTR TransparentColorIndex[rip]
	mov	edi, eax
	call	WriteTransparentColorIndex
	test	eax, eax
	je	.L129
	mov	eax, 2
	jmp	.L135
.L129:
	mov	BYTE PTR -32[rbp], 44
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR ImageLeft[rip], eax
	mov	eax, DWORD PTR ImageLeft[rip]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR ImageTop[rip], eax
	mov	eax, DWORD PTR ImageTop[rip]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR ImageWidth[rip], eax
	mov	eax, DWORD PTR ImageWidth[rip]
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR ImageHeight[rip], eax
	mov	eax, DWORD PTR ImageHeight[rip]
	mov	DWORD PTR -16[rbp], eax
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -8
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -25
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -33
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -65
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, 127
	mov	BYTE PTR -12[rbp], al
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	WriteImageDescriptor
	test	eax, eax
	je	.L130
	mov	eax, 2
	jmp	.L135
.L130:
	mov	eax, DWORD PTR NumColors[rip]
	mov	edi, eax
	call	BitsNeeded
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 1
	jne	.L131
	add	DWORD PTR -40[rbp], 1
.L131:
	mov	eax, DWORD PTR -40[rbp]
	movzx	eax, al
	mov	edi, eax
	call	WriteByte
	test	eax, eax
	je	.L132
	mov	eax, 2
	jmp	.L135
.L132:
	mov	DWORD PTR RelPixY[rip], 0
	mov	eax, DWORD PTR RelPixY[rip]
	mov	DWORD PTR RelPixX[rip], eax
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR GetPixel[rip], rax
	mov	eax, DWORD PTR -40[rbp]
	lea	rsi, InputByte[rip]
	mov	edi, eax
	call	LZW_Compress
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	je	.L133
	mov	eax, DWORD PTR -36[rbp]
	jmp	.L135
.L133:
	mov	edi, 0
	call	WriteByte
	test	eax, eax
	je	.L134
	mov	eax, 2
	jmp	.L135
.L134:
	mov	eax, 0
.L135:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L136
	call	__stack_chk_fail@PLT
.L136:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	GIF_CompressImage, .-GIF_CompressImage
	.globl	GIF_Close
	.type	GIF_Close, @function
GIF_Close:
.LFB29:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -32[rbp], 59
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -8
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -25
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -33
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, -65
	mov	BYTE PTR -12[rbp], al
	movzx	eax, BYTE PTR -12[rbp]
	and	eax, 127
	mov	BYTE PTR -12[rbp], al
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	WriteImageDescriptor
	test	eax, eax
	je	.L138
	mov	eax, 2
	jmp	.L141
.L138:
	call	Close
	mov	rax, QWORD PTR ColorTable[rip]
	test	rax, rax
	je	.L140
	mov	rax, QWORD PTR ColorTable[rip]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR ColorTable[rip], 0
.L140:
	mov	eax, 0
.L141:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L142
	call	__stack_chk_fail@PLT
.L142:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	GIF_Close, .-GIF_Close
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"782787.c"
	.text
	.local	OutFile
	.comm	OutFile,4,4
	.local	isCloseOutFile
	.comm	isCloseOutFile,4,4
	.local	Buffer
	.comm	Buffer,256,4
	.local	Index
	.comm	Index,4,4
	.local	BitsLeft
	.comm	BitsLeft,4,4
	.local	StrChr
	.comm	StrChr,4,4
	.local	StrNxt
	.comm	StrNxt,4,4
	.local	StrHsh
	.comm	StrHsh,4,4
	.local	NumStrings
	.comm	NumStrings,4,4
	.local	BitsPrPrimColor
	.comm	BitsPrPrimColor,4,4
	.local	NumColors
	.comm	NumColors,4,4
	.data
	.align	2
	.type	TransparentColorIndex, %object
	.size	TransparentColorIndex, 4
TransparentColorIndex:
	.word	-1
	.local	ColorTable
	.comm	ColorTable,4,4
	.local	ScreenHeight
	.comm	ScreenHeight,4,4
	.local	ScreenWidth
	.comm	ScreenWidth,4,4
	.local	ImageHeight
	.comm	ImageHeight,4,4
	.local	ImageWidth
	.comm	ImageWidth,4,4
	.local	ImageLeft
	.comm	ImageLeft,4,4
	.local	ImageTop
	.comm	ImageTop,4,4
	.local	RelPixX
	.comm	RelPixX,4,4
	.local	RelPixY
	.comm	RelPixY,4,4
	.local	GetPixel
	.comm	GetPixel,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"wb\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Create, %function
Create:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L6
	ldr	r3, [r3]
	ldr	r2, .L6+4
	str	r3, [r2]
	b	.L3
.L2:
	ldr	r1, .L6+8
	ldr	r0, [fp, #-8]
	bl	fopen
	mov	r3, r0
	ldr	r2, .L6+4
	str	r3, [r2]
	ldr	r3, .L6+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L4
	mov	r3, #1
	b	.L5
.L4:
	ldr	r3, .L6+12
	mov	r2, #1
	str	r2, [r3]
.L3:
	mov	r3, #0
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	stdout
	.word	OutFile
	.word	.LC0
	.word	isCloseOutFile
	.size	Create, .-Create
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Write, %function
Write:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, .L11
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r3, r2
	bls	.L9
	mov	r3, #2
	b	.L10
.L9:
	mov	r3, #0
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	OutFile
	.size	Write, .-Write
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteByte, %function
WriteByte:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, .L16
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	putc
	mov	r3, r0
	cmn	r3, #1
	bne	.L14
	mov	r3, #2
	b	.L15
.L14:
	mov	r3, #0
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	OutFile
	.size	WriteByte, .-WriteByte
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteWord, %function
WriteWord:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	ldr	r2, .L22
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	putc
	mov	r3, r0
	cmn	r3, #1
	bne	.L19
	mov	r3, #2
	b	.L20
.L19:
	ldr	r3, [fp, #-8]
	lsr	r3, r3, #8
	mov	r2, r3
	ldr	r3, .L22
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	putc
	mov	r3, r0
	cmn	r3, #1
	bne	.L21
	mov	r3, #2
	b	.L20
.L21:
	mov	r3, #0
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	OutFile
	.size	WriteWord, .-WriteWord
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	Close, %function
Close:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L27
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L26
	ldr	r3, .L27+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
.L26:
	nop
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	isCloseOutFile
	.word	OutFile
	.size	Close, .-Close
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitBitFile, %function
InitBitFile:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L30
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L30
	ldr	r3, [r3]
	ldr	r2, .L30+4
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r3, .L30+8
	mov	r2, #8
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L31:
	.align	2
.L30:
	.word	Index
	.word	Buffer
	.word	BitsLeft
	.size	InitBitFile, .-InitBitFile
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ResetOutBitFile, %function
ResetOutBitFile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L37
	ldr	r3, [r3]
	cmp	r3, #8
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L37+4
	ldr	r3, [r3]
	and	r3, r3, #255
	add	r3, r2, r3
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L33
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L34
	mvn	r3, #0
	b	.L35
.L34:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L37+8
	bl	Write
	mov	r3, r0
	cmp	r3, #0
	beq	.L36
	mvn	r3, #0
	b	.L35
.L36:
	ldr	r3, .L37+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L37+4
	ldr	r3, [r3]
	ldr	r2, .L37+8
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r3, .L37
	mov	r2, #8
	str	r2, [r3]
.L33:
	mov	r3, #0
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	BitsLeft
	.word	Index
	.word	Buffer
	.size	ResetOutBitFile, .-ResetOutBitFile
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteBits, %function
WriteBits:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	mvn	r3, #0
	strb	r3, [fp, #-9]
.L48:
	ldr	r3, .L49
	ldr	r3, [r3]
	cmp	r3, #254
	bne	.L40
	ldr	r3, .L49+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L41
.L40:
	ldr	r3, .L49
	ldr	r3, [r3]
	cmp	r3, #254
	ble	.L42
.L41:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L43
	mvn	r3, #0
	b	.L44
.L43:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L49+8
	bl	Write
	mov	r3, r0
	cmp	r3, #0
	beq	.L45
	mvn	r3, #0
	b	.L44
.L45:
	ldr	r3, .L49
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L49
	ldr	r3, [r3]
	ldr	r2, .L49+8
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r3, .L49+4
	mov	r2, #8
	str	r2, [r3]
.L42:
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L46
	ldr	r3, .L49
	ldr	r3, [r3]
	ldr	r2, .L49+8
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	mov	r1, #1
	ldr	r3, [fp, #-20]
	lsl	r3, r1, r3
	sub	r1, r3, #1
	ldr	r3, [fp, #-16]
	and	r1, r1, r3
	ldr	r3, .L49+4
	ldr	r3, [r3]
	rsb	r3, r3, #8
	lsl	r3, r1, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, .L49
	ldr	r3, [r3]
	and	r1, r2, #255
	ldr	r2, .L49+8
	strb	r1, [r2, r3]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, .L49+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	ldr	r2, .L49+4
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L47
.L46:
	ldr	r3, .L49
	ldr	r3, [r3]
	ldr	r2, .L49+8
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, .L49+4
	ldr	r3, [r3]
	mov	r1, #1
	lsl	r3, r1, r3
	sub	r1, r3, #1
	ldr	r3, [fp, #-16]
	and	r1, r1, r3
	ldr	r3, .L49+4
	ldr	r3, [r3]
	rsb	r3, r3, #8
	lsl	r3, r1, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, .L49
	ldr	r3, [r3]
	and	r1, r2, #255
	ldr	r2, .L49+8
	strb	r1, [r2, r3]
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	asr	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, .L49
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L49
	str	r3, [r2]
	ldr	r3, .L49
	ldr	r3, [r3]
	ldr	r2, .L49+8
	mov	r1, #0
	strb	r1, [r2, r3]
	ldr	r3, .L49+4
	mov	r2, #8
	str	r2, [r3]
.L47:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L48
	ldr	r3, [fp, #-8]
.L44:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	Index
	.word	BitsLeft
	.word	Buffer
	.size	WriteBits, .-WriteBits
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FreeStrtab, %function
FreeStrtab:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L56
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L52
	ldr	r3, .L56
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L56
	mov	r2, #0
	str	r2, [r3]
.L52:
	ldr	r3, .L56+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L53
	ldr	r3, .L56+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L56+4
	mov	r2, #0
	str	r2, [r3]
.L53:
	ldr	r3, .L56+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L55
	ldr	r3, .L56+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L56+8
	mov	r2, #0
	str	r2, [r3]
.L55:
	nop
	pop	{fp, pc}
.L57:
	.align	2
.L56:
	.word	StrHsh
	.word	StrNxt
	.word	StrChr
	.size	FreeStrtab, .-FreeStrtab
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	AllocStrtab, %function
AllocStrtab:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	FreeStrtab
	mov	r0, #4096
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L63
	str	r2, [r3]
	ldr	r3, .L63
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L59
	bl	FreeStrtab
	mov	r3, #3
	b	.L60
.L59:
	mov	r0, #16384
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L63+4
	str	r2, [r3]
	ldr	r3, .L63+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L61
	bl	FreeStrtab
	mov	r3, #3
	b	.L60
.L61:
	ldr	r0, .L63+8
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L63+12
	str	r2, [r3]
	ldr	r3, .L63+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L62
	bl	FreeStrtab
	mov	r3, #3
	b	.L60
.L62:
	mov	r3, #0
.L60:
	mov	r0, r3
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	StrChr
	.word	StrNxt
	.word	39892
	.word	StrHsh
	.size	AllocStrtab, .-AllocStrtab
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	AddCharString, %function
AddCharString:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, r1
	strb	r3, [fp, #-17]
	ldr	r3, .L70
	ldr	r3, [r3]
	cmp	r3, #4096
	bcc	.L66
	ldr	r3, .L70+4
	b	.L67
.L66:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	lsl	r3, r3, #8
	mov	r2, r3
	ldr	r3, [fp, #-16]
	eor	r3, r3, r2
	ldr	r2, .L70+8
	umull	r1, r2, r3, r2
	lsr	r2, r2, #13
	ldr	r1, .L70+12
	mul	r2, r1, r2
	sub	r3, r3, r2
	str	r3, [fp, #-8]
	b	.L68
.L69:
	ldr	r3, [fp, #-8]
	add	r3, r3, #2032
	add	r3, r3, #7
	ldr	r2, .L70+8
	umull	r1, r2, r3, r2
	lsr	r2, r2, #13
	ldr	r1, .L70+12
	mul	r2, r1, r2
	sub	r3, r3, r2
	str	r3, [fp, #-8]
.L68:
	ldr	r3, .L70+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L70+4
	cmp	r3, r2
	bne	.L69
	ldr	r3, .L70+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, .L70
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L70+20
	ldr	r2, [r3]
	ldr	r3, .L70
	ldr	r3, [r3]
	add	r3, r2, r3
	ldrb	r2, [fp, #-17]
	strb	r2, [r3]
	ldr	r3, .L70+24
	ldr	r2, [r3]
	ldr	r3, .L70
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, .L70
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L70
	str	r2, [r1]
.L67:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L71:
	.align	2
.L70:
	.word	NumStrings
	.word	65535
	.word	-767004587
	.word	9973
	.word	StrHsh
	.word	StrChr
	.word	StrNxt
	.size	AddCharString, .-AddCharString
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	FindCharString, %function
FindCharString:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, r1
	strb	r3, [fp, #-17]
	ldr	r3, [fp, #-16]
	ldr	r2, .L78
	cmp	r3, r2
	bne	.L73
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	b	.L74
.L73:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	lsl	r3, r3, #8
	mov	r2, r3
	ldr	r3, [fp, #-16]
	eor	r3, r3, r2
	ldr	r2, .L78+4
	umull	r1, r2, r3, r2
	lsr	r2, r2, #13
	ldr	r1, .L78+8
	mul	r2, r1, r2
	sub	r3, r3, r2
	str	r3, [fp, #-12]
	b	.L75
.L77:
	ldr	r3, .L78+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L76
	ldr	r3, .L78+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L76
	ldr	r3, [fp, #-8]
	b	.L74
.L76:
	ldr	r3, [fp, #-12]
	add	r3, r3, #2032
	add	r3, r3, #7
	ldr	r2, .L78+4
	umull	r1, r2, r3, r2
	lsr	r2, r2, #13
	ldr	r1, .L78+8
	mul	r2, r1, r2
	sub	r3, r3, r2
	str	r3, [fp, #-12]
.L75:
	ldr	r3, .L78+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L78
	cmp	r3, r2
	bne	.L77
	ldr	r3, .L78
.L74:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L79:
	.align	2
.L78:
	.word	65535
	.word	-767004587
	.word	9973
	.word	StrNxt
	.word	StrChr
	.word	StrHsh
	.size	FindCharString, .-FindCharString
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ClearStrtab, %function
ClearStrtab:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L85
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L85+4
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L81
.L82:
	ldr	r3, [fp, #-12]
	add	r2, r3, #4
	str	r2, [fp, #-12]
	ldr	r2, .L85+8
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L81:
	ldr	r3, [fp, #-16]
	ldr	r2, .L85+12
	cmp	r3, r2
	ble	.L82
	mov	r2, #1
	ldr	r3, [fp, #-24]
	lsl	r3, r2, r3
	add	r3, r3, #2
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L83
.L84:
	ldr	r3, [fp, #-16]
	and	r3, r3, #255
	mov	r1, r3
	ldr	r0, .L85+8
	bl	AddCharString
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L83:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L84
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L86:
	.align	2
.L85:
	.word	NumStrings
	.word	StrHsh
	.word	65535
	.word	9972
	.size	ClearStrtab, .-ClearStrtab
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	LZW_Compress, %function
LZW_Compress:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L96
	str	r3, [fp, #-28]
	bl	InitBitFile
	mov	r2, #1
	ldr	r3, [fp, #-40]
	lsl	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	mov	r2, #1
	ldr	r3, [fp, #-36]
	lsl	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-32]
	bl	AllocStrtab
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L88
	ldr	r3, [fp, #-16]
	b	.L89
.L88:
	ldr	r0, [fp, #-40]
	bl	ClearStrtab
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-24]
	bl	WriteBits
	b	.L90
.L94:
	and	r3, r4, #255
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	FindCharString
	mov	r5, r0
	ldr	r3, .L96
	cmp	r5, r3
	beq	.L91
	str	r5, [fp, #-28]
	b	.L90
.L91:
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	WriteBits
	and	r3, r4, #255
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	AddCharString
	mov	r2, r0
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bls	.L92
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #12
	ble	.L93
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	WriteBits
	ldr	r0, [fp, #-40]
	bl	ClearStrtab
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L93:
	mov	r2, #1
	ldr	r3, [fp, #-36]
	lsl	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-32]
.L92:
	str	r4, [fp, #-28]
.L90:
	ldr	r3, [fp, #-44]
	blx	r3
	mov	r4, r0
	cmn	r4, #1
	bne	.L94
	ldr	r3, [fp, #-28]
	ldr	r2, .L96
	cmp	r3, r2
	beq	.L95
	ldr	r3, [fp, #-28]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	WriteBits
.L95:
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-20]
	bl	WriteBits
	bl	ResetOutBitFile
	bl	FreeStrtab
	mov	r3, #0
.L89:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L97:
	.align	2
.L96:
	.word	65535
	.size	LZW_Compress, .-LZW_Compress
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	BitsNeeded, %function
BitsNeeded:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	sub	r2, r3, #1
	str	r2, [fp, #-16]
	cmp	r3, #0
	bne	.L101
	mov	r3, #0
	b	.L100
.L102:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L101:
	ldr	r3, [fp, #-16]
	lsr	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L102
	ldr	r3, [fp, #-8]
.L100:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	BitsNeeded, .-BitsNeeded
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	InputByte, %function
InputByte:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L107
	ldr	r2, [r3]
	ldr	r3, .L107+4
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L104
	mvn	r3, #0
	b	.L105
.L104:
	ldr	r3, .L107+8
	ldr	r3, [r3]
	ldr	r2, .L107+12
	ldr	r1, [r2]
	ldr	r2, .L107+16
	ldr	r2, [r2]
	add	r2, r1, r2
	mov	r0, r2
	ldr	r2, .L107+20
	ldr	r1, [r2]
	ldr	r2, .L107
	ldr	r2, [r2]
	add	r2, r1, r2
	mov	r1, r2
	blx	r3
	str	r0, [fp, #-8]
	ldr	r3, .L107+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L107+16
	str	r3, [r2]
	ldr	r3, .L107+16
	ldr	r2, [r3]
	ldr	r3, .L107+24
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L106
	ldr	r3, .L107+16
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L107
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L107
	str	r3, [r2]
.L106:
	ldr	r3, [fp, #-8]
.L105:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L108:
	.align	2
.L107:
	.word	RelPixY
	.word	ImageHeight
	.word	GetPixel
	.word	ImageLeft
	.word	RelPixX
	.word	ImageTop
	.word	ImageWidth
	.size	InputByte, .-InputByte
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteScreenDescriptor, %function
WriteScreenDescriptor:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	WriteWord
	mov	r3, r0
	cmp	r3, #0
	beq	.L110
	mov	r3, #2
	b	.L111
.L110:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	WriteWord
	mov	r3, r0
	cmp	r3, #0
	beq	.L112
	mov	r3, #2
	b	.L111
.L112:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #8]	@ zero_extendqisi2
	lsr	r3, r3, #7
	and	r3, r3, #255
	lsl	r3, r3, #7
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #8]	@ zero_extendqisi2
	lsr	r3, r3, #4
	and	r3, r3, #7
	and	r3, r3, #255
	lsl	r3, r3, #4
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #8]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #8]
	and	r3, r3, #7
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L113
	mov	r3, #2
	b	.L111
.L113:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #9]	@ zero_extendqisi2
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L114
	mov	r3, #2
	b	.L111
.L114:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #10]	@ zero_extendqisi2
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L115
	mov	r3, #2
	b	.L111
.L115:
	mov	r3, #0
.L111:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	WriteScreenDescriptor, .-WriteScreenDescriptor
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteTransparentColorIndex, %function
WriteTransparentColorIndex:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L117
	mov	r3, #0
	b	.L118
.L117:
	mov	r0, #33
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L119
	mov	r3, #2
	b	.L118
.L119:
	mov	r0, #249
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L120
	mov	r3, #2
	b	.L118
.L120:
	mov	r0, #4
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L121
	mov	r3, #2
	b	.L118
.L121:
	mov	r0, #1
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L122
	mov	r3, #2
	b	.L118
.L122:
	mov	r0, #0
	bl	WriteWord
	mov	r3, r0
	cmp	r3, #0
	beq	.L123
	mov	r3, #2
	b	.L118
.L123:
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L124
	mov	r3, #2
	b	.L118
.L124:
	mov	r0, #0
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L125
	mov	r3, #2
	b	.L118
.L125:
	mov	r3, #0
.L118:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	WriteTransparentColorIndex, .-WriteTransparentColorIndex
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	WriteImageDescriptor, %function
WriteImageDescriptor:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L127
	mov	r3, #2
	b	.L128
.L127:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	WriteWord
	mov	r3, r0
	cmp	r3, #0
	beq	.L129
	mov	r3, #2
	b	.L128
.L129:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	WriteWord
	mov	r3, r0
	cmp	r3, #0
	beq	.L130
	mov	r3, #2
	b	.L128
.L130:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	WriteWord
	mov	r3, r0
	cmp	r3, #0
	beq	.L131
	mov	r3, #2
	b	.L128
.L131:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	WriteWord
	mov	r3, r0
	cmp	r3, #0
	beq	.L132
	mov	r3, #2
	b	.L128
.L132:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #20]	@ zero_extendqisi2
	lsr	r3, r3, #7
	and	r3, r3, #255
	lsl	r3, r3, #7
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #20]	@ zero_extendqisi2
	lsr	r3, r3, #6
	and	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #6
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #20]	@ zero_extendqisi2
	lsr	r3, r3, #5
	and	r3, r3, #1
	and	r3, r3, #255
	lsl	r3, r3, #5
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #20]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #3
	and	r3, r3, #255
	lsl	r3, r3, #3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3, #20]
	and	r3, r3, #7
	and	r3, r3, #255
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L133
	mov	r3, #2
	b	.L128
.L133:
	mov	r3, #0
.L128:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	WriteImageDescriptor, .-WriteImageDescriptor
	.section	.rodata
	.align	2
.LC1:
	.ascii	"GIF87a\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	GIF_Create
	.syntax unified
	.arm
	.fpu softvfp
	.type	GIF_Create, %function
GIF_Create:
	@ args = 4, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	str	r3, [fp, #-52]
	ldr	r3, .L150
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L135
	ldr	r3, [fp, #-52]
	mov	r0, r3
	bl	BitsNeeded
	mov	r3, r0
	mov	r2, #1
	lsl	r3, r2, r3
	b	.L136
.L135:
	mov	r3, #0
.L136:
	ldr	r2, .L150+4
	str	r3, [r2]
	ldr	r2, .L150+8
	ldr	r3, [fp, #4]
	str	r3, [r2]
	ldr	r3, [fp, #-48]
	ldr	r2, .L150+12
	str	r3, [r2]
	ldr	r3, [fp, #-44]
	ldr	r2, .L150+16
	str	r3, [r2]
	ldr	r0, [fp, #-40]
	bl	Create
	mov	r3, r0
	cmp	r3, #0
	beq	.L137
	mov	r3, #1
	b	.L148
.L137:
	mov	r1, #6
	ldr	r0, .L150+20
	bl	Write
	mov	r3, r0
	cmp	r3, #0
	beq	.L139
	mov	r3, #2
	b	.L148
.L139:
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-16]
	ldr	r3, .L150+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L140
	ldr	r3, .L150+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	BitsNeeded
	mov	r3, r0
	and	r3, r3, #255
	sub	r3, r3, #1
	and	r3, r3, #255
	and	r3, r3, #7
	and	r2, r3, #255
	ldrb	r3, [fp, #-12]
	and	r2, r2, #7
	bic	r3, r3, #7
	orr	r3, r2, r3
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	orr	r3, r3, #128
	strb	r3, [fp, #-12]
	b	.L141
.L140:
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #7
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #128
	strb	r3, [fp, #-12]
.L141:
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #8
	strb	r3, [fp, #-12]
	ldr	r3, [fp, #4]
	and	r3, r3, #255
	sub	r3, r3, #1
	and	r3, r3, #255
	and	r3, r3, #7
	and	r3, r3, #255
	ldrb	r2, [fp, #-12]
	and	r3, r3, #7
	bic	r2, r2, #112
	lsl	r3, r3, #4
	orr	r3, r3, r2
	mov	r2, r3
	strb	r2, [fp, #-12]
	mov	r3, #0
	strb	r3, [fp, #-11]
	mov	r3, #0
	strb	r3, [fp, #-10]
	sub	r3, fp, #20
	mov	r0, r3
	bl	WriteScreenDescriptor
	mov	r3, r0
	cmp	r3, #0
	beq	.L142
	mov	r3, #2
	b	.L148
.L142:
	ldr	r3, .L150+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L143
	ldr	r3, .L150+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L150+24
	mov	r2, #0
	str	r2, [r3]
.L143:
	ldr	r3, .L150+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L144
	ldr	r3, .L150+4
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L150+24
	str	r2, [r3]
	ldr	r3, .L150+24
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L145
	mov	r3, #3
	b	.L148
.L145:
	ldr	r3, .L150+24
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L146
.L147:
	ldr	r3, [fp, #-28]
	add	r2, r3, #1
	str	r2, [fp, #-28]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L146:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L147
.L144:
	mov	r3, #0
.L148:
	ldr	r2, .L150
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L149
	bl	__stack_chk_fail
.L149:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L151:
	.align	2
.L150:
	.word	.LC2
	.word	NumColors
	.word	BitsPrPrimColor
	.word	ScreenHeight
	.word	ScreenWidth
	.word	.LC1
	.word	ColorTable
	.size	GIF_Create, .-GIF_Create
	.global	__aeabi_idiv
	.align	2
	.global	GIF_SetColor
	.syntax unified
	.arm
	.fpu softvfp
	.type	GIF_SetColor, %function
GIF_SetColor:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, .L153
	ldr	r3, [r3]
	mov	r2, #1
	lsl	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, .L153+4
	ldr	r1, [r3]
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	add	r3, r1, r3
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #8
	sub	r3, r3, r2
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r1, r3
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	and	r2, r1, #255
	strb	r2, [r3]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #8
	sub	r3, r3, r2
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r1, r3
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	and	r2, r1, #255
	strb	r2, [r3]
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #8
	sub	r3, r3, r2
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r1, r3
	ldr	r3, [fp, #-8]
	add	r2, r3, #1
	str	r2, [fp, #-8]
	and	r2, r1, #255
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L154:
	.align	2
.L153:
	.word	BitsPrPrimColor
	.word	ColorTable
	.size	GIF_SetColor, .-GIF_SetColor
	.align	2
	.global	GIF_SetTransparent
	.syntax unified
	.arm
	.fpu softvfp
	.type	GIF_SetTransparent, %function
GIF_SetTransparent:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r2, .L156
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L157:
	.align	2
.L156:
	.word	TransparentColorIndex
	.size	GIF_SetTransparent, .-GIF_SetTransparent
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	GIF_CompressImage
	.syntax unified
	.arm
	.fpu softvfp
	.type	GIF_CompressImage, %function
GIF_CompressImage:
	@ args = 4, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #4]
	str	r3, [fp, #-64]
	ldr	r3, .L173
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bge	.L159
	ldr	r3, .L173+4
	ldr	r3, [r3]
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-48]
.L159:
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bge	.L160
	ldr	r3, .L173+8
	ldr	r3, [r3]
	str	r3, [fp, #-60]
	mov	r3, #0
	str	r3, [fp, #-52]
.L160:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bge	.L161
	mov	r3, #0
	str	r3, [fp, #-48]
.L161:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bge	.L162
	mov	r3, #0
	str	r3, [fp, #-52]
.L162:
	ldr	r3, .L173+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L163
	ldr	r3, .L173+16
	ldr	r0, [r3]
	ldr	r3, .L173+12
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r1, r3
	bl	Write
	mov	r3, r0
	cmp	r3, #0
	beq	.L163
	mov	r3, #2
	b	.L171
.L163:
	ldr	r3, .L173+20
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L165
	ldr	r3, .L173+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	WriteTransparentColorIndex
	mov	r3, r0
	cmp	r3, #0
	beq	.L165
	mov	r3, #2
	b	.L171
.L165:
	mov	r3, #44
	strb	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	ldr	r2, .L173+24
	str	r3, [r2]
	ldr	r3, .L173+24
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-52]
	ldr	r2, .L173+28
	str	r3, [r2]
	ldr	r3, .L173+28
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-56]
	ldr	r2, .L173+32
	str	r3, [r2]
	ldr	r3, .L173+32
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-60]
	ldr	r2, .L173+36
	str	r3, [r2]
	ldr	r3, .L173+36
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #7
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #24
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #32
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #64
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #128
	strb	r3, [fp, #-12]
	sub	r3, fp, #32
	mov	r0, r3
	bl	WriteImageDescriptor
	mov	r3, r0
	cmp	r3, #0
	beq	.L166
	mov	r3, #2
	b	.L171
.L166:
	ldr	r3, .L173+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	BitsNeeded
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	bne	.L167
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L167:
	ldr	r3, [fp, #-40]
	and	r3, r3, #255
	mov	r0, r3
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L168
	mov	r3, #2
	b	.L171
.L168:
	ldr	r3, .L173+40
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L173+40
	ldr	r3, [r3]
	ldr	r2, .L173+44
	str	r3, [r2]
	ldr	r2, .L173+48
	ldr	r3, [fp, #-64]
	str	r3, [r2]
	ldr	r1, .L173+52
	ldr	r0, [fp, #-40]
	bl	LZW_Compress
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L169
	ldr	r3, [fp, #-36]
	b	.L171
.L169:
	mov	r0, #0
	bl	WriteByte
	mov	r3, r0
	cmp	r3, #0
	beq	.L170
	mov	r3, #2
	b	.L171
.L170:
	mov	r3, #0
.L171:
	ldr	r2, .L173
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L172
	bl	__stack_chk_fail
.L172:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L174:
	.align	2
.L173:
	.word	.LC3
	.word	ScreenWidth
	.word	ScreenHeight
	.word	NumColors
	.word	ColorTable
	.word	TransparentColorIndex
	.word	ImageLeft
	.word	ImageTop
	.word	ImageWidth
	.word	ImageHeight
	.word	RelPixY
	.word	RelPixX
	.word	GetPixel
	.word	InputByte
	.size	GIF_CompressImage, .-GIF_CompressImage
	.section	.rodata
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	GIF_Close
	.syntax unified
	.arm
	.fpu softvfp
	.type	GIF_Close, %function
GIF_Close:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L181
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #59
	strb	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #7
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #24
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #32
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #64
	strb	r3, [fp, #-12]
	ldrb	r3, [fp, #-12]
	bic	r3, r3, #128
	strb	r3, [fp, #-12]
	sub	r3, fp, #32
	mov	r0, r3
	bl	WriteImageDescriptor
	mov	r3, r0
	cmp	r3, #0
	beq	.L176
	mov	r3, #2
	b	.L179
.L176:
	bl	Close
	ldr	r3, .L181+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L178
	ldr	r3, .L181+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L181+4
	mov	r2, #0
	str	r2, [r3]
.L178:
	mov	r3, #0
.L179:
	ldr	r2, .L181
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L180
	bl	__stack_chk_fail
.L180:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L182:
	.align	2
.L181:
	.word	.LC4
	.word	ColorTable
	.size	GIF_Close, .-GIF_Close
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
