	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3fwrn5_i2c_write
_s3fwrn5_i2c_write:                     ## @s3fwrn5_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	%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	%rsi, %r15
	movq	%rdi, %r12
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	$0, (%r12)
	movl	8(%r12), %edi
	movl	(%r15), %edx
	movl	4(%r15), %esi
	callq	_i2c_master_send
	movl	%eax, %ebx
	movq	_EREMOTEIO@GOTPCREL(%rip), %r13
	addl	(%r13), %eax
	jne	LBB0_2
## %bb.1:
	movl	$110000, %edi                   ## imm = 0x1ADB0
	movl	$120000, %esi                   ## imm = 0x1D4C0
	callq	_usleep_range
	movl	8(%r12), %edi
	movl	(%r15), %edx
	movl	4(%r15), %esi
	callq	_i2c_master_send
	movl	%eax, %ebx
LBB0_2:
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.3:
	cmpl	(%r15), %ebx
	movl	$0, %ebx
	je	LBB0_5
## %bb.4:
	xorl	%ebx, %ebx
	subl	(%r13), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.no_dead_strip	_s3fwrn5_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3fwrn5_i2c_write
_s3fwrn5_i2c_write:                     ; @s3fwrn5_i2c_write
	.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
	mov	x19, x1
	mov	x21, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_mutex_lock
	str	wzr, [x21]
	ldr	w0, [x21, #8]
	ldp	w2, w1, [x19]
	bl	_i2c_master_send
	mov	x22, x0
Lloh0:
	adrp	x23, _EREMOTEIO@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EREMOTEIO@GOTPAGEOFF]
	ldr	w8, [x23]
	cmn	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #44464
	movk	w0, #1, lsl #16
	mov	w1, #54464
	movk	w1, #1, lsl #16
	bl	_usleep_range
	ldr	w0, [x21, #8]
	ldp	w2, w1, [x19]
	bl	_i2c_master_send
	mov	x22, x0
LBB0_2:
	mov	x0, x20
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cmp	w22, w8
	b.ne	LBB0_5
; %bb.4:
	mov	w22, #0
	b	LBB0_6
LBB0_5:
	ldr	w8, [x23]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.no_dead_strip	_s3fwrn5_i2c_write
.subsections_via_symbols
