	.file	"extr_vm_page.c_vm_page_scan_contig.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"npages is 0"
.LC1:
	.string	"alignment is not a power of 2"
.LC2:
	.string	"boundary is not a power of 2"
.LC3:
	.string	"m_run != NULL"
.LC4:
	.string	"m_run == NULL"
	.text
	.p2align 4
	.globl	vm_page_scan_contig
	.type	vm_page_scan_contig, @function
vm_page_scan_contig:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, r8d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, edi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	lea	rsi, .LC0[rip]
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	DWORD PTR 12[rsp], ecx
	mov	DWORD PTR 28[rsp], r8d
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	test	edi, edi
	setg	dil
	setg	bpl
	movzx	edi, dil
	call	KASSERT@PLT
	mov	edi, r13d
	call	powerof2@PLT
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	KASSERT@PLT
	mov	edi, r15d
	call	powerof2@PLT
	lea	rsi, .LC2[rip]
	mov	edi, eax
	call	KASSERT@PLT
	cmp	rbx, r12
	mov	QWORD PTR 32[rsp], 0
	setb	al
	and	al, bpl
	mov	BYTE PTR 27[rsp], al
	je	.L26
	movsx	rax, r14d
	xor	ebp, ebp
	xor	r13d, r13d
	lea	rax, [rax+rax*2]
	sal	rax, 3
	mov	QWORD PTR 16[rsp], rax
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR [rbx]
	xor	edi, edi
	test	DWORD PTR PG_MARKER[rip], eax
	mov	rsi, rbx
	sete	dil
	call	KASSERT@PLT
	mov	eax, DWORD PTR [rbx]
	mov	edi, 1
	test	DWORD PTR PG_FICTITIOUS[rip], eax
	je	.L3
	mov	eax, DWORD PTR 4[rbx]
	xor	edi, edi
	test	eax, eax
	setg	dil
.L3:
	mov	rsi, rbx
	call	KASSERT@PLT
	test	ebp, ebp
	jne	.L4
	xor	edi, edi
	test	r13, r13
	lea	rsi, .LC3[rip]
	sete	dil
	call	KASSERT@PLT
	mov	rax, QWORD PTR 16[rsp]
	add	rax, rbx
	cmp	r12, rax
	jb	.L5
	mov	rdi, rbx
	call	VM_PAGE_TO_PHYS@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	r15d, eax
	mov	eax, DWORD PTR 12[rsp]
	sub	eax, 1
	test	eax, r15d
	jne	.L45
	mov	edi, r14d
	call	ptoa@PLT
	mov	esi, DWORD PTR 28[rsp]
	lea	edi, -1[r15+rax]
	xor	edi, r15d
	call	rounddown2@PLT
	test	rax, rax
	jne	.L47
.L8:
	lea	rsi, 32[rsp]
	mov	rdi, rbx
	call	vm_page_change_lock@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L48:
	mov	r15, QWORD PTR 16[rbx]
	test	r15, r15
	je	.L11
	mov	rdi, r15
	call	VM_OBJECT_TRYRLOCK@PLT
	test	eax, eax
	jne	.L12
	mov	rdi, QWORD PTR 32[rsp]
	call	mtx_unlock@PLT
	mov	rdi, r15
	call	VM_OBJECT_RLOCK@PLT
	mov	rdi, QWORD PTR 32[rsp]
	call	mtx_lock@PLT
	cmp	QWORD PTR 16[rbx], r15
	je	.L12
	mov	rdi, r15
	call	VM_OBJECT_RUNLOCK@PLT
.L9:
	mov	rdi, rbx
	call	vm_page_wired@PLT
	test	rax, rax
	je	.L48
.L29:
	mov	eax, 24
.L10:
	movzx	edx, BYTE PTR 27[rsp]
	test	ebp, ebp
	je	.L7
	xor	ebp, ebp
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L7:
	add	rbx, rax
	cmp	r12, rbx
	jbe	.L31
	test	dl, dl
	jne	.L20
.L31:
	mov	rdi, QWORD PTR 32[rsp]
	test	rdi, rdi
	je	.L2
.L23:
	call	mtx_unlock@PLT
.L2:
	cmp	r14d, ebp
	jg	.L24
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L49
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	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
.L47:
	.cfi_restore_state
	mov	esi, DWORD PTR 28[rsp]
.L45:
	mov	edi, r15d
	call	roundup2@PLT
	movsx	rdx, r15d
	sub	rax, rdx
	mov	rdi, rax
	call	atop@PLT
	movzx	edx, BYTE PTR 27[rsp]
	cdqe
	lea	rax, [rax+rax*2]
	sal	rax, 3
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	xor	edi, edi
	test	r13, r13
	lea	rsi, .LC4[rip]
	setne	dil
	call	KASSERT@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rax, QWORD PTR [r15]
	cmp	rax, QWORD PTR OBJT_DEFAULT[rip]
	je	.L13
	cmp	rax, QWORD PTR OBJT_SWAP[rip]
	je	.L13
	cmp	rax, QWORD PTR OBJT_VNODE[rip]
	je	.L13
.L44:
	mov	rdi, r15
	call	VM_OBJECT_RUNLOCK@PLT
	mov	eax, 24
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, QWORD PTR VM_MEMATTR_DEFAULT[rip]
	cmp	QWORD PTR 8[r15], rax
	jne	.L44
	mov	rdi, rbx
	call	vm_page_queue@PLT
	cmp	rax, QWORD PTR PQ_NONE[rip]
	je	.L44
	mov	rdi, rbx
	call	vm_page_busied@PLT
	test	eax, eax
	jne	.L44
	mov	rdi, rbx
	call	vm_page_wired@PLT
	test	rax, rax
	jne	.L44
	mov	rdi, rbx
	call	pmap_page_get_memattr@PLT
	xor	edi, edi
	cmp	QWORD PTR VM_MEMATTR_DEFAULT[rip], rax
	mov	rsi, rbx
	sete	dil
	call	KASSERT@PLT
	mov	eax, DWORD PTR VPO_SWAPINPROG[rip]
	xor	edi, edi
	mov	rsi, rbx
	or	eax, DWORD PTR VPO_SWAPSLEEP[rip]
	or	eax, DWORD PTR VPO_UNMANAGED[rip]
	test	DWORD PTR 8[rbx], eax
	sete	dil
	call	KASSERT@PLT
	mov	rdi, r15
	call	VM_OBJECT_RUNLOCK@PLT
	mov	eax, 24
	mov	edx, 1
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L11:
	mov	ecx, DWORD PTR 12[rbx]
	cmp	DWORD PTR VM_NFREEORDER[rip], ecx
	jle	.L29
	mov	edx, 1
	sal	edx, cl
	movsx	rax, edx
	lea	rax, [rax+rax*2]
	sal	rax, 3
	test	edx, edx
	jle	.L10
.L18:
	test	ebp, ebp
	cmove	r13, rbx
	add	ebp, edx
	cmp	r14d, ebp
	setg	dl
	jmp	.L7
.L5:
	mov	rdi, QWORD PTR 32[rsp]
	test	rdi, rdi
	jne	.L23
.L24:
	xor	r13d, r13d
	jmp	.L1
.L26:
	xor	ebp, ebp
	xor	r13d, r13d
	jmp	.L2
.L49:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vm_page_scan_contig, .-vm_page_scan_contig
	.comm	VPSC_NOSUPER,4,4
	.comm	VPSC_NORESERV,4,4
	.comm	VPO_UNMANAGED,4,4
	.comm	VPO_SWAPSLEEP,4,4
	.comm	VPO_SWAPINPROG,4,4
	.comm	VM_NFREEORDER,4,4
	.comm	VM_MEMATTR_DEFAULT,8,8
	.comm	PQ_NONE,8,8
	.comm	PG_MARKER,4,4
	.comm	PG_FICTITIOUS,4,4
	.comm	OBJT_VNODE,8,8
	.comm	OBJT_SWAP,8,8
	.comm	OBJT_DEFAULT,8,8
	.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_page_scan_contig.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"npages is 0\000"
	.align	2
.LC1:
	.ascii	"alignment is not a power of 2\000"
	.align	2
.LC2:
	.ascii	"boundary is not a power of 2\000"
	.align	2
.LC3:
	.ascii	"m_run != NULL\000"
	.align	2
.LC4:
	.ascii	"m_run == NULL\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	vm_page_scan_contig
	.syntax unified
	.arm
	.fpu softvfp
	.type	vm_page_scan_contig, %function
vm_page_scan_contig:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r8, r0, #0
	movle	r5, #0
	movgt	r5, #1
	mov	r6, r2
	mov	r4, r1
	mov	r7, r3
	mov	r0, r5
	cmp	r4, r6
	movcs	r5, #0
	andcc	r5, r5, #1
	sub	sp, sp, #28
	str	r3, [sp, #4]
	ldr	r3, .L45
	ldr	r1, .L45+4
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	KASSERT
	mov	r0, r7
	bl	powerof2
	ldr	r1, .L45+8
	bl	KASSERT
	mov	r7, r5
	str	r5, [sp, #12]
	mov	r5, #0
	ldr	r0, [sp, #64]
	bl	powerof2
	ldr	r1, .L45+12
	bl	KASSERT
	cmp	r7, r5
	str	r5, [sp, #16]
	beq	.L25
	mov	r7, r5
	add	r3, r8, r8, lsl #2
	lsl	r3, r3, #2
	ldr	fp, .L45+16
	ldr	r10, .L45+20
	str	r3, [sp, #8]
.L20:
	ldr	r2, [r4]
	ldr	r3, [fp]
	mov	r1, r4
	tst	r2, r3
	moveq	r0, #1
	movne	r0, #0
	bl	KASSERT
	ldr	r2, [r4]
	ldr	r3, [r10]
	tst	r2, r3
	moveq	r0, #1
	beq	.L3
	ldr	r0, [r4, #4]
	cmp	r0, #0
	movle	r0, #0
	movgt	r0, #1
.L3:
	mov	r1, r4
	bl	KASSERT
	cmp	r5, #0
	bne	.L4
	clz	r0, r7
	ldr	r1, .L45+24
	lsr	r0, r0, #5
	bl	KASSERT
	ldr	r3, [sp, #8]
	add	r3, r4, r3
	cmp	r6, r3
	bcc	.L5
	mov	r0, r4
	bl	VM_PAGE_TO_PHYS
	ldr	r3, [sp, #4]
	mov	r9, r0
	sub	r2, r3, #1
	tst	r2, r0
	movne	r1, r3
	bne	.L39
	mov	r0, r8
	bl	ptoa
	add	r0, r0, r9
	sub	r0, r0, #1
	ldr	r1, [sp, #64]
	eor	r0, r0, r9
	bl	rounddown2
	cmp	r0, #0
	bne	.L42
.L8:
	mov	r0, r4
	add	r1, sp, #16
	bl	vm_page_change_lock
	b	.L9
.L43:
	ldr	r9, [r4, #16]
	cmp	r9, #0
	beq	.L11
	mov	r0, r9
	bl	VM_OBJECT_TRYRLOCK
	cmp	r0, #0
	bne	.L12
	ldr	r0, [sp, #16]
	bl	mtx_unlock
	mov	r0, r9
	bl	VM_OBJECT_RLOCK
	ldr	r0, [sp, #16]
	bl	mtx_lock
	ldr	r3, [r4, #16]
	cmp	r3, r9
	beq	.L12
	mov	r0, r9
	bl	VM_OBJECT_RUNLOCK
.L9:
	mov	r0, r4
	bl	vm_page_wired
	cmp	r0, #0
	beq	.L43
.L28:
	mov	r3, #20
.L10:
	cmp	r5, #0
	beq	.L40
	mov	r5, #0
	mov	r7, r5
	ldr	r2, [sp, #12]
.L7:
	add	r4, r4, r3
	cmp	r6, r4
	movls	r3, #0
	andhi	r3, r2, #1
	cmp	r3, #0
	bne	.L20
	ldr	r0, [sp, #16]
	cmp	r0, #0
	beq	.L2
.L22:
	bl	mtx_unlock
.L2:
	cmp	r8, r5
	bgt	.L23
.L1:
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L44
	mov	r0, r7
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L42:
	mov	r0, r9
	ldr	r1, [sp, #64]
.L39:
	bl	roundup2
	sub	r0, r0, r9
	bl	atop
	add	r0, r0, r0, lsl #2
	lsl	r3, r0, #2
.L40:
	ldr	r2, [sp, #12]
	b	.L7
.L4:
	subs	r0, r7, #0
	movne	r0, #1
	ldr	r1, .L45+28
	bl	KASSERT
	b	.L8
.L12:
	ldr	r3, .L45+32
	ldr	r2, [r9]
	ldr	r1, [r3]
	cmp	r2, r1
	beq	.L13
	ldr	r1, .L45+36
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L13
	ldr	r1, .L45+40
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L13
.L38:
	mov	r0, r9
	bl	VM_OBJECT_RUNLOCK
	mov	r3, #20
	b	.L10
.L13:
	ldr	r3, .L45+44
	ldr	r1, [r9, #4]
	ldr	r2, [r3]
	cmp	r1, r2
	bne	.L38
	mov	r0, r4
	bl	vm_page_queue
	ldr	r3, .L45+48
	ldr	r2, [r3]
	cmp	r0, r2
	beq	.L38
	mov	r0, r4
	bl	vm_page_busied
	cmp	r0, #0
	bne	.L38
	mov	r0, r4
	bl	vm_page_wired
	cmp	r0, #0
	bne	.L38
	mov	r0, r4
	bl	pmap_page_get_memattr
	ldr	r3, .L45+44
	mov	r1, r4
	ldr	r2, [r3]
	sub	r0, r2, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	KASSERT
	ldr	r3, .L45+52
	ldr	r0, .L45+56
	ldr	r2, [r3]
	ldr	r3, .L45+60
	ldr	r0, [r0]
	ldr	r1, [r3]
	orr	r2, r2, r1
	ldr	r1, [r4, #8]
	orr	r2, r2, r0
	tst	r2, r1
	moveq	r0, #1
	movne	r0, #0
	mov	r1, r4
	bl	KASSERT
	mov	r0, r9
	bl	VM_OBJECT_RUNLOCK
	mov	r3, #20
	mov	r2, #1
	b	.L18
.L11:
	ldr	r3, .L45+64
	ldr	r1, [r4, #12]
	ldr	r3, [r3]
	cmp	r3, r1
	ble	.L28
	mov	r2, #1
	mov	r3, #20
	lsl	r2, r2, r1
	cmp	r2, #0
	lsl	r3, r3, r1
	ble	.L10
.L18:
	cmp	r5, #0
	add	r5, r5, r2
	moveq	r7, r4
	cmp	r8, r5
	movle	r2, #0
	movgt	r2, #1
	b	.L7
.L5:
	ldr	r0, [sp, #16]
	cmp	r0, #0
	bne	.L22
.L23:
	mov	r7, #0
	b	.L1
.L25:
	ldr	r5, [sp, #12]
	mov	r7, r5
	b	.L2
.L44:
	bl	__stack_chk_fail
.L46:
	.align	2
.L45:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	PG_MARKER
	.word	PG_FICTITIOUS
	.word	.LC3
	.word	.LC4
	.word	OBJT_DEFAULT
	.word	OBJT_SWAP
	.word	OBJT_VNODE
	.word	VM_MEMATTR_DEFAULT
	.word	PQ_NONE
	.word	VPO_SWAPINPROG
	.word	VPO_UNMANAGED
	.word	VPO_SWAPSLEEP
	.word	VM_NFREEORDER
	.size	vm_page_scan_contig, .-vm_page_scan_contig
	.comm	VPSC_NOSUPER,4,4
	.comm	VPSC_NORESERV,4,4
	.comm	VPO_UNMANAGED,4,4
	.comm	VPO_SWAPSLEEP,4,4
	.comm	VPO_SWAPINPROG,4,4
	.comm	VM_NFREEORDER,4,4
	.comm	VM_MEMATTR_DEFAULT,4,4
	.comm	PQ_NONE,4,4
	.comm	PG_MARKER,4,4
	.comm	PG_FICTITIOUS,4,4
	.comm	OBJT_VNODE,4,4
	.comm	OBJT_SWAP,4,4
	.comm	OBJT_DEFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
