	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vm_map_entry_unlink
_vm_map_entry_unlink:                   ## @vm_map_entry_unlink
	.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
	movl	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_VM_MAP_ASSERT_LOCKED
	movl	36(%r14), %esi
	leaq	-56(%rbp), %rcx
	leaq	-48(%rbp), %r13
	movq	%r15, %rdi
	xorl	%edx, %edx
	movq	%r13, %r8
	callq	_vm_map_splay_split
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_vm_map_splay_findnext
	cmpl	$128, %r12d
	je	LBB0_3
## %bb.1:
	cmpl	$129, %r12d
	jne	LBB0_10
## %bb.2:
	movl	36(%rbx), %eax
	movq	-48(%rbp), %rcx
	movl	%eax, 36(%rcx)
	movl	32(%rbx), %eax
	movl	%eax, 32(%rcx)
	movq	16(%rbx), %rax
	movq	16(%rcx), %rdx
	movq	%rdx, -48(%rbp)
	movq	%rax, 16(%rcx)
	movq	%rcx, %rbx
	jmp	LBB0_9
LBB0_3:
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_vm_map_splay_findprev
	movq	-56(%rbp), %rbx
	leaq	16(%r15), %rax
	cmpq	%rax, %rbx
	je	LBB0_5
## %bb.4:
	movq	24(%rbx), %rax
	movq	%rax, -56(%rbp)
	movq	$0, 24(%rbx)
	jmp	LBB0_9
LBB0_10:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movq	%rax, (%rcx)
	movq	%rcx, (%rax)
	testq	%rbx, %rbx
	jne	LBB0_11
	jmp	LBB0_7
LBB0_5:
	movq	-48(%rbp), %rax
	cmpq	%rbx, %rax
	je	LBB0_6
## %bb.8:
	movq	16(%rax), %rcx
	movq	%rcx, -48(%rbp)
	movq	$0, 16(%rax)
	movq	%rax, %rbx
LBB0_9:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movq	%rax, (%rcx)
	movq	%rcx, (%rax)
LBB0_11:
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_vm_map_splay_merge
LBB0_12:
	movq	%r15, %rdi
	callq	_VM_MAP_ASSERT_CONSISTENT
	movl	(%r15), %ecx
	decl	%ecx
	movl	%ecx, (%r15)
	movq	_KTR_VM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	movq	%r14, %r8
	callq	_CTR3
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movq	%rax, (%rcx)
	movq	%rcx, (%rax)
LBB0_7:
	movq	$0, 8(%r15)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm_map_entry_unlink: unlink object not mapped"

	.comm	_KTR_VM,4,2                     ## @KTR_VM
L_.str.1:                               ## @.str.1
	.asciz	"vm_map_entry_unlink: map %p, nentries %d, entry %p"

	.no_dead_strip	_vm_map_entry_unlink
.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_unlink
_vm_map_entry_unlink:                   ; @vm_map_entry_unlink
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_VM_MAP_ASSERT_LOCKED
	ldr	w1, [x19, #36]
	add	x3, sp, #8
	mov	x4, sp
	mov	x0, x20
	mov	w2, #0
	bl	_vm_map_splay_split
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	mov	x1, sp
	mov	x0, x21
	bl	_vm_map_splay_findnext
	cmp	w22, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w22, #129
	b.ne	LBB0_7
; %bb.2:
	ldr	x8, [sp]
	ldr	d0, [x21, #32]
	str	d0, [x8, #32]
	ldr	x9, [x21, #16]
	ldr	x10, [x8, #16]
	str	x10, [sp]
	str	x9, [x8, #16]
LBB0_3:
	mov	x21, x8
	b	LBB0_6
LBB0_4:
	add	x1, sp, #8
	mov	x0, x21
	bl	_vm_map_splay_findprev
	ldr	x21, [sp, #8]
	add	x8, x20, #16
	cmp	x21, x8
	b.eq	LBB0_10
; %bb.5:
	ldr	x8, [x21, #24]
	str	x8, [sp, #8]
	str	xzr, [x21, #24]
LBB0_6:
	ldp	x9, x8, [x19]
	str	x9, [x8]
	str	x8, [x9]
	b	LBB0_8
LBB0_7:
	ldp	x9, x8, [x19]
	str	x9, [x8]
	str	x8, [x9]
	cbz	x21, LBB0_13
LBB0_8:
	ldp	x3, x2, [sp]
	mov	x0, x20
	mov	x1, x21
	bl	_vm_map_splay_merge
LBB0_9:
	mov	x0, x20
	bl	_VM_MAP_ASSERT_CONSISTENT
	ldr	w8, [x20]
	sub	w3, w8, #1
	str	w3, [x20]
Lloh2:
	adrp	x8, _KTR_VM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KTR_VM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	mov	x4, x19
	bl	_CTR3
	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
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	x8, [sp]
	cmp	x8, x21
	b.eq	LBB0_12
; %bb.11:
	ldr	x9, [x8, #16]
	str	x9, [sp]
	str	xzr, [x8, #16]
	b	LBB0_3
LBB0_12:
	ldp	x9, x8, [x19]
	str	x9, [x8]
	str	x8, [x9]
LBB0_13:
	str	xzr, [x20, #8]
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm_map_entry_unlink: unlink object not mapped"

	.comm	_KTR_VM,4,2                     ; @KTR_VM
l_.str.1:                               ; @.str.1
	.asciz	"vm_map_entry_unlink: map %p, nentries %d, entry %p"

	.no_dead_strip	_vm_map_entry_unlink
.subsections_via_symbols
