	.file	"extr_matrix.c_select_row.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	select_row, @function
select_row:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ebx, edi
	cmp	edi, 6
	jg	.L2
	cmp	QWORD PTR mcp23018_status[rip], 0
	je	.L17
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	sub	ebx, 7
	cmp	ebx, 6
	ja	.L1
	lea	rdx, .L8[rip]
	movsx	rax, DWORD PTR [rdx+rbx*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L8:
	.long	.L14-.L8
	.long	.L13-.L8
	.long	.L12-.L8
	.long	.L11-.L8
	.long	.L10-.L8
	.long	.L9-.L8
	.long	.L7-.L8
	.text
.L9:
	mov	eax, DWORD PTR COL12[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	DWORD PTR DDRD[rip], eax
	not	eax
	and	DWORD PTR PORTD[rip], eax
	ret
.L7:
	.cfi_restore_state
	mov	eax, DWORD PTR COL13[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	DWORD PTR DDRC[rip], eax
	not	eax
	and	DWORD PTR PORTC[rip], eax
	ret
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR COL7[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	DWORD PTR DDRB[rip], eax
	not	eax
	and	DWORD PTR PORTB[rip], eax
	ret
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR COL8[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	DWORD PTR DDRB[rip], eax
	not	eax
	and	DWORD PTR PORTB[rip], eax
	ret
.L12:
	.cfi_restore_state
	mov	eax, DWORD PTR COL9[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	DWORD PTR DDRB[rip], eax
	not	eax
	and	DWORD PTR PORTB[rip], eax
	ret
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR COL10[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	DWORD PTR DDRB[rip], eax
	not	eax
	and	DWORD PTR PORTB[rip], eax
	ret
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR COL11[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	or	DWORD PTR DDRD[rip], eax
	not	eax
	and	DWORD PTR PORTD[rip], eax
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	esi, DWORD PTR I2C_TIMEOUT[rip]
	mov	edi, DWORD PTR I2C_ADDR_WRITE[rip]
	call	i2c_start@PLT
	mov	QWORD PTR mcp23018_status[rip], rax
	test	rax, rax
	jne	.L5
	mov	esi, DWORD PTR I2C_TIMEOUT[rip]
	mov	edi, DWORD PTR GPIOA[rip]
	call	i2c_write@PLT
	mov	QWORD PTR mcp23018_status[rip], rax
	test	rax, rax
	je	.L18
.L5:
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	i2c_stop@PLT
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	ecx, ebx
	mov	edi, -2
	mov	esi, DWORD PTR I2C_TIMEOUT[rip]
	rol	edi, cl
	movzx	edi, dil
	call	i2c_write@PLT
	mov	QWORD PTR mcp23018_status[rip], rax
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	select_row, .-select_row
	.comm	mcp23018_status,8,8
	.comm	PORTD,4,4
	.comm	PORTC,4,4
	.comm	PORTB,4,4
	.comm	I2C_TIMEOUT,4,4
	.comm	I2C_ADDR_WRITE,4,4
	.comm	GPIOA,4,4
	.comm	DDRD,4,4
	.comm	DDRC,4,4
	.comm	DDRB,4,4
	.comm	COL9,4,4
	.comm	COL8,4,4
	.comm	COL7,4,4
	.comm	COL13,4,4
	.comm	COL12,4,4
	.comm	COL11,4,4
	.comm	COL10,4,4
	.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_select_row.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	select_row, %function
select_row:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r0, #6
	push	{r4, r5, r6, lr}
	mov	r4, r0
	bgt	.L2
	ldr	r5, .L19
	ldr	r3, [r5]
	cmp	r3, #0
	popne	{r4, r5, r6, pc}
	ldr	r3, .L19+4
	ldr	r6, .L19+8
	ldr	r0, [r3]
	ldr	r1, [r6]
	bl	i2c_start
	cmp	r0, #0
	str	r0, [r5]
	bne	.L5
	ldr	r3, .L19+12
	ldr	r1, [r6]
	ldr	r0, [r3]
	bl	i2c_write
	cmp	r0, #0
	str	r0, [r5]
	beq	.L18
.L5:
	pop	{r4, r5, r6, lr}
	b	i2c_stop
.L2:
	sub	r4, r0, #7
	cmp	r4, #6
	ldrls	pc, [pc, r4, asl #2]
	b	.L1
.L8:
	.word	.L14
	.word	.L13
	.word	.L12
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L7
.L7:
	ldr	r3, .L19+16
	ldr	r0, .L19+20
	ldr	r1, .L19+24
.L16:
	ldr	ip, [r3]
	ldr	r2, [r0]
	ldr	r3, [r1]
	orr	r2, r2, ip
	bic	r3, r3, ip
	str	r2, [r0]
	str	r3, [r1]
.L1:
	pop	{r4, r5, r6, pc}
.L14:
	ldr	r3, .L19+28
	ldr	r0, .L19+32
	ldr	r1, .L19+36
	b	.L16
.L13:
	ldr	r3, .L19+40
	ldr	r0, .L19+32
	ldr	r1, .L19+36
	b	.L16
.L12:
	ldr	r3, .L19+44
	ldr	r0, .L19+32
	ldr	r1, .L19+36
	b	.L16
.L11:
	ldr	r3, .L19+48
	ldr	r0, .L19+32
	ldr	r1, .L19+36
	b	.L16
.L10:
	ldr	r3, .L19+52
	ldr	r0, .L19+56
	ldr	r1, .L19+60
	b	.L16
.L9:
	ldr	r3, .L19+64
	ldr	r0, .L19+56
	ldr	r1, .L19+60
	b	.L16
.L18:
	mov	r0, #1
	mvn	r0, r0, lsl r4
	ldr	r1, [r6]
	and	r0, r0, #255
	bl	i2c_write
	str	r0, [r5]
	b	.L5
.L20:
	.align	2
.L19:
	.word	mcp23018_status
	.word	I2C_ADDR_WRITE
	.word	I2C_TIMEOUT
	.word	GPIOA
	.word	COL13
	.word	DDRC
	.word	PORTC
	.word	COL7
	.word	DDRB
	.word	PORTB
	.word	COL8
	.word	COL9
	.word	COL10
	.word	COL11
	.word	DDRD
	.word	PORTD
	.word	COL12
	.size	select_row, .-select_row
	.comm	mcp23018_status,4,4
	.comm	PORTD,4,4
	.comm	PORTC,4,4
	.comm	PORTB,4,4
	.comm	I2C_TIMEOUT,4,4
	.comm	I2C_ADDR_WRITE,4,4
	.comm	GPIOA,4,4
	.comm	DDRD,4,4
	.comm	DDRC,4,4
	.comm	DDRB,4,4
	.comm	COL9,4,4
	.comm	COL8,4,4
	.comm	COL7,4,4
	.comm	COL13,4,4
	.comm	COL12,4,4
	.comm	COL11,4,4
	.comm	COL10,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
