// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libcpuid/cpuid_main.c
// Function: cpu_identify_all
int cpu_identify_all(struct cpu_raw_data_array_t* raw_array, struct system_id_t* system)
{
	int cur_error = cpuid_set_error(ERR_OK);
	int ret_error = cpuid_set_error(ERR_OK);
	double smt_divisor;
	bool is_new_cpu_type;
	bool is_last_item;
	bool is_smt_supported;
	bool is_apic_supported = true;
	uint8_t cpu_type_index = 0;
	int32_t num_logical_cpus = 0;
	int32_t cur_package_id = 0;
	int32_t prev_package_id = 0;
	logical_cpu_t logical_cpu = 0;
	cpu_purpose_t purpose;
	cpu_affinity_mask_t affinity_mask;
	struct cpu_raw_data_array_t my_raw_array;
	struct internal_id_info_t id_info;
	struct internal_apic_info_t apic_info;
	struct internal_core_instances_t cores_type;
	struct internal_cache_instances_t caches_type, caches_all;

	if (system == NULL)
		return cpuid_set_error(ERR_HANDLE);
	if (!raw_array) {
		if ((ret_error = cpuid_get_all_raw_data(&my_raw_array)) < 0)
			return cpuid_set_error(ret_error);
		raw_array = &my_raw_array;
	}
	system_id_t_constructor(system);
	core_instances_t_constructor(&cores_type);
	cache_instances_t_constructor(&caches_type);
	cache_instances_t_constructor(&caches_all);
	if (raw_array->with_affinity)
		init_affinity_mask(&affinity_mask);

	/* Iterate over all raw */
	for (logical_cpu = 0; logical_cpu < raw_array->num_raw; logical_cpu++) {
		is_new_cpu_type = false;
		is_last_item    = (logical_cpu + 1 >= raw_array->num_raw);
		debugf(2, "Identifying logical core %u\n", logical_cpu);
		/* Get CPU purpose and APIC ID
		   For hybrid CPUs, the purpose may be different than the previous iteration (e.g. from P-cores to E-cores)
		   APIC ID are unique for each logical CPU cores.
		*/
		purpose = cpu_ident_purpose(&raw_array->raw[logical_cpu]);
		if (raw_array->with_affinity && is_apic_supported) {
			is_apic_supported = cpu_ident_apic_id(logical_cpu, &raw_array->raw[logical_cpu], &apic_info);
			if (is_apic_supported)
				cur_package_id = apic_info.package_id;
		}

		/* Put data to system->cpu_types on the first iteration or when purpose is different than previous core */
		if ((system->num_cpu_types == 0) || (purpose != system->cpu_types[system->num_cpu_types - 1].purpose) || (cur_package_id != prev_package_id)) {
			is_new_cpu_type = true;
			cpu_type_index  = system->num_cpu_types;
			cpuid_grow_system_id(system, system->num_cpu_types + 1);
			cur_error = cpu_ident_internal(&raw_array->raw[logical_cpu], &system->cpu_types[cpu_type_index], &id_info);
			if (ret_error == ERR_OK)
				ret_error = cur_error;
		}
		/* Increment counters only for current purpose */
		if (raw_array->with_affinity && ((logical_cpu == 0) || !is_new_cpu_type)) {
			set_affinity_mask_bit(logical_cpu, &affinity_mask);
			num_logical_cpus++;
			if (is_apic_supported) {
				update_core_instances(&cores_type, &apic_info);
				update_cache_instances(&caches_type, &apic_info, &id_info, true);
				update_cache_instances(&caches_all,  &apic_info, &id_info, false);
			}
		}

		/* Update logical CPU counters, physical CPU counters and cache instance in system->cpu_types
		   Note: we need to differenciate two events:
		     - is_new_cpu_type (e.g. purpose was 'efficiency' during previous loop, and now purpose is 'performance')
		     - is_last_item (i.e. this is the last iteration in raw_array->num_raw)
		   In some cases, both events can occur during the same iteration, thus we have to update counters twice for the same logical_cpu.
		   This occurs with single-core CPU type. For instance, Pentacore Lakefield CPU consists of:
		     - 1 "big" Sunny Cove core
		     - 4 "little" Tremont cores
		   On the last iteration, there is no need to reset values for the next purpose.
		*/
		if (raw_array->with_affinity && (is_last_item || (is_new_cpu_type && (system->num_cpu_types > 1)))) {
			enum event_t {
				EVENT_NEW_CPU_TYPE = 0,
				EVENT_LAST_ITEM    = 1
			};
			const enum event_t first_event = is_new_cpu_type && (system->num_cpu_types > 1) ? EVENT_NEW_CPU_TYPE : EVENT_LAST_ITEM;
			const enum event_t last_event  = is_last_item                                   ? EVENT_LAST_ITEM    : EVENT_NEW_CPU_TYPE;
			enum event_t event;
			for (event = first_event; event <= last_event; event++) {
				switch (event) {
					case EVENT_NEW_CPU_TYPE: cpu_type_index = system->num_cpu_types - 2; break;
					case EVENT_LAST_ITEM:    cpu_type_index = system->num_cpu_types - 1; break;
					default: warnf("Warning: event %i in cpu_identify_all() not handled.\n", event); return cpuid_set_error(ERR_NOT_IMP);
				}
				copy_affinity_mask(&system->cpu_types[cpu_type_index].affinity_mask, &affinity_mask);
				if (event != EVENT_LAST_ITEM) {
					init_affinity_mask(&affinity_mask);
					set_affinity_mask_bit(logical_cpu, &affinity_mask);
				}
				if (is_apic_supported) {
					system->cpu_types[cpu_type_index].num_cores                = cores_type.instances;
					system->cpu_types[cpu_type_index].l1_instruction_instances = caches_type.instances[L1I];
					system->cpu_types[cpu_type_index].l1_data_instances        = caches_type.instances[L1D];
					system->cpu_types[cpu_type_index].l2_instances             = caches_type.instances[L2];
					system->cpu_types[cpu_type_index].l3_instances             = caches_type.instances[L3];
					system->cpu_types[cpu_type_index].l4_instances             = caches_type.instances[L4];
					if (event != EVENT_LAST_ITEM) {
						core_instances_t_constructor(&cores_type);
						cache_instances_t_constructor(&caches_type);
						update_core_instances(&cores_type, &apic_info);
						update_cache_instances(&caches_type, &apic_info, &id_info, true);
						update_cache_instances(&caches_all,  &apic_info, &id_info, false);
					}
				}
				else {
					/* Note: if SMT is disabled by BIOS, smt_divisor will no reflect the current state properly */
					is_smt_supported = system->cpu_types[cpu_type_index].num_cores > 0 ? (system->cpu_types[cpu_type_index].num_logical_cpus % system->cpu_types[cpu_type_index].num_cores) == 0 : false;
					smt_divisor      = is_smt_supported ? system->cpu_types[cpu_type_index].num_logical_cpus / system->cpu_types[cpu_type_index].num_cores : 1.0;
					system->cpu_types[cpu_type_index].num_cores = (int32_t) (num_logical_cpus / smt_divisor);
				}
				/* Save current values in system->cpu_types[cpu_type_index] and reset values for the next purpose */
				system->cpu_types[cpu_type_index].num_logical_cpus = num_logical_cpus;
				num_logical_cpus = 1;
			}
		}
		prev_package_id = cur_package_id;
	}

	/* Update the grand total of cache instances */
	if (is_apic_supported) {
		system->l1_instruction_total_instances = caches_all.instances[L1I];
		system->l1_data_total_instances        = caches_all.instances[L1D];
		system->l2_total_instances             = caches_all.instances[L2];
		system->l3_total_instances             = caches_all.instances[L3];
		system->l4_total_instances             = caches_all.instances[L4];
	}

	/* Update the total_logical_cpus value for each purpose */
	for (cpu_type_index = 0; cpu_type_index < system->num_cpu_types; cpu_type_index++)
		system->cpu_types[cpu_type_index].total_logical_cpus = logical_cpu;

	return ret_error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78e8, %rsp           # imm = 0x78E8
movq %rsi, %r14
movq %rdi, %r13
leaq 0xa2914(%rip), %rdi     # 0x16b330
callq 0x566e0
leaq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
movl $0x0, (%rax)
testq %r14, %r14
je 0xc91a2
xorl %ebx, %ebx
movl $0x0, %ebp
testq %r13, %r13
jne 0xc8a62
leaq 0xc0(%rsp), %r13
movq %r13, %rdi
callq 0xc746b
movl %eax, %ebp
testl %eax, %eax
js 0xc91a7
movb %bl, (%r14)
movq $0x0, 0x8(%r14)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x10(%r14)
movl $0xffffffff, 0x20(%r14) # imm = 0xFFFFFFFF
leaq 0xd8(%rsp), %rdi
movb %bl, -0x4(%rdi)
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x55f20
leaq 0x8e0(%rsp), %rdi
movl %ebx, -0x8(%rdi)
movb %bl, -0x4(%rdi)
movl $0x2800, %edx           # imm = 0x2800
xorl %esi, %esi
callq 0x55f20
leaq 0x50e8(%rsp), %rdi
movl %ebx, -0x8(%rdi)
movb %bl, -0x4(%rdi)
movl $0x2800, %edx           # imm = 0x2800
xorl %esi, %esi
callq 0x55f20
cmpb $0x1, (%r13)
jne 0xc8ade
leaq 0x30e0(%rsp), %rdi
callq 0xca3b8
movzwl 0x2(%r13), %eax
testw %ax, %ax
je 0xc91b3
movq %rax, 0x40(%rsp)
movl %ebp, 0x24(%rsp)
movb $0x1, %al
movl %eax, 0x4(%rsp)
movl $0x4a0, %ebp            # imm = 0x4A0
movl $0x494, %eax            # imm = 0x494
xorl %r15d, %r15d
xorl %edx, %edx
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %r13, 0x18(%rsp)
movq %rax, 0x48(%rsp)
movl $0x2, %edi
leaq 0x4b0fc(%rip), %rsi     # 0x113c21
movl %edx, 0xc(%rsp)
xorl %eax, %eax
callq 0xc9c3a
imulq $0x580, %r15, %rcx      # imm = 0x580
movq 0x8(%r13), %rdi
movq %rcx, 0x28(%rsp)
addq %rcx, %rdi
callq 0xc9305
cmpb $0x1, (%r13)
movq %r15, 0x10(%rsp)
jne 0xc8d3b
movl %ebx, %r9d
testb $0x1, 0x4(%rsp)
je 0xc8d3e
movl %eax, 0x8(%rsp)
movq 0x8(%r13), %r13
movq %r15, %rcx
movq 0x28(%rsp), %rax
leaq (%rax,%r13), %r15
leaq 0x60(%rsp), %rax
pxor %xmm0, %xmm0
movdqu %xmm0, (%rax)
movq $0x0, 0x10(%rax)
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x50(%rsp)
movw %cx, 0x74(%rsp)
movq %r15, %rdi
leaq 0xb0(%rsp), %rsi
callq 0xc978e
cmpl $0x2, %eax
jae 0xc8cc0
cmpl $0xb, (%r15)
jb 0xc8cd0
cmpw $0x0, 0xb4(%r15)
je 0xc8cd0
movl 0x480(%r15), %eax
testl %eax, %eax
je 0xc8cf9
movl 0x484(%r15), %edx
testl %edx, %edx
je 0xc8d0b
movl 0x490(%r15), %r8d
movl %eax, %ecx
testl %r8d, %r8d
movq 0x10(%rsp), %r15
je 0xc8c2c
movq %r13, %rsi
addq %rbp, %rsi
xorl %edi, %edi
movl %eax, %ecx
cmpq $0x2, %rdi
ja 0xc8c2c
cmpl $0x0, -0xc(%rsi)
je 0xc8c2c
movl %r8d, %r9d
movl (%rsi), %r8d
addq $0x10, %rsi
incq %rdi
movl %r9d, %ecx
testl %r8d, %r8d
jne 0xc8c0b
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
shll %cl, %r9d
testl %edx, %edx
je 0xc8d1d
addq 0x48(%rsp), %r13
xorl %edx, %edx
movzbl -0xb(%r13), %edi
movl -0x8(%r13), %esi
cmpl $0x2, %edi
je 0xc8c6f
cmpl $0x1, %edi
jne 0xc8c83
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r8d
notl %r8d
leaq 0x5c(%rsp), %rax
movl %r8d, %ecx
jmp 0xc8c7d
movl %r9d, %r8d
xorl %ecx, %r8d
notl %r8d
leaq 0x58(%rsp), %rax
andl %esi, %r8d
movl %r8d, (%rax)
movl -0x4(%r13), %eax
testl %eax, %eax
je 0xc8c9f
cmpq $0x2, %rdx
ja 0xc8c9f
incq %rdx
cmpl $0x0, (%r13)
leaq 0x10(%r13), %r13
jne 0xc8c44
andl %esi, %r9d
testb %dil, %dil
setne %al
movl %eax, 0x4(%rsp)
movl %esi, 0x50(%rsp)
movl %r9d, 0x54(%rsp)
cmovel %ebx, %r9d
movq 0x18(%rsp), %r13
jmp 0xc8cf3
cmpl $-0x1, %eax
jne 0xc8cd0
movq 0x30(%rsp), %rax
movl $0xfffffff9, (%rax)     # imm = 0xFFFFFFF9
movl $0x0, 0x4(%rsp)
leaq 0x4ba01(%rip), %rdi     # 0x1146e0
xorl %eax, %eax
callq 0xc9b82
movl %ebx, %r9d
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %r15
movl 0x8(%rsp), %eax
jmp 0xc8d3e
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x4(%rsp)
jmp 0xc8ce6
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %r15
jmp 0xc8d22
movq 0x18(%rsp), %r13
movl 0x8(%rsp), %eax
movl $0xffffffff, 0x50(%rsp) # imm = 0xFFFFFFFF
movl %r9d, 0x54(%rsp)
movl $0x0, 0x4(%rsp)
movl %ebx, %r9d
movl %r9d, 0x8(%rsp)
movq %rbp, 0x80(%rsp)
movzbl (%r14), %ebp
testq %rbp, %rbp
je 0xc8d78
movq 0x8(%r14), %rdx
leal -0x1(%rbp), %ecx
imulq $0x21e0, %rcx, %rcx     # imm = 0x21E0
cmpl 0x21d8(%rdx,%rcx), %eax
jne 0xc8d82
cmpl %ebx, 0x8(%rsp)
jne 0xc8d82
xorl %ebx, %ebx
jmp 0xc8eb1
movl $0x1, %ecx
movb $0x1, %r15b
jmp 0xc8d92
movl %ebp, %r15d
incb %r15b
je 0xc8e7c
movzbl %r15b, %ecx
movl $0x3, %edi
leaq 0x4b9c3(%rip), %rsi     # 0x114761
movl %ebp, %edx
xorl %eax, %eax
callq 0xc9c3a
movq 0x8(%r14), %rdi
movzbl %r15b, %ebx
imulq $0x21e0, %rbx, %rsi     # imm = 0x21E0
callq 0x553d0
testq %rax, %rax
je 0xc8e71
movq %rax, 0x38(%rsp)
movzbl (%r14), %eax
cmpb %r15b, %al
jae 0xc8e5e
subq %rax, %rbx
imulq $0x21e0, %rax, %r13     # imm = 0x21E0
addq 0x38(%rsp), %r13
movl $0x21e0, %edx           # imm = 0x21E0
movq %r13, %rdi
xorl %esi, %esi
callq 0x55f20
movl $0xffffffff, 0x190(%r13) # imm = 0xFFFFFFFF
leaq 0x1d8(%r13), %rdi
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0xf8(%r13)
movdqu %xmm0, 0x108(%r13)
movdqu %xmm0, 0x118(%r13)
movdqu %xmm0, 0x128(%r13)
movdqu %xmm0, 0x138(%r13)
movq $-0x1, 0x148(%r13)
callq 0xca3b8
movl $0x0, 0x21d8(%r13)
addq $0x21e0, %r13           # imm = 0x21E0
decq %rbx
jne 0xc8de5
movb %r15b, (%r14)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%r14)
movq 0x18(%rsp), %r13
jmp 0xc8e7c
movq 0x30(%rsp), %rax
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
movq 0x28(%rsp), %rdi
addq 0x8(%r13), %rdi
imulq $0x21e0, %rbp, %rsi     # imm = 0x21E0
addq 0x8(%r14), %rsi
leaq 0x88(%rsp), %rdx
callq 0xc85c8
movl 0x24(%rsp), %ecx
testl %ecx, %ecx
cmovel %eax, %ecx
movl %ecx, 0x24(%rsp)
movb $0x1, %bl
movq 0x10(%rsp), %r15
movl 0xc(%rsp), %ecx
testq %r15, %r15
setne %al
testb %bl, %al
jne 0xc8f35
cmpb $0x0, (%r13)
je 0xc8f35
movzwl %r15w, %edi
leaq 0x30e0(%rsp), %rsi
callq 0xca3ce
incl %r12d
testb $0x1, 0x4(%rsp)
je 0xc8f31
movl 0x58(%rsp), %esi
leaq 0xd4(%rsp), %rdi
callq 0xc9397
leaq 0x8d8(%rsp), %rdi
leaq 0x50(%rsp), %rbp
movq %rbp, %rsi
leaq 0x88(%rsp), %r15
movq %r15, %rdx
movl $0x1, %ecx
callq 0xc93e5
leaq 0x50e0(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq 0x10(%rsp), %r15
xorl %ecx, %ecx
callq 0xc93e5
movl 0xc(%rsp), %ecx
cmpb $0x1, (%r13)
jne 0xc9156
incl %ecx
movzwl 0x40(%rsp), %eax
cmpl %eax, %ecx
movl 0x4(%rsp), %r13d
jae 0xc8f7b
testb %bl, %bl
je 0xc9156
cmpb $0x1, (%r14)
leaq 0x30e0(%rsp), %rbx
jbe 0xc9156
xorl %ebp, %ebp
movl $0x1, 0xc(%rsp)
movq 0x10(%rsp), %r15
jmp 0xc8f9e
movl $0x1, %ebp
movl $0x2, 0xc(%rsp)
testb %bl, %bl
je 0xc8f96
xorl %ebp, %ebp
cmpb $0x2, (%r14)
setb %bpl
leaq 0x30e0(%rsp), %rbx
movzwl %r15w, %eax
movl %eax, 0x28(%rsp)
testl %ebp, %ebp
sete %al
notb %al
addb (%r14), %al
movq 0x8(%r14), %rcx
movzbl %al, %eax
imulq $0x21e0, %rax, %r15     # imm = 0x21E0
leaq (%rcx,%r15), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
movq %rbx, %rsi
callq 0xca3c4
cmpl $0x1, %ebp
je 0xc8fea
movq %rbx, %rdi
callq 0xca3b8
movl 0x28(%rsp), %edi
movq %rbx, %rsi
callq 0xca3ce
testb $0x1, %r13b
je 0xc90ec
movzbl 0xd4(%rsp), %eax
movq 0x8(%r14), %rcx
movl %eax, 0xec(%rcx,%r15)
movd 0x8d8(%rsp), %xmm0
pxor %xmm1, %xmm1
punpcklbw %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movdqu %xmm0, 0x13c(%rcx,%r15)
movzbl 0x8dc(%rsp), %eax
movl %eax, 0x14c(%rcx,%r15)
cmpl $0x1, %ebp
je 0xc913c
xorl %ebx, %ebx
movb %bl, 0xd4(%rsp)
movl $0x800, %edx            # imm = 0x800
leaq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x55f20
movb %bl, 0x8dc(%rsp)
movl $0x0, 0x8d8(%rsp)
movl $0x2800, %edx           # imm = 0x2800
leaq 0x8e0(%rsp), %rdi
xorl %esi, %esi
callq 0x55f20
movl 0x58(%rsp), %esi
leaq 0xd4(%rsp), %rdi
callq 0xc9397
leaq 0x8d8(%rsp), %rdi
movq %r14, %r13
leaq 0x50(%rsp), %r14
movq %r14, %rsi
leaq 0x88(%rsp), %rbx
movq %rbx, %rdx
movl $0x1, %ecx
callq 0xc93e5
leaq 0x50e0(%rsp), %rdi
movq %r14, %rsi
movq %r13, %r14
movl 0x4(%rsp), %r13d
movq %rbx, %rdx
leaq 0x30e0(%rsp), %rbx
xorl %ecx, %ecx
callq 0xc93e5
movq 0x8(%r14), %rcx
jmp 0xc913c
movq 0x8(%r14), %rcx
movl 0xec(%rcx,%r15), %esi
movsd 0x2a288(%rip), %xmm0    # 0xf3388
testl %esi, %esi
jle 0xc9124
leaq (%rcx,%r15), %rax
movl 0xf0(%rax), %eax
cltd
idivl %esi
movsd 0x2a26f(%rip), %xmm0    # 0xf3388
testl %edx, %edx
jne 0xc9124
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movl %eax, 0xec(%rcx,%r15)
movl %r12d, 0xf0(%rcx,%r15)
incl %ebp
movl $0x1, %r12d
cmpl %ebp, 0xc(%rsp)
jne 0xc8fa6
movq 0x10(%rsp), %r15
incq %r15
movl %r15d, %edx
movq 0x18(%rsp), %r13
movzwl 0x2(%r13), %esi
movq 0x80(%rsp), %rbp
movl $0x580, %ecx            # imm = 0x580
addq %rcx, %rbp
movq 0x48(%rsp), %rax
addq %rcx, %rax
movq %rsi, 0x40(%rsp)
cmpq %rsi, %r15
movl 0x8(%rsp), %ebx
jb 0xc8b14
testb $0x1, 0x4(%rsp)
movl 0x24(%rsp), %ebp
jne 0xc91b5
jmp 0xc91e1
movl $0xfffffff4, %ebp       # imm = 0xFFFFFFF4
movq 0x30(%rsp), %rax
movl %ebp, (%rax)
jmp 0xc92f1
xorl %edx, %edx
movd 0x50e0(%rsp), %xmm0
xorpd %xmm1, %xmm1
punpcklbw %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7]
punpcklwd %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3]
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movdqu %xmm0, 0x10(%r14)
movzbl 0x50e4(%rsp), %eax
movl %eax, 0x20(%r14)
movzbl (%r14), %ecx
testq %rcx, %rcx
je 0xc92f1
movq 0x8(%r14), %rax
leal 0x3(%rcx), %esi
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %esi
imulq $0x8780, %rsi, %rcx     # imm = 0x8780
movdqa 0x49b4c(%rip), %xmm1    # 0x112d60
movdqa 0x49b54(%rip), %xmm2    # 0x112d70
xorl %edi, %edi
movdqa 0x49b5a(%rip), %xmm3    # 0x112d80
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x4a63a(%rip), %xmm5    # 0x113870
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %esi
notl %esi
testb $0x1, %sil
je 0xc9272
movl %edx, 0xf4(%rax,%rdi)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0xc9288
movl %edx, 0x22d4(%rax,%rdi)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %esi
testb $0x1, %sil
je 0xc92c7
movl %edx, 0x44b4(%rax,%rdi)
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0xc92d9
movl %edx, 0x6694(%rax,%rdi)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x8780, %rdi           # imm = 0x8780
cmpq %rdi, %rcx
jne 0xc9236
movl %ebp, %eax
addq $0x78e8, %rsp           # imm = 0x78E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq