LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/simulator.cpp
// Function: weigh_path_spectrum(std::vector<int, std::allocator<int>>&, int, int, Phy_graph&)
double weigh_path_spectrum(Path& path, int slot_st, int slot_ed, Phy_graph& p_graph)
{
    double distance = get_distance(path, slot_st, slot_ed, p_graph);
    double num_cut = get_cut_num(path, slot_st, slot_ed, p_graph);
    double num_align = get_align_num(path, slot_st, slot_ed, p_graph);
    return transceiver_slot_limit*4*hop_limit-reserved_coefficent * distance + cut_coeffcient * num_cut + align_coeffcient * num_align;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
callq 0x6026
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x6150
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x61fb
cvtsi2sd %eax, %xmm0
movl 0x11e9d(%rip), %eax     # 0x181e4
imull 0x11e6e(%rip), %eax     # 0x181bc
shll $0x2, %eax
cvtsi2sd %eax, %xmm1
movsd 0x10(%rsp), %xmm2
mulsd 0x11ef5(%rip), %xmm2    # 0x18258
subsd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm2
mulsd 0x11eeb(%rip), %xmm2    # 0x18260
addsd %xmm1, %xmm2
mulsd 0x11ee7(%rip), %xmm0    # 0x18268
addsd %xmm2, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/simulator.cpp
// Function: find_best_spectrum(std::vector<int, std::allocator<int>>&, int, Phy_graph&)
Spectrum find_best_spectrum(Path& path, int require_slots, Phy_graph& p_graph)
{
    int slot_st = 0;
    int slot_ed;
    Spectrum best_path_spectrum;
    double current_weight;
    best_path_spectrum.slot_st = -1;
    best_path_spectrum.slot_ed = -1;
    best_path_spectrum.weight = DBL_MAX;
    while(slot_st + require_slots - 1 < num_slots)
    {
        slot_ed = slot_st + require_slots - 1;
        int next_start = path_spectrum_available(path, slot_st, slot_ed, p_graph);
        if(next_start < 0) // spectrum_available
        {
            current_weight = weigh_path_spectrum(path, slot_st, slot_ed, p_graph);
            if(current_weight < best_path_spectrum.weight)
            {
                best_path_spectrum.slot_st = slot_st;
                best_path_spectrum.slot_ed = slot_ed;
                best_path_spectrum.weight = current_weight;
            }
        }
        slot_st = (next_start < 0)? slot_st+1:next_start;
    }
    return best_path_spectrum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
callq 0xe148
orq $-0x1, 0x8(%rbx)
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rbx, (%rsp)
movq %rax, 0x10(%rbx)
xorl %r13d, %r13d
leal (%r15,%r13), %eax
cmpl 0x11df8(%rip), %eax     # 0x181c8
jg 0x6428
leal (%r15,%r13), %ebp
decl %ebp
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r14, %rcx
callq 0x5fb5
movl %eax, %ebx
testl %eax, %eax
jns 0x641d
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r14, %rcx
callq 0x62ef
movq (%rsp), %rax
movsd 0x10(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x641d
movq (%rsp), %rax
movl %r13d, 0x8(%rax)
movl %ebp, 0xc(%rax)
movsd %xmm0, 0x10(%rax)
incl %r13d
testl %ebx, %ebx
cmovnsl %ebx, %r13d
jmp 0x63c6
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
callq 0xe154
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/simulator.cpp
// Function: relax(Aux_node*, std::unordered_map<Aux_node*, double, std::hash<Aux_node*>, std::equal_to<Aux_node*>, std::allocator<std::pair<Aux_node* const, double>>>&, std::unordered_map<Aux_node*, Aux_link*, std::hash<Aux_node*>, std::equal_to<Aux_node*>, std::allocator<std::pair<Aux_node* const, Aux_link*>>>&, std::unordered_map<Aux_node*, bool, std::hash<Aux_node*>, std::equal_to<Aux_node*>, std::allocator<std::pair<Aux_node* const, bool>>>&, std::queue<Aux_node*, std::deque<Aux_node*, std::allocator<Aux_node*>>>&)
void relax(Aux_node* v, Aux_node2Double& distTo, Aux_node2Aux_link& edgeTo, Aux_node2Bool& onQueue, queue<Aux_node*>& queue)
{
    Aux_link* link;
    Aux_node* w;

    for(link = v->first_out; link != NULL; link = link->next_same_from)
    {
        w = link->to;
        if(get_dist(distTo, w) > get_dist(distTo, v) + link->weight)
        {
            distTo[w] = distTo[v] + link->weight;
            edgeTo[w] = link;
            if(!onQueue[w])
            {
                // cout << "other node: "<< w->phy_id << "  <<< " << w->type << "\n";
                queue.push(w);
                onQueue[w] = true;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x10(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
leaq 0x20(%rsp), %rbp
movq %rdi, (%rbp)
addq $0x20, %r13
leaq 0x18(%rsp), %rbx
movq (%r13), %r13
testq %r13, %r13
je 0x6535
movq 0x28(%r13), %rsi
movq %rsi, 0x18(%rsp)
movq %r12, %rdi
callq 0x6544
movsd %xmm0, 0x8(%rsp)
movq 0x20(%rsp), %rsi
movq %r12, %rdi
callq 0x6544
addsd 0x18(%r13), %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x652c
movq %r12, %rdi
movq %rbp, %rsi
callq 0x878e
movsd (%rax), %xmm0
addsd 0x18(%r13), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x878e
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7a7a
movq %r13, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d0a
cmpb $0x0, (%rax)
jne 0x652c
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x8ad6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8d0a
movb $0x1, (%rax)
addq $0x38, %r13
jmp 0x6480
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/graph.cpp
// Function: Phy_graph::get_reach(std::vector<int, std::allocator<int>>)
int Phy_graph::get_reach(vector<int> path)
{
    int from;
    int to;
    int dis = 0;
    for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
    {
        from = path[node_i];
        to = path[node_i + 1];
        dis += get_link(from, to).distance;
    }
    return modlev(dis);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %ebp, %ebp
pushq $0x1
popq %r15
leal -0x1(%r15), %ecx
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x9134
movl (%rax,%rcx,4), %esi
movl %r15d, %ecx
movl (%rax,%rcx,4), %edx
movq %rbx, %rdi
callq 0x9148
addl 0x10(%rax), %ebp
incl %r15d
jmp 0x9101
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x90c4
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/graph.cpp
// Function: Phy_graph::Phy_graph(Graph_info&)
Phy_graph::Phy_graph(Graph_info &g_info)
{
    this->transmission_distance_QPSK = g_info.transmission_distance_QPSK;
    this->transmission_distance_8QAM = g_info.transmission_distance_8QAM;
    this->transmission_distance_16QAM = g_info.transmission_distance_16QAM;
    read_network_file(g_info.graph_file, g_info.num_slots);
    // assign transceivers for each node
    assign_transceivers(g_info.num_OTDM_transceiver, g_info.num_OFDM_transceiver, g_info.transceiver_connection_limit);
    find_candidate_path();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xe9dd(%rip), %rax      # 0x17b50
movq %rax, (%rdi)
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)
movq %rsi, %r15
leaq 0x8(%rdi), %r14
movl 0x28(%rsi), %eax
movl %eax, 0x88(%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x80(%rdi)
movq (%rsi), %rsi
movl 0x8(%r15), %edx
callq 0x9228
movl 0xc(%r15), %esi
movl 0x10(%r15), %edx
movl 0x1c(%r15), %ecx
movq %rbx, %rdi
callq 0x94a0
movq %rbx, %rdi
callq 0x95a2
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x50(%rbx), %rdi
addq $0x20, %rbx
callq 0x9f98
movq %rbx, %rdi
callq 0xa03c
movq %r14, %rdi
callq 0x9c08
movq %r15, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/graph.cpp
// Function: Phy_graph::assign_transceivers(int, int, int)
void Phy_graph::assign_transceivers(int num_OTDM_transceiver, int num_OFDM_transceiver, int transceiver_connection_limit)
{
    for(auto &node : node_list)
    {
        node.transmitter.resize(num_OTDM_transceiver * node.degree);
        node.num_available_transmitter = num_OTDM_transceiver * node.degree;

        node.receiver.resize(num_OTDM_transceiver * node.degree);
        node.num_available_receiver = num_OTDM_transceiver * node.degree;

        node.OFDMtransmitter.resize(num_OFDM_transceiver * node.degree, OFDMTransceiver(transceiver_connection_limit));
        node.num_available_OFDM_transmitter = num_OFDM_transceiver * node.degree;

        node.OFDMreceiver.resize(num_OFDM_transceiver * node.degree, OFDMTransceiver(transceiver_connection_limit));
        node.num_available_OFDM_receiver = num_OFDM_transceiver * node.degree;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebx
movl %edx, %ebp
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movslq %esi, %r13
leaq 0x10(%rsp), %r15
movslq %edx, %rax
movq %rax, (%rsp)
cmpq 0x8(%rsp), %r14
je 0x957c
leaq 0x38(%r14), %rdi
movslq 0x8(%r14), %rsi
imulq %r13, %rsi
callq 0x9c2a
movslq 0x8(%r14), %rsi
imulq %r13, %rsi
movl %esi, 0x28(%r14)
leaq 0x50(%r14), %rdi
callq 0x9c2a
movl 0x8(%r14), %eax
movl %r13d, %ecx
imull %eax, %ecx
movl %ecx, 0x30(%r14)
imull %ebp, %eax
movslq %eax, %r12
movq %r15, %rdi
movl %ebx, %esi
callq 0x9afe
addq $0x68, %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x9c5a
movq %r15, %rdi
callq 0x9b82
movslq -0x60(%r14), %r12
imulq (%rsp), %r12
movl %r12d, -0x3c(%r14)
movq %r15, %rdi
movl %ebx, %esi
callq 0x9afe
addq $0x18, %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x9c5a
movq %r15, %rdi
callq 0x9b82
movl -0x78(%r14), %eax
imull %ebp, %eax
movl %eax, -0x4c(%r14)
addq $0x18, %r14
jmp 0x94ce
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x958d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x9b82
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/graph.cpp
// Function: Phy_graph::DFS_back_trace(int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>&, std::__cxx11::list<CandidatePath, std::allocator<CandidatePath>>&, CandidatePath&)
void Phy_graph::DFS_back_trace(int current_node, vector<Parents>& parents, list<CandidatePath>& path_set, CandidatePath& path)
{
    path.path.push_back(current_node);

    if(parents[current_node].empty())
    {
        CandidatePath new_path = path;

        reverse(new_path.path.begin(), new_path.path.end());

        int modulation = get_reach(new_path.path);

        if(modulation != -1)
        {
            new_path.modulation_level = modulation;
            path_set.push_back(new_path);
        }
    }

    for(auto &parent : parents[current_node])
    {
        DFS_back_trace(parent, parents, path_set, path);
    }

    path.path.pop_back();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
leaq 0x4(%rsp), %r13
movl %esi, (%r13)
leaq 0x8(%r8), %rdi
movq %r13, %rsi
callq 0x9dc0
movslq (%r13), %rax
movq (%r15), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %r13
movq 0x8(%rcx,%rax), %rbp
cmpq %rbp, %r13
jne 0x9998
leaq 0x20(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x9dee
movq 0x8(%r13), %rdi
movq 0x10(%r13), %rsi
callq 0xb634
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6b6e
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x90ee
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0x6f54
cmpl $-0x1, %ebp
je 0x995e
leaq 0x20(%rsp), %rsi
movl %ebp, 0x20(%rsi)
movq %r14, %rdi
callq 0x9e1e
leaq 0x20(%rsp), %rdi
callq 0x9bde
movslq 0x4(%rsp), %rax
movq (%r15), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %r13
movq 0x8(%rcx,%rax), %rbp
jmp 0x9998
movl (%r13), %esi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x98b8
addq $0x4, %r13
cmpq %rbp, %r13
jne 0x997f
addq $-0x4, 0x10(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6f54
jmp 0x99c5
jmp 0x99c2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x9bde
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/traffic.cpp
// Function: Traffic::read_source_file(char*)
void Traffic::read_source_file(char* source_file)
{
    fstream fs;

    fs.open(source_file, ios::in);
    if(!fs)
    {
        cerr << "Can't open file\"" << source_file << "\"\n";
        cerr << "Please give source file, program aborting...\n";
        exit(1);
    }

    int node_a, max_num_dest;
    double source_probility;
    while(fs >> node_a >> source_probility >> max_num_dest)
    {
        node_a--;
        source_matrix[node_a] = source_probility;
        num_dest_matrix[node_a] = max_num_dest;
    }

    fs.close();

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2230
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21d0
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
jne 0xc5dc
leaq 0x10(%rsp), %r14
movq %rsp, %r15
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x2120
movq %rax, %rdi
movq %r12, %rsi
callq 0x2130
movq %rax, %rdi
movq %r13, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc5b7
movslq (%rsp), %rax
leaq -0x1(%rax), %rcx
movl %ecx, (%rsp)
movsd 0x8(%rsp), %xmm0
movq 0x38(%rbx), %rcx
movsd %xmm0, -0x8(%rcx,%rax,8)
movl 0x4(%rsp), %ecx
movq 0x50(%rbx), %rdx
movl %ecx, -0x4(%rdx,%rax,4)
jmp 0xc55f
leaq 0x10(%rsp), %rdi
callq 0x2030
leaq 0x10(%rsp), %rdi
callq 0x2070
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xba0d(%rip), %rdi      # 0x17ff0
leaq 0x3106(%rip), %rsi      # 0xf6f0
callq 0x21e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21e0
leaq 0x3100(%rip), %rsi      # 0xf701
movq %rax, %rdi
callq 0x21e0
movq 0xb9e0(%rip), %rdi      # 0x17ff0
leaq 0x319d(%rip), %rsi      # 0xf7b4
callq 0x21e0
pushq $0x1
popq %rdi
callq 0x2240
jmp 0xc628
jmp 0xc628
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/traffic.cpp
// Function: Traffic::read_traffic_file(char*)
void Traffic::read_traffic_file(char* traffic_file)
{
    fstream fs;

    fs.open(traffic_file, ios::in);
    if(!fs)
    {
        cerr << "Can't open file\"" << traffic_file << "\"\n";
        cerr << "Please give Traffic file, program aborting...\n";
        exit(1);
    }

    int node_a, node_b;
    double traffic_probility;
    while(fs >> node_a >> node_b >> traffic_probility)
    {
        node_a--;
        node_b--;
        traffic_matrix[node_a][node_b] = traffic_probility;
    }

    fs.close();

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2230
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x21d0
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
jne 0xc71a
leaq 0x10(%rsp), %r14
leaq 0x4(%rsp), %r15
movq %rsp, %r12
leaq 0x8(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x2120
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq %rax, %rdi
movq %r13, %rsi
callq 0x2130
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xc6f5
movslq 0x4(%rsp), %rax
decq %rax
movl %eax, 0x4(%rsp)
movslq (%rsp), %rcx
leaq -0x1(%rcx), %rdx
movl %edx, (%rsp)
movsd 0x8(%rsp), %xmm0
movq 0x20(%rbx), %rdx
imulq $0x18, %rax, %rax
movq (%rdx,%rax), %rax
movsd %xmm0, -0x8(%rax,%rcx,8)
jmp 0xc695
leaq 0x10(%rsp), %rdi
callq 0x2030
leaq 0x10(%rsp), %rdi
callq 0x2070
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xb8cf(%rip), %rdi      # 0x17ff0
leaq 0x2fc8(%rip), %rsi      # 0xf6f0
callq 0x21e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21e0
leaq 0x2fc2(%rip), %rsi      # 0xf701
movq %rax, %rdi
callq 0x21e0
movq 0xb8a2(%rip), %rdi      # 0x17ff0
leaq 0x308d(%rip), %rsi      # 0xf7e2
callq 0x21e0
pushq $0x1
popq %rdi
callq 0x2240
jmp 0xc766
jmp 0xc766
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/traffic.cpp
// Function: Traffic::delete_event(int)
void Traffic::delete_event(int request_id)
{
    for(list<Event>::iterator it = event_list.begin(); it != event_list.end(); it++)
    {
        if((*it).type == Event::departure && (*it).request_id == request_id)
        {
            event_list.erase(it);
            break;
        }
    }
}

// Assembly:
addq $0x68, %rdi
movq %rdi, %rax
movq (%rax), %rax
cmpq %rdi, %rax
je 0xcb22
cmpl $0x1, 0x18(%rax)
jne 0xcb07
cmpl %esi, 0x1c(%rax)
jne 0xcb07
movq %rax, %rsi
jmp 0xcf0a
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/traffic.cpp
// Function: Event::Event()
Event::Event()
{
    request_id = -1;
    source = -1;
    num_dest = -1;
    bandwidth = -1;
    arrival_time = -1;
    holding_time = -1;
}

// Assembly:
leaq 0xae87(%rip), %rax      # 0x17c90
movq %rax, (%rdi)
leaq 0x20(%rdi), %rax
andl $0x0, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rax, 0x38(%rdi)
andq $0x0, 0x40(%rdi)
orq $-0x1, 0xc(%rdi)
orq $-0x1, 0x48(%rdi)
movsd 0x2958(%rip), %xmm0     # 0xf790
movsd %xmm0, 0x50(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/auxiliary.cpp
// Function: Aux_node::~Aux_node()
Aux_node::~Aux_node()
{
    Aux_link *current;
    Aux_link *next;

    // remove all the incoming links
    current = this -> first_in;
    while(current != NULL)
    {
        next = current -> next_same_to;
        delete current;
        current = next;
    }

    // remove all the outgoing links
    current = this -> first_out;
    while(current != NULL)
    {
        next = current -> next_same_from;
        delete current;
        current = next;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa5a6(%rip), %rax      # 0x17cd0
movq %rax, (%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xd745
movq (%rdi), %rax
movq 0x48(%rdi), %r14
callq *0x8(%rax)
movq %r14, %rdi
jmp 0xd731
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xd75d
movq (%rdi), %rax
movq 0x38(%rdi), %rbx
callq *0x8(%rax)
movq %rbx, %rdi
jmp 0xd749
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/kerolloz[P]os/pipe.c
// Function: main
int main() {
  // We use pipes to send output from child to parent

  int fd[2]; // Used to store two ends of pipe
  pipe(fd);
  if (fork() == 0) {
    // child process
    char concat_str[100];
    printf("Hello from child, enter a string: ");
    scanf("%s", concat_str);
    write(fd[1], concat_str, strlen(concat_str) + 1);

    exit(0);
  } else {
    // Parent process
    wait(NULL); // wait the child to finish
    char concat_str[100];
    read(fd[0], concat_str, 100);
    printf("Hello from parent, this is the string you entered: %s\n",
           concat_str);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
leaq -0x18(%rbp), %rdi
callq 0x1060
callq 0x10b0
testl %eax, %eax
je 0x120e
xorl %edi, %edi
callq 0x10a0
movl -0x18(%rbp), %edi
leaq -0x80(%rbp), %rbx
pushq $0x64
popq %rdx
movq %rbx, %rsi
callq 0x1070
leaq 0xe31(%rip), %rdi       # 0x202a
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xdef(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1050
leaq 0xe04(%rip), %rdi       # 0x2027
leaq -0x80(%rbp), %rbx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1080
movl -0x14(%rbp), %r14d
movq %rbx, %rdi
callq 0x1040
leaq 0x1(%rax), %rdx
movl %r14d, %edi
movq %rbx, %rsi
callq 0x1030
xorl %edi, %edi
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/examples/common-interface.cxx
// Function: main
int main() {
    using CBOR = cxon::CBOR<>;

    char const  json_in[] = "[1,5,7]";
    std::string json_out;

    std::vector<unsigned char> cbor;
    {
        std::vector<int> cxx;
        auto fbr = cxon::from_bytes(cxx, json_in);      // JSON to C++
            assert(fbr);
        auto tbr = cxon::to_bytes<CBOR>(cbor, cxx);     // C++ to CBOR
            assert(tbr);
    }
    {
        std::vector<int> cxx;
        auto fbr = cxon::from_bytes<CBOR>(cxx, cbor);   // CBOR to C++
            assert(fbr);
        auto tbr = cxon::to_bytes(json_out, cxx);       // C++ to JSON
            assert(tbr);
    }

    assert(json_out == json_in);
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movabsq $0x5d372c352c315b, %rax # imm = 0x5D372C352C315B
leaq 0x38(%rsp), %rdx
leaq 0x80(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movq %rax, (%rdx)
movb $0x0, (%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
movq %rsp, %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x58(%rsp), %rdi
callq 0x249b
cmpl $0x0, 0x58(%rsp)
jne 0x2383
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x2b77
cmpl $0x0, 0x40(%rsp)
jne 0x239c
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x248e
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x58(%rsp), %rdi
movq %rsp, %rsi
leaq 0x20(%rsp), %rdx
callq 0x313f
cmpl $0x0, 0x58(%rsp)
jne 0x23b5
leaq 0x40(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %rsp, %rdx
callq 0x3eee
cmpl $0x0, 0x40(%rsp)
jne 0x23ce
movq %rsp, %rdi
callq 0x248e
leaq 0x70(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2468
testb %al, %al
je 0x23e7
leaq 0x20(%rsp), %rdi
callq 0x2480
leaq 0x70(%rsp), %rdi
callq 0x2090
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
leaq 0x2d22(%rip), %rdi      # 0x50ac
leaq 0x2d1f(%rip), %rsi      # 0x50b0
leaq 0x2d2d(%rip), %rcx      # 0x50c5
pushq $0x15
jmp 0x23fe
leaq 0x2d2d(%rip), %rdi      # 0x50d0
leaq 0x2d06(%rip), %rsi      # 0x50b0
leaq 0x2d14(%rip), %rcx      # 0x50c5
pushq $0x17
jmp 0x23fe
leaq 0x2cf0(%rip), %rdi      # 0x50ac
leaq 0x2ced(%rip), %rsi      # 0x50b0
leaq 0x2cfb(%rip), %rcx      # 0x50c5
pushq $0x1c
jmp 0x23fe
leaq 0x2cfb(%rip), %rdi      # 0x50d0
leaq 0x2cd4(%rip), %rsi      # 0x50b0
leaq 0x2ce2(%rip), %rcx      # 0x50c5
pushq $0x1e
jmp 0x23fe
leaq 0x2ce6(%rip), %rdi      # 0x50d4
leaq 0x2cbb(%rip), %rsi      # 0x50b0
leaq 0x2cc9(%rip), %rcx      # 0x50c5
pushq $0x21
popq %rdx
callq 0x20e0
jmp 0x240a
jmp 0x240a
jmp 0x240a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x248e
leaq 0x20(%rsp), %rdi
callq 0x2480
leaq 0x70(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x2160
// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/examples/../src/cxon/lang/common/bio/io.hxx
// Function: std::enable_if<std::is_integral<int>::value && sizeof (int) == 4, bool>::type cxon::bio::imp::put_<int, std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<unsigned char, std::allocator<unsigned char>>&, int, unsigned int)
inline auto put_(O& o, T t, unsigned n)
                -> enable_if_t<std::is_integral<T>::value && sizeof(T) == 4, bool>
            {
                byte bs[sizeof(T)];
                    switch (n) {
                        default:    CXON_ASSERT(0, "unexpected");   // LCOV_EXCL_LINE
                                    return false;                   // LCOV_EXCL_LINE
                        case 4:     bs[n - 4] = byte(t >> 24);
                                    bs[n - 3] = byte(t >> 16); CXON_FALLTHROUGH;
                        case 2:     bs[n - 2] = byte(t >>  8); CXON_FALLTHROUGH;
                        case 1:     bs[n - 1] = byte(t >>  0);
                    }
                return poke_(o, bs, n);
            }

// Assembly:
pushq %rax
movl %esi, %eax
cmpl $0x1, %edx
je 0x3109
cmpl $0x2, %edx
je 0x3102
cmpl $0x4, %edx
jne 0x3120
movl %eax, %ecx
shrl $0x18, %ecx
movb %cl, 0x4(%rsp)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x5(%rsp)
leal -0x2(%rdx), %ecx
movb %ah, 0x4(%rsp,%rcx)
leal -0x1(%rdx), %ecx
movb %al, 0x4(%rsp,%rcx)
movl %edx, %edx
leaq 0x4(%rsp), %rsi
callq 0x2ffd
movb $0x1, %al
popq %rcx
retq
leaq 0x236c(%rip), %rdi      # 0x5493
leaq 0x2367(%rip), %rsi      # 0x5495
leaq 0x2422(%rip), %rcx      # 0x5557
movl $0x17a, %edx            # imm = 0x17A
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O2/dm4[P]huffman-homework/my_decode.cc
// Function: p(unsigned int, char)
void p(unsigned int a, char cl) {
    unsigned int mask = 1 << (cl - 1);
    for (int i = 0; i < cl; i++) {
        printf("%d", (a & mask)?1:0);
        mask >>= 1;
    }
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
leal -0x1(%rbx), %ecx
pushq $0x1
popq %r12
shll %cl, %r12d
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %ebx
leaq 0x1c9c(%rip), %r15      # 0x3020
subl $0x1, %ebx
jb 0x13a1
xorl %esi, %esi
testl %r14d, %r12d
setne %sil
movq %r15, %rdi
xorl %eax, %eax
callq 0x1030
shrl %r12d
jmp 0x1384
pushq $0xa
popq %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1150
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/fnvhash.c
// Function: fnv04
uint32_t
fnv04(char const *buf, int len)
{
    // B=2166136261 M=16777619
    uint32_t	hash = 0x811C9DC5;

    for (; --len >= 0; ++buf)
	hash = (hash ^ *(uint8_t const*)buf) * 0x01000193;

    hash += hash << 13;
    hash ^= hash >> 7;
    hash += hash << 3;
    hash ^= hash >> 17;
    hash += hash << 5;

    return  hash;
}

// Assembly:
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
testl %esi, %esi
jle 0x3d1f
decl %esi
movzbl (%rdi), %ecx
xorl %ecx, %eax
imull $0x1000193, %eax, %eax  # imm = 0x1000193
incq %rdi
jmp 0x3d09
imull $0x2001, %eax, %eax     # imm = 0x2001
movl %eax, %ecx
shrl $0x7, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x11, %ecx
xorl %eax, %ecx
imull $0x21, %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/fnvhash.c
// Function: fnv08
uint64_t
fnv08(char const *buf, int len)
{
    uint64_t hash = 0xCBF29CE484222325ULL;

    for (; --len >= 0; ++buf)
	hash = (hash ^ *(uint8_t const*)buf) * 0x00000100000001B3ULL;

    hash ^= hash >> 33;
    hash *= 0xFF51AFD7ED558CCDULL;
    hash ^= hash >> 33;
    hash *= 0xC4CEB9FE1A85EC53ULL;
    hash ^= hash >> 33;

    return hash;
}

// Assembly:
movabsq $-0x340d631b7bdddcdb, %rax # imm = 0xCBF29CE484222325
movabsq $0x100000001b3, %rcx    # imm = 0x100000001B3
testl %esi, %esi
jle 0x3d63
decl %esi
movzbl (%rdi), %edx
xorq %rdx, %rax
imulq %rcx, %rax
incq %rdi
jmp 0x3d4e
movq %rax, %rcx
shrq $0x21, %rcx
xorq %rax, %rcx
movabsq $-0xae502812aa7333, %rax # imm = 0xFF51AFD7ED558CCD
imulq %rcx, %rax
movq %rax, %rcx
shrq $0x21, %rcx
xorq %rax, %rcx
movabsq $-0x3b314601e57a13ad, %rdx # imm = 0xC4CEB9FE1A85EC53
imulq %rcx, %rdx
movq %rdx, %rax
shrq $0x21, %rax
xorq %rdx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/fnvhash.c
// Function: fnv16
void
fnv16(char const *buf, int len, char out[16])
{
    XMM	hash = (__v2di) { 0x07BB01426C62272EULL, 0x6295C58D62B82175ULL };

    while (--len >= 0) {
        unsigned x = *buf++;
	//hash = _mm_xor_si128(hash, _mm_set_epi32(0, 0, 0, 255 & *buf++));
	hash = _mm_xor_si128(hash, _mm_set_epi32(x * 2, x * 3, x * 7, x * 11));
	/* This emulates 128bit mul of the FNV128 coefficient using shift/add/sub:
	 *	h := (h << 88) + (h << 8) + (h << 6) - (h << 2) - h
	 * "{add,sub}_epi64" each lose a carry bit (from [63] to [64]).
	 */
	hash =	_mm_sub_epi64(
		    _mm_sub_epi64(
			_mm_add_epi64(
			    _mm_add_epi64(xm_shl_013(hash),
                                          xm_shl_010(hash)),
			    xm_shl_006(hash)),
			xm_shl_002(hash)),
		    hash);
    }

    //XXX: add final mix-in!

    _mm_storeu_si128((XMM*)out, hash);
}

// Assembly:
movdqa 0x338a(%rip), %xmm0     # 0x7130
testl %esi, %esi
jle 0x3e50
decl %esi
movsbl (%rdi), %eax
incq %rdi
leal (%rax,%rax), %ecx
leal (%rax,%rax,2), %r8d
imull $0x7, %eax, %r9d
imull $0xb, %eax, %eax
movd %r9d, %xmm1
movd %eax, %xmm2
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movd %r8d, %xmm1
movd %ecx, %xmm3
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
punpcklqdq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0]
pxor %xmm2, %xmm0
movdqa %xmm0, %xmm1
pslldq $0x1, %xmm1             # xmm1 = zero,xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
movdqa %xmm1, %xmm2
psllq $0x3, %xmm2
movdqa %xmm0, %xmm3
pslldq $0x9, %xmm3             # xmm3 = zero,zero,zero,zero,zero,zero,zero,zero,zero,xmm3[0,1,2,3,4,5,6]
psrlq $0x3f, %xmm3
movdqa %xmm0, %xmm4
pslldq $0x8, %xmm4             # xmm4 = zero,zero,zero,zero,zero,zero,zero,zero,xmm4[0,1,2,3,4,5,6,7]
movdqa %xmm0, %xmm5
psllq $0x6, %xmm5
movdqa %xmm4, %xmm6
psrlq $0x3a, %xmm6
por %xmm5, %xmm6
psubq %xmm0, %xmm1
psllq $0x2, %xmm0
psrlq $0x3e, %xmm4
por %xmm0, %xmm4
paddq %xmm3, %xmm1
paddq %xmm2, %xmm1
paddq %xmm6, %xmm1
psubq %xmm4, %xmm1
movdqa %xmm1, %xmm0
jmp 0x3da6
movdqu %xmm0, (%rdx)
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: map_create
MAP
map_create(map_diff *diff, map_hash *hash, void *context)
{
    MAP    mp = calloc(1, sizeof(*mp));

    *mp = (struct map) {
		diff, hash, context, 0, MINMASK, -1,
		calloc(MINMASK + 1, sizeof(KEYVAL))
	    };

    return mp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x3180
movq %rax, %r12
pushq $0x8
popq %rdi
pushq $0x10
popq %rsi
callq 0x3180
movq %r15, (%r12)
movq %r14, 0x8(%r12)
movq %rbx, 0x10(%r12)
movabsq $-0xfffffff9, %rcx      # imm = 0xFFFFFFFF00000007
movq %rcx, 0x1c(%r12)
movq %rax, 0x28(%r12)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: map_del
void *
map_del(MAP mp, MKEY key)
{
    int         pos = _find(mp, key), alpha = pos, hole = pos;
    void        *oldval = mp->vdata[pos].val;

    if (!mp->vdata[pos].key)
        return NULL;

    --mp->count;
    if (mp->last > pos)
	mp->last = pos;    //TODO

    do alpha = (alpha - 1) & mp->mask;
    while (mp->vdata[alpha].key);

    while (mp->vdata[pos = (pos + 1) & mp->mask].key) {
        int     want = FNHASH(mp, mp->vdata[pos].key);
        if ((unsigned)(want - alpha) <= (unsigned)(hole - alpha)) {
            mp->vdata[hole] = mp->vdata[pos];
            hole = pos;
        }
    }
    mp->vdata[hole] = (KEYVAL){NULL, NULL};

    return oldval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3f87
movl %eax, %ebp
movq 0x28(%rbx), %rax
movslq %ebp, %rcx
shlq $0x4, %rcx
cmpq $0x0, (%rax,%rcx)
je 0x3f76
movq 0x8(%rax,%rcx), %rcx
movq %rcx, (%rsp)
decl 0x18(%rbx)
cmpl %ebp, 0x20(%rbx)
jle 0x3ef6
movl %ebp, 0x20(%rbx)
movl 0x1c(%rbx), %ecx
movl %ebp, %r15d
decl %r15d
andl %ecx, %r15d
movslq %r15d, %rdx
shlq $0x4, %rdx
cmpq $0x0, (%rax,%rdx)
jne 0x3efc
movl %ebp, %r12d
incl %r12d
andl %ecx, %r12d
movslq %r12d, %r14
shlq $0x4, %r14
movq (%rax,%r14), %rdi
movslq %ebp, %r13
testq %rdi, %rdi
je 0x3f64
movq 0x10(%rbx), %rsi
xorl %eax, %eax
callq *0x8(%rbx)
movl 0x1c(%rbx), %ecx
andl %ecx, %eax
subl %r15d, %eax
movl %ebp, %edx
subl %r15d, %edx
cmpl %edx, %eax
ja 0x3f5e
movq 0x28(%rbx), %rax
shlq $0x4, %r13
movups (%rax,%r14), %xmm0
movups %xmm0, (%rax,%r13)
movl 0x1c(%rbx), %ecx
movl %r12d, %ebp
movq 0x28(%rbx), %rax
jmp 0x3f13
shlq $0x4, %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%r13)
movq (%rsp), %rax
jmp 0x3f78
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: find
static int
_find(MAP const mp, MKEY key)
{
    int     pos = FNHASH(mp, key);

    while (mp->vdata[pos].key &&
           mp->fndiff(mp->vdata[pos].key, key, mp->context))
        pos = (pos + 1) & mp->mask;

    return pos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq *0x8(%r14)
movq %rax, %r15
andl 0x1c(%r14), %r15d
movq 0x28(%r14), %rax
movslq %r15d, %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rdi
testq %rdi, %rdi
je 0x3fcf
movq 0x10(%r14), %rdx
movq %rbx, %rsi
xorl %eax, %eax
callq *(%r14)
testl %eax, %eax
je 0x3fcf
incl %r15d
jmp 0x3fa2
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: map_next
int
map_next(MAP mp, void const**pkey, void **pval)
{
    do if (++mp->last > mp->mask) return 0;
    while (!mp->vdata[mp->last].key);

    *pkey = mp->vdata[mp->last].key;
    *pval = mp->vdata[mp->last].val;
    return 1;
}

// Assembly:
movslq 0x1c(%rdi), %r8
movslq 0x20(%rdi), %rax
movq %rax, %rcx
shlq $0x4, %rcx
cmpq %r8, %rax
jge 0x4060
movq 0x28(%rdi), %r9
movq 0x10(%r9,%rcx), %r9
incq %rax
addq $0x10, %rcx
testq %r9, %r9
je 0x4030
movl %eax, 0x20(%rdi)
movq %r9, (%rsi)
movq 0x28(%rdi), %rax
movq 0x8(%rax,%rcx), %rax
movq %rax, (%rdx)
pushq $0x1
popq %rax
retq
incl %eax
movl %eax, 0x20(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: map_resize
void
map_resize(MAP mp, int limit)
{
    int		i, j, dups = 0, oldmask = mp->mask;
    KEYVAL      *vdata;
    const void	*kp;

    if (--limit < MINMASK) limit = MINMASK;
    if (limit < mp->count * 5/4) limit = mp->count * 5/4;
    while (mp->mask > limit) mp->mask >>= 1;
    while (mp->mask < limit) mp->mask = (mp->mask << 1) | 1;
    vdata = calloc(mp->mask + 1, sizeof(KEYVAL));

        // PASS 1: insert where there are no collisions,
    for (i = 0; i <= oldmask; ++i) {

        if ((kp = mp->vdata[i].key)) {
            if (vdata[j = FNHASH(mp, kp)].key) {
                mp->vdata[dups++] = mp->vdata[i];
            } else {
                vdata[j] = mp->vdata[i];
            }
        }
    }

        // PASS 2: insert the rest
    for (i = 0; i < dups; ++i) {
        kp = mp->vdata[i].key;
        j = FNHASH(mp, kp);
        do j = (j + 1) & mp->mask; while (vdata[j].key);
        vdata[j] = mp->vdata[i];
    }

    free(mp->vdata);
    mp->vdata = vdata;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x1c(%rdi), %ecx
cmpl $0x9, %esi
pushq $0x8
popq %rdi
cmovgel %esi, %edi
movslq %ecx, %r12
leal -0x1(%rdi), %esi
imull $0x5, 0x18(%rbx), %eax
pushq $0x4
popq %r8
cltd
idivl %r8d
cmpl %eax, %edi
cmovlel %eax, %esi
cmpl %esi, %ecx
jle 0x40ae
sarl %ecx
movl %ecx, 0x1c(%rbx)
jmp 0x4099
leal 0x1(,%rcx,2), %ecx
movl %ecx, 0x1c(%rbx)
cmpl %esi, %ecx
jl 0x40a4
incl %ecx
movslq %ecx, %rdi
pushq $0x10
popq %rsi
callq 0x3180
movq %rax, %r14
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r15d, %r15d
cmpq %r12, %rbp
jg 0x4123
movq 0x28(%rbx), %rax
movq (%rax,%r13), %rdi
testq %rdi, %rdi
je 0x411a
movq 0x10(%rbx), %rsi
xorl %eax, %eax
callq *0x8(%rbx)
andl 0x1c(%rbx), %eax
cltq
shlq $0x4, %rax
leaq (%r14,%rax), %rcx
movq 0x28(%rbx), %rdx
movslq %r15d, %rsi
shlq $0x4, %rsi
addq %rdx, %rsi
xorl %edi, %edi
cmpq $0x0, (%r14,%rax)
cmoveq %rcx, %rsi
setne %dil
addl %edi, %r15d
movups (%rdx,%r13), %xmm0
movups %xmm0, (%rsi)
incq %rbp
addq $0x10, %r13
jmp 0x40ca
xorl %eax, %eax
testl %r15d, %r15d
cmovlel %eax, %r15d
xorl %r12d, %r12d
movq 0x28(%rbx), %rdi
cmpq %r15, %r12
je 0x4177
movq %r12, %r13
shlq $0x4, %r13
movq (%rdi,%r13), %rdi
movq 0x10(%rbx), %rsi
xorl %eax, %eax
callq *0x8(%rbx)
movl 0x1c(%rbx), %ecx
andl %ecx, %eax
incl %eax
andl %ecx, %eax
movslq %eax, %rdx
shlq $0x4, %rdx
cmpq $0x0, (%r14,%rdx)
jne 0x4151
addq %r14, %rdx
movq 0x28(%rbx), %rax
movups (%rax,%r13), %xmm0
movups %xmm0, (%rdx)
incq %r12
jmp 0x412f
callq 0x3300
movq %r14, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: map_set
void *
map_set(MAP mp, MKEY key, void *val)
{
    int         pos     = _find(mp, key);
    void        *oldval = mp->vdata[pos].val;

    if (!mp->vdata[pos].key) {    // new entry
        if (IS_FULL(mp)) {
            map_resize(mp, (mp->mask + 1) << 1);
            pos = FNHASH(mp, key);
            while (mp->vdata[pos].key)
                pos = (pos + 1) & mp->mask;
        }

        mp->vdata[pos].key = key;
        ++mp->count;
    }

    mp->vdata[pos].val = val;
    return oldval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
callq 0x3f87
movq 0x28(%r15), %rcx
movslq %eax, %rsi
movq %rsi, %rax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %r14
cmpq $0x0, (%rcx,%rax)
jne 0x422a
movl 0x18(%r15), %edi
movl 0x1c(%r15), %r8d
leal (%rdi,%rdi,4), %eax
pushq $0x4
popq %r9
cltd
idivl %r9d
cmpl %r8d, %eax
jl 0x4219
leal 0x2(,%r8,2), %esi
movq %r15, %rdi
callq 0x4068
movq 0x10(%r15), %rsi
movq %r12, %rdi
xorl %eax, %eax
callq *0x8(%r15)
movl 0x1c(%r15), %edx
andl %edx, %eax
movq 0x28(%r15), %rcx
movslq %eax, %rsi
movq %rsi, %rdi
shlq $0x4, %rdi
cmpq $0x0, (%rcx,%rdi)
je 0x4215
incl %eax
andl %edx, %eax
jmp 0x41fe
movl 0x18(%r15), %edi
movq %rsi, %rax
shlq $0x4, %rax
movq %r12, (%rcx,%rax)
incl %edi
movl %edi, 0x18(%r15)
shlq $0x4, %rsi
movq %rbx, 0x8(%rcx,%rsi)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: kvs_del
void
kvs_del(KVS sh, const char *key)
{
    char    *ownkey = (char*)(intptr_t)map_key(sh, key);
    if (ownkey) {
        free(map_del(/*(MAP)*/sh, ownkey));
        free(ownkey);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x400b
testq %rax, %rax
je 0x427d
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3eb7
movq %rax, %rdi
callq 0x3300
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3300
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: kvs_destroy
void
kvs_destroy(KVS sh)
{
    char        *key, *val;

    kvs_start(sh);
    while (kvs_next(sh, &key, &val))
	free(key), free(val);

    map_destroy(sh);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
orl $-0x1, 0x20(%rdi)
leaq 0x8(%rsp), %r14
movq %rsp, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4021
testl %eax, %eax
je 0x42c4
movq 0x8(%rsp), %rdi
callq 0x3300
movq (%rsp), %rdi
callq 0x3300
jmp 0x429d
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x3fd8
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: kvs_load
KVS
kvs_load(char const *file, char sep)
{
    MEMBUF  data = chomp(slurp(file));
    if (nilbuf(data))
        return NULL;

    int     nstrs, i;
    MEMREF  *strv = refsplit(data.ptr, '\n', &nstrs);
    KVS     kvs = kvs_create();
    kvs_resize(kvs, nstrs);

    for (i = 0; i < nstrs; ++i) {
        char *cp = (char*)(intptr_t)strchr(strv[i].ptr, sep);
        if (cp)  {
            *cp++ = 0;
            kvs_set(kvs, strv[i].ptr, cp);
        }
    }

    free(strv);
    buffree(data);
    return  kvs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
callq 0x5198
movq %rax, %rdi
movq %rdx, %rsi
callq 0x4b43
testq %rax, %rax
je 0x438c
movq %rax, %rbx
pushq $0xa
popq %rsi
leaq 0x4(%rsp), %r12
movq %rax, %rdi
movq %r12, %rdx
callq 0x509c
movq %rax, %r15
movq 0x5cc5(%rip), %rdi      # 0x9fe0
leaq 0x135(%rip), %rsi       # 0x4457
xorl %r13d, %r13d
xorl %edx, %edx
callq 0x3e58
movq %rax, %r14
movl (%r12), %esi
movq %rax, %rdi
callq 0x4068
movsbl %bpl, %ebp
movq %r15, %r12
movslq 0x4(%rsp), %rax
cmpq %rax, %r13
jge 0x437a
movq (%r12), %rdi
movl %ebp, %esi
callq 0x30f0
testq %rax, %rax
je 0x4371
movq %rax, %rdx
incq %rdx
movb $0x0, (%rax)
movq (%r12), %rsi
movq %r14, %rdi
callq 0x43a1
incq %r13
addq $0x10, %r12
jmp 0x4342
movq %r15, %rdi
callq 0x3300
movq %rbx, %rdi
callq 0x3300
jmp 0x438f
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ctSkennerton[P]fxtract/util/map.c
// Function: kvs_set
void
kvs_set(KVS sh, const char *key, const char *val)
{
    int         pos = _find(sh, key);

    if (sh->vdata[pos].key) {
        free(sh->vdata[pos].val);
        sh->vdata[pos].val = strdup(val);
    } else if (!IS_FULL(sh)) {
        sh->vdata[pos] = (KEYVAL){strdup(key), strdup(val)};
        ++sh->count;
    } else {    // redundantly calls FNHASH:
        map_set(sh, strdup(key), strdup(val));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3f87
movq 0x28(%rbx), %rcx
movslq %eax, %r13
shlq $0x4, %r13
leaq (%rcx,%r13), %r12
cmpq $0x0, (%rcx,%r13)
je 0x43ed
movq 0x8(%r12), %rdi
callq 0x3300
movq %r14, %rdi
callq 0x3420
movq 0x28(%rbx), %rcx
movq %rax, 0x8(%rcx,%r13)
jmp 0x442c
movl 0x18(%rbx), %r13d
leal (%r13,%r13,4), %eax
pushq $0x4
popq %rcx
cltd
idivl %ecx
movl %eax, 0x4(%rsp)
movl 0x1c(%rbx), %ebp
movq %r15, %rdi
callq 0x3420
movq %rax, %r15
movq %r14, %rdi
callq 0x3420
cmpl %ebp, 0x4(%rsp)
jge 0x443b
movq %r15, (%r12)
movq %rax, 0x8(%r12)
incl %r13d
movl %r13d, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x418f
// File: /workspace/github_cpp_makefile_star2_O2/monikakushwaha28[P]Fiduccia_Matthesys-using-c-/Fiduccia_Mattheyses_v1.0.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, char)
vector<string> split(string str, char delimiter) {
	vector<string> internal;
	stringstream ss(str); // Turn the string into a stream.
	string tok;

	while (getline(ss, tok, delimiter)) {
		internal.push_back(tok);
	}
	return internal;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edx, %r14d
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq -0x1c8(%rbp), %rdi
pushq $0x18
popq %rdx
callq 0x2280
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movsbl %r14b, %r14d
leaq -0x1c8(%rbp), %r15
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r14d, %edx
callq 0x22f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x28b6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4f64
jmp 0x288d
leaq -0x40(%rbp), %rdi
callq 0x2318
leaq -0x1c8(%rbp), %rdi
callq 0x2170
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x28fb
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x2318
leaq -0x1c8(%rbp), %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x4f10
movq %r14, %rdi
callq 0x22e0
// File: /workspace/github_cpp_makefile_star2_O2/monikakushwaha28[P]Fiduccia_Matthesys-using-c-/Fiduccia_Mattheyses_v1.0.cpp
// Function: delete_base_and_empty_keys()
void delete_base_and_empty_keys()
{
	//Deleting empty keys:
	if (!gain_bucket.empty())
	{
		while (gain_bucket[gain_bucket.begin()->first].empty())
		{
			gain_bucket.erase(gain_bucket.begin()->first);
		}
	}

	//removing fixed elements from gain bucket
	if (found_baseC1 || found_baseCn1)
	{
		if (!gain_bucket.empty())
		{
			if (gain_bucket[node_map[base_cell][3]].size() == 1)
			{
				gain_bucket.erase(node_map[base_cell][3]);
				if (!gain_bucket.empty())
				{

					while (gain_bucket[gain_bucket.rbegin()->first].empty())
					{
						gain_bucket.erase(gain_bucket.rbegin()->first);
					}
				}
			}
			else
			{
				gain_bucket[node_map[base_cell][3]].erase(remove(gain_bucket[node_map[base_cell][3]].begin(), gain_bucket[node_map[base_cell][3]].end(), base_cell), gain_bucket[node_map[base_cell][3]].end());
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x71bf(%rip)      # 0xac60
je 0x3adb
leaq 0x718e(%rip), %rbx      # 0xac38
movq 0x719f(%rip), %rsi      # 0xac50
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x4fa0
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jne 0x3adb
movq 0x7183(%rip), %rsi      # 0xac50
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x6286
jmp 0x3aaa
cmpb $0x0, 0x7092(%rip)      # 0xab74
jne 0x3af1
cmpb $0x1, 0x708a(%rip)      # 0xab75
jne 0x3ba1
cmpq $0x0, 0x7167(%rip)      # 0xac60
je 0x3ba1
leaq 0x70a2(%rip), %rbx      # 0xaba8
leaq 0x7017(%rip), %r14      # 0xab24
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4fa0
movq (%rax), %rsi
addq $0xc, %rsi
leaq 0x7112(%rip), %rdi      # 0xac38
callq 0x4fa0
movq 0x8(%rax), %r15
subq (%rax), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4fa0
movq (%rax), %rsi
addq $0xc, %rsi
cmpq $0x4, %r15
jne 0x3bb0
leaq 0x70e7(%rip), %rdi      # 0xac38
callq 0x6286
cmpq $0x0, 0x7102(%rip)      # 0xac60
je 0x3ba1
leaq 0x70d9(%rip), %rbx      # 0xac40
leaq 0x70ca(%rip), %r14      # 0xac38
movq %rbx, %rdi
callq 0x21e0
leaq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x4fa0
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jne 0x3ba1
movq %rbx, %rdi
callq 0x21e0
leaq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x6286
jmp 0x3b6e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7081(%rip), %r14      # 0xac38
movq %r14, %rdi
callq 0x4fa0
movq %rax, %rbx
leaq 0x6fdf(%rip), %r15      # 0xaba8
leaq 0x6f54(%rip), %r12      # 0xab24
movq %r15, %rdi
movq %r12, %rsi
callq 0x4fa0
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x4fa0
movq (%rax), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x4fa0
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x4fa0
movq 0x8(%rax), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x615f
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x4fa0
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x4fa0
movq 0x8(%rax), %rdx
movq %rbx, %rdi
movq %r13, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5118