	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sparse_keymap_setkeycode
_sparse_keymap_setkeycode:              ## @sparse_keymap_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_sparse_keymap_locate
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	(%rax), %rcx
	movq	_KE_KEY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:
	movl	8(%rax), %ecx
	movl	%ecx, (%r14)
	movl	(%r15), %edi
	movl	%edi, 8(%rax)
	movl	(%r12), %esi
	callq	_set_bit
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_sparse_keymap_entry_from_keycode
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	(%r14), %edi
	movl	(%r12), %esi
	callq	_clear_bit
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KE_KEY,8,3                     ## @KE_KEY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sparse_keymap_setkeycode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sparse_keymap_setkeycode
_sparse_keymap_setkeycode:              ; @sparse_keymap_setkeycode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_sparse_keymap_locate
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _KE_KEY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KE_KEY@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	w8, [x0, #8]
	str	w8, [x19]
	ldr	w8, [x21]
	str	w8, [x0, #8]
	ldr	w1, [x20]
	mov	x0, x8
	bl	_set_bit
	ldr	w1, [x19]
	mov	x0, x20
	bl	_sparse_keymap_entry_from_keycode
	cbz	w0, LBB0_7
; %bb.4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x19]
	ldr	w1, [x20]
	bl	_clear_bit
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_KE_KEY,8,3                     ; @KE_KEY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sparse_keymap_setkeycode
.subsections_via_symbols
