	.file	"extr_vm_page.c_vm_pqbatch_process_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vm_pqbatch_process_page, @function
vm_pqbatch_process_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR curthread[rip]
	call	CRITICAL_ASSERT@PLT
	mov	rdi, r12
	call	vm_pagequeue_assert_locked@PLT
	lea	rdi, 8[rbp]
	call	atomic_load_8@PLT
	mov	rdi, rbp
	movsx	r13, eax
	call	vm_page_pagequeue@PLT
	mov	rbx, r13
	mov	edi, 1
	cmp	r12, rax
	je	.L2
	xor	edi, edi
	test	DWORD PTR PGA_QUEUE_STATE_MASK[rip], r13d
	sete	dil
.L2:
	mov	rsi, r13
	call	KASSERT@PLT
	test	DWORD PTR PGA_DEQUEUE[rip], ebx
	jne	.L18
	mov	eax, DWORD PTR PGA_REQUEUE[rip]
	or	eax, DWORD PTR PGA_REQUEUE_HEAD[rip]
	test	eax, ebx
	je	.L5
	test	DWORD PTR PGA_ENQUEUED[rip], ebx
	je	.L6
	mov	edx, DWORD PTR plinks[rip]
	mov	rsi, rbp
	mov	rdi, r12
	call	TAILQ_REMOVE@PLT
.L7:
	test	DWORD PTR PGA_REQUEUE_HEAD[rip], ebx
	je	.L8
	mov	rax, QWORD PTR PQ_INACTIVE[rip]
	xor	edi, edi
	cmp	QWORD PTR 0[rbp], rax
	mov	rsi, rbp
	sete	dil
	call	KASSERT@PLT
	mov	rdi, rbp
	call	vm_pagequeue_domain@PLT
	mov	edx, DWORD PTR plinks[rip]
	mov	rsi, rbp
	mov	rdi, rax
	call	TAILQ_INSERT_BEFORE@PLT
.L9:
	mov	esi, DWORD PTR PGA_REQUEUE[rip]
	or	esi, DWORD PTR PGA_REQUEUE_HEAD[rip]
	mov	rdi, rbp
	and	esi, ebx
	call	vm_page_aflag_clear@PLT
	mov	edi, DWORD PTR queue_ops[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	esi, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	counter_u64_add@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR queue_nops[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	esi, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	counter_u64_add@PLT
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	xor	edi, edi
	test	DWORD PTR PGA_ENQUEUED[rip], ebx
	setne	dil
	call	__predict_true@PLT
	test	rax, rax
	jne	.L19
.L4:
	mov	rdi, rbp
	call	vm_page_dequeue_complete@PLT
	mov	edi, DWORD PTR queue_ops[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	esi, 1
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	counter_u64_add@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	edx, DWORD PTR plinks[rip]
	mov	rsi, rbp
	mov	rdi, r12
	call	TAILQ_INSERT_TAIL@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r12
	call	vm_pagequeue_cnt_inc@PLT
	mov	esi, DWORD PTR PGA_ENQUEUED[rip]
	mov	rdi, rbp
	call	vm_page_aflag_set@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rsi, rbp
	mov	rdi, r12
	call	vm_pagequeue_remove@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	vm_pqbatch_process_page, .-vm_pqbatch_process_page
	.comm	queue_ops,4,4
	.comm	queue_nops,4,4
	.comm	plinks,4,4
	.comm	curthread,4,4
	.comm	PQ_INACTIVE,8,8
	.comm	PGA_REQUEUE_HEAD,4,4
	.comm	PGA_REQUEUE,4,4
	.comm	PGA_QUEUE_STATE_MASK,4,4
	.comm	PGA_ENQUEUED,4,4
	.comm	PGA_DEQUEUE,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_page.c_vm_pqbatch_process_page.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vm_pqbatch_process_page, %function
vm_pqbatch_process_page:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r5, r1
	ldr	r3, .L19
	ldr	r0, [r3]
	bl	CRITICAL_ASSERT
	mov	r0, r6
	bl	vm_pagequeue_assert_locked
	add	r0, r5, #4
	bl	atomic_load_8
	mov	r4, r0
	mov	r0, r5
	bl	vm_page_pagequeue
	cmp	r6, r0
	moveq	r0, #1
	beq	.L2
	ldr	r3, .L19+4
	ldr	r3, [r3]
	tst	r4, r3
	moveq	r0, #1
	movne	r0, #0
.L2:
	mov	r1, r4
	bl	KASSERT
	ldr	r3, .L19+8
	ldr	r3, [r3]
	tst	r4, r3
	bne	.L17
	ldr	r8, .L19+12
	ldr	r7, .L19+16
	ldr	r3, [r8]
	ldr	r2, [r7]
	orr	r3, r3, r2
	tst	r3, r4
	beq	.L5
	ldr	r9, .L19+20
	ldr	r3, [r9]
	tst	r4, r3
	beq	.L6
	ldr	r9, .L19+24
	mov	r1, r5
	mov	r0, r6
	ldr	r2, [r9]
	bl	TAILQ_REMOVE
.L7:
	ldr	r3, [r7]
	tst	r4, r3
	beq	.L8
	ldr	r3, .L19+28
	ldr	r0, [r5]
	ldr	r3, [r3]
	mov	r1, r5
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	KASSERT
	mov	r0, r5
	bl	vm_pagequeue_domain
	mov	r1, r5
	ldr	r2, [r9]
	bl	TAILQ_INSERT_BEFORE
.L9:
	ldr	r1, [r8]
	ldr	r3, [r7]
	mov	r0, r5
	orr	r1, r1, r3
	and	r1, r1, r4
	bl	vm_page_aflag_clear
.L15:
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L19+32
	mov	r1, #1
	ldr	r0, [r3]
	b	counter_u64_add
.L5:
	ldr	r3, .L19+36
	mov	r1, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r0, [r3]
	b	counter_u64_add
.L17:
	ldr	r3, .L19+20
	ldr	r3, [r3]
	tst	r4, r3
	movne	r0, #1
	moveq	r0, #0
	bl	__predict_true
	cmp	r0, #0
	bne	.L18
.L4:
	mov	r0, r5
	bl	vm_page_dequeue_complete
	b	.L15
.L8:
	mov	r0, r6
	mov	r1, r5
	ldr	r2, [r9]
	bl	TAILQ_INSERT_TAIL
	b	.L9
.L6:
	mov	r0, r6
	bl	vm_pagequeue_cnt_inc
	ldr	r1, [r9]
	mov	r0, r5
	bl	vm_page_aflag_set
	ldr	r9, .L19+24
	b	.L7
.L18:
	mov	r0, r6
	mov	r1, r5
	bl	vm_pagequeue_remove
	b	.L4
.L20:
	.align	2
.L19:
	.word	curthread
	.word	PGA_QUEUE_STATE_MASK
	.word	PGA_DEQUEUE
	.word	PGA_REQUEUE
	.word	PGA_REQUEUE_HEAD
	.word	PGA_ENQUEUED
	.word	plinks
	.word	PQ_INACTIVE
	.word	queue_ops
	.word	queue_nops
	.size	vm_pqbatch_process_page, .-vm_pqbatch_process_page
	.comm	queue_ops,4,4
	.comm	queue_nops,4,4
	.comm	plinks,4,4
	.comm	curthread,4,4
	.comm	PQ_INACTIVE,4,4
	.comm	PGA_REQUEUE_HEAD,4,4
	.comm	PGA_REQUEUE,4,4
	.comm	PGA_QUEUE_STATE_MASK,4,4
	.comm	PGA_ENQUEUED,4,4
	.comm	PGA_DEQUEUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
