	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gpte_to_spte
_gpte_to_spte:                          ## @gpte_to_spte
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_pte_flags
	movq	%rax, %r13
	movq	__PAGE_GLOBAL@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rbx
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
LBB0_3:
	movl	%r15d, %edi
	callq	_pte_pfn
	addq	%rax, %rbx
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_get_pfn
	movq	%rax, %rbx
	cmpq	$-1, %rax
	je	LBB0_5
## %bb.4:
	notq	%r12
	andq	%r12, %r13
	jmp	LBB0_6
LBB0_5:
	movl	%r15d, %edi
	callq	_pte_pfn
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_kill_guest
	xorl	%r13d, %r13d
LBB0_6:
	movq	%r13, %rdi
	callq	___pgprot
	movq	%rbx, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pfn_pte                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	__PAGE_GLOBAL,8,3               ## @_PAGE_GLOBAL
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to get page %lu"

	.no_dead_strip	_gpte_to_spte
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gpte_to_spte
_gpte_to_spte:                          ; @gpte_to_spte
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_pte_flags
	mov	x22, x0
Lloh0:
	adrp	x8, __PAGE_GLOBAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, __PAGE_GLOBAL@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	udiv	x24, x8, x9
	mov	x0, x21
	bl	_pte_pfn
	add	x0, x0, x24
	mov	x1, x20
	bl	_get_pfn
	mov	x20, x0
	cmn	x0, #1
	b.eq	LBB0_2
; %bb.1:
	bic	x0, x22, x23
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_pte_pfn
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_kill_guest
	mov	x0, #0
LBB0_3:
	bl	___pgprot
	mov	x1, x0
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_pfn_pte
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	__PAGE_GLOBAL,8,3               ; @_PAGE_GLOBAL
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to get page %lu"

	.no_dead_strip	_gpte_to_spte
.subsections_via_symbols
