// File: /workspace/github_c_makefile_star2_O0/LPD-EPFL[P]mctop/src/mctop_topology.c
// Function: mctop_pow_info_add
void
mctop_pow_info_add(mctop_t* topo, double*** pm)
{
  for (int i = 0; i <= topo->n_sockets; i++)
    {
      mctop_pow_info_t* pi = malloc_assert(sizeof(mctop_pow_info_t));
      uint div = 1;
      if (i < topo->n_sockets)
	{
	  topo->sockets[i].pow_info = pi;
	}
      else
	{
	  topo->pow_info = pi;
	  div = topo->n_sockets;
	}
      uint type = 0;
      __copy_doubles(pi->idle, pm[type++][i], MCTOP_POW_COMP_TYPE_NUM, 1);
      __copy_doubles(pi->first_core, pm[type++][i], MCTOP_POW_COMP_TYPE_NUM, div);
      __copy_doubles(pi->second_core, pm[type++][i], MCTOP_POW_COMP_TYPE_NUM, div);
      __copy_doubles(pi->second_hwc_core, pm[type++][i], MCTOP_POW_COMP_TYPE_NUM, div);
      __copy_doubles(pi->all_cores, pm[type++][i], MCTOP_POW_COMP_TYPE_NUM, 1);
      __copy_doubles(pi->all_hwcs, pm[type++][i], MCTOP_POW_COMP_TYPE_NUM, 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
ja 0xb9f0
movl $0x120, %edi            # imm = 0x120
callq 0x93f0
movq %rax, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0xb88b
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rdx
imulq $0xa8, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0xa0(%rax)
jmp 0xb8a4
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl $0x5, %edx
movl $0x1, %ecx
callq 0xba00
movq -0x20(%rbp), %rdi
addq $0x30, %rdi
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x24(%rbp), %ecx
movl $0x5, %edx
callq 0xba00
movq -0x20(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x24(%rbp), %ecx
movl $0x5, %edx
callq 0xba00
movq -0x20(%rbp), %rdi
addq $0x90, %rdi
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x24(%rbp), %ecx
movl $0x5, %edx
callq 0xba00
movq -0x20(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl $0x5, %edx
movl $0x1, %ecx
callq 0xba00
movq -0x20(%rbp), %rdi
addq $0xf0, %rdi
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x28(%rbp)
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl $0x5, %edx
movl $0x1, %ecx
callq 0xba00
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xb837
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)