	.file	"extr_ati_remote2.c_ati_remote2_getkeycode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ati_remote2_getkeycode, @function
ati_remote2_getkeycode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	input_get_drvdata@PLT
	mov	rbp, rax
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR INPUT_KEYMAP_BY_INDEX[rip], eax
	je	.L2
	mov	rdi, QWORD PTR ati_remote2_key_table[rip]
	mov	r13d, DWORD PTR 4[rbx]
	call	ARRAY_SIZE@PLT
	imul	eax, DWORD PTR ATI_REMOTE2_MODES[rip]
	cmp	eax, r13d
	ja	.L3
.L11:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rdi, QWORD PTR ati_remote2_key_table[rip]
	mov	r12d, DWORD PTR 4[rbx]
	lea	r15, 4[rsp]
	call	ARRAY_SIZE@PLT
	xor	edx, edx
	mov	rdi, QWORD PTR ati_remote2_key_table[rip]
	mov	r14d, DWORD PTR 4[rbx]
	mov	r8d, eax
	mov	eax, r12d
	div	r8d
	mov	r12d, eax
	call	ARRAY_SIZE@PLT
	xor	edx, edx
	mov	rsi, QWORD PTR ati_remote2_key_table[rip]
	mov	r8d, eax
	mov	eax, r14d
	div	r8d
	mov	eax, r12d
	sal	eax, 8
	movsx	rdx, edx
	add	eax, DWORD PTR [rsi+rdx*4]
	lea	rcx, 0[0+rdx*4]
	mov	DWORD PTR 4[rsp], eax
.L5:
	mov	rax, QWORD PTR 0[rbp]
	lea	rdi, 12[rbx]
	mov	edx, 4
	mov	rsi, r15
	mov	rax, QWORD PTR [rax+r12*8]
	mov	eax, DWORD PTR [rax+rcx]
	mov	DWORD PTR 8[rbx], 4
	mov	DWORD PTR 16[rbx], eax
	call	memcpy@PLT
	mov	DWORD PTR 4[rbx], r13d
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	lea	r15, 4[rsp]
	mov	rdi, rbx
	mov	rsi, r15
	call	input_scancode_to_scalar@PLT
	test	rax, rax
	jne	.L11
	mov	edi, DWORD PTR 4[rsp]
	mov	r12d, edi
	shr	r12d, 8
	cmp	DWORD PTR ATI_REMOTE2_PC[rip], r12d
	jb	.L11
	movzx	edi, dil
	call	ati_remote2_lookup@PLT
	mov	r14d, eax
	test	eax, eax
	js	.L11
	mov	rdi, QWORD PTR ati_remote2_key_table[rip]
	call	ARRAY_SIZE@PLT
	movsx	rcx, r14d
	imul	eax, r12d
	sal	rcx, 2
	lea	r13d, [rax+r14]
	jmp	.L5
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ati_remote2_getkeycode, .-ati_remote2_getkeycode
	.comm	ati_remote2_key_table,8,8
	.comm	INPUT_KEYMAP_BY_INDEX,4,4
	.comm	EINVAL,4,4
	.comm	ATI_REMOTE2_PC,4,4
	.comm	ATI_REMOTE2_MODES,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_ati_remote2.c_ati_remote2_getkeycode.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_uidivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ati_remote2_getkeycode, %function
ati_remote2_getkeycode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r1
	ldr	r3, .L14
	sub	sp, sp, #12
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	input_get_drvdata
	ldr	r3, .L14+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	mov	r5, r0
	tst	r2, r3
	beq	.L2
	ldr	r7, .L14+8
	ldr	r8, [r4, #4]
	ldr	r0, [r7]
	bl	ARRAY_SIZE
	ldr	r3, .L14+12
	ldr	r3, [r3]
	mul	r3, r0, r3
	cmp	r3, r8
	bhi	.L3
.L11:
	ldr	r3, .L14+16
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L3:
	ldr	r0, [r7]
	ldr	r6, [r4, #4]
	bl	ARRAY_SIZE
	mov	r1, r0
	mov	r0, r6
	bl	__aeabi_uidiv
	mov	r6, r0
	ldr	r0, [r7]
	ldr	r9, [r4, #4]
	bl	ARRAY_SIZE
	mov	r1, r0
	mov	r0, r9
	bl	__aeabi_uidivmod
	ldr	r3, [r7]
	mov	r7, sp
	ldr	r3, [r3, r1, lsl #2]
	lsl	r0, r1, #2
	add	r3, r3, r6, lsl #8
	str	r3, [sp]
.L5:
	mov	r2, #4
	ldr	r3, [r5]
	mov	r1, r7
	ldr	r3, [r3, r6, lsl #2]
	ldr	r3, [r3, r0]
	str	r2, [r4, #8]
	str	r3, [r4, #16]
	add	r0, r4, #12
	bl	memcpy
	mov	r0, #0
	str	r8, [r4, #4]
	b	.L1
.L2:
	mov	r7, sp
	mov	r0, r4
	mov	r1, r7
	bl	input_scancode_to_scalar
	cmp	r0, #0
	bne	.L11
	ldr	r3, .L14+20
	ldr	r0, [sp]
	ldr	r3, [r3]
	lsr	r6, r0, #8
	cmp	r3, r0, lsr #8
	bcc	.L11
	and	r0, r0, #255
	bl	ati_remote2_lookup
	subs	r9, r0, #0
	blt	.L11
	ldr	r3, .L14+8
	ldr	r0, [r3]
	bl	ARRAY_SIZE
	mla	r8, r6, r0, r9
	lsl	r0, r9, #2
	b	.L5
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	INPUT_KEYMAP_BY_INDEX
	.word	ati_remote2_key_table
	.word	ATI_REMOTE2_MODES
	.word	EINVAL
	.word	ATI_REMOTE2_PC
	.size	ati_remote2_getkeycode, .-ati_remote2_getkeycode
	.comm	ati_remote2_key_table,4,4
	.comm	INPUT_KEYMAP_BY_INDEX,4,4
	.comm	EINVAL,4,4
	.comm	ATI_REMOTE2_PC,4,4
	.comm	ATI_REMOTE2_MODES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
