	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan_kb                 ## -- Begin function matrix_scan_kb
	.p2align	4, 0x90
_matrix_scan_kb:                        ## @matrix_scan_kb
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_layer_state@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, _matrix_scan_kb.layer_indicator(%rip)
	je	LBB0_5
## %bb.1:
	movq	_layer_info@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	leaq	4(%r8), %rsi
	movq	$-1, %rdx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-4(%rsi), %edi
	incq	%rdx
	cmpl	$-1, %edi
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rsi), %ecx
	andl	%eax, %ecx
	addq	$20, %rsi
	cmpl	%ecx, %edi
	jne	LBB0_2
LBB0_4:
	movl	%edx, %ecx
	leaq	(%rcx,%rcx,4), %rcx
	movl	16(%r8,%rcx,4), %edx
	movq	_OCR1A@GOTPCREL(%rip), %rsi
	movl	%edx, (%rsi)
	movl	12(%r8,%rcx,4), %edx
	movq	_OCR1B@GOTPCREL(%rip), %rsi
	movl	%edx, (%rsi)
	movl	8(%r8,%rcx,4), %ecx
	movq	_OCR1C@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movl	%eax, _matrix_scan_kb.layer_indicator(%rip)
LBB0_5:
	xorl	%eax, %eax
	popq	%rbp
	jmp	_matrix_scan_user               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @matrix_scan_kb.layer_indicator
_matrix_scan_kb.layer_indicator:
	.long	4294967295                      ## 0xffffffff

	.comm	_layer_state,4,2                ## @layer_state
	.comm	_layer_info,8,3                 ## @layer_info
	.comm	_OCR1A,4,2                      ## @OCR1A
	.comm	_OCR1B,4,2                      ## @OCR1B
	.comm	_OCR1C,4,2                      ## @OCR1C
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan_kb                 ; -- Begin function matrix_scan_kb
	.p2align	2
_matrix_scan_kb:                        ; @matrix_scan_kb
	.cfi_startproc
; %bb.0:
	adrp	x8, _matrix_scan_kb.layer_indicator@PAGE
	ldr	w10, [x8, _matrix_scan_kb.layer_indicator@PAGEOFF]
Lloh0:
	adrp	x9, _layer_state@GOTPAGE
Lloh1:
	ldr	x9, [x9, _layer_state@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w10, w9
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x10, _layer_info@GOTPAGE
Lloh4:
	ldr	x10, [x10, _layer_info@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	add	x12, x10, #4
	mov	x11, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w13, w14, [x12, #-4]
	and	w14, w14, w9
	add	x11, x11, #1
	add	x12, x12, #20
	cmn	w13, #1
	ccmp	w13, w14, #4, ne
	b.ne	LBB0_2
; %bb.3:
	and	x11, x11, #0xffffffff
	mov	w12, #20
	madd	x10, x11, x12, x10
	ldr	w11, [x10, #16]
Lloh6:
	adrp	x12, _OCR1A@GOTPAGE
Lloh7:
	ldr	x12, [x12, _OCR1A@GOTPAGEOFF]
Lloh8:
	str	w11, [x12]
	ldr	w11, [x10, #12]
Lloh9:
	adrp	x12, _OCR1B@GOTPAGE
Lloh10:
	ldr	x12, [x12, _OCR1B@GOTPAGEOFF]
Lloh11:
	str	w11, [x12]
	ldr	w10, [x10, #8]
Lloh12:
	adrp	x11, _OCR1C@GOTPAGE
Lloh13:
	ldr	x11, [x11, _OCR1C@GOTPAGEOFF]
Lloh14:
	str	w10, [x11]
	str	w9, [x8, _matrix_scan_kb.layer_indicator@PAGEOFF]
LBB0_4:
	b	_matrix_scan_user
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @matrix_scan_kb.layer_indicator
_matrix_scan_kb.layer_indicator:
	.long	4294967295                      ; 0xffffffff

	.comm	_layer_state,4,2                ; @layer_state
	.comm	_layer_info,8,3                 ; @layer_info
	.comm	_OCR1A,4,2                      ; @OCR1A
	.comm	_OCR1B,4,2                      ; @OCR1B
	.comm	_OCR1C,4,2                      ; @OCR1C
.subsections_via_symbols
