	.file	"extr_cloudabi_vdso.c_cloudabi_vdso_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cloudabi_vdso_init
	.type	cloudabi_vdso_init, @function
cloudabi_vdso_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	sub	rdx, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xor	ebx, ebx
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR 24[rsp], rdi
	mov	rdi, rdx
	lea	r15, 32[rsp]
	mov	QWORD PTR 8[rsp], rsi
	mov	rsi, QWORD PTR PAGE_SIZE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	howmany@PLT
	mov	ecx, DWORD PTR VM_PROT_DEFAULT[rip]
	xor	r9d, r9d
	xor	esi, esi
	mov	r13, rax
	imul	rax, QWORD PTR PAGE_SIZE[rip]
	mov	edi, DWORD PTR OBJT_PHYS[rip]
	xor	r8d, r8d
	mov	rdx, rax
	mov	QWORD PTR 16[rsp], rax
	call	vm_pager_allocate@PLT
	mov	rdi, QWORD PTR PAGE_SIZE[rip]
	mov	ebp, eax
	call	kva_alloc@PLT
	mov	r12, rax
	test	r13, r13
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, ebp
	call	VM_OBJECT_WLOCK@PLT
	mov	rsi, rbx
	mov	edx, DWORD PTR VM_ALLOC_NOBUSY[rip]
	mov	edi, ebp
	or	edx, DWORD PTR VM_ALLOC_ZERO[rip]
	call	vm_page_grab@PLT
	mov	edx, DWORD PTR VM_PAGE_BITS_ALL[rip]
	mov	edi, ebp
	mov	QWORD PTR 32[rsp], rax
	mov	DWORD PTR [rax], edx
	call	VM_OBJECT_WUNLOCK@PLT
	mov	edx, 1
	mov	rsi, r15
	mov	rdi, r12
	call	pmap_qenter@PLT
	mov	rsi, QWORD PTR PAGE_SIZE[rip]
	mov	rdi, r14
	mov	rax, rsi
	imul	rax, rbx
	sub	rdi, rax
	call	MIN@PLT
	mov	rsi, QWORD PTR PAGE_SIZE[rip]
	mov	rdi, r12
	mov	edx, eax
	imul	rsi, rbx
	add	rsi, QWORD PTR 8[rsp]
	add	rbx, 1
	call	memcpy@PLT
	mov	esi, 1
	mov	rdi, r12
	call	pmap_qremove@PLT
	cmp	r13, rbx
	jne	.L3
.L4:
	mov	rsi, QWORD PTR PAGE_SIZE[rip]
	mov	rdi, r12
	call	kva_free@PLT
	mov	rcx, QWORD PTR 24[rsp]
	mov	rbx, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR 32[rcx]
	mov	QWORD PTR [rcx], rbx
	mov	DWORD PTR 24[rcx], ebp
	mov	QWORD PTR 8[rsp], rax
	sub	rax, rbx
	mov	QWORD PTR 8[rcx], rax
	mov	QWORD PTR 16[rcx], rax
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 56
	.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
.L12:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	cloudabi_vdso_init, .-cloudabi_vdso_init
	.comm	VM_PROT_DEFAULT,4,4
	.comm	VM_PAGE_BITS_ALL,4,4
	.comm	VM_ALLOC_ZERO,4,4
	.comm	VM_ALLOC_NOBUSY,4,4
	.comm	PAGE_SIZE,8,8
	.comm	OBJT_PHYS,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_cloudabi_vdso.c_cloudabi_vdso_init.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cloudabi_vdso_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	cloudabi_vdso_init, %function
cloudabi_vdso_init:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r7, .L11
	sub	sp, sp, #44
	sub	r2, r2, r1
	str	r3, [sp, #28]
	ldr	r3, .L11+4
	str	r1, [sp, #20]
	str	r2, [sp, #12]
	mov	r0, r2
	ldr	r1, [r7]
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	howmany
	mov	r1, r0
	mov	r4, #0
	ldr	r2, [r7]
	mov	r6, r0
	mul	r1, r2, r1
	str	r0, [sp, #16]
	ldr	r3, .L11+8
	ldr	r0, .L11+12
	str	r4, [sp, #4]
	str	r4, [sp]
	mov	r2, r1
	ldr	r3, [r3]
	str	r1, [sp, #24]
	ldr	r0, [r0]
	mov	r1, r4
	bl	vm_pager_allocate
	mov	r5, r0
	ldr	r0, [r7]
	bl	kva_alloc
	cmp	r6, r4
	mov	r6, r0
	beq	.L4
	ldr	fp, .L11+16
	ldr	r10, .L11+20
	ldr	r9, .L11+24
.L3:
	mov	r0, r5
	bl	VM_OBJECT_WLOCK
	ldr	r3, [r10]
	ldr	r2, [fp]
	mov	r1, r4
	orr	r2, r2, r3
	mov	r0, r5
	bl	vm_page_grab
	mov	r3, r0
	ldr	r2, [r9]
	str	r0, [sp, #32]
	str	r2, [r3]
	mov	r0, r5
	bl	VM_OBJECT_WUNLOCK
	mov	r2, #1
	add	r1, sp, #32
	mov	r0, r6
	bl	pmap_qenter
	ldr	r1, [r7]
	ldr	r3, [sp, #20]
	mul	r0, r4, r1
	add	r8, r3, r0
	ldr	r3, [sp, #12]
	add	r4, r4, #1
	sub	r0, r3, r0
	bl	MIN
	mov	r1, r8
	mov	r2, r0
	mov	r0, r6
	bl	memcpy
	mov	r1, #1
	mov	r0, r6
	bl	pmap_qremove
	ldr	r3, [sp, #16]
	cmp	r3, r4
	bne	.L3
.L4:
	ldr	r1, [r7]
	mov	r0, r6
	bl	kva_free
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #24]
	ldr	r3, [r2, #16]
	str	r1, [r2]
	sub	r3, r3, r1
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	ldr	r3, .L11+4
	str	r5, [r2, #12]
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	PAGE_SIZE
	.word	.LC0
	.word	VM_PROT_DEFAULT
	.word	OBJT_PHYS
	.word	VM_ALLOC_NOBUSY
	.word	VM_ALLOC_ZERO
	.word	VM_PAGE_BITS_ALL
	.size	cloudabi_vdso_init, .-cloudabi_vdso_init
	.comm	VM_PROT_DEFAULT,4,4
	.comm	VM_PAGE_BITS_ALL,4,4
	.comm	VM_ALLOC_ZERO,4,4
	.comm	VM_ALLOC_NOBUSY,4,4
	.comm	PAGE_SIZE,4,4
	.comm	OBJT_PHYS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
