	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xenkbd_handle_key_event
_xenkbd_handle_key_event:               ## @xenkbd_handle_key_event
	.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
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	(%rsi), %r14d
	movl	4(%rsi), %edi
	movq	8(%rbx), %rax
	movl	4(%rax), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %r15
LBB0_5:
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	4(%r12), %edi
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	(%rbx), %r15
	cmpl	$0, (%r12)
	je	LBB0_5
## %bb.4:
	movl	4(%r12), %edi
	movl	(%r15), %esi
	callq	_test_bit
	testq	%rax, %rax
	movl	$2, %eax
	cmovnel	%eax, %r14d
	jmp	LBB0_5
LBB0_8:
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_input_event
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
LBB0_7:
	movl	4(%r12), %esi
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_warn                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unhandled keycode 0x%x\n"

	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.no_dead_strip	_xenkbd_handle_key_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xenkbd_handle_key_event
_xenkbd_handle_key_event:               ; @xenkbd_handle_key_event
	.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
	mov	x20, x1
	mov	x21, x0
	ldp	w19, w0, [x1]
	ldr	x8, [x21, #8]
	ldr	w1, [x8, #4]
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x21, [x21, #8]
LBB0_2:
	cmp	x21, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.3:
	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_4:
	ldr	w0, [x20, #4]
	ldr	x8, [x21]
	ldr	w1, [x8, #4]
	bl	_test_bit
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x21, [x21]
	ldr	w8, [x20]
	cbz	w8, LBB0_2
; %bb.6:
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	bl	_test_bit
	cmp	x0, #0
	mov	w8, #2
	csel	w19, w19, w8, eq
	b	LBB0_2
LBB0_7:
Lloh0:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x21
	mov	x3, x19
	bl	_input_event
	mov	x0, x21
	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
	b	_input_sync
LBB0_8:
	ldr	w1, [x20, #4]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_pr_warn
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unhandled keycode 0x%x\n"

	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.no_dead_strip	_xenkbd_handle_key_event
.subsections_via_symbols
