// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
andq $0x0, 0x18(%rdi)
leaq 0x28(%rdi), %rax
andl $0x0, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rax, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
leaq 0x58(%rdi), %rax
andl $0x0, 0x58(%rdi)
andq $0x0, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movq %rax, 0x70(%rdi)
andq $0x0, 0x78(%rdi)
leaq 0x50(%rdi), %r14
andq $0x0, 0xa8(%rdi)
movups %xmm0, 0x98(%rdi)
movb %dl, (%rdi)
movw %cx, 0x2(%rdi)
movl %r9d, 0x4(%rdi)
movq 0x1cdd1(%rip), %rdi     # 0x3afb0
leaq 0xcd43(%rip), %rsi      # 0x2af29
callq 0x43a0
movl 0x4(%rbx), %ecx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
movq %rax, %rdi
callq 0x215b5
movq %rax, %rdi
callq 0x41e0
leaq 0x88(%rsp), %rdi
movq %r12, %rsi
callq 0x4510
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
callq 0x1e390
leaq 0x88(%rsp), %rdi
callq 0x41c0
leaq 0x68(%rsp), %rdi
movq %r12, %rsi
callq 0x4510
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x1f020
leaq 0x68(%rsp), %rdi
callq 0x41c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2167c
movq (%rax), %rax
movq %rax, 0x80(%rbx)
movq 0x1cd3d(%rip), %rdi     # 0x3afb0
leaq 0xccdf(%rip), %rsi      # 0x2af59
callq 0x43a0
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2167c
movq (%rax), %rsi
leaq 0x8(%rsp), %rdi
callq 0x4510
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x4360
movq %rax, %rdi
callq 0x41e0
movq 0xd8(%rsp), %r15
leaq 0x8(%rsp), %rdi
callq 0x41c0
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x4510
movq 0xd0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x4510
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %rbx, %rdi
callq 0x1f436
leaq 0x28(%rsp), %rdi
callq 0x41c0
leaq 0x48(%rsp), %rdi
callq 0x41c0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x41c0
jmp 0x1e327
movq %rax, %r15
leaq 0x48(%rsp), %rdi
jmp 0x1e34d
movq %rax, %r15
leaq 0x68(%rsp), %rdi
jmp 0x1e34d
movq %rax, %r15
leaq 0x88(%rsp), %rdi
jmp 0x1e34d
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x41c0
jmp 0x1e35b
jmp 0x1e358
jmp 0x1e358
movq %rax, %r15
leaq 0x8(%rbx), %r12
leaq 0x98(%rbx), %rdi
addq $0x20, %rbx
callq 0x216e2
movq %r14, %rdi
callq 0x21bf4
movq %rbx, %rdi
callq 0x21c58
movq %r12, %rdi
callq 0x195d0
movq %r15, %rdi
callq 0x4700
nop