// File: /workspace/github_cpp_makefile_star2_O1/MPSLab-ASU[P]DiRAC/./src/pe.cc
// Function: PE::PE()
PE::PE()
{
  RegFile = new data_type[RF_size]();

  buf_in = new FIFO*[inNetworks];
  for(uint8_t i=0; i < inNetworks; i++)
    buf_in[i] = new FIFO;
  buf_out = new FIFO*[outNetworks];
  for(uint8_t i=0; i < outNetworks; i++)
    buf_out[i] = new FIFO;

  in_config   = new bool*[inNetworks];
  in_forward  = new bool*[inNetworks];
  in_data     = new data_type*[inNetworks];
  write_back  = new bool[outNetworks]();
  out_data    = new data_type[outNetworks]();

  // Note that zero initialization of following states is necessary.
  state_multiplier_stages = new bool[multiplier_stages]();
  state_adder_stages      = new bool[adder_stages]();

  temp_reg_multiply       = new data_type[multiplier_stages]();
  temp_reg_idx_write_Op3  = new uint16_t[multiplier_stages + adder_stages + 1]();
  temp_reg_add_Op1        = new data_type[adder_stages]();
  temp_reg_add_Op2        = new data_type[multiplier_stages + adder_stages - 1]();

  // Note that zero initialization of following signals is necessary.
  temp_sel_sig_adder_is_Op2_self = new bool[multiplier_stages + adder_stages]();
  temp_sel_sig_adder_Op2_zero_initialize_current_RF_Pass = new bool[2]();

  insMem = new uint64_t[size_insMem]();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1ec14f(%rip), %rax    # 0x6019f0
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movl %eax, 0x30(%rdi)
movw $0x2, 0x34(%rdi)
movw %ax, 0x42(%rdi)
movw %ax, 0x80(%rdi)
movb %al, 0x82(%rdi)
movw %ax, 0x98(%rdi)
movl %eax, 0x3d(%rdi)
movq %rax, 0x36(%rdi)
movb $0x1, 0x9a(%rdi)
movw %ax, 0x9c(%rdi)
movb %al, 0x128(%rdi)
movw %ax, 0x138(%rdi)
movq $0x60b5b0, %rax         # imm = 0x60B5B0
movzwl (%rax), %r14d
addl %r14d, %r14d
movq %r14, %rdi
callq 0x4181e0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401088
movq %r15, 0x18(%rbx)
movq $0x609151, %r15         # imm = 0x609151
movzbl (%r15), %r14d
leal (,%r14,8), %edi
callq 0x4181e0
movq %rax, 0x48(%rbx)
testl %r14d, %r14d
je 0x41597f
xorl %r12d, %r12d
movq $0x609156, %r13         # imm = 0x609156
movl $0x10, %edi
callq 0x4181a0
movq %rax, %r14
movw $0x0, 0x8(%rax)
movzbl (%r13), %edi
addl %edi, %edi
callq 0x4181e0
movq %rax, (%r14)
movq 0x48(%rbx), %rax
movq %r14, (%rax,%r12,8)
incq %r12
movzbl (%r15), %eax
cmpq %rax, %r12
jb 0x415949
movq $0x60b5e4, %r12         # imm = 0x60B5E4
movzbl (%r12), %r13d
leal (,%r13,8), %edi
callq 0x4181e0
movq %rax, 0x50(%rbx)
testl %r13d, %r13d
je 0x4159e7
xorl %ebp, %ebp
movq $0x609156, %r15         # imm = 0x609156
movl $0x10, %edi
callq 0x4181a0
movq %rax, %r14
movw $0x0, 0x8(%rax)
movzbl (%r15), %edi
addl %edi, %edi
callq 0x4181e0
movq %rax, (%r14)
movq 0x50(%rbx), %rax
movq %r14, (%rax,%rbp,8)
incq %rbp
movzbl (%r12), %r13d
cmpq %r13, %rbp
jb 0x4159aa
movq $0x609151, %r15         # imm = 0x609151
movzbl (%r15), %r14d
shll $0x3, %r14d
movq %r14, %rdi
callq 0x4181e0
movq %rax, 0x58(%rbx)
movq %r14, %rdi
callq 0x4181e0
movq %rax, 0x60(%rbx)
movq %r14, %rdi
callq 0x4181e0
movq %rax, 0x68(%rbx)
movzbl %r13b, %r15d
movq %r15, %rdi
callq 0x4181e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq %r12, 0x70(%rbx)
addl %r15d, %r15d
movq %r15, %rdi
callq 0x4181e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq %r12, 0x78(%rbx)
movq $0x609154, %rax         # imm = 0x609154
movzbl (%rax), %r15d
movq %r15, %rdi
callq 0x4181e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq %r12, 0x88(%rbx)
movq $0x609155, %rax         # imm = 0x609155
movzbl (%rax), %r12d
movq %r12, %rdi
callq 0x4181e0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x401088
movq %r13, 0x90(%rbx)
movl %r15d, %r13d
addl %r13d, %r13d
movq %r13, %rdi
callq 0x4181e0
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x401088
movq %rbp, 0x108(%rbx)
addq %r12, %r15
leal (%r15,%r15), %r14d
leaq 0x2(%r14), %r13
movq %r13, %rdi
callq 0x4181e0
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x401088
movq %rbp, 0x120(%rbx)
addl %r12d, %r12d
movq %r12, %rdi
callq 0x4181e0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x401088
movq %r13, 0x110(%rbx)
addq $-0x2, %r14
cmpq $0x1, %r15
movl $0x0, %edi
sbbq %rdi, %rdi
orq %r14, %rdi
movq %rdi, %r14
callq 0x4181e0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401088
movq %r12, 0x118(%rbx)
movq %r15, %rdi
callq 0x4181e0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq %r14, 0x140(%rbx)
movl $0x2, %edi
callq 0x4181e0
movw $0x0, (%rax)
movq %rax, 0x130(%rbx)
movq $0x60b5b8, %rax         # imm = 0x60B5B8
movzwl (%rax), %r14d
shll $0x3, %r14d
movq %r14, %rdi
callq 0x4181e0
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401088
movq %r15, 0xe8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x415bbd
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x416ca0
movq %rbx, %rdi
callq 0x4c2960
nop