	.file	"759124.c"
	.intel_syntax noprefix
	.text
	.globl	io
	.bss
	.align 8
	.type	io, @object
	.size	io, 8
io:
	.zero	8
	.globl	ioStandard
	.data
	.align 32
	.type	ioStandard, @object
	.size	ioStandard, 112
ioStandard:
	.long	23
	.long	30
	.long	24
	.long	31
	.long	27
	.long	44
	.long	22
	.long	45
	.long	16
	.long	16
	.long	7
	.long	17
	.long	21
	.long	28
	.long	26
	.long	57
	.long	12
	.long	103
	.long	5
	.long	108
	.long	19
	.long	105
	.long	20
	.long	106
	.long	6
	.long	46
	.long	-1
	.long	-1
	.globl	vulcanMask
	.section	.rodata
	.align 8
	.type	vulcanMask, @object
	.size	vulcanMask, 8
vulcanMask:
	.quad	192
	.globl	vulcanKey
	.align 4
	.type	vulcanKey, @object
	.size	vulcanKey, 4
vulcanKey:
	.long	1
	.globl	vulcanTime
	.align 4
	.type	vulcanTime, @object
	.size	vulcanTime, 4
vulcanTime:
	.long	1500
	.globl	repTime1
	.align 4
	.type	repTime1, @object
	.size	repTime1, 4
repTime1:
	.long	500
	.globl	repTime2
	.align 4
	.type	repTime2, @object
	.size	repTime2, 4
repTime2:
	.long	100
	.globl	progName
	.bss
	.align 8
	.type	progName, @object
	.size	progName, 8
progName:
	.zero	8
	.globl	sysfs_root
	.data
	.align 16
	.type	sysfs_root, @object
	.size	sysfs_root, 16
sysfs_root:
	.string	"/sys/class/gpio"
	.globl	running
	.type	running, @object
	.size	running, 1
running:
	.byte	1
	.globl	gpio
	.bss
	.align 8
	.type	gpio, @object
	.size	gpio, 8
gpio:
	.zero	8
	.globl	debounceTime
	.section	.rodata
	.align 4
	.type	debounceTime, @object
	.size	debounceTime, 4
debounceTime:
	.long	20
.LC0:
	.string	"%s/gpio%d/%s"
	.text
	.globl	pinConfig
	.type	pinConfig, @function
pinConfig:
.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, 112
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -76[rbp], eax
	mov	rcx, QWORD PTR -96[rbp]
	mov	edx, DWORD PTR -84[rbp]
	lea	rax, -64[rbp]
	mov	r8, rcx
	mov	ecx, edx
	lea	rdx, sysfs_root[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 0
	jns	.L2
	mov	eax, -1
	jmp	.L4
.L2:
	mov	eax, DWORD PTR -76[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -104[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, DWORD PTR -76[rbp]
	setne	al
	movzx	eax, al
.L4:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	pinConfig, .-pinConfig
	.section	.rodata
.LC1:
	.string	"%s/unexport"
.LC2:
	.string	"in"
.LC3:
	.string	"direction"
.LC4:
	.string	"%d"
	.text
	.globl	cleanup
	.type	cleanup, @function
cleanup:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -64[rbp]
	lea	rdx, sysfs_root[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	js	.L12
	mov	DWORD PTR -72[rbp], 0
	jmp	.L8
.L10:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	jne	.L9
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	pinConfig
.L9:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	lea	rax, -64[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	DWORD PTR -72[rbp], 1
.L8:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L10
	mov	eax, DWORD PTR -68[rbp]
	mov	edi, eax
	call	close@PLT
.L12:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	cleanup, .-cleanup
	.section	.rodata
.LC5:
	.string	"%s: %s.  Try 'sudo %s'.\n"
	.text
	.globl	err
	.type	err, @function
err:
.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	QWORD PTR -8[rbp], rdi
	mov	rcx, QWORD PTR progName[rip]
	mov	rax, QWORD PTR progName[rip]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	cleanup
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.size	err, .-err
	.globl	signalHandler
	.type	signalHandler, @function
signalHandler:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	BYTE PTR running[rip], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	signalHandler, .-signalHandler
	.type	boardType, @function
boardType:
.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, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1044[rbp], 1
	mov	eax, 1
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	boardType, .-boardType
	.section	.rodata
.LC6:
	.string	"/dev/mem"
.LC7:
	.string	"Can't open /dev/mem"
.LC8:
	.string	"Can't mmap()"
.LC9:
	.string	"%s/export"
.LC10:
	.string	"Can't open GPIO export file"
.LC11:
	.string	"0"
.LC12:
	.string	"active_low"
.LC13:
	.string	"out"
.LC14:
	.string	"value"
.LC15:
	.string	"Pin config failed (GND)"
.LC16:
	.string	"both"
.LC17:
	.string	"edge"
.LC18:
	.string	"error with %d\n"
.LC19:
	.string	"Pin config failed"
.LC20:
	.string	"%s/gpio%d/value"
.LC21:
	.string	"Can't access pin value"
.LC22:
	.string	"/dev/uinput"
.LC23:
	.string	"Can't open /dev/uinput"
.LC24:
	.string	"Can't SET_EVBIT"
.LC25:
	.string	"Can't SET_KEYBIT"
.LC26:
	.string	"retrogame"
.LC27:
	.string	"write failed"
.LC28:
	.string	"DEV_CREATE failed"
.LC29:
	.string	"Done."
	.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, 1824
	mov	DWORD PTR -1812[rbp], edi
	mov	QWORD PTR -1824[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1788[rbp], -1
	mov	DWORD PTR -1784[rbp], -1
	mov	rax, QWORD PTR -1824[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR progName[rip], rax
	lea	rsi, signalHandler[rip]
	mov	edi, 2
	call	signal@PLT
	lea	rsi, signalHandler[rip]
	mov	edi, 9
	call	signal@PLT
	lea	rax, ioStandard[rip]
	mov	QWORD PTR io[rip], rax
	call	boardType
	mov	BYTE PTR -1801[rbp], al
	cmp	BYTE PTR -1801[rbp], 0
	jne	.L19
	mov	DWORD PTR -1800[rbp], 0
	jmp	.L20
.L24:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 2
	jne	.L21
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR [rax], 0
	jmp	.L22
.L21:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 3
	jne	.L23
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR [rax], 1
	jmp	.L22
.L23:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	cmp	eax, 27
	jne	.L22
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	DWORD PTR [rax], 21
.L22:
	add	DWORD PTR -1800[rbp], 1
.L20:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L24
.L19:
	mov	esi, 1052674
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1780[rbp], eax
	cmp	DWORD PTR -1780[rbp], 0
	jns	.L25
	lea	rdi, .LC7[rip]
	call	err
.L25:
	cmp	BYTE PTR -1801[rbp], 2
	jne	.L26
	mov	edx, 1059061760
	jmp	.L27
.L26:
	mov	edx, 538968064
.L27:
	mov	eax, DWORD PTR -1780[rbp]
	mov	r9, rdx
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4096
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR gpio[rip], rax
	mov	eax, DWORD PTR -1780[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR gpio[rip]
	cmp	rax, -1
	jne	.L28
	lea	rdi, .LC8[rip]
	call	err
.L28:
	mov	DWORD PTR -1800[rbp], 0
	mov	eax, DWORD PTR -1800[rbp]
	mov	DWORD PTR -1792[rbp], eax
	jmp	.L29
.L31:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	je	.L30
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	or	DWORD PTR -1792[rbp], eax
.L30:
	add	DWORD PTR -1800[rbp], 1
.L29:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L31
	mov	rax, QWORD PTR gpio[rip]
	add	rax, 148
	mov	DWORD PTR [rax], 2
	mov	BYTE PTR -1802[rbp], -106
	nop
.L32:
	movzx	eax, BYTE PTR -1802[rbp]
	sub	eax, 1
	mov	BYTE PTR -1802[rbp], al
	test	al, al
	jne	.L32
	mov	rax, QWORD PTR gpio[rip]
	lea	rdx, 152[rax]
	mov	eax, DWORD PTR -1792[rbp]
	mov	DWORD PTR [rdx], eax
	mov	BYTE PTR -1802[rbp], -106
	nop
.L33:
	movzx	eax, BYTE PTR -1802[rbp]
	sub	eax, 1
	mov	BYTE PTR -1802[rbp], al
	test	al, al
	jne	.L33
	mov	rax, QWORD PTR gpio[rip]
	add	rax, 148
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR gpio[rip]
	add	rax, 152
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR gpio[rip]
	mov	esi, 4096
	mov	rdi, rax
	call	munmap@PLT
	lea	rax, -64[rbp]
	lea	rdx, sysfs_root[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1780[rbp], eax
	cmp	DWORD PTR -1780[rbp], 0
	jns	.L34
	lea	rdi, .LC10[rip]
	call	err
.L34:
	mov	DWORD PTR -1796[rbp], 0
	mov	eax, DWORD PTR -1796[rbp]
	mov	DWORD PTR -1800[rbp], eax
	jmp	.L35
.L43:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	lea	rax, -64[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -1780[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, .LC11[rip]
	lea	rsi, .LC12[rip]
	mov	edi, eax
	call	pinConfig
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	jne	.L36
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, .LC13[rip]
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	pinConfig
	test	eax, eax
	jne	.L37
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, .LC11[rip]
	lea	rsi, .LC14[rip]
	mov	edi, eax
	call	pinConfig
	test	eax, eax
	je	.L38
.L37:
	lea	rdi, .LC15[rip]
	call	err
	jmp	.L38
.L36:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	pinConfig
	test	eax, eax
	jne	.L39
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rdx, .LC16[rip]
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	pinConfig
	test	eax, eax
	je	.L40
.L39:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC19[rip]
	call	err
.L40:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR [rax]
	lea	rax, -64[rbp]
	mov	ecx, edx
	lea	rdx, sysfs_root[rip]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	edx, DWORD PTR -1796[rbp]
	movsx	rdx, edx
	mov	DWORD PTR -1440[rbp+rdx*8], eax
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	eax, DWORD PTR -1440[rbp+rax*8]
	test	eax, eax
	jns	.L41
	lea	rdi, .LC21[rip]
	call	err
.L41:
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	DWORD PTR -1696[rbp+rax*4], 0
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	eax, DWORD PTR -1440[rbp+rax*8]
	lea	rcx, -1803[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, 1
	jne	.L42
	movzx	eax, BYTE PTR -1803[rbp]
	cmp	al, 48
	jne	.L42
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	DWORD PTR -1696[rbp+rax*4], 1
.L42:
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	edx, DWORD PTR -1696[rbp+rax*4]
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	DWORD PTR -1568[rbp+rax*4], edx
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	WORD PTR -1436[rbp+rax*8], 2
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	WORD PTR -1434[rbp+rax*8], 0
	add	DWORD PTR -1796[rbp], 1
.L38:
	add	DWORD PTR -1800[rbp], 1
.L35:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L43
	mov	eax, DWORD PTR -1780[rbp]
	mov	edi, eax
	call	close@PLT
	mov	esi, 2049
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1780[rbp], eax
	cmp	DWORD PTR -1780[rbp], 0
	jns	.L44
	lea	rdi, .LC23[rip]
	call	err
.L44:
	mov	eax, DWORD PTR -1780[rbp]
	mov	edx, 1
	mov	esi, 1074025828
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L45
	lea	rdi, .LC24[rip]
	call	err
.L45:
	mov	DWORD PTR -1800[rbp], 0
	jmp	.L46
.L48:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	je	.L47
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	edx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -1780[rbp]
	mov	esi, 1074025829
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L47
	lea	rdi, .LC25[rip]
	call	err
.L47:
	add	DWORD PTR -1800[rbp], 1
.L46:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L48
	mov	edx, 1
	mov	eax, DWORD PTR -1780[rbp]
	mov	esi, 1074025829
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L49
	lea	rdi, .LC25[rip]
	call	err
.L49:
	lea	rax, -1184[rbp]
	mov	edx, 1116
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rax, -1184[rbp]
	lea	rdx, .LC26[rip]
	mov	esi, 80
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	WORD PTR -1104[rbp], 3
	mov	WORD PTR -1102[rbp], 1
	mov	WORD PTR -1100[rbp], 1
	mov	WORD PTR -1098[rbp], 1
	lea	rcx, -1184[rbp]
	mov	eax, DWORD PTR -1780[rbp]
	mov	edx, 1116
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L50
	lea	rdi, .LC27[rip]
	call	err
.L50:
	mov	eax, DWORD PTR -1780[rbp]
	mov	esi, 21761
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L51
	lea	rdi, .LC28[rip]
	call	err
.L51:
	lea	rax, -1760[rbp]
	mov	edx, 24
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -1744[rbp], 1
	lea	rax, -1728[rbp]
	mov	edx, 24
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -1712[rbp], 0
	mov	WORD PTR -1710[rbp], 0
	mov	DWORD PTR -1708[rbp], 0
	jmp	.L52
.L71:
	mov	eax, DWORD PTR -1796[rbp]
	movsx	rcx, eax
	mov	edx, DWORD PTR -1788[rbp]
	lea	rax, -1440[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	poll@PLT
	test	eax, eax
	jle	.L53
	mov	DWORD PTR -1800[rbp], 0
	jmp	.L54
.L58:
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	movzx	eax, WORD PTR -1434[rbp+rax*8]
	test	ax, ax
	je	.L55
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	mov	eax, DWORD PTR -1440[rbp+rax*8]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	mov	eax, DWORD PTR -1440[rbp+rax*8]
	lea	rcx, -1803[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	movzx	eax, BYTE PTR -1803[rbp]
	cmp	al, 48
	jne	.L56
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	mov	DWORD PTR -1696[rbp+rax*4], 1
	jmp	.L57
.L56:
	movzx	eax, BYTE PTR -1803[rbp]
	cmp	al, 49
	jne	.L57
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	mov	DWORD PTR -1696[rbp+rax*4], 0
.L57:
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	mov	WORD PTR -1434[rbp+rax*8], 0
.L55:
	add	DWORD PTR -1800[rbp], 1
.L54:
	mov	eax, DWORD PTR -1800[rbp]
	cmp	eax, DWORD PTR -1796[rbp]
	jl	.L58
	mov	DWORD PTR -1788[rbp], 20
	mov	BYTE PTR -1803[rbp], 0
	jmp	.L59
.L53:
	mov	eax, 20
	cmp	DWORD PTR -1788[rbp], eax
	jne	.L60
	mov	QWORD PTR -1776[rbp], 0
	mov	QWORD PTR -1768[rbp], 1
	mov	DWORD PTR -1796[rbp], 0
	mov	eax, DWORD PTR -1796[rbp]
	mov	DWORD PTR -1800[rbp], eax
	mov	eax, DWORD PTR -1800[rbp]
	mov	BYTE PTR -1803[rbp], al
	jmp	.L61
.L65:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	je	.L62
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	edx, DWORD PTR -1696[rbp+rax*4]
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	eax, DWORD PTR -1568[rbp+rax*4]
	cmp	edx, eax
	je	.L63
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	edx, DWORD PTR -1696[rbp+rax*4]
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	DWORD PTR -1568[rbp+rax*4], edx
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	mov	WORD PTR -1742[rbp], ax
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	eax, DWORD PTR -1696[rbp+rax*4]
	mov	DWORD PTR -1740[rbp], eax
	lea	rcx, -1760[rbp]
	mov	eax, DWORD PTR -1780[rbp]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	BYTE PTR -1803[rbp], 1
	mov	eax, DWORD PTR -1796[rbp]
	cdqe
	mov	eax, DWORD PTR -1696[rbp+rax*4]
	test	eax, eax
	je	.L64
	mov	eax, DWORD PTR -1800[rbp]
	mov	DWORD PTR -1784[rbp], eax
	mov	DWORD PTR -1788[rbp], 500
	jmp	.L63
.L64:
	mov	DWORD PTR -1788[rbp], -1
	mov	eax, DWORD PTR -1788[rbp]
	mov	DWORD PTR -1784[rbp], eax
.L63:
	add	DWORD PTR -1796[rbp], 1
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	mov	eax, DWORD PTR -1696[rbp+rax*4]
	test	eax, eax
	je	.L62
	mov	rax, QWORD PTR -1768[rbp]
	or	QWORD PTR -1776[rbp], rax
.L62:
	add	DWORD PTR -1800[rbp], 1
	sal	QWORD PTR -1768[rbp]
.L61:
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1800[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jns	.L65
	mov	eax, 192
	and	rax, QWORD PTR -1776[rbp]
	mov	edx, 192
	cmp	rax, rdx
	jne	.L59
	mov	DWORD PTR -1788[rbp], 1500
	jmp	.L59
.L60:
	mov	eax, 1500
	cmp	DWORD PTR -1788[rbp], eax
	jne	.L66
	mov	eax, 1
	mov	WORD PTR -1742[rbp], ax
	mov	DWORD PTR -1800[rbp], 1
	jmp	.L67
.L68:
	mov	eax, DWORD PTR -1800[rbp]
	mov	DWORD PTR -1740[rbp], eax
	lea	rcx, -1760[rbp]
	mov	eax, DWORD PTR -1780[rbp]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edi, 10000
	call	usleep@PLT
	lea	rcx, -1728[rbp]
	mov	eax, DWORD PTR -1780[rbp]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edi, 10000
	call	usleep@PLT
	sub	DWORD PTR -1800[rbp], 1
.L67:
	cmp	DWORD PTR -1800[rbp], 0
	jns	.L68
	mov	DWORD PTR -1788[rbp], -1
	mov	BYTE PTR -1803[rbp], 0
	jmp	.L59
.L66:
	cmp	DWORD PTR -1784[rbp], 0
	js	.L59
	mov	eax, 500
	cmp	DWORD PTR -1788[rbp], eax
	jne	.L69
	mov	DWORD PTR -1788[rbp], 100
	jmp	.L70
.L69:
	cmp	DWORD PTR -1788[rbp], 30
	jle	.L70
	sub	DWORD PTR -1788[rbp], 5
.L70:
	mov	BYTE PTR -1803[rbp], 1
	mov	rdx, QWORD PTR io[rip]
	mov	eax, DWORD PTR -1784[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR 4[rax]
	mov	WORD PTR -1742[rbp], ax
	mov	DWORD PTR -1740[rbp], 2
	lea	rcx, -1760[rbp]
	mov	eax, DWORD PTR -1780[rbp]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L59:
	movzx	eax, BYTE PTR -1803[rbp]
	test	al, al
	je	.L52
	lea	rcx, -1728[rbp]
	mov	eax, DWORD PTR -1780[rbp]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L52:
	movzx	eax, BYTE PTR running[rip]
	test	al, al
	jne	.L71
	mov	eax, DWORD PTR -1780[rbp]
	mov	esi, 21762
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	eax, DWORD PTR -1780[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	call	cleanup
	lea	rdi, .LC29[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L73
	call	__stack_chk_fail@PLT
.L73:
	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	"759124.c"
	.text
	.comm	io,4,4
	.global	ioStandard
	.data
	.align	2
	.type	ioStandard, %object
	.size	ioStandard, 112
ioStandard:
	.word	23
	.word	30
	.word	24
	.word	31
	.word	27
	.word	44
	.word	22
	.word	45
	.word	16
	.word	16
	.word	7
	.word	17
	.word	21
	.word	28
	.word	26
	.word	57
	.word	12
	.word	103
	.word	5
	.word	108
	.word	19
	.word	105
	.word	20
	.word	106
	.word	6
	.word	46
	.word	-1
	.word	-1
	.global	vulcanMask
	.section	.rodata
	.align	2
	.type	vulcanMask, %object
	.size	vulcanMask, 4
vulcanMask:
	.word	192
	.global	vulcanKey
	.align	2
	.type	vulcanKey, %object
	.size	vulcanKey, 4
vulcanKey:
	.word	1
	.global	vulcanTime
	.align	2
	.type	vulcanTime, %object
	.size	vulcanTime, 4
vulcanTime:
	.word	1500
	.global	repTime1
	.align	2
	.type	repTime1, %object
	.size	repTime1, 4
repTime1:
	.word	500
	.global	repTime2
	.align	2
	.type	repTime2, %object
	.size	repTime2, 4
repTime2:
	.word	100
	.comm	progName,4,4
	.global	sysfs_root
	.data
	.align	2
	.type	sysfs_root, %object
	.size	sysfs_root, 16
sysfs_root:
	.ascii	"/sys/class/gpio\000"
	.global	running
	.type	running, %object
	.size	running, 1
running:
	.byte	1
	.comm	gpio,4,4
	.global	debounceTime
	.section	.rodata
	.align	2
	.type	debounceTime, %object
	.size	debounceTime, 4
debounceTime:
	.word	20
	.align	2
.LC0:
	.ascii	"%s/gpio%d/%s\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pinConfig
	.syntax unified
	.arm
	.fpu softvfp
	.type	pinConfig, %function
pinConfig:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	str	r2, [fp, #-88]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-88]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-72]
	sub	r0, fp, #60
	ldr	r3, [fp, #-84]
	str	r3, [sp]
	ldr	r3, [fp, #-80]
	ldr	r2, .L6+4
	ldr	r1, .L6+8
	bl	sprintf
	sub	r3, fp, #60
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bge	.L2
	mvn	r3, #0
	b	.L4
.L2:
	ldr	r3, [fp, #-72]
	mov	r2, r3
	ldr	r1, [fp, #-88]
	ldr	r0, [fp, #-68]
	bl	write
	str	r0, [fp, #-64]
	ldr	r0, [fp, #-68]
	bl	close
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-72]
	cmp	r2, r3
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
.L4:
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	sysfs_root
	.word	.LC0
	.size	pinConfig, .-pinConfig
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%s/unexport\000"
	.align	2
.LC3:
	.ascii	"in\000"
	.align	2
.LC4:
	.ascii	"direction\000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cleanup
	.syntax unified
	.arm
	.fpu softvfp
	.type	cleanup, %function
cleanup:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #60
	ldr	r2, .L15+4
	ldr	r1, .L15+8
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #60
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	blt	.L14
	mov	r3, #0
	str	r3, [fp, #-68]
	b	.L10
.L12:
	ldr	r3, .L15+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmn	r3, #1
	bne	.L11
	ldr	r3, .L15+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L15+16
	ldr	r1, .L15+20
	mov	r0, r3
	bl	pinConfig
.L11:
	ldr	r3, .L15+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r3, fp, #60
	ldr	r1, .L15+24
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #60
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	write
	ldr	r3, [fp, #-68]
	add	r3, r3, #1
	str	r3, [fp, #-68]
.L10:
	ldr	r3, .L15+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-68]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L12
	ldr	r0, [fp, #-64]
	bl	close
.L14:
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC6
	.word	sysfs_root
	.word	.LC2
	.word	io
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	cleanup, .-cleanup
	.section	.rodata
	.align	2
.LC7:
	.ascii	"%s: %s.  Try 'sudo %s'.\012\000"
	.text
	.align	2
	.global	err
	.syntax unified
	.arm
	.fpu softvfp
	.type	err, %function
err:
	@ 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, .L18
	ldr	r1, [r3]
	ldr	r3, .L18
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r0, .L18+4
	bl	printf
	bl	cleanup
	mov	r0, #1
	bl	exit
.L19:
	.align	2
.L18:
	.word	progName
	.word	.LC7
	.size	err, .-err
	.align	2
	.global	signalHandler
	.syntax unified
	.arm
	.fpu softvfp
	.type	signalHandler, %function
signalHandler:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L21
	mov	r2, #0
	strb	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L22:
	.align	2
.L21:
	.word	running
	.size	signalHandler, .-signalHandler
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	boardType, %function
boardType:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-1036]
	mov	r3, #1
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC8
	.size	boardType, .-boardType
	.section	.rodata
	.align	2
.LC9:
	.ascii	"/dev/mem\000"
	.align	2
.LC10:
	.ascii	"Can't open /dev/mem\000"
	.align	2
.LC11:
	.ascii	"Can't mmap()\000"
	.align	2
.LC12:
	.ascii	"%s/export\000"
	.align	2
.LC13:
	.ascii	"Can't open GPIO export file\000"
	.align	2
.LC14:
	.ascii	"0\000"
	.align	2
.LC15:
	.ascii	"active_low\000"
	.align	2
.LC16:
	.ascii	"out\000"
	.align	2
.LC17:
	.ascii	"value\000"
	.align	2
.LC18:
	.ascii	"Pin config failed (GND)\000"
	.align	2
.LC19:
	.ascii	"both\000"
	.align	2
.LC20:
	.ascii	"edge\000"
	.align	2
.LC21:
	.ascii	"error with %d\012\000"
	.align	2
.LC22:
	.ascii	"Pin config failed\000"
	.align	2
.LC23:
	.ascii	"%s/gpio%d/value\000"
	.align	2
.LC24:
	.ascii	"Can't access pin value\000"
	.align	2
.LC25:
	.ascii	"/dev/uinput\000"
	.align	2
.LC26:
	.ascii	"Can't open /dev/uinput\000"
	.align	2
.LC27:
	.ascii	"Can't SET_EVBIT\000"
	.align	2
.LC28:
	.ascii	"Can't SET_KEYBIT\000"
	.align	2
.LC29:
	.ascii	"retrogame\000"
	.align	2
.LC30:
	.ascii	"write failed\000"
	.align	2
.LC31:
	.ascii	"DEV_CREATE failed\000"
	.align	2
.LC32:
	.ascii	"Done.\000"
	.align	2
.LC33:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1760
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1760
	sub	sp, sp, #8
	str	r0, [fp, #-1760]
	str	r1, [fp, #-1764]
	ldr	r3, .L84
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-1740]
	mvn	r3, #0
	str	r3, [fp, #-1736]
	ldr	r3, [fp, #-1764]
	ldr	r3, [r3]
	ldr	r2, .L84+4
	str	r3, [r2]
	ldr	r1, .L84+8
	mov	r0, #2
	bl	signal
	ldr	r1, .L84+8
	mov	r0, #9
	bl	signal
	ldr	r3, .L84+12
	ldr	r2, .L84+16
	str	r2, [r3]
	bl	boardType
	mov	r3, r0
	strb	r3, [fp, #-1753]
	ldrb	r3, [fp, #-1753]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L29
	mov	r3, #0
	str	r3, [fp, #-1752]
	b	.L30
.L34:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L31
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	b	.L32
.L31:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #3
	bne	.L33
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3]
	b	.L32
.L33:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #27
	bne	.L32
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #21
	str	r2, [r3]
.L32:
	ldr	r3, [fp, #-1752]
	add	r3, r3, #1
	str	r3, [fp, #-1752]
.L30:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L34
.L29:
	ldr	r1, .L84+20
	ldr	r0, .L84+24
	bl	open
	str	r0, [fp, #-1724]
	ldr	r3, [fp, #-1724]
	cmp	r3, #0
	bge	.L35
	ldr	r0, .L84+28
	bl	err
.L35:
	ldrb	r3, [fp, #-1753]	@ zero_extendqisi2
	cmp	r3, #2
	bne	.L36
	ldr	r3, .L84+32
	b	.L37
.L36:
	ldr	r3, .L84+36
.L37:
	str	r3, [sp, #4]
	ldr	r3, [fp, #-1724]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4096
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L84+40
	str	r3, [r2]
	ldr	r0, [fp, #-1724]
	bl	close
	ldr	r3, .L84+40
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L38
	ldr	r0, .L84+44
	bl	err
.L38:
	mov	r3, #0
	str	r3, [fp, #-1752]
	ldr	r3, [fp, #-1752]
	str	r3, [fp, #-1744]
	b	.L39
.L41:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L40
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #1
	lsl	r3, r2, r3
	ldr	r2, [fp, #-1744]
	orr	r3, r2, r3
	str	r3, [fp, #-1744]
.L40:
	ldr	r3, [fp, #-1752]
	add	r3, r3, #1
	str	r3, [fp, #-1752]
.L39:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L41
	ldr	r3, .L84+40
	ldr	r3, [r3]
	add	r3, r3, #148
	mov	r2, #2
	str	r2, [r3]
	mvn	r3, #105
	strb	r3, [fp, #-1754]
	nop
.L42:
	ldrb	r3, [fp, #-1754]
	and	r3, r3, #255
	sub	r3, r3, #1
	and	r3, r3, #255
	mov	r2, r3
	strb	r2, [fp, #-1754]
	cmp	r3, #0
	bne	.L42
	ldr	r3, .L84+40
	ldr	r3, [r3]
	add	r3, r3, #152
	ldr	r2, [fp, #-1744]
	str	r2, [r3]
	mvn	r3, #105
	strb	r3, [fp, #-1754]
	nop
.L43:
	ldrb	r3, [fp, #-1754]
	and	r3, r3, #255
	sub	r3, r3, #1
	and	r3, r3, #255
	mov	r2, r3
	strb	r2, [fp, #-1754]
	cmp	r3, #0
	bne	.L43
	ldr	r3, .L84+40
	ldr	r3, [r3]
	add	r3, r3, #148
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L84+40
	ldr	r3, [r3]
	add	r3, r3, #152
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L84+40
	ldr	r3, [r3]
	mov	r1, #4096
	mov	r0, r3
	bl	munmap
	sub	r3, fp, #60
	ldr	r2, .L84+48
	ldr	r1, .L84+52
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #60
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-1724]
	ldr	r3, [fp, #-1724]
	cmp	r3, #0
	bge	.L44
	ldr	r0, .L84+56
	bl	err
.L44:
	mov	r3, #0
	str	r3, [fp, #-1748]
	ldr	r3, [fp, #-1748]
	str	r3, [fp, #-1752]
	b	.L45
.L53:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [r3]
	sub	r3, fp, #60
	ldr	r1, .L84+60
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #60
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, [fp, #-1724]
	bl	write
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L84+64
	ldr	r1, .L84+68
	mov	r0, r3
	bl	pinConfig
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmn	r3, #1
	bne	.L46
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L84+72
	ldr	r1, .L84+76
	mov	r0, r3
	bl	pinConfig
	mov	r3, r0
	cmp	r3, #0
	bne	.L47
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L84+64
	ldr	r1, .L84+80
	mov	r0, r3
	bl	pinConfig
	mov	r3, r0
	cmp	r3, #0
	beq	.L48
.L47:
	ldr	r0, .L84+84
	bl	err
	b	.L48
.L46:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L84+88
	ldr	r1, .L84+76
	mov	r0, r3
	bl	pinConfig
	mov	r3, r0
	cmp	r3, #0
	bne	.L49
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, .L84+92
	ldr	r1, .L84+96
	mov	r0, r3
	bl	pinConfig
	mov	r3, r0
	cmp	r3, #0
	beq	.L50
.L49:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L84+100
	bl	printf
	ldr	r0, .L84+104
	bl	err
.L50:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r0, fp, #60
	ldr	r2, .L84+48
	ldr	r1, .L84+108
	bl	sprintf
	sub	r3, fp, #60
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r2, r0
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #3
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-1428]
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1428]
	cmp	r3, #0
	bge	.L51
	ldr	r0, .L84+112
	bl	err
.L51:
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-1684]
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r0, [r3, #-1428]
	sub	r3, fp, #1744
	sub	r3, r3, #4
	sub	r3, r3, #7
	mov	r2, #1
	mov	r1, r3
	bl	read
	mov	r3, r0
	cmp	r3, #1
	bne	.L52
	ldrb	r3, [fp, #-1755]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L52
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3, #-1684]
.L52:
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1684]
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-1556]
	sub	r3, fp, #4
	sub	r3, r3, #1424
	sub	r3, r3, #4
	ldr	r2, [fp, #-1748]
	lsl	r2, r2, #3
	add	r3, r3, r2
	add	r3, r3, #4
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #4
	sub	r3, r3, #1424
	sub	r3, r3, #4
	ldr	r2, [fp, #-1748]
	lsl	r2, r2, #3
	add	r3, r3, r2
	add	r3, r3, #6
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1748]
	add	r3, r3, #1
	str	r3, [fp, #-1748]
.L48:
	ldr	r3, [fp, #-1752]
	add	r3, r3, #1
	str	r3, [fp, #-1752]
.L45:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L53
	ldr	r0, [fp, #-1724]
	bl	close
	ldr	r1, .L84+116
	ldr	r0, .L84+120
	bl	open
	str	r0, [fp, #-1724]
	ldr	r3, [fp, #-1724]
	cmp	r3, #0
	bge	.L54
	ldr	r0, .L84+124
	bl	err
.L54:
	mov	r2, #1
	ldr	r1, .L84+128
	ldr	r0, [fp, #-1724]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L55
	ldr	r0, .L84+132
	bl	err
.L55:
	mov	r3, #0
	str	r3, [fp, #-1752]
	b	.L56
.L58:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L57
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L84+136
	ldr	r0, [fp, #-1724]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L57
	ldr	r0, .L84+140
	bl	err
.L57:
	ldr	r3, [fp, #-1752]
	add	r3, r3, #1
	str	r3, [fp, #-1752]
.L56:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L58
	mov	r3, #1
	mov	r2, r3
	ldr	r1, .L84+136
	ldr	r0, [fp, #-1724]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L59
	ldr	r0, .L84+140
	bl	err
.L59:
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L84+144
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L84+148
	mov	r1, #80
	mov	r0, r3
	bl	snprintf
	sub	r3, fp, #4
	sub	r3, r3, #1168
	sub	r3, r3, #4
	mov	r2, #3
	strh	r2, [r3, #80]	@ movhi
	sub	r3, fp, #4
	sub	r3, r3, #1168
	sub	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3, #82]	@ movhi
	sub	r3, fp, #4
	sub	r3, r3, #1168
	sub	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3, #84]	@ movhi
	sub	r3, fp, #4
	sub	r3, r3, #1168
	sub	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3, #86]	@ movhi
	sub	r3, fp, #1168
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L84+144
	mov	r1, r3
	ldr	r0, [fp, #-1724]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L60
	ldr	r0, .L84+152
	bl	err
.L60:
	ldr	r1, .L84+156
	ldr	r0, [fp, #-1724]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L61
	ldr	r0, .L84+160
	bl	err
.L61:
	sub	r3, fp, #1712
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #1712
	sub	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3, #8]	@ movhi
	sub	r3, fp, #1696
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4
	sub	r3, r3, #1696
	sub	r3, r3, #4
	mov	r2, #0
	strh	r2, [r3, #8]	@ movhi
	sub	r3, fp, #4
	sub	r3, r3, #1696
	sub	r3, r3, #4
	mov	r2, #0
	strh	r2, [r3, #10]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-1692]
	b	.L62
.L81:
	ldr	r1, [fp, #-1748]
	sub	r3, fp, #1424
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1740]
	mov	r0, r3
	bl	poll
	mov	r3, r0
	cmp	r3, #0
	ble	.L63
	mov	r3, #0
	str	r3, [fp, #-1752]
	b	.L64
.L68:
	sub	r3, fp, #4
	sub	r3, r3, #1424
	sub	r3, r3, #4
	ldr	r2, [fp, #-1752]
	lsl	r2, r2, #3
	add	r3, r3, r2
	add	r3, r3, #6
	ldrsh	r3, [r3]
	cmp	r3, #0
	beq	.L65
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1428]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	lseek
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r0, [r3, #-1428]
	sub	r3, fp, #1744
	sub	r3, r3, #4
	sub	r3, r3, #7
	mov	r2, #1
	mov	r1, r3
	bl	read
	ldrb	r3, [fp, #-1755]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L66
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #1
	str	r2, [r3, #-1684]
	b	.L67
.L66:
	ldrb	r3, [fp, #-1755]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L67
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-1684]
.L67:
	sub	r3, fp, #4
	sub	r3, r3, #1424
	sub	r3, r3, #4
	ldr	r2, [fp, #-1752]
	lsl	r2, r2, #3
	add	r3, r3, r2
	add	r3, r3, #6
	mov	r2, #0
	strh	r2, [r3]	@ movhi
.L65:
	ldr	r3, [fp, #-1752]
	add	r3, r3, #1
	str	r3, [fp, #-1752]
.L64:
	ldr	r2, [fp, #-1752]
	ldr	r3, [fp, #-1748]
	cmp	r2, r3
	blt	.L68
	mov	r3, #20
	str	r3, [fp, #-1740]
	mov	r3, #0
	strb	r3, [fp, #-1755]
	b	.L69
.L63:
	mov	r2, #20
	ldr	r3, [fp, #-1740]
	cmp	r3, r2
	bne	.L70
	mov	r3, #0
	str	r3, [fp, #-1732]
	mov	r3, #1
	str	r3, [fp, #-1728]
	mov	r3, #0
	str	r3, [fp, #-1748]
	ldr	r3, [fp, #-1748]
	str	r3, [fp, #-1752]
	ldr	r3, [fp, #-1752]
	and	r3, r3, #255
	strb	r3, [fp, #-1755]
	b	.L71
.L75:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L72
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1684]
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-1556]
	cmp	r2, r3
	beq	.L73
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-1684]
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-1556]
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	sub	r3, fp, #4
	sub	r3, r3, #1712
	sub	r3, r3, #4
	strh	r2, [r3, #10]	@ movhi
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1684]
	str	r3, [fp, #-1708]
	sub	r3, fp, #1712
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1724]
	bl	write
	mov	r3, #1
	strb	r3, [fp, #-1755]
	ldr	r3, [fp, #-1748]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1684]
	cmp	r3, #0
	beq	.L74
	ldr	r3, [fp, #-1752]
	str	r3, [fp, #-1736]
	mov	r3, #500
	str	r3, [fp, #-1740]
	b	.L73
.L74:
	mvn	r3, #0
	str	r3, [fp, #-1740]
	ldr	r3, [fp, #-1740]
	str	r3, [fp, #-1736]
.L73:
	ldr	r3, [fp, #-1748]
	add	r3, r3, #1
	str	r3, [fp, #-1748]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-1684]
	cmp	r3, #0
	beq	.L72
	ldr	r2, [fp, #-1732]
	ldr	r3, [fp, #-1728]
	orr	r3, r2, r3
	str	r3, [fp, #-1732]
.L72:
	ldr	r3, [fp, #-1752]
	add	r3, r3, #1
	str	r3, [fp, #-1752]
	ldr	r3, [fp, #-1728]
	lsl	r3, r3, #1
	str	r3, [fp, #-1728]
.L71:
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1752]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L75
	mov	r2, #192
	ldr	r3, [fp, #-1732]
	and	r3, r3, r2
	mov	r2, #192
	cmp	r3, r2
	bne	.L69
	ldr	r3, .L84+164
	str	r3, [fp, #-1740]
	b	.L69
.L70:
	ldr	r2, .L84+164
	ldr	r3, [fp, #-1740]
	cmp	r3, r2
	bne	.L76
	mov	r3, #1
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	sub	r3, fp, #4
	sub	r3, r3, #1712
	sub	r3, r3, #4
	strh	r2, [r3, #10]	@ movhi
	mov	r3, #1
	str	r3, [fp, #-1752]
	b	.L77
.L78:
	ldr	r3, [fp, #-1752]
	str	r3, [fp, #-1708]
	sub	r3, fp, #1712
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1724]
	bl	write
	ldr	r0, .L84+168
	bl	usleep
	sub	r3, fp, #1696
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1724]
	bl	write
	ldr	r0, .L84+168
	bl	usleep
	ldr	r3, [fp, #-1752]
	sub	r3, r3, #1
	str	r3, [fp, #-1752]
.L77:
	ldr	r3, [fp, #-1752]
	cmp	r3, #0
	bge	.L78
	mvn	r3, #0
	str	r3, [fp, #-1740]
	mov	r3, #0
	strb	r3, [fp, #-1755]
	b	.L69
.L76:
	ldr	r3, [fp, #-1736]
	cmp	r3, #0
	blt	.L69
	mov	r2, #500
	ldr	r3, [fp, #-1740]
	cmp	r3, r2
	bne	.L79
	mov	r3, #100
	str	r3, [fp, #-1740]
	b	.L80
.L79:
	ldr	r3, [fp, #-1740]
	cmp	r3, #30
	ble	.L80
	ldr	r3, [fp, #-1740]
	sub	r3, r3, #5
	str	r3, [fp, #-1740]
.L80:
	mov	r3, #1
	strb	r3, [fp, #-1755]
	ldr	r3, .L84+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-1736]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	sub	r3, fp, #4
	sub	r3, r3, #1712
	sub	r3, r3, #4
	strh	r2, [r3, #10]	@ movhi
	mov	r3, #2
	str	r3, [fp, #-1708]
	sub	r3, fp, #1712
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1724]
	bl	write
.L69:
	ldrb	r3, [fp, #-1755]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L62
	sub	r3, fp, #1696
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1724]
	bl	write
.L62:
	ldr	r3, .L84+172
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L81
	ldr	r1, .L84+176
	ldr	r0, [fp, #-1724]
	bl	ioctl
	ldr	r0, [fp, #-1724]
	bl	close
	bl	cleanup
	ldr	r0, .L84+180
	bl	puts
	mov	r3, #0
	ldr	r2, .L84
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L83
	bl	__stack_chk_fail
.L83:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L85:
	.align	2
.L84:
	.word	.LC33
	.word	progName
	.word	signalHandler
	.word	io
	.word	ioStandard
	.word	1052674
	.word	.LC9
	.word	.LC10
	.word	1059061760
	.word	538968064
	.word	gpio
	.word	.LC11
	.word	sysfs_root
	.word	.LC12
	.word	.LC13
	.word	.LC5
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC4
	.word	.LC17
	.word	.LC18
	.word	.LC3
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	2049
	.word	.LC25
	.word	.LC26
	.word	1074025828
	.word	.LC27
	.word	1074025829
	.word	.LC28
	.word	1116
	.word	.LC29
	.word	.LC30
	.word	21761
	.word	.LC31
	.word	1500
	.word	10000
	.word	running
	.word	21762
	.word	.LC32
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
