// File: /workspace/github_cpp_makefile_star2_O3/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 0x1be55(%rip), %rdi     # 0x3efb8
leaq 0xdbff(%rip), %rsi      # 0x30d69
movl $0x2f, %edx
callq 0x4400
movl 0x4(%rbx), %eax
movq %rsp, %rsi
movq %rax, (%rsi)
movq 0x1be34(%rip), %rdi     # 0x3efb8
callq 0x27d66
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 0x1bdb4
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x23452
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x23205
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 0x1bdb4
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x24464
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x23248
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x43a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x27e8e
movq (%rax), %rax
movq %rax, 0x80(%rbx)
movq 0x1bd54(%rip), %rdi     # 0x3efb8
leaq 0xdb2e(%rip), %rsi      # 0x30d99
movl $0x3b, %edx
callq 0x4400
movq %r14, %rdi
movq %r15, %rsi
callq 0x27e8e
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 0x1bdb4
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x1bd09(%rip), %rdi     # 0x3efb8
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 0x232fc
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 0x1bdb4
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 0x1bdb4
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2497e
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x23368
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x2337f
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 0x233af
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x233af
movq %rax, %r15
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x23410
movq 0x50(%rsp), %rsi
jmp 0x23401
movq %rax, %r15
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x23410
movq 0x70(%rsp), %rsi
jmp 0x23401
movq %rax, %r15
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x23410
movq 0x90(%rsp), %rsi
jmp 0x23401
jmp 0x2340d
movq %rax, %r15
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x23410
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x43a0
jmp 0x23410
jmp 0x2340d
movq %rax, %r15
leaq 0x8(%rbx), %r13
leaq 0x20(%rbx), %r12
leaq 0x98(%rbx), %rdi
callq 0x27f0a
movq %r14, %rdi
callq 0x283f6
movq %r12, %rdi
callq 0x2846e
movq (%r13), %rdi
testq %rdi, %rdi
je 0x23449
movq 0x18(%rbx), %rsi
subq %rdi, %rsi
callq 0x43a0
movq %r15, %rdi
callq 0x4700
nop