	.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
	movq	_is_master@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_matrix_master_scan
	jmp	LBB0_6
LBB0_2:
	xorl	%eax, %eax
	callq	_matrix_slave_scan
	movq	_ROWS_PER_HAND@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.3:
	movq	_isLeftHand@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	testq	%rsi, %rsi
	movq	_serial_master_buffer@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_matrix@GOTPCREL(%rip), %rdi
	cmoveq	%rsi, %rcx
	shlq	$2, %rcx
	addq	(%rdi), %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rsi,4), %edi
	movl	%edi, (%rcx,%rsi,4)
	incq	%rsi
	movslq	(%rax), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	callq	_matrix_scan_quantum
LBB0_6:
	movl	$1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_is_master,8,3                  ## @is_master
	.comm	_isLeftHand,8,3                 ## @isLeftHand
	.comm	_ROWS_PER_HAND,4,2              ## @ROWS_PER_HAND
	.comm	_serial_master_buffer,8,3       ## @serial_master_buffer
	.comm	_matrix,8,3                     ## @matrix
.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:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _is_master@GOTPAGE
Lloh1:
	ldr	x8, [x8, _is_master@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_matrix_master_scan
	b	LBB0_6
LBB0_2:
	bl	_matrix_slave_scan
Lloh3:
	adrp	x8, _ROWS_PER_HAND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ROWS_PER_HAND@GOTPAGEOFF]
	ldr	w11, [x8]
	cmp	w11, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x9, #0
Lloh5:
	adrp	x10, _isLeftHand@GOTPAGE
Lloh6:
	ldr	x10, [x10, _isLeftHand@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x10]
Lloh8:
	adrp	x10, _serial_master_buffer@GOTPAGE
Lloh9:
	ldr	x10, [x10, _serial_master_buffer@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
Lloh11:
	adrp	x13, _matrix@GOTPAGE
Lloh12:
	ldr	x13, [x13, _matrix@GOTPAGEOFF]
Lloh13:
	ldr	x13, [x13]
	cmp	x12, #0
	csel	x11, xzr, x11, eq
	add	x11, x13, x11, lsl #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x12, x9, #2
	ldr	w13, [x10, x12]
	str	w13, [x11, x12]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_4
LBB0_5:
	bl	_matrix_scan_quantum
LBB0_6:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_is_master,8,3                  ; @is_master
	.comm	_isLeftHand,8,3                 ; @isLeftHand
	.comm	_ROWS_PER_HAND,4,2              ; @ROWS_PER_HAND
	.comm	_serial_master_buffer,8,3       ; @serial_master_buffer
	.comm	_matrix,8,3                     ; @matrix
.subsections_via_symbols
