	.file	"extr_pmap.c_get_pv_entry.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Approaching the limit on PV entries, consider increasing either the vm.pmap.shpgperproc or the vm.pmap.pv_entries tunable.\n"
	.text
	.p2align 4
	.type	get_pv_entry, @function
get_pv_entry:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	lea	rdi, pvh_global_lock[rip]
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR RA_WLOCKED[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	rw_assert@PLT
	mov	esi, DWORD PTR MA_OWNED[rip]
	mov	rdi, rbp
	call	PMAP_LOCK_ASSERT@PLT
	mov	edi, DWORD PTR pv_entry_allocs[rip]
	lea	eax, 1[rdi]
	mov	DWORD PTR pv_entry_allocs[rip], eax
	call	PV_STAT@PLT
	mov	rax, QWORD PTR pv_entry_count[rip]
	add	rax, 1
	cmp	rax, QWORD PTR pv_entry_high_water[rip]
	mov	QWORD PTR pv_entry_count[rip], rax
	jle	.L19
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	QWORD PTR pv_vafree[rip], 0
	jne	.L13
.L16:
	test	rbx, rbx
	jne	.L43
	mov	rdi, rbp
	call	pmap_pv_reclaim@PLT
	mov	QWORD PTR [rsp], rax
	test	rax, rax
	jne	.L20
.L19:
	mov	rdi, rbp
	call	TAILQ_FIRST@PLT
	mov	r12, rax
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR _NPCM[rip]
	test	eax, eax
	jle	.L5
	lea	esi, -1[rax]
	mov	rcx, QWORD PTR [r12]
	xor	eax, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	lea	rdx, 1[rax]
	cmp	rsi, rax
	je	.L5
	mov	rax, rdx
.L8:
	mov	edi, DWORD PTR [rcx+rax*4]
	mov	r13d, eax
	lea	r14, 0[0+rax*4]
	test	edi, edi
	je	.L6
	call	bsfl@PLT
	cmp	r13d, DWORD PTR _NPCM[rip]
	jge	.L5
	mov	edx, r13d
	mov	rcx, QWORD PTR 8[r12]
	mov	rsi, -2
	sal	edx, 5
	add	edx, eax
	movsx	rdx, edx
	lea	r13, [rcx+rdx*4]
	mov	rdx, QWORD PTR [r12]
	mov	ecx, eax
	rol	rsi, cl
	and	DWORD PTR [rdx+r14], esi
	mov	ecx, DWORD PTR _NPCM[rip]
	test	ecx, ecx
	jle	.L9
	mov	rax, rdx
	lea	edx, -1[rcx]
	lea	rdx, 4[rax+rdx*4]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L10:
	add	rax, 4
	cmp	rdx, rax
	je	.L9
.L12:
	mov	ecx, DWORD PTR [rax]
	test	ecx, ecx
	je	.L10
.L40:
	mov	edi, DWORD PTR pv_entry_spare[rip]
	lea	eax, -1[rdi]
	mov	DWORD PTR pv_entry_spare[rip], eax
	call	PV_STAT@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, DWORD PTR VM_ALLOC_NORMAL[rip]
	xor	esi, esi
	or	edx, DWORD PTR VM_ALLOC_NOOBJ[rip]
	xor	edi, edi
	or	edx, DWORD PTR VM_ALLOC_WIRED[rip]
	call	vm_page_alloc@PLT
	mov	QWORD PTR [rsp], rax
	test	rax, rax
	je	.L16
.L20:
	mov	edi, DWORD PTR pc_chunk_count[rip]
	lea	eax, 1[rdi]
	mov	DWORD PTR pc_chunk_count[rip], eax
	call	PV_STAT@PLT
	mov	edi, DWORD PTR pc_chunk_allocs[rip]
	lea	eax, 1[rdi]
	mov	DWORD PTR pc_chunk_allocs[rip], eax
	call	PV_STAT@PLT
	lea	rdi, pv_vafree[rip]
	call	pmap_ptelist_alloc@PLT
	mov	rsi, rsp
	mov	edx, 1
	mov	edi, eax
	mov	r12, rax
	call	pmap_qenter@PLT
	mov	rsi, QWORD PTR pc_freemask[rip]
	mov	rcx, QWORD PTR [r12]
	mov	QWORD PTR 16[r12], rbp
	mov	eax, DWORD PTR [rsi]
	and	eax, -2
	mov	DWORD PTR [rcx], eax
	cmp	DWORD PTR _NPCM[rip], 1
	mov	eax, 1
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdx, QWORD PTR [rsi+rax*8]
	mov	DWORD PTR [rcx+rax*4], edx
	add	rax, 1
	cmp	DWORD PTR _NPCM[rip], eax
	jg	.L17
.L18:
	mov	edx, DWORD PTR pc_lru[rip]
	mov	rsi, r12
	lea	rdi, pv_chunks[rip]
	call	TAILQ_INSERT_TAIL@PLT
	mov	rdi, rbp
	mov	rsi, r12
	mov	r13, QWORD PTR 8[r12]
	mov	edx, DWORD PTR pc_list[rip]
	call	TAILQ_INSERT_HEAD@PLT
	mov	eax, DWORD PTR pv_entry_spare[rip]
	mov	edx, DWORD PTR _NPCPV[rip]
	lea	edi, -1[rdx+rax]
	mov	DWORD PTR pv_entry_spare[rip], edi
	call	PV_STAT@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L44
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	rax, r13
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L43:
	.cfi_restore_state
	mov	edi, DWORD PTR pc_chunk_tryfail[rip]
	sub	QWORD PTR pv_entry_count[rip], 1
	xor	r13d, r13d
	lea	eax, 1[rdi]
	mov	DWORD PTR pc_chunk_tryfail[rip], eax
	call	PV_STAT@PLT
	jmp	.L1
.L42:
	lea	rsi, printinterval.1995[rip]
	lea	rdi, lastprint.1996[rip]
	call	ratecheck@PLT
	test	rax, rax
	je	.L19
	lea	rdi, .LC0[rip]
	call	printf@PLT
	jmp	.L19
.L9:
	mov	edx, DWORD PTR pc_list[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	TAILQ_REMOVE@PLT
	mov	edx, DWORD PTR pc_list[rip]
	mov	rsi, r12
	mov	rdi, rbp
	call	TAILQ_INSERT_TAIL@PLT
	jmp	.L40
.L44:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	get_pv_entry, .-get_pv_entry
	.section	.rodata
	.align 8
	.type	printinterval.1995, @object
	.size	printinterval.1995, 8
printinterval.1995:
	.long	60
	.long	0
	.local	lastprint.1996
	.comm	lastprint.1996,8,8
	.comm	pvh_global_lock,4,4
	.comm	pv_vafree,8,8
	.comm	pv_entry_spare,4,4
	.comm	pv_entry_high_water,8,8
	.comm	pv_entry_count,8,8
	.comm	pv_entry_allocs,4,4
	.comm	pv_chunks,4,4
	.comm	pc_lru,4,4
	.comm	pc_list,4,4
	.comm	pc_freemask,8,8
	.comm	pc_chunk_tryfail,4,4
	.comm	pc_chunk_count,4,4
	.comm	pc_chunk_allocs,4,4
	.comm	_NPCPV,4,4
	.comm	_NPCM,4,4
	.comm	VM_ALLOC_WIRED,4,4
	.comm	VM_ALLOC_NORMAL,4,4
	.comm	VM_ALLOC_NOOBJ,4,4
	.comm	RA_WLOCKED,4,4
	.comm	MA_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_pmap.c_get_pv_entry.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Approaching the limit on PV entries, consider incre"
	.ascii	"asing either the vm.pmap.shpgperproc or the vm.pmap"
	.ascii	".pv_entries tunable.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_pv_entry, %function
get_pv_entry:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, .L44
	mov	r5, r1
	ldr	r1, [r3]
	ldr	r3, .L44+4
	sub	sp, sp, #20
	ldr	r0, .L44+8
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	rw_assert
	ldr	r3, .L44+12
	mov	r0, r4
	ldr	r1, [r3]
	bl	PMAP_LOCK_ASSERT
	ldr	r3, .L44+16
	ldr	r0, [r3]
	add	r2, r0, #1
	str	r2, [r3]
	bl	PV_STAT
	ldr	r1, .L44+20
	ldr	r2, .L44+24
	ldr	r3, [r1]
	ldr	r2, [r2]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r1]
	bgt	.L41
.L3:
	ldr	r7, .L44+28
	ldr	r6, .L44+32
	ldr	r10, .L44+36
	ldr	r9, .L44+40
	ldr	r8, .L44+44
	b	.L19
.L5:
	ldr	r3, [r6]
	cmp	r3, #0
	bne	.L13
.L16:
	cmp	r5, #0
	bne	.L42
	mov	r0, r4
	bl	pmap_pv_reclaim
	cmp	r0, #0
	str	r0, [sp, #8]
	bne	.L20
.L19:
	mov	r0, r4
	bl	TAILQ_FIRST
	subs	fp, r0, #0
	beq	.L5
	ldr	lr, [r7]
	cmp	lr, #0
	ble	.L5
	ldr	ip, [fp]
	mov	r3, #0
	sub	ip, ip, #4
	b	.L8
.L6:
	add	r3, r3, #1
	cmp	r3, lr
	beq	.L5
.L8:
	ldr	r0, [ip, #4]!
	lsl	r2, r3, #2
	cmp	r0, #0
	beq	.L6
	str	r2, [sp, #4]
	str	r3, [sp]
	bl	bsfl
	ldr	ip, [r7]
	ldr	r3, [sp]
	ldr	r2, [sp, #4]
	cmp	r3, ip
	bge	.L5
	mov	r6, #1
	ldr	ip, [fp]
	add	r3, r0, r3, lsl #5
	ldr	lr, [ip, r2]
	ldr	r5, [fp, #4]
	bic	r0, lr, r6, lsl r0
	str	r0, [ip, r2]
	ldr	lr, [r7]
	add	r5, r5, r3, lsl #2
	cmp	lr, #0
	ble	.L9
	mov	r3, #0
	sub	r2, ip, #4
	b	.L12
.L10:
	add	r3, r3, #1
	cmp	lr, r3
	beq	.L9
.L12:
	ldr	r0, [r2, #4]!
	cmp	r0, #0
	beq	.L10
.L39:
	ldr	r3, .L44+48
	ldr	r0, [r3]
	sub	r2, r0, #1
	str	r2, [r3]
	bl	PV_STAT
	b	.L1
.L13:
	mov	r1, #0
	ldr	r0, [r9]
	ldr	r3, [r10]
	ldr	r2, [r8]
	orr	r3, r3, r0
	orr	r2, r3, r2
	mov	r0, r1
	bl	vm_page_alloc
	cmp	r0, #0
	str	r0, [sp, #8]
	beq	.L16
.L20:
	ldr	r3, .L44+52
	ldr	r0, [r3]
	add	r2, r0, #1
	str	r2, [r3]
	bl	PV_STAT
	ldr	r3, .L44+56
	ldr	r0, [r3]
	add	r2, r0, #1
	str	r2, [r3]
	bl	PV_STAT
	ldr	r0, .L44+32
	bl	pmap_ptelist_alloc
	mov	r5, r0
	mov	r2, #1
	add	r1, sp, #8
	bl	pmap_qenter
	ldr	r3, .L44+60
	ldr	r2, [r5]
	ldr	r1, [r3]
	ldr	r0, .L44+28
	ldr	r3, [r1]
	str	r4, [r5, #8]
	bic	r3, r3, #1
	str	r3, [r2]
	ldr	r3, [r0]
	cmp	r3, #1
	movgt	r3, #1
	ble	.L18
.L21:
	ldr	ip, [r1, #4]!
	add	r3, r3, #1
	str	ip, [r2, #4]!
	ldr	ip, [r0]
	cmp	ip, r3
	bgt	.L21
.L18:
	ldr	r3, .L44+64
	mov	r1, r5
	ldr	r2, [r3]
	ldr	r0, .L44+68
	bl	TAILQ_INSERT_TAIL
	ldr	r3, .L44+72
	mov	r1, r5
	ldr	r2, [r3]
	mov	r0, r4
	ldr	r5, [r5, #4]
	bl	TAILQ_INSERT_HEAD
	ldr	r2, .L44+76
	ldr	r3, .L44+48
	ldr	r0, [r2]
	ldr	r2, [r3]
	sub	r0, r0, #1
	add	r0, r0, r2
	str	r0, [r3]
	bl	PV_STAT
.L1:
	ldr	r3, .L44+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L42:
	ldr	r2, .L44+80
	ldr	ip, .L44+20
	ldr	r0, [r2]
	ldr	r3, [ip]
	add	r1, r0, #1
	sub	r3, r3, #1
	mov	r5, #0
	str	r1, [r2]
	str	r3, [ip]
	bl	PV_STAT
	b	.L1
.L41:
	ldr	r1, .L44+84
	ldr	r0, .L44+88
	bl	ratecheck
	cmp	r0, #0
	beq	.L3
	ldr	r0, .L44+92
	bl	printf
	b	.L3
.L9:
	ldr	r6, .L44+72
	mov	r1, fp
	ldr	r2, [r6]
	mov	r0, r4
	bl	TAILQ_REMOVE
	mov	r1, fp
	mov	r0, r4
	ldr	r2, [r6]
	bl	TAILQ_INSERT_TAIL
	b	.L39
.L43:
	bl	__stack_chk_fail
.L45:
	.align	2
.L44:
	.word	RA_WLOCKED
	.word	.LC1
	.word	pvh_global_lock
	.word	MA_OWNED
	.word	pv_entry_allocs
	.word	pv_entry_count
	.word	pv_entry_high_water
	.word	_NPCM
	.word	pv_vafree
	.word	VM_ALLOC_NORMAL
	.word	VM_ALLOC_NOOBJ
	.word	VM_ALLOC_WIRED
	.word	pv_entry_spare
	.word	pc_chunk_count
	.word	pc_chunk_allocs
	.word	pc_freemask
	.word	pc_lru
	.word	pv_chunks
	.word	pc_list
	.word	_NPCPV
	.word	pc_chunk_tryfail
	.word	.LANCHOR0
	.word	.LANCHOR1
	.word	.LC0
	.size	get_pv_entry, .-get_pv_entry
	.comm	pvh_global_lock,4,4
	.comm	pv_vafree,4,4
	.comm	pv_entry_spare,4,4
	.comm	pv_entry_high_water,4,4
	.comm	pv_entry_count,4,4
	.comm	pv_entry_allocs,4,4
	.comm	pv_chunks,4,4
	.comm	pc_lru,4,4
	.comm	pc_list,4,4
	.comm	pc_freemask,4,4
	.comm	pc_chunk_tryfail,4,4
	.comm	pc_chunk_count,4,4
	.comm	pc_chunk_allocs,4,4
	.comm	_NPCPV,4,4
	.comm	_NPCM,4,4
	.comm	VM_ALLOC_WIRED,4,4
	.comm	VM_ALLOC_NORMAL,4,4
	.comm	VM_ALLOC_NOOBJ,4,4
	.comm	RA_WLOCKED,4,4
	.comm	MA_OWNED,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	printinterval.4279, %object
	.size	printinterval.4279, 8
printinterval.4279:
	.word	60
	.word	0
	.bss
	.align	2
	.set	.LANCHOR1,. + 0
	.type	lastprint.4280, %object
	.size	lastprint.4280, 8
lastprint.4280:
	.space	8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
