	.file	"extr_vm_phantom_cache.c_vm_phantom_cache_update.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	vm_phantom_cache_update
	.type	vm_phantom_cache_update, @function
vm_phantom_cache_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	VM_PAGE_OBJECT@PLT
	mov	esi, DWORD PTR LCK_MTX_ASSERT_OWNED[rip]
	lea	rdi, vm_page_queue_lock[rip]
	mov	rbx, rax
	call	LCK_MTX_ASSERT@PLT
	mov	rdi, rbx
	call	vm_object_lock_assert_exclusive@PLT
	cmp	QWORD PTR vm_phantom_cache_num_entries[rip], 0
	jne	.L12
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rcx, QWORD PTR PAGE_SHIFT[rip]
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	rdx, QWORD PTR pg_masks[rip]
	shr	rax, cl
	and	rax, QWORD PTR VM_GHOST_PAGE_MASK[rip]
	mov	r12d, DWORD PTR [rdx+rax*4]
	mov	esi, r12d
	call	vm_phantom_cache_lookup_ghost@PLT
	test	rax, rax
	je	.L1
	not	r12d
	and	DWORD PTR [rax], r12d
	lea	rsi, sample_period_ghost_found_count_ssd[rip]
	add	DWORD PTR phantom_cache_stats[rip], 1
	add	DWORD PTR vm_pageout_vminfo[rip], 1
	cmp	QWORD PTR [rbx], 0
	jne	.L10
	lea	rsi, sample_period_ghost_found_count[rip]
.L10:
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	edi, 1
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	OSAddAtomic@PLT
	.cfi_endproc
.LFE0:
	.size	vm_phantom_cache_update, .-vm_phantom_cache_update
	.comm	vm_phantom_cache_num_entries,8,8
	.comm	vm_pageout_vminfo,4,4
	.comm	vm_page_queue_lock,4,4
	.comm	sample_period_ghost_found_count_ssd,4,4
	.comm	sample_period_ghost_found_count,4,4
	.comm	phantom_cache_stats,4,4
	.comm	pg_masks,8,8
	.comm	VM_GHOST_PAGE_MASK,8,8
	.comm	PAGE_SHIFT,8,8
	.comm	LCK_MTX_ASSERT_OWNED,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_phantom_cache.c_vm_phantom_cache_update.c"
	.text
	.align	2
	.global	vm_phantom_cache_update
	.syntax unified
	.arm
	.fpu softvfp
	.type	vm_phantom_cache_update, %function
vm_phantom_cache_update:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, r0
	bl	VM_PAGE_OBJECT
	mov	r4, r0
	ldr	r3, .L11
	ldr	r0, .L11+4
	ldr	r1, [r3]
	bl	LCK_MTX_ASSERT
	mov	r0, r4
	bl	vm_object_lock_assert_exclusive
	ldr	r3, .L11+8
	ldr	r3, [r3]
	cmp	r3, #0
	popeq	{r4, r5, r6, pc}
	ldr	r1, .L11+12
	ldr	r3, .L11+16
	ldr	r2, .L11+20
	ldr	r1, [r1]
	ldr	r0, [r5]
	ldr	r3, [r3]
	ldr	r2, [r2]
	and	r3, r3, r0, lsr r1
	ldr	r6, [r2, r3, lsl #2]
	mov	r0, r5
	mov	r1, r6
	bl	vm_phantom_cache_lookup_ghost
	cmp	r0, #0
	popeq	{r4, r5, r6, pc}
	ldr	r3, [r4]
	ldr	lr, .L11+24
	ldr	r1, .L11+28
	ldr	ip, [r0]
	ldr	r2, [lr]
	cmp	r3, #0
	ldr	r3, [r1]
	add	r2, r2, #1
	bic	ip, ip, r6
	add	r3, r3, #1
	str	ip, [r0]
	str	r2, [lr]
	str	r3, [r1]
	beq	.L5
	pop	{r4, r5, r6, lr}
	mov	r0, #1
	ldr	r1, .L11+32
	b	OSAddAtomic
.L5:
	mov	r0, #1
	pop	{r4, r5, r6, lr}
	ldr	r1, .L11+36
	b	OSAddAtomic
.L12:
	.align	2
.L11:
	.word	LCK_MTX_ASSERT_OWNED
	.word	vm_page_queue_lock
	.word	vm_phantom_cache_num_entries
	.word	PAGE_SHIFT
	.word	VM_GHOST_PAGE_MASK
	.word	pg_masks
	.word	phantom_cache_stats
	.word	vm_pageout_vminfo
	.word	sample_period_ghost_found_count_ssd
	.word	sample_period_ghost_found_count
	.size	vm_phantom_cache_update, .-vm_phantom_cache_update
	.comm	vm_phantom_cache_num_entries,4,4
	.comm	vm_pageout_vminfo,4,4
	.comm	vm_page_queue_lock,4,4
	.comm	sample_period_ghost_found_count_ssd,4,4
	.comm	sample_period_ghost_found_count,4,4
	.comm	phantom_cache_stats,4,4
	.comm	pg_masks,4,4
	.comm	VM_GHOST_PAGE_MASK,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	LCK_MTX_ASSERT_OWNED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
