	.file	"extr_vmm.c_vcpu_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vcpu_init, @function
vcpu_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	xor	edi, edi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	movsx	rbx, esi
	mov	rbp, rbx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	test	ebx, ebx
	js	.L2
	xor	edi, edi
	cmp	DWORD PTR VM_MAXCPU[rip], ebx
	setg	dil
.L2:
	mov	rsi, rbx
	sal	rbx, 6
	call	KASSERT@PLT
	add	rbx, QWORD PTR 8[r13]
	test	r12d, r12d
	jne	.L11
.L3:
	mov	edi, DWORD PTR 0[r13]
	mov	esi, ebp
	call	VLAPIC_INIT@PLT
	mov	edx, DWORD PTR X2APIC_DISABLED[rip]
	mov	rdi, r13
	mov	esi, ebp
	mov	DWORD PTR 40[rbx], eax
	call	vm_set_x2apic_state@PLT
	mov	eax, DWORD PTR XFEATURE_ENABLED_X87[rip]
	mov	edi, DWORD PTR [rbx]
	mov	QWORD PTR 32[rbx], 0
	mov	QWORD PTR 24[rbx], 0
	mov	QWORD PTR 16[rbx], 0
	mov	QWORD PTR 8[rbx], 0
	mov	DWORD PTR 4[rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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	vmm_stat_init@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, rbx
	call	vcpu_lock_init@PLT
	lea	rdi, 60[rbx]
	xor	esi, esi
	call	pthread_mutex_init@PLT
	lea	rdi, 56[rbx]
	xor	esi, esi
	call	pthread_cond_init@PLT
	lea	rdi, 52[rbx]
	xor	esi, esi
	call	pthread_mutex_init@PLT
	lea	rdi, 48[rbx]
	xor	esi, esi
	call	pthread_cond_init@PLT
	mov	eax, DWORD PTR VCPU_IDLE[rip]
	mov	DWORD PTR 44[rbx], eax
	xor	eax, eax
	call	vmm_stat_alloc@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	vcpu_init, .-vcpu_init
	.comm	XFEATURE_ENABLED_X87,4,4
	.comm	X2APIC_DISABLED,4,4
	.comm	VM_MAXCPU,4,4
	.comm	VCPU_IDLE,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_vmm.c_vcpu_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vcpu_init, %function
vcpu_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	subs	r4, r1, #0
	mov	r6, r0
	mov	r5, r2
	movlt	r0, #0
	blt	.L2
	ldr	r3, .L11
	ldr	r0, [r3]
	cmp	r0, r4
	movle	r0, #0
	movgt	r0, #1
.L2:
	mov	r1, r4
	bl	KASSERT
	ldr	r8, [r6, #4]
	add	r3, r4, r4, lsl #1
	cmp	r5, #0
	lsl	r7, r3, #4
	add	r5, r8, r3, lsl #4
	bne	.L10
.L3:
	mov	r1, r4
	ldr	r0, [r6]
	bl	VLAPIC_INIT
	ldr	r3, .L11+4
	str	r0, [r5, #24]
	ldr	r2, [r3]
	mov	r1, r4
	mov	r0, r6
	bl	vm_set_x2apic_state
	mov	r3, #0
	ldr	r2, .L11+8
	ldr	r0, [r8, r7]
	ldr	r2, [r2]
	str	r3, [r5, #20]
	str	r2, [r5, #4]
	str	r3, [r5, #16]
	str	r3, [r5, #12]
	str	r3, [r5, #8]
	pop	{r4, r5, r6, r7, r8, lr}
	b	vmm_stat_init
.L10:
	mov	r0, r5
	bl	vcpu_lock_init
	mov	r1, #0
	add	r0, r5, #44
	bl	pthread_mutex_init
	mov	r1, #0
	add	r0, r5, #40
	bl	pthread_cond_init
	mov	r1, #0
	add	r0, r5, #36
	bl	pthread_mutex_init
	mov	r1, #0
	add	r0, r5, #32
	bl	pthread_cond_init
	ldr	r3, .L11+12
	ldr	r3, [r3]
	str	r3, [r5, #28]
	bl	vmm_stat_alloc
	str	r0, [r8, r7]
	b	.L3
.L12:
	.align	2
.L11:
	.word	VM_MAXCPU
	.word	X2APIC_DISABLED
	.word	XFEATURE_ENABLED_X87
	.word	VCPU_IDLE
	.size	vcpu_init, .-vcpu_init
	.comm	XFEATURE_ENABLED_X87,4,4
	.comm	X2APIC_DISABLED,4,4
	.comm	VM_MAXCPU,4,4
	.comm	VCPU_IDLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
