	.file	"extr_matrix.c_read_cols_on_row.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	read_cols_on_row, @function
read_cols_on_row:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	lea	rbp, [rdi+rsi*8]
	mov	rdi, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r13, QWORD PTR 0[rbp]
	mov	QWORD PTR 0[rbp], 0
	call	select_row@PLT
	mov	edi, 30
	call	wait_us@PLT
	cmp	QWORD PTR MATRIX_COLS[rip], 0
	je	.L2
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR col_pins[rip]
	mov	edi, DWORD PTR [rax+rbx*4]
	call	readPin@PLT
	mov	r8, rax
	xor	eax, eax
	test	r8, r8
	jne	.L3
	mov	rax, QWORD PTR ROW_SHIFTER[rip]
	mov	ecx, ebx
	sal	rax, cl
.L3:
	or	QWORD PTR 0[rbp], rax
	add	rbx, 1
	cmp	QWORD PTR MATRIX_COLS[rip], rbx
	ja	.L4
.L2:
	mov	rdi, r12
	call	unselect_row@PLT
	xor	eax, eax
	cmp	QWORD PTR 0[rbp], r13
	setne	al
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	read_cols_on_row, .-read_cols_on_row
	.comm	col_pins,8,8
	.comm	ROW_SHIFTER,8,8
	.comm	MATRIX_COLS,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_read_cols_on_row.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_cols_on_row, %function
read_cols_on_row:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r0
	mov	r4, #0
	mov	r5, r1
	ldr	r8, [r0, r1, lsl #2]
	ldr	r10, .L12
	mov	r0, r1
	str	r4, [r6, r1, lsl #2]
	bl	select_row
	mov	r0, #30
	bl	wait_us
	ldr	r3, [r10]
	add	r9, r6, r5, lsl #2
	cmp	r3, r4
	beq	.L2
	ldr	fp, .L12+4
	ldr	r7, .L12+8
.L4:
	ldr	r3, [fp]
	ldr	r0, [r3, r4, lsl #2]
	bl	readPin
	cmp	r0, #0
	movne	r2, #0
	ldreq	r3, [r7]
	lsleq	r2, r3, r4
	ldr	r3, [r9]
	add	r4, r4, #1
	orr	r3, r3, r2
	str	r3, [r9]
	ldr	r3, [r10]
	cmp	r3, r4
	bhi	.L4
.L2:
	mov	r0, r5
	bl	unselect_row
	ldr	r0, [r6, r5, lsl #2]
	subs	r0, r0, r8
	movne	r0, #1
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	.align	2
.L12:
	.word	MATRIX_COLS
	.word	col_pins
	.word	ROW_SHIFTER
	.size	read_cols_on_row, .-read_cols_on_row
	.comm	col_pins,4,4
	.comm	ROW_SHIFTER,4,4
	.comm	MATRIX_COLS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
