// File: /workspace/github_cpp_makefile_star2_O1/adamiaonr[P]rid-analytics/src/rid-analytics.cpp
// Function: RID_Analytics::RID_Analytics(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned char, unsigned short, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
RID_Analytics::RID_Analytics(
    std::string nw_filename,
    uint8_t request_size,
    uint16_t bf_size,
    std::string origin_server_id,
    int mode,
    std::string output_dir,
    std::string output_label) {

    // initialize the scenario parameters set at runtime
    this->request_size = request_size;
    this->bf_size = bf_size;
    this->mode = mode;
    std::cout << "RID_Analytics::RID_Analytics() [INFO] : mode = " 
        << std::bitset<(sizeof(int) * 8)>(this->mode) << std::endl;

    // ... and build the network
    build_network(nw_filename);
    read_scn(nw_filename);

    // after building the network, save the origin server pointer
    this->origin_server = this->routers[origin_server_id];
    std::cout << "RID_Analytics::RID_Analytics() [INFO] : origin_server_id = " 
        << this->routers[origin_server_id]->get_id() << std::endl;

    // init output files
    init_output(output_label, output_dir);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %r8, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
leaq 0x28(%rdi), %rsi
movl %eax, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rsi, 0x38(%rdi)
movq %rsi, 0x40(%rdi)
movq %rax, 0x48(%rdi)
leaq 0x50(%rdi), %r14
leaq 0x58(%rdi), %rsi
movl %eax, 0x58(%rdi)
movq %rax, 0x60(%rdi)
movq %rsi, 0x68(%rdi)
movq %rsi, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movups %xmm0, 0x98(%rdi)
movq %rax, 0xa8(%rdi)
movb %dl, (%rdi)
movw %cx, 0x2(%rdi)
movl %r9d, 0x4(%rdi)
movq 0x1c95d(%rip), %rdi     # 0x3ffb8
leaq 0xe927(%rip), %rsi      # 0x31f89
movl $0x2f, %edx
callq 0x4400
movl 0x4(%rbx), %eax
movq %rsp, %rsi
movq %rax, (%rsi)
movq 0x1c93c(%rip), %rdi     # 0x3ffb8
callq 0x28258
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42a0
leaq 0x90(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x80(%rsp), %rdi
callq 0x1c27c
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x2394a
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x236fd
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %rdi
callq 0x1c27c
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x2495c
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x23740
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x28380
movq (%rax), %rax
movq %rax, 0x80(%rbx)
movq 0x1c85c(%rip), %rdi     # 0x3ffb8
leaq 0xe856(%rip), %rsi      # 0x31fb9
movl $0x3b, %edx
callq 0x4400
movq %r14, %rdi
movq %r15, %rsi
callq 0x28380
movq (%rax), %rax
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x1c27c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x1c811(%rip), %rdi     # 0x3ffb8
callq 0x4400
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42a0
movq 0xd8(%rsp), %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x237f4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x1c27c
movq 0xd0(%rsp), %rax
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x1c27c
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x24e44
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x23860
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x23877
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x43a0
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x238a7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x238a7
movq %rax, %r15
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x23908
movq 0x50(%rsp), %rsi
jmp 0x238f9
movq %rax, %r15
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x23908
movq 0x70(%rsp), %rsi
jmp 0x238f9
movq %rax, %r15
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x23908
movq 0x90(%rsp), %rsi
jmp 0x238f9
jmp 0x23905
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x23908
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x23908
jmp 0x23905
movq %rax, %r15
leaq 0x8(%rbx), %r13
leaq 0x20(%rbx), %r12
leaq 0x98(%rbx), %rdi
callq 0x283fc
movq %r14, %rdi
callq 0x288d2
movq %r12, %rdi
callq 0x2894a
movq (%r13), %rdi
testq %rdi, %rdi
je 0x23941
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x43a0
movq %r15, %rdi
callq 0x4700
nop