	.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_isTouchChangeDetected
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	xorl	%eax, %eax
	callq	_touchDetectionRoutine
	testl	$3857, %eax                     ## imm = 0xF11
	je	LBB0_6
## %bb.2:
	movl	%eax, %ecx
	andl	$238, %ecx
	je	LBB0_6
## %bb.3:
	movl	$10, -48(%rbp)
	movl	$10, -44(%rbp)
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	%eax, %edi
	callq	_decodeArray
	movl	-48(%rbp), %edi
	cmpl	$10, %edi
	je	LBB0_6
## %bb.4:
	cmpl	$10, -44(%rbp)
	je	LBB0_6
## %bb.5:
	movq	_VIBRATE_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_vibrate@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	callq	__BV
	movq	_matrix@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	-44(%rbp), %rdx
	movl	%eax, (%rcx,%rdx,4)
	jmp	LBB0_7
LBB0_6:
	movq	_matrix@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_MATRIX_ROWS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$2, %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_7:
	xorl	%eax, %eax
	callq	_touchClearCurrentDetections
LBB0_8:
	leaq	l_switch.table.matrix_scan.1(%rip), %r13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%r14d
	cmpl	$6, %r14d
	je	LBB0_16
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	%r14d, %r14d
	xorl	%ebx, %ebx
	leaq	l_switch.table.matrix_scan(%rip), %r12
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=2
	incl	%ebx
	addq	$8, %r12
	cmpl	$6, %ebx
	je	LBB0_15
LBB0_10:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	$5, %ebx
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	(%r12), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_matrix_is_on
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_writePin
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	cmpl	$5, %r14d
	ja	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	(%r13,%r14,8), %rax
	movl	(%rax), %r15d
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_matrix_is_on
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%r15d, %edi
	callq	_writePin
	jmp	LBB0_14
LBB0_16:
	movq	_vibrate@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_VIBRATE_LENGTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	movq	_E6@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_writePinHigh
	movq	_D7@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_writePinHigh
	decq	(%rbx)
	jmp	LBB0_22
LBB0_18:
	testq	%rax, %rax
	jle	LBB0_20
## %bb.19:
	decq	%rax
	movq	%rax, (%rbx)
	jmp	LBB0_22
LBB0_20:
	jne	LBB0_22
## %bb.21:
	movq	_D7@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_writePinLow
	movq	_E6@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_writePinLow
LBB0_22:
	xorl	%eax, %eax
	callq	_matrix_scan_quantum
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIBRATE_LENGTH,8,3             ## @VIBRATE_LENGTH
	.comm	_vibrate,8,3                    ## @vibrate
	.comm	_matrix,8,3                     ## @matrix
	.comm	_MATRIX_ROWS,4,2                ## @MATRIX_ROWS
	.comm	_D6,4,2                         ## @D6
	.comm	_B4,4,2                         ## @B4
	.comm	_B5,4,2                         ## @B5
	.comm	_B6,4,2                         ## @B6
	.comm	_C6,4,2                         ## @C6
	.comm	_C7,4,2                         ## @C7
	.comm	_F5,4,2                         ## @F5
	.comm	_F4,4,2                         ## @F4
	.comm	_F1,4,2                         ## @F1
	.comm	_F0,4,2                         ## @F0
	.comm	_F6,4,2                         ## @F6
	.comm	_F7,4,2                         ## @F7
	.comm	_E6,4,2                         ## @E6
	.comm	_D7,4,2                         ## @D7
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.matrix_scan
l_switch.table.matrix_scan:
	.quad	_D6
	.quad	_B4
	.quad	_B5
	.quad	_B6
	.quad	_C6
	.quad	_C7

	.p2align	3                               ## @switch.table.matrix_scan.1
l_switch.table.matrix_scan.1:
	.quad	_F5
	.quad	_F4
	.quad	_F1
	.quad	_F0
	.quad	_F6
	.quad	_F7

.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	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	bl	_isTouchChangeDetected
Lloh0:
	adrp	x22, _vibrate@GOTPAGE
Lloh1:
	ldr	x22, [x22, _vibrate@GOTPAGEOFF]
Lloh2:
	adrp	x23, _VIBRATE_LENGTH@GOTPAGE
Lloh3:
	ldr	x23, [x23, _VIBRATE_LENGTH@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.1:
	bl	_touchDetectionRoutine
	mov	w8, #3857
	tst	w0, w8
	b.eq	LBB0_6
; %bb.2:
	mov	w8, #238
	and	w8, w0, w8
	cbz	w8, LBB0_6
; %bb.3:
	mov	w8, #10
	stp	w8, w8, [sp, #8]
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_decodeArray
	ldr	w0, [sp, #12]
	cmp	w0, #10
	b.eq	LBB0_6
; %bb.4:
	ldr	w8, [sp, #8]
	cmp	w8, #10
	b.eq	LBB0_6
; %bb.5:
	ldr	x8, [x23]
	str	x8, [x22]
	bl	__BV
Lloh4:
	adrp	x8, _matrix@GOTPAGE
Lloh5:
	ldr	x8, [x8, _matrix@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldrsw	x9, [sp, #8]
	str	w0, [x8, x9, lsl #2]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _matrix@GOTPAGE
Lloh8:
	ldr	x8, [x8, _matrix@GOTPAGEOFF]
Lloh9:
	ldr	x0, [x8]
Lloh10:
	adrp	x8, _MATRIX_ROWS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MATRIX_ROWS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
LBB0_7:
	bl	_touchClearCurrentDetections
LBB0_8:
	mov	w8, #0
Lloh13:
	adrp	x24, l_switch.table.matrix_scan@PAGE
Lloh14:
	add	x24, x24, l_switch.table.matrix_scan@PAGEOFF
Lloh15:
	adrp	x25, l_switch.table.matrix_scan.1@PAGE
Lloh16:
	add	x25, x25, l_switch.table.matrix_scan.1@PAGEOFF
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w8, w19, #1
	cmp	w8, #6
	b.eq	LBB0_16
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	mov	x20, #0
	mov	w19, w8
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	add	x20, x20, #1
	cmp	w20, #6
	b.eq	LBB0_9
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w20, #5
	b.hi	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x8, [x24, x20, lsl #3]
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_matrix_is_on
	mov	x1, x0
	mov	x0, x21
	bl	_writePin
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=2
	cmp	w19, #5
	b.hi	LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x8, [x25, x19, lsl #3]
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_matrix_is_on
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x21
	bl	_writePin
	b	LBB0_11
LBB0_16:
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_18
; %bb.17:
Lloh17:
	adrp	x8, _E6@GOTPAGE
Lloh18:
	ldr	x8, [x8, _E6@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_writePinHigh
Lloh20:
	adrp	x8, _D7@GOTPAGE
Lloh21:
	ldr	x8, [x8, _D7@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_writePinHigh
	ldr	x8, [x22]
	sub	x8, x8, #1
	str	x8, [x22]
	b	LBB0_22
LBB0_18:
	subs	x9, x8, #1
	b.lt	LBB0_20
; %bb.19:
	str	x9, [x22]
	b	LBB0_22
LBB0_20:
	cbnz	x8, LBB0_22
; %bb.21:
Lloh23:
	adrp	x8, _D7@GOTPAGE
Lloh24:
	ldr	x8, [x8, _D7@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_writePinLow
Lloh26:
	adrp	x8, _E6@GOTPAGE
Lloh27:
	ldr	x8, [x8, _E6@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_writePinLow
LBB0_22:
	bl	_matrix_scan_quantum
	mov	w0, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_VIBRATE_LENGTH,8,3             ; @VIBRATE_LENGTH
	.comm	_vibrate,8,3                    ; @vibrate
	.comm	_matrix,8,3                     ; @matrix
	.comm	_MATRIX_ROWS,4,2                ; @MATRIX_ROWS
	.comm	_D6,4,2                         ; @D6
	.comm	_B4,4,2                         ; @B4
	.comm	_B5,4,2                         ; @B5
	.comm	_B6,4,2                         ; @B6
	.comm	_C6,4,2                         ; @C6
	.comm	_C7,4,2                         ; @C7
	.comm	_F5,4,2                         ; @F5
	.comm	_F4,4,2                         ; @F4
	.comm	_F1,4,2                         ; @F1
	.comm	_F0,4,2                         ; @F0
	.comm	_F6,4,2                         ; @F6
	.comm	_F7,4,2                         ; @F7
	.comm	_E6,4,2                         ; @E6
	.comm	_D7,4,2                         ; @D7
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.matrix_scan
l_switch.table.matrix_scan:
	.quad	_D6
	.quad	_B4
	.quad	_B5
	.quad	_B6
	.quad	_C6
	.quad	_C7

	.p2align	3                               ; @switch.table.matrix_scan.1
l_switch.table.matrix_scan.1:
	.quad	_F5
	.quad	_F4
	.quad	_F1
	.quad	_F0
	.quad	_F6
	.quad	_F7

.subsections_via_symbols
