	.file	"399835.c"
	.intel_syntax noprefix
	.text
	.globl	UMF
	.bss
	.align 8
	.type	UMF, @object
	.size	UMF, 8
UMF:
	.zero	8
	.globl	mode
	.align 4
	.type	mode, @object
	.size	mode, 4
mode:
	.zero	4
	.globl	level
	.align 4
	.type	level, @object
	.size	level, 4
level:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	size
	.align 4
	.type	size, @object
	.size	size, 4
size:
	.zero	4
	.globl	board
	.align 8
	.type	board, @object
	.size	board, 8
board:
	.zero	8
	.globl	qm
	.align 4
	.type	qm, @object
	.size	qm, 4
qm:
	.zero	4
	.globl	nf
	.align 4
	.type	nf, @object
	.size	nf, 4
nf:
	.zero	4
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 1000
name:
	.zero	1000
	.globl	program
	.align 32
	.type	program, @object
	.size	program, 1000
program:
	.zero	1000
	.globl	version
	.align 32
	.type	version, @object
	.size	version, 1000
version:
	.zero	1000
	.globl	verstring
	.align 32
	.type	verstring, @object
	.size	verstring, 1000
verstring:
	.zero	1000
	.globl	video
	.align 32
	.type	video, @object
	.size	video, 1600000
video:
	.zero	1600000
	.globl	square_size
	.section	.rodata
	.align 4
	.type	square_size, @object
	.size	square_size, 4
square_size:
	.long	16
	.globl	score
	.bss
	.align 4
	.type	score, @object
	.size	score, 4
score:
	.zero	4
	.globl	score_check
	.align 4
	.type	score_check, @object
	.size	score_check, 4
score_check:
	.zero	4
	.text
	.globl	pause
	.type	pause, @function
pause:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	pause, .-pause
	.section	.rodata
.LC0:
	.string	"%s\n"
	.text
	.globl	error
	.type	error, @function
error:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 0
	call	pause
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	error, .-error
	.section	.rodata
	.align 8
.LC1:
	.string	"Error 4: Unexpected end of file"
	.text
	.globl	_fgetc
	.type	_fgetc, @function
_fgetc:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	jmp	.L3
.L4:
	lea	rdi, .LC1[rip]
	call	error
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	_fgetc, .-_fgetc
	.globl	getint2
	.type	getint2, @function
getint2:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -10[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -9[rbp], al
	movzx	eax, BYTE PTR -9[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -10[rbp]
	movzx	eax, al
	sal	eax, 8
	add	eax, edx
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	getint2, .-getint2
	.globl	getint3
	.type	getint3, @function
getint3:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -11[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -10[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -9[rbp], al
	movzx	eax, BYTE PTR -9[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -10[rbp]
	movzx	eax, al
	sal	eax, 8
	add	edx, eax
	movzx	eax, BYTE PTR -11[rbp]
	movzx	eax, al
	sal	eax, 16
	add	eax, edx
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	getint3, .-getint3
	.globl	getint
	.type	getint, @function
getint:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 0
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	_fgetc
	mov	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	BYTE PTR -12[rbp+rax], dl
	add	DWORD PTR -16[rbp], 1
.L13:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L14
	movzx	eax, BYTE PTR -10[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -9[rbp]
	movzx	eax, al
	sal	eax, 8
	add	edx, eax
	movzx	eax, BYTE PTR -12[rbp]
	movzx	eax, al
	sal	eax, 16
	add	edx, eax
	movzx	eax, BYTE PTR -11[rbp]
	movzx	eax, al
	sal	eax, 24
	add	eax, edx
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	getint, .-getint
	.section	.rodata
.LC2:
	.string	""
.LC3:
	.string	"mv"
.LC4:
	.string	"lc"
.LC5:
	.string	"lr"
.LC6:
	.string	"rc"
.LC7:
	.string	"rr"
.LC8:
	.string	"mc"
.LC9:
	.string	"mr"
.LC10:
	.string	"pressed"
.LC11:
	.string	"pressedqm"
.LC12:
	.string	"closed"
.LC13:
	.string	"questionmark"
.LC14:
	.string	"flag"
.LC15:
	.string	"blast"
.LC16:
	.string	"boom"
.LC17:
	.string	"won"
.LC18:
	.string	"nonstandard"
.LC19:
	.string	"number0"
.LC20:
	.string	"number1"
.LC21:
	.string	"number2"
.LC22:
	.string	"number3"
.LC23:
	.string	"number4"
.LC24:
	.string	"number5"
.LC25:
	.string	"number6"
.LC26:
	.string	"number7"
.LC27:
	.string	"number8"
.LC28:
	.string	"%d.%03d %s %d %d (%d %d)\n"
.LC29:
	.string	"%s %d %d\n"
	.text
	.globl	print_event
	.type	print_event, @function
print_event:
.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, 272
	mov	QWORD PTR -264[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -240[rbp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -232[rbp], rax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -224[rbp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -216[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -208[rbp], rax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, .LC8[rip]
	mov	QWORD PTR -192[rbp], rax
	lea	rax, .LC9[rip]
	mov	QWORD PTR -184[rbp], rax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -176[rbp], rax
	lea	rax, .LC10[rip]
	mov	QWORD PTR -168[rbp], rax
	lea	rax, .LC11[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, .LC12[rip]
	mov	QWORD PTR -152[rbp], rax
	lea	rax, .LC13[rip]
	mov	QWORD PTR -144[rbp], rax
	lea	rax, .LC14[rip]
	mov	QWORD PTR -136[rbp], rax
	lea	rax, .LC15[rip]
	mov	QWORD PTR -128[rbp], rax
	lea	rax, .LC16[rip]
	mov	QWORD PTR -120[rbp], rax
	lea	rax, .LC17[rip]
	mov	QWORD PTR -112[rbp], rax
	lea	rax, .LC18[rip]
	mov	QWORD PTR -104[rbp], rax
	lea	rax, .LC19[rip]
	mov	QWORD PTR -96[rbp], rax
	lea	rax, .LC20[rip]
	mov	QWORD PTR -88[rbp], rax
	lea	rax, .LC21[rip]
	mov	QWORD PTR -80[rbp], rax
	lea	rax, .LC22[rip]
	mov	QWORD PTR -72[rbp], rax
	lea	rax, .LC23[rip]
	mov	QWORD PTR -64[rbp], rax
	lea	rax, .LC24[rip]
	mov	QWORD PTR -56[rbp], rax
	lea	rax, .LC25[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC26[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC27[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC15[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -264[rbp]
	movzx	eax, BYTE PTR 12[rax]
	mov	BYTE PTR -241[rbp], al
	cmp	BYTE PTR -241[rbp], 7
	ja	.L18
	mov	rax, QWORD PTR -264[rbp]
	mov	r8d, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -264[rbp]
	mov	edi, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	ecx, 16
	cdq
	idiv	ecx
	lea	r9d, 1[rax]
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	ecx, 16
	cdq
	idiv	ecx
	lea	r10d, 1[rax]
	movzx	eax, BYTE PTR -241[rbp]
	cdqe
	mov	rcx, QWORD PTR -240[rbp+rax*8]
	mov	rax, QWORD PTR -264[rbp]
	mov	edx, DWORD PTR [rax]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	esi, edx
	sar	esi, 31
	sub	eax, esi
	imul	esi, eax, 1000
	mov	eax, edx
	sub	eax, esi
	mov	rdx, QWORD PTR -264[rbp]
	mov	edx, DWORD PTR [rdx]
	movsx	rsi, edx
	imul	rsi, rsi, 274877907
	shr	rsi, 32
	sar	esi, 6
	sar	edx, 31
	sub	esi, edx
	push	r8
	push	rdi
	mov	r8d, r10d
	mov	edx, eax
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	jmp	.L23
.L18:
	cmp	BYTE PTR -241[rbp], 14
	jbe	.L20
	cmp	BYTE PTR -241[rbp], 17
	jbe	.L21
	cmp	BYTE PTR -241[rbp], 27
	ja	.L21
.L20:
	mov	rax, QWORD PTR -264[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -264[rbp]
	mov	edx, DWORD PTR 4[rax]
	movzx	eax, BYTE PTR -241[rbp]
	cdqe
	mov	rax, QWORD PTR -240[rbp+rax*8]
	mov	rsi, rax
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L23
.L21:
	cmp	BYTE PTR -241[rbp], 17
	ja	.L23
	movzx	eax, BYTE PTR -241[rbp]
	cdqe
	mov	rax, QWORD PTR -240[rbp+rax*8]
	mov	rdi, rax
	call	puts@PLT
.L23:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	print_event, .-print_event
	.section	.rodata
.LC30:
	.string	"Lost"
.LC31:
	.string	"Won"
	.text
	.globl	print_event2
	.type	print_event2, @function
print_event2:
.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, 272
	mov	QWORD PTR -264[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -240[rbp], rax
	lea	rax, .LC3[rip]
	mov	QWORD PTR -232[rbp], rax
	lea	rax, .LC4[rip]
	mov	QWORD PTR -224[rbp], rax
	lea	rax, .LC5[rip]
	mov	QWORD PTR -216[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -208[rbp], rax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, .LC8[rip]
	mov	QWORD PTR -192[rbp], rax
	lea	rax, .LC9[rip]
	mov	QWORD PTR -184[rbp], rax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -176[rbp], rax
	lea	rax, .LC10[rip]
	mov	QWORD PTR -168[rbp], rax
	lea	rax, .LC11[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, .LC12[rip]
	mov	QWORD PTR -152[rbp], rax
	lea	rax, .LC13[rip]
	mov	QWORD PTR -144[rbp], rax
	lea	rax, .LC14[rip]
	mov	QWORD PTR -136[rbp], rax
	lea	rax, .LC15[rip]
	mov	QWORD PTR -128[rbp], rax
	lea	rax, .LC30[rip]
	mov	QWORD PTR -120[rbp], rax
	lea	rax, .LC31[rip]
	mov	QWORD PTR -112[rbp], rax
	lea	rax, .LC18[rip]
	mov	QWORD PTR -104[rbp], rax
	lea	rax, .LC19[rip]
	mov	QWORD PTR -96[rbp], rax
	lea	rax, .LC20[rip]
	mov	QWORD PTR -88[rbp], rax
	lea	rax, .LC21[rip]
	mov	QWORD PTR -80[rbp], rax
	lea	rax, .LC22[rip]
	mov	QWORD PTR -72[rbp], rax
	lea	rax, .LC23[rip]
	mov	QWORD PTR -64[rbp], rax
	lea	rax, .LC24[rip]
	mov	QWORD PTR -56[rbp], rax
	lea	rax, .LC25[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC26[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC27[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC15[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -264[rbp]
	movzx	eax, BYTE PTR 12[rax]
	mov	BYTE PTR -241[rbp], al
	cmp	BYTE PTR -241[rbp], 7
	ja	.L25
	mov	rax, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR score[rip], eax
	jmp	.L26
.L25:
	mov	DWORD PTR score[rip], 0
.L26:
	cmp	BYTE PTR -241[rbp], 16
	je	.L27
	cmp	BYTE PTR -241[rbp], 15
	jne	.L30
.L27:
	movzx	eax, BYTE PTR -241[rbp]
	cdqe
	mov	rax, QWORD PTR -240[rbp+rax*8]
	mov	rdi, rax
	call	puts@PLT
.L30:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	print_event2, .-print_event2
	.section	.rodata
.LC32:
	.string	"*umf"
.LC33:
	.string	"No UMF header"
.LC34:
	.string	"Invalid video type"
.LC35:
	.string	"Invalid mine position"
.LC36:
	.string	"Invalid event"
	.text
	.globl	readumf
	.type	readumf, @function
readumf:
.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	DWORD PTR -56[rbp], 0
	lea	rax, .LC32[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	DWORD PTR -52[rbp], 1
	mov	DWORD PTR -60[rbp], 0
	jmp	.L32
.L34:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -62[rbp], al
	movzx	edx, BYTE PTR -62[rbp]
	mov	eax, DWORD PTR -60[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	edx, eax
	je	.L33
	lea	rdi, .LC33[rip]
	call	error
.L33:
	add	DWORD PTR -60[rbp], 1
.L32:
	cmp	DWORD PTR -60[rbp], 3
	jle	.L34
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	cmp	eax, 1
	je	.L35
	lea	rdi, .LC34[rip]
	call	error
.L35:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint
	mov	DWORD PTR -48[rbp], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR -44[rbp], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR -40[rbp], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR -32[rbp], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR -60[rbp], 0
	jmp	.L36
.L37:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	ecx, eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, version[rip]
	mov	BYTE PTR [rax+rdx], cl
	add	DWORD PTR -60[rbp], 1
.L36:
	mov	eax, DWORD PTR -44[rbp]
	sub	eax, 1
	cmp	DWORD PTR -60[rbp], eax
	jl	.L37
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jle	.L38
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR -16[rbp], eax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L39
.L40:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	ecx, eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, name[rip]
	mov	BYTE PTR [rax+rdx], cl
	add	DWORD PTR -60[rbp], 1
.L39:
	mov	eax, DWORD PTR -60[rbp]
	cmp	eax, DWORD PTR -16[rbp]
	jl	.L40
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, name[rip]
	mov	BYTE PTR [rax+rdx], 0
.L38:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR w[rip], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR h[rip], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR m[rip], eax
	mov	eax, DWORD PTR w[rip]
	movsx	rdx, eax
	mov	eax, DWORD PTR h[rip]
	cdqe
	imul	rax, rdx
	sal	rax, 2
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR board[rip], rax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L41
.L42:
	mov	rdx, QWORD PTR board[rip]
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	add	DWORD PTR -60[rbp], 1
.L41:
	mov	edx, DWORD PTR w[rip]
	mov	eax, DWORD PTR h[rip]
	imul	eax, edx
	cmp	DWORD PTR -60[rbp], eax
	jl	.L42
	mov	DWORD PTR -60[rbp], 0
	jmp	.L43
.L46:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -62[rbp], al
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -61[rbp], al
	movzx	edx, BYTE PTR -62[rbp]
	mov	eax, DWORD PTR w[rip]
	cmp	edx, eax
	jg	.L44
	movzx	edx, BYTE PTR -61[rbp]
	mov	eax, DWORD PTR h[rip]
	cmp	edx, eax
	jle	.L45
.L44:
	lea	rdi, .LC35[rip]
	call	error
.L45:
	mov	rcx, QWORD PTR board[rip]
	movzx	edx, BYTE PTR -61[rbp]
	mov	eax, DWORD PTR w[rip]
	imul	edx, eax
	movzx	eax, BYTE PTR -62[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	add	rax, rcx
	mov	DWORD PTR [rax], 1
	add	DWORD PTR -60[rbp], 1
.L43:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -60[rbp], eax
	jl	.L46
	cmp	DWORD PTR -32[rbp], 0
	je	.L47
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -60[rbp], 0
	jmp	.L48
.L49:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -62[rbp], al
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -61[rbp], al
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+12]
	mov	BYTE PTR [rdx+rax], 4
	mov	eax, 16
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	ecx, eax
	movzx	eax, BYTE PTR -62[rbp]
	mov	edx, 16
	imul	eax, edx
	add	ecx, eax
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+4]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, 16
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	ecx, eax
	movzx	eax, BYTE PTR -61[rbp]
	mov	edx, 16
	imul	eax, edx
	add	ecx, eax
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+8]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -56[rbp], edx
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+12]
	mov	BYTE PTR [rdx+rax], 5
	mov	eax, 16
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	ecx, eax
	movzx	eax, BYTE PTR -62[rbp]
	mov	edx, 16
	imul	eax, edx
	add	ecx, eax
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+4]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, 16
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	ecx, eax
	movzx	eax, BYTE PTR -61[rbp]
	mov	edx, 16
	imul	eax, edx
	add	ecx, eax
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+8]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -56[rbp], edx
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -60[rbp], 1
.L48:
	mov	eax, DWORD PTR -60[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jl	.L49
.L47:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR qm[rip], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR nf[rip], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR mode[rip], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	DWORD PTR level[rip], eax
	mov	DWORD PTR -60[rbp], 4
	jmp	.L50
.L51:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	add	DWORD PTR -60[rbp], 1
.L50:
	mov	eax, DWORD PTR -60[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L51
.L60:
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	BYTE PTR -62[rbp], al
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	lea	rdx, video[rip+12]
	movzx	eax, BYTE PTR -62[rbp]
	mov	BYTE PTR [rcx+rdx], al
	add	DWORD PTR -60[rbp], 1
	cmp	BYTE PTR -62[rbp], 0
	jne	.L52
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint
	add	DWORD PTR -60[rbp], 4
	jmp	.L60
.L52:
	cmp	BYTE PTR -62[rbp], 7
	ja	.L54
	add	DWORD PTR -60[rbp], 8
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint3
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, video[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	lea	ecx, -12[rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+4]
	mov	DWORD PTR [rdx+rax], ecx
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	getint2
	mov	edx, eax
	mov	eax, DWORD PTR -56[rbp]
	lea	ecx, 1[rax]
	mov	DWORD PTR -56[rbp], ecx
	lea	ecx, -56[rdx]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+8]
	mov	DWORD PTR [rdx+rax], ecx
	cmp	DWORD PTR -52[rbp], 0
	je	.L60
	mov	DWORD PTR -52[rbp], 0
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+12]
	movzx	eax, BYTE PTR [rdx+rax]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, video[rip+12]
	mov	BYTE PTR [rcx+rdx], al
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+12]
	mov	BYTE PTR [rdx+rax], 2
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, video[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, video[rip+4]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+8]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, video[rip+8]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -56[rbp], 1
	jmp	.L60
.L54:
	cmp	BYTE PTR -62[rbp], 8
	jne	.L55
	lea	rdi, .LC36[rip]
	call	error
	jmp	.L60
.L55:
	cmp	BYTE PTR -62[rbp], 14
	jbe	.L56
	cmp	BYTE PTR -62[rbp], 17
	jbe	.L57
	cmp	BYTE PTR -62[rbp], 27
	ja	.L57
.L56:
	add	DWORD PTR -60[rbp], 2
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+4]
	mov	DWORD PTR [rdx+rax], ecx
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	_fgetc
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip+8]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -56[rbp], 1
	jmp	.L53
.L57:
	cmp	BYTE PTR -62[rbp], 17
	jbe	.L63
	lea	rdi, .LC36[rip]
	call	error
.L53:
	jmp	.L60
.L63:
	nop
	mov	eax, DWORD PTR -56[rbp]
	add	eax, 1
	mov	DWORD PTR size[rip], eax
	mov	eax, 1
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	readumf, .-readumf
	.section	.rodata
.LC37:
	.string	"Beginner"
.LC38:
	.string	"Intermediate"
.LC39:
	.string	"Expert"
.LC40:
	.string	"Custom"
.LC41:
	.string	"Classic"
.LC42:
	.string	"UPK"
.LC43:
	.string	"Cheat"
.LC44:
	.string	"Density"
.LC45:
	.string	"RawVF_Version: Rev6"
.LC46:
	.string	"Program: Vienna Minesweeper"
.LC47:
	.string	"Version: "
.LC48:
	.string	"Player: %s\n"
.LC49:
	.string	"Level: %s\n"
.LC50:
	.string	"Width: %d\n"
.LC51:
	.string	"Height: %d\n"
.LC52:
	.string	"Mines: %d\n"
.LC53:
	.string	"Marks: On"
.LC54:
	.string	"Marks: Off"
.LC55:
	.string	"Time: "
.LC56:
	.string	"%d.%03d\n"
.LC57:
	.string	"Mode: %s\n"
.LC58:
	.string	"Style: NF"
.LC59:
	.string	"Style: FL"
.LC60:
	.string	"Status: "
.LC61:
	.string	"Board:"
.LC62:
	.string	"Events:"
.LC63:
	.string	"0.000 start"
	.text
	.globl	writetxt
	.type	writetxt, @function
writetxt:
.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, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC37[rip]
	mov	QWORD PTR -80[rbp], rax
	lea	rax, .LC38[rip]
	mov	QWORD PTR -72[rbp], rax
	lea	rax, .LC39[rip]
	mov	QWORD PTR -64[rbp], rax
	lea	rax, .LC40[rip]
	mov	QWORD PTR -56[rbp], rax
	lea	rax, .LC41[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC42[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC43[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC44[rip]
	mov	QWORD PTR -24[rbp], rax
	lea	rdi, .LC45[rip]
	call	puts@PLT
	lea	rdi, .LC46[rip]
	call	puts@PLT
	lea	rdi, .LC47[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L65
.L69:
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rdx, version[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	cmp	al, 45
	je	.L86
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rdx, version[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	lea	rcx, verstring[rip]
	mov	BYTE PTR [rax+rcx], dl
	add	DWORD PTR -88[rbp], 1
.L65:
	cmp	DWORD PTR -88[rbp], 999
	jle	.L69
	jmp	.L68
.L86:
	nop
.L68:
	lea	rdi, verstring[rip]
	call	puts@PLT
	lea	rsi, name[rip]
	lea	rdi, .LC48[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR level[rip]
	cdqe
	mov	rax, QWORD PTR -80[rbp+rax*8]
	mov	rsi, rax
	lea	rdi, .LC49[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR w[rip]
	mov	esi, eax
	lea	rdi, .LC50[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR h[rip]
	mov	esi, eax
	lea	rdi, .LC51[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR m[rip]
	mov	esi, eax
	lea	rdi, .LC52[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR qm[rip]
	test	eax, eax
	je	.L70
	lea	rdi, .LC53[rip]
	call	puts@PLT
	jmp	.L71
.L70:
	lea	rdi, .LC54[rip]
	call	puts@PLT
.L71:
	lea	rdi, .LC55[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR size[rip]
	sub	eax, 3
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	je	.L72
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip]
	add	rax, rdx
	mov	rdi, rax
	call	print_event2
	mov	eax, DWORD PTR score[rip]
	test	eax, eax
	je	.L72
	mov	edx, DWORD PTR score[rip]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 1000
	mov	eax, edx
	sub	eax, ecx
	mov	edx, DWORD PTR score[rip]
	movsx	rcx, edx
	imul	rcx, rcx, 274877907
	shr	rcx, 32
	sar	ecx, 6
	sar	edx, 31
	sub	ecx, edx
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC56[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR score_check[rip], 1
.L72:
	mov	eax, DWORD PTR score_check[rip]
	cmp	eax, 1
	je	.L73
	mov	eax, DWORD PTR size[rip]
	sub	eax, 4
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	je	.L73
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip]
	add	rax, rdx
	mov	rdi, rax
	call	print_event2
	mov	eax, DWORD PTR score[rip]
	test	eax, eax
	je	.L73
	mov	edx, DWORD PTR score[rip]
	movsx	rax, edx
	imul	rax, rax, 274877907
	shr	rax, 32
	sar	eax, 6
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	imul	ecx, eax, 1000
	mov	eax, edx
	sub	eax, ecx
	mov	edx, DWORD PTR score[rip]
	movsx	rcx, edx
	imul	rcx, rcx, 274877907
	shr	rcx, 32
	sar	ecx, 6
	sar	edx, 31
	sub	ecx, edx
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC56[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR score_check[rip], 1
.L73:
	mov	eax, DWORD PTR mode[rip]
	cdqe
	mov	rax, QWORD PTR -48[rbp+rax*8]
	mov	rsi, rax
	lea	rdi, .LC57[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR nf[rip]
	test	eax, eax
	je	.L74
	lea	rdi, .LC58[rip]
	call	puts@PLT
	jmp	.L75
.L74:
	lea	rdi, .LC59[rip]
	call	puts@PLT
.L75:
	mov	eax, DWORD PTR size[rip]
	sub	eax, 1
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	je	.L76
	lea	rdi, .LC60[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip]
	add	rax, rdx
	mov	rdi, rax
	call	print_event2
.L76:
	lea	rdi, .LC61[rip]
	call	puts@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L77
.L82:
	mov	DWORD PTR -84[rbp], 0
	jmp	.L78
.L81:
	mov	rdx, QWORD PTR board[rip]
	mov	eax, DWORD PTR w[rip]
	imul	eax, DWORD PTR -88[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -84[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 2
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L79
	mov	edi, 42
	call	putchar@PLT
	jmp	.L80
.L79:
	mov	edi, 48
	call	putchar@PLT
.L80:
	add	DWORD PTR -84[rbp], 1
.L78:
	mov	eax, DWORD PTR w[rip]
	cmp	DWORD PTR -84[rbp], eax
	jl	.L81
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -88[rbp], 1
.L77:
	mov	eax, DWORD PTR h[rip]
	cmp	DWORD PTR -88[rbp], eax
	jl	.L82
	lea	rdi, .LC62[rip]
	call	puts@PLT
	lea	rdi, .LC63[rip]
	call	puts@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L83
.L84:
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, video[rip]
	add	rax, rdx
	mov	rdi, rax
	call	print_event
	add	DWORD PTR -88[rbp], 1
.L83:
	mov	eax, DWORD PTR size[rip]
	cmp	DWORD PTR -88[rbp], eax
	jl	.L84
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L85
	call	__stack_chk_fail@PLT
.L85:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	writetxt, .-writetxt
	.section	.rodata
	.align 8
.LC64:
	.string	"Error 1: Name of input file missing"
	.align 8
.LC65:
	.string	"Usage: %s <input umf> [nopause]\n"
.LC66:
	.string	"rb"
.LC67:
	.string	"Error 2: Could not open UMF"
.LC68:
	.string	"Error 3: Invalid UMF"
	.text
	.globl	main
	.type	main, @function
main:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 1
	jg	.L88
	lea	rdi, .LC64[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC65[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	pause
	mov	eax, 0
	jmp	.L89
.L88:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC66[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR UMF[rip], rax
	mov	rax, QWORD PTR UMF[rip]
	test	rax, rax
	jne	.L90
	lea	rdi, .LC67[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L89
.L90:
	mov	eax, 0
	call	readumf
	test	eax, eax
	jne	.L91
	lea	rdi, .LC68[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L89
.L91:
	mov	eax, 0
	call	writetxt
	mov	rax, QWORD PTR UMF[rip]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR board[rip]
	mov	rdi, rax
	call	free@PLT
	cmp	DWORD PTR -4[rbp], 2
	jne	.L92
	mov	eax, 0
	call	pause
.L92:
	mov	eax, 0
.L89:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	main, .-main
	.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	"399835.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"mv\000"
	.align	2
.LC2:
	.ascii	"lc\000"
	.align	2
.LC3:
	.ascii	"lr\000"
	.align	2
.LC4:
	.ascii	"rc\000"
	.align	2
.LC5:
	.ascii	"rr\000"
	.align	2
.LC6:
	.ascii	"mc\000"
	.align	2
.LC7:
	.ascii	"mr\000"
	.align	2
.LC8:
	.ascii	"pressed\000"
	.align	2
.LC9:
	.ascii	"pressedqm\000"
	.align	2
.LC10:
	.ascii	"closed\000"
	.align	2
.LC11:
	.ascii	"questionmark\000"
	.align	2
.LC12:
	.ascii	"flag\000"
	.align	2
.LC13:
	.ascii	"blast\000"
	.align	2
.LC14:
	.ascii	"boom\000"
	.align	2
.LC15:
	.ascii	"won\000"
	.align	2
.LC16:
	.ascii	"nonstandard\000"
	.align	2
.LC17:
	.ascii	"number0\000"
	.align	2
.LC18:
	.ascii	"number1\000"
	.align	2
.LC19:
	.ascii	"number2\000"
	.align	2
.LC20:
	.ascii	"number3\000"
	.align	2
.LC21:
	.ascii	"number4\000"
	.align	2
.LC22:
	.ascii	"number5\000"
	.align	2
.LC23:
	.ascii	"number6\000"
	.align	2
.LC24:
	.ascii	"number7\000"
	.align	2
.LC25:
	.ascii	"number8\000"
	.align	2
.LC27:
	.ascii	"Lost\000"
	.align	2
.LC28:
	.ascii	"Won\000"
	.align	2
.LC30:
	.ascii	"Beginner\000"
	.align	2
.LC31:
	.ascii	"Intermediate\000"
	.align	2
.LC32:
	.ascii	"Expert\000"
	.align	2
.LC33:
	.ascii	"Custom\000"
	.align	2
.LC35:
	.ascii	"Classic\000"
	.align	2
.LC36:
	.ascii	"UPK\000"
	.align	2
.LC37:
	.ascii	"Cheat\000"
	.align	2
.LC38:
	.ascii	"Density\000"
	.text
	.comm	UMF,4,4
	.comm	mode,4,4
	.comm	level,4,4
	.comm	w,4,4
	.comm	h,4,4
	.comm	m,4,4
	.comm	size,4,4
	.comm	board,4,4
	.comm	qm,4,4
	.comm	nf,4,4
	.comm	name,1000,4
	.comm	program,1000,4
	.comm	version,1000,4
	.comm	verstring,1000,4
	.comm	video,1600000,4
	.global	square_size
	.section	.rodata
	.align	2
	.type	square_size, %object
	.size	square_size, 4
square_size:
	.word	16
	.comm	score,4,4
	.comm	score_check,4,4
	.text
	.align	2
	.global	pause
	.syntax unified
	.arm
	.fpu softvfp
	.type	pause, %function
pause:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	pause, .-pause
	.section	.rodata
	.align	2
.LC40:
	.ascii	"%s\012\000"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L3
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L3+4
	mov	r0, r3
	bl	fprintf
	bl	pause
	mov	r0, #1
	bl	exit
.L4:
	.align	2
.L3:
	.word	stderr
	.word	.LC40
	.size	error, .-error
	.section	.rodata
	.align	2
.LC41:
	.ascii	"Error 4: Unexpected end of file\000"
	.text
	.align	2
	.global	_fgetc
	.syntax unified
	.arm
	.fpu softvfp
	.type	_fgetc, %function
_fgetc:
	@ 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, [fp, #-8]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	ldr	r0, [fp, #-8]
	bl	fgetc
	mov	r3, r0
	b	.L5
.L6:
	ldr	r0, .L8
	bl	error
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC41
	.size	_fgetc, .-_fgetc
	.section	.rodata
	.align	2
.LC42:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getint2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getint2, %function
getint2:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-16]
	bl	_fgetc
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	_fgetc
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-11]
	ldrb	r3, [fp, #-11]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r3, r2, r3
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC42
	.size	getint2, .-getint2
	.section	.rodata
	.align	2
.LC43:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getint3
	.syntax unified
	.arm
	.fpu softvfp
	.type	getint3, %function
getint3:
	@ 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, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-16]
	bl	_fgetc
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-12]
	ldr	r0, [fp, #-16]
	bl	_fgetc
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-11]
	ldr	r0, [fp, #-16]
	bl	_fgetc
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-10]
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-11]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r2, r2, r3
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	lsl	r3, r3, #16
	add	r3, r2, r3
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC43
	.size	getint3, .-getint3
	.section	.rodata
	.align	2
.LC44:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getint
	.syntax unified
	.arm
	.fpu softvfp
	.type	getint, %function
getint:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L21
.L22:
	ldr	r0, [fp, #-24]
	bl	_fgetc
	mov	r3, r0
	and	r1, r3, #255
	sub	r2, fp, #12
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L21:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L22
	ldrb	r3, [fp, #-10]	@ zero_extendqisi2
	mov	r2, r3
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	lsl	r3, r3, #8
	add	r2, r2, r3
	ldrb	r3, [fp, #-12]	@ zero_extendqisi2
	lsl	r3, r3, #16
	add	r2, r2, r3
	ldrb	r3, [fp, #-11]	@ zero_extendqisi2
	lsl	r3, r3, #24
	add	r3, r2, r3
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC44
	.size	getint, .-getint
	.global	__aeabi_idiv
	.section	.rodata
	.align	2
.LC46:
	.ascii	"%d.%03d %s %d %d (%d %d)\012\000"
	.align	2
.LC47:
	.ascii	"%s %d %d\012\000"
	.align	2
.LC45:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC0
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC13
	.align	2
.LC48:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_event
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_event, %function
print_event:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #144
	str	r0, [fp, #-144]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r2, .L34+4
	sub	r3, fp, #136
	mov	r1, r2
	mov	r2, #112
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-144]
	ldrb	r3, [r3, #12]
	strb	r3, [fp, #-137]
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	cmp	r3, #7
	bhi	.L28
	ldr	r3, [fp, #-144]
	ldr	r3, [r3]
	ldr	r2, .L34+8
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r6, r2, r3
	ldr	r3, [fp, #-144]
	ldr	r2, [r3]
	ldr	r3, .L34+8
	smull	r1, r3, r2, r3
	asr	r1, r3, #6
	asr	r3, r2, #31
	sub	r4, r1, r3
	mov	r3, r4
	lsl	r3, r3, #5
	sub	r3, r3, r4
	lsl	r3, r3, #2
	add	r3, r3, r4
	lsl	r3, r3, #3
	sub	r4, r2, r3
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #20
	add	r3, r2, r3
	ldr	r7, [r3, #-116]
	ldr	r3, [fp, #-144]
	ldr	r3, [r3, #4]
	mov	r2, #16
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	add	r5, r3, #1
	ldr	r3, [fp, #-144]
	ldr	r3, [r3, #8]
	mov	r2, #16
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	add	r3, r3, #1
	ldr	r2, [fp, #-144]
	ldr	r2, [r2, #4]
	ldr	r1, [fp, #-144]
	ldr	r1, [r1, #8]
	str	r1, [sp, #12]
	str	r2, [sp, #8]
	str	r3, [sp, #4]
	str	r5, [sp]
	mov	r3, r7
	mov	r2, r4
	mov	r1, r6
	ldr	r0, .L34+12
	bl	printf
	b	.L33
.L28:
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	cmp	r3, #14
	bls	.L30
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	cmp	r3, #17
	bls	.L31
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	cmp	r3, #27
	bhi	.L31
.L30:
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #20
	add	r3, r2, r3
	ldr	r1, [r3, #-116]
	ldr	r3, [fp, #-144]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-144]
	ldr	r3, [r3, #8]
	ldr	r0, .L34+16
	bl	printf
	b	.L33
.L31:
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	cmp	r3, #17
	bhi	.L33
	ldrb	r3, [fp, #-137]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #20
	add	r3, r2, r3
	ldr	r3, [r3, #-116]
	mov	r0, r3
	bl	puts
.L33:
	nop
	ldr	r3, .L34
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC48
	.word	.LC45
	.word	274877907
	.word	.LC46
	.word	.LC47
	.size	print_event, .-print_event
	.section	.rodata
	.align	2
.LC49:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC0
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC27
	.word	.LC28
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC13
	.align	2
.LC50:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	print_event2
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_event2, %function
print_event2:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-128]
	ldr	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L43+4
	sub	r3, fp, #120
	mov	r1, r2
	mov	r2, #112
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-128]
	ldrb	r3, [r3, #12]
	strb	r3, [fp, #-121]
	ldrb	r3, [fp, #-121]	@ zero_extendqisi2
	cmp	r3, #7
	bhi	.L37
	ldr	r3, [fp, #-128]
	ldr	r3, [r3]
	ldr	r2, .L43+8
	str	r3, [r2]
	b	.L38
.L37:
	ldr	r3, .L43+8
	mov	r2, #0
	str	r2, [r3]
.L38:
	ldrb	r3, [fp, #-121]	@ zero_extendqisi2
	cmp	r3, #16
	beq	.L39
	ldrb	r3, [fp, #-121]	@ zero_extendqisi2
	cmp	r3, #15
	bne	.L42
.L39:
	ldrb	r3, [fp, #-121]	@ zero_extendqisi2
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-116]
	mov	r0, r3
	bl	puts
.L42:
	nop
	ldr	r3, .L43
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC50
	.word	.LC49
	.word	score
	.size	print_event2, .-print_event2
	.section	.rodata
	.align	2
.LC51:
	.ascii	"*umf\000"
	.align	2
.LC52:
	.ascii	"No UMF header\000"
	.align	2
.LC53:
	.ascii	"Invalid video type\000"
	.align	2
.LC54:
	.ascii	"Invalid mine position\000"
	.align	2
.LC55:
	.ascii	"Invalid event\000"
	.text
	.align	2
	.global	readumf
	.syntax unified
	.arm
	.fpu softvfp
	.type	readumf, %function
readumf:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	mov	r3, #0
	str	r3, [fp, #-56]
	ldr	r3, .L78
	str	r3, [fp, #-48]
	mov	r3, #1
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L46
.L48:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	strb	r3, [fp, #-62]
	ldr	r3, [fp, #-60]
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-62]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L47
	ldr	r0, .L78+8
	bl	error
.L47:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L46:
	ldr	r3, [fp, #-60]
	cmp	r3, #3
	ble	.L48
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	mov	r3, r0
	cmp	r3, #1
	beq	.L49
	ldr	r0, .L78+12
	bl	error
.L49:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint
	str	r0, [fp, #-44]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	str	r0, [fp, #-40]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	str	r0, [fp, #-36]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	str	r0, [fp, #-32]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	str	r0, [fp, #-28]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	str	r0, [fp, #-24]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint
	str	r0, [fp, #-20]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L50
.L51:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	and	r1, r3, #255
	ldr	r2, .L78+16
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L50:
	ldr	r3, [fp, #-40]
	sub	r3, r3, #1
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	blt	.L51
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L52
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L53
.L54:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	and	r1, r3, #255
	ldr	r2, .L78+20
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L53:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L54
	ldr	r2, .L78+20
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
.L52:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	ldr	r2, .L78+24
	str	r3, [r2]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	ldr	r2, .L78+28
	str	r3, [r2]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	mov	r3, r0
	ldr	r2, .L78+32
	str	r3, [r2]
	ldr	r3, .L78+24
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, .L78+28
	ldr	r3, [r3]
	mul	r3, r2, r3
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L78+36
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L55
.L56:
	ldr	r3, .L78+36
	ldr	r2, [r3]
	ldr	r3, [fp, #-60]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L55:
	ldr	r3, .L78+24
	ldr	r3, [r3]
	ldr	r2, .L78+28
	ldr	r2, [r2]
	mul	r3, r2, r3
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	blt	.L56
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L57
.L60:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	strb	r3, [fp, #-62]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	strb	r3, [fp, #-61]
	ldrb	r2, [fp, #-62]	@ zero_extendqisi2
	ldr	r3, .L78+24
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L58
	ldrb	r2, [fp, #-61]	@ zero_extendqisi2
	ldr	r3, .L78+28
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L59
.L58:
	ldr	r0, .L78+40
	bl	error
.L59:
	ldr	r3, .L78+36
	ldr	r2, [r3]
	ldrb	r3, [fp, #-61]	@ zero_extendqisi2
	ldr	r1, .L78+24
	ldr	r1, [r1]
	mul	r1, r3, r1
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L57:
	ldr	r3, .L78+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-60]
	cmp	r2, r3
	blt	.L60
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L61
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L62
.L63:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	strb	r3, [fp, #-62]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	strb	r3, [fp, #-61]
	ldr	r2, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r2, r3
	mov	r2, #4
	strb	r2, [r3, #12]
	mov	r3, #16
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	mov	r2, #16
	mul	r3, r2, r3
	add	r2, r1, r3
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #4]
	mov	r3, #16
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	ldrb	r3, [fp, #-61]	@ zero_extendqisi2
	mov	r2, #16
	mul	r3, r2, r3
	add	r2, r1, r3
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #8]
	ldr	r3, [fp, #-56]
	add	r2, r3, #1
	str	r2, [fp, #-56]
	ldr	r2, .L78+44
	mov	r1, #0
	str	r1, [r2, r3, lsl #4]
	ldr	r2, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r2, r3
	mov	r2, #5
	strb	r2, [r3, #12]
	mov	r3, #16
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	mov	r2, #16
	mul	r3, r2, r3
	add	r2, r1, r3
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #4]
	mov	r3, #16
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r1, r3
	ldrb	r3, [fp, #-61]	@ zero_extendqisi2
	mov	r2, #16
	mul	r3, r2, r3
	add	r2, r1, r3
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #8]
	ldr	r3, [fp, #-56]
	add	r2, r3, #1
	str	r2, [fp, #-56]
	ldr	r2, .L78+44
	mov	r1, #0
	str	r1, [r2, r3, lsl #4]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L62:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L63
.L61:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	ldr	r2, .L78+48
	str	r3, [r2]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	ldr	r2, .L78+52
	str	r3, [r2]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	ldr	r2, .L78+56
	str	r3, [r2]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	ldr	r2, .L78+60
	str	r3, [r2]
	mov	r3, #4
	str	r3, [fp, #-60]
	b	.L64
.L65:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L64:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L65
.L74:
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	strb	r3, [fp, #-62]
	ldr	r2, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldrb	r2, [fp, #-62]
	strb	r2, [r3, #12]
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L66
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	str	r3, [fp, #-60]
	b	.L74
.L66:
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	cmp	r3, #7
	bhi	.L68
	ldr	r3, [fp, #-60]
	add	r3, r3, #8
	str	r3, [fp, #-60]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint3
	mov	r2, r0
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	str	r2, [r1, r3, lsl #4]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	mov	r3, r0
	sub	r2, r3, #12
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	getint2
	mov	r1, r0
	ldr	r3, [fp, #-56]
	add	r2, r3, #1
	str	r2, [fp, #-56]
	sub	r2, r1, #56
	ldr	r1, .L78+44
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #8]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L74
	mov	r3, #0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #1
	ldr	r2, .L78+44
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldrb	r1, [r3, #12]	@ zero_extendqisi2
	ldr	r2, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3, #12]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #1
	ldr	r2, .L78+44
	lsl	r3, r3, #4
	add	r3, r2, r3
	mov	r2, #2
	strb	r2, [r3, #12]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #1
	ldr	r2, .L78+44
	ldr	r2, [r2, r3, lsl #4]
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	str	r2, [r1, r3, lsl #4]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #1
	ldr	r2, .L78+44
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #4]
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, [fp, #-56]
	sub	r3, r3, #1
	ldr	r2, .L78+44
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #8]
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #8]
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
	b	.L74
.L68:
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	cmp	r3, #8
	bne	.L69
	ldr	r0, .L78+64
	bl	error
	b	.L74
.L69:
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	cmp	r3, #14
	bls	.L70
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	cmp	r3, #17
	bls	.L71
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	cmp	r3, #27
	bhi	.L71
.L70:
	ldr	r3, [fp, #-60]
	add	r3, r3, #2
	str	r3, [fp, #-60]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	add	r2, r3, #1
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #4]
	ldr	r3, .L78+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	_fgetc
	mov	r3, r0
	add	r2, r3, #1
	ldr	r1, .L78+44
	ldr	r3, [fp, #-56]
	lsl	r3, r3, #4
	add	r3, r1, r3
	str	r2, [r3, #8]
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
	b	.L67
.L71:
	ldrb	r3, [fp, #-62]	@ zero_extendqisi2
	cmp	r3, #17
	bls	.L77
	ldr	r0, .L78+64
	bl	error
.L67:
	b	.L74
.L77:
	nop
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	ldr	r2, .L78+68
	str	r3, [r2]
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L79:
	.align	2
.L78:
	.word	.LC51
	.word	UMF
	.word	.LC52
	.word	.LC53
	.word	version
	.word	name
	.word	w
	.word	h
	.word	m
	.word	board
	.word	.LC54
	.word	video
	.word	qm
	.word	nf
	.word	mode
	.word	level
	.word	.LC55
	.word	size
	.size	readumf, .-readumf
	.section	.rodata
	.align	2
.LC58:
	.ascii	"RawVF_Version: Rev6\000"
	.align	2
.LC59:
	.ascii	"Program: Vienna Minesweeper\000"
	.align	2
.LC60:
	.ascii	"Version: \000"
	.align	2
.LC61:
	.ascii	"Player: %s\012\000"
	.align	2
.LC62:
	.ascii	"Level: %s\012\000"
	.align	2
.LC63:
	.ascii	"Width: %d\012\000"
	.align	2
.LC64:
	.ascii	"Height: %d\012\000"
	.align	2
.LC65:
	.ascii	"Mines: %d\012\000"
	.align	2
.LC66:
	.ascii	"Marks: On\000"
	.align	2
.LC67:
	.ascii	"Marks: Off\000"
	.align	2
.LC68:
	.ascii	"Time: \000"
	.align	2
.LC69:
	.ascii	"%d.%03d\012\000"
	.align	2
.LC70:
	.ascii	"Mode: %s\012\000"
	.align	2
.LC71:
	.ascii	"Style: NF\000"
	.align	2
.LC72:
	.ascii	"Style: FL\000"
	.align	2
.LC73:
	.ascii	"Status: \000"
	.align	2
.LC74:
	.ascii	"Board:\000"
	.align	2
.LC75:
	.ascii	"Events:\000"
	.align	2
.LC76:
	.ascii	"0.000 start\000"
	.align	2
.LC56:
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.align	2
.LC57:
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.align	2
.LC77:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	writetxt
	.syntax unified
	.arm
	.fpu softvfp
	.type	writetxt, %function
writetxt:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r3, .L103
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L103+4
	sub	ip, fp, #40
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, .L103+8
	sub	ip, fp, #24
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r0, .L103+12
	bl	puts
	ldr	r0, .L103+16
	bl	puts
	ldr	r0, .L103+20
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L81
.L85:
	ldr	r2, .L103+24
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #45
	beq	.L102
	ldr	r2, .L103+24
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r2, .L103+28
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L81:
	ldr	r3, [fp, #-48]
	cmp	r3, #1000
	blt	.L85
	b	.L84
.L102:
	nop
.L84:
	ldr	r0, .L103+28
	bl	puts
	ldr	r1, .L103+32
	ldr	r0, .L103+36
	bl	printf
	ldr	r3, .L103+40
	ldr	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-36]
	mov	r1, r3
	ldr	r0, .L103+44
	bl	printf
	ldr	r3, .L103+48
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L103+52
	bl	printf
	ldr	r3, .L103+56
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L103+60
	bl	printf
	ldr	r3, .L103+64
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L103+68
	bl	printf
	ldr	r3, .L103+72
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L86
	ldr	r0, .L103+76
	bl	puts
	b	.L87
.L86:
	ldr	r0, .L103+80
	bl	puts
.L87:
	ldr	r0, .L103+84
	bl	printf
	ldr	r3, .L103+88
	ldr	r3, [r3]
	sub	r3, r3, #3
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L88
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, .L103+92
	add	r3, r3, r2
	mov	r0, r3
	bl	print_event2
	ldr	r3, .L103+96
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L88
	ldr	r3, .L103+96
	ldr	r3, [r3]
	ldr	r2, .L103+100
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r0, r2, r3
	ldr	r3, .L103+96
	ldr	r1, [r3]
	ldr	r3, .L103+100
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	mov	r1, r0
	ldr	r0, .L103+104
	bl	printf
	ldr	r3, .L103+108
	mov	r2, #1
	str	r2, [r3]
.L88:
	ldr	r3, .L103+108
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L89
	ldr	r3, .L103+88
	ldr	r3, [r3]
	sub	r3, r3, #4
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L89
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, .L103+92
	add	r3, r3, r2
	mov	r0, r3
	bl	print_event2
	ldr	r3, .L103+96
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L89
	ldr	r3, .L103+96
	ldr	r3, [r3]
	ldr	r2, .L103+100
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r0, r2, r3
	ldr	r3, .L103+96
	ldr	r1, [r3]
	ldr	r3, .L103+100
	smull	r2, r3, r1, r3
	asr	r2, r3, #6
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	mov	r1, r0
	ldr	r0, .L103+104
	bl	printf
	ldr	r3, .L103+108
	mov	r2, #1
	str	r2, [r3]
.L89:
	ldr	r3, .L103+112
	ldr	r3, [r3]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	mov	r1, r3
	ldr	r0, .L103+116
	bl	printf
	ldr	r3, .L103+120
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L90
	ldr	r0, .L103+124
	bl	puts
	b	.L91
.L90:
	ldr	r0, .L103+128
	bl	puts
.L91:
	ldr	r3, .L103+88
	ldr	r3, [r3]
	sub	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L92
	ldr	r0, .L103+132
	bl	printf
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, .L103+92
	add	r3, r3, r2
	mov	r0, r3
	bl	print_event2
.L92:
	ldr	r0, .L103+136
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L93
.L98:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L94
.L97:
	ldr	r3, .L103+140
	ldr	r2, [r3]
	ldr	r3, .L103+48
	ldr	r3, [r3]
	ldr	r1, [fp, #-48]
	mul	r1, r3, r1
	ldr	r3, [fp, #-44]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L95
	mov	r0, #42
	bl	putchar
	b	.L96
.L95:
	mov	r0, #48
	bl	putchar
.L96:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L94:
	ldr	r3, .L103+48
	ldr	r3, [r3]
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	blt	.L97
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L93:
	ldr	r3, .L103+56
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L98
	ldr	r0, .L103+144
	bl	puts
	ldr	r0, .L103+148
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L99
.L100:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #4
	ldr	r2, .L103+92
	add	r3, r3, r2
	mov	r0, r3
	bl	print_event
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L99:
	ldr	r3, .L103+88
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L100
	nop
	ldr	r3, .L103
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L101
	bl	__stack_chk_fail
.L101:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L104:
	.align	2
.L103:
	.word	.LC77
	.word	.LC56
	.word	.LC57
	.word	.LC58
	.word	.LC59
	.word	.LC60
	.word	version
	.word	verstring
	.word	name
	.word	.LC61
	.word	level
	.word	.LC62
	.word	w
	.word	.LC63
	.word	h
	.word	.LC64
	.word	m
	.word	.LC65
	.word	qm
	.word	.LC66
	.word	.LC67
	.word	.LC68
	.word	size
	.word	video
	.word	score
	.word	274877907
	.word	.LC69
	.word	score_check
	.word	mode
	.word	.LC70
	.word	nf
	.word	.LC71
	.word	.LC72
	.word	.LC73
	.word	.LC74
	.word	board
	.word	.LC75
	.word	.LC76
	.size	writetxt, .-writetxt
	.section	.rodata
	.align	2
.LC78:
	.ascii	"Error 1: Name of input file missing\000"
	.align	2
.LC79:
	.ascii	"Usage: %s <input umf> [nopause]\012\000"
	.align	2
.LC80:
	.ascii	"rb\000"
	.align	2
.LC81:
	.ascii	"Error 2: Could not open UMF\000"
	.align	2
.LC82:
	.ascii	"Error 3: Invalid UMF\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, #-8]
	cmp	r3, #1
	bgt	.L106
	ldr	r0, .L111
	bl	puts
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L111+4
	bl	printf
	bl	pause
	mov	r3, #0
	b	.L107
.L106:
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L111+8
	mov	r0, r3
	bl	fopen
	mov	r3, r0
	ldr	r2, .L111+12
	str	r3, [r2]
	ldr	r3, .L111+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L108
	ldr	r0, .L111+16
	bl	puts
	mov	r3, #1
	b	.L107
.L108:
	bl	readumf
	mov	r3, r0
	cmp	r3, #0
	bne	.L109
	ldr	r0, .L111+20
	bl	puts
	mov	r3, #1
	b	.L107
.L109:
	bl	writetxt
	ldr	r3, .L111+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
	ldr	r3, .L111+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	bne	.L110
	bl	pause
.L110:
	mov	r3, #0
.L107:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L112:
	.align	2
.L111:
	.word	.LC78
	.word	.LC79
	.word	.LC80
	.word	UMF
	.word	.LC81
	.word	.LC82
	.word	board
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
