	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opal_nvram_write
_opal_nvram_write:                      ## @opal_nvram_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	%rdi, %rax
	movq	(%rsi), %rdi
	testq	%rdi, %rdi
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	(%rax), %r12
	movq	_NVRAM_BUFSIZE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	subq	8(%r14), %rsi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_MIN
	movq	(%r13), %rsi
	movl	%eax, %edi
	callq	_MIN
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %ebx
	movq	8(%r14), %r15
	movl	4(%r12), %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_uiomove
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_OPAL_WRITE_NVRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_opal_call
	movq	_OPAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	jg	LBB0_4
	jmp	LBB0_13
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_5:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	cmpl	$128, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$129, %eax
	jne	LBB0_13
## %bb.10:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVRAM_BUFSIZE,8,3              ## @NVRAM_BUFSIZE
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_OPAL_WRITE_NVRAM,4,2           ## @OPAL_WRITE_NVRAM
	.comm	_OPAL_SUCCESS,4,2               ## @OPAL_SUCCESS
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_opal_nvram_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opal_nvram_write
_opal_nvram_write:                      ; @opal_nvram_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x1]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x19, x1
	ldr	x22, [x0]
Lloh0:
	adrp	x23, _NVRAM_BUFSIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NVRAM_BUFSIZE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _OPAL_WRITE_NVRAM@GOTPAGE
Lloh3:
	ldr	x24, [x24, _OPAL_WRITE_NVRAM@GOTPAGEOFF]
Lloh4:
	adrp	x25, _OPAL_SUCCESS@GOTPAGE
Lloh5:
	ldr	x25, [x25, _OPAL_SUCCESS@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22, #8]
	ldr	x10, [x19, #8]
	sub	x1, x9, x10
	mov	x0, x8
	bl	_MIN
	ldr	x1, [x23]
	bl	_MIN
	cbz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, x0
	ldr	x21, [x19, #8]
	ldr	w0, [x22, #4]
	mov	x1, x20
	mov	x2, x19
	bl	_uiomove
	cbnz	w0, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x24]
	ldr	w1, [x22]
	mov	x2, x20
	mov	x3, x21
	bl	_opal_call
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	cmp	x8, #1
	b.ge	LBB0_2
	b	LBB0_13
LBB0_6:
	mov	w0, #0
	b	LBB0_13
LBB0_7:
Lloh6:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	cmp	w0, #128
	b.eq	LBB0_11
; %bb.9:
	cmp	w0, #129
	b.ne	LBB0_13
; %bb.10:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NVRAM_BUFSIZE,8,3              ; @NVRAM_BUFSIZE
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_OPAL_WRITE_NVRAM,4,2           ; @OPAL_WRITE_NVRAM
	.comm	_OPAL_SUCCESS,4,2               ; @OPAL_SUCCESS
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_opal_nvram_write
.subsections_via_symbols
