	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function corsair_input_mapping
_corsair_input_mapping:                 ## @corsair_input_mapping
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	(%rcx), %edi
	movq	_HID_USAGE_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edi, %eax
	movq	_HID_UP_KEYBOARD@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.1:
	movq	%r8, %r15
	movq	%rsi, %r12
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_HID_USAGE@GOTPCREL(%rip), %r14
	andl	(%r14), %edi
	callq	_corsair_usage_to_gkey
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	_corsair_gkey_map@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	leaq	(%rcx,%rax,4), %rax
	addq	$-4, %rax
LBB0_14:
	movq	_EV_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	(%rax), %r9d
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_hid_map_usage_clear
	movl	$1, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r14), %eax
	andl	(%r13), %eax
	movq	_CORSAIR_USAGE_SPECIAL_MIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_15
## %bb.4:
	movq	_CORSAIR_USAGE_SPECIAL_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_15
## %bb.5:
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_6
## %bb.7:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	movq	_corsair_record_keycodes@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_corsair_record_keycodes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_corsair_profile_keycodes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$8, %rax
	jmp	LBB0_14
LBB0_12:
	movq	_corsair_profile_keycodes@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rax
	addq	$4, %rax
	jmp	LBB0_14
LBB0_11:
	movq	_corsair_profile_keycodes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_14
LBB0_6:
	movl	$-1, %ebx
	jmp	LBB0_15
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_HID_USAGE_PAGE,4,2             ## @HID_USAGE_PAGE
	.comm	_HID_UP_KEYBOARD,4,2            ## @HID_UP_KEYBOARD
	.comm	_HID_USAGE,4,2                  ## @HID_USAGE
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_corsair_gkey_map,8,3           ## @corsair_gkey_map
	.comm	_CORSAIR_USAGE_SPECIAL_MIN,4,2  ## @CORSAIR_USAGE_SPECIAL_MIN
	.comm	_CORSAIR_USAGE_SPECIAL_MAX,4,2  ## @CORSAIR_USAGE_SPECIAL_MAX
	.comm	_corsair_record_keycodes,8,3    ## @corsair_record_keycodes
	.comm	_corsair_profile_keycodes,8,3   ## @corsair_profile_keycodes
	.no_dead_strip	_corsair_input_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function corsair_input_mapping
_corsair_input_mapping:                 ; @corsair_input_mapping
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x3]
Lloh0:
	adrp	x9, _HID_USAGE_PAGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HID_USAGE_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w9, w9, w8
Lloh3:
	adrp	x10, _HID_UP_KEYBOARD@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HID_UP_KEYBOARD@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
Lloh6:
	adrp	x23, _HID_USAGE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _HID_USAGE@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w0, w9, w8
	bl	_corsair_usage_to_gkey
	cbz	w0, LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _corsair_gkey_map@GOTPAGE
Lloh9:
	ldr	x8, [x8, _corsair_gkey_map@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	sub	w9, w0, #1
	add	x8, x8, w9, sxtw #2
LBB0_3:
Lloh11:
	adrp	x9, _EV_KEY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EV_KEY@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x9]
	ldr	w5, [x8]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_hid_map_usage_clear
	mov	w0, #1
	b	LBB0_6
LBB0_4:
	ldr	w8, [x21]
	ldr	w9, [x23]
	and	w8, w9, w8
Lloh14:
	adrp	x9, _CORSAIR_USAGE_SPECIAL_MIN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CORSAIR_USAGE_SPECIAL_MIN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _CORSAIR_USAGE_SPECIAL_MAX@GOTPAGE
Lloh18:
	ldr	x10, [x10, _CORSAIR_USAGE_SPECIAL_MAX@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #0, ge
	b.le	LBB0_7
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_10
; %bb.8:
Lloh20:
	adrp	x9, lJTI0_0@PAGE
Lloh21:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
Lloh22:
	adrp	x8, _corsair_record_keycodes@GOTPAGE
Lloh23:
	ldr	x8, [x8, _corsair_record_keycodes@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	mov	w0, #-1
	b	LBB0_6
LBB0_11:
Lloh24:
	adrp	x8, _corsair_record_keycodes@GOTPAGE
Lloh25:
	ldr	x8, [x8, _corsair_record_keycodes@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	b	LBB0_3
LBB0_12:
Lloh27:
	adrp	x8, _corsair_profile_keycodes@GOTPAGE
Lloh28:
	ldr	x8, [x8, _corsair_profile_keycodes@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	add	x8, x8, #8
	b	LBB0_3
LBB0_13:
Lloh30:
	adrp	x8, _corsair_profile_keycodes@GOTPAGE
Lloh31:
	ldr	x8, [x8, _corsair_profile_keycodes@GOTPAGEOFF]
LBB0_14:
	ldr	x8, [x8]
	add	x8, x8, #4
	b	LBB0_3
LBB0_15:
Lloh32:
	adrp	x8, _corsair_profile_keycodes@GOTPAGE
Lloh33:
	ldr	x8, [x8, _corsair_profile_keycodes@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
	.byte	(LBB0_15-LBB0_9)>>2
                                        ; -- End function
	.comm	_HID_USAGE_PAGE,4,2             ; @HID_USAGE_PAGE
	.comm	_HID_UP_KEYBOARD,4,2            ; @HID_UP_KEYBOARD
	.comm	_HID_USAGE,4,2                  ; @HID_USAGE
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_corsair_gkey_map,8,3           ; @corsair_gkey_map
	.comm	_CORSAIR_USAGE_SPECIAL_MIN,4,2  ; @CORSAIR_USAGE_SPECIAL_MIN
	.comm	_CORSAIR_USAGE_SPECIAL_MAX,4,2  ; @CORSAIR_USAGE_SPECIAL_MAX
	.comm	_corsair_record_keycodes,8,3    ; @corsair_record_keycodes
	.comm	_corsair_profile_keycodes,8,3   ; @corsair_profile_keycodes
	.no_dead_strip	_corsair_input_mapping
.subsections_via_symbols
