	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ngene_command_i2c_write
_ngene_command_i2c_write:               ## @ngene_command_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	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rdi, %r14
	movq	_CMD_I2C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	leal	1(%rcx), %eax
	movslq	%eax, %rbx
	movq	%rbx, -40(%rbp)
	addl	%esi, %esi
	movl	%esi, -48(%rbp)
	movq	%rdx, %rsi
	movl	%ecx, %edx
	callq	_memcpy
	movq	%rbx, -24(%rbp)
	movl	$1, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ngene_command
	testq	%rax, %rax
	js	LBB0_2
## %bb.1:
	movq	-56(%rbp), %rcx
	xorl	%eax, %eax
	cmpl	$1, (%rcx)
	jne	LBB0_3
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_I2C_WRITE,4,2              ## @CMD_I2C_WRITE
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ngene_command_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ngene_command_i2c_write
_ngene_command_i2c_write:               ; @ngene_command_i2c_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CMD_I2C_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_I2C_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #32]
	add	w8, w3, #1
	sxtw	x20, w8
	str	x20, [sp, #24]
	lsl	w8, w1, #1
	str	w8, [sp, #16]
	mov	x1, x2
	mov	x2, x3
	bl	_memcpy
	str	x20, [sp, #40]
	mov	w8, #1
	str	w8, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	_ngene_command
	tbnz	x0, #63, LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_I2C_WRITE,4,2              ; @CMD_I2C_WRITE
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ngene_command_i2c_write
.subsections_via_symbols
