	.file	"59370.c"
	.intel_syntax noprefix
	.text
	.globl	filelength
	.type	filelength, @function
filelength:
.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, 176
	mov	DWORD PTR -164[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fstat@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	filelength, .-filelength
	.section	.rodata
.LC0:
	.string	"-d"
.LC1:
	.string	"-en"
.LC2:
	.string	"-eo"
.LC3:
	.string	"Command not supported"
.LC4:
	.string	"Filename not specified"
.LC5:
	.string	"\nDone"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	call	Title
	cmp	DWORD PTR -20[rbp], 1
	jg	.L5
	call	Usage
.L5:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L6
	mov	DWORD PTR -12[rbp], 0
	jmp	.L7
.L6:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L8
	mov	DWORD PTR -12[rbp], 1
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L9
	mov	DWORD PTR -12[rbp], 1
	mov	DWORD PTR -8[rbp], 1
	jmp	.L7
.L9:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L7:
	cmp	DWORD PTR -20[rbp], 2
	jg	.L10
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L10:
	cmp	DWORD PTR -12[rbp], 0
	je	.L11
	cmp	DWORD PTR -12[rbp], 1
	je	.L12
	jmp	.L16
.L11:
	mov	DWORD PTR -4[rbp], 2
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	BLZ_Decode
	add	DWORD PTR -4[rbp], 1
.L14:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L15
	jmp	.L16
.L12:
	mov	DWORD PTR -4[rbp], 2
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	BLZ_Encode
	add	DWORD PTR -4[rbp], 1
.L17:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L18
	nop
.L16:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC6:
	.string	"\nBLZ - (c) CUE 2011\nBottom LZ coding for Nintendo GBA/DS\n"
	.text
	.globl	Title
	.type	Title, @function
Title:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC6[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Title, .-Title
	.section	.rodata
	.align 8
.LC7:
	.ascii	"Usage: BLZ command filename [filename [...]]\n\ncommand:\n  "
	.ascii	"-d .... decode '"
	.string	"filename'\n  -en ... encode 'filename', normal mode\n  -eo ... encode 'filename', optimal mode (LZ-CUE)\n\n* multiple filenames and wildcards are permitted\n* the original file is overwritten with the new file\n* this codification is used in the DS overlay files"
	.text
	.globl	Usage
	.type	Usage, @function
Usage:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.size	Usage, .-Usage
	.section	.rodata
.LC8:
	.string	"rb"
.LC9:
	.string	"\nFile open error"
.LC10:
	.string	"\nFile size error"
.LC11:
	.string	"\nFile read error"
.LC12:
	.string	"\nFile close error"
	.text
	.globl	Load
	.type	Load, @function
Load:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -52[rbp], edx
	mov	DWORD PTR -56[rbp], ecx
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L23
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	edi, eax
	call	filelength
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L24
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	jle	.L25
.L24:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L25:
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 3
	mov	esi, 1
	mov	edi, eax
	call	Memory
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L26
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L26:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	eax, -1
	jne	.L27
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L27:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Load, .-Load
	.section	.rodata
.LC13:
	.string	"wb"
.LC14:
	.string	"\nFile create error"
.LC15:
	.string	"\nFile write error"
	.text
	.globl	Save
	.type	Save, @function
Save:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -36[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L30
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L30:
	mov	eax, DWORD PTR -36[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L31
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L31:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	cmp	eax, -1
	jne	.L33
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L33:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	Save, .-Save
	.section	.rodata
.LC16:
	.string	"\nMemory error"
	.text
	.globl	Memory
	.type	Memory, @function
Memory:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -24[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -20[rbp]
	imul	eax, DWORD PTR -24[rbp]
	cdqe
	mov	rsi, rdx
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L35
	lea	rdi, .LC16[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L35:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	Memory, .-Memory
	.section	.rodata
.LC17:
	.string	"- decoding '%s'"
.LC18:
	.string	"File has a bad header"
.LC19:
	.string	"Bad header length"
.LC20:
	.string	"Bad length"
.LC21:
	.string	"Bad decoded length"
	.align 8
.LC22:
	.string	", WARNING: wrong decoded length!"
	.align 8
.LC23:
	.string	", WARNING: unexpected end of encoded file!"
	.text
	.globl	BLZ_Decode
	.type	BLZ_Decode, @function
BLZ_Decode:
.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, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, -88[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	ecx, 20971520
	mov	edx, 4
	mov	rdi, rax
	call	Load
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -88[rbp]
	mov	eax, eax
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 0
	jne	.L38
	mov	DWORD PTR -64[rbp], 0
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 4
	mov	DWORD PTR -76[rbp], eax
	mov	DWORD PTR -88[rbp], 0
	mov	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -84[rbp], eax
	jmp	.L39
.L38:
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, 7
	ja	.L40
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L40:
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, 5
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 7
	jbe	.L41
	cmp	DWORD PTR -68[rbp], 11
	jbe	.L42
.L41:
	lea	rdi, .LC19[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L42:
	mov	eax, DWORD PTR -88[rbp]
	cmp	DWORD PTR -68[rbp], eax
	jb	.L43
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L43:
	mov	eax, DWORD PTR -88[rbp]
	mov	eax, eax
	lea	rdx, -8[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	and	eax, 16777215
	mov	DWORD PTR -64[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	sub	eax, DWORD PTR -64[rbp]
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	sub	eax, DWORD PTR -68[rbp]
	mov	DWORD PTR -88[rbp], eax
	mov	edx, DWORD PTR -76[rbp]
	mov	eax, DWORD PTR -64[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	add	eax, edx
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 16777215
	jbe	.L39
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
.L39:
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 1
	mov	edi, eax
	call	Memory
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR -76[rbp]
	mov	edx, DWORD PTR -88[rbp]
	mov	edx, edx
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	edx, DWORD PTR -84[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -80[rbp], 0
	jmp	.L44
.L45:
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, 1[rdx]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 1[rax]
	mov	QWORD PTR -48[rbp], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -80[rbp], 1
.L44:
	mov	eax, DWORD PTR -80[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jb	.L45
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, eax
	mov	ecx, DWORD PTR -76[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rcx
	mov	esi, edx
	mov	rdi, rax
	call	BLZ_Invert
	mov	BYTE PTR -89[rbp], 0
	jmp	.L46
.L56:
	shr	BYTE PTR -89[rbp]
	cmp	BYTE PTR -89[rbp], 0
	jne	.L47
	mov	rax, QWORD PTR -56[rbp]
	cmp	rax, QWORD PTR -24[rbp]
	je	.L59
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -56[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -90[rbp], al
	mov	BYTE PTR -89[rbp], -128
.L47:
	movzx	eax, BYTE PTR -90[rbp]
	and	al, BYTE PTR -89[rbp]
	test	al, al
	jne	.L50
	mov	rax, QWORD PTR -56[rbp]
	cmp	rax, QWORD PTR -24[rbp]
	je	.L60
	mov	rdx, QWORD PTR -56[rbp]
	lea	rax, 1[rdx]
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, 1[rax]
	mov	QWORD PTR -48[rbp], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	jmp	.L46
.L50:
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 1
	cmp	QWORD PTR -24[rbp], rax
	jbe	.L61
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -56[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	DWORD PTR -60[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -56[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	or	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	shr	eax, 12
	add	eax, 3
	mov	DWORD PTR -80[rbp], eax
	mov	edx, DWORD PTR -80[rbp]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	cmp	QWORD PTR -16[rbp], rax
	jnb	.L53
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR -80[rbp], eax
.L53:
	mov	eax, DWORD PTR -60[rbp]
	and	eax, 4095
	add	eax, 3
	mov	DWORD PTR -60[rbp], eax
	jmp	.L54
.L55:
	mov	eax, DWORD PTR -60[rbp]
	neg	rax
	mov	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -48[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -48[rbp], rdx
	movzx	edx, BYTE PTR [rcx]
	mov	BYTE PTR [rax], dl
.L54:
	mov	eax, DWORD PTR -80[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -80[rbp], edx
	test	eax, eax
	jne	.L55
.L46:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jb	.L56
	jmp	.L49
.L59:
	nop
	jmp	.L49
.L60:
	nop
	jmp	.L49
.L61:
	nop
.L49:
	mov	eax, DWORD PTR -84[rbp]
	sub	eax, DWORD PTR -76[rbp]
	mov	edx, eax
	mov	ecx, DWORD PTR -76[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	mov	esi, edx
	mov	rdi, rax
	call	BLZ_Invert
	mov	rax, QWORD PTR -48[rbp]
	sub	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR -84[rbp], eax
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	je	.L57
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
.L57:
	mov	edx, DWORD PTR -84[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	Save
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	edi, 10
	call	putchar@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L58
	call	__stack_chk_fail@PLT
.L58:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	BLZ_Decode, .-BLZ_Decode
	.section	.rodata
.LC24:
	.string	"- encoding '%s'"
	.text
	.globl	BLZ_Encode
	.type	BLZ_Encode, @function
BLZ_Encode:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, -44[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	ecx, 16777215
	mov	edx, 0
	mov	rdi, rax
	call	Load
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -36[rbp], 20971521
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	mov	ecx, DWORD PTR -60[rbp]
	lea	rdx, -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	BLZ_Code
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -36[rbp], eax
	jbe	.L63
	cmp	QWORD PTR -32[rbp], 0
	je	.L64
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
.L64:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -40[rbp]
	mov	DWORD PTR -36[rbp], eax
.L63:
	mov	edx, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	Save
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	edi, 10
	call	putchar@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L65
	call	__stack_chk_fail@PLT
.L65:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	BLZ_Encode, .-BLZ_Encode
	.globl	BLZ_Code
	.type	BLZ_Code, @function
BLZ_Code:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -120[rbp], rdi
	mov	DWORD PTR -124[rbp], esi
	mov	QWORD PTR -136[rbp], rdx
	mov	DWORD PTR -128[rbp], ecx
	mov	DWORD PTR -80[rbp], 0
	mov	eax, DWORD PTR -124[rbp]
	mov	DWORD PTR -76[rbp], eax
	mov	eax, DWORD PTR -124[rbp]
	add	eax, 7
	lea	edx, 7[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 3
	mov	edx, eax
	mov	eax, DWORD PTR -124[rbp]
	add	eax, edx
	add	eax, 11
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	mov	esi, 1
	mov	edi, eax
	call	Memory
	mov	QWORD PTR -48[rbp], rax
	mov	edx, DWORD PTR -124[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	BLZ_Invert
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -124[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	mov	BYTE PTR -109[rbp], 0
	jmp	.L67
.L104:
	shr	BYTE PTR -109[rbp]
	cmp	BYTE PTR -109[rbp], 0
	jne	.L68
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 0
	mov	BYTE PTR -109[rbp], -128
.L68:
	mov	DWORD PTR -96[rbp], 2
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -120[rbp]
	mov	edx, 4098
	cmp	rax, 4098
	cmovg	rax, rdx
	mov	DWORD PTR -60[rbp], eax
	mov	DWORD PTR -100[rbp], 3
	jmp	.L69
.L78:
	mov	DWORD PTR -104[rbp], 0
	jmp	.L70
.L75:
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	cmp	QWORD PTR -16[rbp], rax
	je	.L122
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jnb	.L122
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	mov	ecx, DWORD PTR -100[rbp]
	sub	rax, rcx
	mov	rsi, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L122
	add	DWORD PTR -104[rbp], 1
.L70:
	cmp	DWORD PTR -104[rbp], 17
	jbe	.L75
	jmp	.L72
.L122:
	nop
.L72:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -96[rbp]
	jbe	.L76
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	mov	DWORD PTR -96[rbp], eax
	cmp	DWORD PTR -96[rbp], 18
	je	.L123
.L76:
	add	DWORD PTR -100[rbp], 1
.L69:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jbe	.L78
	jmp	.L77
.L123:
	nop
.L77:
	cmp	DWORD PTR -128[rbp], 0
	je	.L79
	cmp	DWORD PTR -96[rbp], 2
	jbe	.L79
	mov	edx, DWORD PTR -96[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	cmp	QWORD PTR -16[rbp], rax
	jbe	.L79
	mov	eax, DWORD PTR -96[rbp]
	add	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -88[rbp], 2
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -120[rbp]
	mov	edx, 4098
	cmp	rax, 4098
	cmovg	rax, rdx
	mov	DWORD PTR -60[rbp], eax
	mov	DWORD PTR -100[rbp], 3
	jmp	.L80
.L89:
	mov	DWORD PTR -104[rbp], 0
	jmp	.L81
.L86:
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	cmp	QWORD PTR -16[rbp], rax
	je	.L124
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jnb	.L124
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	mov	ecx, DWORD PTR -100[rbp]
	sub	rax, rcx
	mov	rsi, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L124
	add	DWORD PTR -104[rbp], 1
.L81:
	cmp	DWORD PTR -104[rbp], 17
	jbe	.L86
	jmp	.L83
.L124:
	nop
.L83:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	jbe	.L87
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 18
	je	.L125
.L87:
	add	DWORD PTR -100[rbp], 1
.L80:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jbe	.L89
	jmp	.L88
.L125:
	nop
.L88:
	mov	eax, DWORD PTR -96[rbp]
	sub	eax, 1
	mov	eax, eax
	neg	rax
	add	QWORD PTR -32[rbp], rax
	mov	DWORD PTR -84[rbp], 2
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -120[rbp]
	mov	edx, 4098
	cmp	rax, 4098
	cmovg	rax, rdx
	mov	DWORD PTR -60[rbp], eax
	mov	DWORD PTR -100[rbp], 3
	jmp	.L90
.L99:
	mov	DWORD PTR -104[rbp], 0
	jmp	.L91
.L96:
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	cmp	QWORD PTR -16[rbp], rax
	je	.L126
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jnb	.L126
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -104[rbp]
	mov	ecx, DWORD PTR -100[rbp]
	sub	rax, rcx
	mov	rsi, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rsi
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L126
	add	DWORD PTR -104[rbp], 1
.L91:
	cmp	DWORD PTR -104[rbp], 17
	jbe	.L96
	jmp	.L93
.L126:
	nop
.L93:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -84[rbp]
	jbe	.L97
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 18
	je	.L127
.L97:
	add	DWORD PTR -100[rbp], 1
.L90:
	mov	eax, DWORD PTR -100[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jbe	.L99
	jmp	.L98
.L127:
	nop
.L98:
	sub	QWORD PTR -32[rbp], 1
	cmp	DWORD PTR -88[rbp], 2
	ja	.L100
	mov	DWORD PTR -88[rbp], 1
.L100:
	cmp	DWORD PTR -84[rbp], 2
	ja	.L101
	mov	DWORD PTR -84[rbp], 1
.L101:
	mov	edx, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR -88[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -84[rbp]
	add	eax, 1
	cmp	edx, eax
	ja	.L79
	mov	DWORD PTR -96[rbp], 1
.L79:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	lea	edx, [rax+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	cmp	DWORD PTR -96[rbp], 2
	jbe	.L102
	mov	eax, DWORD PTR -96[rbp]
	add	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	or	eax, 1
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -96[rbp]
	sub	eax, 3
	sal	eax, 4
	mov	ecx, eax
	mov	eax, DWORD PTR -92[rbp]
	sub	eax, 3
	shr	eax, 8
	mov	esi, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	or	ecx, esi
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -92[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	lea	edx, -3[rcx]
	mov	BYTE PTR [rax], dl
	jmp	.L103
.L102:
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, 1[rdx]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, 1[rax]
	mov	QWORD PTR -40[rbp], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
.L103:
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -48[rbp]
	mov	rdx, rax
	mov	eax, DWORD PTR -124[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -120[rbp]
	mov	rcx, rax
	mov	rax, rdx
	sub	rax, rcx
	mov	ecx, DWORD PTR -80[rbp]
	mov	edx, DWORD PTR -76[rbp]
	add	edx, ecx
	mov	edx, edx
	cmp	rax, rdx
	jge	.L67
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR -80[rbp], eax
	mov	edx, DWORD PTR -124[rbp]
	mov	rax, QWORD PTR -32[rbp]
	sub	rax, QWORD PTR -120[rbp]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -76[rbp], eax
.L67:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jb	.L104
	jmp	.L105
.L107:
	shr	BYTE PTR -109[rbp]
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	lea	edx, [rax+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
.L105:
	cmp	BYTE PTR -109[rbp], 0
	je	.L106
	cmp	BYTE PTR -109[rbp], 1
	jne	.L107
.L106:
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR -72[rbp], eax
	mov	edx, DWORD PTR -124[rbp]
	mov	rax, QWORD PTR -120[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	BLZ_Invert
	mov	edx, DWORD PTR -72[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	BLZ_Invert
	cmp	DWORD PTR -80[rbp], 0
	je	.L108
	mov	eax, DWORD PTR -124[rbp]
	add	eax, 4
	mov	ecx, eax
	mov	edx, DWORD PTR -80[rbp]
	mov	eax, DWORD PTR -76[rbp]
	add	eax, edx
	add	eax, 3
	and	eax, -4
	add	eax, 8
	cmp	ecx, eax
	jnb	.L109
.L108:
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -120[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -124[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	QWORD PTR -16[rbp], rax
	jmp	.L110
.L111:
	mov	rdx, QWORD PTR -32[rbp]
	lea	rax, 1[rdx]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	lea	rcx, 1[rax]
	mov	QWORD PTR -40[rbp], rcx
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
.L110:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jb	.L111
	jmp	.L112
.L113:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	BYTE PTR [rax], 0
.L112:
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -48[rbp]
	and	eax, 3
	test	rax, rax
	jne	.L113
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 0
	add	QWORD PTR -40[rbp], 4
	jmp	.L114
.L109:
	mov	edx, DWORD PTR -76[rbp]
	mov	eax, DWORD PTR -80[rbp]
	add	eax, edx
	add	eax, 11
	mov	esi, 1
	mov	edi, eax
	call	Memory
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -104[rbp], 0
	jmp	.L115
.L116:
	mov	edx, DWORD PTR -104[rbp]
	mov	rax, QWORD PTR -120[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR -104[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -104[rbp], 1
.L115:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	jb	.L116
	mov	DWORD PTR -104[rbp], 0
	jmp	.L117
.L118:
	mov	edx, DWORD PTR -104[rbp]
	mov	eax, DWORD PTR -72[rbp]
	add	eax, edx
	sub	eax, DWORD PTR -80[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	ecx, DWORD PTR -76[rbp]
	mov	edx, DWORD PTR -104[rbp]
	add	edx, ecx
	mov	ecx, edx
	mov	rdx, QWORD PTR -8[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -104[rbp], 1
.L117:
	mov	eax, DWORD PTR -104[rbp]
	cmp	eax, DWORD PTR -80[rbp]
	jb	.L118
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	edx, DWORD PTR -76[rbp]
	mov	eax, DWORD PTR -80[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	QWORD PTR -40[rbp], rax
	mov	eax, DWORD PTR -80[rbp]
	mov	DWORD PTR -68[rbp], eax
	mov	DWORD PTR -108[rbp], 8
	mov	eax, DWORD PTR -124[rbp]
	sub	eax, DWORD PTR -80[rbp]
	sub	eax, DWORD PTR -76[rbp]
	mov	DWORD PTR -64[rbp], eax
	jmp	.L119
.L120:
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	BYTE PTR [rax], -1
	add	DWORD PTR -108[rbp], 1
.L119:
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -48[rbp]
	and	eax, 3
	test	rax, rax
	jne	.L120
	mov	edx, DWORD PTR -68[rbp]
	mov	eax, DWORD PTR -108[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	add	QWORD PTR -40[rbp], 3
	mov	rax, QWORD PTR -40[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -40[rbp], rdx
	mov	edx, DWORD PTR -108[rbp]
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -64[rbp]
	sub	eax, DWORD PTR -108[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	add	QWORD PTR -40[rbp], 4
.L114:
	mov	rax, QWORD PTR -40[rbp]
	sub	rax, QWORD PTR -48[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -48[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	BLZ_Code, .-BLZ_Code
	.globl	BLZ_Invert
	.type	BLZ_Invert, @function
BLZ_Invert:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	jmp	.L129
.L130:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -9[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	mov	rdx, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, -1[rax]
	mov	QWORD PTR -8[rbp], rdx
	movzx	edx, BYTE PTR -9[rbp]
	mov	BYTE PTR [rax], dl
.L129:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jb	.L130
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	BLZ_Invert, .-BLZ_Invert
	.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	"59370.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	filelength
	.syntax unified
	.arm
	.fpu softvfp
	.type	filelength, %function
filelength:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	fstat
	ldr	r3, [fp, #-56]
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.size	filelength, .-filelength
	.section	.rodata
	.align	2
.LC1:
	.ascii	"-d\000"
	.align	2
.LC2:
	.ascii	"-en\000"
	.align	2
.LC3:
	.ascii	"-eo\000"
	.align	2
.LC4:
	.ascii	"Command not supported\000"
	.align	2
.LC5:
	.ascii	"Filename not specified\000"
	.align	2
.LC6:
	.ascii	"\012Done\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-28]
	bl	Title
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bgt	.L7
	bl	Usage
.L7:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L22
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L9
.L8:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L22+4
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L9
.L10:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L22+8
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	mov	r3, #1
	str	r3, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L9
.L11:
	ldr	r0, .L22+12
	bl	puts
	mvn	r0, #0
	bl	exit
.L9:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bgt	.L12
	ldr	r0, .L22+16
	bl	puts
	mvn	r0, #0
	bl	exit
.L12:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	beq	.L14
	b	.L18
.L13:
	mov	r3, #2
	str	r3, [fp, #-8]
	b	.L16
.L17:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	BLZ_Decode
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L17
	b	.L18
.L14:
	mov	r3, #2
	str	r3, [fp, #-8]
	b	.L19
.L20:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	BLZ_Encode
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L20
	nop
.L18:
	ldr	r0, .L22+20
	bl	puts
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC7:
	.ascii	"\012BLZ - (c) CUE 2011\012Bottom LZ coding for Nint"
	.ascii	"endo GBA/DS\012\000"
	.text
	.align	2
	.global	Title
	.syntax unified
	.arm
	.fpu softvfp
	.type	Title, %function
Title:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L25
	bl	puts
	nop
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC7
	.size	Title, .-Title
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Usage: BLZ command filename [filename [...]]\012\012"
	.ascii	"command:\012  -d .... decode 'filename'\012  -en .."
	.ascii	". encode 'filename', normal mode\012  -eo ... encod"
	.ascii	"e 'filename', optimal mode (LZ-CUE)\012\012* multip"
	.ascii	"le filenames and wildcards are permitted\012* the o"
	.ascii	"riginal file is overwritten with the new file\012* "
	.ascii	"this codification is used in the DS overlay files\000"
	.text
	.align	2
	.global	Usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	Usage, %function
Usage:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L28
	bl	puts
	mvn	r0, #0
	bl	exit
.L29:
	.align	2
.L28:
	.word	.LC8
	.size	Usage, .-Usage
	.section	.rodata
	.align	2
.LC9:
	.ascii	"rb\000"
	.align	2
.LC10:
	.ascii	"\012File open error\000"
	.align	2
.LC11:
	.ascii	"\012File size error\000"
	.align	2
.LC12:
	.ascii	"\012File read error\000"
	.align	2
.LC13:
	.ascii	"\012File close error\000"
	.text
	.align	2
	.global	Load
	.syntax unified
	.arm
	.fpu softvfp
	.type	Load, %function
Load:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #-36]
	ldr	r1, .L37
	ldr	r0, [fp, #-24]
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L31
	ldr	r0, .L37+4
	bl	puts
	mvn	r0, #0
	bl	exit
.L31:
	ldr	r0, [fp, #-16]
	bl	fileno
	mov	r3, r0
	mov	r0, r3
	bl	filelength
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L32
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L33
.L32:
	ldr	r0, .L37+8
	bl	puts
	mvn	r0, #0
	bl	exit
.L33:
	ldr	r3, [fp, #-12]
	add	r3, r3, #3
	mov	r1, #1
	mov	r0, r3
	bl	Memory
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	fread
	mov	r2, r0
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	beq	.L34
	ldr	r0, .L37+12
	bl	puts
	mvn	r0, #0
	bl	exit
.L34:
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, r0
	cmn	r3, #1
	bne	.L35
	ldr	r0, .L37+16
	bl	puts
	mvn	r0, #0
	bl	exit
.L35:
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	Load, .-Load
	.section	.rodata
	.align	2
.LC14:
	.ascii	"wb\000"
	.align	2
.LC15:
	.ascii	"\012File create error\000"
	.align	2
.LC16:
	.ascii	"\012File write error\000"
	.text
	.align	2
	.global	Save
	.syntax unified
	.arm
	.fpu softvfp
	.type	Save, %function
Save:
	@ 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]
	ldr	r1, .L44
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L40
	ldr	r0, .L44+4
	bl	puts
	mvn	r0, #0
	bl	exit
.L40:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	mov	r1, #1
	ldr	r0, [fp, #-20]
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	beq	.L41
	ldr	r0, .L44+8
	bl	puts
	mvn	r0, #0
	bl	exit
.L41:
	ldr	r0, [fp, #-8]
	bl	fclose
	mov	r3, r0
	cmn	r3, #1
	bne	.L43
	ldr	r0, .L44+12
	bl	puts
	mvn	r0, #0
	bl	exit
.L43:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC13
	.size	Save, .-Save
	.section	.rodata
	.align	2
.LC17:
	.ascii	"\012Memory error\000"
	.text
	.align	2
	.global	Memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	Memory, %function
Memory:
	@ 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]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-20]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-20]
	mov	r1, r3
	mov	r0, r2
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L47
	ldr	r0, .L49
	bl	puts
	mvn	r0, #0
	bl	exit
.L47:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC17
	.size	Memory, .-Memory
	.section	.rodata
	.align	2
.LC18:
	.ascii	"- decoding '%s'\000"
	.align	2
.LC19:
	.ascii	"File has a bad header\000"
	.align	2
.LC20:
	.ascii	"Bad header length\000"
	.align	2
.LC21:
	.ascii	"Bad length\000"
	.align	2
.LC22:
	.ascii	"Bad decoded length\000"
	.align	2
.LC23:
	.ascii	", WARNING: wrong decoded length!\000"
	.align	2
.LC24:
	.ascii	", WARNING: unexpected end of encoded file!\000"
	.align	2
.LC25:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	BLZ_Decode
	.syntax unified
	.arm
	.fpu softvfp
	.type	BLZ_Decode, %function
BLZ_Decode:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	ldr	r3, .L76
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, [fp, #-72]
	ldr	r0, .L76+4
	bl	printf
	sub	r1, fp, #64
	mov	r3, #20971520
	mov	r2, #4
	ldr	r0, [fp, #-72]
	bl	Load
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-64]
	sub	r3, r3, #4
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L52
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-64]
	sub	r3, r3, #4
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-52]
	b	.L53
.L52:
	ldr	r3, [fp, #-64]
	cmp	r3, #7
	bhi	.L54
	ldr	r0, .L76+8
	bl	puts
	mvn	r0, #0
	bl	exit
.L54:
	ldr	r3, [fp, #-64]
	sub	r3, r3, #5
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #7
	bls	.L55
	ldr	r3, [fp, #-32]
	cmp	r3, #11
	bls	.L56
.L55:
	ldr	r0, .L76+12
	bl	puts
	mvn	r0, #0
	bl	exit
.L56:
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bcc	.L57
	ldr	r0, .L76+16
	bl	puts
	mvn	r0, #0
	bl	exit
.L57:
	ldr	r3, [fp, #-64]
	sub	r3, r3, #8
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	ldr	r3, [r3]
	bic	r3, r3, #-16777216
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	sub	r3, r2, r3
	str	r3, [fp, #-64]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	add	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #16777216
	bcc	.L53
	ldr	r0, .L76+20
	bl	puts
	mvn	r0, #0
	bl	exit
.L53:
	ldr	r3, [fp, #-52]
	mov	r1, #1
	mov	r0, r3
	bl	Memory
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-40]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-56]
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-52]
	add	r3, r2, r3
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L58
.L59:
	ldr	r2, [fp, #-60]
	add	r3, r2, #1
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-56]
	add	r1, r3, #1
	str	r1, [fp, #-56]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L58:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bcc	.L59
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-64]
	mov	r1, r2
	mov	r0, r3
	bl	BLZ_Invert
	mov	r3, #0
	strb	r3, [fp, #-65]
	b	.L60
.L70:
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	lsr	r3, r3, #1
	strb	r3, [fp, #-65]
	ldrb	r3, [fp, #-65]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L61
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L73
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]
	strb	r3, [fp, #-66]
	mvn	r3, #127
	strb	r3, [fp, #-65]
.L61:
	ldrb	r2, [fp, #-66]
	ldrb	r3, [fp, #-65]
	and	r3, r3, r2
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L64
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	beq	.L74
	ldr	r2, [fp, #-60]
	add	r3, r2, #1
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-56]
	add	r1, r3, #1
	str	r1, [fp, #-56]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	b	.L60
.L64:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bls	.L75
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-60]
	add	r2, r3, #1
	str	r2, [fp, #-60]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	orr	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	lsr	r3, r3, #12
	add	r3, r3, #3
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bcs	.L67
	ldr	r0, .L76+24
	bl	printf
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-56]
	sub	r3, r2, r3
	str	r3, [fp, #-48]
.L67:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #20
	lsr	r3, r3, #20
	add	r3, r3, #3
	str	r3, [fp, #-12]
	b	.L68
.L69:
	ldr	r3, [fp, #-12]
	rsb	r3, r3, #0
	ldr	r2, [fp, #-56]
	add	r2, r2, r3
	ldr	r3, [fp, #-56]
	add	r1, r3, #1
	str	r1, [fp, #-56]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L68:
	ldr	r3, [fp, #-48]
	sub	r2, r3, #1
	str	r2, [fp, #-48]
	cmp	r3, #0
	bne	.L69
.L60:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bcc	.L70
	b	.L63
.L73:
	nop
	b	.L63
.L74:
	nop
	b	.L63
.L75:
	nop
.L63:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-44]
	add	r0, r2, r3
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	mov	r1, r3
	bl	BLZ_Invert
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	beq	.L71
	ldr	r0, .L76+28
	bl	printf
.L71:
	ldr	r3, [fp, #-52]
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-72]
	bl	Save
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r0, [fp, #-40]
	bl	free
	mov	r0, #10
	bl	putchar
	nop
	ldr	r3, .L76
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L72
	bl	__stack_chk_fail
.L72:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC25
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.size	BLZ_Decode, .-BLZ_Decode
	.section	.rodata
	.align	2
.LC26:
	.ascii	"- encoding '%s'\000"
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	BLZ_Encode
	.syntax unified
	.arm
	.fpu softvfp
	.type	BLZ_Encode, %function
BLZ_Encode:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L82
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, [fp, #-40]
	ldr	r0, .L82+4
	bl	printf
	sub	r1, fp, #32
	mvn	r3, #-16777216
	mov	r2, #0
	ldr	r0, [fp, #-40]
	bl	Load
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, .L82+8
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	mov	r1, r3
	sub	r2, fp, #28
	ldr	r3, [fp, #-44]
	ldr	r0, [fp, #-16]
	bl	BLZ_Code
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bls	.L79
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L80
	ldr	r0, [fp, #-24]
	bl	free
.L80:
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-20]
.L79:
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-40]
	bl	Save
	ldr	r0, [fp, #-24]
	bl	free
	ldr	r0, [fp, #-16]
	bl	free
	mov	r0, #10
	bl	putchar
	nop
	ldr	r3, .L82
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L81
	bl	__stack_chk_fail
.L81:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	.LC27
	.word	.LC26
	.word	20971521
	.size	BLZ_Encode, .-BLZ_Encode
	.align	2
	.global	BLZ_Code
	.syntax unified
	.arm
	.fpu softvfp
	.type	BLZ_Code, %function
BLZ_Code:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	str	r2, [fp, #-104]
	str	r3, [fp, #-108]
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-100]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-100]
	add	r3, r3, #7
	add	r2, r3, #7
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	add	r3, r3, #11
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	mov	r1, #1
	mov	r0, r3
	bl	Memory
	str	r0, [fp, #-88]
	ldr	r1, [fp, #-100]
	ldr	r0, [fp, #-96]
	bl	BLZ_Invert
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-96]
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	str	r3, [fp, #-32]
	mov	r3, #0
	strb	r3, [fp, #-89]
	b	.L85
.L122:
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	lsr	r3, r3, #1
	strb	r3, [fp, #-89]
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L86
	ldr	r3, [fp, #-84]
	add	r2, r3, #1
	str	r2, [fp, #-84]
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-76]
	mov	r2, #0
	strb	r2, [r3]
	mvn	r3, #127
	strb	r3, [fp, #-89]
.L86:
	mov	r3, #2
	str	r3, [fp, #-60]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	ldr	r2, .L146
	cmp	r3, r2
	movlt	r3, r3
	movge	r3, r2
	str	r3, [fp, #-16]
	mov	r3, #3
	str	r3, [fp, #-64]
	b	.L87
.L96:
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L88
.L93:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	beq	.L140
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	bcs	.L140
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-68]
	ldr	r3, [fp, #-64]
	sub	r3, r1, r3
	ldr	r1, [fp, #-80]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L140
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L88:
	ldr	r3, [fp, #-68]
	cmp	r3, #17
	bls	.L93
	b	.L90
.L140:
	nop
.L90:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	bls	.L94
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-68]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #18
	beq	.L141
.L94:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L87:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bls	.L96
	b	.L95
.L141:
	nop
.L95:
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	beq	.L97
	ldr	r3, [fp, #-60]
	cmp	r3, #2
	bls	.L97
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	bls	.L97
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	str	r3, [fp, #-80]
	mov	r3, #2
	str	r3, [fp, #-52]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	ldr	r2, .L146
	cmp	r3, r2
	movlt	r3, r3
	movge	r3, r2
	str	r3, [fp, #-16]
	mov	r3, #3
	str	r3, [fp, #-64]
	b	.L98
.L107:
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L99
.L104:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	beq	.L142
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	bcs	.L142
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-68]
	ldr	r3, [fp, #-64]
	sub	r3, r1, r3
	ldr	r1, [fp, #-80]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L142
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L99:
	ldr	r3, [fp, #-68]
	cmp	r3, #17
	bls	.L104
	b	.L101
.L142:
	nop
.L101:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	bls	.L105
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-68]
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #18
	beq	.L143
.L105:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L98:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bls	.L107
	b	.L106
.L143:
	nop
.L106:
	ldr	r3, [fp, #-60]
	rsb	r3, r3, #1
	ldr	r2, [fp, #-80]
	add	r3, r2, r3
	str	r3, [fp, #-80]
	mov	r3, #2
	str	r3, [fp, #-48]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	ldr	r2, .L146
	cmp	r3, r2
	movlt	r3, r3
	movge	r3, r2
	str	r3, [fp, #-16]
	mov	r3, #3
	str	r3, [fp, #-64]
	b	.L108
.L117:
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L109
.L114:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	beq	.L144
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	bcs	.L144
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-68]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-68]
	ldr	r3, [fp, #-64]
	sub	r3, r1, r3
	ldr	r1, [fp, #-80]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L144
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L109:
	ldr	r3, [fp, #-68]
	cmp	r3, #17
	bls	.L114
	b	.L111
.L144:
	nop
.L111:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bls	.L115
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-68]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #18
	beq	.L145
.L115:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
.L108:
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bls	.L117
	b	.L116
.L145:
	nop
.L116:
	ldr	r3, [fp, #-80]
	sub	r3, r3, #1
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-52]
	cmp	r3, #2
	bhi	.L118
	mov	r3, #1
	str	r3, [fp, #-52]
.L118:
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	bhi	.L119
	mov	r3, #1
	str	r3, [fp, #-48]
.L119:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-52]
	add	r2, r2, r3
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	cmp	r2, r3
	bhi	.L97
	mov	r3, #1
	str	r3, [fp, #-60]
.L97:
	ldr	r3, [fp, #-76]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, [fp, #-76]
	strb	r2, [r3]
	ldr	r3, [fp, #-60]
	cmp	r3, #2
	bls	.L120
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-76]
	ldrb	r3, [r3]	@ zero_extendqisi2
	orr	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, [fp, #-76]
	strb	r2, [r3]
	ldr	r3, [fp, #-60]
	and	r3, r3, #255
	sub	r3, r3, #3
	and	r3, r3, #255
	lsl	r3, r3, #4
	and	r1, r3, #255
	ldr	r3, [fp, #-56]
	sub	r3, r3, #3
	lsr	r3, r3, #8
	and	r2, r3, #255
	ldr	r3, [fp, #-84]
	add	r0, r3, #1
	str	r0, [fp, #-84]
	orr	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-56]
	and	r2, r3, #255
	ldr	r3, [fp, #-84]
	add	r1, r3, #1
	str	r1, [fp, #-84]
	sub	r2, r2, #3
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L121
.L120:
	ldr	r2, [fp, #-80]
	add	r3, r2, #1
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-84]
	add	r1, r3, #1
	str	r1, [fp, #-84]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L121:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-88]
	sub	r2, r2, r3
	ldr	r3, [fp, #-100]
	add	r2, r2, r3
	ldr	r1, [fp, #-80]
	ldr	r3, [fp, #-96]
	sub	r3, r1, r3
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	cmp	r1, r3
	bcs	.L85
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	ldr	r2, [fp, #-100]
	sub	r3, r2, r3
	str	r3, [fp, #-40]
.L85:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bcc	.L122
	b	.L123
.L125:
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	lsr	r3, r3, #1
	strb	r3, [fp, #-89]
	ldr	r3, [fp, #-76]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, [fp, #-76]
	strb	r2, [r3]
.L123:
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L124
	ldrb	r3, [fp, #-89]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L125
.L124:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	str	r3, [fp, #-36]
	ldr	r1, [fp, #-100]
	ldr	r0, [fp, #-96]
	bl	BLZ_Invert
	ldr	r3, [fp, #-36]
	mov	r1, r3
	ldr	r0, [fp, #-88]
	bl	BLZ_Invert
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L126
	ldr	r3, [fp, #-100]
	add	r3, r3, #4
	mov	r1, r3
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #-40]
	add	r3, r2, r3
	add	r3, r3, #3
	bic	r3, r3, #3
	add	r3, r3, #8
	cmp	r1, r3
	bcs	.L127
.L126:
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-96]
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-100]
	ldr	r2, [fp, #-96]
	add	r3, r2, r3
	str	r3, [fp, #-32]
	b	.L128
.L129:
	ldr	r2, [fp, #-80]
	add	r3, r2, #1
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-84]
	add	r1, r3, #1
	str	r1, [fp, #-84]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
.L128:
	ldr	r2, [fp, #-80]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bcc	.L129
	b	.L130
.L131:
	ldr	r3, [fp, #-84]
	add	r2, r3, #1
	str	r2, [fp, #-84]
	mov	r2, #0
	strb	r2, [r3]
.L130:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	and	r3, r3, #3
	cmp	r3, #0
	bne	.L131
	ldr	r3, [fp, #-84]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	str	r3, [fp, #-84]
	b	.L132
.L127:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	add	r3, r3, #11
	mov	r1, #1
	mov	r0, r3
	bl	Memory
	str	r0, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L133
.L134:
	ldr	r2, [fp, #-96]
	ldr	r3, [fp, #-68]
	add	r2, r2, r3
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-68]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L133:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	bcc	.L134
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L135
.L136:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-36]
	add	r2, r2, r3
	ldr	r3, [fp, #-44]
	sub	r3, r2, r3
	ldr	r2, [fp, #-88]
	add	r2, r2, r3
	ldr	r1, [fp, #-40]
	ldr	r3, [fp, #-68]
	add	r3, r1, r3
	ldr	r1, [fp, #-28]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L135:
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bcc	.L136
	ldr	r3, [fp, #-88]
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-88]
	ldr	r0, [fp, #-84]
	bl	free
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	ldr	r2, [fp, #-88]
	add	r3, r2, r3
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-24]
	mov	r3, #8
	str	r3, [fp, #-72]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-44]
	sub	r2, r2, r3
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	b	.L137
.L138:
	ldr	r3, [fp, #-84]
	add	r2, r3, #1
	str	r2, [fp, #-84]
	mvn	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-72]
	add	r3, r3, #1
	str	r3, [fp, #-72]
.L137:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-88]
	sub	r3, r2, r3
	and	r3, r3, #3
	cmp	r3, #0
	bne	.L138
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-72]
	add	r2, r2, r3
	ldr	r3, [fp, #-84]
	str	r2, [r3]
	ldr	r3, [fp, #-84]
	add	r3, r3, #3
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-84]
	add	r2, r3, #1
	str	r2, [fp, #-84]
	ldr	r2, [fp, #-72]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-72]
	sub	r2, r2, r3
	ldr	r3, [fp, #-84]
	str	r2, [r3]
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	str	r3, [fp, #-84]
.L132:
	ldr	r2, [fp, #-84]
	ldr	r3, [fp, #-88]
	sub	r2, r2, r3
	ldr	r3, [fp, #-104]
	str	r2, [r3]
	ldr	r3, [fp, #-88]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L147:
	.align	2
.L146:
	.word	4098
	.size	BLZ_Code, .-BLZ_Code
	.align	2
	.global	BLZ_Invert
	.syntax unified
	.arm
	.fpu softvfp
	.type	BLZ_Invert, %function
BLZ_Invert:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	b	.L149
.L150:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r2, r3, #1
	str	r2, [fp, #-8]
	ldrb	r2, [fp, #-9]
	strb	r2, [r3]
.L149:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L150
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	BLZ_Invert, .-BLZ_Invert
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
