	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_call_phys_prelog           ## -- Begin function efi_call_phys_prelog
	.p2align	4, 0x90
_efi_call_phys_prelog:                  ## @efi_call_phys_prelog
	.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	_efi_rt_eflags@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_local_irq_save
	xorl	%eax, %eax
	callq	_read_cr4_safe
	movq	%rax, %rbx
	movq	_X86_CR4_PAE@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	movq	_swapper_pg_dir@GOTPCREL(%rip), %r14
	movq	(%r14), %r15
	xorl	%edi, %edi
	callq	_pgd_index
	movl	(%r15,%rax,4), %eax
	movq	_efi_bak_pg_dir_pointer@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	%eax, (%rcx)
	movq	(%r14), %r15
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	_PAGE_OFFSET@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	callq	_pgd_index
	movl	(%r15,%rax,4), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_3
LBB0_2:
	movl	$4194304, %edi                  ## imm = 0x400000
	callq	_pgd_index
	movl	(%r15,%rax,4), %eax
	movq	(%r12), %rcx
	movl	%eax, 4(%rcx)
	movq	(%r14), %rbx
	movq	_PAGE_OFFSET@GOTPCREL(%rip), %r15
	movslq	(%r15), %rdi
	callq	_pgd_index
	movl	(%rbx,%rax,4), %r12d
	movq	(%r14), %rbx
	xorl	%edi, %edi
	callq	_pgd_index
	movl	%r12d, (%rbx,%rax,4)
	movslq	(%r15), %rdi
	addq	$4194304, %rdi                  ## imm = 0x400000
	movq	(%r14), %rbx
	callq	_pgd_index
	movl	(%rbx,%rax,4), %r15d
	movq	(%r14), %rbx
	movl	$4194304, %edi                  ## imm = 0x400000
	callq	_pgd_index
	movl	%r15d, (%rbx,%rax,4)
LBB0_3:
	xorl	%eax, %eax
	callq	___flush_tlb_all
	xorl	%edi, %edi
	callq	_get_cpu_gdt_table
	movl	%eax, %edi
	callq	___pa
	movl	%eax, -40(%rbp)
	movq	_GDT_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	decq	%rax
	movq	%rax, -48(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_load_gdt
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_efi_rt_eflags,4,2              ## @efi_rt_eflags
	.comm	_X86_CR4_PAE,8,3                ## @X86_CR4_PAE
	.comm	_swapper_pg_dir,8,3             ## @swapper_pg_dir
	.comm	_efi_bak_pg_dir_pointer,8,3     ## @efi_bak_pg_dir_pointer
	.comm	_PAGE_OFFSET,4,2                ## @PAGE_OFFSET
	.comm	_GDT_SIZE,8,3                   ## @GDT_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efi_call_phys_prelog           ; -- Begin function efi_call_phys_prelog
	.p2align	2
_efi_call_phys_prelog:                  ; @efi_call_phys_prelog
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _efi_rt_eflags@GOTPAGE
Lloh1:
	ldr	x8, [x8, _efi_rt_eflags@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_local_irq_save
	bl	_read_cr4_safe
Lloh3:
	adrp	x8, _X86_CR4_PAE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _X86_CR4_PAE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	and	x22, x8, x0
Lloh6:
	adrp	x19, _swapper_pg_dir@GOTPAGE
Lloh7:
	ldr	x19, [x19, _swapper_pg_dir@GOTPAGEOFF]
	ldr	x20, [x19]
	mov	x0, #0
	bl	_pgd_index
	ldr	w8, [x20, x0, lsl #2]
Lloh8:
	adrp	x21, _efi_bak_pg_dir_pointer@GOTPAGE
Lloh9:
	ldr	x21, [x21, _efi_bak_pg_dir_pointer@GOTPAGEOFF]
	ldr	x9, [x21]
	str	w8, [x9]
	ldr	x20, [x19]
	cbz	x22, LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _PAGE_OFFSET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PAGE_OFFSET@GOTPAGEOFF]
Lloh12:
	ldrsw	x0, [x8]
	bl	_pgd_index
	ldr	w8, [x20, x0, lsl #2]
	ldr	x9, [x19]
	str	w8, [x9]
	b	LBB0_3
LBB0_2:
	mov	w0, #4194304
	bl	_pgd_index
	ldr	w8, [x20, x0, lsl #2]
	ldr	x9, [x21]
	str	w8, [x9, #4]
	ldr	x20, [x19]
Lloh13:
	adrp	x21, _PAGE_OFFSET@GOTPAGE
Lloh14:
	ldr	x21, [x21, _PAGE_OFFSET@GOTPAGEOFF]
	ldrsw	x0, [x21]
	bl	_pgd_index
	ldr	w20, [x20, x0, lsl #2]
	ldr	x22, [x19]
	mov	x0, #0
	bl	_pgd_index
	str	w20, [x22, x0, lsl #2]
	ldrsw	x8, [x21]
	add	x0, x8, #1024, lsl #12          ; =4194304
	ldr	x20, [x19]
	bl	_pgd_index
	ldr	w20, [x20, x0, lsl #2]
	ldr	x19, [x19]
	mov	w0, #4194304
	bl	_pgd_index
	str	w20, [x19, x0, lsl #2]
LBB0_3:
	bl	___flush_tlb_all
	mov	w0, #0
	bl	_get_cpu_gdt_table
	bl	___pa
	str	w0, [sp, #8]
Lloh15:
	adrp	x8, _GDT_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GDT_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	sub	x8, x8, #1
	str	x8, [sp]
	mov	x0, sp
	bl	_load_gdt
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_efi_rt_eflags,4,2              ; @efi_rt_eflags
	.comm	_X86_CR4_PAE,8,3                ; @X86_CR4_PAE
	.comm	_swapper_pg_dir,8,3             ; @swapper_pg_dir
	.comm	_efi_bak_pg_dir_pointer,8,3     ; @efi_bak_pg_dir_pointer
	.comm	_PAGE_OFFSET,4,2                ; @PAGE_OFFSET
	.comm	_GDT_SIZE,8,3                   ; @GDT_SIZE
.subsections_via_symbols
