	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_keyb_has_ghosting
_cros_ec_keyb_has_ghosting:             ## @cros_ec_keyb_has_ghosting
	.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, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movq	%rdi, %r13
	movq	16(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r15
	movl	$1, %r14d
	xorl	%edx, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	cmpq	%rcx, %rdx
	jge	LBB0_9
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%rdx, %rsi
	incq	%rdx
	movslq	%eax, %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15,%rsi,4), %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	andl	(%rax,%rsi,4), %ebx
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15,%r14,4), %r12d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	andl	(%rax,%r14,4), %r12d
	movl	%r12d, %edi
	andl	%ebx, %edi
	callq	_hweight8
	cmpl	$2, %eax
	jge	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	incq	%r14
	movl	8(%r13), %eax
	cmpl	%r14d, %eax
	jg	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%eax, %rcx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	movl	%r12d, %r9d
	callq	_dev_dbg
	movl	$1, %eax
	jmp	LBB0_10
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ghost found at: B[%02d]:0x%02x & B[%02d]:0x%02x"

	.no_dead_strip	_cros_ec_keyb_has_ghosting
.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_has_ghosting
_cros_ec_keyb_has_ghosting:             ; @cros_ec_keyb_has_ghosting
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	mov	x22, #0
	ldr	x19, [x0, #16]
	ldr	x26, [x0]
	mov	w27, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #1
	mov	x22, x28
	cmp	x28, x9
	b.ge	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	add	x28, x22, #1
	sxtw	x9, w8
	cmp	x28, x9
	b.ge	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	x8, x22, #2
	ldr	w9, [x20, x8]
	ldr	w8, [x26, x8]
	and	w23, w8, w9
	mov	x24, x27
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x8, x24, #2
	ldr	w9, [x20, x8]
	ldr	w8, [x26, x8]
	and	w25, w8, w9
	and	w0, w25, w23
	bl	_hweight8
	cmp	w0, #2
	b.ge	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x24, x24, #1
	ldr	w8, [x21, #8]
	cmp	w8, w24
	b.gt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	sxtw	x9, w8
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	b	LBB0_2
LBB0_8:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	mov	x5, x25
	bl	_dev_dbg
	mov	w0, #1
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ghost found at: B[%02d]:0x%02x & B[%02d]:0x%02x"

	.no_dead_strip	_cros_ec_keyb_has_ghosting
.subsections_via_symbols
