	.file	"181394570.c"
	.intel_syntax noprefix
	.text
	.globl	snakeHead
	.bss
	.align 8
	.type	snakeHead, @object
	.size	snakeHead, 8
snakeHead:
	.zero	8
	.globl	snakeTail
	.align 8
	.type	snakeTail, @object
	.size	snakeTail, 8
snakeTail:
	.zero	8
	.globl	food
	.align 8
	.type	food, @object
	.size	food, 8
food:
	.zero	8
	.globl	oldTermios
	.align 32
	.type	oldTermios, @object
	.size	oldTermios, 60
oldTermios:
	.zero	60
	.globl	score
	.align 4
	.type	score, @object
	.size	score, 4
score:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"\033[2JGame Over. Your score is: %u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -116[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	DWORD PTR -100[rbp], eax
	mov	eax, DWORD PTR -100[rbp]
	mov	edi, eax
	call	srand@PLT
	jmp	.L3
.L2:
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
.L3:
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rsi, oldTermios[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	lea	rdi, restoreTermios[rip]
	call	atexit@PLT
	mov	rax, QWORD PTR oldTermios[rip]
	mov	rdx, QWORD PTR oldTermios[rip+8]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR oldTermios[rip+16]
	mov	rdx, QWORD PTR oldTermios[rip+24]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR oldTermios[rip+32]
	mov	rdx, QWORD PTR oldTermios[rip+40]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR oldTermios[rip+48]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR oldTermios[rip+56]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -11
	mov	DWORD PTR -68[rbp], eax
	mov	BYTE PTR -57[rbp], 0
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 2
	mov	edi, 0
	call	tcsetattr@PLT
	call	initializeWorld
.L6:
	call	drawScreen
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 175000000
	lea	rax, -96[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	nanosleep@PLT
	call	handleInput
	mov	rax, QWORD PTR snakeHead[rip]
	mov	rdi, rax
	call	move
	call	checkCollision
	test	al, al
	je	.L6
	mov	eax, DWORD PTR score[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.type	checkCollision, @function
checkCollision:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR snakeHead[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L10
.L17:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	js	.L11
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 24
	jg	.L11
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	js	.L11
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 79
	jle	.L12
.L11:
	mov	eax, 1
	jmp	.L13
.L12:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L14
.L16:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L15
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jne	.L15
	mov	eax, 1
	jmp	.L13
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L14:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L16
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
.L10:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L17
	mov	eax, 0
.L13:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	checkCollision, .-checkCollision
	.type	checkFood, @function
checkFood:
.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	edx, DWORD PTR food[rip]
	mov	rax, QWORD PTR snakeHead[rip]
	mov	eax, DWORD PTR [rax]
	cmp	edx, eax
	jne	.L20
	mov	edx, DWORD PTR food[rip+4]
	mov	rax, QWORD PTR snakeHead[rip]
	mov	eax, DWORD PTR 4[rax]
	cmp	edx, eax
	jne	.L20
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR snakeTail[rip]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR snakeTail[rip]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 4
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR snakeTail[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR snakeTail[rip], rax
	mov	eax, DWORD PTR score[rip]
	add	eax, 1
	mov	DWORD PTR score[rip], eax
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 3
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	lea	edx, 0[0+rax*4]
	add	eax, edx
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR food[rip], edx
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 5
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	sal	eax, 4
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR food[rip+4], edx
.L20:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	checkFood, .-checkFood
	.section	.rodata
.LC1:
	.string	"\033[2J\033[42m"
.LC2:
	.string	"\033[%d;%dH "
.LC3:
	.string	"\033[%d;%dH\033[41m \033[49m\033[H"
	.text
	.type	drawScreen, @function
drawScreen:
.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
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR snakeHead[rip]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L22
.L24:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	js	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 24
	jg	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	js	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, 79
	jg	.L23
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L22:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L24
	mov	eax, DWORD PTR food[rip+4]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR food[rip]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	drawScreen, .-drawScreen
	.section	.rodata
.LC4:
	.string	"\033[2J"
	.text
	.type	handleInput, @function
handleInput:
.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
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -13[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	test	rax, rax
	je	.L35
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 113
	jne	.L27
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L27:
	mov	rax, QWORD PTR snakeHead[rip]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -12[rbp], eax
	movzx	eax, BYTE PTR -13[rbp]
	movsx	eax, al
	sub	eax, 65
	cmp	eax, 54
	ja	.L28
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L30[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L30[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L30:
	.long	.L33-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L32-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L31-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L29-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L33-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L32-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L31-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L28-.L30
	.long	.L29-.L30
	.text
.L29:
	mov	DWORD PTR -12[rbp], 0
	jmp	.L28
.L33:
	mov	DWORD PTR -12[rbp], 1
	jmp	.L28
.L31:
	mov	DWORD PTR -12[rbp], 2
	jmp	.L28
.L32:
	mov	DWORD PTR -12[rbp], 3
	nop
.L28:
	mov	rax, QWORD PTR snakeHead[rip]
	mov	eax, DWORD PTR 8[rax]
	add	eax, 2
	and	eax, 3
	cmp	DWORD PTR -12[rbp], eax
	je	.L35
	mov	rax, QWORD PTR snakeHead[rip]
	mov	edx, DWORD PTR -12[rbp]
	mov	DWORD PTR 8[rax], edx
.L35:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	handleInput, .-handleInput
	.type	initializeWorld, @function
initializeWorld:
.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, 16
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR snakeHead[rip], rax
	mov	rax, QWORD PTR snakeHead[rip]
	mov	DWORD PTR [rax], 20
	mov	rax, QWORD PTR snakeHead[rip]
	mov	DWORD PTR 4[rax], 10
	mov	rax, QWORD PTR snakeHead[rip]
	mov	DWORD PTR 8[rax], 0
	mov	rax, QWORD PTR snakeHead[rip]
	mov	QWORD PTR snakeTail[rip], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L37
.L38:
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR snakeTail[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 20
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 11[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], 1
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR snakeTail[rip], rax
	add	DWORD PTR -12[rbp], 1
.L37:
	cmp	DWORD PTR -12[rbp], 4
	jle	.L38
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 1374389535
	shr	rax, 32
	sar	eax, 3
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	lea	edx, 0[0+rax*4]
	add	eax, edx
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR food[rip], edx
	call	rand@PLT
	mov	ecx, eax
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 5
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	sal	eax, 4
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR food[rip+4], edx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	initializeWorld, .-initializeWorld
	.type	move, @function
move:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, 4
	ja	.L40
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L42[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L42[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L42:
	.long	.L46-.L42
	.long	.L45-.L42
	.long	.L44-.L42
	.long	.L43-.L42
	.long	.L49-.L42
	.text
.L46:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L40
.L45:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L40
.L44:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L40
.L43:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L40
.L49:
	nop
.L40:
	mov	rax, QWORD PTR snakeHead[rip]
	cmp	QWORD PTR -8[rbp], rax
	jne	.L47
	call	checkFood
.L47:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L50
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	move
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rdx]
	mov	DWORD PTR 8[rax], edx
.L50:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	move, .-move
	.type	restoreTermios, @function
restoreTermios:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdx, oldTermios[rip]
	mov	esi, 2
	mov	edi, 0
	call	tcsetattr@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	restoreTermios, .-restoreTermios
	.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	"181394570.c"
	.text
	.comm	snakeHead,4,4
	.comm	snakeTail,4,4
	.comm	food,8,4
	.comm	oldTermios,60,4
	.comm	score,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\033[2JGame Over. Your score is: %u\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-88]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-92]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-80]
	ldr	r0, [fp, #-80]
	bl	srand
	b	.L3
.L2:
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
.L3:
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r1, .L9+8
	mov	r0, #0
	bl	tcgetattr
	ldr	r0, .L9+12
	bl	atexit
	ldr	r3, .L9+8
	sub	ip, fp, #68
	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	r3, [fp, #-56]
	bic	r3, r3, #10
	str	r3, [fp, #-56]
	mov	r3, #0
	strb	r3, [fp, #-45]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #2
	mov	r0, #0
	bl	tcsetattr
	bl	initializeWorld
.L6:
	bl	drawScreen
	mov	r3, #0
	str	r3, [fp, #-76]
	ldr	r3, .L9+16
	str	r3, [fp, #-72]
	sub	r3, fp, #76
	mov	r1, #0
	mov	r0, r3
	bl	nanosleep
	bl	handleInput
	ldr	r3, .L9+20
	ldr	r3, [r3]
	mov	r0, r3
	bl	move
	bl	checkCollision
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L9+24
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L9+28
	bl	printf
	mov	r3, #0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.word	stdout
	.word	oldTermios
	.word	restoreTermios
	.word	175000000
	.word	snakeHead
	.word	score
	.word	.LC0
	.size	main, .-main
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkCollision, %function
checkCollision:
	@ 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
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L12
.L19:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L13
	ldr	r3, [fp, #-12]
	ldr	r3, [r3]
	cmp	r3, #24
	bgt	.L13
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	blt	.L13
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #4]
	cmp	r3, #79
	ble	.L14
.L13:
	mov	r3, #1
	b	.L15
.L14:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	b	.L16
.L18:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L17
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L17
	mov	r3, #1
	b	.L15
.L17:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
.L16:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L18
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-12]
.L12:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L19
	mov	r3, #0
.L15:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L21:
	.align	2
.L20:
	.word	snakeHead
	.size	checkCollision, .-checkCollision
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkFood, %function
checkFood:
	@ 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, .L25
	ldr	r2, [r3]
	ldr	r3, .L25+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L24
	ldr	r3, .L25
	ldr	r2, [r3, #4]
	ldr	r3, .L25+4
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L24
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L25+8
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L25+8
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #4
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, .L25+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r2, .L25+8
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, .L25+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L25+12
	str	r3, [r2]
	bl	rand
	mov	r1, r0
	ldr	r3, .L25+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	ldr	r3, .L25
	str	r2, [r3]
	bl	rand
	mov	r1, r0
	ldr	r3, .L25+20
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	ldr	r3, .L25
	str	r2, [r3, #4]
.L24:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	food
	.word	snakeHead
	.word	snakeTail
	.word	score
	.word	1374389535
	.word	1717986919
	.size	checkFood, .-checkFood
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\033[2J\033[42m\000"
	.align	2
.LC3:
	.ascii	"\033[%d;%dH \000"
	.align	2
.LC4:
	.ascii	"\033[%d;%dH\033[41m \033[49m\033[H\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	drawScreen, %function
drawScreen:
	@ 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	r0, .L31
	bl	printf
	ldr	r3, .L31+4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	b	.L28
.L30:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L29
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #24
	bgt	.L29
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	blt	.L29
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #79
	bgt	.L29
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r0, .L31+8
	bl	printf
.L29:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
.L28:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L30
	ldr	r3, .L31+12
	ldr	r3, [r3]
	add	r1, r3, #1
	ldr	r3, .L31+12
	ldr	r3, [r3, #4]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r0, .L31+16
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC2
	.word	snakeHead
	.word	.LC3
	.word	food
	.word	.LC4
	.size	drawScreen, .-drawScreen
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\033[2J\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleInput, %function
handleInput:
	@ 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, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #13
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	cmp	r3, #0
	beq	.L43
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L35
	ldr	r0, .L44+4
	bl	printf
	mov	r0, #0
	bl	exit
.L35:
	ldr	r3, .L44+8
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #65
	cmp	r3, #54
	ldrls	pc, [pc, r3, asl #2]
	b	.L36
.L38:
	.word	.L41
	.word	.L36
	.word	.L36
	.word	.L40
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L39
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L37
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L41
	.word	.L36
	.word	.L36
	.word	.L40
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L39
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L37
.L37:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L36
.L41:
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L36
.L39:
	mov	r3, #2
	str	r3, [fp, #-12]
	b	.L36
.L40:
	mov	r3, #3
	str	r3, [fp, #-12]
	nop
.L36:
	ldr	r3, .L44+8
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	add	r3, r3, #2
	and	r3, r3, #3
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	beq	.L43
	ldr	r3, .L44+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #8]
.L43:
	nop
	ldr	r3, .L44
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L42
	bl	__stack_chk_fail
.L42:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC6
	.word	.LC5
	.word	snakeHead
	.size	handleInput, .-handleInput
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	initializeWorld, %function
initializeWorld:
	@ 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, #16
	bl	malloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L49
	str	r2, [r3]
	ldr	r3, .L49
	ldr	r3, [r3]
	mov	r2, #20
	str	r2, [r3]
	ldr	r3, .L49
	ldr	r3, [r3]
	mov	r2, #10
	str	r2, [r3, #4]
	ldr	r3, .L49
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L49
	ldr	r3, [r3]
	ldr	r2, .L49+4
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L47
.L48:
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, .L49+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	mov	r2, #20
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r2, r3, #11
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r2, #1
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r2, .L49+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L47:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L48
	bl	rand
	mov	r1, r0
	ldr	r3, .L49+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #3
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	ldr	r3, .L49+12
	str	r2, [r3]
	bl	rand
	mov	r1, r0
	ldr	r3, .L49+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #5
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #4
	sub	r2, r1, r3
	ldr	r3, .L49+12
	str	r2, [r3, #4]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	snakeHead
	.word	snakeTail
	.word	1374389535
	.word	food
	.word	1717986919
	.size	initializeWorld, .-initializeWorld
	.align	2
	.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	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L52
.L54:
	.word	.L58
	.word	.L57
	.word	.L56
	.word	.L55
	.word	.L52
.L58:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L52
.L57:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	b	.L52
.L56:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L52
.L55:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	nop
.L52:
	ldr	r3, .L62
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bne	.L59
	bl	checkFood
.L59:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	beq	.L61
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	move
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2, #8]
	str	r2, [r3, #8]
.L61:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L63:
	.align	2
.L62:
	.word	snakeHead
	.size	move, .-move
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	restoreTermios, %function
restoreTermios:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r2, .L65
	mov	r1, #2
	mov	r0, #0
	bl	tcsetattr
	nop
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	oldTermios
	.size	restoreTermios, .-restoreTermios
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
