	.file	"extr_hyperv.c_kvm_hv_setup_tsc_page.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kvm_hv_setup_tsc_page
	.type	kvm_hv_setup_tsc_page, @function
kvm_hv_setup_tsc_page:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	xor	edi, edi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	BUILD_BUG_ON@PLT
	mov	esi, DWORD PTR tsc_sequence[rip]
	mov	edi, DWORD PTR HV_REFERENCE_TSC_PAGE[rip]
	call	offsetof@PLT
	xor	edi, edi
	test	rax, rax
	setne	dil
	call	BUILD_BUG_ON@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR HV_X64_MSR_TSC_REFERENCE_ENABLE[rip], eax
	jne	.L15
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 16
	.cfi_remember_state
	.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
.L15:
	.cfi_restore_state
	lea	r13, 4[rbp]
	mov	rdi, r13
	call	mutex_lock@PLT
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR HV_X64_MSR_TSC_REFERENCE_ENABLE[rip], eax
	je	.L5
	mov	ecx, DWORD PTR HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT[rip]
	sar	eax, cl
	mov	edi, eax
	mov	r14d, eax
	call	gfn_to_gpa@PLT
	mov	rdi, rbp
	lea	rdx, 4[rsp]
	mov	ecx, 4
	mov	esi, eax
	call	kvm_read_guest@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L17
.L5:
	mov	rdi, r13
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	DWORD PTR 8[rbp], 0
	mov	edi, r14d
	lea	r15, 8[rbp]
	call	gfn_to_gpa@PLT
	mov	ecx, 4
	mov	rdx, r15
	mov	rdi, rbp
	mov	esi, eax
	call	kvm_write_guest@PLT
	test	rax, rax
	jne	.L5
	mov	rsi, r15
	mov	rdi, r12
	call	compute_tsc_page_parameters@PLT
	test	eax, eax
	je	.L5
	xor	eax, eax
	call	smp_wmb@PLT
	mov	edi, r14d
	call	gfn_to_gpa@PLT
	mov	ecx, 4
	mov	rdx, r15
	mov	rdi, rbp
	mov	esi, eax
	call	kvm_write_guest@PLT
	test	rax, rax
	jne	.L5
	mov	edx, DWORD PTR 4[rsp]
	cmp	edx, -2
	lea	eax, 1[rdx]
	mov	edx, 1
	cmovnb	eax, edx
	mov	DWORD PTR 4[rsp], eax
	xor	eax, eax
	call	smp_wmb@PLT
	mov	eax, DWORD PTR 4[rsp]
	mov	edi, r14d
	mov	DWORD PTR 8[rbp], eax
	call	gfn_to_gpa@PLT
	mov	ecx, 4
	mov	rdx, r15
	mov	rdi, rbp
	mov	esi, eax
	call	kvm_write_guest@PLT
	jmp	.L5
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kvm_hv_setup_tsc_page, .-kvm_hv_setup_tsc_page
	.comm	tsc_sequence,4,4
	.comm	HV_X64_MSR_TSC_REFERENCE_ENABLE,4,4
	.comm	HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT,4,4
	.comm	HV_REFERENCE_TSC_PAGE,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_hyperv.c_kvm_hv_setup_tsc_page.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kvm_hv_setup_tsc_page
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvm_hv_setup_tsc_page, %function
kvm_hv_setup_tsc_page:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L18
	sub	sp, sp, #8
	mov	r4, r0
	mov	r0, #0
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	BUILD_BUG_ON
	ldr	r2, .L18+4
	ldr	r3, .L18+8
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	offsetof
	ldr	r5, .L18+12
	subs	r0, r0, #0
	movne	r0, #1
	bl	BUILD_BUG_ON
	ldr	r2, [r4]
	ldr	r3, [r5]
	tst	r2, r3
	bne	.L15
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	add	r7, r4, #4
	mov	r0, r7
	bl	mutex_lock
	ldr	r2, [r5]
	ldr	r3, [r4]
	tst	r3, r2
	beq	.L5
	ldr	r2, .L18+16
	ldr	r5, [r2]
	asr	r5, r3, r5
	mov	r0, r5
	bl	gfn_to_gpa
	mov	r3, #4
	mov	r1, r0
	mov	r2, sp
	mov	r0, r4
	bl	kvm_read_guest
	bl	unlikely
	subs	r3, r0, #0
	beq	.L17
.L5:
	mov	r0, r7
	bl	mutex_unlock
	b	.L1
.L17:
	mov	r8, r4
	mov	r0, r5
	str	r3, [r8, #8]!
	bl	gfn_to_gpa
	mov	r2, r8
	mov	r1, r0
	mov	r3, #4
	mov	r0, r4
	bl	kvm_write_guest
	cmp	r0, #0
	bne	.L5
	mov	r0, r6
	mov	r1, r8
	bl	compute_tsc_page_parameters
	cmp	r0, #0
	beq	.L5
	bl	smp_wmb
	mov	r0, r5
	bl	gfn_to_gpa
	mov	r3, #4
	mov	r1, r0
	mov	r2, r8
	mov	r0, r4
	bl	kvm_write_guest
	cmp	r0, #0
	bne	.L5
	ldr	r3, [sp]
	add	r2, r3, #2
	cmp	r2, #1
	movls	r3, #1
	addhi	r3, r3, #1
	str	r3, [sp]
	bl	smp_wmb
	ldr	r3, [sp]
	mov	r0, r5
	str	r3, [r4, #8]
	bl	gfn_to_gpa
	mov	r2, r8
	mov	r1, r0
	mov	r3, #4
	mov	r0, r4
	bl	kvm_write_guest
	b	.L5
.L16:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC0
	.word	tsc_sequence
	.word	HV_REFERENCE_TSC_PAGE
	.word	HV_X64_MSR_TSC_REFERENCE_ENABLE
	.word	HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT
	.size	kvm_hv_setup_tsc_page, .-kvm_hv_setup_tsc_page
	.comm	tsc_sequence,4,4
	.comm	HV_X64_MSR_TSC_REFERENCE_ENABLE,4,4
	.comm	HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT,4,4
	.comm	HV_REFERENCE_TSC_PAGE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
