LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: and
static void and() {
    penaltyop = 1;
    value = getvalue();
    result = (uint16_t)a & value;
   
    zerocalc(result);
    signcalc(result);
   
    saveaccum(result);
}

// Assembly:
pushq %rax
movb $0x1, 0x8106cb(%rip)    # 0x820796
callq 0xff48
movzbl 0x8106b9(%rip), %ecx    # 0x820790
andl %eax, %ecx
cmpw $0x7f, %cx
seta %dl
movw %ax, 0x8106bf(%rip)     # 0x8207a6
movw %cx, 0x8106ba(%rip)     # 0x8207a8
testl %ecx, %ecx
sete %al
movb 0x810699(%rip), %sil    # 0x820793
andb $0x7d, %sil
addb %al, %al
orb %sil, %al
shlb $0x7, %dl
orb %al, %dl
movb %dl, 0x810685(%rip)     # 0x820793
movb %cl, 0x81067c(%rip)     # 0x820790
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: bit
static void bit() {
    value = getvalue();
    result = (uint16_t)a & value;
   
    zerocalc(result);
    status = (status & 0x3F) | (uint8_t)(value & 0xC0);
}

// Assembly:
pushq %rax
callq 0xff48
movw %ax, 0x81065e(%rip)     # 0x8207a6
movzbl 0x810641(%rip), %ecx    # 0x820790
andw %ax, %cx
movw %cx, 0x81064f(%rip)     # 0x8207a8
sete %cl
movb 0x810631(%rip), %dl     # 0x820793
andb $0x3d, %dl
addb %cl, %cl
andb $-0x40, %al
orb %dl, %al
orb %cl, %al
movb %al, 0x810620(%rip)     # 0x820793
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: rol
static void rol() {
    value = getvalue();
    result = (value << 1) | (status & FLAG_CARRY);
   
    carrycalc(result);
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rax
callq 0xff48
movw %ax, 0x810624(%rip)     # 0x8207a6
movzbl 0x81060a(%rip), %ecx    # 0x820793
movl %ecx, %edx
andl $0x1, %edx
leal (%rdx,%rax,2), %edx
movw %dx, 0x810610(%rip)     # 0x8207a8
cmpw $0x7f, %ax
seta %sil
andb $0x7c, %cl
orb %sil, %cl
testb %dl, %dl
sete %sil
addb %sil, %sil
addb %al, %al
andb $-0x80, %al
orb %cl, %al
orb %sil, %al
movb %al, 0x8105d5(%rip)     # 0x820793
movzwl %dx, %edi
popq %rax
jmp 0x10014
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: bmi
static void bmi() {
    if ((status & FLAG_SIGN) == FLAG_SIGN) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
cmpb $0x0, 0x8105b5(%rip)    # 0x820793
js 0x101e1
retq
movzwl 0x8105a6(%rip), %eax    # 0x82078e
movw %ax, 0x8105b1(%rip)     # 0x8207a0
movzwl 0x8105ae(%rip), %ecx    # 0x8207a4
addw %ax, %cx
movw %cx, 0x81058e(%rip)     # 0x82078e
xorl %ecx, %eax
cmpw $0x100, %ax             # imm = 0x100
movl 0x810578(%rip), %eax    # 0x820784
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x81056c(%rip)    # 0x820784
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: lsr
static void lsr() {
    value = getvalue();
    result = value >> 1;
   
    if (value & 1) setcarry();
        else clearcarry();
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rax
callq 0xff48
movzwl %ax, %eax
movw %ax, 0x8104d8(%rip)     # 0x8207a6
movl %eax, %edi
shrl %edi
movw %di, 0x8104cf(%rip)     # 0x8207a8
movb 0x8104b4(%rip), %cl     # 0x820793
andb $0x7c, %cl
movl %eax, %edx
andb $0x1, %dl
cmpw $0x2, %ax
setb %al
addb %al, %al
orb %dl, %al
orb %cl, %al
movb %al, 0x810499(%rip)     # 0x820793
popq %rax
jmp 0x10014
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: bvc
static void bvc() {
    if ((status & FLAG_OVERFLOW) == 0) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
testb $0x40, 0x810471(%rip)   # 0x820793
jne 0x1035b
movzwl 0x810463(%rip), %eax    # 0x82078e
movw %ax, 0x81046e(%rip)     # 0x8207a0
movzwl 0x81046b(%rip), %ecx    # 0x8207a4
addw %ax, %cx
movw %cx, 0x81044b(%rip)     # 0x82078e
xorl %ecx, %eax
cmpw $0x100, %ax             # imm = 0x100
movl 0x810435(%rip), %eax    # 0x820784
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x810429(%rip)    # 0x820784
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: ror
static void ror() {
    value = getvalue();
    result = (value >> 1) | ((status & FLAG_CARRY) << 7);
   
    if (value & 1) setcarry();
        else clearcarry();
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rax
callq 0xff48
movzwl %ax, %eax
movw %ax, 0x8102ae(%rip)     # 0x8207a6
movl %eax, %ecx
shrl %ecx
movb 0x810291(%rip), %dl     # 0x820793
movl %edx, %esi
shlb $0x7, %sil
setne %r8b
movzbl %sil, %edi
orl %ecx, %edi
movw %di, 0x81028f(%rip)     # 0x8207a8
andb $0x7c, %dl
andb $0x1, %al
orb %dl, %al
testw %di, %di
sete %cl
addb %cl, %cl
shlb $0x7, %r8b
orb %al, %r8b
orb %cl, %r8b
movb %r8b, 0x81025a(%rip)    # 0x820793
popq %rax
jmp 0x10014
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: bvs
static void bvs() {
    if ((status & FLAG_OVERFLOW) == FLAG_OVERFLOW) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
testb $0x40, 0x810223(%rip)   # 0x820793
je 0x105a9
movzwl 0x810215(%rip), %eax    # 0x82078e
movw %ax, 0x810220(%rip)     # 0x8207a0
movzwl 0x81021d(%rip), %ecx    # 0x8207a4
addw %ax, %cx
movw %cx, 0x8101fd(%rip)     # 0x82078e
xorl %ecx, %eax
cmpw $0x100, %ax             # imm = 0x100
movl 0x8101e7(%rip), %eax    # 0x820784
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x8101db(%rip)    # 0x820784
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: sax
static void sax() {
        sta();
        stx();
        putvalue(a & x);
        if (penaltyop && penaltyaddr) clockticks6502--;
    }

// Assembly:
pushq %rax
callq 0x105b2
callq 0x10603
movb 0x8101c2(%rip), %al     # 0x820791
andb 0x8101bb(%rip), %al     # 0x820790
movzbl %al, %edi
callq 0x10014
cmpb $0x0, 0x8101b2(%rip)    # 0x820796
je 0x105f5
cmpb $0x0, 0x8101aa(%rip)    # 0x820797
je 0x105f5
decl 0x81018f(%rip)          # 0x820784
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: bcc
static void bcc() {
    if ((status & FLAG_CARRY) == 0) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
testb $0x1, 0x81012b(%rip)    # 0x820793
jne 0x106a1
movzwl 0x81011d(%rip), %eax    # 0x82078e
movw %ax, 0x810128(%rip)     # 0x8207a0
movzwl 0x810125(%rip), %ecx    # 0x8207a4
addw %ax, %cx
movw %cx, 0x810105(%rip)     # 0x82078e
xorl %ecx, %eax
cmpw $0x100, %ax             # imm = 0x100
movl 0x8100ef(%rip), %eax    # 0x820784
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x8100e3(%rip)    # 0x820784
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: ldy
static void ldy() {
    penaltyop = 1;
    value = getvalue();
    y = (uint8_t)(value & 0x00FF);
   
    zerocalc(y);
    signcalc(y);
}

// Assembly:
pushq %rax
movb $0x1, 0x8100b6(%rip)    # 0x820796
callq 0xff48
movw %ax, 0x8100ba(%rip)     # 0x8207a6
movb %al, 0x8100a0(%rip)     # 0x820792
testw %ax, %ax
sete %cl
movb 0x810095(%rip), %dl     # 0x820793
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x810084(%rip)     # 0x820793
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: lda
static void lda() {
    penaltyop = 1;
    value = getvalue();
    a = (uint8_t)(value & 0x00FF);
   
    zerocalc(a);
    signcalc(a);
}

// Assembly:
pushq %rax
movb $0x1, 0x81007d(%rip)    # 0x820796
callq 0xff48
movw %ax, 0x810081(%rip)     # 0x8207a6
movb %al, 0x810065(%rip)     # 0x820790
testw %ax, %ax
sete %cl
movb 0x81005c(%rip), %dl     # 0x820793
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x81004b(%rip)     # 0x820793
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rax
movb $0x1, 0x810044(%rip)    # 0x820796
callq 0xff48
movw %ax, 0x810048(%rip)     # 0x8207a6
movb %al, 0x81002d(%rip)     # 0x820791
testw %ax, %ax
sete %cl
movb 0x810023(%rip), %dl     # 0x820793
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x810012(%rip)     # 0x820793
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x80ffae(%rip)    # 0x820793
je 0x1081e
movzwl 0x80ffa0(%rip), %eax    # 0x82078e
movw %ax, 0x80ffab(%rip)     # 0x8207a0
movzwl 0x80ffa8(%rip), %ecx    # 0x8207a4
addw %ax, %cx
movw %cx, 0x80ff88(%rip)     # 0x82078e
xorl %ecx, %eax
cmpw $0x100, %ax             # imm = 0x100
movl 0x80ff72(%rip), %eax    # 0x820784
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80ff66(%rip)    # 0x820784
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rax
callq 0xff48
movw %ax, 0x80ff49(%rip)     # 0x8207a6
movzbl 0x80ff2e(%rip), %ecx    # 0x820792
movl %ecx, %edx
subw %ax, %dx
movw %dx, 0x80ff38(%rip)     # 0x8207a8
setae %sil
movb 0x80ff18(%rip), %dil    # 0x820793
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, 0x80fefc(%rip)     # 0x820793
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rax
movb $0x1, 0x80fef5(%rip)    # 0x820796
callq 0xff48
movw %ax, 0x80fef9(%rip)     # 0x8207a6
movzbl 0x80fedc(%rip), %ecx    # 0x820790
movl %ecx, %edx
subw %ax, %dx
movw %dx, 0x80fee8(%rip)     # 0x8207a8
setae %sil
movb 0x80fec8(%rip), %dil    # 0x820793
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, 0x80feac(%rip)     # 0x820793
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: dec
static void dec() {
    value = getvalue();
    result = value - 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rax
callq 0xff48
movw %ax, 0x80fe8b(%rip)     # 0x8207a6
decl %eax
movw %ax, 0x80fe84(%rip)     # 0x8207a8
testb %al, %al
sete %cl
movzwl %ax, %edi
movb 0x80fe61(%rip), %dl     # 0x820793
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x80fe50(%rip)     # 0x820793
popq %rax
jmp 0x10014
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x80fdf1(%rip)    # 0x820793
jne 0x109db
movzwl 0x80fde3(%rip), %eax    # 0x82078e
movw %ax, 0x80fdee(%rip)     # 0x8207a0
movzwl 0x80fdeb(%rip), %ecx    # 0x8207a4
addw %ax, %cx
movw %cx, 0x80fdcb(%rip)     # 0x82078e
xorl %ecx, %eax
cmpw $0x100, %ax             # imm = 0x100
movl 0x80fdb5(%rip), %eax    # 0x820784
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80fda9(%rip)    # 0x820784
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rax
callq 0xff48
movw %ax, 0x80fdb5(%rip)     # 0x8207a6
movzbl 0x80fd99(%rip), %ecx    # 0x820791
movl %ecx, %edx
subw %ax, %dx
movw %dx, 0x80fda4(%rip)     # 0x8207a8
setae %sil
movb 0x80fd84(%rip), %dil    # 0x820793
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, 0x80fd68(%rip)     # 0x820793
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mdpkh[P]retro6k/src/fake6502.c
// Function: inc
static void inc() {
    value = getvalue();
    result = value + 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rax
callq 0xff48
movw %ax, 0x80fbfc(%rip)     # 0x8207a6
incl %eax
movw %ax, 0x80fbf5(%rip)     # 0x8207a8
testb %al, %al
sete %cl
movzwl %ax, %edi
movb 0x80fbd2(%rip), %dl     # 0x820793
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x80fbc1(%rip)     # 0x820793
popq %rax
jmp 0x10014
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq -0x28(%rbp), %rbx
andq $0x0, (%rbx)
andl $0x0, 0x8(%rbx)
xorl %r14d, %r14d
cmpl $0x5, %r14d
je 0x232e
movq %rbx, %rdi
movl %r14d, %esi
callq 0x23aa
incl %r14d
jmp 0x2318
leaq -0x28(%rbp), %rbx
pushq $-0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x23aa
pushq $0x4
popq %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23f6
movq %rbx, %rdi
movl %r15d, %esi
callq 0x2630
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23f6
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x2630
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x2630
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23f6
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x2630
movq %rbx, %rdi
movq %r14, %rsi
callq 0x23f6
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x23ce
movq %rbx, %rdi
movl %r14d, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x279a
pushq $0x20
popq %rdi
callq 0x2100
movl %r14d, (%rax)
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movq %rax, (%rbx)
movl $0x1, 0x4(%rax)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::remove(int)
bool remove(int value) {
        NodePtr_t node_to_remove = findNodeToRemove(value);
        if(!node_to_remove) {
            std::cerr << red("Value to be removed not in the tree\n");
            return false;
        }
        if(!isfull(node_to_remove)) {
            remove_atleastonenull(node_to_remove);
            return true;
        }
        else {
            // find successor node first
            NodePtr_t successor_node = findSuccessor(node_to_remove);
            node_to_remove->value = successor_node->value;
            successor_node->color = node_to_remove->color;
            remove_atleastonenull(successor_node); // successor's left is NULL
            return true;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %r14
callq 0x32aa
movq %rax, %rbx
testq %rax, %rax
je 0x2689
cmpq $0x0, 0x10(%rbx)
je 0x2679
cmpq $0x0, 0x18(%rbx)
je 0x2679
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3498
movl (%rax), %ecx
movl %ecx, (%rbx)
movl 0x4(%rbx), %ecx
movl %ecx, 0x4(%rax)
movq %r14, %rdi
movq %rax, %rsi
jmp 0x267f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32cc
jmp 0x2736
leaq 0x1974(%rip), %rsi      # 0x4004
leaq -0x78(%rbp), %rdi
leaq -0x13(%rbp), %rdx
callq 0x29cc
leaq 0x19ed(%rip), %rsi      # 0x4091
leaq -0x58(%rbp), %rdi
leaq -0x12(%rbp), %rdx
callq 0x29cc
leaq -0x98(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x295a
leaq 0x1964(%rip), %rsi      # 0x4030
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x29cc
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x295a
movq 0x38f9(%rip), %rdi      # 0x5ff0
leaq -0xb8(%rbp), %rsi
callq 0x20e0
leaq -0xb8(%rbp), %rdi
callq 0x2070
leaq -0x38(%rbp), %rdi
callq 0x2070
leaq -0x98(%rbp), %rdi
callq 0x2070
leaq -0x58(%rbp), %rdi
callq 0x2070
leaq -0x78(%rbp), %rdi
callq 0x2070
testq %rbx, %rbx
setne %al
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x2070
jmp 0x275c
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x2070
jmp 0x276a
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x2070
jmp 0x277b
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x2070
jmp 0x2789
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::_insert(Node*, int)
bool _insert(NodePtr_t root, int value) {
      auto [father, pptr] = findInsertion(root, value);
      if(!father) {
        std::cerr << red("inserted value already in the tree\n");
        return false;
      }
      NodePtr_t new_node = new Node_t(value);
      new_node->color = Color::red;
      new_node->father = father;
      (*pptr) = new_node;
      // father node is black
      if(isblack(father)) {
          return true;
      }
      else {
          ascend_fatherIsRed(new_node, father);
          return true;
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movl %edx, %r15d
movq %rdi, %r14
callq 0x291e
movq %rax, %rbx
testq %rax, %rax
je 0x27fd
movq %rdx, %r12
pushq $0x20
popq %rdi
callq 0x2100
movl %r15d, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movups %xmm0, 0x10(%rax)
movq %rbx, 0x8(%rax)
movq %rax, (%r12)
cmpl $0x1, 0x4(%rbx)
je 0x28b3
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2a08
jmp 0x28b3
leaq 0x1800(%rip), %rsi      # 0x4004
leaq -0x88(%rbp), %rdi
leaq -0x23(%rbp), %rdx
callq 0x29cc
leaq 0x17f1(%rip), %rsi      # 0x400c
leaq -0x68(%rbp), %rdi
leaq -0x22(%rbp), %rdx
callq 0x29cc
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x295a
leaq 0x17ea(%rip), %rsi      # 0x4030
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x29cc
leaq -0xc8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x295a
movq 0x377f(%rip), %rdi      # 0x5ff0
leaq -0xc8(%rbp), %rsi
callq 0x20e0
leaq -0xc8(%rbp), %rdi
callq 0x2070
leaq -0x48(%rbp), %rdi
callq 0x2070
leaq -0xa8(%rbp), %rdi
callq 0x2070
leaq -0x68(%rbp), %rdi
callq 0x2070
leaq -0x88(%rbp), %rdi
callq 0x2070
testq %rbx, %rbx
setne %al
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x2070
jmp 0x28dd
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x2070
jmp 0x28eb
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x2070
jmp 0x28fc
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2070
jmp 0x290a
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/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 0x292e
xorl %eax, %eax
xorl %edx, %edx
jmp 0x2958
movq %rsi, %rax
jle 0x2942
movq 0x10(%rax), %rsi
testq %rsi, %rsi
jne 0x294d
leaq 0x10(%rax), %rdx
jmp 0x2958
jge 0x2954
movq 0x18(%rax), %rsi
testq %rsi, %rsi
je 0x2954
callq 0x291e
jmp 0x2958
leaq 0x18(%rax), %rdx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::ascend_fatherIsRed(Node*, Node*)
void ascend_fatherIsRed(NodePtr_t inserted_node, NodePtr_t father) {
      NodePtr_t gf = father->father; // grand father must be black
      NodePtr_t uncle = (father==gf->left)?gf->right:gf->left;
      // uncle node is red
      if(uncle && isred(uncle)) {
          father->color = Color::black;
          uncle->color = Color::black;
          gf->color = Color::red;
          if(gf==this->root) { gf->color = Color::black; return;}
          else if(isblack(gf->father)) return;
          else ascend_fatherIsRed(gf, gf->father);
      }
      // uncle node is black
      else{
          // same direction
          if(inserted_node == father->left && father == gf->left) {
              father->color = Color::black;
              gf->color = Color::red;
              rotate_right(father, gf);
          }
          else if(inserted_node==father->right && father==gf->right) {
              father->color = Color::black;
              gf->color = Color::red;
              rotate_left(gf, father);
          }
          // not same direction
          else if(inserted_node==father->right && father==gf->left) {
              auto p = rotate_left(father, inserted_node);
              p->color = Color::black;
              gf->color = Color::red;
              rotate_right(p, gf);
          }
          else {
              auto p = rotate_right(inserted_node, father);
              p->color = Color::black;
              gf->color = Color::red;
              rotate_left(gf, p);
          }
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movq (%rdi), %rcx
pushq $0x1
popq %rsi
movq 0x8(%rdx), %r14
movq 0x10(%r14), %rdi
movq %rdi, %r8
cmpq %rdx, %rdi
jne 0x2a2f
movq 0x18(%r14), %r8
testq %r8, %r8
je 0x2a5b
cmpl $0x0, 0x4(%r8)
jne 0x2a5b
movl %esi, 0x4(%rdx)
movl %esi, 0x4(%r8)
andl $0x0, 0x4(%r14)
cmpq %rcx, %r14
je 0x2ab3
movq 0x8(%r14), %rdx
cmpl $0x1, 0x4(%rdx)
movq %r14, %rax
jne 0x2a1b
jmp 0x2abb
cmpq %rdx, %rdi
jne 0x2a84
cmpq %rax, 0x10(%rdx)
jne 0x2a84
movl $0x1, 0x4(%rdx)
andl $0x0, 0x4(%r14)
movq %rbx, %rdi
movq %rdx, %rsi
movq %r14, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x2bae
cmpq %rax, 0x18(%rdx)
je 0x2ac0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2bae
movl $0x1, 0x4(%rax)
andl $0x0, 0x4(%r14)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x2bec
movl $0x1, 0x4(%r14)
popq %rbx
popq %r14
popq %rbp
retq
cmpq %rdx, 0x18(%r14)
je 0x2aed
cmpq %rdx, %rdi
jne 0x2a8a
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x2bec
movl $0x1, 0x4(%rax)
andl $0x0, 0x4(%r14)
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x2a78
movl $0x1, 0x4(%rdx)
andl $0x0, 0x4(%r14)
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x2aaa
// File: /workspace/github_cpp_makefile_star2_O2/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::rotate_right(Node*, Node*)
NodePtr_t rotate_right(NodePtr_t lhs, NodePtr_t rhs) {
        NodePtr_t rhs_f = rhs->father;
        NodePtr_t tmp_r = lhs->right;
        rhs->left = tmp_r;
        lhs->right = rhs;
        rhs->father = lhs;
        if(rhs_f) {
            if(rhs==rhs_f->left) rhs_f->left = lhs ;
            else rhs_f->right = lhs;
            lhs->father = rhs_f;
        }
        else {
            this->root = lhs;
            lhs->father = NULL;
        }
        return lhs;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
movq 0x8(%rdx), %rcx
movq 0x18(%rsi), %rsi
movq %rsi, 0x10(%rdx)
movq %rdx, 0x18(%rax)
movq %rax, 0x8(%rdx)
testq %rcx, %rcx
je 0x2be0
leaq 0x10(%rcx), %rsi
leaq 0x18(%rcx), %rdi
cmpq %rdx, 0x10(%rcx)
cmoveq %rsi, %rdi
jmp 0x2be2
xorl %ecx, %ecx
movq %rax, (%rdi)
movq %rcx, 0x8(%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::rotate_left(Node*, Node*)
NodePtr_t rotate_left(NodePtr_t lhs, NodePtr_t rhs) {
        NodePtr_t lhs_f = lhs->father;
        NodePtr_t tmp_l = rhs->left;
        lhs->right = tmp_l;
        rhs->left = lhs;
        lhs->father = rhs;
        if(lhs_f) {
            if(lhs==lhs_f->left)  lhs_f->left = rhs;
            else lhs_f->right = rhs;
            rhs->father = lhs_f;
        }else {
            this->root = rhs;
            rhs->father = NULL;
        }
        return rhs;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdx, %rax
movq 0x8(%rsi), %rcx
movq 0x10(%rdx), %rdx
movq %rdx, 0x18(%rsi)
movq %rsi, 0x10(%rax)
movq %rax, 0x8(%rsi)
testq %rcx, %rcx
je 0x2c1e
leaq 0x10(%rcx), %rdx
leaq 0x18(%rcx), %rdi
cmpq %rsi, 0x10(%rcx)
cmoveq %rdx, %rdi
jmp 0x2c20
xorl %ecx, %ecx
movq %rax, (%rdi)
movq %rcx, 0x8(%rax)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %r14, %r14
je 0x2ca7
movslq 0x8(%r15), %rax
cmpq %rax, %rbx
jbe 0x2c8f
movl %ebx, 0x8(%r15)
movq 0x10(%r14), %rsi
incq %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x2c6a
movq 0x18(%r14), %r14
jmp 0x2c7d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::findNodeToRemove(int)
NodePtr_t findNodeToRemove(int value) {
        NodePtr_t p = this->root;
        while(p) {
            int cur_value = p->value;
            if(value==cur_value)
                return p;
            else if(value<cur_value)  p=p->left;
            else p=p->right;
        }
        return NULL;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
testq %rax, %rax
je 0x32ca
cmpl %esi, (%rax)
je 0x32ca
setle %cl
movzbl %cl, %ecx
leaq (%rax,%rcx,8), %rdi
addq $0x10, %rdi
jmp 0x32ae
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DRSY[P]MyRBTree/main.cpp
// Function: RBTree::findSuccessor(Node*)
NodePtr_t findSuccessor(NodePtr_t node) {
        assert(node->right!=NULL);
        NodePtr_t p = node->right;
        while(p->left) 
            p = p->left;
        return p;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rsi), %rcx
testq %rcx, %rcx
je 0x34b3
movq %rcx, %rax
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0x34a5
popq %rbp
retq
leaq 0xc8f(%rip), %rdi       # 0x4149
leaq 0xc12(%rip), %rsi       # 0x40d3
leaq 0xc93(%rip), %rcx       # 0x415b
movl $0x131, %edx            # imm = 0x131
callq 0x2090
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
movl 0x14f9a(%rip), %eax     # 0x182d8
cmpl %eax, %ebp
jge 0x33e1
xorl %r12d, %r12d
cmpl %eax, %r12d
jge 0x33da
cmpl %r12d, %ebp
je 0x33d2
cmpl $0x0, 0x14e92(%rip)     # 0x181f0
je 0x337b
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x473e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a3
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x4acb
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a3
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x4d33
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a3
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x5248
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a3
movl 0x14f06(%rip), %eax     # 0x182d8
incl %r12d
jmp 0x3349
incl %ebp
jmp 0x333e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x78(%rsp), %rax
movq %rax, -0x30(%rax)
pushq $0x1
popq %rcx
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 0x40(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x80(%rsp), %rdi
callq 0x6972
leaq 0x48(%rsp), %rdi
movq %rsp, %rsi
callq 0x878e
andq $0x0, (%rax)
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x8ad6
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0x8d0a
movb $0x1, (%rax)
leaq 0x80(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x48(%rsp), %r13
movq 0x90(%rsp), %rax
cmpq %rax, 0xb0(%rsp)
je 0x381f
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq %r14, %rdi
callq 0x9050
movq %r15, %rdi
movq %r12, %rsi
callq 0x8d0a
movb $0x0, (%rax)
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x644f
jmp 0x37d7
leaq 0x80(%rsp), %rdi
callq 0x73c4
leaq 0x10(%rsp), %rdi
callq 0x741c
leaq 0x48(%rsp), %rdi
callq 0x74c4
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x385d
movq %rax, %r14
jmp 0x386d
jmp 0x385d
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0x73c4
leaq 0x10(%rsp), %rdi
callq 0x741c
movq %rbx, %rdi
callq 0x69c4
leaq 0x48(%rsp), %rdi
callq 0x74c4
movq %r14, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
leaq 0x14820(%rip), %rbx     # 0x18408
movq %rbx, %r14
movq (%r14), %r14
cmpq %rbx, %r14
je 0x3c98
movq 0x10(%r14), %rax
movq 0x80(%rax), %r15
movq 0x88(%rax), %r12
cmpq %r12, %r15
je 0x3c22
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3c1c
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r15
jmp 0x3c09
movq 0x10(%r14), %rax
movq 0x80(%rax), %rcx
cmpq %rcx, 0x88(%rax)
je 0x3c41
movq %rcx, 0x88(%rax)
movq 0x10(%r14), %rax
movq 0x98(%rax), %r15
movq 0xa0(%rax), %r12
cmpq %r12, %r15
je 0x3c68
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3c62
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r15
jmp 0x3c4f
movq 0x10(%r14), %rdi
movq 0x98(%rdi), %rax
cmpq %rax, 0xa0(%rdi)
je 0x3c87
movq %rax, 0xa0(%rdi)
movq 0x10(%r14), %rdi
addq $0xb0, %rdi
callq 0x681c
jmp 0x3beb
leaq 0x14751(%rip), %rbx     # 0x183f0
movl $0xb0, %r14d
movq %rbx, %r15
movq (%r15), %r15
cmpq %rbx, %r15
je 0x3ce5
movq 0x10(%r15), %r12
addq %r14, %r12
movq %r12, %r13
movq (%r13), %r13
cmpq %r12, %r13
je 0x3cd4
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x3cba
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3cba
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x3ca8
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3ca8
leaq 0x14704(%rip), %rdi     # 0x183f0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x6834
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/simulator.cpp
// Function: build_candidate_link(Aux_graph&, LightPath*)
void build_candidate_link(Aux_graph& a_graph, LightPath* lpath)
{
    if(lpath == NULL)
    {
        return;
    }

    int source = lpath->p_path.front();
    int destination = lpath->p_path.back();

    Aux_node* v_t_node = NULL;
    Aux_node* v_r_node = NULL;

    switch (lpath->type)
    {
    case LightPath::OTDM:
        v_t_node = a_graph.get_OTDM_virtual_transmitting_node(source);
        v_r_node = a_graph.get_OTDM_virtual_receiving_node(destination);
        if(lpath->available_bitrate >= OTDM_threshold)
        {
            lpath->weight = lpath->weight * 0.1;
        }
        break;
    case LightPath::OFDM:
        v_t_node = a_graph.get_OFDM_virtual_transmitting_node(source);
        v_r_node = a_graph.get_OFDM_virtual_receiving_node(destination);
        break;
    case LightPath::OFDM_WB:
        v_t_node = a_graph.get_OFDM_WB_virtual_transmitting_node(source);
        v_r_node = a_graph.get_OFDM_WB_virtual_receiving_node(destination);
        break;
    case LightPath::OFDM_WOB:
        v_t_node = a_graph.get_OFDM_WOB_virtual_transmitting_node(source);
        v_r_node = a_graph.get_OFDM_WOB_virtual_receiving_node(destination);
        break;
    default:
        cerr << "undefined LightPath type\n";
        break;
    }

    Aux_link* c_link = a_graph.create_aux_link(v_t_node, v_r_node, lpath->weight, Aux_link::candidate_link);

    c_link->light_path = lpath;              // make aux_link track light path

    lpath->aux_link_list.push_back(c_link);  // make light path track aux_link

    candidate_light_path_list.push_back(lpath);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
testq %rsi, %rsi
je 0x4ac0
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rsi), %eax
cmpq $0x3, %rax
ja 0x4a6a
movq 0x68(%rbx), %rcx
movl (%rcx), %esi
movq 0x70(%rbx), %rcx
movl -0x4(%rcx), %ebp
leaq 0xa6be(%rip), %rcx      # 0xf0a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0xdfe0
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0xdff0
movq %rax, %rdx
movl 0x44(%rbx), %eax
cmpl 0x137e8(%rip), %eax     # 0x181f4
jl 0x4a82
movsd 0x48(%rbx), %xmm0
mulsd 0xa605(%rip), %xmm0     # 0xf020
movsd %xmm0, 0x48(%rbx)
jmp 0x4a82
movq %r14, %rdi
callq 0xdfa4
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0xdfb0
jmp 0x4a65
movq %r14, %rdi
callq 0xdf8c
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0xdf98
jmp 0x4a65
movq %r14, %rdi
callq 0xdfc0
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0xdfd0
movq %rax, %rdx
jmp 0x4a82
movq 0x1357f(%rip), %rdi     # 0x17ff0
leaq 0xa77d(%rip), %rsi      # 0xf1f5
callq 0x21e0
xorl %r15d, %r15d
xorl %edx, %edx
movsd 0x48(%rbx), %xmm0
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xdc98
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, 0x8(%rax)
addq $0xb0, %rbx
movq %rbx, %rdi
callq 0x6810
leaq 0x1393a(%rip), %rdi     # 0x183f0
leaq 0x8(%rsp), %rsi
callq 0x684c
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/simulator.cpp
// Function: 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), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
pushq $0x58
popq %rcx
cqto
idivq %rcx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
addq $0x8, %rsi
cmpq %rcx, %rax
je 0x5f29
cmpb $0x0, (%rsi)
je 0x5f25
incq %rcx
addq $0x58, %rsi
jmp 0x5f12
movl %ecx, %eax
popq %rcx
retq
movq 0x120a0(%rip), %rdi     # 0x17fd0
leaq 0x9304(%rip), %rsi      # 0xf23b
callq 0x21e0
pushq $0x1
popq %rdi
callq 0x2240
// File: /workspace/github_cpp_makefile_star2_O2/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:
movq 0x18(%rdi), %rcx
movslq %esi, %rsi
movslq %edx, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
jg 0x5f66
xorl %edi, %edi
cmpl $-0x1, (%rcx,%rsi,4)
sete %dil
addl %edi, %eax
incq %rsi
jmp 0x5f50
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x5f91
movslq 0x1224b(%rip), %rsi     # 0x181c8
cmpq %rsi, %rdx
jge 0x5fad
leaq 0x1(%rdx), %rax
cmpl $-0x1, 0x4(%rcx,%rdx,4)
movq %rax, %rdx
jne 0x5f7d
retq
movslq %esi, %rsi
incl %eax
pushq $-0x1
popq %rdi
cmpq %rsi, %rdx
jle 0x5fb2
decl %eax
cmpl $-0x1, -0x4(%rcx,%rdx,4)
leaq -0x1(%rdx), %rdx
je 0x5f99
jmp 0x5f90
incl %esi
movl %esi, %eax
retq
movl %edi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
pushq $0x1
popq %r13
pushq $-0x1
popq %rbx
leal -0x1(%r13), %ecx
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x6015
movl (%rax,%rcx,4), %esi
movl %r13d, %ecx
movl (%rax,%rcx,4), %edx
movq %r14, %rdi
callq 0x9148
movq %rax, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x5f67
incl %r13d
testl %eax, %eax
jle 0x5fd2
movl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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)
movq %rdi, %r14
movl 0x121a2(%rip), %eax     # 0x181e4
movl %edx, %ecx
notl %ecx
addl %esi, %ecx
leal (%rcx,%rax,2), %edi
leal (%rcx,%rax,2), %r8d
decl %r8d
leal 0x1(%rsi), %eax
movslq %esi, %rcx
subl %r8d, %esi
cmpl $-0x1, %esi
movl %r8d, 0x14(%rsp)
cmovgel %r8d, %eax
leal -0x1(%rdx,%rdi), %esi
movl %esi, 0x10(%rsp)
movslq %eax, %r12
movslq %edx, %r13
leaq -0x4(,%rcx,4), %rax
movq %rax, 0x18(%rsp)
movb $0x1, %al
movl %eax, 0xc(%rsp)
xorl %ebx, %ebx
pushq $0x1
popq %r15
xorl %ecx, %ecx
movl %ecx, %ebp
movl %ebx, %ecx
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x6129
movl (%rax,%rcx,4), %esi
leal 0x1(%rcx), %ebx
movl (%rax,%rbx,4), %edx
movq 0x20(%rsp), %rdi
callq 0x9148
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
leaq (%rax,%rcx), %rdx
movq %r15, %rcx
cmpq %r12, %rcx
jge 0x60ea
cmpl $0x0, (%rdx)
je 0x60e0
incq %rcx
addq $-0x4, %rdx
jmp 0x60cd
addl %ecx, %ebp
movl $0x0, 0xc(%rsp)
movl 0x120d8(%rip), %ecx     # 0x181c8
movl %ecx, %edx
subl %r13d, %edx
cmpl %ecx, 0x10(%rsp)
cmovlel 0x14(%rsp), %edx
movl %ebp, %ecx
movslq %edx, %rdx
leaq (%rax,%r13,4), %rsi
movq %r15, %rax
cmpq %rdx, %rax
jge 0x6090
cmpl $0x0, (%rsi,%rax,4)
je 0x611a
incq %rax
jmp 0x610a
addl %eax, %ecx
movl $0x0, 0xc(%rsp)
jmp 0x6090
movl 0x120b5(%rip), %eax     # 0x181e4
imull 0x12086(%rip), %eax     # 0x181bc
shll $0x2, %eax
testb $0x1, 0xc(%rsp)
cmovel %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/ynilu[P]elastic/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
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %eax
movq %rax, 0x10(%rsp)
movslq %edx, %rax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
pushq $0x1
popq %r13
leal -0x1(%r13), %ecx
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x61e9
movl (%rax,%rcx,4), %esi
movl %r13d, %ecx
movl (%rax,%rcx,4), %edx
movq %rbx, %rdi
callq 0x9148
testl %r14d, %r14d
jle 0x61c5
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 0x61e4
movq 0x18(%rax), %rax
xorl %ecx, %ecx
movq 0x8(%rsp), %rdx
cmpl $-0x1, 0x4(%rax,%rdx,4)
sete %cl
addl %ecx, %r12d
incl %r13d
jmp 0x617f
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_O2/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 $0x18, %rsp
movq %rcx, %rbx
movl %edx, 0x4(%rsp)
movl %esi, (%rsp)
movq %rdi, 0x8(%rsp)
xorl %eax, %eax
xorl %r12d, %r12d
movl %eax, %ecx
movq 0x8(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x62dd
movl (%rax,%rcx,4), %r13d
incl %ecx
movq %rcx, 0x10(%rsp)
movl (%rax,%rcx,4), %r15d
movq %rbx, %rdi
movl %r13d, %esi
callq 0x98a8
movq 0x10(%rax), %rbp
movq 0x18(%rax), %r14
cmpq %r14, %rbp
je 0x6290
movl (%rbp), %esi
cmpl %r15d, %esi
je 0x628a
movq %rbx, %rdi
movl %r13d, %edx
callq 0x9148
movq %rax, %rdi
movl (%rsp), %esi
movl 0x4(%rsp), %edx
callq 0x5f44
addl %eax, %r12d
addq $0x4, %rbp
jmp 0x6260
movq %rbx, %rdi
movl %r15d, %esi
callq 0x98a8
movq 0x10(%rax), %rbp
movq 0x18(%rax), %r14
cmpq %r14, %rbp
je 0x62d3
movl (%rbp), %edx
cmpl %r13d, %edx
je 0x62cd
movq %rbx, %rdi
movl %r15d, %esi
callq 0x9148
movq %rax, %rdi
movl (%rsp), %esi
movl 0x4(%rsp), %edx
callq 0x5f44
addl %eax, %r12d
addq $0x4, %rbp
jmp 0x62a3
movq 0x10(%rsp), %rax
jmp 0x621d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq