	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dc_scan_kbd
_dc_scan_kbd:                           ## @dc_scan_kbd
	.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	%rdi, %r12
	movq	24(%rdi), %r13
	xorl	%ebx, %ebx
	movq	_MSC_SCAN@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	896(%rax,%rbx,4), %r15d
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rcx, %r14
	movl	(%rcx), %edx
	leal	224(%rbx), %ecx
	movq	%r13, %rdi
	callq	_input_event
	movq	8(%r12), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	btl	%ebx, %eax
	setb	%dl
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_input_report_key
	movq	%r14, %rcx
	incq	%rbx
	cmpq	$8, %rbx
	jne	LBB0_1
## %bb.2:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	$2, %r15d
	jmp	LBB0_3
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%ecx, %edx
	callq	_dev_dbg
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	cmpq	$8, %r15
	je	LBB0_14
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	movq	16(%r12), %rax
	addq	$8, %rdi
	movl	(%rax,%r15,4), %esi
	movl	$6, %edx
	callq	_memchr
	movq	16(%r12), %rcx
	movl	(%rcx,%r15,4), %ecx
	cmpl	$4, %ecx
	jl	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rcx,4), %r13d
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_input_event
	movq	%rbx, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_input_report_key
	jmp	LBB0_8
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	callq	_dev_dbg
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rax
	movq	16(%r12), %rdi
	addq	$8, %rdi
	movl	(%rax,%r15,4), %esi
	movl	$6, %edx
	callq	_memchr
	movq	8(%r12), %rcx
	movl	(%rcx,%r15,4), %ecx
	cmpl	$4, %ecx
	jl	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rax
	movl	(%rax,%rcx,4), %r13d
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_input_event
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	$1, %edx
	callq	_input_report_key
	jmp	LBB0_13
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_sync
	movq	8(%r12), %rsi
	movq	16(%r12), %rdi
	movl	$8, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown key (scancode %#x) released."

L_.str.1:                               ## @.str.1
	.asciz	"Unknown key (scancode %#x) pressed."

	.no_dead_strip	_dc_scan_kbd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dc_scan_kbd
_dc_scan_kbd:                           ; @dc_scan_kbd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	x22, #0
	ldr	x20, [x0, #24]
Lloh0:
	adrp	x24, _EV_MSC@GOTPAGE
Lloh1:
	ldr	x24, [x24, _EV_MSC@GOTPAGEOFF]
Lloh2:
	adrp	x25, _MSC_SCAN@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MSC_SCAN@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x8, x8, x22, lsl #2
	ldr	w21, [x8, #896]
	ldr	w1, [x24]
	ldr	w2, [x25]
	add	w3, w22, #224
	mov	x0, x20
	bl	_input_event
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	lsr	w8, w8, w22
	and	w2, w8, #0x1
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_key
	add	x22, x22, #1
	cmp	x22, #8
	b.ne	LBB0_1
; %bb.2:
	mov	w26, #8
Lloh4:
	adrp	x21, l_.str.1@PAGE
Lloh5:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x3
	bl	_dev_dbg
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x26, #4
	cmp	x26, #32
	b.eq	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19, #8]
	add	x0, x8, #8
	ldr	w1, [x9, x26]
	mov	w2, #6
	bl	_memchr
	ldr	x8, [x19, #16]
	ldr	w3, [x8, x26]
	cmp	w3, #4
	ccmp	x0, #0, #0, ge
	b.ne	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldr	w23, [x8, x3, lsl #2]
	cbz	w23, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	x0, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_input_event
	mov	x0, x20
	mov	x1, x23
	mov	w2, #0
	bl	_input_report_key
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x22
	mov	x2, x3
	bl	_dev_dbg
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	x9, x8, [x19, #8]
	add	x0, x8, #8
	ldr	w1, [x9, x26]
	mov	w2, #6
	bl	_memchr
	ldr	x8, [x19, #8]
	ldr	w3, [x8, x26]
	cmp	w3, #4
	ccmp	x0, #0, #4, ge
	b.eq	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldr	w23, [x8, x3, lsl #2]
	cbz	w23, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	x0, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_input_event
	mov	x0, x20
	mov	x1, x23
	mov	w2, #1
	bl	_input_report_key
	b	LBB0_4
LBB0_12:
	mov	x0, x20
	bl	_input_sync
	ldp	x1, x0, [x19, #8]
	mov	w2, #8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_memcpy
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown key (scancode %#x) released."

l_.str.1:                               ; @.str.1
	.asciz	"Unknown key (scancode %#x) pressed."

	.no_dead_strip	_dc_scan_kbd
.subsections_via_symbols
