	.file	"797604.c"
	.intel_syntax noprefix
	.text
	.globl	mainwin
	.bss
	.align 8
	.type	mainwin, @object
	.size	mainwin, 8
mainwin:
	.zero	8
	.globl	tick
	.align 4
	.type	tick, @object
	.size	tick, 4
tick:
	.zero	4
	.text
	.globl	drawchar
	.type	drawchar, @function
drawchar:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, edi
	mov	DWORD PTR -8[rbp], esi
	mov	DWORD PTR -12[rbp], edx
	mov	DWORD PTR -16[rbp], ecx
	mov	BYTE PTR -4[rbp], al
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 8
	movzx	ecx, ax
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, ecx
	mov	rdi, rax
	call	wattr_on@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, DWORD PTR -8[rbp]
	mov	ecx, DWORD PTR -12[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	wmove@PLT
	cmp	eax, -1
	je	.L3
	movsx	edx, BYTE PTR -4[rbp]
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, edx
	mov	rdi, rax
	call	waddch@PLT
.L3:
	mov	eax, DWORD PTR -16[rbp]
	sal	eax, 8
	movzx	ecx, ax
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, ecx
	mov	rdi, rax
	call	wattr_off@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	drawchar, .-drawchar
	.globl	finish
	.type	finish, @function
finish:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wclear@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	mov	rax, QWORD PTR mainwin[rip]
	mov	rdi, rax
	call	delwin@PLT
	call	endwin@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	finish, .-finish
	.globl	map
	.data
	.align 32
	.type	map, @object
	.size	map, 1089
map:
	.ascii	"############################################################"
	.ascii	"#######\nS...................................###############"
	.ascii	"################\n#########.......#################...######"
	.ascii	"#########################\n#########.......#################"
	.ascii	"...###############################\n#########.......########"
	.ascii	"#########...###############################\n#########......"
	.ascii	".#################...###############################\n######"
	.ascii	"###......s#################...##############################"
	.ascii	"#\n#########..###################.........##################"
	.ascii	"##########\n#########..###################.................."
	.ascii	"....###############\n#########..###################....z...."
	.ascii	".............###############\n#########........#############"
	.ascii	".........############################\n#########........####"
	.ascii	"#################.############################\n#########..#"
	.ascii	"###."
	.string	".#####################.############################\n#########..####..#####################.############################\n#########..............................############################\n###################################################################\n"
	.globl	map_width
	.bss
	.align 4
	.type	map_width, @object
	.size	map_width, 4
map_width:
	.zero	4
	.globl	map_height
	.align 4
	.type	map_height, @object
	.size	map_height, 4
map_height:
	.zero	4
	.globl	current_message
	.align 8
	.type	current_message, @object
	.size	current_message, 8
current_message:
	.zero	8
	.globl	player_x
	.align 4
	.type	player_x, @object
	.size	player_x, 4
player_x:
	.zero	4
	.globl	player_y
	.align 4
	.type	player_y, @object
	.size	player_y, 4
player_y:
	.zero	4
	.globl	player_health
	.data
	.align 4
	.type	player_health, @object
	.size	player_health, 4
player_health:
	.long	100
	.globl	monsters
	.bss
	.align 32
	.type	monsters, @object
	.size	monsters, 1152
monsters:
	.zero	1152
	.text
	.globl	getcharat
	.type	getcharat, @function
getcharat:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	cmp	DWORD PTR -4[rbp], 0
	js	.L6
	mov	eax, DWORD PTR map_width[rip]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L6
	cmp	DWORD PTR -8[rbp], 0
	js	.L6
	mov	eax, DWORD PTR map_height[rip]
	cmp	DWORD PTR -8[rbp], eax
	jge	.L6
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR map_width[rip]
	add	eax, 1
	imul	eax, DWORD PTR -8[rbp]
	cdqe
	add	rdx, rax
	lea	rax, map[rip]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	jmp	.L8
.L6:
	mov	eax, 35
.L8:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	getcharat, .-getcharat
	.globl	setcharat
	.type	setcharat, @function
setcharat:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, edx
	mov	BYTE PTR -12[rbp], al
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR map_width[rip]
	add	eax, 1
	imul	eax, DWORD PTR -8[rbp]
	cdqe
	add	rdx, rax
	lea	rax, map[rip]
	add	rdx, rax
	movzx	eax, BYTE PTR -12[rbp]
	mov	BYTE PTR [rdx], al
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	setcharat, .-setcharat
	.globl	parsemap
	.type	parsemap, @function
parsemap:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 16
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	edx, 1152
	mov	esi, 0
	lea	rdi, monsters[rip]
	call	memset@PLT
	mov	esi, 10
	lea	rdi, map[rip]
	call	strchr@PLT
	lea	rdx, map[rip]
	sub	rax, rdx
	mov	DWORD PTR map_width[rip], eax
	lea	rdi, map[rip]
	call	strlen@PLT
	mov	edx, DWORD PTR map_width[rip]
	add	edx, 1
	movsx	rcx, edx
	mov	edx, 0
	div	rcx
	mov	DWORD PTR map_height[rip], eax
	mov	DWORD PTR -20[rbp], 0
	mov	ebx, 0
	jmp	.L11
.L19:
	mov	r12d, 0
	jmp	.L12
.L18:
	mov	esi, r12d
	mov	edi, ebx
	call	getcharat
	mov	BYTE PTR -21[rbp], al
	movzx	eax, BYTE PTR -21[rbp]
	mov	BYTE PTR -22[rbp], al
	movsx	eax, BYTE PTR -21[rbp]
	cmp	eax, 122
	je	.L13
	cmp	eax, 122
	jg	.L14
	cmp	eax, 83
	je	.L15
	cmp	eax, 115
	je	.L16
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rcx, rax
	lea	rdx, monsters[rip]
	movzx	eax, BYTE PTR -21[rbp]
	mov	BYTE PTR [rcx+rdx], al
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+4]
	mov	DWORD PTR [rdx+rax], ebx
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+8]
	mov	DWORD PTR [rdx+rax], r12d
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+16]
	mov	DWORD PTR [rdx+rax], 2
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+28]
	mov	DWORD PTR [rdx+rax], 15
	add	DWORD PTR -20[rbp], 1
	mov	BYTE PTR -22[rbp], 46
	jmp	.L14
.L16:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rcx, rax
	lea	rdx, monsters[rip]
	movzx	eax, BYTE PTR -21[rbp]
	mov	BYTE PTR [rcx+rdx], al
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+4]
	mov	DWORD PTR [rdx+rax], ebx
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+8]
	mov	DWORD PTR [rdx+rax], r12d
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+12]
	mov	DWORD PTR [rdx+rax], 2
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+20]
	mov	DWORD PTR [rdx+rax], 4
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+24]
	mov	DWORD PTR [rdx+rax], 3
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, monsters[rip+32]
	mov	DWORD PTR [rdx+rax], 30
	add	DWORD PTR -20[rbp], 1
	mov	BYTE PTR -22[rbp], 46
	jmp	.L14
.L15:
	mov	DWORD PTR player_x[rip], ebx
	mov	DWORD PTR player_y[rip], r12d
	mov	BYTE PTR -22[rbp], 46
	nop
.L14:
	cmp	BYTE PTR -22[rbp], 0
	je	.L17
	movzx	eax, BYTE PTR -22[rbp]
	cmp	al, BYTE PTR -21[rbp]
	je	.L17
	movsx	eax, BYTE PTR -22[rbp]
	mov	edx, eax
	mov	esi, r12d
	mov	edi, ebx
	call	setcharat
.L17:
	add	r12d, 1
.L12:
	mov	eax, DWORD PTR map_height[rip]
	cmp	r12d, eax
	jl	.L18
	add	ebx, 1
.L11:
	mov	eax, DWORD PTR map_width[rip]
	cmp	ebx, eax
	jl	.L19
	nop
	nop
	add	rsp, 16
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	parsemap, .-parsemap
	.section	.rodata
	.align 8
.LC0:
	.string	"Welcome to dvori. Use the arrow keys to move around."
.LC1:
	.string	"You were shot by a monster!"
.LC2:
	.string	"You were hit by a monster!"
.LC3:
	.string	"You lost the game."
	.text
	.globl	updategame
	.type	updategame, @function
updategame:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 48
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -52[rbp], edi
	cmp	DWORD PTR -52[rbp], 119
	jg	.L21
	cmp	DWORD PTR -52[rbp], 97
	jge	.L22
	cmp	DWORD PTR -52[rbp], -1
	je	.L23
	cmp	DWORD PTR -52[rbp], 27
	je	.L24
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, 97
	cmp	eax, 22
	ja	.L21
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L26[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L26[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L26:
	.long	.L30-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L29-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L28-.L26
	.long	.L21-.L26
	.long	.L27-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L21-.L26
	.long	.L25-.L26
	.text
.L23:
	lea	rax, .LC0[rip]
	mov	QWORD PTR current_message[rip], rax
	jmp	.L21
.L28:
	mov	eax, 0
	call	finish
	jmp	.L21
.L70:
	nop
.L25:
	mov	eax, DWORD PTR player_y[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR player_x[rip]
	mov	esi, edx
	mov	edi, eax
	call	getcharat
	cmp	al, 35
	je	.L63
	mov	eax, DWORD PTR player_y[rip]
	sub	eax, 1
	mov	DWORD PTR player_y[rip], eax
	jmp	.L63
.L71:
	nop
.L27:
	mov	eax, DWORD PTR player_y[rip]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR player_x[rip]
	mov	esi, edx
	mov	edi, eax
	call	getcharat
	cmp	al, 35
	je	.L64
	mov	eax, DWORD PTR player_y[rip]
	add	eax, 1
	mov	DWORD PTR player_y[rip], eax
	jmp	.L64
.L67:
	nop
.L30:
	mov	eax, DWORD PTR player_y[rip]
	mov	edx, DWORD PTR player_x[rip]
	sub	edx, 1
	mov	esi, eax
	mov	edi, edx
	call	getcharat
	cmp	al, 35
	je	.L65
	mov	eax, DWORD PTR player_x[rip]
	sub	eax, 1
	mov	DWORD PTR player_x[rip], eax
	jmp	.L65
.L69:
	nop
.L29:
	mov	eax, DWORD PTR player_y[rip]
	mov	edx, DWORD PTR player_x[rip]
	add	edx, 1
	mov	esi, eax
	mov	edi, edx
	call	getcharat
	cmp	al, 35
	je	.L66
	mov	eax, DWORD PTR player_x[rip]
	add	eax, 1
	mov	DWORD PTR player_x[rip], eax
	jmp	.L66
.L24:
	call	getchar@PLT
	cmp	eax, 91
	je	.L35
	mov	eax, 0
	call	finish
	mov	edi, 0
	call	exit@PLT
.L35:
	call	getchar@PLT
	cmp	eax, 68
	je	.L67
	cmp	eax, 68
	jg	.L68
	cmp	eax, 67
	je	.L69
	cmp	eax, 67
	jg	.L68
	cmp	eax, 65
	je	.L70
	cmp	eax, 66
	je	.L71
	jmp	.L68
.L63:
	nop
	jmp	.L21
.L64:
	nop
	jmp	.L21
.L65:
	nop
	jmp	.L21
.L66:
	nop
	jmp	.L21
.L68:
	nop
.L21:
	mov	ebx, 0
	jmp	.L40
.L62:
	movsx	rdx, ebx
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	lea	rdx, monsters[rip]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	je	.L41
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L41
	mov	r12d, 1
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edx, DWORD PTR player_x[rip]
	sub	eax, edx
	cdq
	xor	eax, edx
	mov	DWORD PTR -32[rbp], eax
	sub	DWORD PTR -32[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	edx, DWORD PTR player_y[rip]
	sub	eax, edx
	cdq
	xor	eax, edx
	mov	DWORD PTR -28[rbp], eax
	sub	DWORD PTR -28[rbp], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 20[rax]
	test	eax, eax
	je	.L42
	mov	eax, DWORD PTR tick[rip]
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 20[rdx]
	cdq
	idiv	ecx
	mov	eax, edx
	test	eax, eax
	jne	.L42
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 24[rax]
	cmp	DWORD PTR -32[rbp], eax
	jg	.L42
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 24[rax]
	cmp	DWORD PTR -28[rbp], eax
	jg	.L42
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edx, DWORD PTR player_x[rip]
	sub	eax, edx
	cmp	eax, -1
	jl	.L42
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edx, DWORD PTR player_x[rip]
	sub	eax, edx
	cmp	eax, 1
	jg	.L42
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	jge	.L43
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -40[rbp], eax
	jmp	.L44
.L45:
	add	DWORD PTR -40[rbp], 1
.L44:
	mov	eax, DWORD PTR player_y[rip]
	cmp	DWORD PTR -40[rbp], eax
	jl	.L45
	jmp	.L46
.L43:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	jle	.L46
	mov	eax, DWORD PTR player_y[rip]
	mov	DWORD PTR -36[rbp], eax
	jmp	.L47
.L48:
	sub	DWORD PTR -36[rbp], 1
.L47:
	mov	eax, DWORD PTR player_y[rip]
	cmp	DWORD PTR -36[rbp], eax
	jg	.L48
.L46:
	lea	rax, .LC1[rip]
	mov	QWORD PTR current_message[rip], rax
	mov	edx, DWORD PTR player_health[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 32[rax]
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR player_health[rip], eax
.L42:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 28[rax]
	test	eax, eax
	je	.L49
	mov	eax, DWORD PTR tick[rip]
	and	eax, 1
	test	eax, eax
	jne	.L49
	cmp	DWORD PTR -32[rbp], 1
	jg	.L49
	cmp	DWORD PTR -28[rbp], 1
	jg	.L49
	lea	rax, .LC2[rip]
	mov	QWORD PTR current_message[rip], rax
	mov	edx, DWORD PTR player_health[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 28[rax]
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR player_health[rip], eax
.L49:
	test	r12d, r12d
	je	.L50
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 12[rax]
	test	eax, eax
	je	.L51
	mov	eax, DWORD PTR tick[rip]
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 12[rdx]
	cdq
	idiv	ecx
	mov	eax, edx
	test	eax, eax
	jne	.L50
.L51:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	je	.L52
	mov	eax, DWORD PTR tick[rip]
	mov	rdx, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 16[rdx]
	cdq
	idiv	ecx
	mov	eax, edx
	test	eax, eax
	je	.L50
.L52:
	cmp	DWORD PTR -32[rbp], 17
	jg	.L50
	cmp	DWORD PTR -28[rbp], 9
	jg	.L50
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR player_x[rip]
	cmp	edx, eax
	jle	.L53
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rdx]
	sub	edx, 1
	mov	esi, eax
	mov	edi, edx
	call	getcharat
	cmp	al, 35
	je	.L53
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR player_x[rip]
	cmp	edx, eax
	jne	.L54
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	je	.L53
.L54:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L50
.L53:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR player_x[rip]
	cmp	edx, eax
	jge	.L55
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rdx]
	add	edx, 1
	mov	esi, eax
	mov	edi, edx
	call	getcharat
	cmp	al, 35
	je	.L55
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR player_x[rip]
	cmp	edx, eax
	jne	.L56
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	je	.L55
.L56:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L50
.L55:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	jle	.L57
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, edx
	mov	edi, eax
	call	getcharat
	cmp	al, 35
	je	.L57
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR player_x[rip]
	cmp	edx, eax
	jne	.L58
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	je	.L57
.L58:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L50
.L57:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	jge	.L50
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, edx
	mov	edi, eax
	call	getcharat
	cmp	al, 35
	je	.L50
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR player_x[rip]
	cmp	edx, eax
	jne	.L59
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR player_y[rip]
	cmp	edx, eax
	je	.L50
.L59:
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], edx
.L50:
	mov	eax, DWORD PTR player_health[rip]
	test	eax, eax
	jg	.L60
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	finish
	jmp	.L61
.L60:
	mov	edx, DWORD PTR tick[rip]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L61
	mov	eax, DWORD PTR player_health[rip]
	mov	edx, 95
	cmp	eax, 95
	cmovg	eax, edx
	add	eax, 5
	mov	DWORD PTR player_health[rip], eax
.L61:
	add	ebx, 1
.L40:
	cmp	ebx, 31
	jle	.L62
.L41:
	mov	eax, DWORD PTR tick[rip]
	add	eax, 1
	mov	DWORD PTR tick[rip], eax
	nop
	add	rsp, 48
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	updategame, .-updategame
	.globl	drawscreen
	.type	drawscreen, @function
drawscreen:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 32
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wclear@PLT
	mov	ebx, 0
	jmp	.L73
.L74:
	mov	ecx, 1
	mov	edx, 0
	mov	esi, ebx
	mov	edi, 45
	call	drawchar
	add	ebx, 1
.L73:
	cmp	ebx, 79
	jle	.L74
	mov	ebx, 0
	jmp	.L75
.L76:
	mov	ecx, 1
	mov	edx, 23
	mov	esi, ebx
	mov	edi, 45
	call	drawchar
	add	ebx, 1
.L75:
	cmp	ebx, 79
	jle	.L76
	mov	ebx, 0
	jmp	.L77
.L78:
	mov	ecx, 1
	mov	edx, ebx
	mov	esi, 0
	mov	edi, 124
	call	drawchar
	add	ebx, 1
.L77:
	cmp	ebx, 23
	jle	.L78
	mov	ebx, 0
	jmp	.L79
.L80:
	mov	ecx, 1
	mov	edx, ebx
	mov	esi, 79
	mov	edi, 124
	call	drawchar
	add	ebx, 1
.L79:
	cmp	ebx, 23
	jle	.L80
	mov	DWORD PTR -40[rbp], 31
	mov	DWORD PTR -36[rbp], 7
	mov	DWORD PTR -32[rbp], 8
	mov	DWORD PTR -28[rbp], 4
	mov	ebx, 0
	jmp	.L81
.L84:
	mov	r12d, 0
	jmp	.L82
.L83:
	mov	eax, DWORD PTR player_y[rip]
	add	eax, r12d
	sub	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR player_x[rip]
	add	eax, ebx
	sub	eax, DWORD PTR -32[rbp]
	mov	esi, edx
	mov	edi, eax
	call	getcharat
	mov	BYTE PTR -41[rbp], al
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, [r12+rax]
	mov	eax, DWORD PTR -40[rbp]
	lea	esi, [rbx+rax]
	movsx	eax, BYTE PTR -41[rbp]
	mov	ecx, 1
	mov	edi, eax
	call	drawchar
	add	r12d, 1
.L82:
	cmp	r12d, 8
	jle	.L83
	add	ebx, 1
.L81:
	cmp	ebx, 16
	jle	.L84
	mov	ebx, 0
	jmp	.L85
.L88:
	movsx	rdx, ebx
	mov	rax, rdx
	sal	rax, 3
	add	rax, rdx
	sal	rax, 2
	lea	rdx, monsters[rip]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	je	.L86
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L86
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	edx, DWORD PTR player_x[rip]
	sub	eax, edx
	cdq
	xor	eax, edx
	sub	eax, edx
	cmp	DWORD PTR -32[rbp], eax
	jl	.L87
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	edx, DWORD PTR player_y[rip]
	sub	eax, edx
	cdq
	xor	eax, edx
	sub	eax, edx
	cmp	DWORD PTR -28[rbp], eax
	jl	.L87
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -36[rbp]
	add	eax, edx
	mov	edx, DWORD PTR player_y[rip]
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, [rcx+rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -40[rbp]
	add	eax, ecx
	mov	ecx, DWORD PTR player_x[rip]
	sub	eax, ecx
	mov	esi, eax
	mov	eax, DWORD PTR -32[rbp]
	add	esi, eax
	mov	rax, QWORD PTR -24[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	ecx, 1
	mov	edi, eax
	call	drawchar
.L87:
	add	ebx, 1
.L85:
	cmp	ebx, 31
	jle	.L88
.L86:
	mov	rax, QWORD PTR current_message[rip]
	test	rax, rax
	je	.L89
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, 256
	mov	rdi, rax
	call	wattr_on@PLT
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 4
	mov	esi, 21
	mov	rdi, rax
	call	wmove@PLT
	cmp	eax, -1
	je	.L91
	mov	rcx, QWORD PTR current_message[rip]
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, -1
	mov	rsi, rcx
	mov	rdi, rax
	call	waddnstr@PLT
.L91:
	mov	rax, QWORD PTR stdscr[rip]
	mov	edx, 0
	mov	esi, 256
	mov	rdi, rax
	call	wattr_off@PLT
	mov	QWORD PTR current_message[rip], 0
.L89:
	mov	edx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	edx, eax
	mov	ecx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -32[rbp]
	add	eax, ecx
	mov	ecx, 1
	mov	esi, eax
	mov	edi, 64
	call	drawchar
	mov	edx, DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -32[rbp]
	add	edx, eax
	mov	ecx, DWORD PTR -36[rbp]
	mov	eax, DWORD PTR -28[rbp]
	add	ecx, eax
	mov	rax, QWORD PTR stdscr[rip]
	mov	esi, ecx
	mov	rdi, rax
	call	wmove@PLT
	nop
	add	rsp, 32
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	drawscreen, .-drawscreen
	.section	.rodata
.LC4:
	.string	"Error initialising ncurses.\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -80[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	tcgetattr@PLT
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -3
	mov	DWORD PTR -68[rbp], eax
	mov	BYTE PTR -57[rbp], 1
	mov	BYTE PTR -58[rbp], 0
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	call	initscr@PLT
	mov	QWORD PTR mainwin[rip], rax
	mov	rax, QWORD PTR mainwin[rip]
	test	rax, rax
	jne	.L93
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L93:
	mov	eax, 0
	call	parsemap
	mov	edi, -1
	call	updategame
	mov	eax, 0
	call	drawscreen
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
.L94:
	call	getchar@PLT
	mov	BYTE PTR -81[rbp], al
	movsx	eax, BYTE PTR -81[rbp]
	mov	edi, eax
	call	updategame
	mov	eax, 0
	call	drawscreen
	mov	rax, QWORD PTR stdscr[rip]
	mov	rdi, rax
	call	wrefresh@PLT
	jmp	.L94
	.cfi_endproc
.LFE13:
	.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	"797604.c"
	.text
	.comm	mainwin,4,4
	.global	tick
	.bss
	.align	2
	.type	tick, %object
	.size	tick, 4
tick:
	.space	4
	.text
	.align	2
	.global	drawchar
	.syntax unified
	.arm
	.fpu softvfp
	.type	drawchar, %function
drawchar:
	@ 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	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldr	r3, .L4
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r2, #0
	mov	r1, r3
	bl	wattr_on
	ldr	r3, .L4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	wmove
	mov	r3, r0
	cmn	r3, #1
	beq	.L3
	ldr	r3, .L4
	ldr	r3, [r3]
	ldrb	r2, [fp, #-5]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	waddch
.L3:
	ldr	r3, .L4
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r2, #0
	mov	r1, r3
	bl	wattr_off
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	stdscr
	.size	drawchar, .-drawchar
	.align	2
	.global	finish
	.syntax unified
	.arm
	.fpu softvfp
	.type	finish, %function
finish:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r0, r3
	bl	wclear
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	delwin
	bl	endwin
	ldr	r3, .L7
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	mov	r0, #0
	bl	exit
.L8:
	.align	2
.L7:
	.word	stdscr
	.word	mainwin
	.size	finish, .-finish
	.global	map
	.data
	.align	2
	.type	map, %object
	.size	map, 1089
map:
	.ascii	"###################################################"
	.ascii	"################\012S.............................."
	.ascii	".....###############################\012#########.."
	.ascii	".....#################...##########################"
	.ascii	"#####\012#########.......#################...######"
	.ascii	"#########################\012#########.......######"
	.ascii	"###########...###############################\012##"
	.ascii	"#######.......#################...#################"
	.ascii	"##############\012#########......s#################"
	.ascii	"...###############################\012#########..##"
	.ascii	"#################.........#########################"
	.ascii	"###\012#########..###################.............."
	.ascii	"........###############\012#########..#############"
	.ascii	"######....z.................###############\012####"
	.ascii	"#####........#############.........################"
	.ascii	"############\012#########........##################"
	.ascii	"###.############################\012#########..####"
	.ascii	"..#####################.###########################"
	.ascii	"#\012#########..####..#####################.#######"
	.ascii	"#####################\012#########................."
	.ascii	".............############################\012######"
	.ascii	"###################################################"
	.ascii	"##########\012\000"
	.global	map_width
	.bss
	.align	2
	.type	map_width, %object
	.size	map_width, 4
map_width:
	.space	4
	.global	map_height
	.align	2
	.type	map_height, %object
	.size	map_height, 4
map_height:
	.space	4
	.global	current_message
	.align	2
	.type	current_message, %object
	.size	current_message, 4
current_message:
	.space	4
	.global	player_x
	.align	2
	.type	player_x, %object
	.size	player_x, 4
player_x:
	.space	4
	.global	player_y
	.align	2
	.type	player_y, %object
	.size	player_y, 4
player_y:
	.space	4
	.global	player_health
	.data
	.align	2
	.type	player_health, %object
	.size	player_health, 4
player_health:
	.word	100
	.comm	monsters,1152,4
	.text
	.align	2
	.global	getcharat
	.syntax unified
	.arm
	.fpu softvfp
	.type	getcharat, %function
getcharat:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L10
	ldr	r3, .L13
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L10
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L10
	ldr	r3, .L13+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L10
	ldr	r3, .L13
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, [fp, #-12]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, .L13+8
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	b	.L11
.L10:
	mov	r3, #35
.L11:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L14:
	.align	2
.L13:
	.word	map_width
	.word	map_height
	.word	map
	.size	getcharat, .-getcharat
	.align	2
	.global	setcharat
	.syntax unified
	.arm
	.fpu softvfp
	.type	setcharat, %function
setcharat:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r3, r2
	strb	r3, [fp, #-13]
	ldr	r3, .L16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, [fp, #-12]
	mul	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, .L16+4
	add	r3, r3, r2
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	nop
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L17:
	.align	2
.L16:
	.word	map_width
	.word	map
	.size	setcharat, .-setcharat
	.global	__aeabi_uidiv
	.align	2
	.global	parsemap
	.syntax unified
	.arm
	.fpu softvfp
	.type	parsemap, %function
parsemap:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	mov	r2, #1152
	mov	r1, #0
	ldr	r0, .L28
	bl	memset
	mov	r1, #10
	ldr	r0, .L28+4
	bl	strchr
	mov	r3, r0
	ldr	r2, .L28+4
	sub	r3, r3, r2
	ldr	r2, .L28+8
	str	r3, [r2]
	ldr	r0, .L28+4
	bl	strlen
	mov	r2, r0
	ldr	r3, .L28+8
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_uidiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L28+12
	str	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r4, #0
	b	.L19
.L27:
	mov	r5, #0
	b	.L20
.L26:
	mov	r1, r5
	mov	r0, r4
	bl	getcharat
	mov	r3, r0
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]
	strb	r3, [fp, #-18]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #122
	beq	.L21
	cmp	r3, #122
	bgt	.L22
	cmp	r3, #83
	beq	.L23
	cmp	r3, #115
	beq	.L24
	b	.L22
.L21:
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r2, [fp, #-17]
	strb	r2, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	str	r4, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	str	r5, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #16
	mov	r2, #2
	str	r2, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #28
	mov	r2, #15
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	mov	r3, #46
	strb	r3, [fp, #-18]
	b	.L22
.L24:
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r2, [fp, #-17]
	strb	r2, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	str	r4, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	str	r5, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #12
	mov	r2, #2
	str	r2, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #20
	mov	r2, #4
	str	r2, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #24
	mov	r2, #3
	str	r2, [r3]
	ldr	r1, .L28
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #32
	mov	r2, #30
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	mov	r3, #46
	strb	r3, [fp, #-18]
	b	.L22
.L23:
	ldr	r3, .L28+16
	str	r4, [r3]
	ldr	r3, .L28+20
	str	r5, [r3]
	mov	r3, #46
	strb	r3, [fp, #-18]
	nop
.L22:
	ldrb	r3, [fp, #-18]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L25
	ldrb	r2, [fp, #-18]	@ zero_extendqisi2
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L25
	ldrb	r3, [fp, #-18]	@ zero_extendqisi2
	mov	r2, r3
	mov	r1, r5
	mov	r0, r4
	bl	setcharat
.L25:
	add	r5, r5, #1
.L20:
	ldr	r3, .L28+12
	ldr	r3, [r3]
	cmp	r5, r3
	blt	.L26
	add	r4, r4, #1
.L19:
	ldr	r3, .L28+8
	ldr	r3, [r3]
	cmp	r4, r3
	blt	.L27
	nop
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L29:
	.align	2
.L28:
	.word	monsters
	.word	map
	.word	map_width
	.word	map_height
	.word	player_x
	.word	player_y
	.size	parsemap, .-parsemap
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Welcome to dvori. Use the arrow keys to move around"
	.ascii	".\000"
	.global	__aeabi_idivmod
	.align	2
.LC1:
	.ascii	"You were shot by a monster!\000"
	.align	2
.LC2:
	.ascii	"You were hit by a monster!\000"
	.align	2
.LC3:
	.ascii	"You lost the game.\000"
	.text
	.align	2
	.global	updategame
	.syntax unified
	.arm
	.fpu softvfp
	.type	updategame, %function
updategame:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #119
	bgt	.L31
	ldr	r3, [fp, #-40]
	cmp	r3, #97
	bge	.L32
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	beq	.L33
	ldr	r3, [fp, #-40]
	cmp	r3, #27
	beq	.L34
	b	.L31
.L32:
	ldr	r3, [fp, #-40]
	sub	r3, r3, #97
	cmp	r3, #22
	ldrls	pc, [pc, r3, asl #2]
	b	.L31
.L36:
	.word	.L40
	.word	.L31
	.word	.L31
	.word	.L39
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L38
	.word	.L31
	.word	.L37
	.word	.L31
	.word	.L31
	.word	.L31
	.word	.L35
.L33:
	ldr	r3, .L84
	ldr	r2, .L84+4
	str	r2, [r3]
	b	.L31
.L38:
	bl	finish
	b	.L31
.L80:
	nop
.L35:
	ldr	r3, .L84+8
	ldr	r2, [r3]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L75
	ldr	r3, .L84+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L84+12
	str	r3, [r2]
	b	.L75
.L81:
	nop
.L37:
	ldr	r3, .L84+8
	ldr	r2, [r3]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L76
	ldr	r3, .L84+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L84+12
	str	r3, [r2]
	b	.L76
.L83:
	nop
.L40:
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L84+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L77
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L84+8
	str	r3, [r2]
	b	.L77
.L82:
	nop
.L39:
	ldr	r3, .L84+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L84+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L78
	ldr	r3, .L84+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L84+8
	str	r3, [r2]
	b	.L78
.L34:
	bl	getchar
	mov	r3, r0
	cmp	r3, #91
	beq	.L45
	bl	finish
	mov	r0, #0
	bl	exit
.L45:
	bl	getchar
	mov	r3, r0
	sub	r3, r3, #65
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L79
.L48:
	.word	.L80
	.word	.L81
	.word	.L82
	.word	.L83
.L75:
	nop
	b	.L31
.L76:
	nop
	b	.L31
.L77:
	nop
	b	.L31
.L78:
	nop
	b	.L31
.L79:
	nop
.L31:
	mov	r4, #0
	b	.L52
.L74:
	mov	r3, r4
	lsl	r3, r3, #3
	add	r3, r3, r4
	lsl	r3, r3, #2
	ldr	r2, .L84+16
	add	r3, r3, r2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L53
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L53
	mov	r5, #1
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	beq	.L54
	ldr	r3, .L84+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #20]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L54
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #24]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bgt	.L54
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #24]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bgt	.L54
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmn	r3, #1
	blt	.L54
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmp	r3, #1
	bgt	.L54
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L55
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-32]
	b	.L56
.L57:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L56:
	ldr	r3, .L84+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	blt	.L57
	b	.L58
.L55:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L58
	ldr	r3, .L84+12
	ldr	r3, [r3]
	str	r3, [fp, #-28]
	b	.L59
.L60:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
.L59:
	ldr	r3, .L84+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bgt	.L60
.L58:
	ldr	r3, .L84
	ldr	r2, .L84+24
	str	r2, [r3]
	ldr	r3, .L84+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #32]
	sub	r3, r2, r3
	ldr	r2, .L84+28
	str	r3, [r2]
.L54:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	beq	.L61
	ldr	r3, .L84+20
	ldr	r3, [r3]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L61
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bgt	.L61
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L61
	ldr	r3, .L84
	ldr	r2, .L84+32
	str	r2, [r3]
	ldr	r3, .L84+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #28]
	sub	r3, r2, r3
	ldr	r2, .L84+28
	str	r3, [r2]
.L61:
	cmp	r5, #0
	beq	.L62
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	beq	.L63
	ldr	r3, .L84+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	bne	.L62
.L63:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L64
	ldr	r3, .L84+20
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #16]
	mov	r1, r3
	mov	r0, r2
	bl	__aeabi_idivmod
	mov	r3, r1
	cmp	r3, #0
	beq	.L62
.L64:
	ldr	r3, [fp, #-20]
	cmp	r3, #17
	bgt	.L62
	ldr	r3, [fp, #-16]
	cmp	r3, #9
	bgt	.L62
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L65
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	sub	r2, r3, #1
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L65
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	sub	r2, r3, #1
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L66
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L65
.L66:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	sub	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	b	.L62
.L65:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L67
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L67
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L68
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L67
.L68:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	b	.L62
.L67:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L69
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	sub	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L69
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L70
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	sub	r2, r3, #1
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L69
.L70:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	sub	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	b	.L62
.L69:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L62
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	add	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	getcharat
	mov	r3, r0
	cmp	r3, #35
	beq	.L62
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L71
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	add	r2, r3, #1
	ldr	r3, .L84+12
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L62
.L71:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
.L62:
	ldr	r3, .L84+28
	ldr	r3, [r3]
	cmp	r3, #0
	bgt	.L72
	ldr	r0, .L84+36
	bl	printf
	bl	finish
	b	.L73
.L72:
	ldr	r3, .L84+20
	ldr	r1, [r3]
	ldr	r3, .L84+40
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L73
	ldr	r3, .L84+28
	ldr	r3, [r3]
	cmp	r3, #95
	movlt	r3, r3
	movge	r3, #95
	add	r3, r3, #5
	ldr	r2, .L84+28
	str	r3, [r2]
.L73:
	add	r4, r4, #1
.L52:
	cmp	r4, #31
	ble	.L74
.L53:
	ldr	r3, .L84+20
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L84+20
	str	r3, [r2]
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L85:
	.align	2
.L84:
	.word	current_message
	.word	.LC0
	.word	player_x
	.word	player_y
	.word	monsters
	.word	tick
	.word	.LC1
	.word	player_health
	.word	.LC2
	.word	.LC3
	.word	1717986919
	.size	updategame, .-updategame
	.align	2
	.global	drawscreen
	.syntax unified
	.arm
	.fpu softvfp
	.type	drawscreen, %function
drawscreen:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	ldr	r3, .L106
	ldr	r3, [r3]
	mov	r0, r3
	bl	wclear
	mov	r4, #0
	b	.L87
.L88:
	mov	r3, #1
	mov	r2, #0
	mov	r1, r4
	mov	r0, #45
	bl	drawchar
	add	r4, r4, #1
.L87:
	cmp	r4, #79
	ble	.L88
	mov	r4, #0
	b	.L89
.L90:
	mov	r3, #1
	mov	r2, #23
	mov	r1, r4
	mov	r0, #45
	bl	drawchar
	add	r4, r4, #1
.L89:
	cmp	r4, #79
	ble	.L90
	mov	r4, #0
	b	.L91
.L92:
	mov	r3, #1
	mov	r2, r4
	mov	r1, #0
	mov	r0, #124
	bl	drawchar
	add	r4, r4, #1
.L91:
	cmp	r4, #23
	ble	.L92
	mov	r4, #0
	b	.L93
.L94:
	mov	r3, #1
	mov	r2, r4
	mov	r1, #79
	mov	r0, #124
	bl	drawchar
	add	r4, r4, #1
.L93:
	cmp	r4, #23
	ble	.L94
	mov	r3, #31
	str	r3, [fp, #-32]
	mov	r3, #7
	str	r3, [fp, #-28]
	mov	r3, #8
	str	r3, [fp, #-24]
	mov	r3, #4
	str	r3, [fp, #-20]
	mov	r4, #0
	b	.L95
.L98:
	mov	r5, #0
	b	.L96
.L97:
	ldr	r3, .L106+4
	ldr	r3, [r3]
	add	r2, r4, r3
	ldr	r3, [fp, #-24]
	sub	r0, r2, r3
	ldr	r3, .L106+8
	ldr	r3, [r3]
	add	r2, r5, r3
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	mov	r1, r3
	bl	getcharat
	mov	r3, r0
	strb	r3, [fp, #-33]
	ldr	r3, [fp, #-32]
	add	r1, r4, r3
	ldr	r3, [fp, #-28]
	add	r2, r5, r3
	ldrb	r0, [fp, #-33]	@ zero_extendqisi2
	mov	r3, #1
	bl	drawchar
	add	r5, r5, #1
.L96:
	cmp	r5, #8
	ble	.L97
	add	r4, r4, #1
.L95:
	cmp	r4, #16
	ble	.L98
	mov	r4, #0
	b	.L99
.L102:
	mov	r3, r4
	lsl	r3, r3, #3
	add	r3, r3, r4
	lsl	r3, r3, #2
	ldr	r2, .L106+12
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L100
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L100
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, .L106+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	blt	.L101
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, .L106+8
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmp	r3, #0
	rsblt	r3, r3, #0
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L101
	ldr	r3, [fp, #-16]
	ldrb	r0, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, .L106+4
	ldr	r3, [r3]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	add	r1, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, .L106+8
	ldr	r3, [r3]
	sub	r2, r2, r3
	ldr	r3, [fp, #-20]
	add	r2, r2, r3
	mov	r3, #1
	bl	drawchar
.L101:
	add	r4, r4, #1
.L99:
	cmp	r4, #31
	ble	.L102
.L100:
	ldr	r3, .L106+16
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L103
	ldr	r3, .L106
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #256
	mov	r0, r3
	bl	wattr_on
	ldr	r3, .L106
	ldr	r3, [r3]
	mov	r2, #4
	mov	r1, #21
	mov	r0, r3
	bl	wmove
	mov	r3, r0
	cmn	r3, #1
	beq	.L105
	ldr	r3, .L106
	ldr	r3, [r3]
	ldr	r2, .L106+16
	ldr	r1, [r2]
	mvn	r2, #0
	mov	r0, r3
	bl	waddnstr
.L105:
	ldr	r3, .L106
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #256
	mov	r0, r3
	bl	wattr_off
	ldr	r3, .L106+16
	mov	r2, #0
	str	r2, [r3]
.L103:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r1, r2, r3
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	add	r2, r2, r3
	mov	r3, #1
	mov	r0, #64
	bl	drawchar
	ldr	r3, .L106
	ldr	r0, [r3]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	add	r1, r2, r3
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	mov	r2, r3
	bl	wmove
	nop
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L107:
	.align	2
.L106:
	.word	stdscr
	.word	player_x
	.word	player_y
	.word	monsters
	.word	current_message
	.size	drawscreen, .-drawscreen
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Error initialising ncurses.\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	ldr	r3, .L112
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r1, r3
	mov	r0, #0
	bl	tcgetattr
	ldr	r3, [fp, #-56]
	bic	r3, r3, #2
	str	r3, [fp, #-56]
	mov	r3, #1
	strb	r3, [fp, #-45]
	mov	r3, #0
	strb	r3, [fp, #-46]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	bl	initscr
	mov	r3, r0
	ldr	r2, .L112+4
	str	r3, [r2]
	ldr	r3, .L112+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L109
	ldr	r3, .L112+8
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L112+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L109:
	bl	parsemap
	mvn	r0, #0
	bl	updategame
	bl	drawscreen
	ldr	r3, .L112+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
.L110:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-69]
	ldrb	r3, [fp, #-69]	@ zero_extendqisi2
	mov	r0, r3
	bl	updategame
	bl	drawscreen
	ldr	r3, .L112+16
	ldr	r3, [r3]
	mov	r0, r3
	bl	wrefresh
	b	.L110
.L113:
	.align	2
.L112:
	.word	.LC5
	.word	mainwin
	.word	stderr
	.word	.LC4
	.word	stdscr
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
