	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvmem_cell_write               ## -- Begin function nvmem_cell_write
	.p2align	4, 0x90
_nvmem_cell_write:                      ## @nvmem_cell_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	32(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_4
## %bb.1:
	cmpq	$0, (%r12)
	je	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	cmpq	$0, (%rdi)
	je	LBB0_3
LBB0_7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_nvmem_cell_prepare_write_buffer
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.14:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	cmpq	%rbx, 8(%r15)
	jne	LBB0_4
## %bb.5:
	cmpq	$0, 16(%r15)
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rcx
	jmp	LBB0_9
LBB0_8:
	movq	8(%r15), %rcx
LBB0_9:
	movl	24(%r15), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_nvmem_reg_write
	movl	%eax, %r12d
	cmpq	$0, (%r15)
	jne	LBB0_11
## %bb.10:
	cmpq	$0, 16(%r15)
	je	LBB0_12
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
LBB0_12:
	testl	%r12d, %r12d
	cmovnel	%r12d, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvmem_cell_write               ; -- Begin function nvmem_cell_write
	.p2align	2
_nvmem_cell_write:                      ; @nvmem_cell_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	x22, [x0, #32]
	cbz	x22, LBB0_2
; %bb.1:
	ldr	x8, [x22]
	cbz	x8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
LBB0_4:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_7
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_nvmem_cell_prepare_write_buffer
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.6:
	mov	x0, x20
	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	_PTR_ERR
LBB0_7:
	ldr	x8, [x21, #8]
	cmp	x8, x19
	b.ne	LBB0_2
; %bb.8:
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_5
; %bb.9:
	mov	x3, x19
	b	LBB0_11
LBB0_10:
	ldr	x3, [x21, #8]
LBB0_11:
	ldr	w1, [x21, #24]
	mov	x0, x22
	mov	x2, x20
	bl	_nvmem_reg_write
	mov	x22, x0
	ldr	x8, [x21]
	cbnz	x8, LBB0_13
; %bb.12:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_kfree
LBB0_14:
	cmp	w22, #0
	csel	w0, w19, w22, eq
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
