// File: /workspace/github_cpp_makefile_star2_O3/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 0x1eb5ff(%rip), %rax    # 0x6019f0
movq %rax, (%rdi)
xorl %r13d, %r13d
movq %r13, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movl %r13d, 0x30(%rdi)
movw $0x2, 0x34(%rdi)
movw %r13w, 0x42(%rdi)
movw %r13w, 0x80(%rdi)
movb %r13b, 0x82(%rdi)
movw %r13w, 0x98(%rdi)
movl %r13d, 0x3d(%rdi)
movq %r13, 0x36(%rdi)
movb $0x1, 0x9a(%rdi)
movw %r13w, 0x9c(%rdi)
movb %r13b, 0x128(%rdi)
movw %r13w, 0x138(%rdi)
movq $0x60b5b0, %rax         # imm = 0x60B5B0
movzwl (%rax), %r14d
addl %r14d, %r14d
movq %r14, %rdi
callq 0x418d20
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401088
movq %r15, 0x18(%rbx)
movq $0x609151, %rbp         # imm = 0x609151
movzbl (%rbp), %r14d
leal (,%r14,8), %edi
callq 0x418d20
movq %rax, 0x48(%rbx)
testl %r14d, %r14d
je 0x4164db
xorl %r15d, %r15d
movq $0x609156, %r12         # imm = 0x609156
movl $0x10, %edi
callq 0x418ce0
movq %rax, %r14
movw $0x0, 0x8(%rax)
movzbl (%r12), %edi
addl %edi, %edi
callq 0x418d20
movq %rax, (%r14)
movq 0x48(%rbx), %rax
movq %r14, (%rax,%r15,8)
incq %r15
movzbl (%rbp), %r13d
cmpq %r13, %r15
jb 0x4164a4
movq $0x60b5e4, %rbp         # imm = 0x60B5E4
movzbl (%rbp), %r14d
leal (,%r14,8), %edi
callq 0x418d20
movq %rax, 0x50(%rbx)
testl %r14d, %r14d
je 0x41654a
xorl %r13d, %r13d
movq $0x609156, %r12         # imm = 0x609156
movl $0x10, %edi
callq 0x418ce0
movq %rax, %r14
movw $0x0, 0x8(%rax)
movzbl (%r12), %edi
addl %edi, %edi
callq 0x418d20
movq %rax, (%r14)
movq 0x50(%rbx), %rax
movq %r14, (%rax,%r13,8)
incq %r13
movzbl (%rbp), %r15d
cmpq %r15, %r13
jb 0x416507
movq $0x609151, %rax         # imm = 0x609151
movb (%rax), %r13b
jmp 0x41654d
xorl %r15d, %r15d
movzbl %r13b, %r14d
shll $0x3, %r14d
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x58(%rbx)
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x60(%rbx)
movq %r14, %rdi
callq 0x418d20
movq %rax, 0x68(%rbx)
movq %r15, %rdi
callq 0x418d20
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 0x418d20
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 0x418d20
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 0x418d20
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 0x418d20
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 0x418d20
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 0x418d20
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 0x418d20
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x401088
movq %r12, 0x118(%rbx)
movq %r15, %rdi
callq 0x418d20
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x401088
movq %r14, 0x140(%rbx)
movl $0x2, %edi
callq 0x418d20
movw $0x0, (%rax)
movq %rax, 0x130(%rbx)
movq $0x60b5b8, %rax         # imm = 0x60B5B8
movzwl (%rax), %r14d
shll $0x3, %r14d
movq %r14, %rdi
callq 0x418d20
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 0x41671f
movq %rax, %rbx
movl $0x10, %esi
movq %r14, %rdi
callq 0x4177e0
movq %rbx, %rdi
callq 0x4c34a0
nop