	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_cols
_read_cols:                             ## @read_cols
	.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
	cmpl	$6, %edi
	jg	LBB0_8
## %bb.1:
	movq	_mcp23018_status@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	cmpq	$0, (%r14)
	jne	LBB0_9
## %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)
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:
	movq	_GPIOB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_i2c_write
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	_I2C_ADDR_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_i2c_start
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	(%r15), %edi
	callq	_i2c_read_nack
	movq	%rax, (%r14)
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:
	notl	%eax
	movq	_I2C_STATUS_SUCCESS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%r14)
	movl	%eax, %ebx
LBB0_7:
	xorl	%eax, %eax
	callq	_i2c_stop
	jmp	LBB0_9
LBB0_8:
	movq	_PINF@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %eax
	andl	$3, %eax
	shrl	$2, %ebx
	andl	$60, %ebx
	orl	%eax, %ebx
	notl	%ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- 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	_GPIOB,4,2                      ## @GPIOB
	.comm	_I2C_ADDR_READ,4,2              ## @I2C_ADDR_READ
	.comm	_I2C_STATUS_SUCCESS,8,3         ## @I2C_STATUS_SUCCESS
	.comm	_PINF,4,2                       ## @PINF
	.no_dead_strip	_read_cols
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_cols
_read_cols:                             ; @read_cols
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w0, #6
	b.gt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x20, _mcp23018_status@GOTPAGE
Lloh1:
	ldr	x20, [x20, _mcp23018_status@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.2:
	mov	w19, #0
	b	LBB0_8
LBB0_3:
Lloh2:
	adrp	x8, _PINF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PINF@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	lsr	w9, w8, #2
	and	w9, w9, #0x3c
	bfxil	w9, w8, #0, #2
	mvn	w19, w9
	b	LBB0_8
LBB0_4:
Lloh5:
	adrp	x8, _I2C_ADDR_WRITE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2C_ADDR_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x19, _ERGODOX_EZ_I2C_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x19, [x19, _ERGODOX_EZ_I2C_TIMEOUT@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_i2c_start
	str	x0, [x20]
	cbnz	x0, LBB0_7
; %bb.5:
Lloh10:
	adrp	x8, _GPIOB@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GPIOB@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_i2c_write
	str	x0, [x20]
	cbnz	x0, LBB0_7
; %bb.6:
Lloh13:
	adrp	x8, _I2C_ADDR_READ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I2C_ADDR_READ@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_i2c_start
	str	x0, [x20]
	cbz	x0, LBB0_9
LBB0_7:
	mov	w19, #0
	bl	_i2c_stop
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	w0, [x19]
	bl	_i2c_read_nack
	str	x0, [x20]
	tbnz	x0, #63, LBB0_7
; %bb.10:
	mvn	w19, w0
Lloh16:
	adrp	x8, _I2C_STATUS_SUCCESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I2C_STATUS_SUCCESS@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x20]
	bl	_i2c_stop
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- 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	_GPIOB,4,2                      ; @GPIOB
	.comm	_I2C_ADDR_READ,4,2              ; @I2C_ADDR_READ
	.comm	_I2C_STATUS_SUCCESS,8,3         ; @I2C_STATUS_SUCCESS
	.comm	_PINF,4,2                       ; @PINF
	.no_dead_strip	_read_cols
.subsections_via_symbols
