	.file	"387797.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"apt"
.LC1:
	.string	"clm"
.LC2:
	.string	"dat"
.LC3:
	.string	"own"
.LC4:
	.string	"slb"
.LC5:
	.string	"tng"
.LC6:
	.string	"txt"
.LC7:
	.string	"wib"
	.section	.data.rel.local,"aw"
	.align 32
	.type	file_exts, @object
	.size	file_exts, 64
file_exts:
	.quad	.LC0
	.quad	.LC1
	.quad	.LC2
	.quad	.LC3
	.quad	.LC4
	.quad	.LC5
	.quad	.LC6
	.quad	.LC7
	.section	.rodata
.LC8:
	.string	"c"
.LC9:
	.string	"v"
.LC10:
	.string	"x"
.LC11:
	.string	"Too few arguments\n"
.LC12:
	.string	"Unknown action: %s\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], -1
	cmp	DWORD PTR -20[rbp], 1
	jne	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	show_usage
	mov	eax, 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	mov	DWORD PTR -4[rbp], 0
.L4:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L5
	mov	DWORD PTR -4[rbp], 1
.L5:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L6
	mov	DWORD PTR -4[rbp], 2
.L6:
	cmp	DWORD PTR -20[rbp], 2
	jne	.L7
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	show_usage
	mov	eax, 1
	jmp	.L3
.L7:
	cmp	DWORD PTR -4[rbp], -1
	jne	.L8
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	show_usage
	mov	eax, 1
	jmp	.L3
.L8:
	cmp	DWORD PTR -4[rbp], 2
	je	.L9
	cmp	DWORD PTR -4[rbp], 2
	jg	.L10
	cmp	DWORD PTR -4[rbp], 0
	je	.L11
	cmp	DWORD PTR -4[rbp], 1
	je	.L12
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 16[rax]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 2
	mov	rsi, rdx
	mov	edi, eax
	call	create_archive
	jmp	.L10
.L12:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 16[rax]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 2
	mov	rsi, rdx
	mov	edi, eax
	call	view_archive
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 16[rax]
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 2
	mov	rsi, rdx
	mov	edi, eax
	call	extract_archive
	nop
.L10:
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC13:
	.string	"Out of memory. Aborting."
	.align 8
.LC14:
	.string	"Too few arguments given. Aborting.\n"
.LC15:
	.string	"dklevel"
.LC16:
	.string	".dk"
.LC17:
	.string	".DK"
.LC18:
	.string	"wb"
	.align 8
.LC19:
	.string	"Can't open output file %s. Aborting.\n"
.LC20:
	.string	"Level name: "
.LC21:
	.string	"Level description: "
.LC22:
	.string	"Author name: "
.LC23:
	.string	"Number of players: "
	.align 8
.LC24:
	.string	"Invalid number. Must be between 1 and 4."
.LC25:
	.string	"Creating archive %s\n"
.LC26:
	.string	".INF"
.LC27:
	.string	".inf"
.LC28:
	.string	"rb"
.LC29:
	.string	"Can't open %s. Aborting.\n"
.LC30:
	.string	"Done."
	.text
	.globl	create_archive
	.type	create_archive, @function
create_archive:
.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, 384
	mov	DWORD PTR -372[rbp], edi
	mov	QWORD PTR -384[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 65536
	call	malloc@PLT
	mov	QWORD PTR -344[rbp], rax
	cmp	QWORD PTR -344[rbp], 0
	jne	.L14
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	edi, 0
	call	time@PLT
	mov	QWORD PTR -352[rbp], rax
	lea	rax, -352[rbp]
	mov	rdi, rax
	call	ctime@PLT
	mov	QWORD PTR -336[rbp], rax
	mov	rax, QWORD PTR -336[rbp]
	mov	rdi, rax
	call	strip_crlf
	cmp	DWORD PTR -372[rbp], 1
	jg	.L15
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	show_usage
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 4
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -328[rbp], rax
	cmp	QWORD PTR -328[rbp], 0
	jne	.L16
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	rax, QWORD PTR -384[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -328[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	jne	.L17
	mov	rax, QWORD PTR -328[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	jne	.L17
	mov	rax, QWORD PTR -328[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -328[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 7037998
.L17:
	mov	rax, QWORD PTR -328[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -320[rbp], rax
	cmp	QWORD PTR -320[rbp], 0
	jne	.L18
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -192[rbp]
	mov	esi, 39
	mov	rdi, rax
	call	fgets@PLT
	lea	rdi, .LC21[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -96[rbp]
	mov	esi, 79
	mov	rdi, rax
	call	fgets@PLT
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -144[rbp]
	mov	esi, 39
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -192[rbp]
	mov	rdi, rax
	call	strip_crlf
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	strip_crlf
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	strip_crlf
	mov	DWORD PTR -368[rbp], 0
	jmp	.L19
.L21:
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -202[rbp]
	mov	esi, 5
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -202[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -368[rbp], eax
	cmp	DWORD PTR -368[rbp], 0
	jle	.L20
	cmp	DWORD PTR -368[rbp], 4
	jle	.L19
.L20:
	lea	rdi, .LC24[rip]
	call	puts@PLT
.L19:
	cmp	DWORD PTR -368[rbp], 0
	jle	.L21
	cmp	DWORD PTR -368[rbp], 4
	jg	.L21
	mov	rax, QWORD PTR -328[rbp]
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	mov	edi, 68
	call	fputc@PLT
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	mov	edi, 75
	call	fputc@PLT
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	mov	edi, 76
	call	fputc@PLT
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rax
	mov	edi, 86
	call	fputc@PLT
	lea	rdx, -192[rbp]
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_string
	lea	rdx, -144[rbp]
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_string
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_string
	mov	rdx, QWORD PTR -336[rbp]
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_string
	mov	rdx, QWORD PTR -320[rbp]
	mov	eax, DWORD PTR -368[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	BYTE PTR -197[rbp], 46
	mov	DWORD PTR -356[rbp], -1
	mov	DWORD PTR -360[rbp], 1
	jmp	.L22
.L27:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	jne	.L23
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L24
.L23:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -312[rbp], rax
	cmp	QWORD PTR -312[rbp], 0
	je	.L50
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -356[rbp], eax
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L24
.L50:
	nop
.L24:
	add	DWORD PTR -360[rbp], 1
.L22:
	cmp	DWORD PTR -356[rbp], 0
	jns	.L26
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, DWORD PTR -372[rbp]
	jl	.L27
.L26:
	cmp	DWORD PTR -356[rbp], -1
	jne	.L28
	mov	DWORD PTR -356[rbp], 0
.L28:
	mov	rdx, QWORD PTR -320[rbp]
	mov	eax, DWORD PTR -356[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	DWORD PTR -364[rbp], 0
	jmp	.L29
.L40:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, file_exts[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	lea	rax, -197[rbp]
	add	rax, 1
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	QWORD PTR -272[rbp+rax*8], 0
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	DWORD PTR -304[rbp+rax*4], 0
	mov	DWORD PTR -360[rbp], 1
	jmp	.L30
.L33:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -197[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L31
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	QWORD PTR -272[rbp+rax*8], rdx
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	file_length
	mov	edx, eax
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	DWORD PTR -304[rbp+rax*4], edx
.L31:
	add	DWORD PTR -360[rbp], 1
.L30:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	test	eax, eax
	jne	.L32
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, DWORD PTR -372[rbp]
	jl	.L33
.L32:
	mov	DWORD PTR -360[rbp], 1
	jmp	.L34
.L35:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	movzx	eax, BYTE PTR -197[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	mov	BYTE PTR -197[rbp+rax], dl
	add	DWORD PTR -360[rbp], 1
.L34:
	cmp	DWORD PTR -360[rbp], 3
	jle	.L35
	mov	DWORD PTR -360[rbp], 1
	jmp	.L36
.L39:
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	lea	rdx, -197[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L37
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	QWORD PTR -272[rbp+rax*8], rdx
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -384[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	file_length
	mov	edx, eax
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	DWORD PTR -304[rbp+rax*4], edx
.L37:
	add	DWORD PTR -360[rbp], 1
.L36:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	test	eax, eax
	jne	.L38
	mov	eax, DWORD PTR -360[rbp]
	cmp	eax, DWORD PTR -372[rbp]
	jl	.L39
.L38:
	add	DWORD PTR -364[rbp], 1
.L29:
	cmp	DWORD PTR -364[rbp], 7
	jle	.L40
	mov	DWORD PTR -364[rbp], 0
	jmp	.L41
.L42:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	movsx	rdx, eax
	mov	rax, QWORD PTR -320[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	write_long
	add	DWORD PTR -364[rbp], 1
.L41:
	cmp	DWORD PTR -364[rbp], 7
	jle	.L42
	mov	DWORD PTR -364[rbp], 0
	jmp	.L43
.L48:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	test	eax, eax
	je	.L44
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	rax, QWORD PTR -272[rbp+rax*8]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -312[rbp], rax
	cmp	QWORD PTR -312[rbp], 0
	jne	.L46
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	rax, QWORD PTR -272[rbp+rax*8]
	mov	rsi, rax
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L47:
	mov	rdx, QWORD PTR -312[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 65536
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 65536
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	lea	edx, -65536[rax]
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	DWORD PTR -304[rbp+rax*4], edx
.L46:
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	cmp	eax, 65536
	jg	.L47
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -312[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	eax, DWORD PTR -304[rbp+rax*4]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -320[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	eax, DWORD PTR -364[rbp]
	cdqe
	mov	DWORD PTR -304[rbp+rax*4], -1
	mov	rax, QWORD PTR -312[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L44:
	add	DWORD PTR -364[rbp], 1
.L43:
	cmp	DWORD PTR -364[rbp], 7
	jle	.L48
	mov	rax, QWORD PTR -320[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L49
	call	__stack_chk_fail@PLT
.L49:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	create_archive, .-create_archive
	.globl	file_length
	.type	file_length, @function
file_length:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L52
	mov	rax, -1
	jmp	.L53
.L52:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -8[rbp]
.L53:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	file_length, .-file_length
	.section	.rodata
	.align 8
.LC31:
	.string	"Too many filenames given. Ignoring all but the first."
.LC32:
	.string	"Not a valid DK level archive"
.LC33:
	.string	"Level name: %s\n"
.LC34:
	.string	"Description: %s\n"
.LC35:
	.string	"Author: %s\n"
.LC36:
	.string	"Creation date: %s\n"
.LC37:
	.string	"Number of players: %d\n"
.LC38:
	.string	"Contains files: "
.LC39:
	.string	"%s "
	.text
	.globl	view_archive
	.type	view_archive, @function
view_archive:
.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, 272
	mov	DWORD PTR -148[rbp], edi
	mov	QWORD PTR -160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -148[rbp], 1
	jle	.L55
	lea	rdi, .LC31[rip]
	call	puts@PLT
.L55:
	mov	rax, QWORD PTR -160[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	open_archive
	mov	QWORD PTR -136[rbp], rax
	lea	rax, -272[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	load_info
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR -256[rbp]
	mov	rdx, QWORD PTR -248[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR -216[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR -200[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -176[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	eax, DWORD PTR -128[rbp]
	test	eax, eax
	jne	.L56
	lea	rdi, .LC32[rip]
	call	puts@PLT
	jmp	.L54
.L56:
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, rax
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rax
	lea	rdi, .LC34[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC35[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC36[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, eax
	lea	rdi, .LC37[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC38[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -140[rbp], 0
	jmp	.L58
.L60:
	mov	eax, DWORD PTR -140[rbp]
	cdqe
	add	rax, 6
	mov	rax, QWORD PTR -128[rbp+rax*8]
	test	rax, rax
	je	.L59
	mov	eax, DWORD PTR -140[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, file_exts[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
.L59:
	add	DWORD PTR -140[rbp], 1
.L58:
	cmp	DWORD PTR -140[rbp], 7
	jle	.L60
	mov	edi, 10
	call	putchar@PLT
.L54:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L61
	call	__stack_chk_fail@PLT
.L61:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	view_archive, .-view_archive
	.section	.rodata
.LC40:
	.string	"Out of memory."
	.align 8
.LC41:
	.string	"Too many arguments given. Ignoring final ones."
	.align 8
.LC42:
	.string	"Invalid level number. Aborting."
.LC43:
	.string	"Extracting level."
.LC44:
	.string	"."
.LC45:
	.string	"%s%cmap%.5d.inf"
.LC46:
	.string	"%s%cmap%.5d.%s"
.LC47:
	.string	"Extracting %s...\n"
.LC48:
	.string	"Imagining %s...\n"
	.align 8
.LC49:
	.string	"Can't recreate file. Aborting."
.LC50:
	.string	"%s%cmap%.5d.slb"
	.text
	.globl	extract_archive
	.type	extract_archive, @function
extract_archive:
.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, 336
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 65536
	call	malloc@PLT
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -160[rbp], 0
	jne	.L63
	lea	rdi, .LC40[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L63:
	cmp	DWORD PTR -212[rbp], 3
	jle	.L64
	lea	rdi, .LC41[rip]
	call	puts@PLT
.L64:
	cmp	DWORD PTR -212[rbp], 1
	jg	.L65
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	show_usage
	mov	edi, 1
	call	exit@PLT
.L65:
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	open_archive
	mov	QWORD PTR -152[rbp], rax
	lea	rax, -336[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	load_info
	mov	rax, QWORD PTR -336[rbp]
	mov	rdx, QWORD PTR -328[rbp]
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR -320[rbp]
	mov	rdx, QWORD PTR -312[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR -304[rbp]
	mov	rdx, QWORD PTR -296[rbp]
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR -288[rbp]
	mov	rdx, QWORD PTR -280[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -256[rbp]
	mov	rdx, QWORD PTR -248[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	eax, DWORD PTR -128[rbp]
	test	eax, eax
	jne	.L66
	lea	rdi, .LC32[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L66:
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -204[rbp], eax
	cmp	DWORD PTR -204[rbp], 0
	jne	.L67
	lea	rdi, .LC42[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L67:
	lea	rdi, .LC43[rip]
	call	puts@PLT
	cmp	DWORD PTR -212[rbp], 3
	jne	.L68
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -168[rbp], rax
	jmp	.L69
.L68:
	lea	rax, .LC44[rip]
	mov	QWORD PTR -168[rbp], rax
.L69:
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 20
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -144[rbp], rax
	mov	ecx, DWORD PTR -204[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -144[rbp]
	mov	r8d, ecx
	mov	ecx, 47
	lea	rsi, .LC45[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -144[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L70
	mov	rax, QWORD PTR -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L70:
	mov	eax, DWORD PTR -84[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR -200[rbp], 0
	jmp	.L71
.L76:
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	rax, QWORD PTR -128[rbp+rax*8]
	test	rax, rax
	je	.L72
	mov	rax, QWORD PTR -200[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, file_exts[rip]
	mov	rsi, QWORD PTR [rdx+rax]
	mov	ecx, DWORD PTR -204[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -144[rbp]
	mov	r9, rsi
	mov	r8d, ecx
	mov	ecx, 47
	lea	rsi, .LC46[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -144[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L73
	mov	rax, QWORD PTR -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L73:
	mov	rax, QWORD PTR -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC47[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L74
.L75:
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 65536
	mov	rdi, rax
	call	fread@PLT
	mov	rdx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 65536
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	rax, QWORD PTR -128[rbp+rax*8]
	lea	rdx, -65536[rax]
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	QWORD PTR -128[rbp+rax*8], rdx
.L74:
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	rax, QWORD PTR -128[rbp+rax*8]
	cmp	rax, 65536
	jg	.L75
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	rax, QWORD PTR -128[rbp+rax*8]
	mov	rsi, rax
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	rax, QWORD PTR -128[rbp+rax*8]
	mov	rsi, rax
	mov	rdx, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	QWORD PTR -128[rbp+rax*8], -1
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L72:
	add	QWORD PTR -200[rbp], 1
.L71:
	cmp	QWORD PTR -200[rbp], 7
	jle	.L76
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR -200[rbp], 0
	jmp	.L77
.L102:
	mov	rax, QWORD PTR -200[rbp]
	add	rax, 6
	mov	rax, QWORD PTR -128[rbp+rax*8]
	test	rax, rax
	jne	.L78
	mov	rax, QWORD PTR -200[rbp]
	lea	rdx, 0[0+rax*8]
	lea	rax, file_exts[rip]
	mov	rsi, QWORD PTR [rdx+rax]
	mov	ecx, DWORD PTR -204[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -144[rbp]
	mov	r9, rsi
	mov	r8d, ecx
	mov	ecx, 47
	lea	rsi, .LC46[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -144[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L79
	mov	rax, QWORD PTR -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L79:
	mov	rax, QWORD PTR -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC48[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	QWORD PTR -200[rbp], 7
	je	.L80
	cmp	QWORD PTR -200[rbp], 7
	jg	.L81
	cmp	QWORD PTR -200[rbp], 6
	je	.L82
	cmp	QWORD PTR -200[rbp], 6
	jg	.L81
	cmp	QWORD PTR -200[rbp], 0
	je	.L83
	cmp	QWORD PTR -200[rbp], 0
	js	.L81
	mov	rax, QWORD PTR -200[rbp]
	sub	rax, 1
	cmp	rax, 4
	ja	.L81
	lea	rdi, .LC49[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L83:
	mov	QWORD PTR -192[rbp], 0
	jmp	.L84
.L85:
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	fputc@PLT
	add	QWORD PTR -192[rbp], 1
.L84:
	cmp	QWORD PTR -192[rbp], 3
	jle	.L85
	jmp	.L81
.L82:
	mov	edx, DWORD PTR -88[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	build_text_default
	jmp	.L81
.L80:
	mov	ecx, DWORD PTR -204[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR -144[rbp]
	mov	r8d, ecx
	mov	ecx, 47
	lea	rsi, .LC50[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	file_length
	cmp	rax, 14450
	jne	.L86
	mov	rax, QWORD PTR -144[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	jne	.L87
.L86:
	mov	QWORD PTR -192[rbp], 0
	jmp	.L88
.L89:
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	fputc@PLT
	add	QWORD PTR -192[rbp], 1
.L88:
	cmp	QWORD PTR -192[rbp], 65535
	jle	.L89
	jmp	.L104
.L87:
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -160[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 14450
	mov	rdi, rax
	call	fread@PLT
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR -192[rbp], 0
	jmp	.L91
.L99:
	mov	QWORD PTR -176[rbp], 0
	jmp	.L92
.L98:
	mov	QWORD PTR -184[rbp], 0
	jmp	.L93
.L97:
	mov	rdx, QWORD PTR -192[rbp]
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	mov	rdx, rax
	sal	rdx, 4
	add	rdx, rax
	mov	rax, QWORD PTR -184[rbp]
	add	rax, rdx
	add	rax, rax
	mov	rdx, rax
	mov	rax, QWORD PTR -160[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -205[rbp], al
	cmp	BYTE PTR -205[rbp], 12
	je	.L94
	cmp	BYTE PTR -205[rbp], 13
	jne	.L95
.L94:
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	fputc@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	fputc@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	fputc@PLT
	jmp	.L96
.L95:
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	fputc@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	fputc@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	fputc@PLT
.L96:
	add	QWORD PTR -184[rbp], 1
.L93:
	cmp	QWORD PTR -184[rbp], 84
	jle	.L97
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	fputc@PLT
	add	QWORD PTR -176[rbp], 1
.L92:
	cmp	QWORD PTR -176[rbp], 2
	jle	.L98
	add	QWORD PTR -192[rbp], 1
.L91:
	cmp	QWORD PTR -192[rbp], 84
	jle	.L99
	mov	QWORD PTR -192[rbp], 0
	jmp	.L100
.L101:
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	fputc@PLT
	add	QWORD PTR -192[rbp], 1
.L100:
	cmp	QWORD PTR -192[rbp], 255
	jle	.L101
	jmp	.L105
.L104:
.L105:
	nop
.L81:
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L78:
	add	QWORD PTR -200[rbp], 1
.L77:
	cmp	QWORD PTR -200[rbp], 7
	jle	.L102
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	free@PLT
	lea	rdi, .LC30[rip]
	call	puts@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L103
	call	__stack_chk_fail@PLT
.L103:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	extract_archive, .-extract_archive
	.section	.rodata
.LC51:
	.string	"DKLV"
	.text
	.globl	load_info
	.type	load_info, @function
load_info:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 168
	.cfi_offset 3, -24
	mov	QWORD PTR -168[rbp], rdi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -176[rbp]
	lea	rax, -28[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -144[rbp], 0
	lea	rax, -28[rbp]
	mov	edx, 4
	lea	rsi, .LC51[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L107
	mov	rax, QWORD PTR -168[rbp]
	mov	rcx, QWORD PTR -144[rbp]
	mov	rbx, QWORD PTR -136[rbp]
	mov	QWORD PTR [rax], rcx
	mov	QWORD PTR 8[rax], rbx
	mov	rcx, QWORD PTR -128[rbp]
	mov	rbx, QWORD PTR -120[rbp]
	mov	QWORD PTR 16[rax], rcx
	mov	QWORD PTR 24[rax], rbx
	mov	rcx, QWORD PTR -112[rbp]
	mov	rbx, QWORD PTR -104[rbp]
	mov	QWORD PTR 32[rax], rcx
	mov	QWORD PTR 40[rax], rbx
	mov	rcx, QWORD PTR -96[rbp]
	mov	rbx, QWORD PTR -88[rbp]
	mov	QWORD PTR 48[rax], rcx
	mov	QWORD PTR 56[rax], rbx
	mov	rcx, QWORD PTR -80[rbp]
	mov	rbx, QWORD PTR -72[rbp]
	mov	QWORD PTR 64[rax], rcx
	mov	QWORD PTR 72[rax], rbx
	mov	rcx, QWORD PTR -64[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	mov	QWORD PTR 80[rax], rcx
	mov	QWORD PTR 88[rax], rbx
	mov	rcx, QWORD PTR -48[rbp]
	mov	rbx, QWORD PTR -40[rbp]
	mov	QWORD PTR 96[rax], rcx
	mov	QWORD PTR 104[rax], rbx
	jmp	.L111
.L107:
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	load_string
	mov	QWORD PTR -136[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	load_string
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	load_string
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	load_string
	mov	QWORD PTR -112[rbp], rax
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -104[rbp], eax
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -100[rbp], eax
	mov	DWORD PTR -148[rbp], 0
	jmp	.L109
.L110:
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	read_long
	mov	edx, DWORD PTR -148[rbp]
	movsx	rdx, edx
	add	rdx, 6
	mov	QWORD PTR -144[rbp+rdx*8], rax
	add	DWORD PTR -148[rbp], 1
.L109:
	cmp	DWORD PTR -148[rbp], 7
	jle	.L110
	mov	DWORD PTR -144[rbp], 1
	mov	rax, QWORD PTR -168[rbp]
	mov	rcx, QWORD PTR -144[rbp]
	mov	rbx, QWORD PTR -136[rbp]
	mov	QWORD PTR [rax], rcx
	mov	QWORD PTR 8[rax], rbx
	mov	rcx, QWORD PTR -128[rbp]
	mov	rbx, QWORD PTR -120[rbp]
	mov	QWORD PTR 16[rax], rcx
	mov	QWORD PTR 24[rax], rbx
	mov	rcx, QWORD PTR -112[rbp]
	mov	rbx, QWORD PTR -104[rbp]
	mov	QWORD PTR 32[rax], rcx
	mov	QWORD PTR 40[rax], rbx
	mov	rcx, QWORD PTR -96[rbp]
	mov	rbx, QWORD PTR -88[rbp]
	mov	QWORD PTR 48[rax], rcx
	mov	QWORD PTR 56[rax], rbx
	mov	rcx, QWORD PTR -80[rbp]
	mov	rbx, QWORD PTR -72[rbp]
	mov	QWORD PTR 64[rax], rcx
	mov	QWORD PTR 72[rax], rbx
	mov	rcx, QWORD PTR -64[rbp]
	mov	rbx, QWORD PTR -56[rbp]
	mov	QWORD PTR 80[rax], rcx
	mov	QWORD PTR 88[rax], rbx
	mov	rcx, QWORD PTR -48[rbp]
	mov	rbx, QWORD PTR -40[rbp]
	mov	QWORD PTR 96[rax], rcx
	mov	QWORD PTR 104[rax], rbx
.L111:
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L112
	call	__stack_chk_fail@PLT
.L112:
	mov	rax, QWORD PTR -168[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	load_info, .-load_info
	.globl	read_long
	.type	read_long, @function
read_long:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	cdqe
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	sal	eax, 8
	cdqe
	add	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	sal	eax, 16
	cdqe
	add	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	sal	eax, 24
	cdqe
	add	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	read_long, .-read_long
	.globl	write_long
	.type	write_long, @function
write_long:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, al
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	rax, QWORD PTR -16[rbp]
	sar	rax, 8
	movzx	eax, al
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	rax, QWORD PTR -16[rbp]
	sar	rax, 16
	movzx	eax, al
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	rax, QWORD PTR -16[rbp]
	sar	rax, 24
	movzx	eax, al
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	write_long, .-write_long
	.globl	write_string
	.type	write_string, @function
write_string:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movzx	eax, al
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	mov	eax, DWORD PTR -4[rbp]
	sar	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	fputc@PLT
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	write_string, .-write_string
	.globl	load_string
	.type	load_string, @function
load_string:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	sal	eax, 8
	add	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L118
	lea	rdi, .LC40[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L118:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rsi, eax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	load_string, .-load_string
	.section	.rodata
	.align 8
.LC52:
	.string	"Can't open %s or any variation on it. Aborting.\n"
	.text
	.globl	open_archive
	.type	open_archive, @function
open_archive:
.LFB16:
	.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 -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 4
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L121
	lea	rdi, .LC40[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L121:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L122
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L123
.L122:
	add	QWORD PTR -32[rbp], 1
.L123:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L124
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L125
.L124:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L126
.L127:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -24[rbp], 1
.L126:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L127
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L128
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L125
.L128:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L129
.L130:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -24[rbp], 1
.L129:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L130
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L131
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L125
.L131:
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 7037998
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L132
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L125
.L132:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L133
.L134:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -24[rbp], 1
.L133:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L134
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L135
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L125
.L135:
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L136
.L137:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -24[rbp], 1
.L136:
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L137
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L138
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L125
.L138:
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC52[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L125:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	open_archive, .-open_archive
	.section	.rodata
.LC53:
	.string	"Usage:"
	.align 8
.LC54:
	.string	"%s c <archive> <files> - Create a Dungeon Keeper level archive\n"
	.align 8
.LC55:
	.string	"%s v <archive> - View the description of a level archive\n"
	.align 8
.LC56:
	.string	"%s x <archive> <level number> [path] - Extract an archive\n\n"
	.align 8
.LC57:
	.string	"When extracting an archive, you can give the path of the levels \ndirectory, eg c:\\games\\keeper\\levels"
	.text
	.globl	show_usage
	.type	show_usage, @function
show_usage:
.LFB17:
	.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
	lea	rdi, .LC53[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC54[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC55[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC56[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC57[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	show_usage, .-show_usage
	.section	.rodata
.LC58:
	.string	"SET_GENERATE_SPEED (400)\r\n"
	.align 8
.LC59:
	.string	"MAX_CREATURES(ALL_PLAYERS,17)\r\n"
	.align 8
.LC60:
	.string	"START_MONEY(ALL_PLAYERS,10000)\r\n"
.LC61:
	.string	"ADD_CREATURE_TO_POOL(%s,20)\r\n"
	.align 8
.LC62:
	.string	"CREATURE_AVAILABLE(ALL_PLAYERS,%s,1,1)\r\n"
	.align 8
.LC63:
	.string	"ROOM_AVAILABLE(ALL_PLAYERS,%s,1,%d)\r\n"
	.align 8
.LC64:
	.string	"MAGIC_AVAILABLE(ALL_PLAYERS,POWER_%s,1,%d)\r\n"
	.align 8
.LC65:
	.string	"DOOR_AVAILABLE(ALL_PLAYERS,%s,%d,0)\r\n"
	.align 8
.LC66:
	.string	"TRAP_AVAILABLE(ALL_PLAYERS,%s,%d,0)\r\n"
	.align 8
.LC67:
	.string	"IF(PLAYER%d, ALL_DUNGEONS_DESTROYED == 1)\r\n"
.LC68:
	.string	"WIN_GAME\r\n"
	.align 8
.LC69:
	.string	"DISPLAY_OBJECTIVE(0, PLAYER%d)\r\nENDIF\r\n"
	.text
	.globl	build_text_default
	.type	build_text_default, @function
build_text_default:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC58[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC59[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 32
	mov	esi, 1
	lea	rdi, .LC60[rip]
	call	fwrite@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L141
.L142:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, creatures.4[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC61[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L141:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, creatures.4[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L142
	mov	DWORD PTR -4[rbp], 0
	jmp	.L143
.L144:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, creatures.4[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC62[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L143:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, creatures.4[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L144
	mov	DWORD PTR -4[rbp], 0
	jmp	.L145
.L146:
	cmp	DWORD PTR -4[rbp], 3
	setle	al
	movzx	ecx, al
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, rooms.3[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC63[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L145:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, rooms.3[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L146
	mov	DWORD PTR -4[rbp], 0
	jmp	.L147
.L148:
	cmp	DWORD PTR -4[rbp], 3
	setle	al
	movzx	ecx, al
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, magic.2[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC64[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L147:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, magic.2[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L148
	mov	DWORD PTR -4[rbp], 0
	jmp	.L149
.L150:
	cmp	DWORD PTR -4[rbp], 3
	setle	al
	movzx	ecx, al
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, doors.1[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC65[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L149:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, doors.1[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L150
	mov	DWORD PTR -4[rbp], 0
	jmp	.L151
.L152:
	cmp	DWORD PTR -4[rbp], 3
	setle	al
	movzx	ecx, al
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, traps.0[rip]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC66[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L151:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, traps.0[rip]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L152
	mov	DWORD PTR -4[rbp], 0
	jmp	.L153
.L154:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC67[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 10
	mov	esi, 1
	lea	rdi, .LC68[rip]
	call	fwrite@PLT
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC69[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -4[rbp], 1
.L153:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L154
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	build_text_default, .-build_text_default
	.globl	strip_crlf
	.type	strip_crlf, @function
strip_crlf:
.LFB19:
	.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	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	eax, 1
	mov	DWORD PTR -12[rbp], eax
	jmp	.L156
.L160:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 31
	ja	.L161
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	sub	DWORD PTR -12[rbp], 1
.L156:
	cmp	DWORD PTR -12[rbp], 0
	jns	.L160
	jmp	.L162
.L161:
	nop
.L162:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	strip_crlf, .-strip_crlf
	.section	.rodata
.LC70:
	.string	"BILE_DEMON"
.LC71:
	.string	"DRAGON"
.LC72:
	.string	"DARK_MISTRESS"
.LC73:
	.string	"HELL_HOUND"
.LC74:
	.string	"TENTACLE"
.LC75:
	.string	"DEMONSPAWN"
.LC76:
	.string	"SORCEROR"
.LC77:
	.string	"TROLL"
.LC78:
	.string	"SPIDER"
.LC79:
	.string	"BUG"
.LC80:
	.string	"FLY"
.LC81:
	.string	"ORC"
	.section	.data.rel.local
	.align 32
	.type	creatures.4, @object
	.size	creatures.4, 104
creatures.4:
	.quad	.LC70
	.quad	.LC71
	.quad	.LC72
	.quad	.LC73
	.quad	.LC74
	.quad	.LC75
	.quad	.LC76
	.quad	.LC77
	.quad	.LC78
	.quad	.LC79
	.quad	.LC80
	.quad	.LC81
	.quad	0
	.section	.rodata
.LC82:
	.string	"TREASURE"
.LC83:
	.string	"RESEARCH"
.LC84:
	.string	"GARDEN"
.LC85:
	.string	"LAIR"
.LC86:
	.string	"GRAVEYARD"
.LC87:
	.string	"PRISON"
.LC88:
	.string	"TORTURE"
.LC89:
	.string	"TRAINING"
.LC90:
	.string	"SCAVENGER"
.LC91:
	.string	"BARRACKS"
.LC92:
	.string	"TEMPLE"
.LC93:
	.string	"GUARD_POST"
.LC94:
	.string	"WORKSHOP"
	.section	.data.rel.local
	.align 32
	.type	rooms.3, @object
	.size	rooms.3, 112
rooms.3:
	.quad	.LC82
	.quad	.LC83
	.quad	.LC84
	.quad	.LC85
	.quad	.LC86
	.quad	.LC87
	.quad	.LC88
	.quad	.LC89
	.quad	.LC90
	.quad	.LC91
	.quad	.LC92
	.quad	.LC93
	.quad	.LC94
	.quad	0
	.section	.rodata
.LC95:
	.string	"HAND"
.LC96:
	.string	"OBEY"
.LC97:
	.string	"IMP"
.LC98:
	.string	"SLAP"
.LC99:
	.string	"SIGHT"
.LC100:
	.string	"CALL_TO_ARMS"
.LC101:
	.string	"CAVE_IN"
.LC102:
	.string	"HEAL_CREATURE"
.LC103:
	.string	"HOLD_AUDIENCE"
.LC104:
	.string	"CHICKEN"
.LC105:
	.string	"SPEED"
.LC106:
	.string	"LIGHTNING"
.LC107:
	.string	"CONCEAL"
.LC108:
	.string	"PROTECT"
.LC109:
	.string	"DISEASE"
.LC110:
	.string	"DESTROY_WALLS"
.LC111:
	.string	"ARMAGEDDON"
	.section	.data.rel.local
	.align 32
	.type	magic.2, @object
	.size	magic.2, 144
magic.2:
	.quad	.LC95
	.quad	.LC96
	.quad	.LC97
	.quad	.LC98
	.quad	.LC99
	.quad	.LC100
	.quad	.LC101
	.quad	.LC102
	.quad	.LC103
	.quad	.LC104
	.quad	.LC105
	.quad	.LC106
	.quad	.LC107
	.quad	.LC108
	.quad	.LC109
	.quad	.LC110
	.quad	.LC111
	.quad	0
	.section	.rodata
.LC112:
	.string	"WOOD"
.LC113:
	.string	"BRACED"
.LC114:
	.string	"STEEL"
.LC115:
	.string	"MAGIC"
	.section	.data.rel.local
	.align 32
	.type	doors.1, @object
	.size	doors.1, 32
doors.1:
	.quad	.LC112
	.quad	.LC113
	.quad	.LC114
	.quad	.LC115
	.section	.rodata
.LC116:
	.string	"ALARM"
.LC117:
	.string	"POISON_GAS"
.LC118:
	.string	"LAVA"
.LC119:
	.string	"BOULDER"
.LC120:
	.string	"WORD_OF_POWER"
	.section	.data.rel.local
	.align 32
	.type	traps.0, @object
	.size	traps.0, 56
traps.0:
	.quad	.LC116
	.quad	.LC117
	.quad	.LC118
	.quad	.LC119
	.quad	.LC106
	.quad	.LC120
	.quad	0
	.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	"387797.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"apt\000"
	.align	2
.LC1:
	.ascii	"clm\000"
	.align	2
.LC2:
	.ascii	"dat\000"
	.align	2
.LC3:
	.ascii	"own\000"
	.align	2
.LC4:
	.ascii	"slb\000"
	.align	2
.LC5:
	.ascii	"tng\000"
	.align	2
.LC6:
	.ascii	"txt\000"
	.align	2
.LC7:
	.ascii	"wib\000"
	.data
	.align	2
	.type	file_exts, %object
	.size	file_exts, 32
file_exts:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.section	.rodata
	.align	2
.LC8:
	.ascii	"c\000"
	.align	2
.LC9:
	.ascii	"v\000"
	.align	2
.LC10:
	.ascii	"x\000"
	.align	2
.LC11:
	.ascii	"Too few arguments\012\000"
	.align	2
.LC12:
	.ascii	"Unknown action: %s\012\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	mvn	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L2
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r0, r3
	bl	show_usage
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L13
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	mov	r3, #0
	str	r3, [fp, #-8]
.L4:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L13+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	str	r3, [fp, #-8]
.L5:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L13+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	mov	r3, #2
	str	r3, [fp, #-8]
.L6:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L7
	ldr	r0, .L13+12
	bl	puts
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r0, r3
	bl	show_usage
	mov	r3, #1
	b	.L3
.L7:
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L8
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+16
	bl	printf
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	mov	r0, r3
	bl	show_usage
	mov	r3, #1
	b	.L3
.L8:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	beq	.L9
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	bgt	.L10
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	beq	.L12
	b	.L10
.L11:
	ldr	r3, [fp, #-16]
	sub	r2, r3, #2
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	mov	r1, r3
	mov	r0, r2
	bl	create_archive
	b	.L10
.L12:
	ldr	r3, [fp, #-16]
	sub	r2, r3, #2
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	mov	r1, r3
	mov	r0, r2
	bl	view_archive
	b	.L10
.L9:
	ldr	r3, [fp, #-16]
	sub	r2, r3, #2
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	mov	r1, r3
	mov	r0, r2
	bl	extract_archive
	nop
.L10:
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Out of memory. Aborting.\000"
	.align	2
.LC14:
	.ascii	"Too few arguments given. Aborting.\012\000"
	.align	2
.LC15:
	.ascii	"dklevel\000"
	.align	2
.LC16:
	.ascii	".dk\000"
	.align	2
.LC17:
	.ascii	".DK\000"
	.align	2
.LC18:
	.ascii	"wb\000"
	.align	2
.LC19:
	.ascii	"Can't open output file %s. Aborting.\012\000"
	.align	2
.LC20:
	.ascii	"Level name: \000"
	.align	2
.LC21:
	.ascii	"Level description: \000"
	.align	2
.LC22:
	.ascii	"Author name: \000"
	.align	2
.LC23:
	.ascii	"Number of players: \000"
	.align	2
.LC24:
	.ascii	"Invalid number. Must be between 1 and 4.\000"
	.align	2
.LC25:
	.ascii	"Creating archive %s\012\000"
	.align	2
.LC26:
	.ascii	".INF\000"
	.align	2
.LC27:
	.ascii	".inf\000"
	.align	2
.LC28:
	.ascii	"rb\000"
	.align	2
.LC29:
	.ascii	"Can't open %s. Aborting.\012\000"
	.align	2
.LC30:
	.ascii	"Done.\000"
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create_archive
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_archive, %function
create_archive:
	@ args = 0, pretend = 0, frame = 296
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #296
	str	r0, [fp, #-296]
	str	r1, [fp, #-300]
	ldr	r3, .L53
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #65536
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L53+4
	bl	puts
	mov	r0, #1
	bl	exit
.L16:
	mov	r0, #0
	bl	time
	mov	r3, r0
	str	r3, [fp, #-288]
	sub	r3, fp, #288
	mov	r0, r3
	bl	ctime
	str	r0, [fp, #-264]
	ldr	r0, [fp, #-264]
	bl	strip_crlf
	ldr	r3, [fp, #-296]
	cmp	r3, #1
	bgt	.L17
	ldr	r0, .L53+8
	bl	puts
	ldr	r0, .L53+12
	bl	show_usage
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, [fp, #-300]
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #4
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-260]
	ldr	r3, [fp, #-260]
	cmp	r3, #0
	bne	.L18
	ldr	r0, .L53+4
	bl	puts
	mov	r0, #1
	bl	exit
.L18:
	ldr	r3, [fp, #-300]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-260]
	bl	strcpy
	ldr	r1, .L53+16
	ldr	r0, [fp, #-260]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r1, .L53+20
	ldr	r0, [fp, #-260]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r0, [fp, #-260]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-260]
	add	r3, r3, r2
	ldr	r2, .L53+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #4
	mov	r2, r3
	bl	memcpy
.L19:
	ldr	r1, .L53+24
	ldr	r0, [fp, #-260]
	bl	fopen
	str	r0, [fp, #-256]
	ldr	r3, [fp, #-256]
	cmp	r3, #0
	bne	.L20
	ldr	r1, [fp, #-260]
	ldr	r0, .L53+28
	bl	printf
	mov	r0, #1
	bl	exit
.L20:
	ldr	r0, .L53+32
	bl	printf
	ldr	r3, .L53+36
	ldr	r2, [r3]
	sub	r3, fp, #168
	mov	r1, #39
	mov	r0, r3
	bl	fgets
	ldr	r0, .L53+40
	bl	printf
	ldr	r3, .L53+36
	ldr	r2, [r3]
	sub	r3, fp, #88
	mov	r1, #79
	mov	r0, r3
	bl	fgets
	ldr	r0, .L53+44
	bl	printf
	ldr	r3, .L53+36
	ldr	r2, [r3]
	sub	r3, fp, #128
	mov	r1, #39
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #168
	mov	r0, r3
	bl	strip_crlf
	sub	r3, fp, #88
	mov	r0, r3
	bl	strip_crlf
	sub	r3, fp, #128
	mov	r0, r3
	bl	strip_crlf
	mov	r3, #0
	str	r3, [fp, #-284]
	b	.L21
.L23:
	ldr	r0, .L53+48
	bl	printf
	ldr	r3, .L53+36
	ldr	r2, [r3]
	sub	r3, fp, #184
	mov	r1, #5
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #184
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	ble	.L22
	ldr	r3, [fp, #-284]
	cmp	r3, #4
	ble	.L21
.L22:
	ldr	r0, .L53+52
	bl	puts
.L21:
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	ble	.L23
	ldr	r3, [fp, #-284]
	cmp	r3, #4
	bgt	.L23
	ldr	r1, [fp, #-260]
	ldr	r0, .L53+56
	bl	printf
	ldr	r1, [fp, #-256]
	mov	r0, #68
	bl	fputc
	ldr	r1, [fp, #-256]
	mov	r0, #75
	bl	fputc
	ldr	r1, [fp, #-256]
	mov	r0, #76
	bl	fputc
	ldr	r1, [fp, #-256]
	mov	r0, #86
	bl	fputc
	sub	r3, fp, #168
	mov	r1, r3
	ldr	r0, [fp, #-256]
	bl	write_string
	sub	r3, fp, #128
	mov	r1, r3
	ldr	r0, [fp, #-256]
	bl	write_string
	sub	r3, fp, #88
	mov	r1, r3
	ldr	r0, [fp, #-256]
	bl	write_string
	ldr	r1, [fp, #-264]
	ldr	r0, [fp, #-256]
	bl	write_string
	ldr	r1, [fp, #-256]
	ldr	r0, [fp, #-284]
	bl	fputc
	mov	r3, #46
	strb	r3, [fp, #-176]
	mvn	r3, #0
	str	r3, [fp, #-272]
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L24
.L29:
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L53+60
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L53+64
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L26
.L25:
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, .L53+68
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-252]
	ldr	r3, [fp, #-252]
	cmp	r3, #0
	beq	.L52
	ldr	r0, [fp, #-252]
	bl	fgetc
	str	r0, [fp, #-272]
	ldr	r0, [fp, #-252]
	bl	fclose
	b	.L26
.L52:
	nop
.L26:
	ldr	r3, [fp, #-276]
	add	r3, r3, #1
	str	r3, [fp, #-276]
.L24:
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bge	.L28
	ldr	r2, [fp, #-276]
	ldr	r3, [fp, #-296]
	cmp	r2, r3
	blt	.L29
.L28:
	ldr	r3, [fp, #-272]
	cmn	r3, #1
	bne	.L30
	mov	r3, #0
	str	r3, [fp, #-272]
.L30:
	ldr	r1, [fp, #-256]
	ldr	r0, [fp, #-272]
	bl	fputc
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L31
.L42:
	sub	r3, fp, #176
	add	r3, r3, #1
	ldr	r1, .L53+72
	ldr	r2, [fp, #-280]
	ldr	r2, [r1, r2, lsl #2]
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-244]
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-212]
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L32
.L35:
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #176
	mov	r1, r2
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L33
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-244]
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	file_length
	mov	r2, r0
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-212]
.L33:
	ldr	r3, [fp, #-276]
	add	r3, r3, #1
	str	r3, [fp, #-276]
.L32:
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	cmp	r3, #0
	bne	.L34
	ldr	r2, [fp, #-276]
	ldr	r3, [fp, #-296]
	cmp	r2, r3
	blt	.L35
.L34:
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L36
.L37:
	sub	r2, fp, #176
	ldr	r3, [fp, #-276]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r1, r3, #255
	sub	r2, fp, #176
	ldr	r3, [fp, #-276]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-276]
	add	r3, r3, #1
	str	r3, [fp, #-276]
.L36:
	ldr	r3, [fp, #-276]
	cmp	r3, #3
	ble	.L37
	mov	r3, #1
	str	r3, [fp, #-276]
	b	.L38
.L41:
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r2, fp, #176
	mov	r1, r2
	mov	r0, r3
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L39
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-244]
	ldr	r3, [fp, #-276]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-300]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	file_length
	mov	r2, r0
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-212]
.L39:
	ldr	r3, [fp, #-276]
	add	r3, r3, #1
	str	r3, [fp, #-276]
.L38:
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	cmp	r3, #0
	bne	.L40
	ldr	r2, [fp, #-276]
	ldr	r3, [fp, #-296]
	cmp	r2, r3
	blt	.L41
.L40:
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
.L31:
	ldr	r3, [fp, #-280]
	cmp	r3, #7
	ble	.L42
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L43
.L44:
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	mov	r1, r3
	ldr	r0, [fp, #-256]
	bl	write_long
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
.L43:
	ldr	r3, [fp, #-280]
	cmp	r3, #7
	ble	.L44
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L45
.L50:
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	cmp	r3, #0
	beq	.L46
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-244]
	ldr	r1, .L53+68
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-252]
	ldr	r3, [fp, #-252]
	cmp	r3, #0
	bne	.L48
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-244]
	mov	r1, r3
	ldr	r0, .L53+76
	bl	printf
	mov	r0, #1
	bl	exit
.L49:
	ldr	r3, [fp, #-252]
	mov	r2, #1
	mov	r1, #65536
	ldr	r0, [fp, #-268]
	bl	fread
	ldr	r3, [fp, #-256]
	mov	r2, #1
	mov	r1, #65536
	ldr	r0, [fp, #-268]
	bl	fwrite
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	sub	r2, r3, #65536
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-212]
.L48:
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	cmp	r3, #65536
	bgt	.L49
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	mov	r1, r3
	ldr	r3, [fp, #-252]
	mov	r2, #1
	ldr	r0, [fp, #-268]
	bl	fread
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-212]
	mov	r1, r3
	ldr	r3, [fp, #-256]
	mov	r2, #1
	ldr	r0, [fp, #-268]
	bl	fwrite
	ldr	r3, [fp, #-280]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-212]
	ldr	r0, [fp, #-252]
	bl	fclose
.L46:
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
.L45:
	ldr	r3, [fp, #-280]
	cmp	r3, #7
	ble	.L50
	ldr	r0, [fp, #-256]
	bl	fclose
	ldr	r0, .L53+80
	bl	puts
	nop
	ldr	r3, .L53
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L51
	bl	__stack_chk_fail
.L51:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC31
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	stdin
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	file_exts
	.word	.LC29
	.word	.LC30
	.size	create_archive, .-create_archive
	.align	2
	.global	file_length
	.syntax unified
	.arm
	.fpu softvfp
	.type	file_length, %function
file_length:
	@ 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	r1, .L58
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L56
	mvn	r3, #0
	b	.L57
.L56:
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	fseek
	ldr	r0, [fp, #-12]
	bl	ftell
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	fclose
	ldr	r3, [fp, #-8]
.L57:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC28
	.size	file_length, .-file_length
	.section	.rodata
	.align	2
.LC32:
	.ascii	"Too many filenames given. Ignoring all but the firs"
	.ascii	"t.\000"
	.align	2
.LC33:
	.ascii	"Not a valid DK level archive\000"
	.align	2
.LC34:
	.ascii	"Level name: %s\012\000"
	.align	2
.LC35:
	.ascii	"Description: %s\012\000"
	.align	2
.LC36:
	.ascii	"Author: %s\012\000"
	.align	2
.LC37:
	.ascii	"Creation date: %s\012\000"
	.align	2
.LC38:
	.ascii	"Number of players: %d\012\000"
	.align	2
.LC39:
	.ascii	"Contains files: \000"
	.align	2
.LC40:
	.ascii	"%s \000"
	.align	2
.LC41:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	view_archive
	.syntax unified
	.arm
	.fpu softvfp
	.type	view_archive, %function
view_archive:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L68
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-80]
	cmp	r3, #1
	ble	.L61
	ldr	r0, .L68+4
	bl	puts
.L61:
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	open_archive
	str	r0, [fp, #-72]
	sub	r3, fp, #148
	ldr	r1, [fp, #-72]
	mov	r0, r3
	bl	load_info
	sub	ip, fp, #68
	sub	lr, fp, #148
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L62
	ldr	r0, .L68+8
	bl	puts
	b	.L60
.L62:
	ldr	r3, [fp, #-64]
	mov	r1, r3
	ldr	r0, .L68+12
	bl	printf
	ldr	r3, [fp, #-56]
	mov	r1, r3
	ldr	r0, .L68+16
	bl	printf
	ldr	r3, [fp, #-60]
	mov	r1, r3
	ldr	r0, .L68+20
	bl	printf
	ldr	r3, [fp, #-52]
	mov	r1, r3
	ldr	r0, .L68+24
	bl	printf
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, .L68+28
	bl	printf
	ldr	r0, .L68+32
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L64
.L66:
	ldr	r3, [fp, #-76]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	cmp	r3, #0
	beq	.L65
	ldr	r2, .L68+36
	ldr	r3, [fp, #-76]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L68+40
	bl	printf
.L65:
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L64:
	ldr	r3, [fp, #-76]
	cmp	r3, #7
	ble	.L66
	mov	r0, #10
	bl	putchar
.L60:
	ldr	r3, .L68
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L67
	bl	__stack_chk_fail
.L67:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC41
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	file_exts
	.word	.LC40
	.size	view_archive, .-view_archive
	.section	.rodata
	.align	2
.LC42:
	.ascii	"Out of memory.\000"
	.align	2
.LC43:
	.ascii	"Too many arguments given. Ignoring final ones.\000"
	.align	2
.LC44:
	.ascii	"Invalid level number. Aborting.\000"
	.align	2
.LC45:
	.ascii	"Extracting level.\000"
	.align	2
.LC46:
	.ascii	".\000"
	.align	2
.LC47:
	.ascii	"%s%cmap%.5d.inf\000"
	.align	2
.LC48:
	.ascii	"%s%cmap%.5d.%s\000"
	.align	2
.LC49:
	.ascii	"Extracting %s...\012\000"
	.align	2
.LC50:
	.ascii	"Imagining %s...\012\000"
	.align	2
.LC51:
	.ascii	"Can't recreate file. Aborting.\000"
	.align	2
.LC52:
	.ascii	"%s%cmap%.5d.slb\000"
	.align	2
.LC53:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	extract_archive
	.syntax unified
	.arm
	.fpu softvfp
	.type	extract_archive, %function
extract_archive:
	@ args = 0, pretend = 0, frame = 184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #192
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L116
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #65536
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	bne	.L71
	ldr	r0, .L116+4
	bl	puts
	mov	r0, #1
	bl	exit
.L71:
	ldr	r3, [fp, #-120]
	cmp	r3, #3
	ble	.L72
	ldr	r0, .L116+8
	bl	puts
.L72:
	ldr	r3, [fp, #-120]
	cmp	r3, #1
	bgt	.L73
	ldr	r0, .L116+12
	bl	puts
	ldr	r0, .L116+16
	bl	show_usage
	mov	r0, #1
	bl	exit
.L73:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3]
	mov	r0, r3
	bl	open_archive
	str	r0, [fp, #-84]
	sub	r3, fp, #188
	ldr	r1, [fp, #-84]
	mov	r0, r3
	bl	load_info
	sub	ip, fp, #68
	sub	lr, fp, #188
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L74
	ldr	r0, .L116+20
	bl	puts
	mov	r0, #1
	bl	exit
.L74:
	ldr	r3, [fp, #-124]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L75
	ldr	r0, .L116+24
	bl	puts
	mov	r0, #1
	bl	exit
.L75:
	ldr	r0, .L116+28
	bl	puts
	ldr	r3, [fp, #-120]
	cmp	r3, #3
	bne	.L76
	ldr	r3, [fp, #-124]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-92]
	b	.L77
.L76:
	ldr	r3, .L116+32
	str	r3, [fp, #-92]
.L77:
	ldr	r0, [fp, #-92]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #20
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, #47
	ldr	r2, [fp, #-92]
	ldr	r1, .L116+36
	ldr	r0, [fp, #-76]
	bl	sprintf
	ldr	r1, .L116+40
	ldr	r0, [fp, #-76]
	bl	fopen
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L78
	ldr	r1, [fp, #-76]
	ldr	r0, .L116+44
	bl	printf
	mov	r0, #1
	bl	exit
.L78:
	ldr	r3, [fp, #-44]
	ldr	r1, [fp, #-72]
	mov	r0, r3
	bl	fputc
	ldr	r0, [fp, #-72]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L79
.L84:
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	cmp	r3, #0
	beq	.L80
	ldr	r2, .L116+48
	ldr	r3, [fp, #-108]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, #47
	ldr	r2, [fp, #-92]
	ldr	r1, .L116+52
	ldr	r0, [fp, #-76]
	bl	sprintf
	ldr	r1, .L116+40
	ldr	r0, [fp, #-76]
	bl	fopen
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L81
	ldr	r1, [fp, #-76]
	ldr	r0, .L116+44
	bl	printf
	mov	r0, #1
	bl	exit
.L81:
	ldr	r1, [fp, #-76]
	ldr	r0, .L116+56
	bl	printf
	b	.L82
.L83:
	ldr	r3, [fp, #-84]
	mov	r2, #1
	mov	r1, #65536
	ldr	r0, [fp, #-88]
	bl	fread
	ldr	r3, [fp, #-72]
	mov	r2, #1
	mov	r1, #65536
	ldr	r0, [fp, #-88]
	bl	fwrite
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	sub	r2, r3, #65536
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-60]
.L82:
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	cmp	r3, #65536
	bgt	.L83
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	mov	r1, r3
	ldr	r3, [fp, #-84]
	mov	r2, #1
	ldr	r0, [fp, #-88]
	bl	fread
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	mov	r1, r3
	ldr	r3, [fp, #-72]
	mov	r2, #1
	ldr	r0, [fp, #-88]
	bl	fwrite
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-60]
	ldr	r0, [fp, #-72]
	bl	fclose
.L80:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L79:
	ldr	r3, [fp, #-108]
	cmp	r3, #7
	ble	.L84
	ldr	r0, [fp, #-84]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L85
.L112:
	ldr	r3, [fp, #-108]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-60]
	cmp	r3, #0
	bne	.L86
	ldr	r2, .L116+48
	ldr	r3, [fp, #-108]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, #47
	ldr	r2, [fp, #-92]
	ldr	r1, .L116+52
	ldr	r0, [fp, #-76]
	bl	sprintf
	ldr	r1, .L116+40
	ldr	r0, [fp, #-76]
	bl	fopen
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L87
	ldr	r1, [fp, #-76]
	ldr	r0, .L116+44
	bl	printf
	mov	r0, #1
	bl	exit
.L87:
	ldr	r1, [fp, #-76]
	ldr	r0, .L116+60
	bl	printf
	ldr	r3, [fp, #-108]
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L88
.L90:
	.word	.L93
	.word	.L92
	.word	.L92
	.word	.L92
	.word	.L92
	.word	.L92
	.word	.L91
	.word	.L89
.L92:
	ldr	r0, .L116+64
	bl	puts
	mov	r0, #1
	bl	exit
.L93:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L94
.L95:
	ldr	r1, [fp, #-72]
	mov	r0, #0
	bl	fputc
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L94:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L95
	b	.L88
.L91:
	ldr	r3, [fp, #-48]
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	build_text_default
	b	.L88
.L89:
	ldr	r3, [fp, #-80]
	str	r3, [sp]
	mov	r3, #47
	ldr	r2, [fp, #-92]
	ldr	r1, .L116+68
	ldr	r0, [fp, #-76]
	bl	sprintf
	ldr	r0, [fp, #-76]
	bl	file_length
	mov	r3, r0
	ldr	r2, .L116+72
	cmp	r3, r2
	bne	.L96
	ldr	r1, .L116+76
	ldr	r0, [fp, #-76]
	bl	fopen
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L97
.L96:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L98
.L99:
	ldr	r1, [fp, #-72]
	mov	r0, #1
	bl	fputc
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L98:
	ldr	r3, [fp, #-104]
	cmp	r3, #65536
	blt	.L99
	b	.L114
.L97:
	ldr	r3, [fp, #-84]
	mov	r2, #1
	ldr	r1, .L116+72
	ldr	r0, [fp, #-88]
	bl	fread
	ldr	r0, [fp, #-84]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L101
.L109:
	mov	r3, #0
	str	r3, [fp, #-96]
	b	.L102
.L108:
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L103
.L107:
	ldr	r2, [fp, #-104]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r2, r3, r2
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-88]
	add	r3, r3, r2
	ldrb	r3, [r3]
	strb	r3, [fp, #-109]
	ldrb	r3, [fp, #-109]	@ zero_extendqisi2
	cmp	r3, #12
	beq	.L104
	ldrb	r3, [fp, #-109]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L105
.L104:
	ldr	r1, [fp, #-72]
	mov	r0, #2
	bl	fputc
	ldr	r1, [fp, #-72]
	mov	r0, #2
	bl	fputc
	ldr	r1, [fp, #-72]
	mov	r0, #2
	bl	fputc
	b	.L106
.L105:
	ldr	r1, [fp, #-72]
	mov	r0, #1
	bl	fputc
	ldr	r1, [fp, #-72]
	mov	r0, #1
	bl	fputc
	ldr	r1, [fp, #-72]
	mov	r0, #1
	bl	fputc
.L106:
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L103:
	ldr	r3, [fp, #-100]
	cmp	r3, #84
	ble	.L107
	ldr	r1, [fp, #-72]
	mov	r0, #0
	bl	fputc
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L102:
	ldr	r3, [fp, #-96]
	cmp	r3, #2
	ble	.L108
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L101:
	ldr	r3, [fp, #-104]
	cmp	r3, #84
	ble	.L109
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L110
.L111:
	ldr	r1, [fp, #-72]
	mov	r0, #0
	bl	fputc
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L110:
	ldr	r3, [fp, #-104]
	cmp	r3, #255
	ble	.L111
	b	.L115
.L114:
.L115:
	nop
.L88:
	ldr	r0, [fp, #-72]
	bl	fclose
.L86:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L85:
	ldr	r3, [fp, #-108]
	cmp	r3, #7
	ble	.L112
	ldr	r0, [fp, #-88]
	bl	free
	ldr	r0, .L116+80
	bl	puts
	nop
	ldr	r3, .L116
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L113
	bl	__stack_chk_fail
.L113:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L117:
	.align	2
.L116:
	.word	.LC53
	.word	.LC42
	.word	.LC43
	.word	.LC14
	.word	.LC15
	.word	.LC33
	.word	.LC44
	.word	.LC45
	.word	.LC46
	.word	.LC47
	.word	.LC18
	.word	.LC19
	.word	file_exts
	.word	.LC48
	.word	.LC49
	.word	.LC50
	.word	.LC51
	.word	.LC52
	.word	14450
	.word	.LC28
	.word	.LC30
	.size	extract_archive, .-extract_archive
	.section	.rodata
	.align	2
.LC54:
	.ascii	"DKLV\000"
	.align	2
.LC55:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	load_info
	.syntax unified
	.arm
	.fpu softvfp
	.type	load_info, %function
load_info:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L125
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #12
	ldr	r3, [fp, #-84]
	mov	r2, #1
	mov	r1, #4
	bl	fread
	mov	r3, #0
	str	r3, [fp, #-72]
	sub	r3, fp, #12
	mov	r2, #4
	ldr	r1, .L125+4
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L119
	ldr	r3, [fp, #-80]
	mov	lr, r3
	sub	ip, fp, #72
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldm	ip, {r0, r1, r2}
	stm	lr, {r0, r1, r2}
	b	.L118
.L119:
	ldr	r0, [fp, #-84]
	bl	load_string
	mov	r3, r0
	str	r3, [fp, #-68]
	ldr	r0, [fp, #-84]
	bl	load_string
	mov	r3, r0
	str	r3, [fp, #-64]
	ldr	r0, [fp, #-84]
	bl	load_string
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r0, [fp, #-84]
	bl	load_string
	mov	r3, r0
	str	r3, [fp, #-56]
	ldr	r0, [fp, #-84]
	bl	fgetc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r0, [fp, #-84]
	bl	fgetc
	mov	r3, r0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L121
.L122:
	ldr	r0, [fp, #-84]
	bl	read_long
	mov	r2, r0
	ldr	r3, [fp, #-76]
	add	r3, r3, #6
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-64]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L121:
	ldr	r3, [fp, #-76]
	cmp	r3, #7
	ble	.L122
	mov	r3, #1
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-80]
	mov	lr, r3
	sub	ip, fp, #72
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	lr!, {r0, r1, r2, r3}
	ldm	ip, {r0, r1, r2}
	stm	lr, {r0, r1, r2}
.L118:
	ldr	r3, .L125
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L124
	bl	__stack_chk_fail
.L124:
	ldr	r0, [fp, #-80]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L126:
	.align	2
.L125:
	.word	.LC55
	.word	.LC54
	.size	load_info, .-load_info
	.align	2
	.global	read_long
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_long, %function
read_long:
	@ 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	r0, [fp, #-16]
	bl	fgetc
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	fgetc
	mov	r3, r0
	lsl	r3, r3, #8
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	fgetc
	mov	r3, r0
	lsl	r3, r3, #16
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	fgetc
	mov	r3, r0
	lsl	r3, r3, #24
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	read_long, .-read_long
	.align	2
	.global	write_long
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_long, %function
write_long:
	@ 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, [fp, #-12]
	and	r3, r3, #255
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-12]
	asr	r3, r3, #8
	and	r3, r3, #255
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-12]
	asr	r3, r3, #16
	and	r3, r3, #255
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-12]
	lsr	r3, r3, #24
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	fputc
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	write_long, .-write_long
	.align	2
	.global	write_string
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_string, %function
write_string:
	@ 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	r0, [fp, #-20]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r3, r3, #255
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	fputc
	ldr	r3, [fp, #-8]
	asr	r3, r3, #8
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	fputc
	ldr	r1, [fp, #-8]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	ldr	r0, [fp, #-20]
	bl	fwrite
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	write_string, .-write_string
	.align	2
	.global	load_string
	.syntax unified
	.arm
	.fpu softvfp
	.type	load_string, %function
load_string:
	@ 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	r0, [fp, #-16]
	bl	fgetc
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	fgetc
	mov	r3, r0
	lsl	r3, r3, #8
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L132
	ldr	r0, .L134
	bl	puts
	mov	r0, #1
	bl	exit
.L132:
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-16]
	mov	r2, #1
	ldr	r0, [fp, #-8]
	bl	fread
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L135:
	.align	2
.L134:
	.word	.LC42
	.size	load_string, .-load_string
	.section	.rodata
	.align	2
.LC56:
	.ascii	"Can't open %s or any variation on it. Aborting.\012"
	.ascii	"\000"
	.text
	.align	2
	.global	open_archive
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_archive, %function
open_archive:
	@ 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	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #4
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L137
	ldr	r0, .L155
	bl	puts
	mov	r0, #1
	bl	exit
.L137:
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	strcpy
	mov	r1, #47
	ldr	r0, [fp, #-12]
	bl	strrchr
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L138
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-20]
	b	.L139
.L138:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L139:
	ldr	r1, .L155+4
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L140
	ldr	r3, [fp, #-8]
	b	.L141
.L140:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L142
.L143:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L142:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L143
	ldr	r1, .L155+4
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L144
	ldr	r3, [fp, #-8]
	b	.L141
.L144:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L145
.L146:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L145:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L146
	ldr	r1, .L155+4
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L147
	ldr	r3, [fp, #-8]
	b	.L141
.L147:
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	strcpy
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	ldr	r2, .L155+8
	mov	r0, r3
	mov	r1, r2
	mov	r3, #4
	mov	r2, r3
	bl	memcpy
	ldr	r1, .L155+4
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L148
	ldr	r3, [fp, #-8]
	b	.L141
.L148:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L149
.L150:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L149:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L150
	ldr	r1, .L155+4
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L151
	ldr	r3, [fp, #-8]
	b	.L141
.L151:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L152
.L153:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-16]
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L152:
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L153
	ldr	r1, .L155+4
	ldr	r0, [fp, #-12]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L154
	ldr	r3, [fp, #-8]
	b	.L141
.L154:
	ldr	r1, [fp, #-24]
	ldr	r0, .L155+12
	bl	printf
	mov	r0, #1
	bl	exit
.L141:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L156:
	.align	2
.L155:
	.word	.LC42
	.word	.LC28
	.word	.LC16
	.word	.LC56
	.size	open_archive, .-open_archive
	.section	.rodata
	.align	2
.LC57:
	.ascii	"Usage:\000"
	.align	2
.LC58:
	.ascii	"%s c <archive> <files> - Create a Dungeon Keeper le"
	.ascii	"vel archive\012\000"
	.align	2
.LC59:
	.ascii	"%s v <archive> - View the description of a level ar"
	.ascii	"chive\012\000"
	.align	2
.LC60:
	.ascii	"%s x <archive> <level number> [path] - Extract an a"
	.ascii	"rchive\012\012\000"
	.align	2
.LC61:
	.ascii	"When extracting an archive, you can give the path o"
	.ascii	"f the levels \012directory, eg c:\\games\\keeper\\l"
	.ascii	"evels\000"
	.text
	.align	2
	.global	show_usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	show_usage, %function
show_usage:
	@ 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	r0, .L158
	bl	puts
	ldr	r1, [fp, #-8]
	ldr	r0, .L158+4
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, .L158+8
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, .L158+12
	bl	printf
	ldr	r0, .L158+16
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L159:
	.align	2
.L158:
	.word	.LC57
	.word	.LC58
	.word	.LC59
	.word	.LC60
	.word	.LC61
	.size	show_usage, .-show_usage
	.section	.rodata
	.align	2
.LC62:
	.ascii	"SET_GENERATE_SPEED (400)\015\012\000"
	.align	2
.LC63:
	.ascii	"MAX_CREATURES(ALL_PLAYERS,17)\015\012\000"
	.align	2
.LC64:
	.ascii	"START_MONEY(ALL_PLAYERS,10000)\015\012\000"
	.align	2
.LC65:
	.ascii	"ADD_CREATURE_TO_POOL(%s,20)\015\012\000"
	.align	2
.LC66:
	.ascii	"CREATURE_AVAILABLE(ALL_PLAYERS,%s,1,1)\015\012\000"
	.align	2
.LC67:
	.ascii	"ROOM_AVAILABLE(ALL_PLAYERS,%s,1,%d)\015\012\000"
	.align	2
.LC68:
	.ascii	"MAGIC_AVAILABLE(ALL_PLAYERS,POWER_%s,1,%d)\015\012\000"
	.align	2
.LC69:
	.ascii	"DOOR_AVAILABLE(ALL_PLAYERS,%s,%d,0)\015\012\000"
	.align	2
.LC70:
	.ascii	"TRAP_AVAILABLE(ALL_PLAYERS,%s,%d,0)\015\012\000"
	.align	2
.LC71:
	.ascii	"IF(PLAYER%d, ALL_DUNGEONS_DESTROYED == 1)\015\012\000"
	.align	2
.LC72:
	.ascii	"WIN_GAME\015\012\000"
	.align	2
.LC73:
	.ascii	"DISPLAY_OBJECTIVE(0, PLAYER%d)\015\012ENDIF\015\012"
	.ascii	"\000"
	.text
	.align	2
	.global	build_text_default
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_text_default, %function
build_text_default:
	@ 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]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L175
	bl	fwrite
	ldr	r3, [fp, #-16]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L175+4
	bl	fwrite
	ldr	r3, [fp, #-16]
	mov	r2, #32
	mov	r1, #1
	ldr	r0, .L175+8
	bl	fwrite
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L161
.L162:
	ldr	r2, .L175+12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, .L175+16
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L161:
	ldr	r2, .L175+12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L162
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L163
.L164:
	ldr	r2, .L175+12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r2, r3
	ldr	r1, .L175+20
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L163:
	ldr	r2, .L175+12
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L164
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L165
.L166:
	ldr	r2, .L175+24
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	ldr	r1, .L175+28
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L165:
	ldr	r2, .L175+24
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L166
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L167
.L168:
	ldr	r2, .L175+32
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	ldr	r1, .L175+36
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L167:
	ldr	r2, .L175+32
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L168
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L169
.L170:
	ldr	r2, .L175+40
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	ldr	r1, .L175+44
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L169:
	ldr	r2, .L175+40
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L170
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L171
.L172:
	ldr	r2, .L175+48
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	movle	r3, #1
	movgt	r3, #0
	and	r3, r3, #255
	ldr	r1, .L175+52
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L171:
	ldr	r2, .L175+48
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	bne	.L172
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L173
.L174:
	ldr	r2, [fp, #-8]
	ldr	r1, .L175+56
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-16]
	mov	r2, #10
	mov	r1, #1
	ldr	r0, .L175+60
	bl	fwrite
	ldr	r2, [fp, #-8]
	ldr	r1, .L175+64
	ldr	r0, [fp, #-16]
	bl	fprintf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L173:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L174
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L176:
	.align	2
.L175:
	.word	.LC62
	.word	.LC63
	.word	.LC64
	.word	creatures.5728
	.word	.LC65
	.word	.LC66
	.word	rooms.5729
	.word	.LC67
	.word	magic.5730
	.word	.LC68
	.word	doors.5731
	.word	.LC69
	.word	traps.5732
	.word	.LC70
	.word	.LC71
	.word	.LC72
	.word	.LC73
	.size	build_text_default, .-build_text_default
	.align	2
	.global	strip_crlf
	.syntax unified
	.arm
	.fpu softvfp
	.type	strip_crlf, %function
strip_crlf:
	@ 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]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L178
.L182:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #31
	bhi	.L183
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L178:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L182
	b	.L184
.L183:
	nop
.L184:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	strip_crlf, .-strip_crlf
	.section	.rodata
	.align	2
.LC74:
	.ascii	"BILE_DEMON\000"
	.align	2
.LC75:
	.ascii	"DRAGON\000"
	.align	2
.LC76:
	.ascii	"DARK_MISTRESS\000"
	.align	2
.LC77:
	.ascii	"HELL_HOUND\000"
	.align	2
.LC78:
	.ascii	"TENTACLE\000"
	.align	2
.LC79:
	.ascii	"DEMONSPAWN\000"
	.align	2
.LC80:
	.ascii	"SORCEROR\000"
	.align	2
.LC81:
	.ascii	"TROLL\000"
	.align	2
.LC82:
	.ascii	"SPIDER\000"
	.align	2
.LC83:
	.ascii	"BUG\000"
	.align	2
.LC84:
	.ascii	"FLY\000"
	.align	2
.LC85:
	.ascii	"ORC\000"
	.data
	.align	2
	.type	creatures.5728, %object
	.size	creatures.5728, 52
creatures.5728:
	.word	.LC74
	.word	.LC75
	.word	.LC76
	.word	.LC77
	.word	.LC78
	.word	.LC79
	.word	.LC80
	.word	.LC81
	.word	.LC82
	.word	.LC83
	.word	.LC84
	.word	.LC85
	.word	0
	.section	.rodata
	.align	2
.LC86:
	.ascii	"TREASURE\000"
	.align	2
.LC87:
	.ascii	"RESEARCH\000"
	.align	2
.LC88:
	.ascii	"GARDEN\000"
	.align	2
.LC89:
	.ascii	"LAIR\000"
	.align	2
.LC90:
	.ascii	"GRAVEYARD\000"
	.align	2
.LC91:
	.ascii	"PRISON\000"
	.align	2
.LC92:
	.ascii	"TORTURE\000"
	.align	2
.LC93:
	.ascii	"TRAINING\000"
	.align	2
.LC94:
	.ascii	"SCAVENGER\000"
	.align	2
.LC95:
	.ascii	"BARRACKS\000"
	.align	2
.LC96:
	.ascii	"TEMPLE\000"
	.align	2
.LC97:
	.ascii	"GUARD_POST\000"
	.align	2
.LC98:
	.ascii	"WORKSHOP\000"
	.data
	.align	2
	.type	rooms.5729, %object
	.size	rooms.5729, 56
rooms.5729:
	.word	.LC86
	.word	.LC87
	.word	.LC88
	.word	.LC89
	.word	.LC90
	.word	.LC91
	.word	.LC92
	.word	.LC93
	.word	.LC94
	.word	.LC95
	.word	.LC96
	.word	.LC97
	.word	.LC98
	.word	0
	.section	.rodata
	.align	2
.LC99:
	.ascii	"HAND\000"
	.align	2
.LC100:
	.ascii	"OBEY\000"
	.align	2
.LC101:
	.ascii	"IMP\000"
	.align	2
.LC102:
	.ascii	"SLAP\000"
	.align	2
.LC103:
	.ascii	"SIGHT\000"
	.align	2
.LC104:
	.ascii	"CALL_TO_ARMS\000"
	.align	2
.LC105:
	.ascii	"CAVE_IN\000"
	.align	2
.LC106:
	.ascii	"HEAL_CREATURE\000"
	.align	2
.LC107:
	.ascii	"HOLD_AUDIENCE\000"
	.align	2
.LC108:
	.ascii	"CHICKEN\000"
	.align	2
.LC109:
	.ascii	"SPEED\000"
	.align	2
.LC110:
	.ascii	"LIGHTNING\000"
	.align	2
.LC111:
	.ascii	"CONCEAL\000"
	.align	2
.LC112:
	.ascii	"PROTECT\000"
	.align	2
.LC113:
	.ascii	"DISEASE\000"
	.align	2
.LC114:
	.ascii	"DESTROY_WALLS\000"
	.align	2
.LC115:
	.ascii	"ARMAGEDDON\000"
	.data
	.align	2
	.type	magic.5730, %object
	.size	magic.5730, 72
magic.5730:
	.word	.LC99
	.word	.LC100
	.word	.LC101
	.word	.LC102
	.word	.LC103
	.word	.LC104
	.word	.LC105
	.word	.LC106
	.word	.LC107
	.word	.LC108
	.word	.LC109
	.word	.LC110
	.word	.LC111
	.word	.LC112
	.word	.LC113
	.word	.LC114
	.word	.LC115
	.word	0
	.section	.rodata
	.align	2
.LC116:
	.ascii	"WOOD\000"
	.align	2
.LC117:
	.ascii	"BRACED\000"
	.align	2
.LC118:
	.ascii	"STEEL\000"
	.align	2
.LC119:
	.ascii	"MAGIC\000"
	.data
	.align	2
	.type	doors.5731, %object
	.size	doors.5731, 16
doors.5731:
	.word	.LC116
	.word	.LC117
	.word	.LC118
	.word	.LC119
	.section	.rodata
	.align	2
.LC120:
	.ascii	"ALARM\000"
	.align	2
.LC121:
	.ascii	"POISON_GAS\000"
	.align	2
.LC122:
	.ascii	"LAVA\000"
	.align	2
.LC123:
	.ascii	"BOULDER\000"
	.align	2
.LC124:
	.ascii	"WORD_OF_POWER\000"
	.data
	.align	2
	.type	traps.5732, %object
	.size	traps.5732, 28
traps.5732:
	.word	.LC120
	.word	.LC121
	.word	.LC122
	.word	.LC123
	.word	.LC110
	.word	.LC124
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
