// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpuid_get_raw_data
int cpuid_get_raw_data(struct cpu_raw_data_t* data)
{
	unsigned i;
	if (!cpuid_present())
		return cpuid_set_error(ERR_NO_CPUID);
	for (i = 0; i < 32; i++)
		cpu_exec_cpuid(i, data->basic_cpuid[i]);
	for (i = 0; i < 32; i++)
		cpu_exec_cpuid(0x80000000 + i, data->ext_cpuid[i]);
	for (i = 0; i < MAX_INTELFN4_LEVEL; i++) {
		memset(data->intel_fn4[i], 0, sizeof(data->intel_fn4[i]));
		data->intel_fn4[i][EAX] = 4;
		data->intel_fn4[i][ECX] = i;
		cpu_exec_cpuid_ext(data->intel_fn4[i]);
	}
	for (i = 0; i < MAX_INTELFN11_LEVEL; i++) {
		memset(data->intel_fn11[i], 0, sizeof(data->intel_fn11[i]));
		data->intel_fn11[i][EAX] = 11;
		data->intel_fn11[i][ECX] = i;
		cpu_exec_cpuid_ext(data->intel_fn11[i]);
	}
	for (i = 0; i < MAX_INTELFN12H_LEVEL; i++) {
		memset(data->intel_fn12h[i], 0, sizeof(data->intel_fn12h[i]));
		data->intel_fn12h[i][EAX] = 0x12;
		data->intel_fn12h[i][ECX] = i;
		cpu_exec_cpuid_ext(data->intel_fn12h[i]);
	}
	for (i = 0; i < MAX_INTELFN14H_LEVEL; i++) {
		memset(data->intel_fn14h[i], 0, sizeof(data->intel_fn14h[i]));
		data->intel_fn14h[i][EAX] = 0x14;
		data->intel_fn14h[i][ECX] = i;
		cpu_exec_cpuid_ext(data->intel_fn14h[i]);
	}
	for (i = 0; i < MAX_AMDFN8000001DH_LEVEL; i++) {
		memset(data->amd_fn8000001dh[i], 0, sizeof(data->amd_fn8000001dh[i]));
		data->amd_fn8000001dh[i][EAX] = 0x8000001d;
		data->amd_fn8000001dh[i][ECX] = i;
		cpu_exec_cpuid_ext(data->amd_fn8000001dh[i]);
	}
	return cpuid_set_error(ERR_OK);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0xc5ef0
testl %eax, %eax
je 0xc0f03
xorl %r14d, %r14d
movq %rbx, %r15
cmpq $0x20, %r14
je 0xc0dca
movl %r14d, %edi
movq %r15, %rsi
callq 0xc0d7d
incq %r14
addq $0x10, %r15
jmp 0xc0db0
leaq 0x200(%rbx), %r14
xorl %r15d, %r15d
cmpq $0x20, %r15
je 0xc0df4
movl %r15d, %edi
orl $0x80000000, %edi       # imm = 0x80000000
movq %r14, %rsi
callq 0xc0d7d
incq %r15
addq $0x10, %r14
jmp 0xc0dd4
leaq 0x400(%rbx), %r14
xorl %r15d, %r15d
cmpq $0x8, %r15
je 0xc0e2a
andq $0x0, 0x4(%r14)
andl $0x0, 0xc(%r14)
movl $0x4, (%r14)
movl %r15d, 0x8(%r14)
movq %r14, %rdi
callq 0xc5ef4
incq %r15
addq $0x10, %r14
jmp 0xc0dfe
leaq 0x480(%rbx), %r14
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0xc0e60
andq $0x0, 0x4(%r14)
andl $0x0, 0xc(%r14)
movl $0xb, (%r14)
movl %r15d, 0x8(%r14)
movq %r14, %rdi
callq 0xc5ef4
incq %r15
addq $0x10, %r14
jmp 0xc0e34
leaq 0x4c0(%rbx), %r14
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0xc0e96
andq $0x0, 0x4(%r14)
andl $0x0, 0xc(%r14)
movl $0x12, (%r14)
movl %r15d, 0x8(%r14)
movq %r14, %rdi
callq 0xc5ef4
incq %r15
addq $0x10, %r14
jmp 0xc0e6a
leaq 0x500(%rbx), %r14
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0xc0ecc
andq $0x0, 0x4(%r14)
andl $0x0, 0xc(%r14)
movl $0x14, (%r14)
movl %r15d, 0x8(%r14)
movq %r14, %rdi
callq 0xc5ef4
incq %r15
addq $0x10, %r14
jmp 0xc0ea0
addq $0x540, %rbx            # imm = 0x540
xorl %r14d, %r14d
xorl %r15d, %r15d
cmpq $0x4, %r15
je 0xc0f07
andq $0x0, 0x4(%rbx)
andl $0x0, 0xc(%rbx)
movl $0x8000001d, (%rbx)     # imm = 0x8000001D
movl %r15d, 0x8(%rbx)
movq %rbx, %rdi
callq 0xc5ef4
incq %r15
addq $0x10, %rbx
jmp 0xc0ed9
pushq $-0x1
popq %r14
leaq 0xa0422(%rip), %rdi     # 0x161330
callq 0x57820
movl %r14d, 0x30(%rax)
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq