	.file	"extr_c-r4k.c_probe_vcache.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Unified victim cache %ldkB %s, linesize %d bytes.\n"
	.text
	.p2align 4
	.type	probe_vcache, @function
probe_vcache:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	xor	eax, eax
	call	current_cpu_type@PLT
	cmp	rax, QWORD PTR CPU_LOONGSON3[rip]
	je	.L7
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	xor	eax, eax
	call	read_c0_config2@PLT
	mov	ecx, eax
	shr	ecx, 20
	and	ecx, 15
	jne	.L3
	mov	ecx, eax
	shr	eax, 16
	mov	edi, 64
	xor	r9d, r9d
	shr	ecx, 24
	and	eax, 15
	xor	esi, esi
	xor	r8d, r8d
	and	ecx, 15
	sal	edi, cl
	lea	ecx, 1[rax]
	xor	eax, eax
.L4:
	mov	DWORD PTR current_cpu_data[rip+12], eax
	mov	rax, QWORD PTR way_string[rip]
	mov	DWORD PTR current_cpu_data[rip+4], edi
	lea	rdi, .LC0[rip]
	mov	DWORD PTR current_cpu_data[rip+8], ecx
	mov	DWORD PTR vcache_size[rip], esi
	mov	esi, r9d
	mov	DWORD PTR current_cpu_data[rip], r8d
	mov	edx, DWORD PTR [rax+rcx*4]
	mov	ecx, r8d
	mov	QWORD PTR current_cpu_data[rip+16], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	pr_info@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	r8d, 2
	mov	edi, 64
	sal	r8d, cl
	mov	ecx, eax
	shr	eax, 16
	shr	ecx, 24
	and	eax, 15
	and	ecx, 15
	sal	edi, cl
	lea	ecx, 1[rax]
	mov	esi, edi
	imul	esi, ecx
	imul	esi, r8d
	mov	eax, esi
	mov	r9d, esi
	cdq
	sar	r9d, 10
	idiv	ecx
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	probe_vcache, .-probe_vcache
	.comm	way_string,8,8
	.comm	vcache_size,4,4
	.comm	current_cpu_data,24,16
	.comm	CPU_LOONGSON3,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_c-r4k.c_probe_vcache.c"
	.text
	.global	__aeabi_uidiv
	.global	__aeabi_idiv
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unified victim cache %ldkB %s, linesize %d bytes.\012"
	.ascii	"\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	probe_vcache, %function
probe_vcache:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	bl	current_cpu_type
	ldr	r3, .L7
	ldr	r3, [r3]
	cmp	r0, r3
	popne	{r4, r5, r6, r7, r8, pc}
	bl	read_c0_config2
	lsr	r1, r0, #20
	ands	r1, r1, #15
	mov	r6, #64
	bne	.L3
	lsr	r3, r0, #24
	lsr	r4, r0, #16
	mov	r7, r1
	mov	r0, r1
	mov	r5, r1
	and	r3, r3, #15
	and	r4, r4, #15
	add	r4, r4, #1
	lsl	r6, r6, r3
.L4:
	mov	lr, #0
	ldr	ip, .L7+4
	ldr	r3, .L7+8
	stm	ip, {r5, r6}
	ldr	r2, [r3]
	ldr	r3, .L7+12
	str	r4, [ip, #8]
	str	r7, [r3]
	str	r0, [ip, #12]
	ldr	r2, [r2, r4, lsl #2]
	mov	r3, r5
	str	lr, [ip, #16]
	ldr	r0, .L7+16
	pop	{r4, r5, r6, r7, r8, lr}
	b	pr_info
.L3:
	mov	r5, #2
	lsr	r2, r0, #24
	lsr	r4, r0, #16
	and	r2, r2, #15
	and	r4, r4, #15
	add	r4, r4, #1
	lsl	r6, r6, r2
	mul	r7, r4, r6
	lsl	r5, r5, r1
	mul	r7, r5, r7
	mov	r1, r4
	mov	r0, r7
	bl	__aeabi_idiv
	asr	r1, r7, #10
	b	.L4
.L8:
	.align	2
.L7:
	.word	CPU_LOONGSON3
	.word	current_cpu_data
	.word	way_string
	.word	vcache_size
	.word	.LC0
	.size	probe_vcache, .-probe_vcache
	.comm	way_string,4,4
	.comm	vcache_size,4,4
	.comm	current_cpu_data,20,4
	.comm	CPU_LOONGSON3,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
