	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lookup_memtype
_lookup_memtype:                        ## @lookup_memtype
	.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	%edi, %r14d
	movq	__PAGE_CACHE_WB@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movq	_x86_platform@GOTPCREL(%rip), %rax
	movslq	%edi, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	movl	%ebx, %edi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_1
LBB0_7:
	movslq	%r15d, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	movl	%ebx, %edi
	callq	_pat_pagerange_is_ram
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r14d
	movl	%r14d, %edi
	callq	_pfn_to_page
	movq	%rax, %rdi
	callq	_get_page_memtype
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.3:
	movl	(%r12), %r15d
	jmp	LBB0_7
LBB0_4:
	movq	_memtype_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	_memtype_rbroot@GOTPCREL(%rip), %rdi
	movl	%r14d, %esi
	callq	_memtype_rb_search
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	__PAGE_CACHE_UC_MINUS@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r15d
	movq	%rbx, %rdi
	callq	_spin_unlock
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	__PAGE_CACHE_WB,4,2             ## @_PAGE_CACHE_WB
	.comm	_x86_platform,8,3               ## @x86_platform
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_memtype_lock,4,2               ## @memtype_lock
	.comm	_memtype_rbroot,4,2             ## @memtype_rbroot
	.comm	__PAGE_CACHE_UC_MINUS,4,2       ## @_PAGE_CACHE_UC_MINUS
	.no_dead_strip	_lookup_memtype
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lookup_memtype
_lookup_memtype:                        ; @lookup_memtype
	.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	x19, x0
Lloh0:
	adrp	x20, __PAGE_CACHE_WB@GOTPAGE
Lloh1:
	ldr	x20, [x20, __PAGE_CACHE_WB@GOTPAGEOFF]
	ldr	w21, [x20]
Lloh2:
	adrp	x8, _x86_platform@GOTPAGE
Lloh3:
	ldr	x8, [x8, _x86_platform@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	sxtw	x22, w19
Lloh5:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x1, x9, x22
	blr	x8
	cbnz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x23]
	add	x1, x8, x22
	mov	x0, x19
	bl	_pat_pagerange_is_ram
	cbz	x0, LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	asr	w0, w19, w8
	bl	_pfn_to_page
	bl	_get_page_memtype
	ldr	w8, [x20]
	cmn	w0, #1
	csel	w21, w8, w0, eq
	b	LBB0_4
LBB0_3:
Lloh10:
	adrp	x20, _memtype_lock@GOTPAGE
Lloh11:
	ldr	x20, [x20, _memtype_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock
Lloh12:
	adrp	x0, _memtype_rbroot@GOTPAGE
Lloh13:
	ldr	x0, [x0, _memtype_rbroot@GOTPAGEOFF]
	mov	x1, x19
	bl	_memtype_rb_search
Lloh14:
	adrp	x8, __PAGE_CACHE_UC_MINUS@GOTPAGE
Lloh15:
	ldr	x8, [x8, __PAGE_CACHE_UC_MINUS@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x0, eq
	ldr	w21, [x8]
	mov	x0, x20
	bl	_spin_unlock
LBB0_4:
	sxtw	x0, w21
	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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	__PAGE_CACHE_WB,4,2             ; @_PAGE_CACHE_WB
	.comm	_x86_platform,8,3               ; @x86_platform
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_memtype_lock,4,2               ; @memtype_lock
	.comm	_memtype_rbroot,4,2             ; @memtype_rbroot
	.comm	__PAGE_CACHE_UC_MINUS,4,2       ; @_PAGE_CACHE_UC_MINUS
	.no_dead_strip	_lookup_memtype
.subsections_via_symbols
