	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_map_entry_delete
_vm_map_entry_delete:                   ## @vm_map_entry_delete
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_UNLINK_MERGE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_vm_map_entry_unlink
	movq	32(%rbx), %r15
	movl	(%rbx), %eax
	movq	_MAP_ENTRY_GUARD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 48(%rbx)
	sete	%dil
	callq	_MPASS
	movq	_MAP_ENTRY_IS_SUB_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edi, %edi
	andl	(%rbx), %eax
	sete	%dil
	callq	_MPASS
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_MPASS
	movq	(%r14), %rsi
	jmp	LBB0_22
LBB0_2:
	movq	8(%rbx), %r12
	subq	16(%rbx), %r12
	subl	%r12d, 8(%r14)
	movq	48(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_swap_release_by_cred
	movq	48(%rbx), %rdi
	callq	_crfree
	movl	(%rbx), %eax
LBB0_4:
	movq	_MAP_ENTRY_IS_SUB_MAP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_19
## %bb.5:
	testq	%r15, %r15
	je	LBB0_19
## %bb.6:
	movl	$1, %edi
	cmpq	$0, 48(%rbx)
	je	LBB0_9
## %bb.7:
	cmpq	$0, 32(%r15)
	je	LBB0_9
## %bb.8:
	movq	_MAP_ENTRY_NEEDS_COPY@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	testl	%eax, (%rcx)
	setne	%dil
LBB0_9:
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	%r12, %rdi
	callq	_atop
	movq	%rax, %r13
	movl	40(%rbx), %edi
	callq	_OFF_TO_IDX
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_VM_OBJECT_WLOCK
	cmpl	$1, (%r15)
	je	LBB0_18
## %bb.10:
	movq	_OBJ_NOSPLIT@GOTPCREL(%rip), %rax
	movq	_OBJ_ONEMAPPING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %eax
	orl	%ecx, %eax
	andl	4(%r15), %eax
	cmpl	%ecx, %eax
	je	LBB0_12
## %bb.11:
	movq	_kernel_object@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_18
LBB0_12:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	addq	%r12, %r13
	movq	%r15, %rdi
	callq	_vm_object_collapse
	movq	_OBJPR_NOTMAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdx
	callq	_vm_object_page_remove
	movq	8(%r15), %rax
	movq	_OBJT_SWAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_swap_pager_freespace
LBB0_14:
	movq	16(%r15), %r13
	cmpq	%r13, -56(%rbp)                 ## 8-byte Folded Reload
	jl	LBB0_18
## %bb.15:
	subq	%r12, %r13
	jle	LBB0_18
## %bb.16:
	movq	%r12, 16(%r15)
	cmpq	$0, 32(%r15)
	je	LBB0_18
## %bb.17:
	movq	24(%r15), %r12
	movq	%r13, %rdi
	callq	_ptoa
	xorl	%edi, %edi
	cmpq	%rax, %r12
	setge	%dil
	movq	%r15, %rsi
	callq	_KASSERT
	movq	%r13, %rdi
	callq	_ptoa
	movq	32(%r15), %rsi
	movq	%rax, %rdi
	callq	_swap_release_by_cred
	movq	%r13, %rdi
	callq	_ptoa
	subq	%rax, 24(%r15)
LBB0_18:
	movq	%r15, %rdi
	callq	_VM_OBJECT_WUNLOCK
	cmpq	$0, (%r14)
	je	LBB0_23
LBB0_21:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
LBB0_22:
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vm_map_entry_deallocate        ## TAILCALL
LBB0_19:
	movq	$0, 32(%rbx)
	cmpq	$0, (%r14)
	jne	LBB0_21
LBB0_23:
	movq	_curthread@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	movq	%rcx, 24(%rbx)
	movq	%rbx, (%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UNLINK_MERGE_NONE,4,2          ## @UNLINK_MERGE_NONE
	.comm	_MAP_ENTRY_GUARD,4,2            ## @MAP_ENTRY_GUARD
	.comm	_MAP_ENTRY_IS_SUB_MAP,4,2       ## @MAP_ENTRY_IS_SUB_MAP
	.comm	_MAP_ENTRY_NEEDS_COPY,4,2       ## @MAP_ENTRY_NEEDS_COPY
	.comm	_OBJ_NOSPLIT,4,2                ## @OBJ_NOSPLIT
	.comm	_OBJ_ONEMAPPING,4,2             ## @OBJ_ONEMAPPING
	.comm	_kernel_object,8,3              ## @kernel_object
	.comm	_OBJPR_NOTMAPPED,4,2            ## @OBJPR_NOTMAPPED
	.comm	_OBJT_SWAP,8,3                  ## @OBJT_SWAP
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_curthread,8,3                  ## @curthread
	.no_dead_strip	_vm_map_entry_delete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vm_map_entry_delete
_vm_map_entry_delete:                   ; @vm_map_entry_delete
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _UNLINK_MERGE_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UNLINK_MERGE_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_vm_map_entry_unlink
	ldr	x21, [x19, #32]
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _MAP_ENTRY_GUARD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAP_ENTRY_GUARD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19, #48]
	cmp	x8, #0
	cset	w0, eq
	bl	_MPASS
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _MAP_ENTRY_IS_SUB_MAP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAP_ENTRY_IS_SUB_MAP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, eq
	bl	_MPASS
	cmp	x21, #0
	cset	w0, eq
	bl	_MPASS
	ldr	x1, [x20]
	b	LBB0_7
LBB0_2:
	ldp	x9, x10, [x19, #8]
	ldr	w11, [x20, #8]
	sub	x22, x9, x10
	sub	w9, w11, w22
	str	w9, [x20, #8]
	ldr	x1, [x19, #48]
	cbz	x1, LBB0_4
; %bb.3:
	mov	x0, x22
	bl	_swap_release_by_cred
	ldr	x0, [x19, #48]
	bl	_crfree
	ldr	w8, [x19]
LBB0_4:
Lloh9:
	adrp	x9, _MAP_ENTRY_IS_SUB_MAP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAP_ENTRY_IS_SUB_MAP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w9, w9, w8
	cmp	w9, #0
	ccmp	x21, #0, #4, eq
	b.ne	LBB0_8
; %bb.5:
	str	xzr, [x19, #32]
	ldr	x8, [x20]
	cbz	x8, LBB0_21
LBB0_6:
Lloh12:
	adrp	x8, _TRUE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
LBB0_7:
	mov	x0, x19
	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	_vm_map_entry_deallocate
LBB0_8:
	ldr	x9, [x19, #48]
	cbz	x9, LBB0_11
; %bb.9:
	ldr	x9, [x21, #32]
	cbz	x9, LBB0_11
; %bb.10:
Lloh15:
	adrp	x9, _MAP_ENTRY_NEEDS_COPY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MAP_ENTRY_NEEDS_COPY@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	b	LBB0_12
LBB0_11:
	mov	w0, #1
LBB0_12:
	mov	x1, x19
	bl	_KASSERT
	mov	x0, x22
	bl	_atop
	mov	x23, x0
	ldr	w0, [x19, #40]
	bl	_OFF_TO_IDX
	mov	x22, x0
	mov	x0, x21
	bl	_VM_OBJECT_WLOCK
	ldr	w8, [x21]
	cmp	w8, #1
	b.eq	LBB0_20
; %bb.13:
Lloh18:
	adrp	x8, _OBJ_NOSPLIT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OBJ_NOSPLIT@GOTPAGEOFF]
	ldr	w9, [x21, #4]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x10, _OBJ_ONEMAPPING@GOTPAGE
Lloh22:
	ldr	x10, [x10, _OBJ_ONEMAPPING@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	orr	w8, w10, w8
	and	w8, w8, w9
Lloh24:
	adrp	x9, _kernel_object@GOTPAGE
Lloh25:
	ldr	x9, [x9, _kernel_object@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	w8, w10
	ccmp	x21, x9, #4, ne
	b.ne	LBB0_20
; %bb.14:
	add	x24, x22, x23
	mov	x0, x21
	bl	_vm_object_collapse
Lloh27:
	adrp	x8, _OBJPR_NOTMAPPED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OBJPR_NOTMAPPED@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	bl	_vm_object_page_remove
	ldr	x8, [x21, #8]
Lloh30:
	adrp	x9, _OBJT_SWAP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _OBJT_SWAP@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_swap_pager_freespace
LBB0_16:
	ldr	x8, [x21, #16]
	cmp	x24, x8
	b.lt	LBB0_20
; %bb.17:
	subs	x23, x8, x22
	b.le	LBB0_20
; %bb.18:
	str	x22, [x21, #16]
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_20
; %bb.19:
	ldr	x22, [x21, #24]
	mov	x0, x23
	bl	_ptoa
	cmp	x22, x0
	cset	w0, ge
	mov	x1, x21
	bl	_KASSERT
	mov	x0, x23
	bl	_ptoa
	ldr	x1, [x21, #32]
	bl	_swap_release_by_cred
	mov	x0, x23
	bl	_ptoa
	ldr	x8, [x21, #24]
	sub	x8, x8, x0
	str	x8, [x21, #24]
LBB0_20:
	mov	x0, x21
	bl	_VM_OBJECT_WUNLOCK
	ldr	x8, [x20]
	cbnz	x8, LBB0_6
LBB0_21:
Lloh33:
	adrp	x8, _curthread@GOTPAGE
Lloh34:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	ldr	x9, [x8]
	str	x9, [x19, #24]
	str	x19, [x8]
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_UNLINK_MERGE_NONE,4,2          ; @UNLINK_MERGE_NONE
	.comm	_MAP_ENTRY_GUARD,4,2            ; @MAP_ENTRY_GUARD
	.comm	_MAP_ENTRY_IS_SUB_MAP,4,2       ; @MAP_ENTRY_IS_SUB_MAP
	.comm	_MAP_ENTRY_NEEDS_COPY,4,2       ; @MAP_ENTRY_NEEDS_COPY
	.comm	_OBJ_NOSPLIT,4,2                ; @OBJ_NOSPLIT
	.comm	_OBJ_ONEMAPPING,4,2             ; @OBJ_ONEMAPPING
	.comm	_kernel_object,8,3              ; @kernel_object
	.comm	_OBJPR_NOTMAPPED,4,2            ; @OBJPR_NOTMAPPED
	.comm	_OBJT_SWAP,8,3                  ; @OBJT_SWAP
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_curthread,8,3                  ; @curthread
	.no_dead_strip	_vm_map_entry_delete
.subsections_via_symbols
