	.file	"extr_amd.c_amd_set_mtrr.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	amd_set_mtrr, @function
amd_set_mtrr:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR MSR_K6_UWCCR[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR [rsp]
	call	rdmsr@PLT
	test	rbx, rbx
	je	.L2
	mov	eax, DWORD PTR PAGE_SHIFT[rip]
	mov	ecx, 15
	neg	rbx
	add	r13d, 1
	movsx	r13, r13d
	sub	ecx, eax
	shr	rbx, cl
	mov	ecx, eax
	sal	r12, cl
	and	ebx, 131068
	or	r12, r13
	or	rbx, r12
.L2:
	xor	eax, eax
	mov	QWORD PTR [rsp+rbp*8], rbx
	call	wbinvd@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	mov	rdx, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR [rsp]
	mov	edi, DWORD PTR MSR_K6_UWCCR[rip]
	add	rsp, 40
	.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	wrmsr@PLT
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	amd_set_mtrr, .-amd_set_mtrr
	.comm	PAGE_SHIFT,4,4
	.comm	MSR_K6_UWCCR,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_amd.c_amd_set_mtrr.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	amd_set_mtrr, %function
amd_set_mtrr:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r2
	ldr	r6, .L11
	sub	sp, sp, #16
	mov	r8, r3
	ldr	r3, .L11+4
	mov	r5, r0
	mov	r7, r1
	ldr	r2, [sp, #8]
	ldr	r0, [r6]
	ldr	r1, [sp, #4]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	rdmsr
	cmp	r4, #0
	beq	.L2
	ldr	r3, .L11+8
	ldr	ip, .L11+12
	ldr	r0, [r3]
	add	r3, r8, #1
	rsb	r4, r4, #0
	orr	r3, r3, r7, lsl r0
	rsb	r0, r0, #15
	and	r0, ip, r4, lsr r0
	orr	r4, r0, r3
.L2:
	add	r3, sp, #16
	add	r5, r3, r5, lsl #2
	str	r4, [r5, #-12]
	bl	wbinvd
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	ldmib	sp, {r1, r2}
	ldr	r0, [r6]
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	wrmsr
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	MSR_K6_UWCCR
	.word	.LC0
	.word	PAGE_SHIFT
	.word	131068
	.size	amd_set_mtrr, .-amd_set_mtrr
	.comm	PAGE_SHIFT,4,4
	.comm	MSR_K6_UWCCR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
