	.file	"extr_matrix.c_matrix_scan.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	matrix_scan
	.type	matrix_scan, @function
matrix_scan:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, QWORD PTR MATRIX_ROWS[rip]
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	test	rdx, rdx
	jle	.L2
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, QWORD PTR matrix[rip]
	mov	rsi, rbx
	add	rbx, 1
	call	read_cols_on_row@PLT
	mov	rdx, QWORD PTR MATRIX_ROWS[rip]
	cmp	rdx, rbx
	jg	.L3
.L2:
	mov	rax, QWORD PTR DEVICE_STATE_Configured[rip]
	cmp	QWORD PTR USB_DeviceState[rip], rax
	je	.L4
	mov	rsi, QWORD PTR i2c_slave_reg[rip]
	mov	DWORD PTR 4[rsi], 85
	test	rdx, rdx
	jle	.L4
	mov	rdi, QWORD PTR matrix[rip]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, DWORD PTR [rdi+rax*4]
	mov	DWORD PTR 8[rsi+rax*4], ecx
	add	rax, 1
	cmp	rax, rdx
	jne	.L5
.L4:
	xor	eax, eax
	call	matrix_scan_quantum@PLT
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	matrix_scan, .-matrix_scan
	.comm	matrix_debouncing,8,8
	.comm	matrix,8,8
	.comm	i2c_slave_reg,8,8
	.comm	debouncing_time,4,4
	.comm	debouncing,4,4
	.comm	USB_DeviceState,8,8
	.comm	MATRIX_ROWS,8,8
	.comm	MATRIX_COLS,8,8
	.comm	DEVICE_STATE_Configured,8,8
	.comm	DEBOUNCE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_matrix.c_matrix_scan.c"
	.text
	.align	2
	.global	matrix_scan
	.syntax unified
	.arm
	.fpu softvfp
	.type	matrix_scan, %function
matrix_scan:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, .L10
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L2
	mov	r4, #0
	ldr	r6, .L10+4
.L3:
	mov	r1, r4
	ldr	r0, [r6]
	bl	read_cols_on_row
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L3
.L2:
	ldr	r1, .L10+8
	ldr	r2, .L10+12
	ldr	r1, [r1]
	ldr	r2, [r2]
	cmp	r1, r2
	beq	.L4
	mov	r2, #85
	ldr	r1, .L10+16
	cmp	r3, #0
	ldr	r1, [r1]
	str	r2, [r1, #4]
	ble	.L4
	ldr	r2, .L10+4
	add	r1, r1, #4
	ldr	r2, [r2]
	sub	r2, r2, #4
	add	r3, r2, r3, lsl #2
.L5:
	ldr	r0, [r2, #4]!
	cmp	r2, r3
	str	r0, [r1, #4]!
	bne	.L5
.L4:
	bl	matrix_scan_quantum
	mov	r0, #1
	pop	{r4, r5, r6, pc}
.L11:
	.align	2
.L10:
	.word	MATRIX_ROWS
	.word	matrix
	.word	USB_DeviceState
	.word	DEVICE_STATE_Configured
	.word	i2c_slave_reg
	.size	matrix_scan, .-matrix_scan
	.comm	matrix_debouncing,4,4
	.comm	matrix,4,4
	.comm	i2c_slave_reg,4,4
	.comm	debouncing_time,4,4
	.comm	debouncing,4,4
	.comm	USB_DeviceState,4,4
	.comm	MATRIX_ROWS,4,4
	.comm	MATRIX_COLS,4,4
	.comm	DEVICE_STATE_Configured,4,4
	.comm	DEBOUNCE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
