	.file	"173578795.c"
	.intel_syntax noprefix
	.text
	.globl	termios
	.bss
	.align 32
	.type	termios, @object
	.size	termios, 60
termios:
	.zero	60
	.globl	original_termios
	.align 32
	.type	original_termios, @object
	.size	original_termios, 60
original_termios:
	.zero	60
	.globl	dx
	.data
	.align 16
	.type	dx, @object
	.size	dx, 16
dx:
	.long	0
	.long	0
	.long	1
	.long	-1
	.globl	dy
	.align 16
	.type	dy, @object
	.size	dy, 16
dy:
	.long	-1
	.long	1
	.long	0
	.long	0
	.globl	board
	.bss
	.align 32
	.type	board, @object
	.size	board, 64
board:
	.zero	64
	.globl	score
	.align 4
	.type	score, @object
	.size	score, 4
score:
	.zero	4
	.text
	.globl	myrand
	.type	myrand, @function
myrand:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR lcg.0[rip]
	imul	eax, eax, 1664525
	add	eax, 1013904223
	mov	DWORD PTR lcg.0[rip], eax
	mov	eax, DWORD PTR lcg.0[rip]
	cdq
	idiv	DWORD PTR -20[rbp]
	mov	DWORD PTR -4[rbp], edx
	cmp	DWORD PTR -4[rbp], 0
	jns	.L2
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	jmp	.L4
.L2:
	mov	eax, DWORD PTR -4[rbp]
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	myrand, .-myrand
	.section	.rodata
.LC0:
	.string	"%4d"
	.text
	.globl	print_int
	.type	print_int, @function
print_int:
.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_int, .-print_int
	.section	.rodata
.LC1:
	.string	"\033[0m"
.LC2:
	.string	"\033[1;43m"
.LC3:
	.string	"\033[1;42m"
.LC4:
	.string	"\033[1;46m"
.LC5:
	.string	"\033[1;44m"
.LC6:
	.string	"\033[1;45m"
.LC7:
	.string	"\033[1;41m"
	.text
	.globl	changeColor
	.type	changeColor, @function
changeColor:
.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	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 0
	jne	.L7
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L16
.L7:
	mov	eax, DWORD PTR -4[rbp]
	lea	ecx, -1[rax]
	movsx	rax, ecx
	imul	rax, rax, 715827883
	shr	rax, 32
	mov	esi, ecx
	sar	esi, 31
	mov	edx, eax
	sub	edx, esi
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	cmp	edx, 5
	ja	.L16
	mov	eax, edx
	lea	rdx, 0[0+rax*4]
	lea	rax, .L10[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L10[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L10:
	.long	.L15-.L10
	.long	.L14-.L10
	.long	.L13-.L10
	.long	.L12-.L10
	.long	.L11-.L10
	.long	.L9-.L10
	.text
.L15:
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L14:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L13:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L12:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L11:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L9:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L8:
.L16:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	changeColor, .-changeColor
	.globl	resetColor
	.type	resetColor, @function
resetColor:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 0
	call	changeColor
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	resetColor, .-resetColor
	.section	.rodata
.LC8:
	.string	"\033[H"
.LC9:
	.string	"+------+------+------+------+"
.LC10:
	.string	"      "
.LC11:
	.string	"|"
.LC12:
	.string	" %4d "
	.text
	.globl	showBoard
	.type	showBoard, @function
showBoard:
.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, 16
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -12[rbp], 0
	jmp	.L19
.L28:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L20
.L21:
	mov	edi, 124
	call	putchar@PLT
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edi, eax
	call	changeColor
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	resetColor
	add	DWORD PTR -8[rbp], 1
.L20:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L21
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L22
.L25:
	mov	edi, 124
	call	putchar@PLT
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	changeColor
	cmp	DWORD PTR -4[rbp], 0
	je	.L23
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L24
.L23:
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L24:
	mov	eax, 0
	call	resetColor
	add	DWORD PTR -8[rbp], 1
.L22:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L25
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L26
.L27:
	mov	edi, 124
	call	putchar@PLT
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edi, eax
	call	changeColor
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	resetColor
	add	DWORD PTR -8[rbp], 1
.L26:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L27
	lea	rdi, .LC11[rip]
	call	puts@PLT
	add	DWORD PTR -12[rbp], 1
.L19:
	cmp	DWORD PTR -12[rbp], 3
	jle	.L28
	lea	rdi, .LC9[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	showBoard, .-showBoard
	.globl	isValid
	.type	isValid, @function
isValid:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	cmp	DWORD PTR -4[rbp], 0
	js	.L30
	cmp	DWORD PTR -4[rbp], 3
	jle	.L31
.L30:
	mov	eax, 0
	jmp	.L32
.L31:
	cmp	DWORD PTR -8[rbp], 0
	js	.L33
	cmp	DWORD PTR -8[rbp], 3
	jle	.L34
.L33:
	mov	eax, 0
	jmp	.L32
.L34:
	mov	eax, 1
.L32:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	isValid, .-isValid
	.globl	movable
	.type	movable, @function
movable:
.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, 24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -16[rbp], 0
	jmp	.L36
.L42:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L37
.L41:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dy[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dx[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isValid
	test	al, al
	je	.L38
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L38
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L39
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jne	.L38
.L39:
	mov	eax, 1
	jmp	.L40
.L38:
	add	DWORD PTR -12[rbp], 1
.L37:
	cmp	DWORD PTR -12[rbp], 3
	jle	.L41
	add	DWORD PTR -16[rbp], 1
.L36:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L42
	mov	eax, 0
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	movable, .-movable
	.globl	gameover
	.type	gameover, @function
gameover:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -8[rbp], 0
	jmp	.L44
.L49:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L45
.L48:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	eax, 11
	jne	.L46
	mov	eax, 1
	jmp	.L47
.L46:
	add	DWORD PTR -4[rbp], 1
.L45:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L48
	add	DWORD PTR -8[rbp], 1
.L44:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L49
	mov	DWORD PTR -8[rbp], 0
	jmp	.L50
.L52:
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	call	movable
	test	al, al
	je	.L51
	mov	eax, 0
	jmp	.L47
.L51:
	add	DWORD PTR -8[rbp], 1
.L50:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L52
	mov	eax, 1
.L47:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	gameover, .-gameover
	.globl	putNum
	.type	putNum, @function
putNum:
.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, 16
	mov	edi, 10
	call	myrand
	test	eax, eax
	jne	.L54
	mov	DWORD PTR -8[rbp], 2
	jmp	.L56
.L54:
	mov	DWORD PTR -8[rbp], 1
.L56:
	mov	edi, 16
	call	myrand
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 3[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 2
	movsx	rdx, eax
	movsx	rax, ecx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L56
	mov	eax, DWORD PTR -4[rbp]
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 3[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 2
	movsx	rdx, eax
	movsx	rax, ecx
	sal	rax, 2
	add	rax, rdx
	lea	rcx, 0[0+rax*4]
	lea	rdx, board[rip]
	mov	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	putNum, .-putNum
	.section	.rodata
.LC13:
	.string	"\033[?25l"
	.text
	.globl	init_term
	.type	init_term, @function
init_term:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, termios[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	mov	rax, QWORD PTR termios[rip]
	mov	rdx, QWORD PTR termios[rip+8]
	mov	QWORD PTR original_termios[rip], rax
	mov	QWORD PTR original_termios[rip+8], rdx
	mov	rax, QWORD PTR termios[rip+16]
	mov	rdx, QWORD PTR termios[rip+24]
	mov	QWORD PTR original_termios[rip+16], rax
	mov	QWORD PTR original_termios[rip+24], rdx
	mov	rax, QWORD PTR termios[rip+32]
	mov	rdx, QWORD PTR termios[rip+40]
	mov	QWORD PTR original_termios[rip+32], rax
	mov	QWORD PTR original_termios[rip+40], rdx
	mov	rax, QWORD PTR termios[rip+48]
	mov	QWORD PTR original_termios[rip+48], rax
	mov	eax, DWORD PTR termios[rip+56]
	mov	DWORD PTR original_termios[rip+56], eax
	lea	rdi, termios[rip]
	call	cfmakeraw@PLT
	lea	rdx, termios[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	init_term, .-init_term
	.section	.rodata
.LC14:
	.string	"\033[?25h"
	.text
	.globl	restore_term
	.type	restore_term, @function
restore_term:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdx, original_termios[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	restore_term, .-restore_term
	.section	.rodata
.LC15:
	.string	"\033[2J"
	.text
	.globl	init
	.type	init, @function
init:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, 0
	call	init_term
	mov	DWORD PTR -12[rbp], 0
	jmp	.L60
.L63:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L61
.L62:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -8[rbp], 1
.L61:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L62
	add	DWORD PTR -12[rbp], 1
.L60:
	cmp	DWORD PTR -12[rbp], 3
	jle	.L63
	mov	DWORD PTR score[rip], 0
	mov	edi, 16
	call	myrand
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 3[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 2
	movsx	rdx, eax
	movsx	rax, ecx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 1
	mov	eax, 0
	call	putNum
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	init, .-init
	.globl	end
	.type	end, @function
end:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	restore_term
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE18:
	.size	end, .-end
	.globl	c2dir
	.type	c2dir, @function
c2dir:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 65
	cmp	eax, 54
	ja	.L66
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L68[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L68[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L68:
	.long	.L67-.L68
	.long	.L69-.L68
	.long	.L70-.L68
	.long	.L71-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L71-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L70-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L71-.L68
	.long	.L66-.L68
	.long	.L69-.L68
	.long	.L67-.L68
	.long	.L70-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L69-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L66-.L68
	.long	.L67-.L68
	.text
.L67:
	mov	eax, 0
	jmp	.L72
.L69:
	mov	eax, 1
	jmp	.L72
.L70:
	mov	eax, 2
	jmp	.L72
.L71:
	mov	eax, 3
	jmp	.L72
.L66:
	mov	eax, -1
.L72:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	c2dir, .-c2dir
	.globl	push
	.type	push, @function
push:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 40
	mov	DWORD PTR -36[rbp], edi
.L79:
	mov	BYTE PTR -17[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L74
.L78:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L75
.L77:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dy[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dx[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isValid
	test	al, al
	je	.L76
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L76
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L76
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, board[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 0
	mov	BYTE PTR -17[rbp], 1
.L76:
	add	DWORD PTR -12[rbp], 1
.L75:
	cmp	DWORD PTR -12[rbp], 3
	jle	.L77
	add	DWORD PTR -16[rbp], 1
.L74:
	cmp	DWORD PTR -16[rbp], 3
	jle	.L78
	cmp	BYTE PTR -17[rbp], 0
	jne	.L79
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	push, .-push
	.globl	merge
	.type	merge, @function
merge:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 3
	je	.L81
	cmp	DWORD PTR -20[rbp], 3
	jg	.L106
	cmp	DWORD PTR -20[rbp], 2
	je	.L83
	cmp	DWORD PTR -20[rbp], 2
	jg	.L106
	cmp	DWORD PTR -20[rbp], 0
	je	.L84
	cmp	DWORD PTR -20[rbp], 1
	je	.L85
	jmp	.L106
.L84:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L86
.L90:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L87
.L89:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	movsx	rax, ecx
	sal	rax, 2
	add	rax, rsi
	lea	rcx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jne	.L88
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L88
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, DWORD PTR score[rip]
	add	eax, edx
	mov	DWORD PTR score[rip], eax
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -8[rbp], 2
	jmp	.L87
.L88:
	add	DWORD PTR -8[rbp], 1
.L87:
	cmp	DWORD PTR -8[rbp], 2
	jle	.L89
	add	DWORD PTR -4[rbp], 1
.L86:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L90
	jmp	.L82
.L85:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L91
.L95:
	mov	DWORD PTR -8[rbp], 3
	jmp	.L92
.L94:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	movsx	rax, ecx
	sal	rax, 2
	add	rax, rsi
	lea	rcx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jne	.L93
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L93
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, DWORD PTR score[rip]
	add	eax, edx
	mov	DWORD PTR score[rip], eax
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	movsx	rax, edx
	sal	rax, 2
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 0
	sub	DWORD PTR -8[rbp], 2
	jmp	.L92
.L93:
	sub	DWORD PTR -8[rbp], 1
.L92:
	cmp	DWORD PTR -8[rbp], 0
	jg	.L94
	add	DWORD PTR -4[rbp], 1
.L91:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L95
	jmp	.L82
.L83:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L96
.L100:
	mov	DWORD PTR -4[rbp], 3
	jmp	.L97
.L99:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jne	.L98
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L98
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, DWORD PTR score[rip]
	add	eax, edx
	mov	DWORD PTR score[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 1
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 0
	sub	DWORD PTR -4[rbp], 2
	jmp	.L97
.L98:
	sub	DWORD PTR -4[rbp], 1
.L97:
	cmp	DWORD PTR -4[rbp], 0
	jg	.L99
	add	DWORD PTR -8[rbp], 1
.L96:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L100
	jmp	.L82
.L81:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L101
.L105:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L102
.L104:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jne	.L103
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L103
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, DWORD PTR score[rip]
	add	eax, edx
	mov	DWORD PTR score[rip], eax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -4[rbp], 2
	jmp	.L102
.L103:
	add	DWORD PTR -4[rbp], 1
.L102:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L104
	add	DWORD PTR -8[rbp], 1
.L101:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L105
	nop
.L82:
.L106:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	merge, .-merge
	.globl	Move
	.type	Move, @function
Move:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 8
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	push
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	merge
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	push
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	Move, .-Move
	.section	.rodata
.LC16:
	.string	"score: %d\n"
.LC17:
	.string	"(enter 'q' to exit...)"
.LC18:
	.string	"gameover..."
.LC19:
	.string	"your score is: %d\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	init_term
	mov	eax, 0
	call	init
.L111:
	mov	eax, 0
	call	showBoard
	mov	eax, DWORD PTR score[rip]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC17[rip]
	call	puts@PLT
.L110:
	lea	rax, -13[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 113
	jne	.L109
	mov	eax, 0
	call	end
.L109:
	movzx	eax, BYTE PTR -13[rbp]
	movsx	eax, al
	mov	edi, eax
	call	c2dir
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L110
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	movable
	xor	eax, 1
	test	al, al
	jne	.L110
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	Move
	mov	eax, 0
	call	putNum
	mov	eax, 0
	call	gameover
	xor	eax, 1
	test	al, al
	jne	.L111
	mov	eax, 0
	call	showBoard
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	eax, DWORD PTR score[rip]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	end
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L113
	call	__stack_chk_fail@PLT
.L113:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.local	lcg.0
	.comm	lcg.0,4,4
	.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	"173578795.c"
	.text
	.comm	termios,60,4
	.comm	original_termios,60,4
	.global	dx
	.data
	.align	2
	.type	dx, %object
	.size	dx, 16
dx:
	.word	0
	.word	0
	.word	1
	.word	-1
	.global	dy
	.align	2
	.type	dy, %object
	.size	dy, 16
dy:
	.word	-1
	.word	1
	.word	0
	.word	0
	.comm	board,64,4
	.comm	score,4,4
	.global	__aeabi_idivmod
	.text
	.align	2
	.global	myrand
	.syntax unified
	.arm
	.fpu softvfp
	.type	myrand, %function
myrand:
	@ 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, .L5
	ldr	r3, [r3]
	ldr	r2, .L5+4
	mul	r2, r3, r2
	ldr	r3, .L5+8
	add	r3, r2, r3
	ldr	r2, .L5
	str	r3, [r2]
	ldr	r3, .L5
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L2
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	b	.L4
.L2:
	ldr	r3, [fp, #-8]
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	lcg.5777
	.word	1664525
	.word	1013904223
	.size	myrand, .-myrand
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%4d\000"
	.text
	.align	2
	.global	print_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_int, %function
print_int:
	@ 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	r1, [fp, #-8]
	ldr	r0, .L8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.size	print_int, .-print_int
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\033[0m\000"
	.align	2
.LC2:
	.ascii	"\033[1;43m\000"
	.align	2
.LC3:
	.ascii	"\033[1;42m\000"
	.align	2
.LC4:
	.ascii	"\033[1;46m\000"
	.align	2
.LC5:
	.ascii	"\033[1;44m\000"
	.align	2
.LC6:
	.ascii	"\033[1;45m\000"
	.align	2
.LC7:
	.ascii	"\033[1;41m\000"
	.text
	.align	2
	.global	changeColor
	.syntax unified
	.arm
	.fpu softvfp
	.type	changeColor, %function
changeColor:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L11
	ldr	r0, .L21
	bl	printf
	b	.L20
.L11:
	ldr	r3, [fp, #-8]
	sub	r1, r3, #1
	ldr	r3, .L21+4
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	cmp	r2, #5
	ldrls	pc, [pc, r2, asl #2]
	b	.L20
.L14:
	.word	.L19
	.word	.L18
	.word	.L17
	.word	.L16
	.word	.L15
	.word	.L13
.L19:
	ldr	r0, .L21+8
	bl	printf
	b	.L12
.L18:
	ldr	r0, .L21+12
	bl	printf
	b	.L12
.L17:
	ldr	r0, .L21+16
	bl	printf
	b	.L12
.L16:
	ldr	r0, .L21+20
	bl	printf
	b	.L12
.L15:
	ldr	r0, .L21+24
	bl	printf
	b	.L12
.L13:
	ldr	r0, .L21+28
	bl	printf
	nop
.L12:
.L20:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC1
	.word	715827883
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	changeColor, .-changeColor
	.align	2
	.global	resetColor
	.syntax unified
	.arm
	.fpu softvfp
	.type	resetColor, %function
resetColor:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #0
	bl	changeColor
	nop
	pop	{fp, pc}
	.size	resetColor, .-resetColor
	.section	.rodata
	.align	2
.LC8:
	.ascii	"\033[H\000"
	.align	2
.LC9:
	.ascii	"+------+------+------+------+\000"
	.align	2
.LC10:
	.ascii	"      \000"
	.align	2
.LC11:
	.ascii	"|\000"
	.align	2
.LC12:
	.ascii	" %4d \000"
	.text
	.align	2
	.global	showBoard
	.syntax unified
	.arm
	.fpu softvfp
	.type	showBoard, %function
showBoard:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r0, .L35
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L25
.L34:
	ldr	r0, .L35+4
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L26
.L27:
	mov	r0, #124
	bl	putchar
	ldr	r1, .L35+8
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	mov	r0, r3
	bl	changeColor
	ldr	r0, .L35+12
	bl	printf
	bl	resetColor
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L26:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L27
	ldr	r0, .L35+16
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L28
.L31:
	mov	r0, #124
	bl	putchar
	ldr	r1, .L35+8
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	changeColor
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L29
	mov	r2, #1
	ldr	r3, [fp, #-8]
	lsl	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L35+20
	bl	printf
	b	.L30
.L29:
	ldr	r0, .L35+12
	bl	printf
.L30:
	bl	resetColor
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L28:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L31
	ldr	r0, .L35+16
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L32
.L33:
	mov	r0, #124
	bl	putchar
	ldr	r1, .L35+8
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	mov	r0, r3
	bl	changeColor
	ldr	r0, .L35+12
	bl	printf
	bl	resetColor
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L32:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L33
	ldr	r0, .L35+16
	bl	puts
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L25:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L34
	ldr	r0, .L35+4
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC8
	.word	.LC9
	.word	board
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	showBoard, .-showBoard
	.align	2
	.global	isValid
	.syntax unified
	.arm
	.fpu softvfp
	.type	isValid, %function
isValid:
	@ 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	.L38
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L39
.L38:
	mov	r3, #0
	b	.L40
.L39:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L41
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L42
.L41:
	mov	r3, #0
	b	.L40
.L42:
	mov	r3, #1
.L40:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isValid, .-isValid
	.align	2
	.global	movable
	.syntax unified
	.arm
	.fpu softvfp
	.type	movable, %function
movable:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L44
.L50:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L45
.L49:
	ldr	r2, .L51
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r2, .L51+4
	ldr	r3, [fp, #-24]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	isValid
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
	ldr	r1, .L51+8
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L46
	ldr	r1, .L51+8
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L47
	ldr	r1, .L51+8
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r0, .L51+8
	ldr	r3, [fp, #-20]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r1, r3
	ldr	r3, [r0, r3, lsl #2]
	cmp	r2, r3
	bne	.L46
.L47:
	mov	r3, #1
	b	.L48
.L46:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L45:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L49
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L44:
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	ble	.L50
	mov	r3, #0
.L48:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L52:
	.align	2
.L51:
	.word	dy
	.word	dx
	.word	board
	.size	movable, .-movable
	.align	2
	.global	gameover
	.syntax unified
	.arm
	.fpu softvfp
	.type	gameover, %function
gameover:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L54
.L59:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L55
.L58:
	ldr	r1, .L63
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #11
	bne	.L56
	mov	r3, #1
	b	.L57
.L56:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L55:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L58
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L54:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L59
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L60
.L62:
	ldr	r0, [fp, #-12]
	bl	movable
	mov	r3, r0
	cmp	r3, #0
	beq	.L61
	mov	r3, #0
	b	.L57
.L61:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L60:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L62
	mov	r3, #1
.L57:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	board
	.size	gameover, .-gameover
	.align	2
	.global	putNum
	.syntax unified
	.arm
	.fpu softvfp
	.type	putNum, %function
putNum:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #10
	bl	myrand
	mov	r3, r0
	cmp	r3, #0
	bne	.L66
	mov	r3, #2
	str	r3, [fp, #-12]
	b	.L68
.L66:
	mov	r3, #1
	str	r3, [fp, #-12]
.L68:
	mov	r0, #16
	bl	myrand
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	rsbs	r1, r3, #0
	and	r2, r3, #3
	and	r3, r1, #3
	rsbpl	r2, r3, #0
	ldr	r3, [fp, #-8]
	add	r1, r3, #3
	cmp	r3, #0
	movlt	r3, r1
	movge	r3, r3
	asr	r3, r3, #2
	mov	r0, r3
	ldr	r1, .L69
	lsl	r3, r2, #2
	add	r3, r3, r0
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	bne	.L68
	ldr	r3, [fp, #-8]
	rsbs	r1, r3, #0
	and	r2, r3, #3
	and	r3, r1, #3
	rsbpl	r2, r3, #0
	ldr	r3, [fp, #-8]
	add	r1, r3, #3
	cmp	r3, #0
	movlt	r3, r1
	movge	r3, r3
	asr	r3, r3, #2
	mov	r0, r3
	ldr	r1, .L69
	lsl	r3, r2, #2
	add	r3, r3, r0
	ldr	r2, [fp, #-12]
	str	r2, [r1, r3, lsl #2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L70:
	.align	2
.L69:
	.word	board
	.size	putNum, .-putNum
	.section	.rodata
	.align	2
.LC13:
	.ascii	"\033[?25l\000"
	.text
	.align	2
	.global	init_term
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_term, %function
init_term:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L72
	mov	r0, #0
	bl	tcgetattr
	ldr	r2, .L72+4
	ldr	r3, .L72
	mov	ip, r2
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r0, .L72
	bl	cfmakeraw
	ldr	r2, .L72
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r0, .L72+8
	bl	printf
	ldr	r3, .L72+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	pop	{fp, pc}
.L73:
	.align	2
.L72:
	.word	termios
	.word	original_termios
	.word	.LC13
	.word	stdout
	.size	init_term, .-init_term
	.section	.rodata
	.align	2
.LC14:
	.ascii	"\033[?25h\000"
	.text
	.align	2
	.global	restore_term
	.syntax unified
	.arm
	.fpu softvfp
	.type	restore_term, %function
restore_term:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r2, .L75
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r0, .L75+4
	bl	printf
	ldr	r3, .L75+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	original_termios
	.word	.LC14
	.word	stdout
	.size	restore_term, .-restore_term
	.section	.rodata
	.align	2
.LC15:
	.ascii	"\033[2J\000"
	.text
	.align	2
	.global	init
	.syntax unified
	.arm
	.fpu softvfp
	.type	init, %function
init:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	bl	init_term
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L78
.L81:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L79
.L80:
	ldr	r1, .L82
	ldr	r3, [fp, #-16]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L79:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L80
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L78:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L81
	ldr	r3, .L82+4
	mov	r2, #0
	str	r2, [r3]
	mov	r0, #16
	bl	myrand
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	rsbs	r1, r3, #0
	and	r2, r3, #3
	and	r3, r1, #3
	rsbpl	r2, r3, #0
	ldr	r3, [fp, #-8]
	add	r1, r3, #3
	cmp	r3, #0
	movlt	r3, r1
	movge	r3, r3
	asr	r3, r3, #2
	mov	r0, r3
	ldr	r1, .L82
	lsl	r3, r2, #2
	add	r3, r3, r0
	mov	r2, #1
	str	r2, [r1, r3, lsl #2]
	bl	putNum
	ldr	r0, .L82+8
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L83:
	.align	2
.L82:
	.word	board
	.word	score
	.word	.LC15
	.size	init, .-init
	.align	2
	.global	end
	.syntax unified
	.arm
	.fpu softvfp
	.type	end, %function
end:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	restore_term
	mov	r0, #0
	bl	exit
	.size	end, .-end
	.align	2
	.global	c2dir
	.syntax unified
	.arm
	.fpu softvfp
	.type	c2dir, %function
c2dir:
	@ 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
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #65
	cmp	r3, #54
	ldrls	pc, [pc, r3, asl #2]
	b	.L86
.L88:
	.word	.L87
	.word	.L89
	.word	.L90
	.word	.L91
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L91
	.word	.L86
	.word	.L86
	.word	.L90
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L91
	.word	.L86
	.word	.L89
	.word	.L87
	.word	.L90
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L89
	.word	.L86
	.word	.L86
	.word	.L86
	.word	.L87
.L87:
	mov	r3, #0
	b	.L92
.L89:
	mov	r3, #1
	b	.L92
.L90:
	mov	r3, #2
	b	.L92
.L91:
	mov	r3, #3
	b	.L92
.L86:
	mvn	r3, #0
.L92:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	c2dir, .-c2dir
	.align	2
	.global	push
	.syntax unified
	.arm
	.fpu softvfp
	.type	push, %function
push:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
.L99:
	mov	r3, #0
	strb	r3, [fp, #-21]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L94
.L98:
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L95
.L97:
	ldr	r2, .L100
	ldr	r3, [fp, #-32]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r2, .L100+4
	ldr	r3, [fp, #-32]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	isValid
	mov	r3, r0
	cmp	r3, #0
	beq	.L96
	ldr	r1, .L100+8
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	bne	.L96
	ldr	r1, .L100+8
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L96
	ldr	r1, .L100+8
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r0, .L100+8
	ldr	r3, [fp, #-12]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	str	r2, [r0, r3, lsl #2]
	ldr	r1, .L100+8
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	mov	r3, #1
	strb	r3, [fp, #-21]
.L96:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L95:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L97
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L94:
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	ble	.L98
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L99
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L101:
	.align	2
.L100:
	.word	dy
	.word	dx
	.word	board
	.size	push, .-push
	.align	2
	.global	merge
	.syntax unified
	.arm
	.fpu softvfp
	.type	merge, %function
merge:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L129
.L105:
	.word	.L108
	.word	.L107
	.word	.L106
	.word	.L104
.L108:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L109
.L113:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L110
.L112:
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r0, .L130
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldr	r3, [r0, r3, lsl #2]
	cmp	r2, r3
	bne	.L111
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L111
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r3, #1
	ldr	r0, .L130
	ldr	r3, [fp, #-12]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	str	r2, [r0, r3, lsl #2]
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	mov	r2, #1
	lsl	r2, r2, r3
	ldr	r3, .L130+4
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L130+4
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r1, .L130
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #2
	str	r3, [fp, #-12]
	b	.L110
.L111:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L110:
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	ble	.L112
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L109:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L113
	b	.L103
.L107:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L114
.L118:
	mov	r3, #3
	str	r3, [fp, #-12]
	b	.L115
.L117:
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	ldr	r0, .L130
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldr	r3, [r0, r3, lsl #2]
	cmp	r2, r3
	bne	.L116
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L116
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r3, #1
	ldr	r0, .L130
	ldr	r3, [fp, #-12]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	str	r2, [r0, r3, lsl #2]
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	mov	r2, #1
	lsl	r2, r2, r3
	ldr	r3, .L130+4
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L130+4
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	ldr	r1, .L130
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #2
	str	r3, [fp, #-12]
	b	.L115
.L116:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L115:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L117
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L114:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L118
	b	.L103
.L106:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L119
.L123:
	mov	r3, #3
	str	r3, [fp, #-8]
	b	.L120
.L122:
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r0, .L130
	ldr	r1, [fp, #-12]
	lsl	r1, r1, #2
	add	r3, r1, r3
	ldr	r3, [r0, r3, lsl #2]
	cmp	r2, r3
	bne	.L121
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L121
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r3, #1
	ldr	r0, .L130
	ldr	r3, [fp, #-12]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	str	r2, [r0, r3, lsl #2]
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	mov	r2, #1
	lsl	r2, r2, r3
	ldr	r3, .L130+4
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L130+4
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r1, .L130
	ldr	r2, [fp, #-12]
	lsl	r2, r2, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #2
	str	r3, [fp, #-8]
	b	.L120
.L121:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L120:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L122
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L119:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L123
	b	.L103
.L104:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L124
.L128:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L125
.L127:
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r0, .L130
	ldr	r1, [fp, #-12]
	lsl	r1, r1, #2
	add	r3, r1, r3
	ldr	r3, [r0, r3, lsl #2]
	cmp	r2, r3
	bne	.L126
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	cmp	r3, #0
	beq	.L126
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r3, #1
	ldr	r0, .L130
	ldr	r3, [fp, #-12]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	str	r2, [r0, r3, lsl #2]
	ldr	r1, .L130
	ldr	r3, [fp, #-12]
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r3, [r1, r3, lsl #2]
	mov	r2, #1
	lsl	r2, r2, r3
	ldr	r3, .L130+4
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L130+4
	str	r3, [r2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	ldr	r1, .L130
	ldr	r2, [fp, #-12]
	lsl	r2, r2, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	str	r3, [fp, #-8]
	b	.L125
.L126:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L125:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L127
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L124:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L128
	nop
.L103:
.L129:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L131:
	.align	2
.L130:
	.word	board
	.word	score
	.size	merge, .-merge
	.align	2
	.global	Move
	.syntax unified
	.arm
	.fpu softvfp
	.type	Move, %function
Move:
	@ 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	push
	ldr	r0, [fp, #-8]
	bl	merge
	ldr	r0, [fp, #-8]
	bl	push
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Move, .-Move
	.section	.rodata
	.align	2
.LC16:
	.ascii	"score: %d\012\000"
	.align	2
.LC17:
	.ascii	"(enter 'q' to exit...)\000"
	.align	2
.LC18:
	.ascii	"gameover...\000"
	.align	2
.LC19:
	.ascii	"your score is: %d\012\012\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L139
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	init_term
	bl	init
.L136:
	bl	showBoard
	ldr	r3, .L139+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L139+8
	bl	printf
	ldr	r0, .L139+12
	bl	puts
.L135:
	sub	r3, fp, #13
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L134
	bl	end
.L134:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r0, r3
	bl	c2dir
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L135
	ldr	r0, [fp, #-12]
	bl	movable
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L135
	ldr	r0, [fp, #-12]
	bl	Move
	bl	putNum
	bl	gameover
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L136
	bl	showBoard
	ldr	r0, .L139+16
	bl	puts
	ldr	r3, .L139+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L139+20
	bl	printf
	bl	end
	mov	r3, #0
	ldr	r2, .L139
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L138
	bl	__stack_chk_fail
.L138:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L140:
	.align	2
.L139:
	.word	.LC20
	.word	score
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	main, .-main
	.local	lcg.5777
	.comm	lcg.5777,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
