	.file	"717711.c"
	.intel_syntax noprefix
	.text
	.globl	grid
	.bss
	.align 32
	.type	grid, @object
	.size	grid, 49152
grid:
	.zero	49152
	.globl	cpuX
	.align 4
	.type	cpuX, @object
	.size	cpuX, 4
cpuX:
	.zero	4
	.globl	cpuY
	.align 4
	.type	cpuY, @object
	.size	cpuY, 4
cpuY:
	.zero	4
	.globl	playerX
	.align 4
	.type	playerX, @object
	.size	playerX, 4
playerX:
	.zero	4
	.globl	playerY
	.align 4
	.type	playerY, @object
	.size	playerY, 4
playerY:
	.zero	4
	.globl	cpuDir
	.align 4
	.type	cpuDir, @object
	.size	cpuDir, 4
cpuDir:
	.zero	4
	.globl	playerDir
	.align 4
	.type	playerDir, @object
	.size	playerDir, 4
playerDir:
	.zero	4
	.globl	x
	.align 8
	.type	x, @object
	.size	x, 8
x:
	.zero	8
	.globl	progress
	.align 4
	.type	progress, @object
	.size	progress, 4
progress:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Tron"
.LC1:
	.string	"Navigate your"
.LC2:
	.string	"lightcycle and avoid"
.LC3:
	.string	"touching the paths"
.LC4:
	.string	"First player to be"
.LC5:
	.string	"trapped by a trail"
.LC6:
	.string	"will be derezzed-lose"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 8
	.cfi_offset 3, -24
	call	LEDBARInit@PLT
	call	DIPSWInit@PLT
	call	PBSwInit@PLT
	call	RGB_LEDInit@PLT
	call	sysTickInit@PLT
	mov	edi, 1000000
	call	RIT128x96x4Init@PLT
	call	RGB_LEDInit@PLT
	call	potentiometersInit@PLT
	call	RIT128x96x4Clear@PLT
	jmp	.L2
.L6:
	mov	eax, DWORD PTR progress[rip]
	test	eax, eax
	jne	.L3
	mov	edi, 1
	call	read_PBSwitchNum@PLT
	test	eax, eax
	jne	.L3
	mov	edi, 2
	call	read_PBSwitchNum@PLT
	test	eax, eax
	jne	.L3
	mov	edi, 3
	call	read_PBSwitchNum@PLT
	test	eax, eax
	je	.L4
.L3:
	mov	eax, 1
	jmp	.L5
.L4:
	mov	eax, 0
.L5:
	mov	DWORD PTR progress[rip], eax
	mov	ecx, 15
	mov	edx, 64
	mov	esi, 100
	lea	rdi, .LC0[rip]
	call	RIT128x96x4StringDraw@PLT
.L2:
	mov	eax, DWORD PTR progress[rip]
	test	eax, eax
	je	.L6
	mov	DWORD PTR progress[rip], 0
	jmp	.L7
.L11:
	mov	eax, DWORD PTR progress[rip]
	test	eax, eax
	jne	.L8
	mov	edi, 1
	call	read_PBSwitchNum@PLT
	test	eax, eax
	jne	.L8
	mov	edi, 2
	call	read_PBSwitchNum@PLT
	test	eax, eax
	jne	.L8
	mov	edi, 3
	call	read_PBSwitchNum@PLT
	test	eax, eax
	je	.L9
.L8:
	mov	eax, 1
	jmp	.L10
.L9:
	mov	eax, 0
.L10:
	mov	DWORD PTR progress[rip], eax
	mov	ecx, 15
	mov	edx, 0
	mov	esi, 0
	lea	rdi, .LC1[rip]
	call	RIT128x96x4StringDraw@PLT
	mov	ecx, 15
	mov	edx, 8
	mov	esi, 0
	lea	rdi, .LC2[rip]
	call	RIT128x96x4StringDraw@PLT
	mov	ecx, 15
	mov	edx, 16
	mov	esi, 0
	lea	rdi, .LC3[rip]
	call	RIT128x96x4StringDraw@PLT
	mov	ecx, 15
	mov	edx, 24
	mov	esi, 0
	lea	rdi, .LC4[rip]
	call	RIT128x96x4StringDraw@PLT
	mov	ecx, 15
	mov	edx, 32
	mov	esi, 0
	lea	rdi, .LC5[rip]
	call	RIT128x96x4StringDraw@PLT
	mov	ecx, 15
	mov	edx, 40
	mov	esi, 0
	lea	rdi, .LC6[rip]
	call	RIT128x96x4StringDraw@PLT
.L7:
	mov	eax, DWORD PTR progress[rip]
	test	eax, eax
	je	.L11
	mov	DWORD PTR progress[rip], 0
	mov	DWORD PTR cpuX[rip], 0
	mov	DWORD PTR cpuY[rip], 48
	mov	DWORD PTR playerX[rip], 239
	mov	DWORD PTR playerY[rip], 48
	mov	DWORD PTR cpuDir[rip], 2
	mov	DWORD PTR playerDir[rip], 0
	jmp	.L12
.L13:
	mov	edi, 100
	call	sysTickWait1mS@PLT
	mov	ebx, DWORD PTR playerDir[rip]
	mov	edi, 1
	call	read_PBSwitchNum@PLT
	mov	edx, eax
	mov	eax, ebx
	sub	eax, edx
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	mov	DWORD PTR playerDir[rip], eax
	mov	edi, 3
	call	read_PBSwitchNum@PLT
	mov	edx, DWORD PTR playerDir[rip]
	add	eax, edx
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	mov	DWORD PTR playerDir[rip], eax
.L12:
	mov	eax, DWORD PTR progress[rip]
	test	eax, eax
	je	.L13
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"717711.c"
	.text
	.comm	grid,49152,4
	.comm	cpuX,4,4
	.comm	cpuY,4,4
	.comm	playerX,4,4
	.comm	playerY,4,4
	.comm	cpuDir,4,4
	.comm	playerDir,4,4
	.comm	x,4,4
	.global	progress
	.bss
	.align	2
	.type	progress, %object
	.size	progress, 4
progress:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Tron\000"
	.align	2
.LC1:
	.ascii	"Navigate your\000"
	.align	2
.LC2:
	.ascii	"lightcycle and avoid\000"
	.align	2
.LC3:
	.ascii	"touching the paths\000"
	.align	2
.LC4:
	.ascii	"First player to be\000"
	.align	2
.LC5:
	.ascii	"trapped by a trail\000"
	.align	2
.LC6:
	.ascii	"will be derezzed-lose\000"
	.text
	.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	{r4, r5, fp, lr}
	add	fp, sp, #12
	bl	LEDBARInit
	bl	DIPSWInit
	bl	PBSwInit
	bl	RGB_LEDInit
	bl	sysTickInit
	ldr	r0, .L15
	bl	RIT128x96x4Init
	bl	RGB_LEDInit
	bl	potentiometersInit
	bl	RIT128x96x4Clear
	b	.L2
.L6:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L3
	mov	r0, #1
	bl	read_PBSwitchNum
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	mov	r0, #2
	bl	read_PBSwitchNum
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	mov	r0, #3
	bl	read_PBSwitchNum
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
.L3:
	mov	r3, #1
	b	.L5
.L4:
	mov	r3, #0
.L5:
	ldr	r2, .L15+4
	str	r3, [r2]
	mov	r3, #15
	mov	r2, #64
	mov	r1, #100
	ldr	r0, .L15+8
	bl	RIT128x96x4StringDraw
.L2:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L15+4
	mov	r2, #0
	str	r2, [r3]
	b	.L7
.L11:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	mov	r0, #1
	bl	read_PBSwitchNum
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	mov	r0, #2
	bl	read_PBSwitchNum
	mov	r3, r0
	cmp	r3, #0
	bne	.L8
	mov	r0, #3
	bl	read_PBSwitchNum
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
.L8:
	mov	r3, #1
	b	.L10
.L9:
	mov	r3, #0
.L10:
	ldr	r2, .L15+4
	str	r3, [r2]
	mov	r3, #15
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L15+12
	bl	RIT128x96x4StringDraw
	mov	r3, #15
	mov	r2, #8
	mov	r1, #0
	ldr	r0, .L15+16
	bl	RIT128x96x4StringDraw
	mov	r3, #15
	mov	r2, #16
	mov	r1, #0
	ldr	r0, .L15+20
	bl	RIT128x96x4StringDraw
	mov	r3, #15
	mov	r2, #24
	mov	r1, #0
	ldr	r0, .L15+24
	bl	RIT128x96x4StringDraw
	mov	r3, #15
	mov	r2, #32
	mov	r1, #0
	ldr	r0, .L15+28
	bl	RIT128x96x4StringDraw
	mov	r3, #15
	mov	r2, #40
	mov	r1, #0
	ldr	r0, .L15+32
	bl	RIT128x96x4StringDraw
.L7:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L11
	ldr	r3, .L15+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L15+36
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L15+40
	mov	r2, #48
	str	r2, [r3]
	ldr	r3, .L15+44
	mov	r2, #239
	str	r2, [r3]
	ldr	r3, .L15+48
	mov	r2, #48
	str	r2, [r3]
	ldr	r3, .L15+52
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, .L15+56
	mov	r2, #0
	str	r2, [r3]
	b	.L12
.L13:
	mov	r0, #100
	bl	sysTickWait1mS
	ldr	r3, .L15+56
	ldr	r4, [r3]
	mov	r0, #1
	bl	read_PBSwitchNum
	mov	r3, r0
	sub	r3, r4, r3
	rsbs	r2, r3, #0
	and	r3, r3, #3
	and	r2, r2, #3
	rsbpl	r3, r2, #0
	ldr	r2, .L15+56
	str	r3, [r2]
	mov	r0, #3
	bl	read_PBSwitchNum
	mov	r2, r0
	ldr	r3, .L15+56
	ldr	r3, [r3]
	add	r3, r2, r3
	rsbs	r2, r3, #0
	and	r3, r3, #3
	and	r2, r2, #3
	rsbpl	r3, r2, #0
	ldr	r2, .L15+56
	str	r3, [r2]
.L12:
	ldr	r3, .L15+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L13
	mov	r3, #0
	mov	r0, r3
	pop	{r4, r5, fp, pc}
.L16:
	.align	2
.L15:
	.word	1000000
	.word	progress
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	cpuX
	.word	cpuY
	.word	playerX
	.word	playerY
	.word	cpuDir
	.word	playerDir
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
