// File: /workspace/github_c_makefile_star2_O1/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 0xc9512
movq %rdi, %r15
leaq 0x220(%rdi), %r12
jmp 0xc9532
leaq 0x200(%rsp), %r15
movq %r15, %rdi
callq 0xc8243
testl %eax, %eax
js 0xc981f
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 0xcb1ae
movl %ebp, 0x21d8(%rbx)
movl %ebp, 0x24(%r14)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x14(%r14)
movdqa %xmm0, 0xa0(%rsp)
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x70(%rsp)
leaq 0x4(%rbx), %rsi
movq %r15, %rdi
callq 0xca57e
movl %eax, %ebp
movl %eax, 0x54(%rbx)
cmpl $-0x1, %eax
je 0xc9817
movl $0x0, (%rbx)
cmpl $0x0, (%r15)
jle 0xc964c
movl 0x10(%r15), %eax
shrl $0x8, %eax
andl $0xf, %eax
movl %eax, 0xd8(%rbx)
movl 0x10(%r15), %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
movl %ecx, 0xdc(%rbx)
movl 0x10(%r15), %edx
andl $0xf, %edx
movl %edx, 0xe0(%rbx)
movl 0x10(%r15), %edx
movl %edx, %esi
shrl $0x14, %esi
xorl %edi, %edi
cmpl $0xf, %eax
movzbl %sil, %esi
cmovel %esi, %edi
cmpl $0x1, %ebp
cmovnel %esi, %edi
addl %eax, %edi
movl %edi, 0xe4(%rbx)
shrl $0xc, %edx
andl $0xf0, %edx
orl %ecx, %edx
movl %edx, 0xe8(%rbx)
cmpl $0x80000004, 0x200(%r15) # imm = 0x80000004
jb 0xc969d
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 0xc9681
leaq 0x14(%rbx), %rdi
movl $0x40, %edx
callq 0x556a0
movb $0x0, 0x44(%rbx)
leaq 0x4b0cc(%rip), %rsi     # 0x114770
leaq 0x140(%rsp), %rdi
movl $0xb8, %edx
callq 0x552d0
leaq 0x4b173(%rip), %rsi     # 0x114830
leaq 0xb0(%rsp), %rdi
movl $0x88, %edx
callq 0x552d0
movaps 0x4b20a(%rip), %xmm0    # 0x1148e0
movaps %xmm0, 0x60(%rsp)
movaps 0x4b1ee(%rip), %xmm0    # 0x1148d0
movaps %xmm0, 0x50(%rsp)
movaps 0x4b1d2(%rip), %xmm0    # 0x1148c0
movaps %xmm0, 0x40(%rsp)
movaps 0x4b1f6(%rip), %xmm0    # 0x1148f0
movaps %xmm0, 0x20(%rsp)
movabsq $0x3d0000001d, %rax     # imm = 0x3D0000001D
movq %rax, 0x30(%rsp)
movdqa 0x4af5a(%rip), %xmm0    # 0x114670
movdqa %xmm0, 0x10(%rsp)
movabsq $0x5200000008, %rax     # imm = 0x5200000008
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r15)
je 0xc9763
movl 0x1c(%r15), %edx
leaq 0x140(%rsp), %rdi
movl $0x17, %esi
movq %rbx, %rcx
callq 0xca938
movl 0x18(%r15), %edx
leaq 0xb0(%rsp), %rdi
movl $0x11, %esi
movq %rbx, %rcx
callq 0xca938
cmpl $0x7, (%r15)
jb 0xc977f
movl 0x74(%r15), %edx
leaq 0x40(%rsp), %rdi
movl $0x6, %esi
movq %rbx, %rcx
callq 0xca938
cmpl $0x80000001, 0x200(%r15) # imm = 0x80000001
jb 0xc97be
movl 0x21c(%r15), %edx
leaq 0x20(%rsp), %rdi
movl $0x3, %esi
movq %rbx, %rcx
callq 0xca938
movl 0x218(%r15), %edx
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movq %rbx, %rcx
callq 0xca938
cmpl $0x80000007, 0x200(%r15) # imm = 0x80000007
jb 0xc97e4
movl 0x27c(%r15), %edx
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movq %rbx, %rcx
callq 0xca938
cmpb $0x0, 0x6f(%rbx)
je 0xc984d
movl 0x54(%rbx), %eax
testl %eax, %eax
je 0xc9827
cmpl $0x1, %eax
jne 0xc984d
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 0xc9847
movl $0xfffffff9, %r12d      # imm = 0xFFFFFFF9
jmp 0xc9860
movl %eax, %r12d
jmp 0xc98de
movl $0x40, %eax
cmpl $0x6, 0xd8(%rbx)
jne 0xc9847
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)
xorl %r12d, %r12d
leaq 0xa2ac9(%rip), %rdi     # 0x16c330
callq 0x566e0
movl %r12d, 0x30(%rax)
cmpl $-0x1, %ebp
je 0xc98de
movl 0x54(%rbx), %eax
cmpl $0x5, %eax
jg 0xc988b
testl %eax, %eax
je 0xc98a5
cmpl $0x1, %eax
je 0xc9895
jmp 0xc98c6
cmpl $0x6, %eax
je 0xc98b5
cmpl $0xa, %eax
jne 0xc98c6
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xcbc04
jmp 0xc98c3
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xcc549
jmp 0xc98c3
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0xcc26c
movl %eax, %r12d
movl 0x110(%rbx), %eax
movl 0x128(%rbx), %ecx
movl %eax, 0x10c(%rbx)
movl %ecx, 0x124(%rbx)
leaq 0xa2a4b(%rip), %rdi     # 0x16c330
callq 0x566e0
movl %r12d, 0x30(%rax)
movl %r12d, %eax
addq $0x780, %rsp            # imm = 0x780
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq