// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpu_ident_internal
int cpu_ident_internal(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct internal_id_info_t* internal)
{
	int r;
	struct cpu_raw_data_t myraw;
	if (!raw) {
		if ((r = cpuid_get_raw_data(&myraw)) < 0)
			return cpuid_set_error(r);
		raw = &myraw;
	}
	cpu_id_t_constructor(data);
	memset(internal->cache_mask, 0, sizeof(internal->cache_mask));
	if ((r = cpuid_basic_identify(raw, data)) < 0)
		return cpuid_set_error(r);
	switch (data->vendor) {
		case VENDOR_INTEL:
			r = cpuid_identify_intel(raw, data, internal);
			break;
		case VENDOR_AMD:
		case VENDOR_HYGON:
			r = cpuid_identify_amd(raw, data, internal);
			break;
		case VENDOR_CENTAUR:
			r = cpuid_identify_centaur(raw, data, internal);
			break;
		default:
			break;
	}
	/* Backward compatibility */
	/* - Deprecated since v0.5.0 */
	data->l1_assoc     = data->l1_data_assoc;
	data->l1_cacheline = data->l1_data_cacheline;
	return cpuid_set_error(r);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x780, %rsp            # imm = 0x780
movq %rdx, %r14
movq %rsi, %rbx
testq %rdi, %rdi
je 0xc20c2
movq %rdi, %r15
leaq 0x200(%rdi), %r12
jmp 0xc20e2
leaq 0x200(%rsp), %r15
movq %r15, %rdi
callq 0xc0d95
testl %eax, %eax
js 0xc2388
leaq 0x400(%rsp), %r12
movq %rbx, %rdi
callq 0xc2460
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%r14)
andl $0x0, 0x24(%r14)
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
leaq 0x4(%rbx), %rsi
movq %r15, %rdi
callq 0xc3065
movl %eax, 0x54(%rbx)
cmpl $-0x1, %eax
je 0xc21d1
andl $0x0, (%rbx)
cmpl $0x0, (%r15)
jle 0xc2192
movl 0x10(%r15), %ecx
shrl $0x8, %ecx
andl $0xf, %ecx
movl %ecx, 0xd8(%rbx)
movl 0x10(%r15), %edx
shrl $0x4, %edx
andl $0xf, %edx
movl %edx, 0xdc(%rbx)
movl 0x10(%r15), %esi
andl $0xf, %esi
movl %esi, 0xe0(%rbx)
movl 0x10(%r15), %esi
movl %esi, %edi
shrl $0x14, %edi
xorl %r8d, %r8d
cmpl $0xf, %ecx
movzbl %dil, %edi
cmovel %edi, %r8d
cmpl $0x1, %eax
cmovnel %edi, %r8d
addl %ecx, %r8d
movl %r8d, 0xe4(%rbx)
shrl $0xc, %esi
andl $0xf0, %esi
orl %edx, %esi
movl %esi, 0xe8(%rbx)
cmpl $0x80000004, 0x200(%r15) # imm = 0x80000004
jb 0xc2212
addq $0x20, %r12
leaq 0x40(%rsp), %rax
xorl %ecx, %ecx
cmpq $0x3, %rcx
je 0xc21ef
xorl %edx, %edx
cmpq $0x4, %rdx
je 0xc21c4
movl (%r12,%rdx,4), %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
jmp 0xc21b2
incq %rcx
addq $0x10, %r12
addq $0x10, %rax
jmp 0xc21aa
leaq 0x9f158(%rip), %rdi     # 0x161330
callq 0x57820
movl $0xfffffff9, 0x30(%rax) # imm = 0xFFFFFFF9
pushq $-0x7
popq %rbp
jmp 0xc244e
leaq 0x3f(%rsp), %rsi
movb $0x0, 0x31(%rsi)
cmpb $0x20, 0x1(%rsi)
leaq 0x1(%rsi), %rsi
je 0xc21f8
leaq 0x14(%rbx), %rdi
pushq $0x40
popq %rdx
callq 0x566f0
movb $0x0, 0x44(%rbx)
leaq 0x415f7(%rip), %rsi     # 0x103810
leaq 0x140(%rsp), %rdi
movl $0xb8, %edx
callq 0x562f0
leaq 0x4169e(%rip), %rsi     # 0x1038d0
leaq 0xb0(%rsp), %rdi
movl $0x88, %edx
callq 0x562f0
movaps 0x41735(%rip), %xmm0    # 0x103980
movaps %xmm0, 0xa0(%rsp)
movaps 0x41716(%rip), %xmm0    # 0x103970
movaps %xmm0, 0x90(%rsp)
movaps 0x416f7(%rip), %xmm0    # 0x103960
movaps %xmm0, 0x80(%rsp)
movaps 0x41718(%rip), %xmm0    # 0x103990
movaps %xmm0, 0x20(%rsp)
movabsq $0x3d0000001d, %rax     # imm = 0x3D0000001D
movq %rax, 0x30(%rsp)
movaps 0x4147d(%rip), %xmm0    # 0x103710
movaps %xmm0, 0x10(%rsp)
movabsq $0x5200000008, %rax     # imm = 0x5200000008
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r15)
je 0xc22f8
movl 0x1c(%r15), %edx
leaq 0x140(%rsp), %rdi
pushq $0x17
popq %rsi
movq %rbx, %rcx
callq 0xc33d8
movl 0x18(%r15), %edx
leaq 0xb0(%rsp), %rdi
pushq $0x11
popq %rsi
movq %rbx, %rcx
callq 0xc33d8
cmpl $0x7, (%r15)
jb 0xc22f8
movl 0x74(%r15), %edx
leaq 0x80(%rsp), %rdi
pushq $0x6
popq %rsi
movq %rbx, %rcx
callq 0xc33d8
cmpl $0x80000001, 0x200(%r15) # imm = 0x80000001
jb 0xc2357
movl 0x21c(%r15), %edx
leaq 0x20(%rsp), %rdi
pushq $0x3
popq %rsi
movq %rbx, %rcx
callq 0xc33d8
movl 0x218(%r15), %edx
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
movq %rbx, %rcx
callq 0xc33d8
cmpl $0x80000007, 0x200(%r15) # imm = 0x80000007
jb 0xc2357
movl 0x27c(%r15), %edx
leaq 0x8(%rsp), %rdi
pushq $0x1
popq %rsi
movq %rbx, %rcx
callq 0xc33d8
cmpb $0x0, 0x6f(%rbx)
je 0xc23c7
movl 0x54(%rbx), %eax
testl %eax, %eax
je 0xc23a1
cmpl $0x1, %eax
jne 0xc23c7
movl 0xe4(%rbx), %eax
xorl %ecx, %ecx
cmpl $0x11, %eax
setne %cl
shll $0x6, %ecx
addl $0x40, %ecx
cmpl $0x10, %eax
pushq $0x40
popq %rax
cmovgel %ecx, %eax
jmp 0xc23c1
movl %eax, %ebp
leaq 0x9ef9f(%rip), %rdi     # 0x161330
callq 0x57820
movl %ebp, 0x30(%rax)
jmp 0xc244e
cmpl $0x6, 0xd8(%rbx)
jne 0xc23be
xorl %eax, %eax
cmpl $0xf, 0xe8(%rbx)
setge %al
shll $0x6, %eax
addl $0x40, %eax
jmp 0xc23c1
pushq $0x40
popq %rax
movl %eax, 0x190(%rbx)
callq 0xc0d70
movl %eax, 0xf4(%rbx)
leaq 0x9ef57(%rip), %rdi     # 0x161330
callq 0x57820
leaq 0x30(%rax), %r12
andl $0x0, (%r12)
movl 0x54(%rbx), %eax
cmpl $0xa, %eax
je 0xc2412
cmpl $0x1, %eax
je 0xc2412
cmpl $0x6, %eax
je 0xc2422
xorl %ebp, %ebp
testl %eax, %eax
jne 0xc2432
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc4dee
jmp 0xc2430
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc44d0
jmp 0xc2430
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xc4afc
movl %eax, %ebp
movl 0x110(%rbx), %eax
movl 0x128(%rbx), %ecx
movl %eax, 0x10c(%rbx)
movl %ecx, 0x124(%rbx)
movl %ebp, (%r12)
movl %ebp, %eax
addq $0x780, %rsp            # imm = 0x780
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq