LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/sample.hpp
// Function: weighed_sample(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
inline int weighed_sample(const ivec& v, const ivec& weights, rng_t& rng) {
    if(weights.size() != v.size()) {
        fprintf(stderr, "weighed_sample: container and weights have different sizes\n");
    }
    if(weights.empty()) {
        fprintf(stderr, "weighed_sample: nothing_to_sample\n");
    }
    ivec cum_weights(1, 0);
    cum_weights.reserve(v.size()+1);
    for(auto weight: weights) {
        cum_weights.push_back(weight + cum_weights.back());
    }

    int i = iunidist(0, cum_weights.back() - 1, rng);
    int j = std::upper_bound(cum_weights.begin(), cum_weights.end(), i) - cum_weights.begin() - 1;
    return v[j];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rax
subq (%rsi), %rax
movq 0x8(%rdi), %rcx
subq (%rdi), %rcx
cmpq %rcx, %rax
jne 0x5b2c
movq (%r15), %rax
cmpq 0x8(%r15), %rax
je 0x5b36
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movl $0x4, %edi
callq 0x2170
movq %rax, (%r12)
movq %rax, 0x8(%r12)
leaq 0x4(%rax), %rcx
movq %rcx, 0x10(%r12)
movl $0x0, (%rax)
movq %rcx, 0x8(%r12)
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x2, %rsi
incq %rsi
movq %r12, %rdi
callq 0x58be
movq (%r15), %r13
movq 0x8(%r15), %rbp
cmpq %rbp, %r13
je 0x5a8b
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movl (%r13), %eax
movq 0x8(%rsp), %rsi
addl -0x4(%rsi), %eax
movl %eax, 0x20(%rsp)
cmpq 0x10(%rsp), %rsi
je 0x5a77
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rsp)
jmp 0x5a82
movq %r15, %rdi
movq %r12, %rdx
callq 0x3f50
addq $0x4, %r13
cmpq %rbp, %r13
jne 0x5a53
movq 0x8(%rsp), %rax
movl -0x4(%rax), %eax
decl %eax
leaq 0x20(%rsp), %rdi
movl $0x0, (%rdi)
movl %eax, 0x4(%rdi)
movq %r14, %rsi
movq %rdi, %rdx
callq 0x5b5e
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
subq %rdi, %rdx
sarq $0x2, %rdx
movq %rdi, %rcx
testq %rdx, %rdx
jle 0x5af3
movq %rdi, %rcx
movq %rdx, %rsi
shrq %rsi
movq %rsi, %r8
notq %r8
addq %rdx, %r8
leaq (%rcx,%rsi,4), %rdx
addq $0x4, %rdx
cmpl -0x4(%rdx), %eax
cmovgeq %rdx, %rcx
cmovlq %rsi, %r8
movq %r8, %rdx
testq %r8, %r8
jg 0x5ac9
subq %rdi, %rcx
shlq $0x1e, %rcx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rcx, %rax
movq (%rbx), %rcx
sarq $0x1e, %rax
movl (%rcx,%rax), %ebx
testq %rdi, %rdi
je 0x5b1b
callq 0x2150
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x239a
jmp 0x59e1
callq 0x23b6
jmp 0x59ee
jmp 0x5b44
jmp 0x5b44
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x5b55
callq 0x2150
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/graph_gen.cpp
// Function: make_cycle_graph(int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&)
void make_cycle_graph(int n, ipvec& l) {
    // iipair st_graph[] = {{0, 1}, {1, 2}, {2, 3}, {3, 0}, {3, 4}, {0, 5}};
    l.emplace_back(n-1, 0);
    for(int i=1; i<n; ++i) {
        l.emplace_back(i-1, i);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leal -0x1(%r14), %eax
movq %rsp, %r15
movl %eax, (%r15)
leaq 0x4(%rsp), %rdx
movl $0x0, (%rdx)
movq %rsi, %rdi
movq %r15, %rsi
callq 0x67de
movl $0x1, (%r15)
cmpl $0x2, %r14d
jl 0x6205
xorl %eax, %eax
leaq 0x4(%rsp), %r15
movq %rsp, %r12
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6804
movl (%rsp), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rsp)
cmpl %r14d, %ecx
jl 0x61e5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/dsu.hpp
// Function: DisjointSets::find(int)
int find(int x) {
        if(parent[x] == x) {
            return x;
        }
        else {
            int p = find(parent[x]);
            parent[x] = p;
            return p;
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movslq %esi, %r14
movq 0x20(%rdi), %rcx
movl (%rcx,%r14,4), %esi
cmpl %r14d, %esi
je 0x6bae
movq %rdi, %rbx
callq 0x6b88
movq 0x20(%rbx), %rcx
movl %eax, (%rcx,%r14,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/dsu.hpp
// Function: DisjointSets::unite(int, int)
void unite(int x, int y) {
        x = find(x);
        y = find(y);
        if(subsize[x] > subsize[y]) {
            std::swap(x, y);
        }
        parent[x] = y;
        subsize[y] += subsize[x];
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
callq 0x6b88
movl %eax, %ebp
movq %r14, %rdi
movl %ebx, %esi
callq 0x6b88
movslq %ebp, %rcx
movq 0x8(%r14), %rdx
movl (%rdx,%rcx,4), %esi
cltq
cmpl (%rdx,%rax,4), %esi
movl %ecx, %esi
cmovgl %eax, %esi
cmovgl %ecx, %eax
movq 0x20(%r14), %rcx
movslq %esi, %rsi
movl %eax, (%rcx,%rsi,4)
movl (%rdx,%rsi,4), %ecx
cltq
addl %ecx, (%rdx,%rax,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/dsu.hpp
// Function: DisjointSets::init(int)
void init(int _n) {
        n = _n;
        subsize.resize(n);
        parent.resize(n);
        for(int i=0; i<n; ++i) {
            parent[i] = i;
            subsize[i] = 1;
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
leaq 0x8(%rdi), %r14
movslq %esi, %rsi
movq %r14, %rdi
callq 0x6c72
leaq 0x20(%rbx), %r15
movslq (%rbx), %rsi
movq %r15, %rdi
callq 0x6c72
cmpl $0x0, (%rbx)
jle 0x6c6c
movq (%r15), %rax
movq (%r14), %rcx
xorl %edx, %edx
movl %edx, (%rax,%rdx,4)
movl $0x1, (%rcx,%rdx,4)
incq %rdx
movslq (%rbx), %rsi
cmpq %rsi, %rdx
jl 0x6c57
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/attack.cpp
// Function: normalize_edge_weights(int&, int&)
void normalize_edge_weights(int& in_weight, int& side_weight) {
    if(in_weight < 0) {
        fprintf(stderr, "in_weight = %d\n", in_weight);
    }
    if(side_weight < 0) {
        fprintf(stderr, "side_weight = %d\n", side_weight);
    }
    if(in_weight == 0) {
        if(side_weight == 0) {
            in_weight = side_weight = 1;
        }
        else {
            in_weight = 1;
            side_weight = -1;
        }
    }
    else if(side_weight == 0) {
        side_weight = 1;
        in_weight = -1;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %edx
testl %edx, %edx
js 0x7aab
movl (%r14), %edx
testl %edx, %edx
js 0x7ac5
cmpl $0x0, (%rbx)
movl (%r14), %eax
je 0x7a86
testl %eax, %eax
jne 0x7aa3
movl $0x1, (%r14)
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
jmp 0x7aa3
testl %eax, %eax
je 0x7a99
movl $0x1, (%rbx)
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
jmp 0x7aa3
movl $0x1, %eax
movl %eax, (%r14)
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xa51e(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
leaq 0x5b84(%rip), %rsi      # 0xd640
xorl %eax, %eax
callq 0x21b0
jmp 0x7a64
movq 0xa504(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
leaq 0x5b7a(%rip), %rsi      # 0xd650
xorl %eax, %eax
callq 0x21b0
jmp 0x7a6b
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: place_victims_randomly(Network const&, int, std::vector<int, std::allocator<int>>&, int)
void place_victims_randomly(const Network& network, int n, ivec& victims, int seed) {
    victims.reserve(network.depthwise.back().size());
    for(int u: network.depthwise.back()) {
        if(network.netsize[u] == 0) {
            victims.push_back(u);
        }
    }
    n = std::min<int>(n, victims.size());
    std::shuffle(victims.begin(), victims.end(), rng_t(seed));
    victims.resize(n);
    victims.shrink_to_fit();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0x8(%rsp)
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movq 0xb0(%rdi), %rax
movq -0x10(%rax), %rsi
subq -0x18(%rax), %rsi
sarq $0x2, %rsi
movq %rdx, %rdi
callq 0x58be
movq 0xb0(%r15), %rax
movq -0x18(%rax), %r13
movq -0x10(%rax), %r14
cmpq %r14, %r13
je 0x8f02
leaq 0xc(%rsp), %r12
movslq (%r13), %rax
movl %eax, 0xc(%rsp)
movq 0x18(%r15), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x8ef9
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x8eee
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x8ef9
movq %rbx, %rdi
movq %r12, %rdx
callq 0x3e1c
addq $0x4, %r13
cmpq %r14, %r13
jne 0x8ec6
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %rsi, %rax
subq %rdi, %rax
shrq $0x2, %rax
cmpl %ebp, %eax
cmovll %eax, %ebp
movslq 0x8(%rsp), %rcx
movabsq $0x200000005, %rdx      # imm = 0x200000005
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x1e, %rax
movq %rax, %rdx
shlq $0x1f, %rdx
subq %rdx, %rax
leaq (%rcx,%rax), %rdx
cmpq $0x1, %rdx
adcq %rcx, %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
callq 0xa3ab
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x6c72
movq 0x10(%rbx), %rax
cmpq 0x8(%rbx), %rax
je 0x8f7c
movq %rbx, %rdi
callq 0xabc8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: make_network_dag(Network const&, Graph&)
void make_network_dag(const Network& network, Graph& graph2) {
    Graph graph(network.size());
    for(int d=network.height(); d>=0; --d) {
        for(int v: network.depthwise[d]) {
            int u = network.nid[v];
            if(u < 0 || network.depth[u] != d) {
                if(d > 0) {
                    for(int u: network.up_nbrs[v]) {
                        graph.add_edge(u, v);
                    }
                }
            }
            else {
                graph.add_edge(u, v);
            }
        }
    }
    graph2.swap(graph);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq 0x20(%rdi), %rsi
subq 0x18(%rdi), %rsi
shrq $0x2, %rsi
leaq 0x20(%rsp), %rdi
callq 0xa51e
movq 0xb0(%r14), %rax
subq 0xa8(%r14), %rax
shrq $0x3, %rax
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
decl %eax
js 0x9078
movl %eax, %edx
leaq 0x20(%rsp), %r15
movq 0xa8(%r14), %rax
leaq (%rdx,%rdx,2), %rcx
movq (%rax,%rcx,8), %rbp
movq 0x8(%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
cmpq %rax, %rbp
je 0x9068
movq %rdx, 0x10(%rsp)
movslq (%rbp), %r12
movq (%r14), %rax
movslq (%rax,%r12,4), %rsi
testq %rsi, %rsi
js 0x902a
movq 0x30(%r14), %rax
movl (%rax,%rsi,4), %eax
cmpq %rax, %rdx
jne 0x902a
movq %r15, %rdi
movl %r12d, %edx
callq 0xa574
jmp 0x9058
testq %rdx, %rdx
je 0x9058
movq 0x78(%r14), %rax
leaq (%r12,%r12,2), %rcx
movq (%rax,%rcx,8), %rbx
movq 0x8(%rax,%rcx,8), %r13
cmpq %r13, %rbx
je 0x9058
movl (%rbx), %esi
movq %r15, %rdi
movl %r12d, %edx
callq 0xa574
addq $0x4, %rbx
jmp 0x9040
addq $0x4, %rbp
cmpq 0x18(%rsp), %rbp
movq 0x10(%rsp), %rdx
jne 0x9001
leaq -0x1(%rdx), %rax
testq %rdx, %rdx
movq %rax, %rdx
jg 0x8fde
movq 0x8(%rsp), %rdx
movl (%rdx), %eax
leaq 0x28(%rsp), %r14
movl -0x8(%r14), %ecx
movl %ecx, (%rdx)
movl %eax, -0x8(%r14)
movups (%r14), %xmm0
movups 0x8(%rdx), %xmm1
movups %xmm0, 0x8(%rdx)
movups %xmm1, (%r14)
leaq 0x40(%rsp), %rdi
movups -0x8(%rdi), %xmm0
movups 0x8(%rdi), %xmm1
movups 0x18(%rdx), %xmm2
movups %xmm0, 0x18(%rdx)
movups %xmm2, -0x8(%rdi)
movups 0x28(%rdx), %xmm0
movups %xmm1, 0x28(%rdx)
movups %xmm0, 0x8(%rdi)
callq 0xa9ba
movq %r14, %rdi
callq 0xa9ba
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x90e1
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xa9ba
leaq 0x28(%rsp), %rdi
callq 0xa9ba
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: noisy_normalize(std::vector<double, std::allocator<double>>&, int, double, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
void noisy_normalize(vector<double>& weights, int x, double max_noise, rng_t& rng) {
    std::uniform_real_distribution<double> noise_dist(-max_noise, max_noise);
    double weight_sum = std::accumulate(weights.begin(), weights.end(), 0.0);
    for(double& w: weights) {
        w = w / weight_sum + noise_dist(rng);
    }
    weight_sum = std::accumulate(weights.begin(), weights.end(), 0.0);
    for(double& w: weights) {
        w = (w * x) / weight_sum;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movapd %xmm0, %xmm1
movl %esi, %ebx
movq %rdi, %r15
movq (%rdi), %r12
movq 0x8(%rdi), %r13
xorpd %xmm0, %xmm0
cmpq %r13, %r12
je 0x9139
movq %r12, %rax
addsd (%rax), %xmm0
addq $0x8, %rax
cmpq %r13, %rax
jne 0x912c
cmpq %r13, %r12
je 0x91a1
movapd 0x459a(%rip), %xmm2     # 0xd6e0
xorpd %xmm1, %xmm2
movapd %xmm2, 0x10(%rsp)
addsd %xmm1, %xmm1
movapd %xmm1, 0x20(%rsp)
movsd %xmm0, (%rsp)
movsd (%r12), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %r14, %rdi
callq 0x5eb2
movapd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm0
addsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%r12)
movsd (%rsp), %xmm0
addq $0x8, %r12
cmpq %r13, %r12
jne 0x915f
movq (%r15), %rax
movq 0x8(%r15), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
je 0x91c1
movq %rax, %rdx
addsd (%rdx), %xmm0
addq $0x8, %rdx
cmpq %rcx, %rdx
jne 0x91b4
cmpq %rcx, %rax
je 0x91e6
xorps %xmm1, %xmm1
cvtsi2sd %ebx, %xmm1
movsd (%rax), %xmm2
mulsd %xmm1, %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, (%rax)
addq $0x8, %rax
cmpq %rcx, %rax
jne 0x91cd
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/lib/sample.cpp
// Function: multi_sample(std::vector<double, std::allocator<double>> const&, int, std::vector<int, std::allocator<int>>&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
void multi_sample(const vector<double>& weights, int m, ivec& indices, rng_t& rng) {
    int n = weights.size();
    indices.clear();
    if(m >= n) {
        for(int i=0; i<n; ++i) {
            indices.push_back(i);
        }
        return;
    }

    std::uniform_real_distribution<double> rdist;
    indices.reserve(m);
    SegTree segtree(weights);
    for(int i=0; i<m; ++i) {
        int index = segtree.cumsum_search(segtree.get_root() * rdist(rng));
        indices.push_back(index);
        segtree.update(index, 0.0);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movq 0x8(%rdi), %r12
subq (%rdi), %r12
shrq $0x3, %r12
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0xbd2b
movq %rax, 0x8(%rbx)
cmpl %ebp, %r12d
jle 0xbdf6
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x58be
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0xbe62
testl %ebp, %ebp
jle 0xbde5
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq 0x10(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %r14, %rdi
callq 0x5eb2
addsd 0x1743(%rip), %xmm0     # 0xd4c0
movsd 0x28(%rsp), %xmm1
mulsd %xmm0, %xmm1
movl 0x8(%rsp), %ecx
decl %ecx
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movapd %xmm1, %xmm0
callq 0xbc9e
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xbdb7
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xbdc2
movq %rbx, %rdi
movq %r12, %rdx
callq 0x3e1c
movl 0x4(%rsp), %r8d
movl 0x8(%rsp), %ecx
decl %ecx
xorpd %xmm0, %xmm0
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xbbe0
decl %ebp
jne 0xbd5e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbe3a
callq 0x2150
jmp 0xbe3a
movl $0x0, 0x8(%rsp)
testl %r12d, %r12d
jle 0xbe3a
xorl %eax, %eax
leaq 0x8(%rsp), %r14
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xbe20
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xbe2b
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3e1c
movl 0x8(%rsp), %eax
incl %eax
movl %eax, 0x8(%rsp)
cmpl %r12d, %eax
jl 0xbe0a
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbe59
callq 0x2150
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/sharmaeklavya2[P]ddos-on-anycast/src/graph_gen.cpp
// Function: main
int main(int argc, char* argv[]) {
    char args_str[] = "n m seed";
    int n, m, seed=-1;
    if(argc <= 2 || argc >= 5) {
        fprintf(stderr, "usage: %s %s\n", argv[0], args_str);
        return 2;
    }
    else {
        n = atoi(argv[1]);
        m = atoi(argv[2]);
        if(argc == 4) {
            seed = atoi(argv[3]);
        }
    }
    if(seed == -1) {
        seed = int(time(nullptr));
    }

    ipvec l;

    make_random_connected_graph(n, m, l, seed);
    for(int i=0; i<n; ++i) {
        printf("%d\n", i);
    }

    for(const iipair& p: l) {
        int u = p.first, v = p.second;
        printf("%d %d\n", u, v);
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %r15d
movabsq $0x64656573206d206e, %rax # imm = 0x64656573206D206E
movq %rax, (%rsp)
movb $0x0, 0x8(%rsp)
leal -0x5(%r15), %eax
cmpl $-0x3, %eax
jbe 0xc04a
movq 0x8(%r14), %rdi
callq 0x21e0
movl %eax, %ebx
movq 0x10(%r14), %rdi
callq 0x21e0
movl %eax, %ebp
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl $0x4, %r15d
jne 0xbfb4
movq 0x18(%r14), %rdi
callq 0x21e0
movl %eax, %ecx
cmpl $-0x1, %ecx
jne 0xbfc3
xorl %edi, %edi
callq 0x2140
movq %rax, %rcx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movl %ebx, %edi
movl %ebp, %esi
callq 0x6273
testl %ebx, %ebx
jle 0xbffe
leaq 0x16e8(%rip), %r14      # 0xd6d2
xorl %ebp, %ebp
movq %r14, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2040
incl %ebp
cmpl %ebp, %ebx
jne 0xbfec
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r15
cmpq %r15, %r14
je 0xc02e
leaq 0x1748(%rip), %rbx      # 0xd75c
movl (%r14), %esi
movl 0x4(%r14), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2040
addq $0x8, %r14
cmpq %r15, %r14
jne 0xc014
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc03d
callq 0x2150
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x5f7f(%rip), %rax      # 0x11fd0
movq (%rax), %rdi
movq (%r14), %rdx
leaq 0x16f0(%rip), %rsi      # 0xd74e
movq %rsp, %rcx
xorl %eax, %eax
callq 0x21b0
movl $0x2, %eax
jmp 0xc03f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc081
callq 0x2150
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: utils::def_chainp::operator()()
char operator() () {
			if(unget_) {
				unget_ = false;
			} else {
				if(str_ == nullptr) {
					char ch;
					if(read(STDIN_FILENO, &ch, 1) == 1) {
						if(ch == '\n') ch = 0;
						last_ = ch;
					} else {
						last_ = 0;
					}
				} else {
					last_ = *str_;
					if(last_ != 0) { ++str_; }
				}
			}
			return last_;
		}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x9(%rdi)
jne 0xdf2e
movb $0x0, 0x9(%rbx)
jmp 0xdf73
movq (%rbx), %rax
testq %rax, %rax
je 0xdf47
movb (%rax), %cl
movb %cl, 0x8(%rbx)
testb %cl, %cl
je 0xdf73
incq %rax
movq %rax, (%rbx)
jmp 0xdf73
xorl %ebp, %ebp
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
xorl %edi, %edi
callq 0x42a0
cmpq $0x1, %rax
jne 0xdf6f
movzbl 0x7(%rsp), %eax
cmpb $0xa, %al
cmovnel %eax, %ebp
movb %bpl, 0x7(%rsp)
movb %bpl, 0x8(%rbx)
movb 0x8(%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: unsigned int utils::basic_input<utils::def_chainp>::nb_dec_<unsigned int>()
T nb_dec_() noexcept
		{
			typedef typename std::make_unsigned<T>::type U;
			typedef typename std::make_signed<T>::type S;

			auto nbc = nbc_;
			auto neg = neg_();
			if(nbc > 0 && nbc_ == 0) {
				error_ = error::not_integer;
				return 0;
			}

			auto sign = std::is_signed<T>::value;
			T v = 0;
			switch(mode_) {
			case mode::BIN:
				v = bin_<U>();
				break;
			case mode::OCT:
				v = oct_<U>();
				break;
			case mode::DEC:
				if(!sign) {
					if(neg) {  // 符号無しにマイナス符号を付けた場合
						error_ = error::sign_type;
						return 0;
					}
				}
				v = dec_<T>();
				break;
			case mode::HEX:
				v = hex_<U>();
				break;
			case mode::AUTO:
				v = auto_num_<T>();
				break;
			default:
				error_ = error::not_integer;
				break;
			}
			if(error_ == error::none) {
				if(nbc == 0) {
					inp_.unget();
				}
				next_();
			}
			if(neg) {
				return -static_cast<S>(v);
			} else {
				return static_cast<S>(v);
			}
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x1a(%rdi), %r15b
callq 0xe02c
movl %eax, %ebp
testb %r15b, %r15b
je 0xe8b3
cmpb $0x0, 0x1a(%rbx)
jne 0xe8b3
movb $0x4, 0x19(%rbx)
xorl %eax, %eax
jmp 0xe939
movzbl 0x18(%rbx), %eax
addl $-0x2, %eax
cmpl $0x5, %eax
ja 0xe8d9
leaq 0x1952(%rip), %rcx      # 0x10218
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0xe062
jmp 0xe913
movb $0x4, 0x19(%rbx)
xorl %r14d, %r14d
jmp 0xe916
testb %bpl, %bpl
je 0xe90b
movb $0x5, 0x19(%rbx)
jmp 0xe8ac
movq %rbx, %rdi
callq 0xe0cc
jmp 0xe913
movq %rbx, %rdi
callq 0xe1a4
jmp 0xe913
movq %rbx, %rdi
callq 0xe9b0
jmp 0xe913
movq %rbx, %rdi
callq 0xe944
movl %eax, %r14d
cmpb $0x0, 0x19(%rbx)
jne 0xe92d
testb %r15b, %r15b
jne 0xe925
movb $0x1, 0x11(%rbx)
movq %rbx, %rdi
callq 0xdd9a
movl %r14d, %eax
negl %eax
testb %bpl, %bpl
cmovel %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: utils::basic_input<utils::def_chainp>::neg_()
bool neg_() noexcept {
			bool neg = false;
			auto s = inp_();
			if(s == '-') {
				neg = true;
				if(nbc_ > 0) nbc_--;
			} else if(s == '+') {
				neg = false;
				if(nbc_ > 0) nbc_--;
			} else {
				inp_.unget();
			}
			return neg;
		}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
callq 0xdf1c
cmpb $0x2d, %al
je 0xe041
cmpb $0x2b, %al
jne 0xe04f
movb 0x1a(%rbx), %cl
testb %cl, %cl
je 0xe053
decb %cl
movb %cl, 0x1a(%rbx)
jmp 0xe053
movb $0x1, 0x11(%rbx)
cmpb $0x2d, %al
sete %al
popq %rbx
retq
movq %rax, %rdi
callq 0x9b1f
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: unsigned short utils::basic_input<utils::def_chainp>::bin_<unsigned short>()
T bin_() noexcept {
			T a = 0;
			constexpr auto lim = static_cast<T>(1) << (sizeof(T) * 8 - 1);
			char ch;
			while((ch = inp_()) != 0) {
				if(ch >= '0' && ch <= '1') {
					if((a & lim) != 0) {
						ovf_ = true;
					}
					if(!ovf_) {
						a <<= 1;
						a += ch - '0';
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xdf1c
testb %al, %al
je 0xf1eb
movl %eax, %ecx
andb $-0x2, %cl
cmpb $0x30, %cl
jne 0xf1d0
testw %bx, %bx
jns 0xf1bc
movb $0x1, 0x1b(%r14)
cmpb $0x0, 0x1b(%r14)
jne 0xf1db
addl %ebx, %ebx
addb $-0x30, %al
movzbl %al, %eax
orl %ebx, %eax
movl %eax, %ebx
jmp 0xf1db
cmpb $0x20, %al
jne 0xf1eb
cmpb $0x0, 0x1a(%r14)
je 0xf1eb
movb 0x1a(%r14), %al
testb %al, %al
je 0xf19c
decb %al
movb %al, 0x1a(%r14)
jne 0xf19c
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x9b1f
nop
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: unsigned short utils::basic_input<utils::def_chainp>::oct_<unsigned short>()
T oct_() noexcept {
			T a = 0;
			constexpr auto lim = static_cast<T>(0b111) << (sizeof(T) * 8 - 4);
			char ch;
			while((ch = inp_()) != 0) {
				if(ch >= '0' && ch <= '7') {
					if((a & lim) != 0) {
						ovf_ = true;
					}
					if(!ovf_) {
						a <<= 3;
						a += ch - '0';
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xdf1c
testb %al, %al
je 0xf25d
movl %eax, %ecx
andb $-0x8, %cl
cmpb $0x30, %cl
jne 0xf242
testl $0x7000, %ebx           # imm = 0x7000
je 0xf22d
movb $0x1, 0x1b(%r14)
cmpb $0x0, 0x1b(%r14)
jne 0xf24d
shll $0x3, %ebx
addb $-0x30, %al
movzbl %al, %eax
orl %ebx, %eax
movl %eax, %ebx
jmp 0xf24d
cmpb $0x20, %al
jne 0xf25d
cmpb $0x0, 0x1a(%r14)
je 0xf25d
movb 0x1a(%r14), %al
testb %al, %al
je 0xf20a
decb %al
movb %al, 0x1a(%r14)
jne 0xf20a
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x9b1f
nop
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: int utils::basic_input<utils::def_chainp>::dec_<int>()
T dec_() noexcept {
			T a = 0;
			char ch;
			while((ch = inp_()) != 0) {
				if(!ovf_ && ch >= '0' && ch <= '9') {
					if constexpr (std::is_signed<T>::value) {
						a *= 10;
						a += ch - '0';
						if(a < 0) {
							ovf_ = true;
						}
					} else {
						auto b = a;
						a *= 10;
						a += ch - '0';
						if(b > a) {
							ovf_ = true;
						}
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xdf1c
testb %al, %al
je 0xe193
leal -0x3a(%rax), %ecx
cmpb $-0xa, %cl
jb 0xe178
cmpb $0x0, 0x1b(%r14)
jne 0xe178
leal (%rbx,%rbx,4), %ecx
addl %ecx, %ecx
addb $-0x30, %al
movzbl %al, %ebx
addl %ecx, %ebx
jns 0xe183
movb $0x1, 0x1b(%r14)
jmp 0xe183
cmpb $0x20, %al
jne 0xe193
cmpb $0x0, 0x1a(%r14)
je 0xe193
movb 0x1a(%r14), %al
testb %al, %al
je 0xe148
decb %al
movb %al, 0x1a(%r14)
jne 0xe148
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x9b1f
nop
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: unsigned int utils::basic_input<utils::def_chainp>::hex_<unsigned int>()
T hex_() noexcept {
			T a = 0;
			constexpr auto lim = static_cast<T>(0b1111) << (sizeof(T) * 8 - 4);
			char ch;
			while((ch = inp_()) != 0) {
				auto ovf = (a & lim) != 0;
				if(ch >= 'a') { ch -= 0x20; }
				if(ch >= '0' && ch <= '9') {
					if(ovf) { ovf_ = true; }
					if(!ovf_) {
						a <<= 4;
						a += ch - '0';
					}
				} else if(ch >= 'A' && ch <= 'F') {
					if(ovf) { ovf_ = true; }
					if(!ovf_) {
						a <<= 4;
						a += ch - 'A' + 10;
					}
				} else if(nbc_ != 0 && ch == ' ') {
					// 文字数指定がある場合「スペース」は '0' と同等に扱う
				} else {
					break;
				}
				if(nbc_ > 0) {
					nbc_--;
					if(nbc_ == 0) break;
				}
			}
			return a;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xdf1c
testb %al, %al
je 0xe24b
leal -0x20(%rax), %ecx
cmpb $0x61, %al
movzbl %al, %eax
movzbl %cl, %ecx
cmovll %eax, %ecx
movsbl %cl, %eax
leal -0x30(%rax), %edx
cmpb $0x9, %dl
ja 0xe1f9
cmpl $0x10000000, %ebx       # imm = 0x10000000
jb 0xe1e8
movb $0x1, 0x1b(%r14)
cmpb $0x0, 0x1b(%r14)
jne 0xe22d
shll $0x4, %ebx
addl %eax, %ebx
addl $-0x30, %ebx
jmp 0xe22d
leal -0x41(%rcx), %edx
cmpb $0x5, %dl
ja 0xe21f
cmpl $0x10000000, %ebx       # imm = 0x10000000
jb 0xe20e
movb $0x1, 0x1b(%r14)
cmpb $0x0, 0x1b(%r14)
jne 0xe22d
shll $0x4, %ebx
addl %eax, %ebx
addl $-0x37, %ebx
jmp 0xe22d
xorl %eax, %eax
cmpb $0x20, %cl
jne 0xe243
cmpb $0x0, 0x1a(%r14)
je 0xe243
movb 0x1a(%r14), %al
testb %al, %al
je 0xe23d
decb %al
movb %al, 0x1a(%r14)
je 0xe241
movb $0x1, %al
jmp 0xe243
xorl %eax, %eax
testb %al, %al
jne 0xe1b2
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0x9b1f
nop
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: short utils::basic_input<utils::def_chainp>::auto_num_<short>()
T auto_num_() noexcept
		{
			enum class TYPE : uint8_t {
				dec,
				bin,
				oct,
				hex,
			};

			typedef typename std::make_unsigned<T>::type U;

			char ch = inp_();
			if(ch != '0') {  // 最初に０がある場合無視
				inp_.unget();
			}
			ch = inp_();
			if(ch >= 0x60) { ch -= 0x20; }
			T v = 0;
			TYPE t(TYPE::dec);
			if(ch == 'B') {
				t = TYPE::bin;
			} else if(ch == 'X') {
				t = TYPE::hex;
			} else if(ch == 'O') {
				t = TYPE::oct;
			} else {
				inp_.unget();
			}
			switch(t) {
			case TYPE::bin:
				v = bin_<U>();
				break;
			case TYPE::oct:
				v = oct_<U>();
				break;
			case TYPE::hex:
				v = hex_<U>();
				break;
			default:
				v = dec_<T>();
				break;
			}
			return v;
		}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0xdf1c
cmpb $0x30, %al
je 0xf3b1
movb $0x1, 0x11(%rbx)
movq %r14, %rdi
callq 0xdf1c
leal -0x20(%rax), %ecx
cmpb $0x60, %al
movzbl %al, %edx
movzbl %cl, %eax
cmovll %edx, %eax
cmpb $0x42, %al
je 0xf402
movzbl %al, %eax
cmpl $0x4f, %eax
je 0xf3ed
cmpl $0x58, %eax
jne 0xf406
movb $0x3, %al
movzbl %al, %eax
leaq 0xec4(%rip), %rcx       # 0x102a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x2, %al
movzbl %al, %eax
leaq 0xeaf(%rip), %rcx       # 0x102a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, %al
jmp 0xf40c
movb $0x1, 0x11(%rbx)
xorl %eax, %eax
movzbl %al, %eax
leaq 0xe92(%rip), %rcx       # 0x102a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xf26e
movq %rbx, %rdi
callq 0xf1fc
jmp 0xf44a
movq %rbx, %rdi
callq 0xf2d8
jmp 0xf44a
movq %rbx, %rdi
callq 0xf18e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x9b1f
// File: /workspace/github_cpp_makefile_star2_O1/hirakuni45[P]input_class/./input.hpp
// Function: float utils::basic_input<utils::def_chainp>::nb_real_<float>()
T nb_real_() noexcept
		{
			bool neg = neg_();

			T v = 0.0f;
			switch(mode_) {
			case mode::REAL:
			case mode::AUTO:
				v = real_<T>();
				break;
			default:
				error_ = error::not_float;
				break;
			}
			if(error_ == error::none) {
				inp_.unget();
				next_();
			}
			if(neg) return -v;
			else return v;			
		}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0xe02c
movl %eax, %ebp
movb 0x18(%rbx), %al
andb $-0x2, %al
cmpb $0x6, %al
jne 0xe3e7
movq %rbx, %rdi
callq 0xe41c
jmp 0xe3ee
movb $0x6, 0x19(%rbx)
xorps %xmm0, %xmm0
cmpb $0x0, 0x19(%rbx)
jne 0xe408
movb $0x1, 0x11(%rbx)
movq %rbx, %rdi
movaps %xmm0, (%rsp)
callq 0xdd9a
movaps (%rsp), %xmm0
testb %bpl, %bpl
je 0xe414
xorps 0x1c4c(%rip), %xmm0     # 0x10060
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Client.cpp
// Function: initalizeMiddleware()
void initalizeMiddleware()
{
// Create socket for sending/receiving datagrams 
   if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0)
      cout << "socket() failed" << endl;

   // Construct local address structure 
   memset(&servAddr, 0, sizeof(servAddr));   // Zero out structure 
   servAddr.sin_family = AF_INET;                  // Internet address family 
   servAddr.sin_addr.s_addr = htonl(INADDR_ANY);   // Any incoming interface 
   servAddr.sin_port = htons(port);       // Local port    
   
   // If user gave a dotted decimal address, we need to resolve it  
   if (servAddr.sin_addr.s_addr == -1) {
      thehost = gethostbyname(ip);
      servAddr.sin_addr.s_addr = *((unsigned long *) thehost->h_addr_list[0]);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x2, %edi
movl $0x2, %esi
movl $0x11, %edx
callq 0x2080
movl %eax, 0x4009(%rip)      # 0x7218
testl %eax, %eax
jns 0x3255
movq 0x3db6(%rip), %rbx      # 0x6fd0
leaq 0x1f26(%rip), %rsi      # 0x5147
movl $0xf, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
xorps %xmm0, %xmm0
movups %xmm0, 0x3fbd(%rip)     # 0x721c
movw $0x2, 0x3fb4(%rip)      # 0x721c
movl $0x0, 0x3fae(%rip)      # 0x7220
movzwl 0x3fd3(%rip), %eax      # 0x724c
rolw $0x8, %ax
movw %ax, 0x3f9a(%rip)       # 0x721e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/awbrenn[P]robot-controller/Client.cpp
// Function: convertHeaderInfoToString[abi:cxx11](unsigned int)
string convertHeaderInfoToString(uint32_t header_info) 
{
    string header_info_string;
    char uint4_chunk;
    int size_of_uint32_t = 4;
    int bits_in_a_byte = 8;

    cout << "HEADER INFO:" << header_info << endl;

    for (int i = 0; i < size_of_uint32_t; ++i) {
        uint4_chunk = (char) ((header_info << (i * bits_in_a_byte)) >> (3 * bits_in_a_byte));
        cout << "step " << i << ": " << header_info << ", " << (uint32_t) uint4_chunk << endl;
        header_info_string.push_back(uint4_chunk);
    }

    return header_info_string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, -0x2c(%rbp)
leaq 0x10(%rdi), %rax
movq %rax, -0x40(%rbp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movq %rdi, -0x38(%rbp)
movb $0x0, 0x10(%rdi)
movq 0x3954(%rip), %rdi      # 0x6fd0
leaq 0x1ad4(%rip), %rsi      # 0x5157
movl $0xc, %edx
callq 0x21f0
movl -0x2c(%rbp), %esi
movq 0x3939(%rip), %rdi      # 0x6fd0
movq %rsi, -0x48(%rbp)
callq 0x2130
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
xorl %r12d, %r12d
movq 0x38fc(%rip), %r13      # 0x6fd0
xorl %r14d, %r14d
movl -0x2c(%rbp), %r15d
movl %r12d, %ecx
shll %cl, %r15d
movl $0x5, %edx
movq %r13, %rdi
leaq 0x1a74(%rip), %rsi      # 0x5164
callq 0x21f0
movq %r13, %rdi
movl %r14d, %esi
callq 0x22d0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1ab2(%rip), %rsi      # 0x51c4
callq 0x21f0
movq %rbx, %rdi
movq -0x48(%rbp), %rsi
callq 0x2130
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
leaq 0x1a35(%rip), %rsi      # 0x516a
callq 0x21f0
movl %r15d, %esi
sarl $0x18, %esi
movq %rbx, %rdi
callq 0x2130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
shrl $0x18, %r15d
movsbl %r15b, %esi
movq -0x38(%rbp), %rdi
callq 0x2190
incl %r14d
addl $0x8, %r12d
cmpl $0x4, %r14d
jne 0x36d7
movq -0x38(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37a9
movq %rax, %r14
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x37c7
movq (%rax), %rsi
incq %rsi
callq 0x21e0
movq %r14, %rdi
callq 0x22f0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: GLUTSpecial(int, int, int)
static void
GLUTSpecial(int key, int x, int y)
{
  // Invert y coordinate
  y = GLUTwindow_height - y;

  // Process keyboard button event 
  switch (key) {
  case GLUT_KEY_DOWN:
    grid_thresholds[selected_model_index] -= 0.025 * grid_ranges[selected_model_index].Diameter();
    if (grid_thresholds[selected_model_index] < grid_ranges[selected_model_index].Min() + 1E-20) 
      grid_thresholds[selected_model_index] = grid_ranges[selected_model_index].Min() + 1E-20;
    break;

  case GLUT_KEY_UP:
    grid_thresholds[selected_model_index] += 0.025 * grid_ranges[selected_model_index].Diameter();
    if (grid_thresholds[selected_model_index] > grid_ranges[selected_model_index].Max() - 1E-20)
      grid_thresholds[selected_model_index] = grid_ranges[selected_model_index].Max() - 1E-20;
    break;
      
  case GLUT_KEY_PAGE_UP:
    if (++selected_model_index > nmodels-1) selected_model_index = nmodels - 1;
    break;

  case GLUT_KEY_PAGE_DOWN:
    if (--selected_model_index < 0) selected_model_index = 0;
    break;
  }

  // Remember mouse position 
  GLUTmouse[0] = x;
  GLUTmouse[1] = y;

  // Remember modifiers 
  GLUTmodifiers = glutGetModifiers();

  // Redraw
  glutPostRedisplay();
}

// Assembly:
movl 0x1a9842(%rip), %eax    # 0x1d7a04
addl $-0x65, %edi
cmpl $0x4, %edi
ja 0x2e2c0
leaq 0x120147(%rip), %rcx    # 0x14e31c
movslq (%rcx,%rdi,4), %rdi
addq %rcx, %rdi
jmpq *%rdi
movslq 0x1aefaf(%rip), %rcx    # 0x1dd194
movq %rcx, %rdi
shlq $0x4, %rdi
leaq 0x1aeb7d(%rip), %r8     # 0x1dcd70
movsd 0x8(%rdi,%r8), %xmm0
movapd %xmm0, %xmm1
subsd (%rdi,%r8), %xmm1
mulsd 0x11fe44(%rip), %xmm1   # 0x14e050
leaq 0x1aef9d(%rip), %rdi    # 0x1dd1b0
addsd (%rdi,%rcx,8), %xmm1
movsd %xmm1, (%rdi,%rcx,8)
addsd 0x11fe33(%rip), %xmm0   # 0x14e058
ucomisd %xmm0, %xmm1
ja 0x2e2a0
jmp 0x2e2c0
movl 0x1aef5e(%rip), %ecx    # 0x1dd194
leal 0x1(%rcx), %edi
movl 0x1af194(%rip), %r8d    # 0x1dd3d4
decl %r8d
cmpl %r8d, %ecx
cmovll %edi, %r8d
movl %r8d, 0x1aef43(%rip)    # 0x1dd194
jmp 0x2e2c0
movslq 0x1aef3a(%rip), %rcx    # 0x1dd194
movq %rcx, %rdi
shlq $0x4, %rdi
leaq 0x1aeb08(%rip), %r8     # 0x1dcd70
movsd (%rdi,%r8), %xmm0
movsd 0x8(%rdi,%r8), %xmm1
subsd %xmm0, %xmm1
mulsd 0x11fddf(%rip), %xmm1   # 0x14e060
leaq 0x1aef28(%rip), %rdi    # 0x1dd1b0
addsd (%rdi,%rcx,8), %xmm1
movsd %xmm1, (%rdi,%rcx,8)
addsd 0x11fdce(%rip), %xmm0   # 0x14e068
ucomisd %xmm1, %xmm0
jbe 0x2e2c0
movsd %xmm0, (%rdi,%rcx,8)
jmp 0x2e2c0
movl 0x1aeee7(%rip), %ecx    # 0x1dd194
cmpl $0x2, %ecx
movl $0x1, %edi
cmovgel %ecx, %edi
decl %edi
movl %edi, 0x1aeed4(%rip)    # 0x1dd194
pushq %rax
subl %edx, %eax
movl %esi, 0x1af10f(%rip)    # 0x1dd3d8
movl %eax, 0x1af10d(%rip)    # 0x1dd3dc
callq 0x116ed4
popq %rax
jmp 0x111f8c
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: GLUTMotion(int, int)
static void
GLUTMotion(int x, int y)
{
  // Invert y coordinate
  y = GLUTwindow_height - y;

  // Compute mouse movement
  int dx = x - GLUTmouse[0];
  int dy = y - GLUTmouse[1];
  
  // World in hand navigation 
  if (GLUTbutton[0]) viewer->RotateWorld(1.0, world_origin, x, y, dx, dy);
  else if (GLUTbutton[1]) viewer->ScaleWorld(1.0, world_origin, x, y, dx, dy);
  else if (GLUTbutton[2]) viewer->TranslateWorld(1.0, world_origin, x, y, dx, dy);
  if (GLUTbutton[0] || GLUTbutton[1] || GLUTbutton[2]) glutPostRedisplay();

  // Remember mouse position 
  GLUTmouse[0] = x;
  GLUTmouse[1] = y;

  // Update mouse drag movement
  GLUTmouse_drag_distance_squared += dx*dx + dy*dy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r15d
movl 0x1a9338(%rip), %r14d   # 0x1d7a04
subl %esi, %r14d
movl %edi, %ebx
subl 0x1aed01(%rip), %ebx    # 0x1dd3d8
movl %r14d, %ebp
movl $0x58, %eax
subl 0x1aecf7(%rip), %ebp    # 0x1dd3dc
cmpl $0x0, 0x1aecf8(%rip)    # 0x1dd3e4
jne 0x2e70a
movl $0x50, %eax
cmpl $0x0, 0x1aecee(%rip)    # 0x1dd3e8
jne 0x2e70a
movl $0x48, %eax
cmpl $0x0, 0x1aece4(%rip)    # 0x1dd3ec
je 0x2e733
movq 0x1aea6f(%rip), %rdi    # 0x1dd180
movq (%rdi), %r10
leaq 0x1ae625(%rip), %rsi    # 0x1dcd40
movsd 0x11f965(%rip), %xmm0   # 0x14e088
movl %r15d, %edx
movl %r14d, %ecx
movl %ebx, %r8d
movl %ebp, %r9d
callq *(%r10,%rax)
cmpl $0x0, 0x1aecaa(%rip)    # 0x1dd3e4
jne 0x2e74e
cmpl $0x0, 0x1aeca5(%rip)    # 0x1dd3e8
jne 0x2e74e
cmpl $0x0, 0x1aeca0(%rip)    # 0x1dd3ec
je 0x2e753
callq 0x111f8c
movl %r15d, 0x1aec7e(%rip)   # 0x1dd3d8
movl %r14d, 0x1aec7b(%rip)   # 0x1dd3dc
imull %ebx, %ebx
imull %ebp, %ebp
addl %ebx, %ebp
addl %ebp, 0x1aec71(%rip)    # 0x1dd3e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: LoadColorValue(double)
static void 
LoadColorValue(double value) 
{
  // Initialize color
  unsigned char color[3];
  
  // Compute rgb based on blue-green-red heatmap
  if (value <= 0) {
    color[0] = 0;
    color[1] = 0;
    color[2] = 255;
  }
  else if (value < 0.1) {
    value *= 10 * 255;
    color[0] = 0;
    color[1] = value;
    color[2] = 255;
  }
  else if (value < 0.5) {
    value = (value - 0.1) * 2.5 * 255;
    color[0] = 0;
    color[1] = 255;
    color[2] = 255 - value;
  }
  else if (value < 0.9) {
    value = (value - 0.5) * 2.5 * 255;
    color[0] = value;
    color[1] = 255;
    color[2] = 0;
  }
  else if (value < 1) {
    value = (value - 0.9) * 10 * 255;
    color[0] = 255;
    color[1] = 255 - value;
    color[2] = 0;
  }
  else {
    color[0] = 255;
    color[1] = 0;
    color[2] = 0;
  }

  // Load color
  RNLoadRgb(color);
}

// Assembly:
pushq %rax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x31299
movsd 0x11ce3c(%rip), %xmm1   # 0x14e0b8
ucomisd %xmm0, %xmm1
jbe 0x312b1
mulsd 0x11ce7e(%rip), %xmm0   # 0x14e108
movb $0x0, 0x5(%rsp)
cvttsd2si %xmm0, %eax
movb %al, 0x6(%rsp)
jmp 0x312a0
movw $0x0, 0x5(%rsp)
movb $-0x1, %al
leaq 0x5(%rsp), %rdi
movb %al, 0x2(%rdi)
callq 0x27c30
popq %rax
retq
movsd 0x11cd57(%rip), %xmm1   # 0x14e010
ucomisd %xmm0, %xmm1
jbe 0x312ec
addsd 0x11ce31(%rip), %xmm0   # 0x14e0f8
mulsd 0x11ce31(%rip), %xmm0   # 0x14e100
movsd 0x11cdf1(%rip), %xmm1   # 0x14e0c8
mulsd %xmm1, %xmm0
movw $0xff00, 0x5(%rsp)      # imm = 0xFF00
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
jmp 0x312a2
movsd 0x11cd8c(%rip), %xmm1   # 0x14e080
ucomisd %xmm0, %xmm1
jbe 0x31321
addsd 0x11cdee(%rip), %xmm0   # 0x14e0f0
mulsd 0x11cd0e(%rip), %xmm0   # 0x14e018
mulsd 0x11cdb6(%rip), %xmm0   # 0x14e0c8
cvttsd2si %xmm0, %eax
movb %al, 0x5(%rsp)
movb $-0x1, 0x6(%rsp)
jmp 0x31365
movsd 0x11cd5f(%rip), %xmm1   # 0x14e088
ucomisd %xmm0, %xmm1
jbe 0x3135e
addsd 0x11cda9(%rip), %xmm0   # 0x14e0e0
mulsd 0x11cda9(%rip), %xmm0   # 0x14e0e8
movsd 0x11cd81(%rip), %xmm1   # 0x14e0c8
mulsd %xmm1, %xmm0
movb $-0x1, 0x5(%rsp)
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, 0x6(%rsp)
jmp 0x31365
movw $0xff, 0x5(%rsp)
xorl %eax, %eax
jmp 0x312a2
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: DrawDotOnImageInset(ImageData*, double, double, double, gaps::R2Point const&)
static void
DrawDotOnImageInset(ImageData *data,
  double x, double y, double scale,
  const R2Point& image_position)
{
  // Check if drawing image insets
  if (!show_image_insets) return;

  // Get convenient variables
  double w = scale * data->image_width;
  double h = scale * data->image_height;
  if ((w == 0) || (h == 0)) return;

  // Set viewport
  glViewport(x, y, w, h);

  // Set viewing transformation
  glMatrixMode(GL_PROJECTION);  
  glPushMatrix();
  glLoadIdentity();
  glOrtho(0, data->image_width, 0, data->image_height, 0, 1);
  glMatrixMode(GL_MODELVIEW);
  glPushMatrix();
  glLoadIdentity();

  // Draw dot
  RNLoadRgb(1, 0, 0);
  glPointSize(5);
  RNGrfxBegin(RN_GRFX_POINTS);
  R3LoadPoint(image_position.X(), image_position.Y(), -0.25);
  RNGrfxEnd();
  glPointSize(1);

  // Restore viewing transformation
  glMatrixMode(GL_PROJECTION);  
  glPopMatrix();
  glMatrixMode(GL_MODELVIEW);  
  glPopMatrix();

  // Resore viewport
  viewer->Viewport().Load();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x1abe7f(%rip)    # 0x1dd3bc
je 0x31563
movq %rdi, %r14
cvtdq2pd 0x768(%rdi), %xmm1
mulpd 0x11ce1e(%rip), %xmm1   # 0x14e370
xorpd %xmm2, %xmm2
cmpeqpd %xmm1, %xmm2
movmskpd %xmm2, %eax
testl %eax, %eax
je 0x3156b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
cvttsd2si %xmm0, %edi
cvttsd2si %xmm1, %edx
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
cvttsd2si %xmm1, %ecx
xorl %esi, %esi
callq 0x27210
movl $0x1701, %edi           # imm = 0x1701
callq 0x27d40
callq 0x27ff0
callq 0x27cd0
xorps %xmm1, %xmm1
cvtsi2sdl 0x768(%r14), %xmm1
cvtsi2sdl 0x76c(%r14), %xmm3
movsd 0x11cad2(%rip), %xmm5   # 0x14e088
xorpd %xmm0, %xmm0
xorpd %xmm2, %xmm2
xorps %xmm4, %xmm4
callq 0x28280
movl $0x1700, %edi           # imm = 0x1700
callq 0x27d40
callq 0x27ff0
callq 0x27cd0
movss 0x11cb52(%rip), %xmm0   # 0x14e134
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
callq 0x28390
movss 0x11cb4d(%rip), %xmm0   # 0x14e144
callq 0x270a0
xorl %edi, %edi
callq 0x271a0
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x11cafc(%rip), %xmm2   # 0x14e110
callq 0x27ef0
callq 0x27ce0
movss 0x11cb0e(%rip), %xmm0   # 0x14e134
callq 0x270a0
movl $0x1701, %edi           # imm = 0x1701
callq 0x27d40
callq 0x28260
movl $0x1700, %edi           # imm = 0x1700
callq 0x27d40
callq 0x28260
movq 0x1abb30(%rip), %rax    # 0x1dd180
movl 0x98(%rax), %edi
movl 0x9c(%rax), %esi
movl 0xa0(%rax), %edx
addl %edi, %edx
movl 0xa4(%rax), %ecx
addl %esi, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x27210
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: LoadTexture(ImageData*)
static void
LoadTexture(ImageData *data)
{
  // Check if already loaded
  if (data->texture_id > 0) return;

  // Check color image
  if (data->color_image.Width() <= 0) return;
  if (data->color_image.Height() <= 0) return;
  if (data->color_image.Depth() != 3) return;

  // Allocate texture id
  glGenTextures(1, &data->texture_id);
  assert(data->texture_id > 0);

  // Set texture parameters
  glBindTexture(GL_TEXTURE_2D, data->texture_id);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

  // Set texture pixels
  gluBuild2DMipmaps(GL_TEXTURE_2D, 3,
    data->color_image.Width(), data->color_image.Height(),
    GL_RGB, GL_UNSIGNED_BYTE, data->color_image.Pixels());
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x0, 0x770(%rdi)
je 0x32391
addq $0x10, %rsp
popq %rbx
retq
movq %rdi, %rbx
cmpl $0x0, (%rdi)
jle 0x3238b
cmpl $0x0, 0x4(%rbx)
jle 0x3238b
cmpl $0x3, 0x8(%rbx)
jne 0x3238b
leaq 0x770(%rbx), %rsi
movl $0x1, %edi
callq 0x27d70
movl 0x770(%rbx), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0x27bf0
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2802, %esi           # imm = 0x2802
movl $0x2900, %edx           # imm = 0x2900
callq 0x27d30
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2803, %esi           # imm = 0x2803
movl $0x2900, %edx           # imm = 0x2900
callq 0x27d30
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
movl $0x2701, %edx           # imm = 0x2701
callq 0x27d30
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
movl $0x2601, %edx           # imm = 0x2601
callq 0x27d30
movl $0x2300, %edi           # imm = 0x2300
movl $0x2200, %esi           # imm = 0x2200
movl $0x2100, %edx           # imm = 0x2100
callq 0x27a40
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movq 0x10(%rbx), %rax
movq %rax, (%rsp)
movl $0xde1, %edi            # imm = 0xDE1
movl $0x3, %esi
movl $0x1907, %r8d           # imm = 0x1907
movl $0x1401, %r9d           # imm = 0x1401
callq 0x27520
jmp 0x3238b
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/gapsview/gapsview.cpp
// Function: GLUTStop()
static void
GLUTStop(void)
{
  // Close sfl scenes
  for (int i = 0; i < sfls.NEntries(); i++) {
    if (sfls[i]) CloseSFLFiles(sfls[i]);
  }
  
  // Destroy window 
  glutDestroyWindow(GLUTwindow);

  // Exit
  exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x0, 0x1aa892(%rip)    # 0x1dccf4
jle 0x324a0
xorl %r14d, %r14d
movq 0x1aa87a(%rip), %rax    # 0x1dcce8
movq (%rax,%r14,8), %rbx
testq %rbx, %rbx
je 0x32491
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x168(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0xf8(%rax)
incq %r14
movslq 0x1aa859(%rip), %rax    # 0x1dccf4
cmpq %rax, %r14
jl 0x32467
movl 0x1aacea(%rip), %edi    # 0x1dd190
callq 0x1182cc
xorl %edi, %edi
callq 0x27b80