	.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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	cmpl	$6, %edi
	jg	LBB0_6
## %bb.1:
	movq	_mcp23018_status@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_18
## %bb.2:
	movq	_I2C_ADDR_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERGODOX_EZ_I2C_TIMEOUT@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_i2c_start
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	_GPIOA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_i2c_write
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	$255, %edi
	btrl	%ebx, %edi
	movl	(%r15), %esi
	callq	_i2c_write
	movq	%rax, (%r14)
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i2c_stop                       ## TAILCALL
LBB0_6:
	addl	$-7, %ebx
	cmpl	$6, %ebx
	ja	LBB0_18
## %bb.7:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_8:
	movq	_COL7@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_10:
	movq	_COL8@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_11:
	movq	_COL9@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_12:
	movq	_COL10@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movq	_DDRB@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	notl	%eax
	movq	_PORTB@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_13:
	movq	_COL11@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_15:
	movq	_COL12@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movq	_DDRD@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	notl	%eax
	movq	_PORTD@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_16:
	movq	_COL13@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DDRC@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	notl	%eax
	movq	_PORTC@GOTPCREL(%rip), %rcx
LBB0_17:
	andl	%eax, (%rcx)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_15
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.comm	_mcp23018_status,8,3            ## @mcp23018_status
	.comm	_I2C_ADDR_WRITE,4,2             ## @I2C_ADDR_WRITE
	.comm	_ERGODOX_EZ_I2C_TIMEOUT,4,2     ## @ERGODOX_EZ_I2C_TIMEOUT
	.comm	_GPIOA,4,2                      ## @GPIOA
	.comm	_COL7,4,2                       ## @COL7
	.comm	_DDRB,4,2                       ## @DDRB
	.comm	_PORTB,4,2                      ## @PORTB
	.comm	_COL8,4,2                       ## @COL8
	.comm	_COL9,4,2                       ## @COL9
	.comm	_COL10,4,2                      ## @COL10
	.comm	_COL11,4,2                      ## @COL11
	.comm	_DDRD,4,2                       ## @DDRD
	.comm	_PORTD,4,2                      ## @PORTD
	.comm	_COL12,4,2                      ## @COL12
	.comm	_COL13,4,2                      ## @COL13
	.comm	_DDRC,4,2                       ## @DDRC
	.comm	_PORTC,4,2                      ## @PORTC
	.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:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	cmp	w0, #6
	b.gt	LBB0_6
; %bb.1:
Lloh0:
	adrp	x20, _mcp23018_status@GOTPAGE
Lloh1:
	ldr	x20, [x20, _mcp23018_status@GOTPAGEOFF]
	ldr	x8, [x20]
	cbnz	x8, LBB0_18
; %bb.2:
Lloh2:
	adrp	x8, _I2C_ADDR_WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_ADDR_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x21, _ERGODOX_EZ_I2C_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x21, [x21, _ERGODOX_EZ_I2C_TIMEOUT@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_i2c_start
	str	x0, [x20]
	cbnz	x0, LBB0_5
; %bb.3:
Lloh7:
	adrp	x8, _GPIOA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GPIOA@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w1, [x21]
	bl	_i2c_write
	str	x0, [x20]
	cbnz	x0, LBB0_5
; %bb.4:
	mov	w8, #1
	lsl	w8, w8, w19
	mvn	w8, w8
	and	w0, w8, #0xff
	ldr	w1, [x21]
	bl	_i2c_write
	str	x0, [x20]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_i2c_stop
LBB0_6:
	sub	w8, w19, #7
	cmp	w8, #6
	b.hi	LBB0_18
; %bb.7:
Lloh10:
	adrp	x9, lJTI0_0@PAGE
Lloh11:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
Lloh12:
	adrp	x8, _COL7@GOTPAGE
Lloh13:
	ldr	x8, [x8, _COL7@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh14:
	adrp	x8, _COL8@GOTPAGE
Lloh15:
	ldr	x8, [x8, _COL8@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh16:
	adrp	x8, _COL9@GOTPAGE
Lloh17:
	ldr	x8, [x8, _COL9@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh18:
	adrp	x8, _COL10@GOTPAGE
Lloh19:
	ldr	x8, [x8, _COL10@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _DDRB@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DDRB@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w10, w10, w8
	str	w10, [x9]
Lloh22:
	adrp	x9, _PORTB@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PORTB@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
Lloh24:
	adrp	x8, _COL11@GOTPAGE
Lloh25:
	ldr	x8, [x8, _COL11@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh26:
	adrp	x8, _COL12@GOTPAGE
Lloh27:
	ldr	x8, [x8, _COL12@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _DDRD@GOTPAGE
Lloh29:
	ldr	x9, [x9, _DDRD@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w10, w10, w8
	str	w10, [x9]
Lloh30:
	adrp	x9, _PORTD@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PORTD@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh32:
	adrp	x8, _COL13@GOTPAGE
Lloh33:
	ldr	x8, [x8, _COL13@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
Lloh35:
	adrp	x9, _DDRC@GOTPAGE
Lloh36:
	ldr	x9, [x9, _DDRC@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w10, w10, w8
	str	w10, [x9]
Lloh37:
	adrp	x9, _PORTC@GOTPAGE
Lloh38:
	ldr	x9, [x9, _PORTC@GOTPAGEOFF]
LBB0_17:
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
LBB0_18:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_10-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
	.byte	(LBB0_13-LBB0_8)>>2
	.byte	(LBB0_14-LBB0_8)>>2
	.byte	(LBB0_16-LBB0_8)>>2
                                        ; -- End function
	.comm	_mcp23018_status,8,3            ; @mcp23018_status
	.comm	_I2C_ADDR_WRITE,4,2             ; @I2C_ADDR_WRITE
	.comm	_ERGODOX_EZ_I2C_TIMEOUT,4,2     ; @ERGODOX_EZ_I2C_TIMEOUT
	.comm	_GPIOA,4,2                      ; @GPIOA
	.comm	_COL7,4,2                       ; @COL7
	.comm	_DDRB,4,2                       ; @DDRB
	.comm	_PORTB,4,2                      ; @PORTB
	.comm	_COL8,4,2                       ; @COL8
	.comm	_COL9,4,2                       ; @COL9
	.comm	_COL10,4,2                      ; @COL10
	.comm	_COL11,4,2                      ; @COL11
	.comm	_DDRD,4,2                       ; @DDRD
	.comm	_PORTD,4,2                      ; @PORTD
	.comm	_COL12,4,2                      ; @COL12
	.comm	_COL13,4,2                      ; @COL13
	.comm	_DDRC,4,2                       ; @DDRC
	.comm	_PORTC,4,2                      ; @PORTC
	.no_dead_strip	_select_row
.subsections_via_symbols
