	.file	"extr_in_evdev.c_in_evdev_clean_binds.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"in_evdev: ioctl failed"
	.text
	.p2align 4
	.type	in_evdev_clean_binds, @function
in_evdev_clean_binds:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	push	rbx
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	mov	QWORD PTR -72[rbp], rdx
	movsx	rdx, DWORD PTR KEY_CNT[rip]
	mov	rsi, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, rdx
	and	rax, -4
	add	rax, 15
	mov	rcx, rax
	and	rax, -4096
	sub	rsi, rax
	and	rcx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L3
.L24:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L24
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L25
.L4:
	shr	rdx, 2
	mov	r14, rsp
	xor	esi, esi
	lea	r12d, 0[0+rdx*4]
	mov	rdi, r14
	mov	edx, r12d
	call	memset@PLT
	mov	edi, DWORD PTR EV_KEY[rip]
	mov	esi, r12d
	call	EVIOCGBIT@PLT
	mov	edi, DWORD PTR 16[rbx]
	mov	rdx, r14
	mov	esi, eax
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L5:
	cmp	QWORD PTR 8[rbx], 0
	je	.L6
	cmp	QWORD PTR [rbx], 0
	jne	.L26
.L6:
	mov	ecx, DWORD PTR KEY_CNT[rip]
	xor	r12d, r12d
	xor	r14d, r14d
	test	ecx, ecx
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR IN_BINDTYPE_COUNT[rip]
	xor	r15d, r15d
	test	eax, eax
	jg	.L11
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L27:
	mov	rax, QWORD PTR -72[rbp]
	mov	DWORD PTR [rax+rbx*4], 0
	mov	DWORD PTR 0[r13+rbx*4], 0
.L10:
	add	r15d, 1
	cmp	DWORD PTR IN_BINDTYPE_COUNT[rip], r15d
	jle	.L12
.L11:
	mov	edi, r12d
	mov	esi, r15d
	call	IN_BIND_OFFS@PLT
	mov	edi, r12d
	movsx	rbx, eax
	call	KEYBITS_BIT@PLT
	test	eax, eax
	je	.L27
	mov	edx, DWORD PTR 0[r13+rbx*4]
	test	edx, edx
	je	.L10
	add	r14d, 1
	add	r15d, 1
	cmp	DWORD PTR IN_BINDTYPE_COUNT[rip], r15d
	jg	.L11
.L12:
	add	r12d, 1
	cmp	DWORD PTR KEY_CNT[rip], r12d
	jg	.L7
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L28
	lea	rsp, -40[rbp]
	mov	eax, r14d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L25:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
.L26:
	mov	edi, DWORD PTR KEY_LEFT[rip]
	call	KEYBITS_BIT_SET@PLT
	mov	edi, DWORD PTR KEY_RIGHT[rip]
	call	KEYBITS_BIT_SET@PLT
	mov	edi, DWORD PTR KEY_UP[rip]
	call	KEYBITS_BIT_SET@PLT
	mov	edi, DWORD PTR KEY_DOWN[rip]
	call	KEYBITS_BIT_SET@PLT
	jmp	.L6
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	in_evdev_clean_binds, .-in_evdev_clean_binds
	.comm	KEY_UP,4,4
	.comm	KEY_RIGHT,4,4
	.comm	KEY_LEFT,4,4
	.comm	KEY_DOWN,4,4
	.comm	KEY_CNT,4,4
	.comm	IN_BINDTYPE_COUNT,4,4
	.comm	EV_KEY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_in_evdev.c_in_evdev_clean_binds.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"in_evdev: ioctl failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	in_evdev_clean_binds, %function
in_evdev_clean_binds:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #12
	ldr	r3, .L28
	mov	r6, r0
	ldr	r4, [r3]
	mov	r5, r1
	bic	r4, r4, #3
	add	r3, r4, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r9, sp
	ldr	r3, .L28+4
	mov	r1, #0
	mov	r7, r2
	mov	r0, r9
	mov	r2, r4
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	memset
	ldr	r3, .L28+8
	mov	r1, r4
	ldr	r0, [r3]
	ldr	r4, [r6, #8]
	bl	EVIOCGBIT
	mov	r2, r9
	mov	r1, r0
	mov	r0, r4
	bl	ioctl
	cmn	r0, #1
	beq	.L25
.L2:
	ldr	r3, [r6, #4]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [r6]
	cmp	r3, #0
	bne	.L26
.L3:
	ldr	r3, .L28
	ldr	r3, [r3]
	cmp	r3, #0
	movle	r6, #0
	ble	.L1
	mov	r4, #0
	mov	r6, r4
	ldr	r10, .L28+12
.L4:
	ldr	r3, [r10]
	cmp	r3, #0
	movgt	r8, #0
	ble	.L9
.L8:
	mov	r1, r8
	mov	r0, r4
	bl	IN_BIND_OFFS
	mov	r9, r0
	mov	r0, r4
	bl	KEYBITS_BIT
	subs	r3, r0, #0
	streq	r3, [r7, r9, lsl #2]
	streq	r3, [r5, r9, lsl #2]
	beq	.L7
	ldr	r3, [r5, r9, lsl #2]
	cmp	r3, #0
	addne	r6, r6, #1
.L7:
	ldr	r3, [r10]
	add	r8, r8, #1
	cmp	r3, r8
	bgt	.L8
.L9:
	ldr	r3, .L28
	add	r4, r4, #1
	ldr	r3, [r3]
	cmp	r3, r4
	bgt	.L4
.L1:
	ldr	r3, .L28+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L27
	mov	r0, r6
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	ldr	r0, .L28+16
	bl	perror
	b	.L2
.L26:
	ldr	r3, .L28+20
	ldr	r0, [r3]
	bl	KEYBITS_BIT_SET
	ldr	r3, .L28+24
	ldr	r0, [r3]
	bl	KEYBITS_BIT_SET
	ldr	r3, .L28+28
	ldr	r0, [r3]
	bl	KEYBITS_BIT_SET
	ldr	r3, .L28+32
	ldr	r0, [r3]
	bl	KEYBITS_BIT_SET
	b	.L3
.L27:
	bl	__stack_chk_fail
.L29:
	.align	2
.L28:
	.word	KEY_CNT
	.word	.LC1
	.word	EV_KEY
	.word	IN_BINDTYPE_COUNT
	.word	.LC0
	.word	KEY_LEFT
	.word	KEY_RIGHT
	.word	KEY_UP
	.word	KEY_DOWN
	.size	in_evdev_clean_binds, .-in_evdev_clean_binds
	.comm	KEY_UP,4,4
	.comm	KEY_RIGHT,4,4
	.comm	KEY_LEFT,4,4
	.comm	KEY_DOWN,4,4
	.comm	KEY_CNT,4,4
	.comm	IN_BINDTYPE_COUNT,4,4
	.comm	EV_KEY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
