	.file	"365251.c"
	.intel_syntax noprefix
	.text
	.globl	score
	.bss
	.align 4
	.type	score, @object
	.size	score, 4
score:
	.zero	4
	.text
	.globl	AddRandom
	.type	AddRandom, @function
AddRandom:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -156[rbp], 0
	mov	DWORD PTR -164[rbp], 0
	jmp	.L2
.L6:
	mov	DWORD PTR -160[rbp], 0
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -184[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L4
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	mov	edx, DWORD PTR -164[rbp]
	mov	DWORD PTR -144[rbp+rax*8], edx
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	mov	edx, DWORD PTR -160[rbp]
	mov	DWORD PTR -140[rbp+rax*8], edx
	add	DWORD PTR -156[rbp], 1
.L4:
	add	DWORD PTR -160[rbp], 1
.L3:
	cmp	DWORD PTR -160[rbp], 3
	jle	.L5
	add	DWORD PTR -164[rbp], 1
.L2:
	cmp	DWORD PTR -164[rbp], 3
	jle	.L6
	mov	edi, 0
	call	time@PLT
	mov	rdi, rax
	mov	eax, 0
	call	srand@PLT
	cmp	DWORD PTR -156[rbp], 0
	jle	.L9
	mov	eax, 0
	call	rand@PLT
	cdq
	idiv	DWORD PTR -156[rbp]
	mov	DWORD PTR -152[rbp], edx
	mov	eax, 0
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	movsx	rax, edx
	imul	rax, rax, 954437177
	shr	rax, 32
	sar	eax
	sar	edx, 31
	sub	eax, edx
	add	eax, 1
	add	eax, eax
	mov	DWORD PTR -148[rbp], eax
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*8]
	mov	DWORD PTR -164[rbp], eax
	mov	eax, DWORD PTR -152[rbp]
	cdqe
	mov	eax, DWORD PTR -140[rbp+rax*8]
	mov	DWORD PTR -160[rbp], eax
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -184[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -160[rbp]
	cdqe
	mov	edx, DWORD PTR -148[rbp]
	mov	DWORD PTR [rcx+rax*4], edx
.L9:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	AddRandom, .-AddRandom
	.section	.rodata
.LC0:
	.string	"clear"
.LC1:
	.string	"\n\n\n\n"
.LC2:
	.string	"\t\t\t\t\t\t\t     \"2048\"\n\n\n\n\n"
.LC3:
	.string	"\t\t\t\t\t\t"
.LC4:
	.string	"%5c  |"
.LC5:
	.string	"%5d  |"
.LC6:
	.string	"%5c  "
.LC7:
	.string	"%5d  "
	.align 8
.LC8:
	.string	"\t\t\t\t\t\t-------|-------|-------|--------"
.LC9:
	.string	"\t\tScore: %d\n\n"
	.align 8
.LC10:
	.string	"\t\t\t>>> Use Arrow Keys or A, S, D, W to Play AND 'Q' to Quit!"
	.text
	.globl	DrawBoard
	.type	DrawBoard, @function
DrawBoard:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	BYTE PTR -9[rbp], 46
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	system@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L11
.L19:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L12
.L17:
	cmp	DWORD PTR -4[rbp], 3
	je	.L13
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L14
	movsx	eax, BYTE PTR -9[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L13:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L16
	movsx	eax, BYTE PTR -9[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	add	DWORD PTR -4[rbp], 1
.L12:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L17
	mov	edi, 10
	call	putchar@PLT
	cmp	DWORD PTR -8[rbp], 3
	je	.L18
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L18:
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L11:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L19
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR score[rip]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	DrawBoard, .-DrawBoard
	.globl	InitBoard
	.type	InitBoard, @function
InitBoard:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L21
.L24:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	DWORD PTR [rdx+rax*4], 0
	add	DWORD PTR -4[rbp], 1
.L22:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L23
	add	DWORD PTR -8[rbp], 1
.L21:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L24
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	AddRandom
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	AddRandom
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	InitBoard, .-InitBoard
	.globl	FindPair
	.type	FindPair, @function
FindPair:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L26
.L31:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L27
.L30:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	edx, DWORD PTR [rdx+rax*4]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	cdqe
	mov	eax, DWORD PTR [rcx+rax*4]
	cmp	edx, eax
	jne	.L28
	mov	eax, 1
	jmp	.L29
.L28:
	add	DWORD PTR -4[rbp], 1
.L27:
	cmp	DWORD PTR -4[rbp], 2
	jle	.L30
	add	DWORD PTR -8[rbp], 1
.L26:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L31
	mov	eax, 0
.L29:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	FindPair, .-FindPair
	.globl	SlideLeft
	.type	SlideLeft, @function
SlideLeft:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	mov	BYTE PTR -45[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	jmp	.L33
.L41:
	mov	eax, DWORD PTR -44[rbp]
	mov	DWORD PTR -36[rbp], eax
	mov	DWORD PTR -40[rbp], 0
	jmp	.L34
.L40:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L35
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, -4[rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L36
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	test	eax, eax
	jne	.L36
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	test	eax, eax
	jne	.L36
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	lea	rcx, -4[rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rcx
	add	edx, edx
	mov	DWORD PTR [rax], edx
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR score[rip]
	add	eax, edx
	mov	DWORD PTR score[rip], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	cmp	DWORD PTR -36[rbp], 1
	jne	.L37
	mov	DWORD PTR -32[rbp], 1
	jmp	.L38
.L37:
	cmp	DWORD PTR -36[rbp], 2
	jne	.L39
	mov	DWORD PTR -28[rbp], 1
	jmp	.L38
.L39:
	cmp	DWORD PTR -36[rbp], 3
	jne	.L38
	mov	DWORD PTR -24[rbp], 1
.L38:
	mov	BYTE PTR -45[rbp], 1
	jmp	.L35
.L36:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L35
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L35
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -36[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	lea	rcx, -4[rdx]
	mov	rdx, QWORD PTR -56[rbp]
	add	rdx, rcx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	mov	BYTE PTR -45[rbp], 1
.L35:
	sub	DWORD PTR -36[rbp], 1
	add	DWORD PTR -40[rbp], 1
.L34:
	mov	eax, DWORD PTR -40[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L40
	add	DWORD PTR -44[rbp], 1
.L33:
	cmp	DWORD PTR -44[rbp], 3
	jle	.L41
	movzx	eax, BYTE PTR -45[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	SlideLeft, .-SlideLeft
	.globl	RotateBoard
	.type	RotateBoard, @function
RotateBoard:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 4
	mov	DWORD PTR -16[rbp], 0
	jmp	.L45
.L48:
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L46
.L47:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -16[rbp]
	lea	esi, -1[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rcx, rax
	movsx	rax, esi
	mov	edx, DWORD PTR [rdx+rax*4]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 4
	lea	rdx, -16[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -12[rbp]
	lea	edi, -1[rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -16[rbp]
	lea	esi, -1[rax]
	movsx	rax, edi
	mov	edx, DWORD PTR [rdx+rax*4]
	movsx	rax, esi
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 4
	lea	rdx, -16[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 4
	lea	rcx, -16[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -12[rbp]
	lea	esi, -1[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	edx, DWORD PTR [rdx+rax*4]
	movsx	rax, esi
	mov	DWORD PTR [rcx+rax*4], edx
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -12[rbp]
	cdqe
	sal	rax, 4
	lea	rdx, -16[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	mov	edx, DWORD PTR -4[rbp]
	mov	DWORD PTR [rcx+rax*4], edx
	add	DWORD PTR -12[rbp], 1
.L46:
	mov	eax, DWORD PTR -8[rbp]
	sub	eax, DWORD PTR -16[rbp]
	sub	eax, 1
	cmp	DWORD PTR -12[rbp], eax
	jl	.L47
	add	DWORD PTR -16[rbp], 1
.L45:
	mov	eax, DWORD PTR -8[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -16[rbp], eax
	jl	.L48
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	RotateBoard, .-RotateBoard
	.globl	MoveLeft
	.type	MoveLeft, @function
MoveLeft:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	BYTE PTR -5[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L50
.L51:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	SlideLeft
	or	al, BYTE PTR -5[rbp]
	movzx	eax, al
	test	eax, eax
	setne	al
	mov	BYTE PTR -5[rbp], al
	add	DWORD PTR -4[rbp], 1
.L50:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L51
	movzx	eax, BYTE PTR -5[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	MoveLeft, .-MoveLeft
	.globl	MoveUp
	.type	MoveUp, @function
MoveUp:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	MoveLeft
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	MoveUp, .-MoveUp
	.globl	MoveDown
	.type	MoveDown, @function
MoveDown:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	MoveLeft
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	MoveDown, .-MoveDown
	.globl	MoveRight
	.type	MoveRight, @function
MoveRight:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	MoveLeft
	mov	BYTE PTR -1[rbp], al
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	movzx	eax, BYTE PTR -1[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	MoveRight, .-MoveRight
	.globl	GameEnded
	.type	GameEnded, @function
GameEnded:
.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, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L60
.L65:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L61
.L64:
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	mov	eax, DWORD PTR [rdx+rax*4]
	test	eax, eax
	jne	.L62
	mov	eax, 0
	jmp	.L63
.L62:
	add	DWORD PTR -4[rbp], 1
.L61:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L64
	add	DWORD PTR -8[rbp], 1
.L60:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L65
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	FindPair
	test	al, al
	je	.L66
	mov	eax, 0
	jmp	.L63
.L66:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	FindPair
	test	al, al
	je	.L67
	mov	eax, 0
	jmp	.L63
.L67:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	RotateBoard
	mov	eax, 1
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	GameEnded, .-GameEnded
	.section	.rodata
.LC11:
	.string	"\t\t\t\t\tGame Ended"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -82[rbp], 0
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	InitBoard
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	DrawBoard
.L80:
	call	getchar@PLT
	mov	BYTE PTR -81[rbp], al
	movsx	eax, BYTE PTR -81[rbp]
	sub	eax, 65
	cmp	eax, 54
	ja	.L69
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L71[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L71[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L71:
	.long	.L70-.L71
	.long	.L72-.L71
	.long	.L73-.L71
	.long	.L74-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L74-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L73-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L72-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L69-.L71
	.long	.L70-.L71
	.text
.L74:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	MoveLeft
	mov	BYTE PTR -82[rbp], al
	jmp	.L75
.L73:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	MoveRight
	mov	BYTE PTR -82[rbp], al
	jmp	.L75
.L70:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	MoveUp
	mov	BYTE PTR -82[rbp], al
	jmp	.L75
.L72:
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	MoveDown
	mov	BYTE PTR -82[rbp], al
	jmp	.L75
.L69:
	mov	BYTE PTR -82[rbp], 0
.L75:
	cmp	BYTE PTR -81[rbp], 113
	je	.L83
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	GameEnded
	test	al, al
	je	.L78
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	system@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L77
.L78:
	cmp	BYTE PTR -82[rbp], 0
	je	.L80
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	AddRandom
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	DrawBoard
	jmp	.L80
.L83:
	nop
.L77:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L82
	call	__stack_chk_fail@PLT
.L82:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"365251.c"
	.text
	.global	score
	.bss
	.align	2
	.type	score, %object
	.size	score, 4
score:
	.space	4
	.global	__aeabi_idivmod
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	AddRandom
	.syntax unified
	.arm
	.fpu softvfp
	.type	AddRandom, %function
AddRandom:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-160]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L2
.L6:
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L3
.L5:
	ldr	r3, [fp, #-156]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-160]
	add	r3, r2, r3
	ldr	r2, [fp, #-152]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-156]
	str	r2, [r3, #-132]
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-152]
	str	r2, [r3, #-128]
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L4:
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L3:
	ldr	r3, [fp, #-152]
	cmp	r3, #3
	ble	.L5
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L2:
	ldr	r3, [fp, #-156]
	cmp	r3, #3
	ble	.L6
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	ble	.L9
	bl	rand
	mov	r3, r0
	ldr	r1, [fp, #-148]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-144]
	bl	rand
	mov	r1, r0
	ldr	r3, .L10+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	ldr	r3, .L10+8
	smull	r1, r3, r2, r3
	asr	r1, r3, #1
	asr	r3, r2, #31
	sub	r3, r1, r3
	add	r3, r3, #1
	lsl	r3, r3, #1
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	str	r3, [fp, #-156]
	ldr	r3, [fp, #-144]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-128]
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-156]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-160]
	add	r3, r2, r3
	ldr	r2, [fp, #-152]
	ldr	r1, [fp, #-140]
	str	r1, [r3, r2, lsl #2]
.L9:
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	1717986919
	.word	954437177
	.size	AddRandom, .-AddRandom
	.section	.rodata
	.align	2
.LC1:
	.ascii	"clear\000"
	.align	2
.LC2:
	.ascii	"\012\012\012\012\000"
	.align	2
.LC3:
	.ascii	"\011\011\011\011\011\011\011     \"2048\"\012\012\012"
	.ascii	"\012\012\000"
	.align	2
.LC4:
	.ascii	"\011\011\011\011\011\011\000"
	.align	2
.LC5:
	.ascii	"%5c  |\000"
	.align	2
.LC6:
	.ascii	"%5d  |\000"
	.align	2
.LC7:
	.ascii	"%5c  \000"
	.align	2
.LC8:
	.ascii	"%5d  \000"
	.align	2
.LC9:
	.ascii	"\011\011\011\011\011\011-------|-------|-------|---"
	.ascii	"-----\000"
	.align	2
.LC10:
	.ascii	"\011\011Score: %d\012\012\000"
	.align	2
.LC11:
	.ascii	"\011\011\011>>> Use Arrow Keys or A, S, D, W to Pla"
	.ascii	"y AND 'Q' to Quit!\000"
	.text
	.align	2
	.global	DrawBoard
	.syntax unified
	.arm
	.fpu softvfp
	.type	DrawBoard, %function
DrawBoard:
	@ 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, #46
	strb	r3, [fp, #-13]
	ldr	r0, .L22
	bl	system
	ldr	r0, .L22+4
	bl	puts
	ldr	r0, .L22+8
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L13
.L21:
	ldr	r0, .L22+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L14
.L19:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	beq	.L15
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L16
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L22+16
	bl	printf
	b	.L17
.L16:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L22+20
	bl	printf
	b	.L17
.L15:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L18
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L22+24
	bl	printf
	b	.L17
.L18:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	mov	r1, r3
	ldr	r0, .L22+28
	bl	printf
.L17:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L14:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L19
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	beq	.L20
	ldr	r0, .L22+32
	bl	printf
.L20:
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L13:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L21
	mov	r0, #10
	bl	putchar
	ldr	r3, .L22+36
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L22+40
	bl	printf
	ldr	r0, .L22+44
	bl	printf
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	score
	.word	.LC10
	.word	.LC11
	.size	DrawBoard, .-DrawBoard
	.align	2
	.global	InitBoard
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitBoard, %function
InitBoard:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L25
.L28:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L26
.L27:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L26:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L27
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L25:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L28
	ldr	r0, [fp, #-16]
	bl	AddRandom
	ldr	r0, [fp, #-16]
	bl	AddRandom
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	InitBoard, .-InitBoard
	.align	2
	.global	FindPair
	.syntax unified
	.arm
	.fpu softvfp
	.type	FindPair, %function
FindPair:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L30
.L35:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L31
.L34:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldr	r1, [fp, #-8]
	add	r1, r1, #1
	ldr	r3, [r3, r1, lsl #2]
	cmp	r2, r3
	bne	.L32
	mov	r3, #1
	b	.L33
.L32:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L31:
	ldr	r3, [fp, #-8]
	cmp	r3, #2
	ble	.L34
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L30:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L35
	mov	r3, #0
.L33:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	FindPair, .-FindPair
	.section	.rodata
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	SlideLeft
	.syntax unified
	.arm
	.fpu softvfp
	.type	SlideLeft, %function
SlideLeft:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	ldr	r3, .L48
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	mov	r3, #0
	strb	r3, [fp, #-37]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L37
.L45:
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L38
.L44:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r1, [fp, #-48]
	add	r3, r1, r3
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L40
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L40
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L40
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r1, [fp, #-48]
	add	r3, r1, r3
	lsl	r2, r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, .L48+4
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L48+4
	str	r3, [r2]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bne	.L41
	mov	r3, #1
	str	r3, [fp, #-24]
	b	.L42
.L41:
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	bne	.L43
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L42
.L43:
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	bne	.L42
	mov	r3, #1
	str	r3, [fp, #-16]
.L42:
	mov	r3, #1
	strb	r3, [fp, #-37]
	b	.L39
.L40:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L39
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L39
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r1, [fp, #-48]
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	strb	r3, [fp, #-37]
.L39:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L38:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	blt	.L44
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L37:
	ldr	r3, [fp, #-36]
	cmp	r3, #3
	ble	.L45
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	ldr	r2, .L48
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L47
	bl	__stack_chk_fail
.L47:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC12
	.word	score
	.size	SlideLeft, .-SlideLeft
	.align	2
	.global	RotateBoard
	.syntax unified
	.arm
	.fpu softvfp
	.type	RotateBoard, %function
RotateBoard:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	mov	r3, #4
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L51
.L54:
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L52
.L53:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	ldr	r3, [r3, r2, lsl #2]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r1, [fp, #-12]
	ldr	r3, [fp, #-20]
	sub	r3, r1, r3
	sub	r1, r3, #1
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r0, [fp, #-24]
	add	r3, r0, r3
	ldr	r1, [r2, r1, lsl #2]
	ldr	r2, [fp, #-16]
	str	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	sub	r3, r3, #-268435455
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r1, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	sub	r0, r3, #1
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	ip, [fp, #-12]
	ldr	r2, [fp, #-20]
	sub	r2, ip, r2
	sub	r2, r2, #1
	ldr	r1, [r1, r0, lsl #2]
	str	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	sub	r3, r3, #-268435455
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r1, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	sub	r3, r3, #-268435455
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r0, [fp, #-12]
	ldr	r2, [fp, #-16]
	sub	r2, r0, r2
	sub	r2, r2, #1
	ldr	r0, [fp, #-20]
	ldr	r1, [r1, r0, lsl #2]
	str	r1, [r3, r2, lsl #2]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	sub	r3, r3, #-268435455
	lsl	r3, r3, #4
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-8]
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L52:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L53
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L51:
	ldr	r3, [fp, #-12]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-20]
	cmp	r3, r2
	blt	.L54
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	RotateBoard, .-RotateBoard
	.align	2
	.global	MoveLeft
	.syntax unified
	.arm
	.fpu softvfp
	.type	MoveLeft, %function
MoveLeft:
	@ 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]
	mov	r3, #0
	strb	r3, [fp, #-9]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L56
.L57:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r0, r3
	bl	SlideLeft
	mov	r3, r0
	mov	r2, r3
	ldrb	r3, [fp, #-9]
	orr	r3, r2, r3
	and	r3, r3, #255
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L56:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L57
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	MoveLeft, .-MoveLeft
	.align	2
	.global	MoveUp
	.syntax unified
	.arm
	.fpu softvfp
	.type	MoveUp, %function
MoveUp:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	MoveLeft
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	MoveUp, .-MoveUp
	.align	2
	.global	MoveDown
	.syntax unified
	.arm
	.fpu softvfp
	.type	MoveDown, %function
MoveDown:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	MoveLeft
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	MoveDown, .-MoveDown
	.align	2
	.global	MoveRight
	.syntax unified
	.arm
	.fpu softvfp
	.type	MoveRight, %function
MoveRight:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	MoveLeft
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	MoveRight, .-MoveRight
	.align	2
	.global	GameEnded
	.syntax unified
	.arm
	.fpu softvfp
	.type	GameEnded, %function
GameEnded:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L66
.L71:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L67
.L70:
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	ldr	r3, [r3, r2, lsl #2]
	cmp	r3, #0
	bne	.L68
	mov	r3, #0
	b	.L69
.L68:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L67:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L70
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L66:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L71
	ldr	r0, [fp, #-16]
	bl	FindPair
	mov	r3, r0
	cmp	r3, #0
	beq	.L72
	mov	r3, #0
	b	.L69
.L72:
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	FindPair
	mov	r3, r0
	cmp	r3, #0
	beq	.L73
	mov	r3, #0
	b	.L69
.L73:
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	ldr	r0, [fp, #-16]
	bl	RotateBoard
	mov	r3, #1
.L69:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	GameEnded, .-GameEnded
	.section	.rodata
	.align	2
.LC13:
	.ascii	"\011\011\011\011\011Game Ended\000"
	.align	2
.LC14:
	.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, .L90
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-74]
	sub	r3, fp, #72
	mov	r0, r3
	bl	InitBoard
	sub	r3, fp, #72
	mov	r0, r3
	bl	DrawBoard
.L86:
	bl	getchar
	mov	r3, r0
	strb	r3, [fp, #-73]
	ldrb	r3, [fp, #-73]	@ zero_extendqisi2
	sub	r3, r3, #65
	cmp	r3, #54
	ldrls	pc, [pc, r3, asl #2]
	b	.L75
.L77:
	.word	.L76
	.word	.L78
	.word	.L79
	.word	.L80
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L80
	.word	.L75
	.word	.L75
	.word	.L79
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L78
	.word	.L75
	.word	.L75
	.word	.L75
	.word	.L76
.L80:
	sub	r3, fp, #72
	mov	r0, r3
	bl	MoveLeft
	mov	r3, r0
	strb	r3, [fp, #-74]
	b	.L81
.L79:
	sub	r3, fp, #72
	mov	r0, r3
	bl	MoveRight
	mov	r3, r0
	strb	r3, [fp, #-74]
	b	.L81
.L76:
	sub	r3, fp, #72
	mov	r0, r3
	bl	MoveUp
	mov	r3, r0
	strb	r3, [fp, #-74]
	b	.L81
.L78:
	sub	r3, fp, #72
	mov	r0, r3
	bl	MoveDown
	mov	r3, r0
	strb	r3, [fp, #-74]
	b	.L81
.L75:
	mov	r3, #0
	strb	r3, [fp, #-74]
.L81:
	ldrb	r3, [fp, #-73]	@ zero_extendqisi2
	cmp	r3, #113
	beq	.L89
	sub	r3, fp, #72
	mov	r0, r3
	bl	GameEnded
	mov	r3, r0
	cmp	r3, #0
	beq	.L84
	ldr	r0, .L90+4
	bl	system
	ldr	r0, .L90+8
	bl	puts
	ldr	r0, .L90+12
	bl	puts
	b	.L83
.L84:
	ldrb	r3, [fp, #-74]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L86
	sub	r3, fp, #72
	mov	r0, r3
	bl	AddRandom
	sub	r3, fp, #72
	mov	r0, r3
	bl	DrawBoard
	b	.L86
.L89:
	nop
.L83:
	mov	r3, #0
	ldr	r2, .L90
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L88
	bl	__stack_chk_fail
.L88:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L91:
	.align	2
.L90:
	.word	.LC14
	.word	.LC1
	.word	.LC2
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
