LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: ldx
static void ldx() {
    penaltyop = 1;
    value = getvalue();
    x = (uint8_t)(value & 0x00FF);
   
    zerocalc(x);
    signcalc(x);
}

// Assembly:
movb $0x1, 0x80eebe(%rip)    # 0x821786
movzbl 0x80eeb6(%rip), %eax    # 0x821785
leaq 0x84da(%rip), %rcx      # 0x1adb0
leaq -0xea7(%rip), %rdx      # 0x11a36
cmpq %rdx, (%rcx,%rax,8)
je 0x128f6
pushq %rax
movzwl 0x80eea7(%rip), %edi    # 0x821792
callq 0xe9ae
addq $0x8, %rsp
jmp 0x128fc
movb 0x80ee84(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80ee90(%rip)     # 0x821796
movb %al, 0x80ee75(%rip)     # 0x821781
testb %al, %al
sete %cl
movb 0x80ee6c(%rip), %dl     # 0x821783
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x80ee5b(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: bcs
static void bcs() {
    if ((status & FLAG_CARRY) == FLAG_CARRY) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
testb $0x1, 0x80edf8(%rip)    # 0x821783
je 0x129c8
movzwl 0x80edea(%rip), %eax    # 0x82177e
movw %ax, 0x80edf5(%rip)     # 0x821790
movzwl 0x80edf2(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80edd2(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80edb8(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80edac(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: cpy
static void cpy() {
    value = getvalue();
    result = (uint16_t)y - value;
   
    if (y >= (uint8_t)(value & 0x00FF)) setcarry();
        else clearcarry();
    if (y == (uint8_t)(value & 0x00FF)) setzero();
        else clearzero();
    signcalc(result);
}

// Assembly:
movzbl 0x80ed84(%rip), %eax    # 0x821785
leaq 0x83a8(%rip), %rcx      # 0x1adb0
leaq -0xfd9(%rip), %rdx      # 0x11a36
cmpq %rdx, (%rcx,%rax,8)
je 0x12a28
pushq %rax
movzwl 0x80ed75(%rip), %edi    # 0x821792
callq 0xe9ae
addq $0x8, %rsp
jmp 0x12a2e
movb 0x80ed52(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80ed5e(%rip)     # 0x821796
movzbl 0x80ed43(%rip), %ecx    # 0x821782
movl %ecx, %edx
subl %eax, %edx
movw %dx, 0x80ed4e(%rip)     # 0x821798
cmpb %cl, %al
setbe %sil
movb 0x80ed2c(%rip), %dil    # 0x821783
andb $0x7c, %dil
cmpb %al, %cl
sete %al
addb %al, %al
orb %sil, %al
orb %dil, %al
andb $-0x80, %dl
orb %al, %dl
movb %dl, 0x80ed10(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: cmp
static void cmp() {
    penaltyop = 1;
    value = getvalue();
    result = (uint16_t)a - value;
   
    if (a >= (uint8_t)(value & 0x00FF)) setcarry();
        else clearcarry();
    if (a == (uint8_t)(value & 0x00FF)) setzero();
        else clearzero();
    signcalc(result);
}

// Assembly:
movb $0x1, 0x80ed0b(%rip)    # 0x821786
movzbl 0x80ed03(%rip), %eax    # 0x821785
leaq 0x8327(%rip), %rcx      # 0x1adb0
leaq -0x105a(%rip), %rdx     # 0x11a36
cmpq %rdx, (%rcx,%rax,8)
je 0x12aaf
pushq %rax
movzwl 0x80ecf4(%rip), %edi    # 0x821792
callq 0xe9ae
movb 0x80ecd7(%rip), %cl     # 0x821780
addq $0x8, %rsp
jmp 0x12ab7
movb 0x80eccb(%rip), %cl     # 0x821780
movl %ecx, %eax
movzbl %al, %eax
movw %ax, 0x80ecd5(%rip)     # 0x821796
movzbl %cl, %ecx
movl %ecx, %edx
subl %eax, %edx
movw %dx, 0x80ecc9(%rip)     # 0x821798
cmpb %cl, %al
setbe %sil
movb 0x80eca7(%rip), %dil    # 0x821783
andb $0x7c, %dil
cmpb %al, %cl
sete %al
addb %al, %al
orb %sil, %al
orb %dil, %al
andb $-0x80, %dl
orb %al, %dl
movb %dl, 0x80ec8b(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: dec
static void dec() {
    value = getvalue();
    result = value - 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x80ec5c(%rip), %eax    # 0x821785
leaq 0x8280(%rip), %rbx      # 0x1adb0
leaq -0x1101(%rip), %r14     # 0x11a36
cmpq %r14, (%rbx,%rax,8)
je 0x12b59
movzwl 0x80ec4e(%rip), %edi    # 0x821792
callq 0xe9ae
movzbl 0x80ec35(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
sete %cl
jmp 0x12b61
movb $0x1, %cl
movb 0x80ec1f(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80ec2b(%rip)     # 0x821796
decl %eax
movw %ax, 0x80ec24(%rip)     # 0x821798
testb %al, %al
sete %dl
movb 0x80ec03(%rip), %sil    # 0x821783
andb $0x7d, %sil
addb %dl, %dl
movl %eax, %edi
andb $-0x80, %dil
orb %sil, %dil
orb %dl, %dil
movb %dil, 0x80ebea(%rip)    # 0x821783
testb %cl, %cl
je 0x12bab
movb %al, 0x80ebdd(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movzwl 0x80ebe0(%rip), %edi    # 0x821792
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd3b1
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: bne
static void bne() {
    if ((status & FLAG_ZERO) == 0) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
testb $0x2, 0x80eb69(%rip)    # 0x821783
jne 0x12c57
movzwl 0x80eb5b(%rip), %eax    # 0x82177e
movw %ax, 0x80eb66(%rip)     # 0x821790
movzwl 0x80eb63(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80eb43(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80eb29(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80eb1d(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: cpx
static void cpx() {
    value = getvalue();
    result = (uint16_t)x - value;
   
    if (x >= (uint8_t)(value & 0x00FF)) setcarry();
        else clearcarry();
    if (x == (uint8_t)(value & 0x00FF)) setzero();
        else clearzero();
    signcalc(result);
}

// Assembly:
movzbl 0x80eb1e(%rip), %eax    # 0x821785
leaq 0x8142(%rip), %rcx      # 0x1adb0
leaq -0x123f(%rip), %rdx     # 0x11a36
cmpq %rdx, (%rcx,%rax,8)
je 0x12c8e
pushq %rax
movzwl 0x80eb0f(%rip), %edi    # 0x821792
callq 0xe9ae
addq $0x8, %rsp
jmp 0x12c94
movb 0x80eaec(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80eaf8(%rip)     # 0x821796
movzbl 0x80eadc(%rip), %ecx    # 0x821781
movl %ecx, %edx
subl %eax, %edx
movw %dx, 0x80eae8(%rip)     # 0x821798
cmpb %cl, %al
setbe %sil
movb 0x80eac6(%rip), %dil    # 0x821783
andb $0x7c, %dil
cmpb %al, %cl
sete %al
addb %al, %al
orb %sil, %al
orb %dil, %al
andb $-0x80, %dl
orb %al, %dl
movb %dl, 0x80eaaa(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O3/mdpkh[P]retro6k/src/fake6502.c
// Function: inc
static void inc() {
    value = getvalue();
    result = value + 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x80e8d7(%rip), %eax    # 0x821785
leaq 0x7efb(%rip), %rbx      # 0x1adb0
leaq -0x1486(%rip), %r14     # 0x11a36
cmpq %r14, (%rbx,%rax,8)
je 0x12ede
movzwl 0x80e8c9(%rip), %edi    # 0x821792
callq 0xe9ae
movzbl 0x80e8b0(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
sete %cl
jmp 0x12ee6
movb $0x1, %cl
movb 0x80e89a(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80e8a6(%rip)     # 0x821796
incl %eax
movw %ax, 0x80e89f(%rip)     # 0x821798
testb %al, %al
sete %dl
movb 0x80e87e(%rip), %sil    # 0x821783
andb $0x7d, %sil
addb %dl, %dl
movl %eax, %edi
andb $-0x80, %dil
orb %sil, %dil
orb %dl, %dil
movb %dil, 0x80e865(%rip)    # 0x821783
testb %cl, %cl
je 0x12f30
movb %al, 0x80e858(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movzwl 0x80e85b(%rip), %edi    # 0x821792
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xd3b1
// File: /workspace/github_cpp_makefile_star2_O3/DRSY[P]MyRBTree/main.cpp
// Function: main
int main() {
    RBTree tree;
    for(int i=0;i<5;++i)
        tree.insert(i);
    tree.insert(-1);
    tree.display(4);
    tree.remove(-1);
    tree.display(4);
    tree.remove(4);
    tree.remove(2);
    tree.display(4);
    tree.remove(3);
    tree.display(4);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x20(%rbp), %rbx
movq $0x0, (%rbx)
movl $0x0, 0x8(%rbx)
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1384
incl %r14d
cmpl $0x5, %r14d
jne 0x12ec
leaq -0x20(%rbp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1384
movl $0x4, %esi
movq %rbx, %rdi
callq 0x13d6
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x177a
movl $0x4, %esi
movq %rbx, %rdi
callq 0x13d6
movq %rbx, %rdi
movl $0x4, %esi
callq 0x177a
movq %rbx, %rdi
movl $0x2, %esi
callq 0x177a
movl $0x4, %esi
movq %rbx, %rdi
callq 0x13d6
movq %rbx, %rdi
movl $0x3, %esi
callq 0x177a
movl $0x4, %esi
movq %rbx, %rdi
callq 0x13d6
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::insert(int)
bool insert(int value) {
      if(!root) {
        root = new Node_t(value);
        root->color = Color::black;
        return true;
      }
      return _insert(this->root, value);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x13a8
movq %rbx, %rdi
movl %r14d, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x1acc
movl $0x20, %edi
callq 0x10d0
movl %r14d, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq %rax, (%rbx)
movl $0x1, 0x4(%rax)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::findInsertion(Node*, int)
std::pair<NodePtr_t, NodePtr_t*> findInsertion(NodePtr_t root, int value) {
      if(root->value == value)
        return std::pair<NodePtr_t, NodePtr_t*>(NULL, NULL);
      if(value < root->value && !root->left)
        return std::pair<NodePtr_t, NodePtr_t*>(root, &root->left);
      else if(value < root->value && root->left)
        return findInsertion(root->left, value);
      else if(value > root->value && root->right)
        return findInsertion(root->right, value);
      else
        return std::pair<NodePtr_t, NodePtr_t*>(root, &root->right);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rsi), %ecx
cmpl %edx, %ecx
jne 0x1e44
xorl %eax, %eax
xorl %edx, %edx
jmp 0x1e6e
movq %rsi, %rax
jle 0x1e58
movq 0x10(%rax), %rsi
testq %rsi, %rsi
jne 0x1e63
leaq 0x10(%rax), %rdx
jmp 0x1e6e
jge 0x1e6a
movq 0x18(%rax), %rsi
testq %rsi, %rsi
je 0x1e6a
callq 0x1e34
jmp 0x1e6e
leaq 0x18(%rax), %rdx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::dfs(Node*, unsigned long)
void dfs(NodePtr_t root, size_t depth) {
        if(!root)
            return;
        if(depth > this->depth)
            this->depth = depth;
        dfs(root->left, depth+1);
        dfs(root->right, depth+1);
    }

// Assembly:
testq %rsi, %rsi
je 0x211a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movslq 0x8(%r15), %rax
cmpq %rax, %rbx
jbe 0x20f5
movl %ebx, 0x8(%r15)
movq 0x10(%r14), %rsi
incq %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x20d0
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x20e8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: construct_candidate_path(Event&, Phy_graph&, Aux_graph&)
void construct_candidate_path(Event& event, Phy_graph& p_graph, Aux_graph& a_graph)
{
    for(int source = 0; source < num_nodes; source++)
    {
        for(int destination = 0; destination < num_nodes; destination++)
        {
            if(source == destination)
            {
                continue;
            }

            if(enable_OTDM)
            {
                LightPath* OTDM_lp = get_best_OTDM_light_path(source, destination, event, p_graph);
                build_candidate_link(a_graph, OTDM_lp);
            }
            LightPath* OFDM_lp = get_best_OFDM_light_path(source, destination, event, p_graph);
            build_candidate_link(a_graph, OFDM_lp);
            LightPath* OFDM_WB_lp = get_best_OFDM_WB_light_path(source, destination, event, p_graph);
            build_candidate_link(a_graph, OFDM_WB_lp);
            LightPath* OFDM_WOB_lp = get_best_OFDM_WOB_light_path(source, destination, event, p_graph);
            build_candidate_link(a_graph, OFDM_WOB_lp);
        }
    }
}

// Assembly:
movl 0x13c7f(%rip), %eax     # 0x18300
testl %eax, %eax
jle 0x4745
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
testl %eax, %eax
jle 0x4733
xorl %r12d, %r12d
cmpl %r12d, %ebp
je 0x4727
cmpl $0x0, 0x13b65(%rip)     # 0x18218
je 0x46d0
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x638b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6616
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x6761
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6616
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x69ec
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6616
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x6f69
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6616
movl 0x13bd9(%rip), %eax     # 0x18300
incl %r12d
cmpl %eax, %r12d
jl 0x46a7
incl %ebp
cmpl %eax, %ebp
jl 0x469c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: BellmanFordSP(Aux_node*)
Aux_node2Aux_link BellmanFordSP(Aux_node* s)
{
    Aux_node2Double distTo;
    Aux_node2Aux_link edgeTo;
    Aux_node2Bool onQueue;

    queue<Aux_node*> queue;

    distTo[s] = 0.0;

    Aux_node* v;

    // Bellman-Ford algorithm
    queue.push(s);
    onQueue[s] = true;
    while (!queue.empty())
    {
        v = queue.front();
        queue.pop();
        onQueue[v] = false;
        // cout << "relax node: "<< v->phy_id << "  <<< " << v->type << "\n";
        relax(v, distTo, edgeTo, onQueue, queue);
    }

    return edgeTo;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, (%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movups %xmm0, 0x10(%rdi)
movl %edx, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
leaq 0x90(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0xa6b2
leaq 0x98(%rsp), %rdi
movq %rsp, %rsi
callq 0xa828
movq $0x0, (%rax)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x4c37
movq (%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x40(%rsp)
jmp 0x4c44
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0xaaba
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0xacce
movb $0x1, (%rax)
leaq 0x60(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x98(%rsp), %r12
leaq 0x10(%rsp), %r13
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x4cf3
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x30(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x4c93
addq $0x8, %rax
jmp 0x4cc5
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x3230
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xacce
movb $0x0, (%rax)
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x87a5
jmp 0x4c6b
leaq 0x10(%rsp), %rdi
callq 0x95e0
leaq 0x60(%rsp), %rdi
callq 0x9638
leaq 0x98(%rsp), %rdi
callq 0x96a8
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4d31
movq %rax, %r14
jmp 0x4d3e
jmp 0x4d31
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x95e0
leaq 0x60(%rsp), %rdi
callq 0x9638
movq %rbx, %rdi
callq 0x8dcc
leaq 0x98(%rsp), %rdi
callq 0x96a8
movq %r14, %rdi
callq 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: reset_auxiliary_graph()
void reset_auxiliary_graph()
{
    for(auto &lp : exist_OTDM_light_path_list)
    {
        for(auto &aux_node : lp->transmitting_node_list)
        {
            delete aux_node;
        }
        lp->transmitting_node_list.clear();
        for(auto &aux_node : lp->receiving_node_list)
        {
            delete aux_node;
        }
        lp->receiving_node_list.clear();
        lp->aux_link_list.clear();
    }
    for(auto &lp : candidate_light_path_list)
    {
        for(auto &aux_link : lp->aux_link_list)
        {
            delete aux_link;
        }
        delete lp;
    }
    candidate_light_path_list.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x132dd(%rip), %rbx     # 0x18430
leaq 0x132d6(%rip), %r14     # 0x18430
cmpq %r14, %rbx
je 0x520d
movq 0x10(%rbx), %rdi
movq 0x80(%rdi), %r15
movq 0x88(%rdi), %r12
cmpq %r12, %r15
je 0x51b0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x5188
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r15
cmpq %r12, %r15
jne 0x517a
movq 0x10(%rbx), %rdi
movq 0x80(%rdi), %rax
cmpq %rax, 0x88(%rdi)
je 0x51b0
movq %rax, 0x88(%rdi)
movq 0x10(%rbx), %rdi
movq 0x98(%rdi), %r15
movq 0xa0(%rdi), %r12
cmpq %r12, %r15
je 0x51f9
movq (%r15), %rdi
testq %rdi, %rdi
je 0x51d1
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r15
cmpq %r12, %r15
jne 0x51c3
movq 0x10(%rbx), %rdi
movq 0x98(%rdi), %rax
cmpq %rax, 0xa0(%rdi)
je 0x51f9
movq %rax, 0xa0(%rdi)
movq 0x10(%rbx), %rdi
addq $0xb0, %rdi
callq 0x8c24
movq (%rbx), %rbx
jmp 0x515a
movq 0x13204(%rip), %rbx     # 0x18418
leaq 0x131fd(%rip), %r14     # 0x18418
cmpq %r14, %rbx
je 0x5264
movq 0x10(%rbx), %rdi
leaq 0xb0(%rdi), %r15
movq 0xb0(%rdi), %r12
cmpq %r15, %r12
je 0x5259
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x5247
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r12), %r12
cmpq %r15, %r12
jne 0x5237
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x525f
movq (%rdi), %rax
callq *0x8(%rax)
movq (%rbx), %rbx
jmp 0x521b
leaq 0x131ad(%rip), %rdi     # 0x18418
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8c60
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: get_available_OFDM_transceiver(std::vector<OFDMTransceiver, std::allocator<OFDMTransceiver>>&)
int get_available_OFDM_transceiver(vector<OFDMTransceiver>& transceivers)
{
    for(int i = 0; i < (int)transceivers.size(); i++)
    {
        if(transceivers[i].in_used == false)
        {
            return i;
        }
    }
    cout << "error can not find available transceiver\n";
    exit(1);
    return -1;
}

// Assembly:
pushq %rax
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
subq %rcx, %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rdx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rdx
testl %edx, %edx
jle 0x8197
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
addq $0x8, %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
je 0x81b4
incq %rax
addq $0x58, %rcx
cmpq %rax, %rdx
jne 0x8186
movq 0xfe32(%rip), %rdi      # 0x17fd0
leaq 0x90c6(%rip), %rsi      # 0x1126b
callq 0x3210
movl $0x1, %edi
callq 0x3280
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: num_spectrum_available(Phy_link&, int, int)
int num_spectrum_available(Phy_link& link, int slot_st, int slot_ed)
{
    int num_available = 0;
    for(int i = slot_st; i <= slot_ed; i++)
    {
        if(link.slot[i] == -1)
        {
            num_available++;
        }
    }
    return num_available;
}

// Assembly:
xorl %eax, %eax
cmpl %edx, %esi
jg 0x81e2
movslq %esi, %rcx
shlq $0x2, %rcx
addq 0x18(%rdi), %rcx
subl %esi, %edx
incl %edx
xorl %esi, %esi
xorl %eax, %eax
xorl %edi, %edi
cmpl $-0x1, (%rcx,%rsi,4)
sete %dil
addl %edi, %eax
incq %rsi
cmpl %esi, %edx
jne 0x81cf
retq
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: spectrum_available(Phy_link&, int, int)
int spectrum_available(Phy_link& link, int slot_st, int slot_ed)
{
    int i = slot_ed;
    if(link.slot[i] != -1)
    {
        while(i < num_slots)
        {
            i++;
            if(link.slot[i] == -1)
            {
                return i; // index of first free slot
            }
        }
        return num_slots + 1;
    }
    for(i = slot_ed - 1; i >= slot_st; i--)
    {
        if(link.slot[i] != -1)
        {
            return i + 1; // index of first free slot
        }
    }
    return -1; // specturm available
}

// Assembly:
movl %edx, %eax
movslq %edx, %rdx
movq 0x18(%rdi), %rcx
cmpl $-0x1, (%rcx,%rdx,4)
je 0x8225
movl 0xfff8(%rip), %esi      # 0x181f0
cmpl %edx, %esi
movl %eax, %edi
cmovgl %esi, %edi
movslq %edi, %rdi
subq %rdx, %rdi
leaq (%rcx,%rdx,4), %rcx
addq $0x4, %rcx
xorl %edx, %edx
cmpq %rdx, %rdi
je 0x823d
leaq 0x1(%rdx), %r8
cmpl $-0x1, (%rcx,%rdx,4)
movq %r8, %rdx
jne 0x820f
addl %r8d, %eax
retq
movslq %esi, %rsi
incl %eax
cmpq %rsi, %rdx
jle 0x8242
decl %eax
cmpl $-0x1, -0x4(%rcx,%rdx,4)
leaq -0x1(%rdx), %rdx
je 0x822a
retq
incl %esi
movl %esi, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: path_spectrum_available(std::vector<int, std::allocator<int>>&, int, int, Phy_graph&)
int path_spectrum_available(Path& path, int slot_st, int slot_ed, Phy_graph& p_graph)
{
    for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
    {
        int from = path[node_i];
        int to = path[node_i + 1];
        Phy_link& link = p_graph.get_link(from, to);
        int next_start =  spectrum_available(link, slot_st, slot_ed);
        if(next_start > 0)
        {
            return next_start;
        }
    }
    return -1; // specturn available
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x1, %r12d
leal -0x1(%r12), %ecx
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x82a3
movl (%rax,%rcx,4), %esi
movl %r12d, %ecx
movl (%rax,%rcx,4), %edx
movq %rbx, %rdi
callq 0xb0a6
movq %rax, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x81e3
incl %r12d
testl %eax, %eax
jle 0x8261
jmp 0x82a8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: get_distance(std::vector<int, std::allocator<int>>&, int, int, Phy_graph&)
int get_distance(Path& path, int slot_st, int slot_ed, Phy_graph& p_graph)
{
    bool zone_clear = true;
    int distance = 0;
    int search_scope = transceiver_slot_limit - (slot_ed - slot_st + 1) + transceiver_slot_limit - 1;
    for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
    {
        int from = path[node_i];
        int to = path[node_i + 1];
        Phy_link& link = p_graph.get_link(from, to);
        int bound;
        bound = (slot_st - search_scope + 1 >= 0)? search_scope : slot_st + 1;
        for(int i = 1; i < bound; i++)
        {
            if(link.slot[slot_st - i] == 0)
            {
                distance += i;
                zone_clear = false;
                break;
            }
        }
        bound = (slot_ed + search_scope - 1 < num_slots)? search_scope : num_slots - slot_ed;
        for(int i = 1; i < bound; i++)
        {
            if(link.slot[slot_ed + i] == 0)
            {
                distance += i;
                zone_clear = false;
                break;
            }
        }
    }
    if(zone_clear){
        return transceiver_slot_limit*4*hop_limit;
    }
    return distance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movl 0xff41(%rip), %r12d     # 0x1820c
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
jne 0x82ec
imull 0xff01(%rip), %r12d     # 0x181e4
shll $0x2, %r12d
jmp 0x83fe
movl %edx, %r13d
movq %rdi, %r15
movl %edx, %ecx
notl %ecx
addl %esi, %ecx
leal (%rcx,%r12,2), %edi
decl %edi
movl %esi, %ecx
subl %edi, %ecx
leal 0x1(%rsi), %ebp
cmpl $-0x1, %ecx
cmovgel %edi, %ebp
movq %rdi, 0x18(%rsp)
leal (%rdi,%r13), %ecx
movl %ecx, 0x4(%rsp)
movslq %esi, %rcx
movslq %edx, %rsi
leaq -0x4(,%rcx,4), %rcx
movq %rcx, 0x8(%rsp)
movl $0x1, %r14d
subq %rbp, %r14
xorl %ebx, %ebx
movb $0x1, %cl
movl %ecx, (%rsp)
shlq $0x2, %rsi
movq %rsi, 0x10(%rsp)
xorl %r12d, %r12d
movl (%rax,%rbx,4), %esi
incl %ebx
movl (%rax,%rbx,4), %edx
movq 0x20(%rsp), %rdi
callq 0xb0a6
cmpl $0x2, %ebp
jl 0x8386
movq 0x18(%rax), %rcx
addq 0x8(%rsp), %rcx
xorl %esi, %esi
cmpl $0x0, (%rcx,%rsi,4)
je 0x8379
decq %rsi
cmpq %rsi, %r14
jne 0x8369
jmp 0x8386
subl %esi, %r12d
incl %r12d
movl $0x0, (%rsp)
movl %r12d, %r12d
movl 0xfe61(%rip), %esi      # 0x181f0
movl %esi, %ecx
subl %r13d, %ecx
cmpl %esi, 0x4(%rsp)
cmovlel 0x18(%rsp), %ecx
cmpl $0x1, %ecx
jle 0x83cc
movl %ecx, %ecx
movq 0x18(%rax), %rsi
addq 0x10(%rsp), %rsi
movl $0x1, %eax
cmpl $0x0, (%rsi,%rax,4)
je 0x83c2
incq %rax
cmpq %rcx, %rax
jb 0x83b2
jmp 0x83cc
addl %eax, %r12d
movl $0x0, (%rsp)
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
cmpq %rbx, %rcx
ja 0x8347
movl 0xfe20(%rip), %eax      # 0x1820c
imull 0xfdf1(%rip), %eax      # 0x181e4
shll $0x2, %eax
testb $0x1, (%rsp)
cmovnel %eax, %r12d
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: get_cut_num(std::vector<int, std::allocator<int>>&, int, int, Phy_graph&)
int get_cut_num(Path& path, int slot_st, int slot_ed, Phy_graph& p_graph)
{
    int num_cut = 0;
    for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
    {
        int from = path[node_i];
        int to = path[node_i + 1];
        Phy_link& link = p_graph.get_link(from, to);
        if(slot_st > 0)
        {
            if(link.slot[slot_st - 1] == -1)
            {
                num_cut++;
            }
        }
        if(slot_ed < num_cut - 1)
        {
            if(link.slot[slot_ed + 1] == -1)
            {
                num_cut++;
            }
        }
    }
    return num_cut;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
xorl %r12d, %r12d
cmpq $0x4, %rcx
je 0x84c1
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %ecx
movq %rcx, 0x10(%rsp)
movslq %edx, %rcx
movq %rcx, 0x8(%rsp)
xorl %r13d, %r13d
movl $0x1, %ecx
xorl %r12d, %r12d
movl (%rax,%r13,4), %esi
movl %ecx, %r13d
movl (%rax,%r13,4), %edx
movq %rbx, %rdi
callq 0xb0a6
testl %r14d, %r14d
jle 0x8488
movq 0x18(%rax), %rcx
xorl %edx, %edx
movq 0x10(%rsp), %rsi
cmpl $-0x1, -0x4(%rcx,%rsi,4)
sete %dl
addl %edx, %r12d
leal -0x1(%r12), %ecx
cmpl %ebp, %ecx
jle 0x84a7
movq 0x18(%rax), %rax
xorl %ecx, %ecx
movq 0x8(%rsp), %rdx
cmpl $-0x1, 0x4(%rax,%rdx,4)
sete %cl
addl %ecx, %r12d
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
leal 0x1(%r13), %ecx
cmpq %r13, %rdx
ja 0x845a
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/ynilu[P]elastic/simulator.cpp
// Function: get_align_num(std::vector<int, std::allocator<int>>&, int, int, Phy_graph&)
int get_align_num(Path& path, int slot_st, int slot_ed, Phy_graph& p_graph)
{
    int num_align = 0;
    for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
    {
        int from = path[node_i];
        int to = path[node_i + 1];
        for(auto &w : p_graph.get_node(from).neighbor)
        {
            if(w == to)
            {
                continue;
            }
            Phy_link& link = p_graph.get_link(w, from);
            num_align += num_spectrum_available(link, slot_st, slot_ed);
        }
        for(auto &v : p_graph.get_node(to).neighbor)
        {
            if(v == from)
            {
                continue;
            }
            Phy_link& link = p_graph.get_link(to, v);
            num_align += num_spectrum_available(link, slot_st, slot_ed);
        }
    }
    return num_align;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movl %esi, (%rsp)
movq (%rdi), %rax
movq %rdi, 0x18(%rsp)
movq 0x8(%rdi), %rcx
subq %rax, %rcx
xorl %r12d, %r12d
cmpq $0x4, %rcx
je 0x8620
movslq (%rsp), %rdx
movl 0x4(%rsp), %ecx
movl %ecx, %ebp
subl %edx, %ebp
incl %ebp
shlq $0x2, %rdx
movq %rdx, 0x10(%rsp)
xorl %ecx, %ecx
xorl %r12d, %r12d
movl (%rax,%rcx,4), %r13d
incl %ecx
movq %rcx, 0x20(%rsp)
movl (%rax,%rcx,4), %r15d
movq 0x8(%rsp), %rdi
movl %r13d, %esi
callq 0xba88
movq 0x10(%rax), %rbx
movq 0x18(%rax), %r14
cmpq %r14, %rbx
je 0x8596
movl (%rbx), %esi
cmpl %r15d, %esi
je 0x8590
movq 0x8(%rsp), %rdi
movl %r13d, %edx
callq 0xb0a6
xorl %ecx, %ecx
movl (%rsp), %edx
cmpl 0x4(%rsp), %edx
jg 0x858d
movq 0x18(%rax), %rax
addq 0x10(%rsp), %rax
xorl %edx, %edx
xorl %ecx, %ecx
xorl %esi, %esi
cmpl $-0x1, (%rax,%rdx,4)
sete %sil
addl %esi, %ecx
incq %rdx
cmpl %edx, %ebp
jne 0x857a
addl %ecx, %r12d
addq $0x4, %rbx
jmp 0x8549
movq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0xba88
movq 0x10(%rax), %r14
movq 0x18(%rax), %rbx
cmpq %rbx, %r14
je 0x85f9
movl (%r14), %edx
cmpl %r13d, %edx
je 0x85f3
movq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0xb0a6
xorl %ecx, %ecx
movl (%rsp), %edx
cmpl 0x4(%rsp), %edx
jg 0x85f0
movq 0x18(%rax), %rax
addq 0x10(%rsp), %rax
xorl %edx, %edx
xorl %ecx, %ecx
xorl %esi, %esi
cmpl $-0x1, (%rax,%rdx,4)
sete %sil
addl %esi, %ecx
incq %rdx
cmpl %edx, %ebp
jne 0x85dd
addl %ecx, %r12d
addq $0x4, %r14
jmp 0x85ab
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
movq 0x20(%rsp), %rdx
cmpq %rdx, %rcx
movq %rdx, %rcx
ja 0x8525
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x82b1
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x8410
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x84d3
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl 0xfb7c(%rip), %eax      # 0x1820c
imull 0xfb4d(%rip), %eax      # 0x181e4
shll $0x2, %eax
cvtsi2sd %eax, %xmm1
movsd 0x10(%rsp), %xmm2
mulsd 0xfbd4(%rip), %xmm2     # 0x18280
subsd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm2
mulsd 0xfbca(%rip), %xmm2     # 0x18288
addsd %xmm1, %xmm2
mulsd 0xfbc6(%rip), %xmm0     # 0x18290
addsd %xmm2, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x10be4
movq $-0x1, 0x8(%rbx)
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rbx, (%rsp)
movq %rax, 0x10(%rbx)
cmpl %r15d, 0xfada(%rip)     # 0x181f0
jl 0x877e
movq %r15, %rbx
xorl %r13d, %r13d
movl %ebx, %ebp
decl %ebp
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r14, %rcx
callq 0x8248
movl %eax, %r15d
testl %eax, %eax
jns 0x8768
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r14, %rcx
callq 0x8632
movq (%rsp), %rax
movsd 0x10(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x8768
movq (%rsp), %rax
movl %r13d, 0x8(%rax)
movl %ebp, 0xc(%rax)
movsd %xmm0, 0x10(%rax)
incl %r13d
testl %r15d, %r15d
cmovnsl %r15d, %r13d
leal (%rbx,%r13), %ebp
cmpl 0xfa74(%rip), %ebp      # 0x181f0
jle 0x8720
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rsp), %rdi
callq 0x10bf0
movq %r14, %rdi
callq 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x20(%rdi), %r13
testq %r13, %r13
je 0x88a2
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
leaq 0x8(%rsp), %rbp
movq 0x28(%r13), %rsi
movq %rsi, 0x8(%rsp)
movq %r12, %rdi
callq 0x88b1
movsd %xmm0, (%rsp)
movq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x88b1
addsd 0x18(%r13), %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x8895
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0xa828
movsd (%rax), %xmm0
addsd 0x18(%r13), %xmm0
movsd %xmm0, (%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0xa828
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x9edc
movq %r13, (%rax)
movq %r14, %rdi
movq %rbp, %rsi
callq 0xacce
cmpb $0x0, (%rax)
jne 0x8895
movq 0x30(%rbx), %rax
movq 0x40(%rbx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x887c
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x30(%rbx)
jmp 0x8887
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xaaba
movq %r14, %rdi
movq %rbp, %rsi
callq 0xacce
movb $0x1, (%rax)
movq 0x38(%r13), %r13
testq %r13, %r13
jne 0x87d6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
xorl %ebp, %ebp
cmpq $0x4, %rcx
je 0xb068
movq %rsi, %r14
movq 0x8(%rsp), %rcx
leaq 0x20(%rcx), %r15
xorl %ebx, %ebx
movl $0x1, %r13d
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
movl (%rax,%rbx,4), %ecx
movl %r13d, %ebx
movl (%rax,%rbx,4), %eax
shlq $0x20, %rax
orq %rcx, %rax
movq %rax, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xc2b4
addl 0x10(%rax), %ebp
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
incl %r13d
cmpq %rbx, %rcx
ja 0xb02c
movl $0x4, %eax
movq 0x8(%rsp), %rcx
cmpl %ebp, 0x80(%rcx)
jge 0xb097
movl $0x3, %eax
cmpl %ebp, 0x84(%rcx)
jge 0xb097
xorl %eax, %eax
cmpl %ebp, 0x88(%rcx)
setge %al
leal (%rax,%rax,2), %eax
decl %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rsi, %r15
movq %rdi, %r14
leaq 0xca6c(%rip), %rax      # 0x17b40
movq %rax, (%rdi)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
leaq 0x28(%rdi), %rcx
movl %eax, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rcx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
leaq 0x58(%rdi), %rcx
movl %eax, 0x58(%rdi)
movq %rax, 0x60(%rdi)
movq %rcx, 0x68(%rdi)
movq %rcx, 0x70(%rdi)
movq %rax, 0x78(%rdi)
movl 0x28(%rsi), %eax
movl %eax, 0x88(%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x80(%rdi)
movq (%rsi), %rsi
movl 0x8(%r15), %edx
callq 0xb180
movl 0xc(%r15), %esi
movl 0x10(%r15), %edx
movl 0x1c(%r15), %ecx
movq %r14, %rdi
callq 0xb47e
movq %r14, %rdi
callq 0xb5a0
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x50(%r14), %rdi
addq $0x20, %r14
callq 0xc4d8
movq %r14, %rdi
callq 0xc568
movq %rbx, %rdi
callq 0xbf60
movq %r15, %rdi
callq 0x3370
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x78, %rsp
movl %ecx, 0x4(%rsp)
movq 0x8(%rdi), %r13
movq 0x10(%rdi), %rax
movq %rax, 0x18(%rsp)
cmpq %rax, %r13
je 0xb579
movl %edx, %ebp
movslq %esi, %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rsp), %r14
movslq %edx, %rax
movq %rax, 0x8(%rsp)
leaq 0x38(%r13), %rdi
movslq 0x8(%r13), %rsi
movq 0x10(%rsp), %rbx
imulq %rbx, %rsi
callq 0xbfaa
movslq 0x8(%r13), %rsi
imulq %rbx, %rsi
movl %esi, 0x28(%r13)
leaq 0x50(%r13), %rdi
callq 0xbfaa
movl 0x8(%r13), %eax
movl %ebx, %ecx
imull %eax, %ecx
movl %ecx, 0x30(%r13)
leaq 0x68(%r13), %r15
movl %ebp, %ebx
imull %ebp, %eax
movslq %eax, %r12
movq %r14, %rdi
movl 0x4(%rsp), %ebp
movl %ebp, %esi
callq 0xbdf0
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xc016
movq %r14, %rdi
callq 0xbe8a
movslq 0x8(%r13), %r15
imulq 0x8(%rsp), %r15
movl %r15d, 0x2c(%r13)
leaq 0x80(%r13), %r12
movq %r14, %rdi
movl %ebp, %esi
callq 0xbdf0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xc016
movq %r14, %rdi
callq 0xbe8a
movl 0x8(%r13), %eax
movl %ebx, %ebp
imull %ebx, %eax
movl %eax, 0x34(%r13)
addq $0x98, %r13
cmpq 0x18(%rsp), %r13
jne 0xb4bd
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb58a
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xbe8a
movq %rbx, %rdi
callq 0x3370
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3270
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x31f0
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
jne 0xea70
leaq 0x10(%rsp), %r14
movq %rsp, %r15
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x3130
movq %rax, %rdi
movq %r12, %rsi
callq 0x3140
movq %rax, %rdi
movq %r13, %rsi
callq 0x3130
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xea4b
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 0xe9f3
leaq 0x10(%rsp), %rdi
callq 0x3040
leaq 0x10(%rsp), %rdi
callq 0x3080
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x9579(%rip), %rdi      # 0x17ff0
leaq 0x2ca1(%rip), %rsi      # 0x1171f
movl $0x10, %edx
callq 0x3250
movq 0x9561(%rip), %rdi      # 0x17ff0
movq %r14, %rsi
callq 0x3210
leaq 0x2c92(%rip), %rsi      # 0x11730
movl $0x2, %edx
movq %rax, %rdi
callq 0x3250
movq 0x953e(%rip), %rdi      # 0x17ff0
leaq 0x2d37(%rip), %rsi      # 0x117f0
callq 0x3210
movl $0x1, %edi
callq 0x3280
jmp 0xeacc
jmp 0xeacc
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3370
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3270
movq %r15, %rdi
movq %r14, %rsi
movl $0x8, %edx
callq 0x31f0
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x30(%rsp,%rax)
jne 0xebc0
leaq 0x10(%rsp), %r14
leaq 0x4(%rsp), %r15
movq %rsp, %r12
leaq 0x8(%rsp), %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x3130
movq %rax, %rdi
movq %r12, %rsi
callq 0x3130
movq %rax, %rdi
movq %r13, %rsi
callq 0x3140
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xeb9b
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
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rax
movsd %xmm0, -0x8(%rax,%rcx,8)
jmp 0xeb3b
leaq 0x10(%rsp), %rdi
callq 0x3040
leaq 0x10(%rsp), %rdi
callq 0x3080
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x9429(%rip), %rdi      # 0x17ff0
leaq 0x2b51(%rip), %rsi      # 0x1171f
movl $0x10, %edx
callq 0x3250
movq 0x9411(%rip), %rdi      # 0x17ff0
movq %r14, %rsi
callq 0x3210
leaq 0x2b42(%rip), %rsi      # 0x11730
movl $0x2, %edx
movq %rax, %rdi
callq 0x3250
movq 0x93ee(%rip), %rdi      # 0x17ff0
leaq 0x2c15(%rip), %rsi      # 0x1181e
callq 0x3210
movl $0x1, %edi
callq 0x3280
jmp 0xec1c
jmp 0xec1c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3080
movq %rbx, %rdi
callq 0x3370
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl %esi, %eax
movq 0x68(%rdi), %rsi
addq $0x68, %rdi
cmpq %rdi, %rsi
je 0xf117
cmpl $0x1, 0x18(%rsi)
jne 0xf112
cmpl %eax, 0x1c(%rsi)
je 0xf63c
movq (%rsi), %rsi
jmp 0xf0fe
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8783(%rip), %rax      # 0x17c80
movq %rax, (%rdi)
leaq 0x20(%rdi), %rax
movl $0x0, 0x20(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movq $-0x1, %rax
movq %rax, 0xc(%rdi)
movq %rax, 0x48(%rdi)
movsd 0x228c(%rip), %xmm0     # 0x117c0
movsd %xmm0, 0x50(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x7eee(%rip), %rax      # 0x17cc0
movq %rax, (%rdi)
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xfdf0
movq (%rdi), %rax
movq 0x48(%rdi), %r14
callq *0x8(%rax)
movq %r14, %rdi
testq %r14, %r14
jne 0xfdde
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xfe0b
movq (%rdi), %rax
movq 0x38(%rdi), %rbx
callq *0x8(%rax)
movq %rbx, %rdi
testq %rbx, %rbx
jne 0xfdf9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop