	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function microread_i2c_write
_microread_i2c_write:                   ## @microread_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
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	jne	LBB0_7
## %bb.1:
	movq	%rsi, %r15
	movq	8(%rdi), %r14
	movl	$3000, %edi                     ## imm = 0xBB8
	movl	$6000, %esi                     ## imm = 0x1770
	callq	_usleep_range
	movq	%r15, %rdi
	callq	_microread_i2c_add_len_crc
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_I2C_DUMP_SKB
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_i2c_master_send
	movl	%eax, %ebx
	movq	_EREMOTEIO@GOTPCREL(%rip), %r12
	addl	(%r12), %eax
	jne	LBB0_3
## %bb.2:
	movl	$6000, %edi                     ## imm = 0x1770
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_usleep_range
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_i2c_master_send
	movl	%eax, %ebx
LBB0_3:
	testl	%ebx, %ebx
	js	LBB0_6
## %bb.4:
	cmpl	(%r15), %ebx
	movl	$0, %ebx
	je	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
LBB0_6:
	movq	%r15, %rdi
	callq	_microread_i2c_remove_len_crc
LBB0_7:
	movl	%ebx, %eax
	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 frame written"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_microread_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function microread_i2c_write
_microread_i2c_write:                   ; @microread_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
	ldr	x21, [x0]
	cbnz	x21, LBB0_8
; %bb.1:
	mov	x19, x1
	ldr	x20, [x0, #8]
	mov	w0, #3000
	mov	w1, #6000
	bl	_usleep_range
	mov	x0, x19
	bl	_microread_i2c_add_len_crc
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_I2C_DUMP_SKB
	ldp	w2, w1, [x19]
	mov	x0, x20
	bl	_i2c_master_send
	mov	x21, x0
Lloh2:
	adrp	x22, _EREMOTEIO@GOTPAGE
Lloh3:
	ldr	x22, [x22, _EREMOTEIO@GOTPAGEOFF]
	ldr	w8, [x22]
	cmn	w0, w8
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #6000
	mov	w1, #10000
	bl	_usleep_range
	ldp	w2, w1, [x19]
	mov	x0, x20
	bl	_i2c_master_send
	mov	x21, x0
LBB0_3:
	tbnz	w21, #31, LBB0_7
; %bb.4:
	ldr	w8, [x19]
	cmp	w21, w8
	b.ne	LBB0_6
; %bb.5:
	mov	w21, #0
	b	LBB0_7
LBB0_6:
	ldr	w8, [x22]
	neg	w21, w8
LBB0_7:
	mov	x0, x19
	bl	_microread_i2c_remove_len_crc
LBB0_8:
	mov	x0, x21
	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	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c frame written"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_microread_i2c_write
.subsections_via_symbols
