	.file	"extr_pmu.c_pmu_msr_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	pmu_msr_write
	.type	pmu_msr_write, @function
pmu_msr_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rcx
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR X86_VENDOR_INTEL[rip]
	cmp	QWORD PTR boot_cpu_data[rip], rax
	mov	DWORD PTR 12[rsp], esi
	je	.L2
	call	is_amd_pmu_msr@PLT
	xor	r12d, r12d
	test	rax, rax
	jne	.L13
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rdx, 20[rsp]
	lea	rsi, 16[rsp]
	xor	r12d, r12d
	call	is_intel_pmu_msr@PLT
	test	rax, rax
	je	.L1
	mov	ecx, DWORD PTR 20[rsp]
	mov	edx, DWORD PTR 16[rsp]
	xor	r8d, r8d
	lea	rsi, 12[rsp]
	mov	edi, ebp
	call	xen_intel_pmu_emulate@PLT
	test	eax, eax
	je	.L15
.L5:
	mov	r12d, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rsi, 12[rsp]
	xor	edx, edx
	mov	edi, ebp
	mov	r12d, 1
	call	xen_amd_pmu_emulate@PLT
	test	eax, eax
	jne	.L1
	mov	edx, r14d
	mov	esi, r13d
	mov	edi, ebp
	call	native_write_msr_safe@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edx, r14d
	mov	esi, r13d
	mov	edi, ebp
	call	native_write_msr_safe@PLT
	mov	DWORD PTR [rbx], eax
	jmp	.L5
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pmu_msr_write, .-pmu_msr_write
	.comm	boot_cpu_data,8,8
	.comm	X86_VENDOR_INTEL,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_pmu_msr_write.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	pmu_msr_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	pmu_msr_write, %function
pmu_msr_write:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r1
	ldr	ip, .L19
	ldr	r1, .L19+4
	ldr	ip, [ip]
	ldr	r1, [r1]
	sub	sp, sp, #28
	mov	r7, r3
	ldr	r3, .L19+8
	str	r4, [sp, #8]
	cmp	ip, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r5, r0
	beq	.L2
	bl	is_amd_pmu_msr
	cmp	r0, #0
	bne	.L16
.L1:
	ldr	r3, .L19+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	add	r2, sp, #16
	add	r1, sp, #12
	bl	is_intel_pmu_msr
	cmp	r0, #0
	beq	.L1
	mov	r2, #0
	mov	r0, r5
	str	r2, [sp]
	ldr	r3, [sp, #16]
	ldr	r2, [sp, #12]
	add	r1, sp, #8
	bl	xen_intel_pmu_emulate
	cmp	r0, #0
	beq	.L18
.L7:
	mov	r0, #1
	b	.L1
.L16:
	mov	r2, #0
	mov	r0, r5
	add	r1, sp, #8
	bl	xen_amd_pmu_emulate
	cmp	r0, #0
	bne	.L7
	mov	r2, r6
	mov	r1, r4
	mov	r0, r5
	bl	native_write_msr_safe
	mov	r3, r0
	mov	r0, #1
	str	r3, [r7]
	b	.L1
.L18:
	mov	r2, r6
	mov	r1, r4
	mov	r0, r5
	bl	native_write_msr_safe
	str	r0, [r7]
	b	.L7
.L17:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	boot_cpu_data
	.word	X86_VENDOR_INTEL
	.word	.LC0
	.size	pmu_msr_write, .-pmu_msr_write
	.comm	boot_cpu_data,4,4
	.comm	X86_VENDOR_INTEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
