	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mapping_level
_mapping_level:                         ## @mapping_level
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	(%rdi), %edi
	callq	_gfn_to_memslot
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_PT_PAGE_TABLE_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_10
LBB0_3:
	movl	(%r15), %edi
	movl	%r14d, %esi
	callq	_host_mapping_level
	movl	%eax, %r12d
	movq	_PT_PAGE_TABLE_LEVEL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_10
## %bb.4:
	movq	_PT_DIRECTORY_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmpl	%r12d, %ebx
	jg	LBB0_9
## %bb.5:
	incl	%r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_has_wrprotected_page
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%ebx
	cmpl	%ebx, %r12d
	jne	LBB0_6
## %bb.8:
	movl	%r12d, %ebx
LBB0_9:
	decl	%ebx
	movl	%ebx, %r12d
LBB0_10:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PT_PAGE_TABLE_LEVEL,4,2        ## @PT_PAGE_TABLE_LEVEL
	.comm	_PT_DIRECTORY_LEVEL,4,2         ## @PT_DIRECTORY_LEVEL
	.no_dead_strip	_mapping_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mapping_level
_mapping_level:                         ; @mapping_level
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_gfn_to_memslot
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _PT_PAGE_TABLE_LEVEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PT_PAGE_TABLE_LEVEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_3:
	ldr	w0, [x20]
	mov	x1, x19
	bl	_host_mapping_level
Lloh3:
	adrp	x8, _PT_PAGE_TABLE_LEVEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PT_PAGE_TABLE_LEVEL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_10
; %bb.4:
Lloh6:
	adrp	x8, _PT_DIRECTORY_LEVEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PT_DIRECTORY_LEVEL@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	cmp	w21, w0
	b.gt	LBB0_9
; %bb.5:
	add	w22, w0, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	x1, x19
	mov	x2, x21
	bl	_has_wrprotected_page
	cbnz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	cmp	w22, w21
	b.ne	LBB0_6
; %bb.8:
	mov	x21, x22
LBB0_9:
	sub	w0, w21, #1
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PT_PAGE_TABLE_LEVEL,4,2        ; @PT_PAGE_TABLE_LEVEL
	.comm	_PT_DIRECTORY_LEVEL,4,2         ; @PT_DIRECTORY_LEVEL
	.no_dead_strip	_mapping_level
.subsections_via_symbols
