	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_transaction                ## -- Begin function i2c_transaction
	.p2align	4, 0x90
_i2c_transaction:                       ## @i2c_transaction
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_isLeftHand@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	cmpq	$0, (%rax)
	movq	_ROWS_PER_HAND@GOTPCREL(%rip), %r15
	je	LBB0_2
## %bb.1:
	movl	(%r15), %r14d
LBB0_2:
	movq	_SLAVE_I2C_ADDRESS@GOTPCREL(%rip), %rbx
	movq	_I2C_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_i2c_master_start
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	xorl	%edi, %edi
	callq	_i2c_master_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	_I2C_READ@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_i2c_master_start
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:
	xorl	%eax, %eax
	callq	_i2c_reset_state
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%r12d, %r12d
	cmpl	$2, (%r15)
	movl	$0, %ebx
	jl	LBB0_8
## %bb.6:
	movslq	%r14d, %r13
	shlq	$2, %r13
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_I2C_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_i2c_master_read
	movq	_matrix@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%r13, %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	decq	%rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	_I2C_NACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_i2c_master_read
	movq	_matrix@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addl	%r14d, %ebx
	movslq	%ebx, %rdx
	movl	%eax, (%rcx,%rdx,4)
	xorl	%eax, %eax
	callq	_i2c_master_stop
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_isLeftHand,8,3                 ## @isLeftHand
	.comm	_ROWS_PER_HAND,4,2              ## @ROWS_PER_HAND
	.comm	_SLAVE_I2C_ADDRESS,8,3          ## @SLAVE_I2C_ADDRESS
	.comm	_I2C_WRITE,8,3                  ## @I2C_WRITE
	.comm	_I2C_READ,8,3                   ## @I2C_READ
	.comm	_I2C_ACK,4,2                    ## @I2C_ACK
	.comm	_matrix,8,3                     ## @matrix
	.comm	_I2C_NACK,4,2                   ## @I2C_NACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2c_transaction                ; -- Begin function i2c_transaction
	.p2align	2
_i2c_transaction:                       ; @i2c_transaction
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _isLeftHand@GOTPAGE
Lloh1:
	ldr	x8, [x8, _isLeftHand@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x21, _ROWS_PER_HAND@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ROWS_PER_HAND@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	x8, #0
Lloh5:
	adrp	x22, _SLAVE_I2C_ADDRESS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SLAVE_I2C_ADDRESS@GOTPAGEOFF]
	csel	w20, wzr, w9, eq
	ldr	x8, [x22]
Lloh7:
	adrp	x9, _I2C_WRITE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _I2C_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_i2c_master_start
	mov	x19, x0
	cbnz	w0, LBB0_3
; %bb.1:
	bl	_i2c_master_write
	mov	x19, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x8, [x22]
Lloh10:
	adrp	x9, _I2C_READ@GOTPAGE
Lloh11:
	ldr	x9, [x9, _I2C_READ@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_i2c_master_start
	mov	x19, x0
	cbz	w0, LBB0_5
LBB0_3:
	bl	_i2c_reset_state
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w8, [x21]
Lloh13:
	adrp	x19, _matrix@GOTPAGE
Lloh14:
	ldr	x19, [x19, _matrix@GOTPAGEOFF]
	cmp	w8, #2
	b.lt	LBB0_8
; %bb.6:
	mov	x22, #0
	sbfiz	x23, x20, #2, #32
Lloh15:
	adrp	x24, _I2C_ACK@GOTPAGE
Lloh16:
	ldr	x24, [x24, _I2C_ACK@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_i2c_master_read
	ldr	x8, [x19]
	add	x8, x8, x23
	str	w0, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	sub	x8, x8, #1
	cmp	x22, x8
	b.lt	LBB0_7
	b	LBB0_9
LBB0_8:
	mov	w22, #0
LBB0_9:
Lloh17:
	adrp	x8, _I2C_NACK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _I2C_NACK@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_i2c_master_read
	ldr	x8, [x19]
	add	w9, w22, w20
	str	w0, [x8, w9, sxtw #2]
	bl	_i2c_master_stop
	mov	w19, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_isLeftHand,8,3                 ; @isLeftHand
	.comm	_ROWS_PER_HAND,4,2              ; @ROWS_PER_HAND
	.comm	_SLAVE_I2C_ADDRESS,8,3          ; @SLAVE_I2C_ADDRESS
	.comm	_I2C_WRITE,8,3                  ; @I2C_WRITE
	.comm	_I2C_READ,8,3                   ; @I2C_READ
	.comm	_I2C_ACK,4,2                    ; @I2C_ACK
	.comm	_matrix,8,3                     ; @matrix
	.comm	_I2C_NACK,4,2                   ; @I2C_NACK
.subsections_via_symbols
