	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kbd_process_keys               ## -- Begin function kbd_process_keys
	.p2align	4, 0x90
_kbd_process_keys:                      ## @kbd_process_keys
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_xsize@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_bitstr_size
	movl	%eax, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 24(%r15)
	setne	%dil
	callq	_assert
	movq	(%r15), %rdi
	movl	(%r12), %esi
	leaq	-52(%rbp), %rdx
	callq	_bit_ffs
	leaq	16(%r15), %r13
	movq	16(%r15), %rdi
	movl	(%r12), %esi
	leaq	-56(%rbp), %rdx
	callq	_bit_ffs
	cmpl	$-1, -52(%rbp)
	movl	-56(%rbp), %esi
	je	LBB0_1
## %bb.3:
	cmpl	$-1, %esi
	je	LBB0_4
## %bb.5:
	movl	(%r12), %edi
	callq	_bitstr_size
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
	movl	-56(%rbp), %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	cmpl	%esi, %ebx
	jge	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13), %rdi
	movl	%ebx, %esi
	callq	_bit_test
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rdi
	movl	%ebx, %esi
	callq	_bit_test
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13), %rdi
	movl	%ebx, %esi
	callq	_bit_clear
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_bit_set
	jmp	LBB0_10
LBB0_11:
	movl	-52(%rbp), %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r15), %rdi
	movl	%ebx, %esi
	callq	_bit_clear
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	incl	%ebx
	movl	(%r12), %esi
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%esi, %ebx
	jge	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r15), %rdi
	movl	%ebx, %esi
	callq	_bit_test
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r13), %rdi
	movl	%ebx, %esi
	callq	_bit_test
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r13), %rdi
	movl	%ebx, %esi
	callq	_bit_set
	jmp	LBB0_17
LBB0_18:
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	callq	_bit_ffs
	movl	-56(%rbp), %esi
	testl	%esi, %esi
	jle	LBB0_20
## %bb.19:
	movl	12(%r15), %ecx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_kbd_write
	movl	-56(%rbp), %esi
	movl	8(%r15), %ecx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_uinput_kbd_write
LBB0_20:
	movq	(%r15), %rdi
	movl	(%r12), %esi
	leaq	-52(%rbp), %rdx
	callq	_bit_ffs
	movl	-52(%rbp), %esi
	testl	%esi, %esi
	jle	LBB0_24
## %bb.21:
	movq	(%r15), %rdi
	jmp	LBB0_22
LBB0_1:
	cmpl	$-1, %esi
	je	LBB0_24
## %bb.2:
	movq	16(%r15), %rdi
	movl	12(%r15), %ecx
	xorl	%edx, %edx
	callq	_kbd_write
	movq	16(%r15), %rdi
	movl	-56(%rbp), %esi
	movl	8(%r15), %ecx
	xorl	%edx, %edx
	callq	_uinput_kbd_write
	jmp	LBB0_23
LBB0_4:
	movl	$1, %edi
	callq	_assert
	movq	(%r15), %r14
	movq	16(%r15), %rbx
	movl	(%r12), %edi
	callq	_bitstr_size
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_memcpy
	movq	(%r15), %rdi
	movl	-52(%rbp), %esi
LBB0_22:
	movl	12(%r15), %ecx
	movl	$1, %edx
	callq	_kbd_write
	movq	(%r15), %rdi
	movl	-52(%rbp), %esi
	movl	8(%r15), %ecx
	movl	$1, %edx
	callq	_uinput_kbd_write
	movq	%r15, %r13
LBB0_23:
	movq	(%r13), %rbx
	movl	(%r12), %edi
	callq	_bitstr_size
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_xsize,4,2                      ## @xsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kbd_process_keys               ; -- Begin function kbd_process_keys
	.p2align	2
_kbd_process_keys:                      ; @kbd_process_keys
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x22, _xsize@GOTPAGE
Lloh4:
	ldr	x22, [x22, _xsize@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_bitstr_size
	mov	w8, w0
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	cmp	x19, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x0, [x19]
	ldr	w1, [x22]
	sub	x2, x29, #60
	bl	_bit_ffs
	mov	x23, x19
	ldr	x0, [x23, #16]!
	ldr	w1, [x22]
	sub	x2, x29, #64
	bl	_bit_ffs
	ldp	w1, w8, [x29, #-64]
	cmn	w8, #1
	b.eq	LBB0_19
; %bb.1:
	cmn	w1, #1
	b.eq	LBB0_21
; %bb.2:
	ldr	w0, [x22]
	bl	_bitstr_size
	mov	x2, x0
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldur	w21, [x29, #-64]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w21, w21, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	cmp	w21, w1
	b.ge	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x23]
	mov	x1, x21
	bl	_bit_test
	cbz	x0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19]
	mov	x1, x21
	bl	_bit_test
	cbnz	x0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x23]
	mov	x1, x21
	bl	_bit_clear
	mov	x0, x20
	mov	x1, x21
	bl	_bit_set
	b	LBB0_3
LBB0_8:
	ldur	w21, [x29, #-60]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x19]
	mov	x1, x21
	bl	_bit_clear
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w21, w21, #1
	ldr	w1, [x22]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cmp	w21, w1
	b.ge	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x19]
	mov	x1, x21
	bl	_bit_test
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x23]
	mov	x1, x21
	bl	_bit_test
	cbnz	x0, LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x23]
	mov	x1, x21
	bl	_bit_set
	b	LBB0_10
LBB0_15:
	sub	x2, x29, #64
	mov	x0, x20
	bl	_bit_ffs
	ldur	w1, [x29, #-64]
	cmp	w1, #1
	b.lt	LBB0_17
; %bb.16:
	ldr	w3, [x19, #12]
	mov	x0, x20
	mov	w2, #0
	bl	_kbd_write
	ldur	w1, [x29, #-64]
	ldr	w3, [x19, #8]
	mov	x0, x20
	mov	w2, #0
	bl	_uinput_kbd_write
LBB0_17:
	ldr	x0, [x19]
	ldr	w1, [x22]
	sub	x2, x29, #60
	bl	_bit_ffs
	ldur	w1, [x29, #-60]
	cmp	w1, #1
	b.lt	LBB0_24
; %bb.18:
	ldr	x0, [x19]
	b	LBB0_22
LBB0_19:
	cmn	w1, #1
	b.eq	LBB0_24
; %bb.20:
	ldr	x0, [x19, #16]
	ldr	w3, [x19, #12]
	mov	w2, #0
	bl	_kbd_write
	ldr	x0, [x19, #16]
	ldur	w1, [x29, #-64]
	ldr	w3, [x19, #8]
	mov	w2, #0
	bl	_uinput_kbd_write
	b	LBB0_23
LBB0_21:
	mov	w0, #1
	bl	_assert
	ldr	x20, [x19, #16]
	ldr	x21, [x19]
	ldr	w0, [x22]
	bl	_bitstr_size
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_memcpy
	ldr	x0, [x19]
	ldur	w1, [x29, #-60]
LBB0_22:
	ldr	w3, [x19, #12]
	mov	w2, #1
	bl	_kbd_write
	ldr	x0, [x19]
	ldur	w1, [x29, #-60]
	ldr	w3, [x19, #8]
	mov	w2, #1
	bl	_uinput_kbd_write
	mov	x23, x19
LBB0_23:
	ldr	x19, [x23]
	ldr	w0, [x22]
	bl	_bitstr_size
	mov	x2, x0
	mov	x0, x19
	mov	w1, #0
	bl	_memset
LBB0_24:
	ldur	x8, [x29, #-56]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	mov	w0, #0
	sub	sp, x29, #48
	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
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_xsize,4,2                      ; @xsize
.subsections_via_symbols
