	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidinput_setkeycode
_hidinput_setkeycode:                   ## @hidinput_setkeycode
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_input_get_drvdata
	xorl	%r13d, %r13d
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_hidinput_locate_usage
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_EV_KEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.3:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_7
LBB0_2:
	movq	%rbx, %rax
	addq	$8, %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	(%r15), %eax
	movl	%eax, 8(%rbx)
	movl	(%r14), %edi
	movl	(%r12), %esi
	callq	_clear_bit
	movl	8(%rbx), %edi
	movl	(%r12), %esi
	callq	_set_bit
	movl	8(%rbx), %esi
	movl	12(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	callq	_dbg_hid
	movq	_match_keycode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_hidinput_find_key
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movl	(%r14), %edi
	movl	(%r12), %esi
	callq	_set_bit
LBB0_7:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_KEY,8,3                     ## @EV_KEY
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Assigned keycode %d to HID usage code %x\n"

	.comm	_match_keycode,4,2              ## @match_keycode
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hidinput_setkeycode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidinput_setkeycode
_hidinput_setkeycode:                   ; @hidinput_setkeycode
	.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
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	bl	_input_get_drvdata
	mov	x21, x0
	mov	x1, x23
	mov	x2, #0
	bl	_hidinput_locate_usage
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _EV_KEY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EV_KEY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x10, x0, #8
Lloh3:
	adrp	x11, _KEY_RESERVED@GOTPAGE
Lloh4:
	ldr	x11, [x11, _KEY_RESERVED@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x23]
	str	w8, [x0, #8]
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_clear_bit
	ldr	w0, [x22, #8]
	ldr	w1, [x20]
	bl	_set_bit
	ldp	w1, w2, [x22, #8]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_hid
Lloh7:
	adrp	x8, _match_keycode@GOTPAGE
Lloh8:
	ldr	x8, [x8, _match_keycode@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x21
	mov	x3, #0
	bl	_hidinput_find_key
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_set_bit
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
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	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_KEY,8,3                     ; @EV_KEY
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Assigned keycode %d to HID usage code %x\n"

	.comm	_match_keycode,4,2              ; @match_keycode
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hidinput_setkeycode
.subsections_via_symbols
