	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_apei_read                      ## -- Begin function apei_read
	.p2align	4, 0x90
_apei_read:                             ## @apei_read
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	-32(%rbp), %rsi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_apei_check_gar
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	$0, (%r14)
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.3:
	movl	-32(%rbp), %edi
	movl	-20(%rbp), %edx
	movq	%r14, %rsi
	callq	_acpi_os_read_memory
	jmp	LBB0_4
LBB0_6:
	movq	-32(%rbp), %rdi
	movl	-20(%rbp), %edx
	movq	%r14, %rsi
	callq	_acpi_os_read_port
LBB0_4:
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_5:
	xorl	%eax, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_apei_read                      ; -- Begin function apei_read
	.p2align	2
_apei_read:                             ; @apei_read
	.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	x20, x1
	mov	x19, x0
	mov	x1, sp
	add	x2, sp, #12
	mov	x0, x20
	bl	_apei_check_gar
	cbnz	w0, LBB0_8
; %bb.1:
	str	xzr, [x19]
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.3:
	ldr	w0, [sp]
	ldr	w2, [sp, #12]
	mov	x1, x19
	bl	_acpi_os_read_memory
	bl	_ACPI_FAILURE
	cbnz	w0, LBB0_5
	b	LBB0_8
LBB0_4:
	ldr	x0, [sp]
	ldr	w2, [sp, #12]
	mov	x1, x19
	bl	_acpi_os_read_port
	bl	_ACPI_FAILURE
	cbz	w0, LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
