	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_write
_i2c_write:                             ## @i2c_write
	.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	%ecx, %r15d
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	$161, %esi
	movl	$45887, %edx                    ## imm = 0xB33F
	movl	$1, %ecx
	callq	_reg_r_i
	movq	%rbx, %rdi
	movl	$160, %esi
	movl	%r15d, %edx
	movl	$45876, %ecx                    ## imm = 0xB334
	callq	_reg_w_i
	movq	%rbx, %rdi
	movl	$160, %esi
	movl	%r12d, %edx
	movl	$45882, %ecx                    ## imm = 0xB33A
	callq	_reg_w_i
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$160, %esi
	movl	$45878, %ecx                    ## imm = 0xB336
	callq	_reg_w_i
	cmpl	$2, %r15d
	jl	LBB0_2
## %bb.1:
	movl	4(%r14), %edx
	movq	%rbx, %rdi
	movl	$160, %esi
	movl	$45879, %ecx                    ## imm = 0xB337
	callq	_reg_w_i
LBB0_2:
	movq	%rbx, %rdi
	movl	$160, %esi
	movl	$1, %edx
	movl	$45881, %ecx                    ## imm = 0xB339
	callq	_reg_w_i
	movq	%rbx, %rdi
	movl	$161, %esi
	movl	$45883, %edx                    ## imm = 0xB33B
	movl	$1, %ecx
	callq	_reg_r_i
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.3:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	$161, %esi
	movl	$45883, %edx                    ## imm = 0xB33B
	movl	$1, %ecx
	callq	_reg_r_i
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.4:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	$161, %esi
	movl	$45883, %edx                    ## imm = 0xB33B
	movl	$1, %ecx
	callq	_reg_r_i
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movl	$20, %edi
	callq	_msleep
	movq	%rbx, %rdi
	movl	$161, %esi
	movl	$45883, %edx                    ## imm = 0xB33B
	movl	$1, %ecx
	callq	_reg_r_i
	movq	8(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.7:
	movl	$20, %edi
	callq	_msleep
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c_write timeout"

	.comm	_D_USBO,4,2                     ## @D_USBO
	.no_dead_strip	_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_write
_i2c_write:                             ; @i2c_write
	.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	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	mov	w1, #161
	mov	w2, #45887
	mov	w3, #1
	bl	_reg_r_i
	mov	x0, x19
	mov	w1, #160
	mov	x2, x21
	mov	w3, #45876
	bl	_reg_w_i
	mov	x0, x19
	mov	w1, #160
	mov	x2, x22
	mov	w3, #45882
	bl	_reg_w_i
	ldr	w2, [x20]
	mov	x0, x19
	mov	w1, #160
	mov	w3, #45878
	bl	_reg_w_i
	cmp	w21, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	w1, #160
	mov	w3, #45879
	bl	_reg_w_i
LBB0_2:
	mov	x0, x19
	mov	w1, #160
	mov	w2, #1
	mov	w3, #45881
	bl	_reg_w_i
	mov	x0, x19
	mov	w1, #161
	mov	w2, #45883
	mov	w3, #1
	bl	_reg_r_i
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.3:
	mov	w0, #20
	bl	_msleep
	mov	x0, x19
	mov	w1, #161
	mov	w2, #45883
	mov	w3, #1
	bl	_reg_r_i
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.4:
	mov	w0, #20
	bl	_msleep
	mov	x0, x19
	mov	w1, #161
	mov	w2, #45883
	mov	w3, #1
	bl	_reg_r_i
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.5:
	mov	w0, #20
	bl	_msleep
	mov	x0, x19
	mov	w1, #161
	mov	w2, #45883
	mov	w3, #1
	bl	_reg_r_i
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	w0, #20
	bl	_msleep
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	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	_err
LBB0_7:
	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 AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c_write timeout"

	.comm	_D_USBO,4,2                     ; @D_USBO
	.no_dead_strip	_i2c_write
.subsections_via_symbols
