	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_slave_scan              ## -- Begin function matrix_slave_scan
	.p2align	4, 0x90
_matrix_slave_scan:                     ## @matrix_slave_scan
	.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
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	__matrix_scan
	movq	_isLeftHand@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_MATRIX_ROWS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %r14
LBB0_2:
	movq	_ROWS_PER_HAND@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_7
## %bb.3:
	cmpl	$1, %r8d
	jne	LBB0_8
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_8:
	movl	%r8d, %r9d
	andl	$-2, %r9d
	leaq	(,%r14,8), %rsi
	xorl	%ecx, %ecx
	movq	_matrix@GOTPCREL(%rip), %rdi
	movq	_serial_slave_buffer@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rax
	addq	%rsi, %rax
	movq	(%rax,%rcx,8), %rax
	movq	(%rbx), %rdx
	movq	%rax, (%rdx,%rcx,8)
	movq	(%rdi), %rax
	addq	%rsi, %rax
	movq	8(%rax,%rcx,8), %rax
	movq	(%rbx), %rdx
	movq	%rax, 8(%rdx,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %r9
	jne	LBB0_9
LBB0_5:
	testb	$1, %r8b
	je	LBB0_7
## %bb.6:
	movq	_matrix@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%rcx, %r14
	movq	(%rax,%r14,8), %rax
	movq	_serial_slave_buffer@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rax, (%rdx,%rcx,8)
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_isLeftHand,8,3                 ## @isLeftHand
	.comm	_MATRIX_ROWS,4,2                ## @MATRIX_ROWS
	.comm	_ROWS_PER_HAND,4,2              ## @ROWS_PER_HAND
	.comm	_matrix,8,3                     ## @matrix
	.comm	_serial_slave_buffer,8,3        ## @serial_slave_buffer
	.comm	_i2c_slave_buffer,8,3           ## @i2c_slave_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_matrix_slave_scan              ; -- Begin function matrix_slave_scan
	.p2align	2
_matrix_slave_scan:                     ; @matrix_slave_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
	bl	__matrix_scan
Lloh0:
	adrp	x8, _isLeftHand@GOTPAGE
Lloh1:
	ldr	x8, [x8, _isLeftHand@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x9, #0
	b	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _MATRIX_ROWS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MATRIX_ROWS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	sbfx	x9, x8, #1, #31
LBB0_3:
Lloh6:
	adrp	x8, _ROWS_PER_HAND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ROWS_PER_HAND@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x8, #0
	lsl	x9, x9, #3
	lsl	x10, x10, #3
Lloh9:
	adrp	x11, _matrix@GOTPAGE
Lloh10:
	ldr	x11, [x11, _matrix@GOTPAGEOFF]
Lloh11:
	adrp	x12, _serial_slave_buffer@GOTPAGE
Lloh12:
	ldr	x12, [x12, _serial_slave_buffer@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11]
	add	x13, x13, x9
	ldr	x13, [x13, x8]
	ldr	x14, [x12]
	str	x13, [x14, x8]
	add	x8, x8, #8
	cmp	x10, x8
	b.ne	LBB0_5
LBB0_6:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_isLeftHand,8,3                 ; @isLeftHand
	.comm	_MATRIX_ROWS,4,2                ; @MATRIX_ROWS
	.comm	_ROWS_PER_HAND,4,2              ; @ROWS_PER_HAND
	.comm	_matrix,8,3                     ; @matrix
	.comm	_serial_slave_buffer,8,3        ; @serial_slave_buffer
	.comm	_i2c_slave_buffer,8,3           ; @i2c_slave_buffer
.subsections_via_symbols
