// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libcpuid/recog_intel.c
// Function: load_intel_features
static void load_intel_features(struct cpu_raw_data_t* raw, struct cpu_id_t* data)
{
	const struct feature_map_t matchtable_edx1[] = {
		{ 18, CPU_FEATURE_PN },
		{ 21, CPU_FEATURE_DTS },
		{ 22, CPU_FEATURE_ACPI },
		{ 27, CPU_FEATURE_SS },
		{ 29, CPU_FEATURE_TM },
		{ 30, CPU_FEATURE_IA64 },
		{ 31, CPU_FEATURE_PBE },
	};
	const struct feature_map_t matchtable_ecx1[] = {
		{  2, CPU_FEATURE_DTS64 },
		{  4, CPU_FEATURE_DS_CPL },
		{  5, CPU_FEATURE_VMX },
		{  6, CPU_FEATURE_SMX },
		{  7, CPU_FEATURE_EST },
		{  8, CPU_FEATURE_TM2 },
		{ 10, CPU_FEATURE_CID },
		{ 14, CPU_FEATURE_XTPR },
		{ 15, CPU_FEATURE_PDCM },
		{ 18, CPU_FEATURE_DCA },
		{ 21, CPU_FEATURE_X2APIC },
	};
	const struct feature_map_t matchtable_edx81[] = {
		{ 20, CPU_FEATURE_XD },
	};
	const struct feature_map_t matchtable_ebx7[] = {
		{  2, CPU_FEATURE_SGX },
		{  4, CPU_FEATURE_HLE },
		{ 11, CPU_FEATURE_RTM },
		{ 16, CPU_FEATURE_AVX512F },
		{ 17, CPU_FEATURE_AVX512DQ },
		/* id 18 and 19 are handled in common */
		{ 26, CPU_FEATURE_AVX512PF },
		{ 27, CPU_FEATURE_AVX512ER },
		{ 28, CPU_FEATURE_AVX512CD },
		/* id 29 is handled in common */
		{ 30, CPU_FEATURE_AVX512BW },
		{ 31, CPU_FEATURE_AVX512VL },
	};
	const struct feature_map_t matchtable_ecx7[] = {
		{  1, CPU_FEATURE_AVX512VBMI },
		{  6, CPU_FEATURE_AVX512VBMI2 },
		{ 11, CPU_FEATURE_AVX512VNNI },
	};
	if (raw->basic_cpuid[0][EAX] >= 1) {
		match_features(matchtable_edx1, COUNT_OF(matchtable_edx1), raw->basic_cpuid[1][EDX], data);
		match_features(matchtable_ecx1, COUNT_OF(matchtable_ecx1), raw->basic_cpuid[1][ECX], data);
	}
	if (raw->ext_cpuid[0][EAX] >= 1) {
		match_features(matchtable_edx81, COUNT_OF(matchtable_edx81), raw->ext_cpuid[1][EDX], data);
	}
	// detect TSX/AVX512:
	if (raw->basic_cpuid[0][EAX] >= 7) {
		match_features(matchtable_ebx7, COUNT_OF(matchtable_ebx7), raw->basic_cpuid[7][EBX], data);
		match_features(matchtable_ecx7, COUNT_OF(matchtable_ecx7), raw->basic_cpuid[7][ECX], data);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0x83442(%rip), %rsi     # 0x1bbc30
movl $0x38, %edx
callq 0x593a0
leaq -0xb0(%rbp), %rdi
leaq 0x8346a(%rip), %rsi     # 0x1bbc70
movl $0x58, %edx
callq 0x593a0
movq 0x838f5(%rip), %rax     # 0x1bc10c
movq %rax, -0xb8(%rbp)
leaq -0x110(%rbp), %rdi
leaq 0x834a4(%rip), %rsi     # 0x1bbcd0
movl $0x50, %edx
callq 0x593a0
movq 0x834e3(%rip), %rax     # 0x1bbd20
movq %rax, -0x130(%rbp)
movq 0x834dd(%rip), %rax     # 0x1bbd28
movq %rax, -0x128(%rbp)
movq 0x834d7(%rip), %rax     # 0x1bbd30
movq %rax, -0x120(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jb 0x13889e
leaq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edx
movq -0x10(%rbp), %rcx
movl $0x7, %esi
callq 0x135600
leaq -0xb0(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movq -0x10(%rbp), %rcx
movl $0xb, %esi
callq 0x135600
movq -0x8(%rbp), %rax
cmpl $0x1, 0x200(%rax)
jb 0x1388ca
leaq -0xb8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x21c(%rax), %edx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x135600
movq -0x8(%rbp), %rax
cmpl $0x7, (%rax)
jb 0x13890b
leaq -0x110(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x74(%rax), %edx
movq -0x10(%rbp), %rcx
movl $0xa, %esi
callq 0x135600
leaq -0x130(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x78(%rax), %edx
movq -0x10(%rbp), %rcx
movl $0x3, %esi
callq 0x135600
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw %cs:(%rax,%rax)