	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_find_root_pointer         ## -- Begin function acpi_find_root_pointer
	.p2align	4, 0x90
_acpi_find_root_pointer:                ## @acpi_find_root_pointer
	.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, %r14
	leaq	_acpi_find_root_pointer(%rip), %rdi
	callq	_ACPI_FUNCTION_TRACE
	movq	_ACPI_EBDA_PTR_LOCATION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ACPI_EBDA_PTR_LENGTH@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_acpi_os_map_memory
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	callq	_ACPI_ERROR
	movq	_AE_NO_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
LBB0_2:
	leaq	-44(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_ACPI_MOVE_16_TO_32
	shll	$4, -44(%rbp)
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_acpi_os_unmap_memory
	movl	-44(%rbp), %edi
	cmpl	$1025, %edi                     ## imm = 0x401
	jl	LBB0_7
## %bb.3:
	movq	_ACPI_EBDA_WINDOW_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_acpi_os_map_memory
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	(%r12), %edi
	callq	_ACPI_ERROR
	movq	_AE_NO_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
LBB0_5:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_acpi_tb_scan_memory_for_rsdp
	movq	%rax, %r15
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_acpi_os_unmap_memory
	testq	%r15, %r15
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ACPI_PTR_DIFF
	addl	-44(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	%eax, (%r14)
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
LBB0_7:
	movq	_ACPI_HI_RSDP_WINDOW_BASE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_ACPI_HI_RSDP_WINDOW_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_acpi_os_map_memory
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movl	(%r13), %edi
	callq	_ACPI_ERROR
	movq	_AE_NO_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
LBB0_9:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_acpi_tb_scan_memory_for_rsdp
	movq	%rax, %r15
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_acpi_os_unmap_memory
	testq	%r15, %r15
	je	LBB0_11
## %bb.10:
	movl	(%r12), %r12d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ACPI_PTR_DIFF
	addl	%r12d, %eax
	movl	%eax, -44(%rbp)
	movl	%eax, (%r14)
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_ACPI_ERROR
	movq	_AE_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_return_ACPI_STATUS
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_EBDA_PTR_LOCATION,8,3     ## @ACPI_EBDA_PTR_LOCATION
	.comm	_ACPI_EBDA_PTR_LENGTH,4,2       ## @ACPI_EBDA_PTR_LENGTH
	.comm	_AE_INFO,4,2                    ## @AE_INFO
	.comm	_AE_NO_MEMORY,4,2               ## @AE_NO_MEMORY
	.comm	_ACPI_EBDA_WINDOW_SIZE,4,2      ## @ACPI_EBDA_WINDOW_SIZE
	.comm	_AE_OK,4,2                      ## @AE_OK
	.comm	_ACPI_HI_RSDP_WINDOW_BASE,8,3   ## @ACPI_HI_RSDP_WINDOW_BASE
	.comm	_ACPI_HI_RSDP_WINDOW_SIZE,4,2   ## @ACPI_HI_RSDP_WINDOW_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"A valid RSDP was not found"

	.comm	_AE_NOT_FOUND,4,2               ## @AE_NOT_FOUND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_find_root_pointer         ; -- Begin function acpi_find_root_pointer
	.p2align	2
_acpi_find_root_pointer:                ; @acpi_find_root_pointer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, _acpi_find_root_pointer@PAGE
Lloh1:
	add	x0, x0, _acpi_find_root_pointer@PAGEOFF
	bl	_ACPI_FUNCTION_TRACE
Lloh2:
	adrp	x8, _ACPI_EBDA_PTR_LOCATION@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ACPI_EBDA_PTR_LOCATION@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x21, _ACPI_EBDA_PTR_LENGTH@GOTPAGE
Lloh6:
	ldr	x21, [x21, _ACPI_EBDA_PTR_LENGTH@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_acpi_os_map_memory
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x21]
	bl	_ACPI_ERROR
Lloh7:
	adrp	x8, _AE_NO_MEMORY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AE_NO_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
LBB0_2:
	add	x0, sp, #12
	mov	x1, x20
	bl	_ACPI_MOVE_16_TO_32
	ldr	w8, [sp, #12]
	lsl	w8, w8, #4
	str	w8, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_acpi_os_unmap_memory
	ldr	w0, [sp, #12]
	cmp	w0, #1025
	b.lt	LBB0_7
; %bb.3:
Lloh10:
	adrp	x22, _ACPI_EBDA_WINDOW_SIZE@GOTPAGE
Lloh11:
	ldr	x22, [x22, _ACPI_EBDA_WINDOW_SIZE@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_acpi_os_map_memory
	mov	x20, x0
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x22]
	bl	_ACPI_ERROR
Lloh12:
	adrp	x8, _AE_NO_MEMORY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AE_NO_MEMORY@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
LBB0_5:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_acpi_tb_scan_memory_for_rsdp
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x20
	bl	_acpi_os_unmap_memory
	cbz	x21, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	x1, x20
	bl	_ACPI_PTR_DIFF
	ldr	w8, [sp, #12]
	add	w8, w8, w0
	str	w8, [sp, #12]
	str	w8, [x19]
Lloh15:
	adrp	x8, _AE_OK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
LBB0_7:
Lloh18:
	adrp	x22, _ACPI_HI_RSDP_WINDOW_BASE@GOTPAGE
Lloh19:
	ldr	x22, [x22, _ACPI_HI_RSDP_WINDOW_BASE@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh20:
	adrp	x23, _ACPI_HI_RSDP_WINDOW_SIZE@GOTPAGE
Lloh21:
	ldr	x23, [x23, _ACPI_HI_RSDP_WINDOW_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_acpi_os_map_memory
	mov	x20, x0
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x23]
	bl	_ACPI_ERROR
Lloh22:
	adrp	x8, _AE_NO_MEMORY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AE_NO_MEMORY@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
LBB0_9:
	ldr	w1, [x23]
	mov	x0, x20
	bl	_acpi_tb_scan_memory_for_rsdp
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_acpi_os_unmap_memory
	cbz	x21, LBB0_11
; %bb.10:
	ldr	w22, [x22]
	mov	x0, x21
	mov	x1, x20
	bl	_ACPI_PTR_DIFF
	add	w8, w0, w22
	str	w8, [sp, #12]
	str	w8, [x19]
Lloh25:
	adrp	x8, _AE_OK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
LBB0_11:
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_ACPI_ERROR
Lloh30:
	adrp	x8, _AE_NOT_FOUND@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AE_NOT_FOUND@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_return_ACPI_STATUS
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_EBDA_PTR_LOCATION,8,3     ; @ACPI_EBDA_PTR_LOCATION
	.comm	_ACPI_EBDA_PTR_LENGTH,4,2       ; @ACPI_EBDA_PTR_LENGTH
	.comm	_AE_INFO,4,2                    ; @AE_INFO
	.comm	_AE_NO_MEMORY,4,2               ; @AE_NO_MEMORY
	.comm	_ACPI_EBDA_WINDOW_SIZE,4,2      ; @ACPI_EBDA_WINDOW_SIZE
	.comm	_AE_OK,4,2                      ; @AE_OK
	.comm	_ACPI_HI_RSDP_WINDOW_BASE,8,3   ; @ACPI_HI_RSDP_WINDOW_BASE
	.comm	_ACPI_HI_RSDP_WINDOW_SIZE,4,2   ; @ACPI_HI_RSDP_WINDOW_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"A valid RSDP was not found"

	.comm	_AE_NOT_FOUND,4,2               ; @AE_NOT_FOUND
.subsections_via_symbols
