	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __erst_clear_from_storage
___erst_clear_from_storage:             ## @__erst_clear_from_storage
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_FIRMWARE_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_erst_exec_ctx_init
	movq	_ACPI_ERST_BEGIN_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_apei_exec_run_optional
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_apei_exec_ctx_set_input
	movq	_ACPI_ERST_SET_RECORD_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_apei_exec_run
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	_ACPI_ERST_EXECUTE_OPERATION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdi
	callq	_apei_exec_run
	testl	%eax, %eax
	je	LBB0_3
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_ACPI_ERST_CHECK_BUSY_STATUS@GOTPCREL(%rip), %r15
	leaq	-40(%rbp), %rbx
	movq	_SPIN_UNIT@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_apei_exec_run
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_apei_exec_ctx_get_output
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_erst_timedout
	testq	%rax, %rax
	je	LBB0_4
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_8:
	movq	_ACPI_ERST_GET_COMMAND_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdi
	callq	_apei_exec_run
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_apei_exec_ctx_get_output
	movq	%rax, %r14
	movq	_ACPI_ERST_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_apei_exec_run_optional
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	callq	_erst_errno
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRMWARE_TIMEOUT,8,3           ## @FIRMWARE_TIMEOUT
	.comm	_ACPI_ERST_BEGIN_CLEAR,4,2      ## @ACPI_ERST_BEGIN_CLEAR
	.comm	_ACPI_ERST_SET_RECORD_ID,4,2    ## @ACPI_ERST_SET_RECORD_ID
	.comm	_ACPI_ERST_EXECUTE_OPERATION,4,2 ## @ACPI_ERST_EXECUTE_OPERATION
	.comm	_ACPI_ERST_CHECK_BUSY_STATUS,4,2 ## @ACPI_ERST_CHECK_BUSY_STATUS
	.comm	_SPIN_UNIT,4,2                  ## @SPIN_UNIT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ACPI_ERST_GET_COMMAND_STATUS,4,2 ## @ACPI_ERST_GET_COMMAND_STATUS
	.comm	_ACPI_ERST_END,4,2              ## @ACPI_ERST_END
	.no_dead_strip	___erst_clear_from_storage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __erst_clear_from_storage
___erst_clear_from_storage:             ; @__erst_clear_from_storage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _FIRMWARE_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIRMWARE_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp]
	add	x0, sp, #8
	bl	_erst_exec_ctx_init
Lloh3:
	adrp	x8, _ACPI_ERST_BEGIN_CLEAR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_ERST_BEGIN_CLEAR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_apei_exec_run_optional
	cbnz	w0, LBB0_3
; %bb.1:
	add	x0, sp, #8
	mov	x1, x19
	bl	_apei_exec_ctx_set_input
Lloh6:
	adrp	x8, _ACPI_ERST_SET_RECORD_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_ERST_SET_RECORD_ID@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_apei_exec_run
	cbnz	w0, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _ACPI_ERST_EXECUTE_OPERATION@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ACPI_ERST_EXECUTE_OPERATION@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_apei_exec_run
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
Lloh12:
	adrp	x19, _ACPI_ERST_CHECK_BUSY_STATUS@GOTPAGE
Lloh13:
	ldr	x19, [x19, _ACPI_ERST_CHECK_BUSY_STATUS@GOTPAGEOFF]
Lloh14:
	adrp	x20, _SPIN_UNIT@GOTPAGE
Lloh15:
	ldr	x20, [x20, _SPIN_UNIT@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19]
	add	x0, sp, #8
	bl	_apei_exec_run
	cbnz	w0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #8
	bl	_apei_exec_ctx_get_output
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x20]
	mov	x0, sp
	bl	_erst_timedout
	cbz	x0, LBB0_5
; %bb.8:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_9:
Lloh19:
	adrp	x8, _ACPI_ERST_GET_COMMAND_STATUS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ACPI_ERST_GET_COMMAND_STATUS@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_apei_exec_run
	cbnz	w0, LBB0_3
; %bb.10:
	add	x0, sp, #8
	bl	_apei_exec_ctx_get_output
	mov	x19, x0
Lloh22:
	adrp	x8, _ACPI_ERST_END@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ACPI_ERST_END@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_apei_exec_run_optional
	cbnz	w0, LBB0_3
; %bb.11:
	mov	x0, x19
	bl	_erst_errno
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRMWARE_TIMEOUT,8,3           ; @FIRMWARE_TIMEOUT
	.comm	_ACPI_ERST_BEGIN_CLEAR,4,2      ; @ACPI_ERST_BEGIN_CLEAR
	.comm	_ACPI_ERST_SET_RECORD_ID,4,2    ; @ACPI_ERST_SET_RECORD_ID
	.comm	_ACPI_ERST_EXECUTE_OPERATION,4,2 ; @ACPI_ERST_EXECUTE_OPERATION
	.comm	_ACPI_ERST_CHECK_BUSY_STATUS,4,2 ; @ACPI_ERST_CHECK_BUSY_STATUS
	.comm	_SPIN_UNIT,4,2                  ; @SPIN_UNIT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ACPI_ERST_GET_COMMAND_STATUS,4,2 ; @ACPI_ERST_GET_COMMAND_STATUS
	.comm	_ACPI_ERST_END,4,2              ; @ACPI_ERST_END
	.no_dead_strip	___erst_clear_from_storage
.subsections_via_symbols
