	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_row
_select_row:                            ## @select_row
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_MATRIX_ROWS_PER_SIDE@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	_mcp23017_status@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_4
## %bb.2:
	movl	$255, %eax
	btrl	%edi, %eax
	movl	%eax, -12(%rbp)
	movq	_I2C_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_I2C_GPIOA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	movl	$1, %ecx
	movl	$10, %r8d
	callq	_i2c_writeReg
	movq	%rax, (%rbx)
	jmp	LBB0_4
LBB0_3:
	incb	%dil
	movl	$1, %eax
	movl	%edi, %ecx
	shll	%cl, %eax
	movq	_GPIOB@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MATRIX_ROWS_PER_SIDE,4,2       ## @MATRIX_ROWS_PER_SIDE
	.comm	_mcp23017_status,8,3            ## @mcp23017_status
	.comm	_I2C_ADDR,4,2                   ## @I2C_ADDR
	.comm	_I2C_GPIOA,4,2                  ## @I2C_GPIOA
	.comm	_GPIOB,8,3                      ## @GPIOB
	.no_dead_strip	_select_row
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_row
_select_row:                            ; @select_row
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _MATRIX_ROWS_PER_SIDE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MATRIX_ROWS_PER_SIDE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_3
; %bb.1:
Lloh3:
	adrp	x19, _mcp23017_status@GOTPAGE
Lloh4:
	ldr	x19, [x19, _mcp23017_status@GOTPAGEOFF]
	ldr	x8, [x19]
	cbnz	x8, LBB0_4
; %bb.2:
	mov	w8, #1
	lsl	w8, w8, w0
	mvn	w8, w8
	and	w8, w8, #0xff
	str	w8, [sp, #12]
Lloh5:
	adrp	x8, _I2C_ADDR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_ADDR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _I2C_GPIOA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I2C_GPIOA@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w3, #1
	mov	w4, #10
	bl	_i2c_writeReg
	str	x0, [x19]
	b	LBB0_4
LBB0_3:
	add	w8, w0, #1
	mov	w9, #1
	lsl	w8, w9, w8
Lloh11:
	adrp	x9, _GPIOB@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GPIOB@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	str	w8, [x9]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MATRIX_ROWS_PER_SIDE,4,2       ; @MATRIX_ROWS_PER_SIDE
	.comm	_mcp23017_status,8,3            ; @mcp23017_status
	.comm	_I2C_ADDR,4,2                   ; @I2C_ADDR
	.comm	_I2C_GPIOA,4,2                  ; @I2C_GPIOA
	.comm	_GPIOB,8,3                      ; @GPIOB
	.no_dead_strip	_select_row
.subsections_via_symbols
