	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huge_ptep_get_and_clear        ## -- Begin function huge_ptep_get_and_clear
	.p2align	4, 0x90
_huge_ptep_get_and_clear:               ## @huge_ptep_get_and_clear
	.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
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movl	(%rdx), %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_pte_present
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	decl	(%r12)
LBB0_2:
	movq	_HUGETLB_PAGE_ORDER@GOTPCREL(%rip), %r13
	cmpl	$31, (%r13)
	je	LBB0_5
## %bb.3:
	movq	_HPAGE_MASK@GOTPCREL(%rip), %rax
	andq	(%rax), %rbx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_pte_clear
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	addq	$4, %r14
	incl	%r15d
	movzbl	(%r13), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%eax, %r15d
	jl	LBB0_4
LBB0_5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HPAGE_MASK,8,3                 ## @HPAGE_MASK
	.comm	_HUGETLB_PAGE_ORDER,4,2         ## @HUGETLB_PAGE_ORDER
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_huge_ptep_get_and_clear        ; -- Begin function huge_ptep_get_and_clear
	.p2align	2
_huge_ptep_get_and_clear:               ; @huge_ptep_get_and_clear
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w20, [x2]
	mov	x0, x20
	bl	_pte_present
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	sub	w8, w8, #1
	str	w8, [x21]
LBB0_2:
Lloh0:
	adrp	x23, _HUGETLB_PAGE_ORDER@GOTPAGE
Lloh1:
	ldr	x23, [x23, _HUGETLB_PAGE_ORDER@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #31
	b.eq	LBB0_5
; %bb.3:
	mov	w24, #0
Lloh2:
	adrp	x8, _HPAGE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HPAGE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	and	x22, x8, x22
Lloh5:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	mov	w26, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_pte_clear
	ldr	x8, [x25]
	add	x22, x8, x22
	add	x19, x19, #4
	add	w24, w24, #1
	ldr	w8, [x23]
	lsl	w8, w26, w8
	cmp	w24, w8
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HPAGE_MASK,8,3                 ; @HPAGE_MASK
	.comm	_HUGETLB_PAGE_ORDER,4,2         ; @HUGETLB_PAGE_ORDER
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
