	.file	"extr_vmx_msr.c_vmx_msr_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	vmx_msr_init
	.type	vmx_msr_init, @function
vmx_msr_init:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, QWORD PTR IDX_MSR_LSTAR[rip]
	mov	rax, QWORD PTR host_msrs[rip]
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	edi, DWORD PTR MSR_LSTAR[rip]
	lea	rbx, [rax+rdx*8]
	call	rdmsr@PLT
	mov	rdx, QWORD PTR IDX_MSR_CSTAR[rip]
	mov	edi, DWORD PTR MSR_CSTAR[rip]
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR host_msrs[rip]
	lea	rbx, [rax+rdx*8]
	call	rdmsr@PLT
	mov	rdx, QWORD PTR IDX_MSR_STAR[rip]
	mov	edi, DWORD PTR MSR_STAR[rip]
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR host_msrs[rip]
	lea	rbx, [rax+rdx*8]
	call	rdmsr@PLT
	mov	rdx, QWORD PTR IDX_MSR_SF_MASK[rip]
	mov	edi, DWORD PTR MSR_SF_MASK[rip]
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR host_msrs[rip]
	lea	rbx, [rax+rdx*8]
	call	rdmsr@PLT
	mov	edi, DWORD PTR MSR_IA32_MISC_ENABLE[rip]
	mov	QWORD PTR [rbx], rax
	call	rdmsr@PLT
	and	eax, -327681
	or	ah, 24
	mov	DWORD PTR misc_enable[rip], eax
	xor	eax, eax
	call	nehalem_cpu@PLT
	test	rax, rax
	je	.L2
.L4:
	mov	ecx, 133330000
.L3:
	mov	eax, DWORD PTR tsc_freq[rip]
	cdq
	idiv	ecx
	mov	ecx, 8
	movzx	eax, al
	mov	edx, eax
	sal	edx, 8
	mov	DWORD PTR platform_info[rip], edx
	mov	edx, DWORD PTR turbo_ratio_limit[rip]
	.p2align 4,,10
	.p2align 3
.L5:
	sal	edx, 8
	or	edx, eax
	sub	ecx, 1
	jne	.L5
	mov	DWORD PTR turbo_ratio_limit[rip], edx
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xor	eax, eax
	call	westmere_cpu@PLT
	test	rax, rax
	jne	.L4
	mov	ecx, 100000000
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	vmx_msr_init, .-vmx_msr_init
	.comm	turbo_ratio_limit,4,4
	.comm	tsc_freq,4,4
	.comm	platform_info,4,4
	.comm	misc_enable,4,4
	.comm	host_msrs,8,8
	.comm	MSR_STAR,4,4
	.comm	MSR_SF_MASK,4,4
	.comm	MSR_LSTAR,4,4
	.comm	MSR_IA32_MISC_ENABLE,4,4
	.comm	MSR_CSTAR,4,4
	.comm	IDX_MSR_STAR,8,8
	.comm	IDX_MSR_SF_MASK,8,8
	.comm	IDX_MSR_LSTAR,8,8
	.comm	IDX_MSR_CSTAR,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_vmx_msr.c_vmx_msr_init.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.global	vmx_msr_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	vmx_msr_init, %function
vmx_msr_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L9
	push	{r4, r5, r6, lr}
	ldr	r3, .L9+4
	ldr	r4, .L9+8
	ldr	r0, [r2]
	ldr	r5, [r4]
	ldr	r6, [r3]
	bl	rdmsr
	ldr	r2, .L9+12
	ldr	r3, .L9+16
	str	r0, [r5, r6, lsl #2]
	ldr	r0, [r2]
	ldr	r5, [r4]
	ldr	r6, [r3]
	bl	rdmsr
	ldr	r2, .L9+20
	ldr	r3, .L9+24
	str	r0, [r5, r6, lsl #2]
	ldr	r0, [r2]
	ldr	r5, [r4]
	ldr	r6, [r3]
	bl	rdmsr
	ldr	r2, .L9+28
	ldr	r3, .L9+32
	str	r0, [r5, r6, lsl #2]
	ldr	r0, [r2]
	ldr	r5, [r3]
	ldr	r4, [r4]
	bl	rdmsr
	ldr	r3, .L9+36
	str	r0, [r4, r5, lsl #2]
	ldr	r0, [r3]
	bl	rdmsr
	ldr	r3, .L9+40
	bic	r0, r0, #327680
	orr	r0, r0, #6144
	str	r0, [r3]
	bl	nehalem_cpu
	cmp	r0, #0
	beq	.L2
.L4:
	ldr	r1, .L9+44
.L3:
	ldr	r3, .L9+48
	ldr	r0, [r3]
	bl	__aeabi_idiv
	mov	r3, #8
	ldr	r1, .L9+52
	ldr	ip, .L9+56
	and	r0, r0, #255
	lsl	lr, r0, r3
	ldr	r2, [r1]
	str	lr, [ip]
.L5:
	subs	r3, r3, #1
	orr	r2, r0, r2, lsl #8
	bne	.L5
	str	r2, [r1]
	pop	{r4, r5, r6, pc}
.L2:
	bl	westmere_cpu
	cmp	r0, #0
	bne	.L4
	ldr	r1, .L9+60
	b	.L3
.L10:
	.align	2
.L9:
	.word	MSR_LSTAR
	.word	IDX_MSR_LSTAR
	.word	host_msrs
	.word	MSR_CSTAR
	.word	IDX_MSR_CSTAR
	.word	MSR_STAR
	.word	IDX_MSR_STAR
	.word	MSR_SF_MASK
	.word	IDX_MSR_SF_MASK
	.word	MSR_IA32_MISC_ENABLE
	.word	misc_enable
	.word	133330000
	.word	tsc_freq
	.word	turbo_ratio_limit
	.word	platform_info
	.word	100000000
	.size	vmx_msr_init, .-vmx_msr_init
	.comm	turbo_ratio_limit,4,4
	.comm	tsc_freq,4,4
	.comm	platform_info,4,4
	.comm	misc_enable,4,4
	.comm	host_msrs,4,4
	.comm	MSR_STAR,4,4
	.comm	MSR_SF_MASK,4,4
	.comm	MSR_LSTAR,4,4
	.comm	MSR_IA32_MISC_ENABLE,4,4
	.comm	MSR_CSTAR,4,4
	.comm	IDX_MSR_STAR,4,4
	.comm	IDX_MSR_SF_MASK,4,4
	.comm	IDX_MSR_LSTAR,4,4
	.comm	IDX_MSR_CSTAR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
