// File: /workspace/github_cpp_makefile_star2_O2/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 0x1ecfc3(%rip), %rax    # 0x5fe9f0
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
andl $0x0, 0x30(%rdi)
movw $0x2, 0x34(%rdi)
andw $0x0, 0x42(%rdi)
andw $0x0, 0x80(%rdi)
xorl %r12d, %r12d
movb %r12b, 0x82(%rdi)
andw $0x0, 0x98(%rdi)
andq $0x0, 0x36(%rdi)
andl $0x0, 0x3d(%rdi)
movb $0x1, 0x9a(%rdi)
andw $0x0, 0x9c(%rdi)
movb %r12b, 0x128(%rdi)
andw $0x0, 0x138(%rdi)
movq $0x6085b0, %rax         # imm = 0x6085B0
movzwl (%rax), %r14d
addl %r14d, %r14d
movq %r14, %rdi
callq 0x414190
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401080
movq %r15, 0x18(%rbx)
movq $0x606151, %r13         # imm = 0x606151
movzbl (%r13), %ebp
movl %ebp, %edi
shll $0x3, %edi
callq 0x414190
movq %rax, 0x48(%rbx)
pushq $0x10
popq %r15
movzbl %bpl, %eax
cmpq %rax, %r12
jae 0x411b01
movq %r15, %rdi
callq 0x414150
movq %rax, %r14
movq %rax, %rdi
callq 0x41290e
movq 0x48(%rbx), %rax
movq %r14, (%rax,%r12,8)
incq %r12
movb (%r13), %bpl
jmp 0x411ad4
movq $0x6085e4, %rbp         # imm = 0x6085E4
movzbl (%rbp), %r14d
movl %r14d, %edi
shll $0x3, %edi
callq 0x414190
movq %rax, 0x50(%rbx)
xorl %r13d, %r13d
pushq $0x10
popq %r12
movzbl %r14b, %r15d
cmpq %r15, %r13
jae 0x411b50
movq %r12, %rdi
callq 0x414150
movq %rax, %r14
movq %rax, %rdi
callq 0x41290e
movq 0x50(%rbx), %rax
movq %r14, (%rax,%r13,8)
incq %r13
movb (%rbp), %r14b
jmp 0x411b23
movq $0x606151, %rax         # imm = 0x606151
movzbl (%rax), %r14d
shll $0x3, %r14d
movq %r14, %rdi
callq 0x414190
movq %rax, 0x58(%rbx)
movq %r14, %rdi
callq 0x414190
movq %rax, 0x60(%rbx)
movq %r14, %rdi
callq 0x414190
movq %rax, 0x68(%rbx)
movq %r15, %rdi
callq 0x414190
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq %r12, 0x70(%rbx)
addl %r15d, %r15d
movq %r15, %rdi
callq 0x414190
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq %r12, 0x78(%rbx)
movq $0x606154, %rax         # imm = 0x606154
movzbl (%rax), %r15d
movq %r15, %rdi
callq 0x414190
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq %r12, 0x88(%rbx)
movq $0x606155, %rax         # imm = 0x606155
movzbl (%rax), %r12d
movq %r12, %rdi
callq 0x414190
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x401080
movq %r13, 0x90(%rbx)
movl %r15d, %r13d
addl %r13d, %r13d
movq %r13, %rdi
callq 0x414190
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x401080
movq %rbp, 0x108(%rbx)
addq %r12, %r15
leal (%r15,%r15), %r14d
leaq 0x2(%r14), %r13
movq %r13, %rdi
callq 0x414190
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x401080
movq %rbp, 0x120(%rbx)
addl %r12d, %r12d
movq %r12, %rdi
callq 0x414190
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x401080
movq %r13, 0x110(%rbx)
addq $-0x2, %r14
cmpq $0x1, %r15
movl $0x0, %edi
sbbq %rdi, %rdi
orq %r14, %rdi
movq %rdi, %r14
callq 0x414190
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401080
movq %r12, 0x118(%rbx)
movq %r15, %rdi
callq 0x414190
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401080
movq %r14, 0x140(%rbx)
pushq $0x2
popq %rdi
callq 0x414190
andw $0x0, (%rax)
movq %rax, 0x130(%rbx)
movq $0x6085b8, %rax         # imm = 0x6085B8
movzwl (%rax), %r14d
shll $0x3, %r14d
movq %r14, %rdi
callq 0x414190
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401080
movq %r15, 0xe8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x411d26
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r14, %rdi
callq 0x412c50
movq %rbx, %rdi
callq 0x4bea70