	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_keyb_process
_cros_ec_keyb_process:                  ## @cros_ec_keyb_process
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	$0, 32(%rdi)
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_cros_ec_keyb_has_ghosting
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_2
## %bb.11:
	movl	24(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_2:
	cmpl	$0, (%rdi)
	jle	LBB0_10
## %bb.3:
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rbx,%r13,4), %eax
	movq	8(%rdi), %rcx
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	movslq	(%rdi), %rax
	cmpq	%rax, %r13
	jge	LBB0_10
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	cmpl	$0, 4(%rdi)
	jle	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	incl	%r12d
	cmpl	4(%rdi), %r12d
	movq	%r14, %rbx
	jge	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	28(%rdi), %edx
	movl	%r12d, %edi
	movl	%r13d, %esi
	callq	_MATRIX_SCAN_CODE
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	movl	%eax, %ecx
	movq	%rbx, %r14
	movl	(%rbx,%r13,4), %r15d
	andl	%edx, %r15d
	movq	8(%rdi), %rax
	andl	(%rax,%r13,4), %edx
	cmpl	%edx, %r15d
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	24(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %edx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	movslq	-52(%rbp), %rax                 ## 4-byte Folded Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movzwl	(%rcx,%rax,2), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_input_report_key
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_10:
	movq	16(%rdi), %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ghosting found\n"

L_.str.1:                               ## @.str.1
	.asciz	"changed: [r%d c%d]: byte %02x\n"

	.no_dead_strip	_cros_ec_keyb_process
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cros_ec_keyb_process
_cros_ec_keyb_process:                  ; @cros_ec_keyb_process
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_cros_ec_keyb_has_ghosting
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_dev_dbg
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.4:
	mov	x9, #0
	mov	w28, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x20, x22]
	ldr	x9, [x19, #8]
	str	w8, [x9, x22]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	add	x9, x9, #1
	ldrsw	x8, [x19]
	cmp	x9, x8
	b.ge	LBB0_11
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w8, [x19, #4]
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	lsl	x22, x9, #2
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w23, #0
	ldr	x24, [sp, #24]                  ; 8-byte Folded Reload
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	w23, w23, #1
	ldr	w8, [x19, #4]
	cmp	w23, w8
	b.ge	LBB0_5
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w2, [x19, #28]
	mov	x0, x23
	mov	x1, x24
	bl	_MATRIX_SCAN_CODE
	ldr	w8, [x20, x22]
	lsl	w9, w28, w23
	and	w25, w8, w9
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x22]
	and	w8, w8, w9
	cmp	w25, w8
	b.eq	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x26, x0
	ldr	x27, [x21]
	ldr	w0, [x19, #24]
	stp	x24, x25, [sp, #8]
	str	x23, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldrh	w1, [x27, w26, sxtw #1]
	mov	x0, x21
	mov	x2, x25
	bl	_input_report_key
	b	LBB0_8
LBB0_11:
	ldr	x0, [x19, #16]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_input_sync
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ghosting found\n"

l_.str.1:                               ; @.str.1
	.asciz	"changed: [r%d c%d]: byte %02x\n"

	.no_dead_strip	_cros_ec_keyb_process
.subsections_via_symbols
