// File: /workspace/github_c_makefile_star2_O3/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 0xc85ee
movq %rdi, %r15
leaq 0x220(%rdi), %r12
jmp 0xc860e
leaq 0x200(%rsp), %r15
movq %r15, %rdi
callq 0xc72a7
testl %eax, %eax
js 0xc8906
leaq 0x420(%rsp), %r12
xorl %ebp, %ebp
movl $0x21e0, %edx           # imm = 0x21E0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x55f20
movl $0xffffffff, 0x190(%rbx) # imm = 0xFFFFFFFF
leaq 0x1d8(%rbx), %rdi
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0xf8(%rbx)
movdqu %xmm0, 0x108(%rbx)
movdqu %xmm0, 0x118(%rbx)
movdqu %xmm0, 0x128(%rbx)
movdqu %xmm0, 0x138(%rbx)
movq $-0x1, 0x148(%rbx)
callq 0xca3b8
movl %ebp, 0x21d8(%rbx)
movl %ebp, 0x24(%r14)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x14(%r14)
movdqa %xmm0, 0xa0(%rsp)
leaq 0x4(%rbx), %rsi
movq %r15, %rdi
callq 0xc978e
movl %eax, 0x54(%rbx)
cmpl $-0x1, %eax
je 0xc88e6
movl $0x0, (%rbx)
cmpl $0x0, (%r15)
jle 0xc8713
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 0xc8764
movdqu (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
leaq 0x6f(%rsp), %rsi
movaps %xmm2, 0x21(%rsi)
movaps %xmm1, 0x11(%rsi)
movdqa %xmm0, 0x1(%rsi)
movb $0x0, 0x31(%rsi)
cmpb $0x20, 0x1(%rsi)
leaq 0x1(%rsi), %rsi
je 0xc8748
leaq 0x14(%rbx), %rdi
movl $0x40, %edx
callq 0x556a0
movb $0x0, 0x44(%rbx)
leaq 0x4b215(%rip), %rsi     # 0x113980
leaq 0x140(%rsp), %rdi
movl $0xb8, %edx
callq 0x552d0
leaq 0x4b2bc(%rip), %rsi     # 0x113a40
leaq 0xb0(%rsp), %rdi
movl $0x88, %edx
callq 0x552d0
movaps 0x4b353(%rip), %xmm0    # 0x113af0
movaps %xmm0, 0x60(%rsp)
movaps 0x4b337(%rip), %xmm0    # 0x113ae0
movaps %xmm0, 0x50(%rsp)
movaps 0x4b31b(%rip), %xmm0    # 0x113ad0
movaps %xmm0, 0x40(%rsp)
movaps 0x4b33f(%rip), %xmm0    # 0x113b00
movaps %xmm0, 0x20(%rsp)
movabsq $0x3d0000001d, %rax     # imm = 0x3D0000001D
movq %rax, 0x30(%rsp)
movdqa 0x4b0a3(%rip), %xmm0    # 0x113880
movdqa %xmm0, 0x10(%rsp)
movabsq $0x5200000008, %rax     # imm = 0x5200000008
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r15)
je 0xc8846
movl 0x1c(%r15), %edx
leaq 0x140(%rsp), %rdi
movl $0x17, %esi
movq %rbx, %rcx
callq 0xc9b5c
movl 0x18(%r15), %edx
leaq 0xb0(%rsp), %rdi
movl $0x11, %esi
movq %rbx, %rcx
callq 0xc9b5c
cmpl $0x7, (%r15)
jb 0xc8846
movl 0x74(%r15), %edx
leaq 0x40(%rsp), %rdi
movl $0x6, %esi
movq %rbx, %rcx
callq 0xc9b5c
cmpl $0x80000001, 0x200(%r15) # imm = 0x80000001
jb 0xc88ab
movl 0x21c(%r15), %edx
leaq 0x20(%rsp), %rdi
movl $0x3, %esi
movq %rbx, %rcx
callq 0xc9b5c
movl 0x218(%r15), %edx
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movq %rbx, %rcx
callq 0xc9b5c
cmpl $0x80000007, 0x200(%r15) # imm = 0x80000007
jb 0xc88ab
movl 0x27c(%r15), %edx
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0xc9b5c
cmpb $0x0, 0x6f(%rbx)
je 0xc8945
movl 0x54(%rbx), %eax
testl %eax, %eax
je 0xc891f
cmpl $0x1, %eax
jne 0xc8945
movl 0xe4(%rbx), %eax
xorl %ecx, %ecx
cmpl $0x11, %eax
setne %cl
shll $0x6, %ecx
addl $0x40, %ecx
cmpl $0x10, %eax
movl $0x40, %eax
cmovgel %ecx, %eax
jmp 0xc893f
leaq 0xa2a43(%rip), %rdi     # 0x16b330
callq 0x566e0
movl $0xfffffff9, 0x30(%rax) # imm = 0xFFFFFFF9
movl $0xfffffff9, %ebp       # imm = 0xFFFFFFF9
jmp 0xc89db
movl %eax, %ebp
leaq 0xa2a21(%rip), %rdi     # 0x16b330
callq 0x566e0
movl %ebp, 0x30(%rax)
jmp 0xc89db
movl $0x40, %eax
cmpl $0x6, 0xd8(%rbx)
jne 0xc893f
xorl %eax, %eax
cmpl $0xf, 0xe8(%rbx)
setge %al
shll $0x6, %eax
addl $0x40, %eax
movl %eax, 0x190(%rbx)
movl $0x54, %edi
callq 0x56b60
movl %eax, 0xf4(%rbx)
leaq 0xa29d4(%rip), %rdi     # 0x16b330
callq 0x566e0
leaq 0x30(%rax), %r12
movl $0x0, (%r12)
movl 0x54(%rbx), %eax
xorl %ebp, %ebp
cmpl $0x5, %eax
jg 0xc8985
testl %eax, %eax
je 0xc899f
cmpl $0x1, %eax
je 0xc898f
jmp 0xc89bf
cmpl $0x6, %eax
je 0xc89af
cmpl $0xa, %eax
jne 0xc89bf
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xcae00
jmp 0xc89bd
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xcb7e1
jmp 0xc89bd
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xcb45c
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