	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_get_rsdp
_acpi_get_rsdp:                         ## @acpi_get_rsdp
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	movq	_acpi_mem_fd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	-48(%rbp), %rsi
	movl	$8, %edx
	movl	%r15d, %ecx
	callq	_pread
	movl	-32(%rbp), %edi
	leaq	L_.str(%rip), %rsi
	movl	$8, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	leaq	-48(%rbp), %r14
	movq	%r14, %rsi
	movl	$24, %edx
	movl	%r15d, %ecx
	callq	_pread
	movq	_ACPI_RSDP_CHECKSUM_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_acpi_checksum
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	xorl	%eax, %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	-48(%rbp), %eax
	cmpl	$2, %eax
	jl	LBB0_8
## %bb.5:
	movq	_ACPI_RSDP_XCHECKSUM_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	callq	_acpi_checksum
	testq	%rax, %rax
	jne	LBB0_1
## %bb.7:
	movl	-48(%rbp), %eax
LBB0_8:
	movl	$4, %esi
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	-40(%rbp), %rsi
LBB0_10:
	movl	%r15d, %edi
	callq	_acpi_map_physical
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_acpi_mem_fd,4,2                ## @acpi_mem_fd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RSD PTR "

	.comm	_ACPI_RSDP_CHECKSUM_LENGTH,4,2  ## @ACPI_RSDP_CHECKSUM_LENGTH
	.comm	_ACPI_RSDP_XCHECKSUM_LENGTH,4,2 ## @ACPI_RSDP_XCHECKSUM_LENGTH
	.no_dead_strip	_acpi_get_rsdp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_get_rsdp
_acpi_get_rsdp:                         ; @acpi_get_rsdp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, _acpi_mem_fd@GOTPAGE
Lloh1:
	ldr	x20, [x20, _acpi_mem_fd@GOTPAGEOFF]
	ldr	w0, [x20]
	add	x1, sp, #8
	mov	w2, #8
	mov	x3, x19
	bl	_pread
	ldr	w0, [sp, #24]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #8
	bl	_memcmp
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	add	x1, sp, #8
	mov	w2, #24
	mov	x3, x19
	bl	_pread
Lloh4:
	adrp	x8, _ACPI_RSDP_CHECKSUM_LENGTH@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ACPI_RSDP_CHECKSUM_LENGTH@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_acpi_checksum
	cbz	x0, LBB0_4
LBB0_2:
	mov	x0, #0
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	w8, [sp, #8]
	cmp	w8, #2
	b.lt	LBB0_7
; %bb.5:
Lloh7:
	adrp	x8, _ACPI_RSDP_XCHECKSUM_LENGTH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ACPI_RSDP_XCHECKSUM_LENGTH@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_acpi_checksum
	cbnz	x0, LBB0_2
; %bb.6:
	ldr	w8, [sp, #8]
LBB0_7:
	ldr	x9, [sp, #16]
	cmp	w8, #0
	mov	w8, #4
	csel	x1, x8, x9, eq
	mov	x0, x19
	bl	_acpi_map_physical
	b	LBB0_3
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_acpi_mem_fd,4,2                ; @acpi_mem_fd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RSD PTR "

	.comm	_ACPI_RSDP_CHECKSUM_LENGTH,4,2  ; @ACPI_RSDP_CHECKSUM_LENGTH
	.comm	_ACPI_RSDP_XCHECKSUM_LENGTH,4,2 ; @ACPI_RSDP_XCHECKSUM_LENGTH
	.no_dead_strip	_acpi_get_rsdp
.subsections_via_symbols
