	.file	"51701273.c"
	.intel_syntax noprefix
	.text
	.globl	board
	.bss
	.align 32
	.type	board, @object
	.size	board, 1000
board:
	.zero	1000
	.globl	piecex
	.align 16
	.type	piecex, @object
	.size	piecex, 16
piecex:
	.zero	16
	.globl	piecey
	.align 16
	.type	piecey, @object
	.size	piecey, 16
piecey:
	.zero	16
	.globl	spawnlocx
	.section	.rodata
	.align 32
	.type	spawnlocx, @object
	.size	spawnlocx, 112
spawnlocx:
	.long	4
	.long	3
	.long	6
	.long	5
	.long	4
	.long	3
	.long	3
	.long	5
	.long	4
	.long	5
	.long	3
	.long	5
	.long	4
	.long	5
	.long	4
	.long	5
	.long	4
	.long	4
	.long	5
	.long	3
	.long	4
	.long	4
	.long	3
	.long	5
	.long	4
	.long	3
	.long	4
	.long	5
	.globl	spawnlocy
	.align 32
	.type	spawnlocy, @object
	.size	spawnlocy, 112
spawnlocy:
	.long	19
	.long	19
	.long	19
	.long	19
	.long	19
	.long	20
	.long	19
	.long	19
	.long	19
	.long	20
	.long	19
	.long	19
	.long	20
	.long	19
	.long	19
	.long	20
	.long	19
	.long	20
	.long	20
	.long	19
	.long	19
	.long	20
	.long	19
	.long	19
	.long	19
	.long	20
	.long	20
	.long	19
	.globl	activepiece
	.bss
	.align 4
	.type	activepiece, @object
	.size	activepiece, 4
activepiece:
	.zero	4
	.globl	queue
	.align 32
	.type	queue, @object
	.size	queue, 56
queue:
	.zero	56
	.globl	queueaccesspoint
	.align 4
	.type	queueaccesspoint, @object
	.size	queueaccesspoint, 4
queueaccesspoint:
	.zero	4
	.globl	death
	.align 4
	.type	death, @object
	.size	death, 4
death:
	.zero	4
	.globl	rotnum
	.align 4
	.type	rotnum, @object
	.size	rotnum, 4
rotnum:
	.zero	4
	.globl	lastrot
	.align 4
	.type	lastrot, @object
	.size	lastrot, 4
lastrot:
	.zero	4
	.globl	kickx
	.section	.rodata
	.align 16
	.type	kickx, @object
	.size	kickx, 20
kickx:
	.long	0
	.long	1
	.long	1
	.long	0
	.long	1
	.globl	kicky
	.align 16
	.type	kicky, @object
	.size	kicky, 20
kicky:
	.long	0
	.long	0
	.long	-1
	.long	2
	.long	2
	.globl	kickydir
	.align 16
	.type	kickydir, @object
	.size	kickydir, 16
kickydir:
	.long	1
	.long	-1
	.long	1
	.long	-1
	.globl	ikickx
	.align 16
	.type	ikickx, @object
	.size	ikickx, 20
ikickx:
	.long	0
	.long	-2
	.long	1
	.long	-2
	.long	1
	.globl	ikickx2
	.align 16
	.type	ikickx2, @object
	.size	ikickx2, 20
ikickx2:
	.long	0
	.long	-1
	.long	2
	.long	-1
	.long	2
	.globl	ikicky
	.align 16
	.type	ikicky, @object
	.size	ikicky, 20
ikicky:
	.long	0
	.long	0
	.long	0
	.long	-1
	.long	2
	.globl	ikicky2
	.align 16
	.type	ikicky2, @object
	.size	ikicky2, 20
ikicky2:
	.long	0
	.long	0
	.long	0
	.long	-2
	.long	1
	.globl	holdpiece
	.data
	.align 4
	.type	holdpiece, @object
	.size	holdpiece, 4
holdpiece:
	.long	-1
	.globl	clearlines
	.bss
	.align 16
	.type	clearlines, @object
	.size	clearlines, 16
clearlines:
	.zero	16
	.globl	input
	.type	input, @object
	.size	input, 1
input:
	.zero	1
	.text
	.globl	BuildStack
	.type	BuildStack, @function
BuildStack:
.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 -8[rbp], 0
	jmp	.L2
.L5:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -4[rbp], 1
.L3:
	cmp	DWORD PTR -4[rbp], 24
	jle	.L4
	add	DWORD PTR -8[rbp], 1
.L2:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L5
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	BuildStack, .-BuildStack
	.globl	GenBag
	.type	GenBag, @function
GenBag:
.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, 80
	mov	QWORD PTR -72[rbp], rdi
	mov	DWORD PTR -76[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 2
	mov	DWORD PTR -36[rbp], 3
	mov	DWORD PTR -32[rbp], 4
	mov	DWORD PTR -28[rbp], 5
	mov	DWORD PTR -24[rbp], 6
	mov	DWORD PTR -56[rbp], 7
	jmp	.L7
.L8:
	call	rand@PLT
	cdq
	idiv	DWORD PTR -56[rbp]
	mov	DWORD PTR -52[rbp], edx
	mov	edx, DWORD PTR -76[rbp]
	mov	eax, DWORD PTR -56[rbp]
	add	eax, edx
	cdqe
	sal	rax, 2
	lea	rdx, -4[rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	eax, DWORD PTR -48[rbp+rax*4]
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR -56[rbp]
	sub	eax, 1
	cdqe
	mov	edx, DWORD PTR -48[rbp+rax*4]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	mov	DWORD PTR -48[rbp+rax*4], edx
	sub	DWORD PTR -56[rbp], 1
.L7:
	cmp	DWORD PTR -56[rbp], 0
	jg	.L8
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	GenBag, .-GenBag
	.globl	LineClear
	.type	LineClear, @function
LineClear:
.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 -12[rbp], 0
	jmp	.L11
.L24:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L12
.L15:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, clearlines[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L25
	add	DWORD PTR -8[rbp], 1
.L12:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L15
	jmp	.L14
.L25:
	nop
.L14:
	cmp	DWORD PTR -8[rbp], 10
	jne	.L16
	mov	eax, DWORD PTR -12[rbp]
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L17
.L19:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, clearlines[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, clearlines[rip]
	mov	eax, DWORD PTR [rcx+rax]
	cmp	edx, eax
	jge	.L18
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, clearlines[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, clearlines[rip]
	mov	DWORD PTR [rdx+rax], ecx
.L18:
	add	DWORD PTR -8[rbp], 1
.L17:
	cmp	DWORD PTR -8[rbp], 3
	jle	.L19
	mov	DWORD PTR -8[rbp], 0
	jmp	.L20
.L23:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, clearlines[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	lea	rcx, 0[0+rax*4]
	add	rax, rcx
	add	rax, rsi
	lea	rcx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rcx+rax], edx
	add	DWORD PTR -4[rbp], 1
.L21:
	cmp	DWORD PTR -4[rbp], 23
	jle	.L22
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, board[rip+96]
	mov	DWORD PTR [rdx+rax], 0
	add	DWORD PTR -8[rbp], 1
.L20:
	cmp	DWORD PTR -8[rbp], 9
	jle	.L23
.L16:
	add	DWORD PTR -12[rbp], 1
.L11:
	cmp	DWORD PTR -12[rbp], 3
	jle	.L24
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	LineClear, .-LineClear
	.globl	MoveQueue
	.type	MoveQueue, @function
MoveQueue:
.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, 16
	mov	eax, DWORD PTR queueaccesspoint[rip]
	add	eax, 1
	mov	DWORD PTR queueaccesspoint[rip], eax
	mov	eax, DWORD PTR queueaccesspoint[rip]
	cmp	eax, 7
	jne	.L27
	mov	DWORD PTR -4[rbp], 0
	jmp	.L28
.L29:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 7
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, queue[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -4[rbp], 1
.L28:
	cmp	DWORD PTR -4[rbp], 6
	jle	.L29
	mov	esi, 7
	lea	rdi, queue[rip]
	call	GenBag
	mov	DWORD PTR queueaccesspoint[rip], 0
.L27:
	mov	eax, DWORD PTR queueaccesspoint[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR activepiece[rip], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	MoveQueue, .-MoveQueue
	.globl	InitialQueue
	.type	InitialQueue, @function
InitialQueue:
.LFB10:
	.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 queueaccesspoint[rip], 0
	mov	esi, 0
	lea	rdi, queue[rip]
	call	GenBag
	mov	esi, 7
	lea	rdi, queue[rip]
	call	GenBag
	mov	eax, DWORD PTR queueaccesspoint[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR activepiece[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	InitialQueue, .-InitialQueue
	.globl	SpawnPiece
	.type	SpawnPiece, @function
SpawnPiece:
.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], 0
	jmp	.L32
.L34:
	mov	eax, DWORD PTR activepiece[rip]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, spawnlocx[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR activepiece[rip]
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rcx, ecx
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, spawnlocy[rip]
	mov	edx, DWORD PTR [rcx+rdx]
	movsx	rcx, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L33
	mov	eax, DWORD PTR death[rip]
	add	eax, 1
	mov	DWORD PTR death[rip], eax
.L33:
	mov	eax, DWORD PTR activepiece[rip]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, spawnlocx[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, piecex[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR activepiece[rip]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	cdqe
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	lea	rax, spawnlocy[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, piecey[rip]
	mov	DWORD PTR [rcx+rdx], eax
	add	DWORD PTR -4[rbp], 1
.L32:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L34
	mov	DWORD PTR rotnum[rip], 0
	mov	DWORD PTR lastrot[rip], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	SpawnPiece, .-SpawnPiece
	.globl	MovePiece
	.type	MovePiece, @function
MovePiece:
.LFB12:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L36
.L41:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	cmp	eax, -1
	je	.L44
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	cmp	eax, 10
	je	.L44
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rdx+rax]
	movsx	rsi, eax
	movsx	rdx, ecx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L45
	add	DWORD PTR -4[rbp], 1
.L36:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L41
	mov	DWORD PTR -4[rbp], 0
	jmp	.L42
.L43:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -20[rbp]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -4[rbp], 1
.L42:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L43
	jmp	.L35
.L44:
	nop
	jmp	.L35
.L45:
	nop
.L35:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	MovePiece, .-MovePiece
	.globl	RotatePiece
	.type	RotatePiece, @function
RotatePiece:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR rotnum[rip]
	sub	eax, DWORD PTR -132[rbp]
	mov	DWORD PTR rotnum[rip], eax
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, -1
	jne	.L47
	mov	DWORD PTR rotnum[rip], 3
.L47:
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 4
	jne	.L48
	mov	DWORD PTR rotnum[rip], 0
.L48:
	mov	eax, DWORD PTR activepiece[rip]
	test	eax, eax
	je	.L49
	mov	eax, DWORD PTR activepiece[rip]
	cmp	eax, 3
	jne	.L50
.L49:
	cmp	DWORD PTR -132[rbp], -1
	jne	.L51
	mov	DWORD PTR -112[rbp], 3
	jmp	.L52
.L51:
	mov	DWORD PTR -112[rbp], 0
.L52:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L53
.L54:
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -120[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, piecey[rip]
	mov	edx, DWORD PTR [rcx+rdx]
	sub	eax, edx
	imul	eax, DWORD PTR -132[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	edx, [rcx+rax]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -96[rbp+rax*4], edx
	mov	eax, DWORD PTR -112[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -112[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, piecex[rip]
	mov	edx, DWORD PTR [rcx+rdx]
	mov	ecx, DWORD PTR -120[rbp]
	movsx	rcx, ecx
	lea	rsi, 0[0+rcx*4]
	lea	rcx, piecex[rip]
	mov	ecx, DWORD PTR [rsi+rcx]
	sub	edx, ecx
	mov	ecx, edx
	imul	ecx, DWORD PTR -132[rbp]
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L53:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L54
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 2
	je	.L55
	cmp	eax, 2
	jg	.L56
	test	eax, eax
	je	.L57
	cmp	eax, 1
	je	.L58
	jmp	.L56
.L57:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L59
.L60:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -96[rbp+rax*4]
	sub	eax, DWORD PTR -132[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -96[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L59:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L60
	jmp	.L61
.L58:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L62
.L63:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	edx, DWORD PTR -80[rbp+rax*4]
	mov	eax, DWORD PTR -132[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L62:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L63
	jmp	.L61
.L55:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L64
.L65:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	edx, DWORD PTR -96[rbp+rax*4]
	mov	eax, DWORD PTR -132[rbp]
	add	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -96[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L64:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L65
	jmp	.L61
.L56:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L66
.L67:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -80[rbp+rax*4]
	sub	eax, DWORD PTR -132[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L66:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L67
.L61:
	mov	eax, DWORD PTR lastrot[rip]
	test	eax, eax
	je	.L68
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 2
	jne	.L69
.L68:
	mov	DWORD PTR -108[rbp], 1
	jmp	.L70
.L69:
	mov	DWORD PTR -108[rbp], -1
.L70:
	mov	eax, DWORD PTR lastrot[rip]
	cmp	eax, 3
	je	.L71
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 1
	jne	.L72
.L71:
	mov	DWORD PTR -104[rbp], 1
	jmp	.L73
.L72:
	mov	DWORD PTR -104[rbp], -1
.L73:
	mov	eax, DWORD PTR lastrot[rip]
	cmp	eax, 1
	jne	.L74
	mov	eax, DWORD PTR rotnum[rip]
	test	eax, eax
	je	.L75
.L74:
	mov	eax, DWORD PTR lastrot[rip]
	cmp	eax, 2
	jne	.L76
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 3
	je	.L75
.L76:
	mov	eax, DWORD PTR lastrot[rip]
	test	eax, eax
	jne	.L77
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 1
	je	.L75
.L77:
	mov	eax, DWORD PTR lastrot[rip]
	cmp	eax, 3
	jne	.L78
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 2
	jne	.L78
.L75:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L79
.L80:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, ikickx[rip]
	mov	eax, DWORD PTR [rdx+rax]
	imul	eax, DWORD PTR -108[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -64[rbp+rax*4], edx
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, ikicky[rip]
	mov	eax, DWORD PTR [rdx+rax]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -32[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L79:
	cmp	DWORD PTR -120[rbp], 4
	jle	.L80
	jmp	.L102
.L78:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L82
.L83:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, ikickx2[rip]
	mov	eax, DWORD PTR [rdx+rax]
	imul	eax, DWORD PTR -108[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -64[rbp+rax*4], edx
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, ikicky2[rip]
	mov	eax, DWORD PTR [rdx+rax]
	imul	eax, DWORD PTR -104[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -32[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L82:
	cmp	DWORD PTR -120[rbp], 4
	jle	.L83
	jmp	.L84
.L102:
	jmp	.L84
.L50:
	mov	eax, DWORD PTR rotnum[rip]
	cmp	eax, 1
	je	.L85
	mov	eax, DWORD PTR lastrot[rip]
	cmp	eax, 3
	jne	.L86
.L85:
	mov	DWORD PTR -100[rbp], -1
	jmp	.L87
.L86:
	mov	DWORD PTR -100[rbp], 1
.L87:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L88
.L89:
	mov	eax, DWORD PTR piecey[rip]
	mov	edx, DWORD PTR -120[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, piecey[rip]
	mov	edx, DWORD PTR [rcx+rdx]
	sub	eax, edx
	imul	eax, DWORD PTR -132[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR piecex[rip]
	add	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -96[rbp+rax*4], edx
	mov	eax, DWORD PTR piecey[rip]
	mov	edx, DWORD PTR piecex[rip]
	mov	ecx, DWORD PTR -120[rbp]
	movsx	rcx, ecx
	lea	rsi, 0[0+rcx*4]
	lea	rcx, piecex[rip]
	mov	ecx, DWORD PTR [rsi+rcx]
	sub	edx, ecx
	mov	ecx, edx
	imul	ecx, DWORD PTR -132[rbp]
	sub	eax, ecx
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -80[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L88:
	cmp	DWORD PTR -120[rbp], 3
	jle	.L89
	mov	DWORD PTR -120[rbp], 0
	jmp	.L90
.L91:
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, kickx[rip]
	mov	eax, DWORD PTR [rdx+rax]
	imul	eax, DWORD PTR -100[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -64[rbp+rax*4], edx
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, kicky[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR rotnum[rip]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, kickydir[rip]
	mov	eax, DWORD PTR [rcx+rax]
	imul	edx, eax
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	DWORD PTR -32[rbp+rax*4], edx
	add	DWORD PTR -120[rbp], 1
.L90:
	cmp	DWORD PTR -120[rbp], 4
	jle	.L91
.L84:
	mov	DWORD PTR -120[rbp], 0
	jmp	.L92
.L100:
	mov	DWORD PTR -116[rbp], 0
	jmp	.L93
.L95:
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	edx, DWORD PTR -96[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	add	eax, edx
	cmp	eax, 9
	jg	.L94
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	edx, DWORD PTR -96[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	add	eax, edx
	test	eax, eax
	js	.L94
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	edx, DWORD PTR -80[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	add	eax, edx
	cmp	eax, 24
	jg	.L94
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	edx, DWORD PTR -80[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	add	eax, edx
	test	eax, eax
	js	.L94
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	edx, DWORD PTR -96[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	add	edx, eax
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	ecx, DWORD PTR -80[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	add	eax, ecx
	movsx	rcx, eax
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L94
	add	DWORD PTR -116[rbp], 1
.L93:
	cmp	DWORD PTR -116[rbp], 3
	jle	.L95
.L94:
	cmp	DWORD PTR -116[rbp], 4
	jne	.L96
	mov	DWORD PTR -116[rbp], 0
	jmp	.L97
.L98:
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	edx, DWORD PTR -96[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	mov	edx, DWORD PTR -80[rbp+rax*4]
	mov	eax, DWORD PTR -120[rbp]
	cdqe
	mov	eax, DWORD PTR -32[rbp+rax*4]
	lea	ecx, [rdx+rax]
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -116[rbp], 1
.L97:
	cmp	DWORD PTR -116[rbp], 3
	jle	.L98
	mov	eax, DWORD PTR rotnum[rip]
	mov	DWORD PTR lastrot[rip], eax
	jmp	.L46
.L96:
	add	DWORD PTR -120[rbp], 1
.L92:
	cmp	DWORD PTR -120[rbp], 4
	jle	.L100
	mov	eax, DWORD PTR lastrot[rip]
	mov	DWORD PTR rotnum[rip], eax
.L46:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L101
	call	__stack_chk_fail@PLT
.L101:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	RotatePiece, .-RotatePiece
	.globl	HoldPiece
	.type	HoldPiece, @function
HoldPiece:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR holdpiece[rip]
	cmp	eax, -1
	jne	.L104
	mov	eax, DWORD PTR activepiece[rip]
	mov	DWORD PTR holdpiece[rip], eax
	mov	eax, 0
	call	MoveQueue
	mov	eax, 0
	call	SpawnPiece
	jmp	.L106
.L104:
	mov	eax, DWORD PTR holdpiece[rip]
	mov	DWORD PTR activepiece[rip], eax
	mov	eax, DWORD PTR queueaccesspoint[rip]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, queue[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR holdpiece[rip], eax
	mov	edx, DWORD PTR queueaccesspoint[rip]
	mov	eax, DWORD PTR activepiece[rip]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, queue[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, 0
	call	SpawnPiece
.L106:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	HoldPiece, .-HoldPiece
	.globl	HardDrop
	.type	HardDrop, @function
HardDrop:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -8[rbp], 0
.L115:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L108
.L114:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rdx+rax]
	sub	eax, DWORD PTR -8[rbp]
	cmp	eax, -1
	je	.L109
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rcx+rax]
	sub	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	je	.L110
.L109:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L111
.L112:
	mov	ecx, DWORD PTR activepiece[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rsi, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rsi+rax]
	sub	eax, DWORD PTR -8[rbp]
	add	eax, 1
	add	ecx, 1
	movsx	rsi, eax
	movsx	rdx, edx
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rsi
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rdx+rax]
	sub	eax, DWORD PTR -8[rbp]
	lea	ecx, 1[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, clearlines[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -4[rbp], 1
.L111:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L112
	mov	eax, 0
	call	LineClear
	mov	eax, 0
	call	MoveQueue
	mov	eax, 0
	call	SpawnPiece
	jmp	.L116
.L110:
	add	DWORD PTR -4[rbp], 1
.L108:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L114
	add	DWORD PTR -8[rbp], 1
	jmp	.L115
.L116:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	HardDrop, .-HardDrop
	.globl	SoftDrop
	.type	SoftDrop, @function
SoftDrop:
.LFB16:
	.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], 0
	jmp	.L118
.L122:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecex[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, piecey[rip]
	mov	edx, DWORD PTR [rcx+rdx]
	sub	edx, 1
	movsx	rcx, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	add	rax, rcx
	lea	rdx, 0[0+rax*4]
	lea	rax, board[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L125
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jle	.L125
	add	DWORD PTR -4[rbp], 1
.L118:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L122
	mov	DWORD PTR -4[rbp], 0
	jmp	.L123
.L124:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	eax, DWORD PTR [rdx+rax]
	lea	ecx, -1[rax]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, piecey[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -4[rbp], 1
.L123:
	cmp	DWORD PTR -4[rbp], 3
	jle	.L124
	jmp	.L117
.L125:
	nop
.L117:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	SoftDrop, .-SoftDrop
	.globl	main
	.type	main, @function
main:
.LFB17:
	.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	time@PLT
	mov	edi, eax
	call	srand@PLT
	mov	eax, 0
	call	BuildStack
	mov	eax, 0
	call	InitialQueue
	mov	eax, 0
	call	SpawnPiece
	nop
.L127:
	mov	eax, DWORD PTR death[rip]
	test	eax, eax
	je	.L127
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.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	"51701273.c"
	.text
	.comm	board,1000,4
	.comm	piecex,16,4
	.comm	piecey,16,4
	.global	spawnlocx
	.section	.rodata
	.align	2
	.type	spawnlocx, %object
	.size	spawnlocx, 112
spawnlocx:
	.word	4
	.word	3
	.word	6
	.word	5
	.word	4
	.word	3
	.word	3
	.word	5
	.word	4
	.word	5
	.word	3
	.word	5
	.word	4
	.word	5
	.word	4
	.word	5
	.word	4
	.word	4
	.word	5
	.word	3
	.word	4
	.word	4
	.word	3
	.word	5
	.word	4
	.word	3
	.word	4
	.word	5
	.global	spawnlocy
	.align	2
	.type	spawnlocy, %object
	.size	spawnlocy, 112
spawnlocy:
	.word	19
	.word	19
	.word	19
	.word	19
	.word	19
	.word	20
	.word	19
	.word	19
	.word	19
	.word	20
	.word	19
	.word	19
	.word	20
	.word	19
	.word	19
	.word	20
	.word	19
	.word	20
	.word	20
	.word	19
	.word	19
	.word	20
	.word	19
	.word	19
	.word	19
	.word	20
	.word	20
	.word	19
	.comm	activepiece,4,4
	.comm	queue,56,4
	.comm	queueaccesspoint,4,4
	.global	death
	.bss
	.align	2
	.type	death, %object
	.size	death, 4
death:
	.space	4
	.comm	rotnum,4,4
	.comm	lastrot,4,4
	.global	kickx
	.section	.rodata
	.align	2
	.type	kickx, %object
	.size	kickx, 20
kickx:
	.word	0
	.word	1
	.word	1
	.word	0
	.word	1
	.global	kicky
	.align	2
	.type	kicky, %object
	.size	kicky, 20
kicky:
	.word	0
	.word	0
	.word	-1
	.word	2
	.word	2
	.global	kickydir
	.align	2
	.type	kickydir, %object
	.size	kickydir, 16
kickydir:
	.word	1
	.word	-1
	.word	1
	.word	-1
	.global	ikickx
	.align	2
	.type	ikickx, %object
	.size	ikickx, 20
ikickx:
	.word	0
	.word	-2
	.word	1
	.word	-2
	.word	1
	.global	ikickx2
	.align	2
	.type	ikickx2, %object
	.size	ikickx2, 20
ikickx2:
	.word	0
	.word	-1
	.word	2
	.word	-1
	.word	2
	.global	ikicky
	.align	2
	.type	ikicky, %object
	.size	ikicky, 20
ikicky:
	.word	0
	.word	0
	.word	0
	.word	-1
	.word	2
	.global	ikicky2
	.align	2
	.type	ikicky2, %object
	.size	ikicky2, 20
ikicky2:
	.word	0
	.word	0
	.word	0
	.word	-2
	.word	1
	.global	holdpiece
	.data
	.align	2
	.type	holdpiece, %object
	.size	holdpiece, 4
holdpiece:
	.word	-1
	.comm	clearlines,16,4
	.comm	input,1,1
	.text
	.align	2
	.global	BuildStack
	.syntax unified
	.arm
	.fpu softvfp
	.type	BuildStack, %function
BuildStack:
	@ 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, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r1, .L6
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	mov	r2, #0
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #24
	ble	.L4
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L5
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L7:
	.align	2
.L6:
	.word	board
	.size	BuildStack, .-BuildStack
	.global	__aeabi_idivmod
	.section	.rodata
	.align	2
.LC0:
	.word	0
	.word	1
	.word	2
	.word	3
	.word	4
	.word	5
	.word	6
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	GenBag
	.syntax unified
	.arm
	.fpu softvfp
	.type	GenBag, %function
GenBag:
	@ 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]
	str	r1, [fp, #-52]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L12+4
	sub	ip, fp, #36
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	mov	r3, #7
	str	r3, [fp, #-44]
	b	.L9
.L10:
	bl	rand
	mov	r3, r0
	ldr	r1, [fp, #-44]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-40]
	ldr	r2, [fp, #-52]
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r2, r2, r3
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-32]
	str	r3, [r2]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-32]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-32]
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
.L9:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bgt	.L10
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC1
	.word	.LC0
	.size	GenBag, .-GenBag
	.align	2
	.global	LineClear
	.syntax unified
	.arm
	.fpu softvfp
	.type	LineClear, %function
LineClear:
	@ 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
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L15
.L28:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L16
.L19:
	ldr	r2, .L30
	ldr	r3, [fp, #-16]
	ldr	r1, [r2, r3, lsl #2]
	ldr	r0, .L30+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	beq	.L29
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L16:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L19
	b	.L18
.L29:
	nop
.L18:
	ldr	r3, [fp, #-12]
	cmp	r3, #10
	bne	.L20
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L21
.L23:
	ldr	r2, .L30
	ldr	r3, [fp, #-16]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L30
	ldr	r3, [fp, #-12]
	ldr	r3, [r1, r3, lsl #2]
	cmp	r2, r3
	bge	.L22
	ldr	r2, .L30
	ldr	r3, [fp, #-12]
	ldr	r3, [r2, r3, lsl #2]
	sub	r2, r3, #1
	ldr	r1, .L30
	ldr	r3, [fp, #-12]
	str	r2, [r1, r3, lsl #2]
.L22:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L21:
	ldr	r3, [fp, #-12]
	cmp	r3, #3
	ble	.L23
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L24
.L27:
	ldr	r2, .L30
	ldr	r3, [fp, #-16]
	ldr	r3, [r2, r3, lsl #2]
	str	r3, [fp, #-8]
	b	.L25
.L26:
	ldr	r3, [fp, #-8]
	add	r1, r3, #1
	ldr	r0, .L30+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r1, [r0, r3, lsl #2]
	ldr	r0, .L30+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	str	r1, [r0, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L25:
	ldr	r3, [fp, #-8]
	cmp	r3, #23
	ble	.L26
	ldr	r1, .L30+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #96
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L24:
	ldr	r3, [fp, #-12]
	cmp	r3, #9
	ble	.L27
.L20:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L15:
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	ble	.L28
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L31:
	.align	2
.L30:
	.word	clearlines
	.word	board
	.size	LineClear, .-LineClear
	.align	2
	.global	MoveQueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	MoveQueue, %function
MoveQueue:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L36
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L36
	str	r3, [r2]
	ldr	r3, .L36
	ldr	r3, [r3]
	cmp	r3, #7
	bne	.L33
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L34
.L35:
	ldr	r3, [fp, #-8]
	add	r3, r3, #7
	ldr	r2, .L36+4
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L36+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L34:
	ldr	r3, [fp, #-8]
	cmp	r3, #6
	ble	.L35
	mov	r1, #7
	ldr	r0, .L36+4
	bl	GenBag
	ldr	r3, .L36
	mov	r2, #0
	str	r2, [r3]
.L33:
	ldr	r3, .L36
	ldr	r3, [r3]
	ldr	r2, .L36+4
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L36+8
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	queueaccesspoint
	.word	queue
	.word	activepiece
	.size	MoveQueue, .-MoveQueue
	.align	2
	.global	InitialQueue
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitialQueue, %function
InitialQueue:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L39
	mov	r2, #0
	str	r2, [r3]
	mov	r1, #0
	ldr	r0, .L39+4
	bl	GenBag
	mov	r1, #7
	ldr	r0, .L39+4
	bl	GenBag
	ldr	r3, .L39
	ldr	r3, [r3]
	ldr	r2, .L39+4
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L39+8
	str	r3, [r2]
	nop
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	queueaccesspoint
	.word	queue
	.word	activepiece
	.size	InitialQueue, .-InitialQueue
	.align	2
	.global	SpawnPiece
	.syntax unified
	.arm
	.fpu softvfp
	.type	SpawnPiece, %function
SpawnPiece:
	@ 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, #0
	str	r3, [fp, #-8]
	b	.L42
.L44:
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r1, .L45+4
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r0, .L45+8
	lsl	r1, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r1, r3
	ldr	r1, [r0, r3, lsl #2]
	ldr	r0, .L45+12
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	beq	.L43
	ldr	r3, .L45+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L45+16
	str	r3, [r2]
.L43:
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r1, .L45+4
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r1, .L45+20
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, .L45
	ldr	r3, [r3]
	ldr	r1, .L45+8
	lsl	r2, r3, #2
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, [r1, r3, lsl #2]
	ldr	r1, .L45+24
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L42:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L44
	ldr	r3, .L45+28
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L45+32
	mov	r2, #0
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L46:
	.align	2
.L45:
	.word	activepiece
	.word	spawnlocx
	.word	spawnlocy
	.word	board
	.word	death
	.word	piecex
	.word	piecey
	.word	rotnum
	.word	lastrot
	.size	SpawnPiece, .-SpawnPiece
	.align	2
	.global	MovePiece
	.syntax unified
	.arm
	.fpu softvfp
	.type	MovePiece, %function
MovePiece:
	@ 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, #-8]
	b	.L48
.L53:
	ldr	r2, .L58
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	cmn	r3, #1
	beq	.L56
	ldr	r2, .L58
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	cmp	r3, #10
	beq	.L56
	ldr	r2, .L58
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r1, .L58+4
	ldr	r3, [fp, #-8]
	ldr	r1, [r1, r3, lsl #2]
	ldr	r0, .L58+8
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	bne	.L57
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L48:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L53
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L54
.L55:
	ldr	r2, .L58
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r1, .L58
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L54:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L55
	b	.L47
.L56:
	nop
	b	.L47
.L57:
	nop
.L47:
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L59:
	.align	2
.L58:
	.word	piecex
	.word	piecey
	.word	board
	.size	MovePiece, .-MovePiece
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	RotatePiece
	.syntax unified
	.arm
	.fpu softvfp
	.type	RotatePiece, %function
RotatePiece:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	ldr	r3, .L117
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L117+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-112]
	sub	r3, r2, r3
	ldr	r2, .L117+4
	str	r3, [r2]
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L61
	ldr	r3, .L117+4
	mov	r2, #3
	str	r2, [r3]
.L61:
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L62
	ldr	r3, .L117+4
	mov	r2, #0
	str	r2, [r3]
.L62:
	ldr	r3, .L117+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L63
	ldr	r3, .L117+8
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L64
.L63:
	ldr	r3, [fp, #-112]
	cmn	r3, #1
	bne	.L65
	mov	r3, #3
	str	r3, [fp, #-96]
	b	.L66
.L65:
	mov	r3, #0
	str	r3, [fp, #-96]
.L66:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L67
.L68:
	ldr	r2, .L117+12
	ldr	r3, [fp, #-96]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L117+12
	ldr	r3, [fp, #-104]
	ldr	r3, [r1, r3, lsl #2]
	sub	r3, r2, r3
	ldr	r2, [fp, #-112]
	mul	r2, r3, r2
	ldr	r1, .L117+16
	ldr	r3, [fp, #-96]
	ldr	r3, [r1, r3, lsl #2]
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-76]
	ldr	r2, .L117+12
	ldr	r3, [fp, #-96]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L117+16
	ldr	r3, [fp, #-96]
	ldr	r1, [r1, r3, lsl #2]
	ldr	r0, .L117+16
	ldr	r3, [fp, #-104]
	ldr	r3, [r0, r3, lsl #2]
	sub	r3, r1, r3
	ldr	r1, [fp, #-112]
	mul	r3, r1, r3
	sub	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-60]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L67:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L68
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L69
	cmp	r3, #2
	bgt	.L70
	cmp	r3, #0
	beq	.L71
	cmp	r3, #1
	beq	.L72
	b	.L70
.L71:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L73
.L74:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-76]
	ldr	r3, [fp, #-112]
	sub	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-76]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L73:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L74
	b	.L75
.L72:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L76
.L77:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-60]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L76:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L77
	b	.L75
.L69:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L78
.L79:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-76]
	ldr	r3, [fp, #-112]
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-76]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L78:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L79
	b	.L75
.L70:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L80
.L81:
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-112]
	sub	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-60]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L80:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L81
.L75:
	ldr	r3, .L117+20
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L82
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L83
.L82:
	mov	r3, #1
	str	r3, [fp, #-92]
	b	.L84
.L83:
	mvn	r3, #0
	str	r3, [fp, #-92]
.L84:
	ldr	r3, .L117+20
	ldr	r3, [r3]
	cmp	r3, #3
	beq	.L85
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L86
.L85:
	mov	r3, #1
	str	r3, [fp, #-88]
	b	.L87
.L86:
	mvn	r3, #0
	str	r3, [fp, #-88]
.L87:
	ldr	r3, .L117+20
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L88
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L89
.L88:
	ldr	r3, .L117+20
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L90
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #3
	beq	.L89
.L90:
	ldr	r3, .L117+20
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L91
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L89
.L91:
	ldr	r3, .L117+20
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L92
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L92
.L89:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L93
.L94:
	ldr	r2, .L117+24
	ldr	r3, [fp, #-104]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-92]
	mul	r2, r3, r2
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-44]
	ldr	r2, .L117+28
	ldr	r3, [fp, #-104]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-88]
	mul	r2, r3, r2
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-24]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L93:
	ldr	r3, [fp, #-104]
	cmp	r3, #4
	ble	.L94
	b	.L116
.L92:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L96
.L97:
	ldr	r2, .L117+32
	ldr	r3, [fp, #-104]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-92]
	mul	r2, r3, r2
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-44]
	ldr	r2, .L117+36
	ldr	r3, [fp, #-104]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-88]
	mul	r2, r3, r2
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-24]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L96:
	ldr	r3, [fp, #-104]
	cmp	r3, #4
	ble	.L97
	b	.L98
.L116:
	b	.L98
.L64:
	ldr	r3, .L117+4
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L99
	ldr	r3, .L117+20
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L100
.L99:
	mvn	r3, #0
	str	r3, [fp, #-84]
	b	.L101
.L100:
	mov	r3, #1
	str	r3, [fp, #-84]
.L101:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L102
.L103:
	ldr	r3, .L117+12
	ldr	r2, [r3]
	ldr	r1, .L117+12
	ldr	r3, [fp, #-104]
	ldr	r3, [r1, r3, lsl #2]
	sub	r3, r2, r3
	ldr	r2, [fp, #-112]
	mul	r2, r3, r2
	ldr	r3, .L117+16
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-76]
	ldr	r3, .L117+12
	ldr	r2, [r3]
	ldr	r3, .L117+16
	ldr	r1, [r3]
	ldr	r0, .L117+16
	ldr	r3, [fp, #-104]
	ldr	r3, [r0, r3, lsl #2]
	sub	r3, r1, r3
	ldr	r1, [fp, #-112]
	mul	r3, r1, r3
	sub	r2, r2, r3
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-60]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L102:
	ldr	r3, [fp, #-104]
	cmp	r3, #3
	ble	.L103
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L104
.L105:
	ldr	r2, .L117+40
	ldr	r3, [fp, #-104]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, [fp, #-84]
	mul	r2, r3, r2
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-44]
	ldr	r2, .L117+44
	ldr	r3, [fp, #-104]
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L117+4
	ldr	r2, [r2]
	ldr	r1, .L117+48
	ldr	r2, [r1, r2, lsl #2]
	mul	r2, r3, r2
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-24]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L104:
	ldr	r3, [fp, #-104]
	cmp	r3, #4
	ble	.L105
.L98:
	mov	r3, #0
	str	r3, [fp, #-104]
	b	.L106
.L114:
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L107
.L109:
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-76]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-44]
	add	r3, r2, r3
	cmp	r3, #9
	bgt	.L108
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-76]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-44]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L108
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-24]
	add	r3, r2, r3
	cmp	r3, #24
	bgt	.L108
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-24]
	add	r3, r2, r3
	cmp	r3, #0
	blt	.L108
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-76]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-44]
	add	r2, r2, r3
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-60]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r0, fp, #4
	add	r3, r0, r3
	ldr	r3, [r3, #-24]
	add	r1, r1, r3
	ldr	r0, .L117+52
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	bne	.L108
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L107:
	ldr	r3, [fp, #-100]
	cmp	r3, #3
	ble	.L109
.L108:
	ldr	r3, [fp, #-100]
	cmp	r3, #4
	bne	.L110
	mov	r3, #0
	str	r3, [fp, #-100]
	b	.L111
.L112:
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-76]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-44]
	add	r2, r2, r3
	ldr	r1, .L117+16
	ldr	r3, [fp, #-100]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-100]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-60]
	ldr	r3, [fp, #-104]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-24]
	add	r2, r2, r3
	ldr	r1, .L117+12
	ldr	r3, [fp, #-100]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L111:
	ldr	r3, [fp, #-100]
	cmp	r3, #3
	ble	.L112
	ldr	r3, .L117+4
	ldr	r3, [r3]
	ldr	r2, .L117+20
	str	r3, [r2]
	b	.L60
.L110:
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
.L106:
	ldr	r3, [fp, #-104]
	cmp	r3, #4
	ble	.L114
	ldr	r3, .L117+20
	ldr	r3, [r3]
	ldr	r2, .L117+4
	str	r3, [r2]
.L60:
	ldr	r3, .L117
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L115
	bl	__stack_chk_fail
.L115:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L118:
	.align	2
.L117:
	.word	.LC2
	.word	rotnum
	.word	activepiece
	.word	piecey
	.word	piecex
	.word	lastrot
	.word	ikickx
	.word	ikicky
	.word	ikickx2
	.word	ikicky2
	.word	kickx
	.word	kicky
	.word	kickydir
	.word	board
	.size	RotatePiece, .-RotatePiece
	.align	2
	.global	HoldPiece
	.syntax unified
	.arm
	.fpu softvfp
	.type	HoldPiece, %function
HoldPiece:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L123
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L120
	ldr	r3, .L123+4
	ldr	r3, [r3]
	ldr	r2, .L123
	str	r3, [r2]
	bl	MoveQueue
	bl	SpawnPiece
	b	.L122
.L120:
	ldr	r3, .L123
	ldr	r3, [r3]
	ldr	r2, .L123+4
	str	r3, [r2]
	ldr	r3, .L123+8
	ldr	r3, [r3]
	ldr	r2, .L123+12
	ldr	r3, [r2, r3, lsl #2]
	ldr	r2, .L123
	str	r3, [r2]
	ldr	r3, .L123+8
	ldr	r3, [r3]
	ldr	r2, .L123+4
	ldr	r2, [r2]
	ldr	r1, .L123+12
	str	r2, [r1, r3, lsl #2]
	bl	SpawnPiece
.L122:
	nop
	pop	{fp, pc}
.L124:
	.align	2
.L123:
	.word	holdpiece
	.word	activepiece
	.word	queueaccesspoint
	.word	queue
	.size	HoldPiece, .-HoldPiece
	.align	2
	.global	HardDrop
	.syntax unified
	.arm
	.fpu softvfp
	.type	HardDrop, %function
HardDrop:
	@ 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]
.L133:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L126
.L132:
	ldr	r2, .L135
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	cmn	r3, #1
	beq	.L127
	ldr	r2, .L135+4
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L135
	ldr	r3, [fp, #-8]
	ldr	r1, [r1, r3, lsl #2]
	ldr	r3, [fp, #-12]
	sub	r1, r1, r3
	ldr	r0, .L135+8
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	beq	.L128
.L127:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L129
.L130:
	ldr	r3, .L135+12
	ldr	r3, [r3]
	ldr	r1, .L135+4
	ldr	r2, [fp, #-8]
	ldr	r2, [r1, r2, lsl #2]
	ldr	r0, .L135
	ldr	r1, [fp, #-8]
	ldr	r0, [r0, r1, lsl #2]
	ldr	r1, [fp, #-12]
	sub	r1, r0, r1
	add	r0, r1, #1
	add	r1, r3, #1
	ldr	ip, .L135+8
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r0
	str	r1, [ip, r3, lsl #2]
	ldr	r2, .L135
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	add	r2, r3, #1
	ldr	r1, .L135+16
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L129:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L130
	bl	LineClear
	bl	MoveQueue
	bl	SpawnPiece
	b	.L134
.L128:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L126:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L132
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L133
.L134:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L136:
	.align	2
.L135:
	.word	piecey
	.word	piecex
	.word	board
	.word	activepiece
	.word	clearlines
	.size	HardDrop, .-HardDrop
	.align	2
	.global	SoftDrop
	.syntax unified
	.arm
	.fpu softvfp
	.type	SoftDrop, %function
SoftDrop:
	@ 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, #0
	str	r3, [fp, #-8]
	b	.L138
.L142:
	ldr	r2, .L146
	ldr	r3, [fp, #-8]
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, .L146+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r1, r3, lsl #2]
	sub	r1, r3, #1
	ldr	r0, .L146+8
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	add	r3, r3, r1
	ldr	r3, [r0, r3, lsl #2]
	cmp	r3, #0
	bne	.L145
	ldr	r2, .L146+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	cmp	r3, #0
	ble	.L145
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L138:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L142
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L143
.L144:
	ldr	r2, .L146+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	sub	r2, r3, #1
	ldr	r1, .L146+4
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L143:
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	ble	.L144
	b	.L137
.L145:
	nop
.L137:
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L147:
	.align	2
.L146:
	.word	piecex
	.word	piecey
	.word	board
	.size	SoftDrop, .-SoftDrop
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	bl	BuildStack
	bl	InitialQueue
	bl	SpawnPiece
	nop
.L149:
	ldr	r3, .L150
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L149
	nop
	nop
	pop	{fp, pc}
.L151:
	.align	2
.L150:
	.word	death
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
