	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_init                    ## -- Begin function matrix_init
	.p2align	4, 0x90
_matrix_init:                           ## @matrix_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_mlatest@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MATRIX_ROWS@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_mlast@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_mdebounced@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
	movq	_row_masks@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_PA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%r8,%rcx,4)
	movq	_PB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%r8,%rcx,4)
	cmpl	$0, (%r14)
	jle	LBB0_3
## %bb.1:
	movq	_row_pins@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_PORT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %r10
	movq	_row_ports@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rdx,%rbx,4), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movq	(%r9,%rbx,8), %rdi
	leaq	(%rdi,%rdi,2), %rsi
	movl	%eax, 16(%r10,%rsi,8)
	movzbl	(%rdx,%rbx,4), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, (%r10,%rsi,8)
	movq	8(%r10,%rsi,8), %rax
	movslq	(%rdx,%rbx,4), %rcx
	movl	$1, (%rax,%rcx,8)
	movslq	(%rdx,%rbx,4), %rcx
	movl	$1, 4(%rax,%rcx,8)
	movzbl	(%rdx,%rbx,4), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	orl	%eax, (%r8,%rdi,4)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movq	_MATRIX_COLS@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	jle	LBB0_6
## %bb.4:
	movq	_col_pins@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_PORT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rsi
	movq	_col_ports@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rdx,%rbx,4), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movq	(%r9,%rbx,8), %rcx
	leaq	(%rcx,%rcx,2), %rdi
	movl	%eax, 4(%rsi,%rdi,8)
	movzbl	(%rdx,%rbx,4), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, (%rsi,%rdi,8)
	incq	%rbx
	movslq	(%r8), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_matrix_init_quantum            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mlatest,4,2                    ## @mlatest
	.comm	_MATRIX_ROWS,4,2                ## @MATRIX_ROWS
	.comm	_mlast,4,2                      ## @mlast
	.comm	_mdebounced,4,2                 ## @mdebounced
	.comm	_row_masks,8,3                  ## @row_masks
	.comm	_PA,8,3                         ## @PA
	.comm	_PB,8,3                         ## @PB
	.comm	_row_pins,8,3                   ## @row_pins
	.comm	_PORT,8,3                       ## @PORT
	.comm	_row_ports,8,3                  ## @row_ports
	.comm	_MATRIX_COLS,4,2                ## @MATRIX_COLS
	.comm	_col_pins,8,3                   ## @col_pins
	.comm	_col_ports,8,3                  ## @col_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_init                    ; -- Begin function matrix_init
	.p2align	2
_matrix_init:                           ; @matrix_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _mlatest@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mlatest@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x19, _MATRIX_ROWS@GOTPAGE
Lloh4:
	ldr	x19, [x19, _MATRIX_ROWS@GOTPAGEOFF]
	ldr	w8, [x19]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
Lloh5:
	adrp	x8, _mlast@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mlast@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w8, [x19]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
Lloh8:
	adrp	x8, _mdebounced@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mdebounced@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w8, [x19]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
Lloh11:
	adrp	x8, _row_masks@GOTPAGE
Lloh12:
	ldr	x8, [x8, _row_masks@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x8]
Lloh14:
	adrp	x8, _PA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PA@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	wzr, [x9, x8, lsl #2]
Lloh17:
	adrp	x8, _PB@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PB@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	wzr, [x9, x8, lsl #2]
	ldr	w10, [x19]
Lloh20:
	adrp	x8, _PORT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PORT@GOTPAGEOFF]
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x10, #0
Lloh22:
	adrp	x11, _row_pins@GOTPAGE
Lloh23:
	ldr	x11, [x11, _row_pins@GOTPAGEOFF]
Lloh24:
	ldr	x11, [x11]
	ldr	x12, [x8]
	ldr	x12, [x12]
Lloh25:
	adrp	x13, _row_ports@GOTPAGE
Lloh26:
	ldr	x13, [x13, _row_ports@GOTPAGEOFF]
Lloh27:
	ldr	x13, [x13]
	mov	w14, #1
	mov	w15, #24
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x16, x10, #2
	ldr	w17, [x11, x16]
	lsl	w17, w14, w17
	ldr	x0, [x13, x10, lsl #3]
	madd	x1, x0, x15, x12
	str	w17, [x1, #16]
	ldr	w17, [x11, x16]
	lsl	w17, w14, w17
	str	w17, [x1]
	ldr	x17, [x1, #8]
	ldrsw	x1, [x11, x16]
	lsl	x1, x1, #3
	str	w14, [x17, x1]
	ldrsw	x1, [x11, x16]
	add	x17, x17, x1, lsl #3
	str	w14, [x17, #4]
	ldr	w16, [x11, x16]
	lsl	x17, x0, #2
	ldr	w0, [x9, x17]
	lsl	w16, w14, w16
	orr	w16, w0, w16
	str	w16, [x9, x17]
	add	x10, x10, #1
	ldrsw	x16, [x19]
	cmp	x10, x16
	b.lt	LBB0_2
LBB0_3:
Lloh28:
	adrp	x9, _MATRIX_COLS@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MATRIX_COLS@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x10, #0
Lloh30:
	adrp	x11, _col_pins@GOTPAGE
Lloh31:
	ldr	x11, [x11, _col_pins@GOTPAGEOFF]
Lloh32:
	ldr	x11, [x11]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh33:
	adrp	x12, _col_ports@GOTPAGE
Lloh34:
	ldr	x12, [x12, _col_ports@GOTPAGEOFF]
Lloh35:
	ldr	x12, [x12]
	mov	w13, #1
	mov	w14, #24
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x15, x10, #2
	ldr	w16, [x11, x15]
	lsl	w16, w13, w16
	ldr	x17, [x12, x10, lsl #3]
	madd	x17, x17, x14, x8
	str	w16, [x17, #4]
	ldr	w15, [x11, x15]
	lsl	w15, w13, w15
	str	w15, [x17]
	add	x10, x10, #1
	ldrsw	x15, [x9]
	cmp	x10, x15
	b.lt	LBB0_5
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_matrix_init_quantum
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_mlatest,4,2                    ; @mlatest
	.comm	_MATRIX_ROWS,4,2                ; @MATRIX_ROWS
	.comm	_mlast,4,2                      ; @mlast
	.comm	_mdebounced,4,2                 ; @mdebounced
	.comm	_row_masks,8,3                  ; @row_masks
	.comm	_PA,8,3                         ; @PA
	.comm	_PB,8,3                         ; @PB
	.comm	_row_pins,8,3                   ; @row_pins
	.comm	_PORT,8,3                       ; @PORT
	.comm	_row_ports,8,3                  ; @row_ports
	.comm	_MATRIX_COLS,4,2                ; @MATRIX_COLS
	.comm	_col_pins,8,3                   ; @col_pins
	.comm	_col_ports,8,3                  ; @col_ports
.subsections_via_symbols
