	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_read
_i2c_read:                              ## @i2c_read
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movl	$34820, %esi                    ## imm = 0x8804
	movl	$146, %edx
	callq	_reg_w_val
	movq	%r12, %rdi
	movl	$34817, %esi                    ## imm = 0x8801
	movl	%r15d, %edx
	callq	_reg_w_val
	orl	$1, %r14d
	movq	%r12, %rdi
	movl	$34818, %esi                    ## imm = 0x8802
	movl	%r14d, %edx
	callq	_reg_w_val
	movl	$-60, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$34819, %esi                    ## imm = 0x8803
	movl	$1, %edx
	callq	_reg_r
	movq	(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_msleep
	incl	%ebx
	jne	LBB0_1
## %bb.4:
	movl	$-1, %r14d
	jmp	LBB0_5
LBB0_2:
	movq	%r12, %rdi
	movl	$34816, %esi                    ## imm = 0x8800
	movl	$1, %edx
	callq	_reg_r
	movq	(%r12), %rax
	movl	(%rax), %r14d
	movq	%r12, %rdi
	movl	$34821, %esi                    ## imm = 0x8805
	movl	$1, %edx
	callq	_reg_r
	shll	$8, %r14d
	movq	(%r12), %rax
	orl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_read
_i2c_read:                              ; @i2c_read
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w1, #34820
	mov	w2, #146
	bl	_reg_w_val
	mov	x0, x19
	mov	w1, #34817
	mov	x2, x21
	bl	_reg_w_val
	orr	w2, w20, #0x1
	mov	x0, x19
	mov	w1, #34818
	bl	_reg_w_val
	mov	w20, #-60
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #34819
	mov	w2, #1
	bl	_reg_r
	ldr	x8, [x19]
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_msleep
	adds	w20, w20, #1
	b.lo	LBB0_1
; %bb.3:
	mov	w0, #-1
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	mov	w1, #34816
	mov	w2, #1
	bl	_reg_r
	ldr	x8, [x19]
	ldr	w20, [x8]
	mov	x0, x19
	mov	w1, #34821
	mov	w2, #1
	bl	_reg_r
	ldr	x8, [x19]
	ldr	w8, [x8]
	orr	w0, w8, w20, lsl #8
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
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_i2c_read
.subsections_via_symbols
