	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_keyb_compute_valid_keys
_cros_ec_keyb_compute_valid_keys:       ## @cros_ec_keyb_compute_valid_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %r14d
	movq	32(%rdi), %rax
	movq	(%rax), %r12
	xorl	%edi, %edi
	cmpl	$2, 8(%rax)
	setne	%dil
	callq	_BUG_ON
	cmpl	$0, 4(%r15)
	jle	LBB0_9
## %bb.1:
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%r15), %edi
	movq	16(%r15), %rax
	movl	(%rax,%r13,4), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_dbg
	incq	%r13
	movslq	4(%r15), %rax
	cmpq	%rax, %r13
	jge	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, 8(%r15)
	jle	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	incl	%ebx
	cmpl	8(%r15), %ebx
	jge	LBB0_8
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_MATRIX_SCAN_CODE
	movzwl	(%r12,%rax,2), %eax
	testw	%ax, %ax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_KEY_BATTERY@GOTPCREL(%rip), %rcx
	cmpw	(%rcx), %ax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	$1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	movq	16(%r15), %rcx
	orl	%eax, (%rcx,%r13,4)
	jmp	LBB0_7
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KEY_BATTERY,2,1                ## @KEY_BATTERY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"valid_keys[%02d] = 0x%02x\n"

	.no_dead_strip	_cros_ec_keyb_compute_valid_keys
.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_compute_valid_keys
_cros_ec_keyb_compute_valid_keys:       ; @cros_ec_keyb_compute_valid_keys
	.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
	ldr	w20, [x0]
	ldr	x8, [x0, #32]
	ldr	x24, [x8]
	ldr	w8, [x8, #8]
	cmp	w8, #2
	cset	w0, ne
	bl	_BUG_ON
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x21, #0
Lloh0:
	adrp	x25, _KEY_BATTERY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _KEY_BATTERY@GOTPAGEOFF]
	mov	w26, #1
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	w3, [x8, x21, lsl #2]
	mov	x1, x22
	mov	x2, x21
	bl	_dev_dbg
	add	x21, x21, #1
	ldrsw	x8, [x19, #4]
	cmp	x21, x8
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w23, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w23, w23, #1
	ldr	w8, [x19, #8]
	cmp	w23, w8
	b.ge	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_MATRIX_SCAN_CODE
	ldrh	w8, [x24, x0, lsl #1]
	ldrh	w9, [x25]
	cmp	w8, #0
	ccmp	w8, w9, #4, ne
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	lsl	w8, w26, w23
	ldr	x9, [x19, #16]
	lsl	x10, x21, #2
	ldr	w11, [x9, x10]
	orr	w8, w11, w8
	str	w8, [x9, x10]
	b	LBB0_5
LBB0_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
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_KEY_BATTERY,2,1                ; @KEY_BATTERY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"valid_keys[%02d] = 0x%02x\n"

	.no_dead_strip	_cros_ec_keyb_compute_valid_keys
.subsections_via_symbols
