	.file	"extr_hid-corsair.c_corsair_input_mapping.c"
	.intel_syntax noprefix
	.text
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.type	corsair_input_mapping, @function
corsair_input_mapping:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edi, DWORD PTR [rcx]
	mov	eax, DWORD PTR HID_USAGE_PAGE[rip]
	and	eax, edi
	cmp	eax, DWORD PTR HID_UP_KEYBOARD[rip]
	je	.L2
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, r9
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, r8
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rcx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	and	edi, DWORD PTR HID_USAGE[rip]
	call	corsair_usage_to_gkey@PLT
	test	eax, eax
	jne	.L17
	mov	eax, DWORD PTR 0[rbp]
	and	eax, DWORD PTR HID_USAGE[rip]
	cmp	eax, DWORD PTR CORSAIR_USAGE_SPECIAL_MIN[rip]
	jl	.L5
	cmp	eax, DWORD PTR CORSAIR_USAGE_SPECIAL_MAX[rip]
	jg	.L5
	add	eax, -128
	cmp	eax, 4
	ja	.L12
	lea	rdx, .L7[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L11-.L7
	.long	.L10-.L7
	.long	.L9-.L7
	.long	.L8-.L7
	.long	.L6-.L7
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rdx, QWORD PTR corsair_gkey_map[rip]
	cdqe
	mov	rcx, r14
	mov	rsi, rbp
	mov	r8d, DWORD PTR EV_KEY[rip]
	mov	rdi, r12
	mov	r9d, DWORD PTR -4[rdx+rax*4]
	mov	rdx, r13
	call	hid_map_usage_clear@PLT
	mov	eax, 1
	jmp	.L1
.L8:
	mov	rax, QWORD PTR corsair_profile_keycodes[rip]
	mov	rcx, r14
	mov	rdx, r13
	mov	rsi, rbp
	mov	r8d, DWORD PTR EV_KEY[rip]
	mov	rdi, r12
	mov	r9d, DWORD PTR 4[rax]
	call	hid_map_usage_clear@PLT
	mov	eax, 1
	jmp	.L1
.L9:
	mov	rax, QWORD PTR corsair_profile_keycodes[rip]
	mov	rcx, r14
	mov	rdx, r13
	mov	rsi, rbp
	mov	r8d, DWORD PTR EV_KEY[rip]
	mov	rdi, r12
	mov	r9d, DWORD PTR 8[rax]
	call	hid_map_usage_clear@PLT
	mov	eax, 1
	jmp	.L1
.L10:
	mov	rax, QWORD PTR corsair_record_keycodes[rip]
	mov	rcx, r14
	mov	rdx, r13
	mov	rsi, rbp
	mov	r8d, DWORD PTR EV_KEY[rip]
	mov	rdi, r12
	mov	r9d, DWORD PTR [rax]
	call	hid_map_usage_clear@PLT
	mov	eax, 1
	jmp	.L1
.L11:
	mov	rax, QWORD PTR corsair_record_keycodes[rip]
	mov	rcx, r14
	mov	rdx, r13
	mov	rsi, rbp
	mov	r8d, DWORD PTR EV_KEY[rip]
	mov	rdi, r12
	mov	r9d, DWORD PTR 4[rax]
	call	hid_map_usage_clear@PLT
	mov	eax, 1
	jmp	.L1
.L6:
	mov	rax, QWORD PTR corsair_profile_keycodes[rip]
	mov	rcx, r14
	mov	rdx, r13
	mov	rsi, rbp
	mov	r8d, DWORD PTR EV_KEY[rip]
	mov	rdi, r12
	mov	r9d, DWORD PTR [rax]
	call	hid_map_usage_clear@PLT
	mov	eax, 1
	jmp	.L1
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	corsair_input_mapping.cold, @function
corsair_input_mapping.cold:
.LFSB0:
.L12:
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -40
	.cfi_offset 12, -32
	.cfi_offset 13, -24
	.cfi_offset 14, -16
	or	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.text
	.size	corsair_input_mapping, .-corsair_input_mapping
	.section	.text.unlikely
	.size	corsair_input_mapping.cold, .-corsair_input_mapping.cold
.LCOLDE0:
	.text
.LHOTE0:
	.comm	corsair_record_keycodes,8,8
	.comm	corsair_profile_keycodes,8,8
	.comm	corsair_gkey_map,8,8
	.comm	HID_USAGE_PAGE,4,4
	.comm	HID_USAGE,4,4
	.comm	HID_UP_KEYBOARD,4,4
	.comm	EV_KEY,4,4
	.comm	CORSAIR_USAGE_SPECIAL_MIN,4,4
	.comm	CORSAIR_USAGE_SPECIAL_MAX,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_hid-corsair.c_corsair_input_mapping.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	corsair_input_mapping, %function
corsair_input_mapping:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r3
	ldr	r3, .L17
	ldr	r0, .L17+4
	ldr	r2, [r4]
	ldr	r3, [r3]
	ldr	r0, [r0]
	and	r3, r3, r2
	cmp	r3, r0
	sub	sp, sp, #8
	beq	.L2
.L5:
	mov	r0, #0
.L1:
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	ldr	r6, .L17+8
	mov	r5, r1
	ldr	r0, [r6]
	and	r0, r0, r2
	bl	corsair_usage_to_gkey
	cmp	r0, #0
	bne	.L16
	ldr	r3, .L17+12
	ldr	r1, [r6]
	ldr	r2, [r4]
	ldr	r3, [r3]
	and	r2, r2, r1
	cmp	r2, r3
	blt	.L5
	ldr	r3, .L17+16
	ldr	r3, [r3]
	cmp	r2, r3
	bgt	.L5
	sub	r2, r2, #128
	cmp	r2, #4
	ldrls	pc, [pc, r2, asl #2]
	b	.L12
.L7:
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L6
.L16:
	ldr	r2, .L17+20
	ldr	r3, .L17+24
	ldr	r2, [r2]
	sub	r0, r0, #-1073741823
	ldr	r2, [r2, r0, lsl #2]
	ldr	r3, [r3]
.L14:
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r1, r4
	mov	r0, r5
	ldr	r3, [sp, #28]
	ldr	r2, [sp, #24]
	bl	hid_map_usage_clear
	mov	r0, #1
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L6:
	ldr	r2, .L17+28
	ldr	r3, .L17+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r2, [r2]
	b	.L14
.L8:
	ldr	r2, .L17+28
	ldr	r3, .L17+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	b	.L14
.L9:
	ldr	r2, .L17+28
	ldr	r3, .L17+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r2, [r2, #8]
	b	.L14
.L10:
	ldr	r2, .L17+32
	ldr	r3, .L17+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r2, [r2]
	b	.L14
.L11:
	ldr	r2, .L17+32
	ldr	r3, .L17+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r2, [r2, #4]
	b	.L14
.L12:
	mvn	r0, #0
	b	.L1
.L18:
	.align	2
.L17:
	.word	HID_USAGE_PAGE
	.word	HID_UP_KEYBOARD
	.word	HID_USAGE
	.word	CORSAIR_USAGE_SPECIAL_MIN
	.word	CORSAIR_USAGE_SPECIAL_MAX
	.word	corsair_gkey_map
	.word	EV_KEY
	.word	corsair_profile_keycodes
	.word	corsair_record_keycodes
	.size	corsair_input_mapping, .-corsair_input_mapping
	.comm	corsair_record_keycodes,4,4
	.comm	corsair_profile_keycodes,4,4
	.comm	corsair_gkey_map,4,4
	.comm	HID_USAGE_PAGE,4,4
	.comm	HID_USAGE,4,4
	.comm	HID_UP_KEYBOARD,4,4
	.comm	EV_KEY,4,4
	.comm	CORSAIR_USAGE_SPECIAL_MIN,4,4
	.comm	CORSAIR_USAGE_SPECIAL_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
