	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan                    ## -- Begin function matrix_scan
	.p2align	4, 0x90
_matrix_scan:                           ## @matrix_scan
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$64, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	callq	_SERIAL_UART_INIT
	movq	_SERIAL_UART_DATA@GOTPCREL(%rip), %rax
	movl	$115, (%rax)
	leaq	L_.memset_pattern(%rip), %rsi
	leaq	-64(%rbp), %rdi
	movl	$44, %edx
	callq	_memset_pattern16
	cmpl	$224, -24(%rbp)
	jne	LBB0_4
## %bb.1:
	movq	_MATRIX_ROWS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_4
## %bb.2:
	movq	_matrix@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-60(%rbp,%rdx,8), %esi
	shll	$7, %esi
	orl	-64(%rbp,%rdx,8), %esi
	movl	%esi, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_3
LBB0_4:
	xorl	%eax, %eax
	callq	_matrix_scan_quantum
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-8(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	$1, %eax
	addq	$64, %rsp
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SERIAL_UART_DATA,4,2           ## @SERIAL_UART_DATA
	.comm	_SERIAL_UART_RXD_PRESENT,4,2    ## @SERIAL_UART_RXD_PRESENT
	.comm	_MATRIX_ROWS,4,2                ## @MATRIX_ROWS
	.comm	_matrix,8,3                     ## @matrix
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	115                             ## 0x73
	.long	115                             ## 0x73
	.long	115                             ## 0x73
	.long	115                             ## 0x73

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_scan                    ; -- Begin function matrix_scan
	.p2align	2
_matrix_scan:                           ; @matrix_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	bl	_SERIAL_UART_INIT
Lloh3:
	adrp	x8, _SERIAL_UART_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SERIAL_UART_DATA@GOTPAGEOFF]
	mov	w9, #115
Lloh5:
	str	w9, [x8]
Lloh6:
	adrp	x1, l_.memset_pattern@PAGE
Lloh7:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	add	x19, sp, #12
	add	x0, sp, #12
	mov	w2, #44
	bl	_memset_pattern16
	ldr	w9, [sp, #52]
Lloh8:
	adrp	x8, _MATRIX_ROWS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MATRIX_ROWS@GOTPAGEOFF]
	ldr	w10, [x8]
	cmp	w9, #224
	ccmp	w10, #1, #8, eq
	b.lt	LBB0_3
; %bb.1:
	mov	x9, #0
Lloh10:
	adrp	x10, _matrix@GOTPAGE
Lloh11:
	ldr	x10, [x10, _matrix@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	add	x11, x19, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w12, w13, [x11, #-4]
	orr	w12, w12, w13, lsl #7
	str	w12, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	add	x11, x11, #8
	cmp	x9, x12
	b.lt	LBB0_2
LBB0_3:
	bl	_matrix_scan_quantum
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_SERIAL_UART_DATA,4,2           ; @SERIAL_UART_DATA
	.comm	_SERIAL_UART_RXD_PRESENT,4,2    ; @SERIAL_UART_RXD_PRESENT
	.comm	_MATRIX_ROWS,4,2                ; @MATRIX_ROWS
	.comm	_matrix,8,3                     ; @matrix
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	115                             ; 0x73
	.long	115                             ; 0x73
	.long	115                             ; 0x73
	.long	115                             ; 0x73

.subsections_via_symbols
