	.file	"3261883.c"
	.intel_syntax noprefix
	.text
	.local	ufds
	.comm	ufds,8,8
	.local	device_names
	.comm	device_names,8,8
	.local	nfds
	.comm	nfds,4,4
	.type	open_device, @function
open_device:
.LFB6:
	.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, 328
	.cfi_offset 3, -24
	mov	QWORD PTR -328[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -304[rbp], 1
	mov	rax, QWORD PTR -328[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], 0
	jns	.L2
	mov	eax, -1
	jmp	.L11
.L2:
	lea	rdx, -308[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	esi, 2147763457
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	je	.L4
	mov	eax, -1
	jmp	.L11
.L4:
	lea	rdx, -280[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	esi, 2148025602
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	je	.L5
	mov	eax, -1
	jmp	.L11
.L5:
	mov	BYTE PTR -193[rbp], 0
	mov	BYTE PTR -113[rbp], 0
	mov	BYTE PTR -33[rbp], 0
	lea	rdx, -272[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	esi, 2152678662
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jg	.L6
	mov	BYTE PTR -272[rbp], 0
.L6:
	lea	rdx, -192[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	esi, 2152678663
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jg	.L7
	mov	BYTE PTR -192[rbp], 0
.L7:
	lea	rdx, -112[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	esi, 2152678664
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jg	.L8
	mov	BYTE PTR -112[rbp], 0
.L8:
	lea	rdx, -304[rbp]
	mov	eax, DWORD PTR -300[rbp]
	mov	esi, 1074021792
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	eax, DWORD PTR nfds[rip]
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR ufds[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L9
	mov	eax, -1
	jmp	.L11
.L9:
	mov	rax, QWORD PTR -296[rbp]
	mov	QWORD PTR ufds[rip], rax
	mov	eax, DWORD PTR nfds[rip]
	add	eax, 1
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR device_names[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR -288[rbp], rax
	cmp	QWORD PTR -288[rbp], 0
	jne	.L10
	mov	eax, -1
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -288[rbp]
	mov	QWORD PTR device_names[rip], rax
	mov	rdx, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR nfds[rip]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	eax, DWORD PTR -300[rbp]
	mov	DWORD PTR [rdx], eax
	mov	rdx, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR nfds[rip]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	WORD PTR 4[rax], 1
	mov	rdx, QWORD PTR device_names[rip]
	mov	eax, DWORD PTR nfds[rip]
	cdqe
	sal	rax, 3
	lea	rbx, [rdx+rax]
	mov	rax, QWORD PTR -328[rbp]
	mov	rdi, rax
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR nfds[rip]
	add	eax, 1
	mov	DWORD PTR nfds[rip], eax
	mov	eax, 0
.L11:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	open_device, .-open_device
	.globl	close_device
	.type	close_device, @function
close_device:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -8[rbp], 1
	jmp	.L14
.L17:
	mov	rdx, QWORD PTR device_names[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	eax, DWORD PTR nfds[rip]
	sub	eax, DWORD PTR -8[rbp]
	sub	eax, 1
	mov	DWORD PTR -4[rbp], eax
	mov	rdx, QWORD PTR device_names[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rcx, QWORD PTR device_names[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	sal	rax, 3
	add	rcx, rax
	mov	rsi, QWORD PTR device_names[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rsi
	mov	rsi, rcx
	mov	rdi, rax
	call	memmove@PLT
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rcx, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, 1
	sal	rax, 3
	add	rcx, rax
	mov	rsi, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rsi
	mov	rsi, rcx
	mov	rdi, rax
	call	memmove@PLT
	mov	eax, DWORD PTR nfds[rip]
	sub	eax, 1
	mov	DWORD PTR nfds[rip], eax
	mov	eax, 0
	jmp	.L16
.L15:
	add	DWORD PTR -8[rbp], 1
.L14:
	mov	eax, DWORD PTR nfds[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L17
	mov	eax, -1
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	close_device, .-close_device
	.type	read_notify, @function
read_notify:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 576
	mov	QWORD PTR -4664[rbp], rdi
	mov	DWORD PTR -4668[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -4648[rbp], 0
	lea	rcx, -4624[rbp]
	mov	eax, DWORD PTR -4668[rbp]
	mov	edx, 512
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -4652[rbp], eax
	cmp	DWORD PTR -4652[rbp], 15
	jg	.L19
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L20
	mov	eax, 0
	jmp	.L26
.L20:
	mov	eax, 1
	jmp	.L26
.L19:
	mov	rdx, QWORD PTR -4664[rbp]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -4112[rbp]
	add	rax, rdx
	mov	QWORD PTR -4640[rbp], rax
	mov	rax, QWORD PTR -4640[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -4640[rbp], rdx
	mov	BYTE PTR [rax], 47
	jmp	.L22
.L25:
	mov	eax, DWORD PTR -4648[rbp]
	cdqe
	lea	rdx, -4624[rbp]
	add	rax, rdx
	mov	QWORD PTR -4632[rbp], rax
	mov	rax, QWORD PTR -4632[rbp]
	mov	eax, DWORD PTR 12[rax]
	test	eax, eax
	je	.L23
	mov	rax, QWORD PTR -4632[rbp]
	lea	rdx, 16[rax]
	mov	rax, QWORD PTR -4640[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -4632[rbp]
	mov	eax, DWORD PTR 4[rax]
	and	eax, 256
	test	eax, eax
	je	.L24
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	open_device
	jmp	.L23
.L24:
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	close_device
.L23:
	mov	rax, QWORD PTR -4632[rbp]
	mov	eax, DWORD PTR 12[rax]
	add	eax, 16
	mov	DWORD PTR -4644[rbp], eax
	mov	eax, DWORD PTR -4644[rbp]
	sub	DWORD PTR -4652[rbp], eax
	mov	eax, DWORD PTR -4644[rbp]
	add	DWORD PTR -4648[rbp], eax
.L22:
	cmp	DWORD PTR -4652[rbp], 15
	jg	.L25
	mov	eax, 0
.L26:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	read_notify, .-read_notify
	.type	scan_dir, @function
scan_dir:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 64
	mov	QWORD PTR -4152[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -4152[rbp]
	mov	rdi, rax
	call	opendir@PLT
	mov	QWORD PTR -4136[rbp], rax
	cmp	QWORD PTR -4136[rbp], 0
	jne	.L29
	mov	eax, -1
	jmp	.L35
.L29:
	mov	rdx, QWORD PTR -4152[rbp]
	lea	rax, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -4112[rbp]
	add	rax, rdx
	mov	QWORD PTR -4128[rbp], rax
	mov	rax, QWORD PTR -4128[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -4128[rbp], rdx
	mov	BYTE PTR [rax], 47
	jmp	.L31
.L34:
	mov	rax, QWORD PTR -4120[rbp]
	movzx	eax, BYTE PTR 19[rax]
	cmp	al, 46
	jne	.L32
	mov	rax, QWORD PTR -4120[rbp]
	movzx	eax, BYTE PTR 20[rax]
	test	al, al
	je	.L31
	mov	rax, QWORD PTR -4120[rbp]
	movzx	eax, BYTE PTR 20[rax]
	cmp	al, 46
	jne	.L32
	mov	rax, QWORD PTR -4120[rbp]
	movzx	eax, BYTE PTR 21[rax]
	test	al, al
	jne	.L32
	jmp	.L31
.L32:
	mov	rax, QWORD PTR -4120[rbp]
	lea	rdx, 19[rax]
	mov	rax, QWORD PTR -4128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -4112[rbp]
	mov	rdi, rax
	call	open_device
.L31:
	mov	rax, QWORD PTR -4136[rbp]
	mov	rdi, rax
	call	readdir@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	jne	.L34
	mov	rax, QWORD PTR -4136[rbp]
	mov	rdi, rax
	call	closedir@PLT
	mov	eax, 0
.L35:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	scan_dir, .-scan_dir
	.section	.rodata
.LC0:
	.string	"/dev/input"
	.text
	.globl	main_keycheck
	.type	main_keycheck, @function
main_keycheck:
.LFB10:
	.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, 88
	.cfi_offset 3, -24
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -64[rbp], 0
	lea	rax, .LC0[rip]
	mov	QWORD PTR -56[rbp], rax
	mov	DWORD PTR nfds[rip], 1
	mov	esi, 8
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR ufds[rip], rax
	mov	rbx, QWORD PTR ufds[rip]
	call	inotify_init@PLT
	mov	DWORD PTR [rbx], eax
	mov	rax, QWORD PTR ufds[rip]
	mov	WORD PTR 4[rax], 1
	mov	rax, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR [rax]
	mov	rcx, QWORD PTR -56[rbp]
	mov	edx, 768
	mov	rsi, rcx
	mov	edi, eax
	call	inotify_add_watch@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L38
	mov	eax, 1
	jmp	.L48
.L38:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	scan_dir
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 0
	jns	.L40
	mov	eax, 1
	jmp	.L48
.L40:
	mov	eax, DWORD PTR nfds[rip]
	movsx	rcx, eax
	mov	rax, QWORD PTR ufds[rip]
	mov	edx, -1
	mov	rsi, rcx
	mov	rdi, rax
	call	poll@PLT
	mov	rax, QWORD PTR ufds[rip]
	movzx	eax, WORD PTR 6[rax]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L41
	mov	rax, QWORD PTR ufds[rip]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	read_notify
.L41:
	mov	DWORD PTR -68[rbp], 1
	jmp	.L42
.L47:
	mov	rdx, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	movzx	eax, WORD PTR 6[rax]
	test	ax, ax
	je	.L43
	mov	rdx, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	movzx	eax, WORD PTR 6[rax]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L43
	mov	rdx, QWORD PTR ufds[rip]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rcx, -48[rbp]
	mov	edx, 24
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], 23
	jg	.L44
	mov	eax, 1
	jmp	.L48
.L44:
	movzx	eax, WORD PTR -30[rbp]
	cmp	ax, 114
	je	.L45
	movzx	eax, WORD PTR -30[rbp]
	cmp	ax, 115
	jne	.L46
.L45:
	movzx	eax, WORD PTR -30[rbp]
	movzx	eax, ax
	jmp	.L48
.L46:
	cmp	DWORD PTR -64[rbp], 0
	je	.L43
	sub	DWORD PTR -64[rbp], 1
	cmp	DWORD PTR -64[rbp], 0
	jne	.L43
	mov	eax, 0
	jmp	.L48
.L43:
	add	DWORD PTR -68[rbp], 1
.L42:
	mov	eax, DWORD PTR nfds[rip]
	cmp	DWORD PTR -68[rbp], eax
	jl	.L47
	jmp	.L40
.L48:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L49
	call	__stack_chk_fail@PLT
.L49:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main_keycheck, .-main_keycheck
	.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	"3261883.c"
	.text
	.local	ufds
	.comm	ufds,4,4
	.local	device_names
	.comm	device_names,4,4
	.local	nfds
	.comm	nfds,4,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_device, %function
open_device:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #284
	str	r0, [fp, #-288]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-280]
	mov	r1, #2
	ldr	r0, [fp, #-288]
	bl	open
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bge	.L2
	mvn	r3, #0
	b	.L11
.L2:
	sub	r3, fp, #284
	mov	r2, r3
	ldr	r1, .L13+4
	ldr	r0, [fp, #-276]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	mvn	r3, #0
	b	.L11
.L4:
	sub	r3, fp, #264
	mov	r2, r3
	ldr	r1, .L13+8
	ldr	r0, [fp, #-276]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	mvn	r3, #0
	b	.L11
.L5:
	mov	r3, #0
	strb	r3, [fp, #-177]
	mov	r3, #0
	strb	r3, [fp, #-97]
	mov	r3, #0
	strb	r3, [fp, #-17]
	sub	r3, fp, #256
	mov	r2, r3
	ldr	r1, .L13+12
	ldr	r0, [fp, #-276]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bgt	.L6
	mov	r3, #0
	strb	r3, [fp, #-256]
.L6:
	sub	r3, fp, #176
	mov	r2, r3
	ldr	r1, .L13+16
	ldr	r0, [fp, #-276]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bgt	.L7
	mov	r3, #0
	strb	r3, [fp, #-176]
.L7:
	sub	r3, fp, #96
	mov	r2, r3
	ldr	r1, .L13+20
	ldr	r0, [fp, #-276]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bgt	.L8
	mov	r3, #0
	strb	r3, [fp, #-96]
.L8:
	sub	r3, fp, #280
	mov	r2, r3
	ldr	r1, .L13+24
	ldr	r0, [fp, #-276]
	bl	ioctl
	ldr	r3, .L13+28
	ldr	r2, [r3]
	ldr	r3, .L13+32
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bne	.L9
	mvn	r3, #0
	b	.L11
.L9:
	ldr	r2, .L13+28
	ldr	r3, [fp, #-272]
	str	r3, [r2]
	ldr	r3, .L13+36
	ldr	r2, [r3]
	ldr	r3, .L13+32
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	bne	.L10
	mvn	r3, #0
	b	.L11
.L10:
	ldr	r2, .L13+36
	ldr	r3, [fp, #-268]
	str	r3, [r2]
	ldr	r3, .L13+28
	ldr	r2, [r3]
	ldr	r3, .L13+32
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-276]
	str	r2, [r3]
	ldr	r3, .L13+28
	ldr	r2, [r3]
	ldr	r3, .L13+32
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #1
	strh	r2, [r3, #4]	@ movhi
	ldr	r3, .L13+36
	ldr	r2, [r3]
	ldr	r3, .L13+32
	ldr	r3, [r3]
	lsl	r3, r3, #2
	add	r4, r2, r3
	ldr	r0, [fp, #-288]
	bl	strdup
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L13+32
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L13+32
	str	r3, [r2]
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.word	-2147203839
	.word	-2146941694
	.word	-2142288634
	.word	-2142288633
	.word	-2142288632
	.word	1074021792
	.word	ufds
	.word	nfds
	.word	device_names
	.size	open_device, .-open_device
	.align	2
	.global	close_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_device, %function
close_device:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L16
.L19:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r2, r3
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r0, r2, r3
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #2
	add	r1, r2, r3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	mov	r2, r3
	bl	memmove
	ldr	r3, .L20+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #3
	add	r0, r2, r3
	ldr	r3, .L20+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r1, r2, r3
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	mov	r2, r3
	bl	memmove
	ldr	r3, .L20+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L20+4
	str	r3, [r2]
	mov	r3, #0
	b	.L18
.L17:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L16:
	ldr	r3, .L20+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L19
	mvn	r3, #0
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	device_names
	.word	nfds
	.word	ufds
	.size	close_device, .-close_device
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_notify, %function
read_notify:
	@ args = 0, pretend = 0, frame = 4640
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4608
	sub	sp, sp, #36
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-540]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-544]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-532]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4608
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #512
	mov	r1, r3
	ldr	r0, [r0, #-544]
	bl	read
	str	r0, [r4, #-536]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-536]
	cmp	r3, #15
	bgt	.L23
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L24
	mov	r3, #0
	b	.L30
.L24:
	mov	r3, #1
	b	.L30
.L23:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [r2, #-540]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, r2
	str	r3, [r1, #-528]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-528]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-528]
	mov	r2, #47
	strb	r2, [r3]
	b	.L26
.L29:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-532]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4608
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, r2
	str	r3, [r1, #-524]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-524]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	beq	.L27
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-524]
	add	r3, r3, #16
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r3
	ldr	r0, [r2, #-528]
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-524]
	ldr	r3, [r3, #4]
	and	r3, r3, #256
	cmp	r3, #0
	beq	.L28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	open_device
	b	.L27
.L28:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	close_device
.L27:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-524]
	ldr	r3, [r3, #12]
	add	r3, r3, #16
	sub	r2, fp, #4096
	sub	r2, r2, #12
	str	r3, [r2, #-520]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-536]
	ldr	r3, [r3, #-520]
	sub	r3, r2, r3
	str	r3, [r1, #-536]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-532]
	ldr	r3, [r3, #-520]
	add	r3, r2, r3
	str	r3, [r1, #-532]
.L26:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-536]
	cmp	r3, #15
	bgt	.L29
	mov	r3, #0
.L30:
	ldr	r2, .L32
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC1
	.size	read_notify, .-read_notify
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scan_dir, %function
scan_dir:
	@ args = 0, pretend = 0, frame = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	ldr	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-20]
	bl	opendir
	str	r0, [r4, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L35
	mvn	r3, #0
	b	.L41
.L35:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [r2, #-20]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, r2
	str	r3, [r1, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-12]
	mov	r2, #47
	strb	r2, [r3]
	b	.L37
.L40:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	ldrb	r3, [r3, #11]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L38
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L37
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	ldrb	r3, [r3, #12]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L38
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	ldrb	r3, [r3, #13]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L38
	b	.L37
.L38:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	add	r3, r3, #11
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r3
	ldr	r0, [r2, #-12]
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	open_device
.L37:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	readdir
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bne	.L40
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	closedir
	mov	r3, #0
.L41:
	ldr	r2, .L43
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L42
	bl	__stack_chk_fail
.L42:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC2
	.size	scan_dir, .-scan_dir
	.section	.rodata
	.align	2
.LC3:
	.ascii	"/dev/input\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main_keycheck
	.syntax unified
	.arm
	.fpu softvfp
	.type	main_keycheck, %function
main_keycheck:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-44]
	ldr	r3, .L58+4
	str	r3, [fp, #-40]
	ldr	r3, .L58+8
	mov	r2, #1
	str	r2, [r3]
	mov	r1, #8
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L58+12
	str	r2, [r3]
	ldr	r3, .L58+12
	ldr	r4, [r3]
	bl	inotify_init
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L58+12
	ldr	r3, [r3]
	mov	r2, #1
	strh	r2, [r3, #4]	@ movhi
	ldr	r3, .L58+12
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r2, #768
	ldr	r1, [fp, #-40]
	mov	r0, r3
	bl	inotify_add_watch
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bge	.L46
	mov	r3, #1
	b	.L56
.L46:
	ldr	r0, [fp, #-40]
	bl	scan_dir
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bge	.L48
	mov	r3, #1
	b	.L56
.L48:
	ldr	r3, .L58+12
	ldr	r3, [r3]
	ldr	r2, .L58+8
	ldr	r2, [r2]
	mov	r1, r2
	mvn	r2, #0
	mov	r0, r3
	bl	poll
	ldr	r3, .L58+12
	ldr	r3, [r3]
	ldrsh	r3, [r3, #6]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L49
	ldr	r3, .L58+12
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	read_notify
.L49:
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L50
.L55:
	ldr	r3, .L58+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrsh	r3, [r3, #6]
	cmp	r3, #0
	beq	.L51
	ldr	r3, .L58+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldrsh	r3, [r3, #6]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L51
	ldr	r3, .L58+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r1, fp, #32
	mov	r2, #16
	mov	r0, r3
	bl	read
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #15
	bgt	.L52
	mov	r3, #1
	b	.L56
.L52:
	ldrh	r3, [fp, #-22]
	cmp	r3, #114
	beq	.L53
	ldrh	r3, [fp, #-22]
	cmp	r3, #115
	bne	.L54
.L53:
	ldrh	r3, [fp, #-22]
	b	.L56
.L54:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L51
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bne	.L51
	mov	r3, #0
	b	.L56
.L51:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L50:
	ldr	r3, .L58+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	blt	.L55
	b	.L48
.L56:
	ldr	r2, .L58
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L57
	bl	__stack_chk_fail
.L57:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC4
	.word	.LC3
	.word	nfds
	.word	ufds
	.size	main_keycheck, .-main_keycheck
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
