	.file	"extr_pmu.c_kvm_pmu_cpuid_update.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	kvm_pmu_cpuid_update
	.type	kvm_pmu_cpuid_update, @function
kvm_pmu_cpuid_update:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	rdx, QWORD PTR KVM_PMC_GP[rip]
	mov	esi, 10
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 16[rdi]
	mov	rbx, rdi
	mov	DWORD PTR [rdi], 0
	mov	QWORD PTR 8[rdi], 0
	mov	DWORD PTR [rax+rdx*4], 0
	mov	rdx, QWORD PTR KVM_PMC_FIXED[rip]
	mov	DWORD PTR [rax+rdx*4], 0
	xor	edx, edx
	mov	DWORD PTR 24[rdi], 0
	call	kvm_find_cpuid_entry@PLT
	test	rax, rax
	je	.L1
	mov	rbp, rax
	mov	eax, DWORD PTR [rax]
	movzx	edx, al
	mov	DWORD PTR 24[rbx], edx
	test	edx, edx
	jne	.L11
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	esi, DWORD PTR X86_PMC_MAX_GENERIC[rip]
	movzx	edi, ah
	mov	r12d, 1
	call	min@PLT
	movzx	ecx, BYTE PTR 2[rbp]
	mov	rdx, QWORD PTR 16[rbx]
	mov	rsi, -1
	mov	DWORD PTR [rbx], eax
	mov	eax, r12d
	sal	eax, cl
	mov	rcx, QWORD PTR KVM_PMC_GP[rip]
	sub	eax, 1
	mov	DWORD PTR [rdx+rcx*4], eax
	mov	ecx, DWORD PTR 0[rbp]
	shr	ecx, 24
	sal	rsi, cl
	or	rsi, QWORD PTR 8[rbp]
	cmp	DWORD PTR 24[rbx], 1
	not	rsi
	mov	QWORD PTR 32[rbx], rsi
	je	.L12
	mov	edi, DWORD PTR 16[rbp]
	mov	esi, DWORD PTR X86_PMC_MAX_FIXED[rip]
	and	edi, 31
	call	min@PLT
	mov	ecx, DWORD PTR 16[rbp]
	mov	edx, r12d
	mov	rsi, QWORD PTR 16[rbx]
	mov	QWORD PTR 8[rbx], rax
	sar	ecx, 5
	sal	edx, cl
	mov	rcx, QWORD PTR KVM_PMC_FIXED[rip]
	sub	edx, 1
	mov	DWORD PTR [rsi+rcx*4], edx
	mov	ecx, eax
	mov	esi, 1
	mov	edx, r12d
	sal	rsi, cl
	mov	rcx, QWORD PTR X86_PMC_IDX_FIXED[rip]
	lea	rax, -1[rsi]
	sal	rax, cl
	mov	ecx, DWORD PTR [rbx]
	mov	rsi, rax
	sal	edx, cl
	lea	eax, -1[rdx]
	or	eax, esi
	not	eax
	mov	DWORD PTR 44[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	ecx, DWORD PTR [rbx]
	mov	edx, r12d
	sal	edx, cl
	sub	edx, 1
	mov	DWORD PTR 40[rbx], edx
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	kvm_pmu_cpuid_update, .-kvm_pmu_cpuid_update
	.comm	X86_PMC_MAX_GENERIC,4,4
	.comm	X86_PMC_MAX_FIXED,4,4
	.comm	X86_PMC_IDX_FIXED,8,8
	.comm	KVM_PMC_GP,8,8
	.comm	KVM_PMC_FIXED,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_pmu.c_kvm_pmu_cpuid_update.c"
	.text
	.align	2
	.global	kvm_pmu_cpuid_update
	.syntax unified
	.arm
	.fpu softvfp
	.type	kvm_pmu_cpuid_update, %function
kvm_pmu_cpuid_update:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r2, #0
	mov	r10, #0
	mov	fp, #0
	ldr	r8, .L12
	ldr	r7, .L12+4
	ldr	ip, [r8]
	ldr	r1, [r7]
	ldr	r3, [r0, #16]
	str	r10, [r0, #8]
	str	fp, [r0, #12]
	str	r2, [r0]
	str	r2, [r3, ip, lsl #2]
	str	r2, [r3, r1, lsl #2]
	mov	r1, #10
	str	r2, [r0, #20]
	mov	r4, r0
	bl	kvm_find_cpuid_entry
	subs	r5, r0, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r0, [r5]
	and	r3, r0, #255
	cmp	r3, #0
	str	r3, [r4, #20]
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, .L12+8
	asr	r0, r0, #8
	ldr	r1, [r3]
	mov	r6, #1
	and	r0, r0, #255
	bl	min
	mvn	ip, #0
	ldrb	r3, [r5, #2]	@ zero_extendqisi2
	ldr	r1, [r8]
	ldr	r2, [r4, #16]
	lsl	r3, r6, r3
	add	r3, r3, ip
	str	r0, [r4]
	str	r3, [r2, r1, lsl #2]
	ldrb	r1, [r5, #3]	@ zero_extendqisi2
	ldr	r0, [r5, #12]
	sub	r2, r1, #32
	lsl	r3, ip, r1
	orr	r3, r3, ip, lsl r2
	rsb	r2, r1, #32
	orr	r3, r3, ip, lsr r2
	ldr	r2, [r5, #8]
	orr	r3, r3, r0
	orr	r2, r2, ip, lsl r1
	mvn	r3, r3
	mvn	r2, r2
	ldr	r1, [r4, #20]
	str	r3, [r4, #28]
	cmp	r1, r6
	str	r2, [r4, #24]
	beq	.L11
	ldr	r3, .L12+12
	ldr	r0, [r5, #16]
	ldr	r1, [r3]
	and	r0, r0, #31
	bl	min
	mov	r8, r0
	ldr	r3, [r5, #16]
	ldr	r2, [r4, #16]
	asr	r3, r3, #5
	and	r3, r3, #255
	lsl	r3, r6, r3
	ldr	r1, [r7]
	asr	r9, r0, #31
	sub	r3, r3, #1
	str	r8, [r4, #8]
	str	r9, [r4, #12]
	str	r3, [r2, r1, lsl #2]
	ldr	r2, [r4]
	ldr	r3, .L12+16
	lsl	r0, r6, r0
	ldr	r3, [r3]
	lsl	r6, r6, r2
	subs	r0, r0, #1
	rsb	r6, r6, #0
	bic	r6, r6, r0, lsl r3
	str	r6, [r4, #36]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r3, [r4]
	lsl	r1, r1, r3
	add	r1, r1, ip
	str	r1, [r4, #32]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	.align	2
.L12:
	.word	KVM_PMC_GP
	.word	KVM_PMC_FIXED
	.word	X86_PMC_MAX_GENERIC
	.word	X86_PMC_MAX_FIXED
	.word	X86_PMC_IDX_FIXED
	.size	kvm_pmu_cpuid_update, .-kvm_pmu_cpuid_update
	.comm	X86_PMC_MAX_GENERIC,4,4
	.comm	X86_PMC_MAX_FIXED,4,4
	.comm	X86_PMC_IDX_FIXED,8,8
	.comm	KVM_PMC_GP,4,4
	.comm	KVM_PMC_FIXED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
