	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _kbd_thread_func
__kbd_thread_func:                      ## @_kbd_thread_func
	.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	__kbd_thread_quit@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_1
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_KBD_THREAD_KBD_SCAN_INTERVAL@GOTPCREL(%rip), %r15
	movq	_KBD_THREAD_UDELAY@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	xorl	%eax, %eax
	callq	_USBKeyboard_Scan
	movl	(%r12), %edi
	callq	_usleep
	cmpl	$0, (%r14)
	jne	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	cltd
	idivl	(%r15)
	testl	%edx, %edx
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_USBKeyboard_IsConnected
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	__kbd_scan_for_keyboard
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	__kbd_thread_quit,4,2           ## @_kbd_thread_quit
	.comm	_KBD_THREAD_KBD_SCAN_INTERVAL,4,2 ## @KBD_THREAD_KBD_SCAN_INTERVAL
	.comm	_KBD_THREAD_UDELAY,4,2          ## @KBD_THREAD_UDELAY
	.no_dead_strip	__kbd_thread_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _kbd_thread_func
__kbd_thread_func:                      ; @_kbd_thread_func
	.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
Lloh0:
	adrp	x19, __kbd_thread_quit@GOTPAGE
Lloh1:
	ldr	x19, [x19, __kbd_thread_quit@GOTPAGEOFF]
	ldr	w8, [x19]
	cbz	w8, LBB0_2
LBB0_1:
	mov	x0, #0
	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_2:
	mov	w22, #0
Lloh2:
	adrp	x20, _KBD_THREAD_KBD_SCAN_INTERVAL@GOTPAGE
Lloh3:
	ldr	x20, [x20, _KBD_THREAD_KBD_SCAN_INTERVAL@GOTPAGEOFF]
Lloh4:
	adrp	x21, _KBD_THREAD_UDELAY@GOTPAGE
Lloh5:
	ldr	x21, [x21, _KBD_THREAD_UDELAY@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w22, #0
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	bl	_USBKeyboard_Scan
	ldr	w0, [x21]
	bl	_usleep
	ldr	w8, [x19]
	cbnz	w8, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	sdiv	w9, w22, w8
	msub	w8, w9, w8, w22
	cbnz	w8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_USBKeyboard_IsConnected
	cbnz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	__kbd_scan_for_keyboard
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	__kbd_thread_quit,4,2           ; @_kbd_thread_quit
	.comm	_KBD_THREAD_KBD_SCAN_INTERVAL,4,2 ; @KBD_THREAD_KBD_SCAN_INTERVAL
	.comm	_KBD_THREAD_UDELAY,4,2          ; @KBD_THREAD_UDELAY
	.no_dead_strip	__kbd_thread_func
.subsections_via_symbols
