	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function icade_input_mapping
_icade_input_mapping:                   ## @icade_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
	movl	$-1, %ebx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.1:
	movq	%r8, %r15
	movq	%rsi, %r12
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_HID_USAGE@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_icade_find_translation
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r14
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	(%r14), %r9d
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_hid_map_usage
	movl	(%r14), %edi
	movq	(%r12), %rax
	movl	(%rax), %esi
	callq	_set_bit
	movl	$1, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- 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
	.no_dead_strip	_icade_input_mapping
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function icade_input_mapping
_icade_input_mapping:                   ; @icade_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_3
; %bb.1:
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x19, x1
Lloh6:
	adrp	x9, _HID_USAGE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HID_USAGE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_icade_find_translation
	cbz	x0, LBB0_3
; %bb.2:
	mov	x23, x0
Lloh9:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	ldr	w5, [x0]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_hid_map_usage
	ldr	w0, [x23]
	ldr	x8, [x19]
	ldr	w1, [x8]
	bl	_set_bit
	mov	w0, #1
	b	LBB0_4
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- 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
	.no_dead_strip	_icade_input_mapping
.subsections_via_symbols
