LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: update_core_instances
static void update_core_instances(struct internal_core_instances_t* cores,
                                   struct internal_apic_info_t* apic_info)
{
	uint32_t core_id_index = 0;

	core_id_index = apic_info->core_id % CORES_HTABLE_SIZE;
	if ((cores->htable[core_id_index].core_id == 0) || (cores->htable[core_id_index].core_id == apic_info->core_id)) {
		if (cores->htable[core_id_index].num_logical_cpu == 0)
			cores->instances++;
		cores->htable[core_id_index].core_id = apic_info->core_id;
		cores->htable[core_id_index].num_logical_cpu++;
	}
	else {
		warnf("update_core_instances: collision at index %u (core ID is %i, not %i)\n",
			core_id_index, cores->htable[core_id_index].core_id, apic_info->core_id);
	}
}

// Assembly:
movl 0x8(%rsi), %ecx
movl $0x100, %esi            # imm = 0x100
movl %ecx, %eax
cltd
idivl %esi
movl 0x8(%rdi,%rdx,8), %eax
testl %eax, %eax
setne %sil
cmpl %ecx, %eax
setne %r8b
testb %r8b, %sil
jne 0xc2cc0
movzwl 0x4(%rdi,%rdx,8), %eax
testw %ax, %ax
jne 0xc2cb4
incb (%rdi)
movl %ecx, 0x8(%rdi,%rdx,8)
incl %eax
movw %ax, 0x4(%rdi,%rdx,8)
retq
leaq 0x41953(%rip), %rdi     # 0x10461a
movl %edx, %esi
movl %eax, %edx
xorl %eax, %eax
jmp 0xc340e
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpu_request_core_type
int cpu_request_core_type(cpu_purpose_t purpose, struct cpu_raw_data_array_t* raw_array, struct cpu_id_t* data)
{
	int error;
	logical_cpu_t logical_cpu = 0;
	struct cpu_raw_data_array_t my_raw_array;
	struct internal_id_info_t throwaway;

	if (!raw_array) {
		if ((error = cpuid_get_all_raw_data(&my_raw_array)) < 0)
			return cpuid_set_error(error);
		raw_array = &my_raw_array;
	}

	for (logical_cpu = 0; logical_cpu < raw_array->num_raw; logical_cpu++) {
		if (cpu_ident_purpose(&raw_array->raw[logical_cpu]) == purpose) {
			cpu_ident_internal(&raw_array->raw[logical_cpu], data, &throwaway);
			return cpuid_set_error(ERR_OK);
		}
	}

	return cpuid_set_error(ERR_NOT_FOUND);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movl %edi, %ebp
testq %rsi, %rsi
je 0xc2df6
movq %rsi, %r14
movq %rbx, 0x8(%rsp)
leaq 0x2(%rsi), %r13
addq $0x8, %r14
jmp 0xc2e13
leaq 0x10(%rsp), %rdi
callq 0xc0f23
testl %eax, %eax
js 0xc2e66
movq %rbx, 0x8(%rsp)
leaq 0x18(%rsp), %r14
leaq 0x12(%rsp), %r13
movq $-0x580, %r12           # imm = 0xFA80
pushq $-0x1
popq %rbx
pushq $-0x11
popq %r15
movzwl (%r13), %eax
incq %rbx
cmpq %rax, %rbx
jae 0xc2e69
movq (%r14), %rax
leaq (%rax,%r12), %rdi
addq $0x580, %rdi            # imm = 0x580
addq $0x580, %r12            # imm = 0x580
callq 0xc2c15
cmpl %ebp, %eax
jne 0xc2e21
addq (%r14), %r12
leaq 0x20(%rsp), %rdx
movq %r12, %rdi
movq 0x8(%rsp), %rsi
callq 0xc209c
xorl %r15d, %r15d
jmp 0xc2e69
movl %eax, %r15d
leaq 0x9e4c0(%rip), %rdi     # 0x161330
callq 0x57820
movl %r15d, 0x30(%rax)
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: affinity_mask_str_r
char* affinity_mask_str_r(cpu_affinity_mask_t* affinity_mask, char* buffer, uint32_t buffer_len)
{
	logical_cpu_t mask_index = __MASK_SETSIZE - 1;
	logical_cpu_t str_index = 0;
	bool do_print = false;

	while (((uint32_t) str_index) + 1 < buffer_len) {
		if (do_print || (mask_index < 4) || (affinity_mask->__bits[mask_index] != 0x00)) {
			snprintf(&buffer[str_index], 3, "%02X", affinity_mask->__bits[mask_index]);
			do_print = true;
			str_index += 2;
		}
		/* mask_index in unsigned, so we cannot decrement it beyond 0 */
		if (mask_index == 0)
			break;
		mask_index--;
	}
	buffer[str_index] = '\0';

	return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movw $0x1fff, %r13w          # imm = 0x1FFF
xorl %r15d, %r15d
xorl %eax, %eax
movzwl %ax, %r12d
leal 0x1(%r12), %ecx
cmpl %ebp, %ecx
jae 0xc2f56
cmpw $0x4, %r13w
setb %cl
movl %r15d, %edx
orb %cl, %dl
movzwl %r13w, %ecx
movb (%r14,%rcx), %cl
testb %cl, %cl
setne %r15b
orb %dl, %r15b
testb $0x1, %r15b
je 0xc2f51
movzbl %cl, %ecx
movq %r12, %rdi
addq %rbx, %rdi
pushq $0x3
popq %rsi
leaq 0x40bb6(%rip), %rdx     # 0x103af5
xorl %eax, %eax
callq 0x57990
leal 0x2(%r12), %eax
testw %r13w, %r13w
je 0xc2f56
decl %r13d
jmp 0xc2efb
movzwl %ax, %eax
movb $0x0, (%rbx,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpuid_get_vendor
cpu_vendor_t cpuid_get_vendor(void)
{
	static cpu_vendor_t vendor = VENDOR_UNKNOWN;
	uint32_t raw_vendor[4];
	char vendor_str[VENDOR_STR_MAX];

	if(vendor == VENDOR_UNKNOWN) {
		if (!cpuid_present())
			cpuid_set_error(ERR_NO_CPUID);
		else {
			cpu_exec_cpuid(0, raw_vendor);
			vendor = cpuid_vendor_identify(raw_vendor, vendor_str);
		}
	}
	return vendor;
}

// Assembly:
movl 0xa1464(%rip), %eax     # 0x164474
cmpl $-0x1, %eax
je 0xc3016
retq
pushq %rbx
subq $0x20, %rsp
callq 0xc5ef0
testl %eax, %eax
je 0xc3046
leaq 0x10(%rsp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0xc0d7d
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xc3065
movl %eax, 0xa1430(%rip)     # 0x164474
jmp 0xc305f
leaq 0x9e2e3(%rip), %rdi     # 0x161330
callq 0x57820
orl $-0x1, 0x30(%rax)
movl 0xa1415(%rip), %eax     # 0x164474
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpuid_vendor_identify
static cpu_vendor_t cpuid_vendor_identify(const uint32_t *raw_vendor, char *vendor_str)
{
	int i;
	cpu_vendor_t vendor = VENDOR_UNKNOWN;
	const struct { cpu_vendor_t vendor; char match[16]; }
	matchtable[NUM_CPU_VENDORS] = {
		/* source: http://www.sandpile.org/ia32/cpuid.htm */
		{ VENDOR_INTEL		, "GenuineIntel" },
		{ VENDOR_AMD		, "AuthenticAMD" },
		{ VENDOR_CYRIX		, "CyrixInstead" },
		{ VENDOR_NEXGEN		, "NexGenDriven" },
		{ VENDOR_TRANSMETA	, "GenuineTMx86" },
		{ VENDOR_UMC		, "UMC UMC UMC " },
		{ VENDOR_CENTAUR	, "CentaurHauls" },
		{ VENDOR_RISE		, "RiseRiseRise" },
		{ VENDOR_SIS		, "SiS SiS SiS " },
		{ VENDOR_NSC		, "Geode by NSC" },
		{ VENDOR_HYGON		, "HygonGenuine" },
	};

	memcpy(vendor_str + 0, &raw_vendor[1], 4);
	memcpy(vendor_str + 4, &raw_vendor[3], 4);
	memcpy(vendor_str + 8, &raw_vendor[2], 4);
	vendor_str[12] = 0;

	/* Determine vendor: */
	for (i = 0; i < NUM_CPU_VENDORS; i++)
		if (!strcmp(vendor_str, matchtable[i].match)) {
			vendor = matchtable[i].vendor;
			break;
		}
	return vendor;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x4(%rdi), %eax
movl %eax, (%rsi)
movl 0xc(%rdi), %eax
movl %eax, 0x4(%rsi)
movl 0x8(%rdi), %eax
movl %eax, 0x8(%rsi)
movb $0x0, 0xc(%rsi)
pushq $0xc
popq %r14
leaq 0x40925(%rip), %rsi     # 0x1039b4
pushq $-0x1
popq %rbp
decq %r14
je 0xc30ae
leaq 0x14(%rsi), %r15
movq %rbx, %rdi
callq 0x58e40
movq %r15, %rsi
testl %eax, %eax
jne 0xc3092
movl -0x18(%r15), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpuid_get_cpu_list
void cpuid_get_cpu_list(cpu_vendor_t vendor, struct cpu_list_t* list)
{
	switch (vendor) {
		case VENDOR_INTEL:
			cpuid_get_list_intel(list);
			break;
		case VENDOR_AMD:
		case VENDOR_HYGON:
			cpuid_get_list_amd(list);
			break;
		case VENDOR_CYRIX:
			make_list_from_string("Cx486,Cx5x86,6x86,6x86MX,M II,MediaGX,MediaGXi,MediaGXm", list);
			break;
		case VENDOR_NEXGEN:
			make_list_from_string("Nx586", list);
			break;
		case VENDOR_TRANSMETA:
			make_list_from_string("Crusoe,Efficeon", list);
			break;
		case VENDOR_UMC:
			make_list_from_string("UMC x86 CPU", list);
			break;
		case VENDOR_CENTAUR:
			cpuid_get_list_centaur(list);
			break;
		case VENDOR_RISE:
			make_list_from_string("Rise mP6", list);
			break;
		case VENDOR_SIS:
			make_list_from_string("SiS mP6", list);
			break;
		case VENDOR_NSC:
			make_list_from_string("Geode GXm,Geode GXLV,Geode GX1,Geode GX2", list);
			break;
		default:
			warnf("Unknown vendor passed to cpuid_get_cpu_list()\n");
			cpuid_set_error(ERR_INVRANGE);
			list->num_entries = 0;
			list->names = NULL;
			break;
 	}
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpl $0xa, %edi
ja 0xc3134
movl %edi, %eax
leaq 0x40653(%rip), %rcx     # 0x103720
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
popq %rbx
jmp 0xc4ae2
leaq 0x40e7c(%rip), %rdi     # 0x103f62
jmp 0xc312e
leaq 0x40e9e(%rip), %rdi     # 0x103f8d
jmp 0xc312e
movq %rbx, %rdi
popq %rbx
jmp 0xc5ed0
leaq 0x40e29(%rip), %rdi     # 0x103f2a
jmp 0xc312e
movq %rbx, %rdi
popq %rbx
jmp 0xc4d50
leaq 0x40e55(%rip), %rdi     # 0x103f68
jmp 0xc312e
leaq 0x40e5c(%rip), %rdi     # 0x103f78
jmp 0xc312e
leaq 0x40e70(%rip), %rdi     # 0x103f95
jmp 0xc312e
leaq 0x40e56(%rip), %rdi     # 0x103f84
movq %rbx, %rsi
popq %rbx
jmp 0xc3162
leaq 0x40e83(%rip), %rdi     # 0x103fbe
xorl %eax, %eax
callq 0xc340e
leaq 0x9e1e7(%rip), %rdi     # 0x161330
callq 0x57820
movl $0xfffffff0, 0x30(%rax) # imm = 0xFFFFFFF0
andl $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: make_list_from_string
static void make_list_from_string(const char* csv, struct cpu_list_t* list)
{
	int i, j, n, l, last;
	l = (int) strlen(csv);
	n = 0;
	for (i = 0; i < l; i++) if (csv[i] == ',') n++;
	n++;
	list->names = (char**) malloc(sizeof(char*) * n);
	if (!list->names) { /* Memory allocation failed */
		list->num_entries = 0;
		cpuid_set_error(ERR_NO_MEM);
		return;
	}
	list->num_entries = n;
	last = -1;
	n = 0;
	for (i = 0; i <= l; i++) if (i == l || csv[i] == ',') {
		list->names[n] = (char*) malloc(i - last);
		if (!list->names[n]) { /* Memory allocation failed */
			cpuid_set_error(ERR_NO_MEM);
			for (j = 0; j < n; j++) free(list->names[j]);
			free(list->names);
			list->num_entries = 0;
			list->names = NULL;
			return;
		}
		memcpy(list->names[n], &csv[last + 1], i - last - 1);
		list->names[n][i - last - 1] = '\0';
		n++;
		last = i;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x57460
movq %rax, %r15
xorl %eax, %eax
testl %r15d, %r15d
movl %r15d, %ecx
cmovlel %eax, %ecx
xorl %ebp, %ebp
cmpq %rax, %rcx
je 0xc31a1
xorl %edx, %edx
cmpb $0x2c, (%r14,%rax)
sete %dl
addl %edx, %ebp
incq %rax
jmp 0xc318b
movl %ebp, %eax
leaq 0x8(,%rax,8), %rdi
callq 0x59280
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xc3251
incl %ebp
movl %ebp, (%rbx)
leaq 0x1(%r14), %rax
movq %rax, (%rsp)
movslq %r15d, %rax
movq %rax, 0x10(%rsp)
movl %eax, %eax
movq %rax, 0x8(%rsp)
pushq $-0x1
popq %rbp
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq 0x10(%rsp), %r12
jg 0xc32b0
cmpq %r12, 0x8(%rsp)
je 0xc31fa
cmpb $0x2c, (%r14,%r12)
jne 0xc324c
movl %r12d, %eax
subl %ebp, %eax
movslq %eax, %rdi
callq 0x59280
movq 0x8(%rbx), %rcx
movslq %r13d, %r15
movq %rax, (%rcx,%r15,8)
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0xc326c
movslq %ebp, %rsi
addq (%rsp), %rsi
notl %ebp
addl %r12d, %ebp
movslq %ebp, %r13
movq %r13, %rdx
callq 0x562f0
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rax
movb $0x0, (%rax,%r13)
incl %r15d
movl %r15d, %r13d
movl %r12d, %ebp
incq %r12
jmp 0xc31e1
andl $0x0, (%rbx)
leaq 0x9e0d5(%rip), %rdi     # 0x161330
callq 0x57820
movl $0xfffffffd, 0x30(%rax) # imm = 0xFFFFFFFD
jmp 0xc32b0
leaq 0x9e0bd(%rip), %rdi     # 0x161330
callq 0x57820
movl $0xfffffffd, 0x30(%rax) # imm = 0xFFFFFFFD
xorl %r14d, %r14d
testl %r13d, %r13d
cmovlel %r14d, %r13d
movq 0x8(%rbx), %rdi
cmpq %r14, %r13
je 0xc32a3
movq (%rdi,%r14,8), %rdi
callq 0x567f0
incq %r14
jmp 0xc328c
callq 0x567f0
andl $0x0, (%rbx)
andq $0x0, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpuid_free_cpu_list
void cpuid_free_cpu_list(struct cpu_list_t* list)
{
	int i;
	if (list->num_entries <= 0) return;
	for (i = 0; i < list->num_entries; i++)
		free(list->names[i]);
	free(list->names);
}

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
jle 0xc33a3
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cltq
movq 0x8(%rbx), %rdi
cmpq %rax, %r14
jge 0xc3397
movq (%rdi,%r14,8), %rdi
callq 0x567f0
incq %r14
movl (%rbx), %eax
jmp 0xc337c
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x567f0
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: match_features
void match_features(const struct feature_map_t* matchtable, int count, uint32_t reg, struct cpu_id_t* data)
{
	int i;
	for (i = 0; i < count; i++)
		if (reg & (1u << matchtable[i].bit))
			data->flags[matchtable[i].feature] = 1;
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpq %rax, %rsi
je 0xc33fe
movl (%rdi,%rax,8), %r8d
btl %r8d, %edx
jae 0xc33f9
movl 0x4(%rdi,%rax,8), %r8d
movb $0x1, 0x58(%rcx,%r8)
incq %rax
jmp 0xc33df
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: warnf
void warnf(const char* format, ...)
{
	char buff[1024];
	va_list va;
	if (!_warn_fun) return;
	va_start(va, format);
	vsnprintf(buff, sizeof(buff), format, va);
	va_end(va);
	_warn_fun(buff);
}

// Assembly:
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xc346a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpq $0x0, 0xa1006(%rip)     # 0x164478
je 0xc34bd
movq %rdi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x4e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r10, %rdx
callq 0x58520
movq %rbx, %rdi
callq *0xa0fbb(%rip)          # 0x164478
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: debugf
void debugf(int verboselevel, const char* format, ...)
{
	char buff[1024];
	va_list va;
	if (verboselevel > _current_verboselevel) return;
	va_start(va, format);
	vsnprintf(buff, sizeof(buff), format, va);
	va_end(va);
	_warn_fun(buff);
}

// Assembly:
pushq %rbx
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xc351d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl %edi, 0xabca5(%rip)     # 0x16f1c8
jl 0xc356e
movq %rsi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x4e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %r10, %rdx
callq 0x58520
movq %rbx, %rdi
callq *0xa0f0a(%rip)          # 0x164478
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: generic_get_cpu_list
void generic_get_cpu_list(const struct match_entry_t* matchtable, int count,
                          struct cpu_list_t* list)
{
	int i, j, n, good;
	n = 0;
	list->names = (char**) malloc(sizeof(char*) * count);
	if (!list->names) { /* Memory allocation failure */
		cpuid_set_error(ERR_NO_MEM);
		list->num_entries = 0;
		return;
	}
	for (i = 0; i < count; i++) {
		if (strstr(matchtable[i].name, "Unknown")) continue;
		good = 1;
		for (j = n - 1; j >= 0; j--)
			if (!strcmp(list->names[j], matchtable[i].name)) {
				good = 0;
				break;
			}
		if (!good) continue;
#if defined(_MSC_VER)
		list->names[n] = _strdup(matchtable[i].name);
#else
		list->names[n] = strdup(matchtable[i].name);
#endif
		if (!list->names[n]) { /* Memory allocation failure */
			cpuid_set_error(ERR_NO_MEM);
			list->num_entries = 0;
			for (j = 0; j < n; j++) {
				free(list->names[j]);
			}
			free(list->names);
			list->names = NULL;
			return;
		}
		n++;
	}
	list->num_entries = n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movslq %esi, %rdi
shlq $0x3, %rdi
callq 0x59280
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xc39e0
movq %rax, %r12
movq %rbx, 0x8(%rsp)
xorl %r13d, %r13d
testl %r14d, %r14d
cmovlel %r13d, %r14d
leaq 0x40e9d(%rip), %rbx     # 0x1047e4
movq $0x0, (%rsp)
movq %r14, 0x10(%rsp)
cmpq %r14, %r13
je 0xc39d3
imulq $0x78, %r13, %rax
leaq (%r15,%rax), %rbp
addq $0x34, %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x577f0
testq %rax, %rax
jne 0xc39ce
movq %rbx, %r14
movq %r15, %rbx
movl (%rsp), %r15d
testl %r15d, %r15d
jle 0xc399a
movq -0x8(%r12,%r15,8), %rdi
decq %r15
movq %rbp, %rsi
callq 0x58e40
testl %eax, %eax
jne 0xc397f
jmp 0xc39c3
movq %rbp, %rdi
callq 0x560f0
movq (%rsp), %rbp
movslq %ebp, %rcx
movq %rax, (%r12,%rcx,8)
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r12
cmpq $0x0, (%r12,%rcx,8)
je 0xc39ed
incl %ebp
movq %rbp, (%rsp)
movq %rbx, %r15
movq %r14, %rbx
movq 0x10(%rsp), %r14
incq %r13
jmp 0xc3954
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movl %ecx, (%rax)
jmp 0xc3a28
pushq $-0x3
popq %rdi
callq 0xc0d40
andl $0x0, (%rbx)
jmp 0xc3a28
pushq $-0x3
popq %rdi
callq 0xc0d40
movq 0x8(%rsp), %r15
andl $0x0, (%r15)
xorl %r14d, %r14d
testl %ebp, %ebp
cmovlel %r14d, %ebp
movq 0x8(%r15), %rdi
cmpq %r14, %rbp
je 0xc3a1e
movq (%rdi,%r14,8), %rdi
callq 0x567f0
incq %r14
jmp 0xc3a07
callq 0x567f0
andq $0x0, 0x8(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: match_pattern
int match_pattern(const char* s, const char* p)
{
	int i, j, dj, k, n, m;
	n = (int) strlen(s);
	m = (int) strlen(p);
	for (i = 0; i < n; i++) {
		if (xmatch_entry(s[i], p) != -1) {
			j = 0;
			k = 0;
			while (j < m && ((dj = xmatch_entry(s[i + k], p + j)) != -1)) {
				k++;
				j += dj;
			}
			if (j == m) return i + 1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x57460
movq %rax, %r14
movq %rbx, %rdi
callq 0x57460
movq %rax, %r13
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
movq %r14, 0x10(%rsp)
movq %r15, 0x8(%rsp)
xorl %ebp, %ebp
cmpq 0x10(%rsp), %rbp
je 0xc3ac4
movq 0x8(%rsp), %rax
movsbl (%rax,%rbp), %edi
movq %rbx, %rsi
callq 0xc3adb
cmpl $-0x1, %eax
je 0xc3abc
xorl %r12d, %r12d
movq %r15, %r14
cmpl %r13d, %r12d
jge 0xc3ab7
movsbl (%r14), %edi
movslq %r12d, %rsi
addq %rbx, %rsi
callq 0xc3adb
cmpl $-0x1, %eax
je 0xc3ab7
addl %eax, %r12d
incq %r14
jmp 0xc3a96
cmpl %r13d, %r12d
je 0xc3ac8
incq %rbp
incq %r15
jmp 0xc3a73
xorl %eax, %eax
jmp 0xc3acc
incl %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: xmatch_entry
static int xmatch_entry(char c, const char* p)
{
	int i, j;
	if (c == 0) return -1;
	if (c == p[0]) return 1;
	if (p[0] == '.') return 1;
	if (p[0] == '#' && isdigit(c)) return 1;
	if (p[0] == '[') {
		j = 1;
		while (p[j] && p[j] != ']') j++;
		if (!p[j]) return -1;
		for (i = 1; i < j; i++)
			if (p[i] == c) return j + 1;
	}
	return -1;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
pushq $-0x1
popq %rcx
testb %bl, %bl
je 0xc3b4e
movzbl (%rsi), %edx
pushq $0x1
popq %rax
cmpb %bl, %dl
je 0xc3b50
cmpl $0x23, %edx
je 0xc3b13
cmpl $0x2e, %edx
je 0xc3b50
cmpl $0x5b, %edx
jne 0xc3b4e
xorl %eax, %eax
movzbl 0x1(%rsi,%rax), %edx
testl %edx, %edx
je 0xc3b4e
cmpl $0x5d, %edx
je 0xc3b32
incq %rax
jmp 0xc3b00
callq 0x565b0
movq (%rax), %rax
movsbq %bl, %rcx
movb 0x1(%rax,%rcx,2), %cl
andb $0x8, %cl
xorl %eax, %eax
cmpb $0x1, %cl
sbbl %eax, %eax
orl $0x1, %eax
jmp 0xc3b50
incq %rsi
movq %rax, %rdx
subq $0x1, %rdx
jb 0xc3b4e
leaq 0x1(%rsi), %rdi
cmpb %bl, (%rsi)
movq %rdi, %rsi
jne 0xc3b38
addl $0x2, %eax
jmp 0xc3b50
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: get_cached_cpuid
struct cpu_id_t* get_cached_cpuid(void)
{
	static int initialized = 0;
	static struct cpu_id_t id;
	if (initialized) return &id;
	if (cpu_identify(NULL, &id) != ERR_OK) {
		memset(&id, 0, sizeof(id));
		id.architecture = ARCHITECTURE_UNKNOWN;
		id.vendor       = VENDOR_UNKNOWN;
	}
	initialized = 1;
	return &id;
}

// Assembly:
cmpb $0x0, 0xab673(%rip)     # 0x16f1cc
jne 0xc3b9a
pushq %rax
leaq 0xab66d(%rip), %rsi     # 0x16f1d0
xorl %edi, %edi
callq 0xc24c0
testl %eax, %eax
je 0xc3b8f
leaq 0xab65b(%rip), %rdi     # 0x16f1d0
movl $0x21e0, %edx           # imm = 0x21E0
xorl %esi, %esi
callq 0x56ff0
orl $-0x1, 0xab648(%rip)    # 0x16f1d0
orl $-0x1, 0xab695(%rip)    # 0x16f224
movb $0x1, 0xab636(%rip)     # 0x16f1cc
addq $0x8, %rsp
leaq 0xab62f(%rip), %rax     # 0x16f1d0
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: debug_print_lbits
void debug_print_lbits(int debuglevel, uint64_t mask)
{
	int i, first = 0;
	for (i = 0; i < 64; i++) if (mask & (((uint64_t) 1) << i)) {
		if (first) first = 0;
		else debugf(debuglevel, " + ");
		debugf(debuglevel, "LBIT(%d)", i);
	}
	debugf(debuglevel, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
leaq 0x40c29(%rip), %r15     # 0x1047ec
leaq 0x40c26(%rip), %r12     # 0x1047f0
xorl %r13d, %r13d
cmpq $0x40, %r13
je 0xc3bf9
btq %r13, %r14
jae 0xc3bf4
movl %ebx, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0xc34c6
movl %ebx, %edi
movq %r12, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0xc34c6
incq %r13
jmp 0xc3bcd
leaq 0x3dd27(%rip), %rsi     # 0x101927
movl %ebx, %edi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xc34c6
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/libcpuid_util.c
// Function: decode_number_of_cores_x86
void decode_number_of_cores_x86(struct cpu_raw_data_t* raw, struct cpu_id_t* data)
{
	int logical_cpus = -1, num_cores = -1;

	if (raw->basic_cpuid[0][EAX] >= 1) {
		logical_cpus = (raw->basic_cpuid[1][EBX] >> 16) & 0xff;
		if (raw->basic_cpuid[0][EAX] >= 4) {
			num_cores = 1 + ((raw->basic_cpuid[4][EAX] >> 26) & 0x3f);
		}
	}
	if (data->flags[CPU_FEATURE_HT]) {
		if (num_cores > 1) {
			data->num_cores = num_cores;
			data->num_logical_cpus = logical_cpus;
		} else {
			data->num_cores = 1;
			data->num_logical_cpus = (logical_cpus >= 1 ? logical_cpus : 1);
			if (data->num_logical_cpus == 1)
				data->flags[CPU_FEATURE_HT] = 0;
		}
	} else {
		data->num_cores = data->num_logical_cpus = (logical_cpus >= 1 ? logical_cpus : 1);
	}
}

// Assembly:
movl (%rdi), %edx
pushq $-0x1
popq %rcx
testl %edx, %edx
je 0xc3d04
movzbl 0x16(%rdi), %eax
cmpl $0x4, %edx
jb 0xc3d06
movl 0x40(%rdi), %ecx
shrl $0x1a, %ecx
incl %ecx
jmp 0xc3d06
movl %ecx, %eax
cmpb $0x0, 0x72(%rsi)
je 0xc3d1e
cmpl $0x2, %ecx
jl 0xc3d34
movl %ecx, 0xec(%rsi)
movl %eax, 0xf0(%rsi)
retq
cmpl $0x2, %eax
pushq $0x1
popq %rcx
cmovgel %eax, %ecx
movl %ecx, 0xf0(%rsi)
movl %ecx, 0xec(%rsi)
retq
pushq $0x1
popq %rcx
movl %ecx, 0xec(%rsi)
cmpl $0x2, %eax
movl %ecx, %edx
cmovgel %eax, %edx
movl %edx, 0xf0(%rsi)
cmpl %ecx, %eax
jg 0xc3d33
movb $0x0, 0x72(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/rdtsc.c
// Function: cpu_clock_by_os
int cpu_clock_by_os(void)
{
	FILE *f;
	char line[1024], *s;
	int result;

	f = fopen("/proc/cpuinfo", "rt");
	if (!f) return -1;

	while (fgets(line, sizeof(line), f)) {
		if (!strncmp(line, "cpu MHz", 7)) {
			s = strchr(line, ':');
			if (s && 1 == sscanf(s, ":%d.", &result)) {
				fclose(f);
				return result;
			}
		}
	}
	fclose(f);
	return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
leaq 0x4097a(%rip), %rdi     # 0x104905
leaq 0x3e5b1(%rip), %rsi     # 0x102543
callq 0x5a1d0
movq %rax, %r14
pushq $-0x1
popq %rax
testq %r14, %r14
je 0xc4026
leaq 0x10(%rsp), %r15
leaq 0x40961(%rip), %r12     # 0x104913
pushq $0x7
popq %r13
pushq $0x3a
popq %rbp
leaq 0xc(%rsp), %rbx
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x580d0
testq %rax, %rax
je 0xc401b
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x58510
testl %eax, %eax
jne 0xc3fbe
movq %r15, %rdi
movl %ebp, %esi
callq 0x57b40
testq %rax, %rax
je 0xc3fbe
movq %rax, %rdi
leaq 0x4091d(%rip), %rsi     # 0x10491b
movq %rbx, %rdx
xorl %eax, %eax
callq 0x563b0
cmpl $0x1, %eax
jne 0xc3fbe
movq %r14, %rdi
callq 0x575b0
movl 0xc(%rsp), %eax
jmp 0xc4026
movq %r14, %rdi
callq 0x575b0
pushq $-0x1
popq %rax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/rdtsc.c
// Function: busy_loop_delay
int busy_loop_delay(int milliseconds)
{
	int cycles = 0, r = 0, first = 1;
	uint64_t a, b, c;
	sys_precise_clock(&a);
	while (1) {
		sys_precise_clock(&c);
		if ((c - a) / 1000 > milliseconds) return r;
		r += busy_loop(cycles);
		if (first) {
			first = 0;
		} else {
			if (c - b < 1000) cycles *= 2;
			if (c - b > 10000) cycles /= 2;
		}
		b = c;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xc3ed4
movq (%r14), %r15
movslq %ebx, %r12
xorl %ebx, %ebx
movq %rsp, %r14
movl $0x3e8, %r13d           # imm = 0x3E8
movq %r14, %rdi
callq 0xc3ed4
movq (%rsp), %rax
subq %r15, %rax
xorl %edx, %edx
divq %r13
cmpq %r12, %rax
ja 0xc4089
xorl %edi, %edi
callq 0xc4099
addl %eax, %ebx
jmp 0xc4065
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/rdtsc.c
// Function: busy_loop
static int busy_loop(int amount)
{
	int i, j, k, s = 0;
	static volatile int data[42] = {32, 12, -1, 5, 23, 0 };
	for (i = 0; i < amount; i++)
		for (j = 0; j < 65536; j++)
			for (k = 0; k < 42; k++)
				s += data[k];
	return s;
}

// Assembly:
xorl %ecx, %ecx
testl %edi, %edi
cmovlel %ecx, %edi
leaq 0xa03d9(%rip), %rdx     # 0x164480
xorl %eax, %eax
cmpl %edi, %ecx
je 0xc40d5
xorl %esi, %esi
cmpl $0x10000, %esi          # imm = 0x10000
je 0xc40d1
xorl %r8d, %r8d
cmpq $0xa8, %r8
je 0xc40cd
addl (%r8,%rdx), %eax
addq $0x4, %r8
jmp 0xc40ba
incl %esi
jmp 0xc40af
incl %ecx
jmp 0xc40a9
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/rdtsc.c
// Function: cpu_clock
int cpu_clock(void)
{
	int result;
	result = cpu_clock_by_os();
	if (result <= 0)
		result = cpu_clock_measure(200, 1);
	return result;
}

// Assembly:
pushq %rax
callq 0xc3f73
testl %eax, %eax
jle 0xc44c0
popq %rcx
retq
pushq $0x1
popq %rsi
movl $0xc8, %edi
popq %rax
jmp 0xc40d6
nop
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libcpuid/recog_intel.c
// Function: cpuid_get_epc
struct cpu_epc_t cpuid_get_epc(int index, const struct cpu_raw_data_t* raw)
{
	uint32_t regs[4];
	struct cpu_epc_t retval = {0, 0};
	if (raw && index < MAX_INTELFN12H_LEVEL - 2) {
		// this was queried already, use the data:
		memcpy(regs, raw->intel_fn12h[2 + index], sizeof(regs));
	} else {
		// query this ourselves:
		regs[0] = 0x12;
		regs[2] = 2 + index;
		regs[1] = regs[3] = 0;
		cpu_exec_cpuid_ext(regs);
	}

	// decode values:
	if ((regs[0] & 0xf) == 0x1) {
		retval.start_addr |= (regs[0] & 0xfffff000); // bits [12, 32) -> bits [12, 32)
		retval.start_addr |= ((uint64_t) (regs[1] & 0x000fffff)) << 32; // bits [0, 20) -> bits [32, 52)
		retval.length     |= (regs[2] & 0xfffff000); // bits [12, 32) -> bits [12, 32)
		retval.length     |= ((uint64_t) (regs[3] & 0x000fffff)) << 32; // bits [0, 20) -> bits [32, 52)
	}
	return retval;
}

// Assembly:
subq $0x18, %rsp
testq %rsi, %rsi
sete %al
cmpl $0x2, %edi
setge %cl
addl $0x2, %edi
orb %al, %cl
jne 0xc4d90
movslq %edi, %rax
shlq $0x4, %rax
movups 0x4c0(%rsi,%rax), %xmm0
movaps %xmm0, (%rsp)
jmp 0xc4da9
movq %rsp, %rax
movq $0x12, (%rax)
movl %edi, 0x8(%rax)
andl $0x0, 0xc(%rax)
movq %rax, %rdi
callq 0xc0d90
movl (%rsp), %ecx
movl %ecx, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0xc4de5
andl $0xfffff000, %ecx       # imm = 0xFFFFF000
movl $0xfffff, %edx          # imm = 0xFFFFF
movl 0x4(%rsp), %eax
andl %edx, %eax
shlq $0x20, %rax
orq %rcx, %rax
movl 0x8(%rsp), %ecx
andl $0xfffff000, %ecx       # imm = 0xFFFFF000
andl 0xc(%rsp), %edx
shlq $0x20, %rdx
orq %rcx, %rdx
jmp 0xc4de9
xorl %edx, %edx
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/buffer_dec.c
// Function: WebPFlipBuffer
VP8StatusCode WebPFlipBuffer(WebPDecBuffer* const buffer) {
  if (buffer == NULL) {
    return VP8_STATUS_INVALID_PARAM;
  }
  if (WebPIsRGBMode(buffer->colorspace)) {
    WebPRGBABuffer* const buf = &buffer->u.RGBA;
    buf->rgba += (int64_t)(buffer->height - 1) * buf->stride;
    buf->stride = -buf->stride;
  } else {
    WebPYUVABuffer* const buf = &buffer->u.YUVA;
    const int64_t H = buffer->height;
    buf->y += (H - 1) * buf->y_stride;
    buf->y_stride = -buf->y_stride;
    buf->u += ((H - 1) >> 1) * buf->u_stride;
    buf->u_stride = -buf->u_stride;
    buf->v += ((H - 1) >> 1) * buf->v_stride;
    buf->v_stride = -buf->v_stride;
    if (buf->a != NULL) {
      buf->a += (H - 1) * buf->a_stride;
      buf->a_stride = -buf->a_stride;
    }
  }
  return VP8_STATUS_OK;
}

// Assembly:
testq %rdi, %rdi
je 0xc62e3
cmpl $0xa, (%rdi)
movslq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
jbe 0xc62e7
decq %rcx
movslq 0x30(%rdi), %rdx
movq %rdx, %rsi
imulq %rcx, %rsi
addq %rsi, %rax
movq %rax, 0x10(%rdi)
negl %edx
movl %edx, 0x30(%rdi)
movq %rcx, %rax
sarq %rax
movslq 0x34(%rdi), %rdx
movq %rdx, %rsi
imulq %rax, %rsi
addq %rsi, 0x18(%rdi)
negl %edx
movl %edx, 0x34(%rdi)
movslq 0x38(%rdi), %rdx
imulq %rdx, %rax
addq %rax, 0x20(%rdi)
negl %edx
movl %edx, 0x38(%rdi)
movq 0x28(%rdi), %rdx
xorl %eax, %eax
testq %rdx, %rdx
je 0xc62e2
movslq 0x3c(%rdi), %rsi
imulq %rsi, %rcx
addq %rcx, %rdx
movq %rdx, 0x28(%rdi)
negl %esi
movl %esi, 0x3c(%rdi)
retq
pushq $0x2
popq %rax
retq
decq %rcx
movslq 0x18(%rdi), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rdi)
negl %edx
movl %edx, 0x18(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/buffer_dec.c
// Function: WebPFreeDecBuffer
void WebPFreeDecBuffer(WebPDecBuffer* buffer) {
  if (buffer != NULL) {
    if (buffer->is_external_memory <= 0) {
      WebPSafeFree(buffer->private_memory);
    }
    buffer->private_memory = NULL;
  }
}

// Assembly:
testq %rdi, %rdi
je 0xc658a
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
jg 0xc6584
movq 0x70(%rbx), %rdi
callq 0x58480
andq $0x0, 0x70(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/buffer_dec.c
// Function: WebPCopyDecBuffer
void WebPCopyDecBuffer(const WebPDecBuffer* const src,
                       WebPDecBuffer* const dst) {
  if (src != NULL && dst != NULL) {
    *dst = *src;
    if (src->private_memory != NULL) {
      dst->is_external_memory = 1;   // dst buffer doesn't own the memory.
      dst->private_memory = NULL;
    }
  }
}

// Assembly:
movq %rsi, %rax
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %sil
orb %cl, %sil
jne 0xc65c2
movq %rdi, %rdx
pushq $0xf
popq %rcx
movq %rax, %rdi
movq %rdx, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpq $0x0, 0x70(%rdx)
je 0xc65c2
movl $0x1, 0xc(%rax)
andq $0x0, 0x70(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/buffer_dec.c
// Function: WebPGrabDecBuffer
void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst) {
  if (src != NULL && dst != NULL) {
    *dst = *src;
    if (src->private_memory != NULL) {
      src->is_external_memory = 1;   // src relinquishes ownership
      src->private_memory = NULL;
    }
  }
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
orb %cl, %dl
jne 0xc65f5
movq %rdi, %rax
pushq $0xf
popq %rcx
movq %rsi, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
cmpq $0x0, 0x70(%rax)
je 0xc65f5
movl $0x1, 0xc(%rax)
andq $0x0, 0x70(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/buffer_dec.c
// Function: WebPAvoidSlowMemory
int WebPAvoidSlowMemory(const WebPDecBuffer* const output,
                        const WebPBitstreamFeatures* const features) {
  assert(output != NULL);
  return (output->is_external_memory >= 2) &&
         WebPIsPremultipliedMode(output->colorspace) &&
         (features != NULL && features->has_alpha);
}

// Assembly:
testq %rdi, %rdi
je 0xc6905
xorl %eax, %eax
cmpl $0x2, 0xc(%rdi)
jl 0xc6904
testq %rsi, %rsi
je 0xc6904
movl (%rdi), %ecx
addl $-0x7, %ecx
cmpl $0x3, %ecx
ja 0xc6904
xorl %eax, %eax
cmpl $0x0, 0x8(%rsi)
setne %al
retq
pushq %rax
leaq 0x51dc9(%rip), %rdi     # 0x1186d6
leaq 0x51d2a(%rip), %rsi     # 0x11863e
leaq 0x51dca(%rip), %rcx     # 0x1186e5
movl $0x130, %edx            # imm = 0x130
callq 0x56770
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: WebPParseHeaders
VP8StatusCode WebPParseHeaders(WebPHeaderStructure* const headers) {
  // status is marked volatile as a workaround for a clang-3.8 (aarch64) bug
  volatile VP8StatusCode status;
  int has_animation = 0;
  assert(headers != NULL);
  // fill out headers, ignore width/height/has_alpha.
  status = ParseHeadersInternal(headers->data, headers->data_size,
                                NULL, NULL, NULL, &has_animation,
                                NULL, headers);
  if (status == VP8_STATUS_OK || status == VP8_STATUS_NOT_ENOUGH_DATA) {
    // The WebPDemux API + libwebp can be used to decode individual
    // uncomposited frames or the WebPAnimDecoder can be used to fully
    // reconstruct them (see webp/demux.h).
    if (has_animation) {
      status = VP8_STATUS_UNSUPPORTED_FEATURE;
    }
  }
  return status;
}

// Assembly:
subq $0x18, %rsp
andl $0x0, 0x14(%rsp)
testq %rdi, %rdi
je 0xc6987
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
andq $0x0, (%rsp)
movq %rdi, 0x8(%rsp)
leaq 0x14(%rsp), %r9
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xc69a6
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0xc696f
movl 0x10(%rsp), %eax
cmpl $0x7, %eax
jne 0xc697e
cmpl $0x0, 0x14(%rsp)
je 0xc697e
movl $0x4, 0x10(%rsp)
movl 0x10(%rsp), %eax
addq $0x18, %rsp
retq
leaq 0x51dbc(%rip), %rdi     # 0x11874a
leaq 0x51dc5(%rip), %rsi     # 0x11875a
leaq 0x51dd1(%rip), %rcx     # 0x11876d
movl $0x1a5, %edx            # imm = 0x1A5
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: DecodeIntoRGBABuffer
WEBP_NODISCARD static uint8_t* DecodeIntoRGBABuffer(WEBP_CSP_MODE colorspace,
                                                    const uint8_t* const data,
                                                    size_t data_size,
                                                    uint8_t* const rgba,
                                                    int stride, size_t size) {
  WebPDecParams params;
  WebPDecBuffer buf;
  if (rgba == NULL || !WebPInitDecBuffer(&buf)) {
    return NULL;
  }
  WebPResetDecParams(&params);
  params.output = &buf;
  buf.colorspace    = colorspace;
  buf.u.RGBA.rgba   = rgba;
  buf.u.RGBA.stride = stride;
  buf.u.RGBA.size   = size;
  buf.is_external_memory = 1;
  if (DecodeInto(data, data_size, &params) != VP8_STATUS_OK) {
    return NULL;
  }
  return rgba;
}

// Assembly:
testq %rcx, %rcx
je 0xc6f96
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r15
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %r13d
movq %rsp, %rdi
callq 0xc70f1
testl %eax, %eax
je 0xc6f99
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rdx
movups %xmm0, 0x58(%rdx)
movups %xmm0, 0x48(%rdx)
movups %xmm0, 0x38(%rdx)
movups %xmm0, 0x28(%rdx)
andq $0x0, 0x68(%rdx)
movups %xmm0, 0x18(%rdx)
movups %xmm0, 0x8(%rdx)
movq %rsp, %rax
movq %rax, (%rdx)
movl %r13d, (%rsp)
movq %rbx, 0x10(%rsp)
movl %ebp, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movl $0x1, 0xc(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0xc70fb
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmoveq %rbx, %rax
jmp 0xc6f9b
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: WebPDecodeYUVInto
uint8_t* WebPDecodeYUVInto(const uint8_t* data, size_t data_size,
                           uint8_t* luma, size_t luma_size, int luma_stride,
                           uint8_t* u, size_t u_size, int u_stride,
                           uint8_t* v, size_t v_size, int v_stride) {
  WebPDecParams params;
  WebPDecBuffer output;
  if (luma == NULL || !WebPInitDecBuffer(&output)) return NULL;
  WebPResetDecParams(&params);
  params.output = &output;
  output.colorspace      = MODE_YUV;
  output.u.YUVA.y        = luma;
  output.u.YUVA.y_stride = luma_stride;
  output.u.YUVA.y_size   = luma_size;
  output.u.YUVA.u        = u;
  output.u.YUVA.u_stride = u_stride;
  output.u.YUVA.u_size   = u_size;
  output.u.YUVA.v        = v;
  output.u.YUVA.v_stride = v_stride;
  output.u.YUVA.v_size   = v_size;
  output.is_external_memory = 1;
  if (DecodeInto(data, data_size, &params) != VP8_STATUS_OK) {
    return NULL;
  }
  return luma;
}

// Assembly:
testq %rdx, %rdx
je 0xc70da
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r12
movl %r8d, %ebp
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %rdi
callq 0xc70f1
testl %eax, %eax
je 0xc70dd
movl 0x140(%rsp), %eax
movq 0x138(%rsp), %rcx
movq 0x130(%rsp), %rsi
movl 0x128(%rsp), %edi
movq 0x120(%rsp), %r8
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rdx
movups %xmm0, 0x58(%rdx)
movups %xmm0, 0x48(%rdx)
movups %xmm0, 0x38(%rdx)
movups %xmm0, 0x28(%rdx)
movups %xmm0, 0x18(%rdx)
movups %xmm0, 0x8(%rdx)
andq $0x0, 0x68(%rdx)
movq %rsp, %r9
movq %r9, (%rdx)
movl $0xb, (%rsp)
movq %rbx, 0x10(%rsp)
movl %ebp, 0x30(%rsp)
movq %r13, 0x40(%rsp)
movq %r12, 0x18(%rsp)
movl %edi, 0x34(%rsp)
movq %r8, 0x48(%rsp)
movq %rsi, 0x20(%rsp)
movl %eax, 0x38(%rsp)
movq %rcx, 0x50(%rsp)
movl $0x1, 0xc(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xc70fb
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmoveq %rbx, %rax
jmp 0xc70df
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: Decode
WEBP_NODISCARD static uint8_t* Decode(WEBP_CSP_MODE mode,
                                      const uint8_t* const data,
                                      size_t data_size, int* const width,
                                      int* const height,
                                      WebPDecBuffer* const keep_info) {
  WebPDecParams params;
  WebPDecBuffer output;

  if (!WebPInitDecBuffer(&output)) {
    return NULL;
  }
  WebPResetDecParams(&params);
  params.output = &output;
  output.colorspace = mode;

  // Retrieve (and report back) the required dimensions from bitstream.
  if (!WebPGetInfo(data, data_size, &output.width, &output.height)) {
    return NULL;
  }
  if (width != NULL) *width = output.width;
  if (height != NULL) *height = output.height;

  // Decode
  if (DecodeInto(data, data_size, &params) != VP8_STATUS_OK) {
    return NULL;
  }
  if (keep_info != NULL) {    // keep track of the side-info
    WebPCopyDecBuffer(&output, keep_info);
  }
  // return decoded samples (don't clear 'output'!)
  return WebPIsRGBMode(mode) ? output.u.RGBA.rgba : output.u.YUVA.y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0xc70f1
testl %eax, %eax
je 0xc73a8
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rsp)
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
andq $0x0, 0x78(%rsp)
movq %rbx, 0x10(%rsp)
leaq 0x84(%rsp), %rdx
movl %ebp, -0x4(%rdx)
leaq 0x88(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x589a0
testl %eax, %eax
je 0xc73a8
testq %r13, %r13
je 0xc7384
movl 0x84(%rsp), %eax
movl %eax, (%r13)
testq %r12, %r12
je 0xc7394
movl 0x88(%rsp), %eax
movl %eax, (%r12)
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xc70fb
testl %eax, %eax
je 0xc73bc
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0xc73d3
leaq 0x80(%rsp), %rdi
callq 0xc658b
movq 0x90(%rsp), %rax
jmp 0xc73aa
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: WebPDecodeYUV
uint8_t* WebPDecodeYUV(const uint8_t* data, size_t data_size,
                       int* width, int* height, uint8_t** u, uint8_t** v,
                       int* stride, int* uv_stride) {
  // data, width and height are checked by Decode().
  if (u == NULL || v == NULL || stride == NULL || uv_stride == NULL) {
    return NULL;
  }

  {
    WebPDecBuffer output;   // only to preserve the side-infos
    uint8_t* const out = Decode(MODE_YUV, data, data_size,
                                width, height, &output);

    if (out != NULL) {
      const WebPYUVABuffer* const buf = &output.u.YUVA;
      *u = buf->u;
      *v = buf->v;
      *stride = buf->y_stride;
      *uv_stride = buf->u_stride;
      assert(buf->u_stride == buf->v_stride);
    }
    return out;
  }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %r8, %r14
movq %r9, %xmm0
movq %r8, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm1
pcmpeqd 0x90(%rsp), %xmm0
movdqa %xmm1, %xmm2
shufps $0xdd, %xmm0, %xmm2     # xmm2 = xmm2[1,3],xmm0[1,3]
shufps $0x88, %xmm0, %xmm1     # xmm1 = xmm1[0,2],xmm0[0,2]
andps %xmm2, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
je 0xc747c
xorl %eax, %eax
jmp 0xc74cd
movq %r9, %rbx
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rsi
pushq $0xb
popq %rdi
movq %rsp, %r9
callq 0xc72ea
testq %rax, %rax
je 0xc74cd
movq 0x98(%rsp), %rcx
movq 0x90(%rsp), %rdx
movq 0x18(%rsp), %rsi
movq %rsi, (%r14)
movq 0x20(%rsp), %rsi
movq %rsi, (%rbx)
movl 0x30(%rsp), %esi
movl %esi, (%rdx)
movl 0x34(%rsp), %edx
movl %edx, (%rcx)
cmpl 0x38(%rsp), %edx
jne 0xc74d5
addq $0x78, %rsp
popq %rbx
popq %r14
retq
leaq 0x512cc(%rip), %rdi     # 0x1187a8
leaq 0x51277(%rip), %rsi     # 0x11875a
leaq 0x512dd(%rip), %rcx     # 0x1187c7
movl $0x2ad, %edx            # imm = 0x2AD
callq 0x56770
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: WebPGetInfo
int WebPGetInfo(const uint8_t* data, size_t data_size,
                int* width, int* height) {
  WebPBitstreamFeatures features;

  if (GetFeatures(data, data_size, &features) != VP8_STATUS_OK) {
    return 0;
  }

  if (width != NULL) {
    *width  = features.width;
  }
  if (height != NULL) {
    *height = features.height;
  }

  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsp, %rdx
callq 0xc7532
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xc752a
testq %r14, %r14
je 0xc751c
movl (%rsp), %eax
movl %eax, (%r14)
pushq $0x1
popq %rax
testq %rbx, %rbx
je 0xc752a
movl 0x4(%rsp), %ecx
movl %ecx, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: GetFeatures
static VP8StatusCode GetFeatures(const uint8_t* const data, size_t data_size,
                                 WebPBitstreamFeatures* const features) {
  if (features == NULL || data == NULL) {
    return VP8_STATUS_INVALID_PARAM;
  }
  DefaultFeatures(features);

  // Only parse enough of the data to retrieve the features.
  return ParseHeadersInternal(data, data_size,
                              &features->width, &features->height,
                              &features->has_alpha, &features->has_animation,
                              &features->format, NULL);
}

// Assembly:
testq %rdx, %rdx
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
je 0xc7546
pushq $0x2
popq %rax
retq
pushq %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
andq $0x0, 0x20(%rdx)
leaq 0x10(%rdx), %rax
leaq 0x4(%rdx), %rcx
leaq 0x8(%rdx), %r8
leaq 0xc(%rdx), %r9
pushq $0x0
pushq %rax
callq 0xc69a6
popq %rcx
popq %rdx
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/webp_dec.c
// Function: WebPInitDecoderConfigInternal
int WebPInitDecoderConfigInternal(WebPDecoderConfig* config,
                                  int version) {
  if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
    return 0;   // version mismatch
  }
  if (config == NULL) {
    return 0;
  }
  memset(config, 0, sizeof(*config));
  DefaultFeatures(&config->input);
  if (!WebPInitDecBuffer(&config->output)) {
    return 0;
  }
  return 1;
}

// Assembly:
andl $0xffffff00, %esi       # imm = 0xFFFFFF00
cmpl $0x200, %esi            # imm = 0x200
setne %cl
testq %rdi, %rdi
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0xc75b0
pushq %rbx
leaq 0x28(%rdi), %rbx
movl $0xf0, %edx
xorl %esi, %esi
callq 0x56ff0
movq %rbx, %rdi
callq 0xc70f1
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
popq %rbx
retq