	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidinput_getkeycode
_hidinput_getkeycode:                   ## @hidinput_getkeycode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	callq	_input_get_drvdata
	leaq	-12(%rbp), %rdx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_hidinput_locate_usage
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	(%rax), %rcx
	movq	_EV_KEY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_2
## %bb.3:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movq	%rax, %rcx
	addq	$12, %rcx
LBB0_4:
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rbx)
	movl	-12(%rbp), %ecx
	movl	%ecx, (%rbx)
	movq	_HID_USAGE_PAGE@GOTPCREL(%rip), %rcx
	movq	_HID_USAGE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	andl	8(%rax), %edx
	movl	%edx, -16(%rbp)
	movl	$4, 4(%rbx)
	movl	8(%rbx), %edi
	leaq	-16(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_KEY,8,3                     ## @EV_KEY
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.comm	_HID_USAGE_PAGE,4,2             ## @HID_USAGE_PAGE
	.comm	_HID_USAGE,4,2                  ## @HID_USAGE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hidinput_getkeycode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidinput_getkeycode
_hidinput_getkeycode:                   ; @hidinput_getkeycode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_input_get_drvdata
	add	x2, sp, #8
	mov	x1, x19
	bl	_hidinput_locate_usage
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	x8, [x8]
	add	x10, x0, #12
Lloh3:
	adrp	x11, _KEY_RESERVED@GOTPAGE
Lloh4:
	ldr	x11, [x11, _KEY_RESERVED@GOTPAGEOFF]
	cmp	x9, x8
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	w8, [sp, #8]
Lloh5:
	adrp	x9, _HID_USAGE_PAGE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HID_USAGE_PAGE@GOTPAGEOFF]
	ldr	w10, [x0, #8]
	mov	w11, #4
	str	w8, [x19]
Lloh7:
	ldr	w8, [x9]
Lloh8:
	adrp	x9, _HID_USAGE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HID_USAGE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w10
	str	w8, [sp, #12]
	str	w11, [x19, #4]
	ldr	w0, [x19, #8]
	add	x1, sp, #12
	mov	w2, #4
	bl	_memcpy
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_KEY,8,3                     ; @EV_KEY
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.comm	_HID_USAGE_PAGE,4,2             ; @HID_USAGE_PAGE
	.comm	_HID_USAGE,4,2                  ; @HID_USAGE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hidinput_getkeycode
.subsections_via_symbols
