	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvram_ioctl
_nvram_ioctl:                           ## @nvram_ioctl
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$128, %edx
	je	LBB0_8
## %bb.1:
	cmpl	$129, %edx
	jne	LBB0_10
## %bb.2:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_rtc_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irq
	movq	_NVRAM_BYTES@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movl	%ebx, %esi
	callq	___nvram_write_byte
	incl	%ebx
	cmpl	(%r14), %ebx
	jl	LBB0_6
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	___nvram_set_checksum
	movq	_rtc_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irq
	jmp	LBB0_12
LBB0_8:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_3
## %bb.9:
	movq	_rtc_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	___nvram_set_checksum
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	jmp	LBB0_12
LBB0_10:
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_3:
	movq	_EACCES@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_rtc_lock,4,2                   ## @rtc_lock
	.comm	_NVRAM_BYTES,4,2                ## @NVRAM_BYTES
	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.no_dead_strip	_nvram_ioctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvram_ioctl
_nvram_ioctl:                           ; @nvram_ioctl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w2, #128
	b.eq	LBB0_7
; %bb.1:
	cmp	w2, #129
	b.ne	LBB0_10
; %bb.2:
Lloh0:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_11
; %bb.3:
Lloh3:
	adrp	x0, _rtc_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _rtc_lock@GOTPAGEOFF]
	bl	_spin_lock_irq
Lloh5:
	adrp	x20, _NVRAM_BYTES@GOTPAGE
Lloh6:
	ldr	x20, [x20, _NVRAM_BYTES@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w19, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	mov	x1, x19
	bl	___nvram_write_byte
	add	w19, w19, #1
	ldr	w8, [x20]
	cmp	w19, w8
	b.lt	LBB0_5
LBB0_6:
	bl	___nvram_set_checksum
Lloh7:
	adrp	x0, _rtc_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _rtc_lock@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_11
; %bb.8:
Lloh12:
	adrp	x19, _rtc_lock@GOTPAGE
Lloh13:
	ldr	x19, [x19, _rtc_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_spin_lock_irq
	bl	___nvram_set_checksum
	mov	x0, x19
LBB0_9:
	bl	_spin_unlock_irq
	mov	w0, #0
	b	LBB0_13
LBB0_10:
Lloh14:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh16:
	adrp	x8, _EACCES@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_rtc_lock,4,2                   ; @rtc_lock
	.comm	_NVRAM_BYTES,4,2                ; @NVRAM_BYTES
	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.no_dead_strip	_nvram_ioctl
.subsections_via_symbols
