	.file	"extr_vm_fault.c_vm_fault_dontneed.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vm_fault_dontneed, @function
vm_fault_dontneed:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR 24[rdi]
	mov	DWORD PTR [rsp], edx
	mov	rdi, r13
	call	VM_OBJECT_ASSERT_WLOCKED@PLT
	mov	r12, QWORD PTR 16[rbp]
	cmp	r13, r12
	je	.L2
	mov	rdi, r12
	call	VM_OBJECT_TRYWLOCK@PLT
	test	eax, eax
	je	.L31
.L3:
	mov	eax, DWORD PTR OBJ_FICTITIOUS[rip]
	or	eax, DWORD PTR OBJ_UNMANAGED[rip]
	test	DWORD PTR [r12], eax
	jne	.L6
	cmp	DWORD PTR MAXPAGESIZES[rip], 1
	mov	r14, QWORD PTR VM_FAULT_DONTNEED_MIN[rip]
	jle	.L4
.L32:
	mov	rax, QWORD PTR pagesizes[rip]
	mov	rax, QWORD PTR 8[rax]
	cmp	r14, rax
	cmovl	r14, rax
.L4:
	mov	rdi, rbx
	mov	rsi, r14
	mov	r15, r14
	call	rounddown2@PLT
	mov	edi, DWORD PTR [rsp]
	sub	r15, QWORD PTR PAGE_SIZE[rip]
	sub	rbx, rax
	mov	QWORD PTR 8[rsp], rax
	call	ptoa@PLT
	mov	r8, QWORD PTR 8[rsp]
	sub	r15, rax
	cmp	rbx, r15
	jl	.L8
	mov	r15, QWORD PTR 8[rbp]
	mov	rbx, QWORD PTR [r15]
	cmp	rbx, r8
	jge	.L8
	mov	rcx, r8
	mov	rax, r8
	mov	rdx, r8
	mov	QWORD PTR [rsp], r8
	sub	rcx, rbx
	sub	rax, r14
	cmp	rcx, r14
	mov	ecx, DWORD PTR MADV_DONTNEED[rip]
	cmovge	rbx, rax
	mov	rax, QWORD PTR 0[rbp]
	mov	edi, DWORD PTR [rax]
	mov	rsi, rbx
	call	pmap_advise@PLT
	mov	edi, DWORD PTR 8[r15]
	call	OFF_TO_IDX@PLT
	sub	rbx, QWORD PTR [r15]
	mov	rdi, rbx
	mov	rbp, rax
	call	atop@PLT
	mov	rdi, r12
	lea	rsi, 0[rbp+rax]
	call	vm_page_find_least@PLT
	mov	edi, DWORD PTR 8[r15]
	mov	rbp, rax
	call	OFF_TO_IDX@PLT
	mov	r8, QWORD PTR [rsp]
	mov	r14, rax
	mov	rdi, r8
	sub	rdi, QWORD PTR [r15]
	call	atop@PLT
	add	r14, rax
	test	rbp, rbp
	jne	.L10
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, rbp
	call	vm_page_unlock@PLT
.L12:
	test	rbx, rbx
	je	.L8
	mov	rbp, rbx
.L10:
	cmp	QWORD PTR 0[rbp], r14
	jge	.L8
	mov	esi, DWORD PTR listq[rip]
	mov	rdi, rbp
	call	TAILQ_NEXT@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	vm_page_all_valid@PLT
	test	eax, eax
	je	.L12
	mov	rdi, rbp
	call	vm_page_busied@PLT
	test	rax, rax
	jne	.L12
	mov	rdi, rbp
	call	vm_page_lock@PLT
	mov	rdi, rbp
	call	vm_page_inactive@PLT
	test	eax, eax
	jne	.L14
	mov	rdi, rbp
	call	vm_page_deactivate@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L6:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	VM_OBJECT_WUNLOCK@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	cmp	r13, r12
	jne	.L6
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR OBJ_FICTITIOUS[rip]
	or	eax, DWORD PTR OBJ_UNMANAGED[rip]
	test	DWORD PTR 0[r13], eax
	jne	.L1
	cmp	DWORD PTR MAXPAGESIZES[rip], 1
	mov	r14, QWORD PTR VM_FAULT_DONTNEED_MIN[rip]
	jg	.L32
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L31:
	mov	rdi, r13
	call	VM_OBJECT_WUNLOCK@PLT
	mov	rdi, r12
	call	VM_OBJECT_WLOCK@PLT
	mov	rdi, r13
	call	VM_OBJECT_WLOCK@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	vm_fault_dontneed, .-vm_fault_dontneed
	.comm	pagesizes,8,8
	.comm	listq,4,4
	.comm	VM_FAULT_DONTNEED_MIN,8,8
	.comm	PAGE_SIZE,8,8
	.comm	OBJ_UNMANAGED,4,4
	.comm	OBJ_FICTITIOUS,4,4
	.comm	MAXPAGESIZES,4,4
	.comm	MADV_DONTNEED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_vm_fault.c_vm_fault_dontneed.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vm_fault_dontneed, %function
vm_fault_dontneed:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r7, [r0, #12]
	mov	r8, r1
	mov	r0, r7
	mov	r5, r2
	bl	VM_OBJECT_ASSERT_WLOCKED
	ldr	r6, [r4, #8]
	cmp	r7, r6
	beq	.L2
	mov	r0, r6
	bl	VM_OBJECT_TRYWLOCK
	cmp	r0, #0
	beq	.L31
.L3:
	ldr	r2, .L32
	ldr	r3, .L32+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r6]
	orr	r3, r3, r1
	tst	r3, r2
	bne	.L6
.L17:
	ldr	r3, .L32+8
	ldr	r2, .L32+12
	ldr	r3, [r3]
	ldr	r10, [r2]
	cmp	r3, #1
	ble	.L4
	ldr	r3, .L32+16
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r10, r3
	movlt	r10, r3
.L4:
	mov	r1, r10
	mov	r0, r8
	bl	rounddown2
	ldr	r3, .L32+20
	mov	r9, r0
	mov	r0, r5
	ldr	r5, [r3]
	bl	ptoa
	sub	r5, r10, r5
	sub	r8, r8, r9
	sub	r5, r5, r0
	cmp	r8, r5
	blt	.L8
	ldr	r5, [r4, #4]
	ldr	r8, [r5]
	cmp	r8, r9
	bge	.L8
	sub	r3, r9, r8
	cmp	r3, r10
	ldr	r2, [r4]
	ldr	r3, .L32+24
	subge	r8, r9, r10
	mov	r1, r8
	ldr	r3, [r3]
	ldr	r0, [r2]
	mov	r2, r9
	bl	pmap_advise
	ldr	r0, [r5, #4]
	bl	OFF_TO_IDX
	ldr	r3, [r5]
	mov	r4, r0
	sub	r0, r8, r3
	bl	atop
	mov	r1, r0
	mov	r0, r6
	add	r1, r4, r1
	bl	vm_page_find_least
	mov	r4, r0
	ldr	r0, [r5, #4]
	bl	OFF_TO_IDX
	mov	r8, r0
	ldr	r0, [r5]
	sub	r0, r9, r0
	bl	atop
	cmp	r4, #0
	add	r8, r8, r0
	beq	.L8
	ldr	r9, .L32+28
	b	.L10
.L14:
	mov	r0, r4
	bl	vm_page_unlock
.L12:
	cmp	r5, #0
	beq	.L8
	mov	r4, r5
.L10:
	ldr	r3, [r4]
	cmp	r3, r8
	bge	.L8
	ldr	r1, [r9]
	mov	r0, r4
	bl	TAILQ_NEXT
	mov	r5, r0
	mov	r0, r4
	bl	vm_page_all_valid
	cmp	r0, #0
	beq	.L12
	mov	r0, r4
	bl	vm_page_busied
	cmp	r0, #0
	bne	.L12
	mov	r0, r4
	bl	vm_page_lock
	mov	r0, r4
	bl	vm_page_inactive
	cmp	r0, #0
	bne	.L14
	mov	r0, r4
	bl	vm_page_deactivate
	b	.L14
.L8:
	cmp	r7, r6
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
.L6:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	VM_OBJECT_WUNLOCK
.L2:
	ldr	r2, .L32
	ldr	r3, .L32+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r2, [r7]
	orr	r3, r3, r1
	tst	r3, r2
	popne	{r4, r5, r6, r7, r8, r9, r10, pc}
	b	.L17
.L31:
	mov	r0, r7
	bl	VM_OBJECT_WUNLOCK
	mov	r0, r6
	bl	VM_OBJECT_WLOCK
	mov	r0, r7
	bl	VM_OBJECT_WLOCK
	b	.L3
.L33:
	.align	2
.L32:
	.word	OBJ_UNMANAGED
	.word	OBJ_FICTITIOUS
	.word	MAXPAGESIZES
	.word	VM_FAULT_DONTNEED_MIN
	.word	pagesizes
	.word	PAGE_SIZE
	.word	MADV_DONTNEED
	.word	listq
	.size	vm_fault_dontneed, .-vm_fault_dontneed
	.comm	pagesizes,4,4
	.comm	listq,4,4
	.comm	VM_FAULT_DONTNEED_MIN,4,4
	.comm	PAGE_SIZE,4,4
	.comm	OBJ_UNMANAGED,4,4
	.comm	OBJ_FICTITIOUS,4,4
	.comm	MAXPAGESIZES,4,4
	.comm	MADV_DONTNEED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
