LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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 %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x8147b6(%rip)     # 0x832886
movzwl 0x8147af(%rip), %eax    # 0x832886
sarl %eax
movzbl 0x814793(%rip), %ecx    # 0x832873
andl $0x1, %ecx
shll $0x7, %ecx
orl %ecx, %eax
movw %ax, 0x814799(%rip)     # 0x832888
movzwl 0x814790(%rip), %eax    # 0x832886
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1e110
movzbl 0x81476e(%rip), %eax    # 0x832873
orl $0x1, %eax
movb %al, 0x814765(%rip)     # 0x832873
jmp 0x1e120
movzbl 0x81475c(%rip), %eax    # 0x832873
andl $-0x2, %eax
movb %al, 0x814753(%rip)     # 0x832873
movzwl 0x814761(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1e143
movzbl 0x81473b(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x814732(%rip)     # 0x832873
jmp 0x1e153
movzbl 0x814729(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x814720(%rip)     # 0x832873
movzwl 0x81472e(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1e178
movzbl 0x814708(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x8146fd(%rip)     # 0x832873
jmp 0x1e18a
movzbl 0x8146f4(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x8146e9(%rip)     # 0x832873
movzwl 0x8146f7(%rip), %edi    # 0x832888
callq 0x1d5e0
popq %rbp
retq
nopl (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movzbl 0x814648(%rip), %eax    # 0x832873
andl $0x40, %eax
cmpl $0x40, %eax
jne 0x1e297
movw 0x814634(%rip), %ax     # 0x83286e
movw %ax, 0x81463f(%rip)     # 0x832880
movzwl 0x81463c(%rip), %ecx    # 0x832884
movzwl 0x81461f(%rip), %eax    # 0x83286e
addl %ecx, %eax
movw %ax, 0x814616(%rip)     # 0x83286e
movzwl 0x814621(%rip), %eax    # 0x832880
andl $0xff00, %eax           # imm = 0xFF00
movzwl 0x814603(%rip), %ecx    # 0x83286e
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1e286
movl 0x8145e9(%rip), %eax    # 0x832864
addl $0x2, %eax
movl %eax, 0x8145e0(%rip)    # 0x832864
jmp 0x1e295
movl 0x8145d8(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x8145cf(%rip)    # 0x832864
jmp 0x1e297
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: sax
static void sax() {
        sta();
        stx();
        putvalue(a & x);
        if (penaltyop && penaltyaddr) clockticks6502--;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1e2c0
callq 0x1e350
movzbl 0x81457b(%rip), %eax    # 0x832870
movzbl 0x814575(%rip), %ecx    # 0x832871
andl %ecx, %eax
movzwl %ax, %edi
callq 0x1d5e0
movzbl 0x814569(%rip), %eax    # 0x832876
cmpl $0x0, %eax
je 0x1e32d
movzbl 0x81455e(%rip), %eax    # 0x832877
cmpl $0x0, %eax
je 0x1e32d
movl 0x814540(%rip), %eax    # 0x832864
addl $-0x1, %eax
movl %eax, 0x814537(%rip)    # 0x832864
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
movzbl 0x8143f8(%rip), %eax    # 0x832873
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1e4e7
movw 0x8143e4(%rip), %ax     # 0x83286e
movw %ax, 0x8143ef(%rip)     # 0x832880
movzwl 0x8143ec(%rip), %ecx    # 0x832884
movzwl 0x8143cf(%rip), %eax    # 0x83286e
addl %ecx, %eax
movw %ax, 0x8143c6(%rip)     # 0x83286e
movzwl 0x8143d1(%rip), %eax    # 0x832880
andl $0xff00, %eax           # imm = 0xFF00
movzwl 0x8143b3(%rip), %ecx    # 0x83286e
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1e4d6
movl 0x814399(%rip), %eax    # 0x832864
addl $0x2, %eax
movl %eax, 0x814390(%rip)    # 0x832864
jmp 0x1e4e5
movl 0x814388(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x81437f(%rip)    # 0x832864
jmp 0x1e4e7
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
movb $0x1, 0x8142db(%rip)    # 0x832876
callq 0x1d420
movw %ax, 0x8142df(%rip)     # 0x832886
movzwl 0x8142d8(%rip), %eax    # 0x832886
andl $0xff, %eax
movb %al, 0x8142b9(%rip)     # 0x832872
movzbl 0x8142b2(%rip), %eax    # 0x832872
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1e5dc
movzbl 0x8142a2(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x814299(%rip)     # 0x832873
jmp 0x1e5ec
movzbl 0x814290(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x814287(%rip)     # 0x832873
movzbl 0x81427f(%rip), %eax    # 0x832872
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1e611
movzbl 0x81426f(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x814264(%rip)     # 0x832873
jmp 0x1e623
movzbl 0x81425b(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x814250(%rip)     # 0x832873
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
movb $0x1, 0x81423b(%rip)    # 0x832876
callq 0x1d420
movw %ax, 0x81423f(%rip)     # 0x832886
movzwl 0x814238(%rip), %eax    # 0x832886
andl $0xff, %eax
movb %al, 0x814217(%rip)     # 0x832870
movzbl 0x814210(%rip), %eax    # 0x832870
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1e67c
movzbl 0x814202(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x8141f9(%rip)     # 0x832873
jmp 0x1e68c
movzbl 0x8141f0(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x8141e7(%rip)     # 0x832873
movzbl 0x8141dd(%rip), %eax    # 0x832870
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1e6b1
movzbl 0x8141cf(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x8141c4(%rip)     # 0x832873
jmp 0x1e6c3
movzbl 0x8141bb(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x8141b0(%rip)     # 0x832873
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
movb $0x1, 0x81419b(%rip)    # 0x832876
callq 0x1d420
movw %ax, 0x81419f(%rip)     # 0x832886
movzwl 0x814198(%rip), %eax    # 0x832886
andl $0xff, %eax
movb %al, 0x814178(%rip)     # 0x832871
movzbl 0x814171(%rip), %eax    # 0x832871
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1e71c
movzbl 0x814162(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x814159(%rip)     # 0x832873
jmp 0x1e72c
movzbl 0x814150(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x814147(%rip)     # 0x832873
movzbl 0x81413e(%rip), %eax    # 0x832871
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1e751
movzbl 0x81412f(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x814124(%rip)     # 0x832873
jmp 0x1e763
movzbl 0x81411b(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x814110(%rip)     # 0x832873
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movzbl 0x813fe8(%rip), %eax    # 0x832873
andl $0x1, %eax
cmpl $0x1, %eax
jne 0x1e8f7
movw 0x813fd4(%rip), %ax     # 0x83286e
movw %ax, 0x813fdf(%rip)     # 0x832880
movzwl 0x813fdc(%rip), %ecx    # 0x832884
movzwl 0x813fbf(%rip), %eax    # 0x83286e
addl %ecx, %eax
movw %ax, 0x813fb6(%rip)     # 0x83286e
movzwl 0x813fc1(%rip), %eax    # 0x832880
andl $0xff00, %eax           # imm = 0xFF00
movzwl 0x813fa3(%rip), %ecx    # 0x83286e
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1e8e6
movl 0x813f89(%rip), %eax    # 0x832864
addl $0x2, %eax
movl %eax, 0x813f80(%rip)    # 0x832864
jmp 0x1e8f5
movl 0x813f78(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x813f6f(%rip)    # 0x832864
jmp 0x1e8f7
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x813ed6(%rip)     # 0x832886
movzbl 0x813ebb(%rip), %eax    # 0x832872
movzwl %ax, %eax
movzwl 0x813ec5(%rip), %ecx    # 0x832886
subl %ecx, %eax
movw %ax, 0x813ebe(%rip)     # 0x832888
movzbl 0x813ea1(%rip), %eax    # 0x832872
movzwl 0x813eae(%rip), %ecx    # 0x832886
andl $0xff, %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jl 0x1e9f7
movzbl 0x813e87(%rip), %eax    # 0x832873
orl $0x1, %eax
movb %al, 0x813e7e(%rip)     # 0x832873
jmp 0x1ea07
movzbl 0x813e75(%rip), %eax    # 0x832873
andl $-0x2, %eax
movb %al, 0x813e6c(%rip)     # 0x832873
movzbl 0x813e64(%rip), %eax    # 0x832872
movzwl 0x813e71(%rip), %ecx    # 0x832886
andl $0xff, %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x1ea34
movzbl 0x813e4a(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x813e41(%rip)     # 0x832873
jmp 0x1ea44
movzbl 0x813e38(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x813e2f(%rip)     # 0x832873
movzwl 0x813e3d(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1ea69
movzbl 0x813e17(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x813e0c(%rip)     # 0x832873
jmp 0x1ea7b
movzbl 0x813e03(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x813df8(%rip)     # 0x832873
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
movb $0x1, 0x813deb(%rip)    # 0x832876
callq 0x1d420
movw %ax, 0x813def(%rip)     # 0x832886
movzbl 0x813dd2(%rip), %eax    # 0x832870
movzwl %ax, %eax
movzwl 0x813dde(%rip), %ecx    # 0x832886
subl %ecx, %eax
movw %ax, 0x813dd7(%rip)     # 0x832888
movzbl 0x813db8(%rip), %eax    # 0x832870
movzwl 0x813dc7(%rip), %ecx    # 0x832886
andl $0xff, %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jl 0x1eade
movzbl 0x813da0(%rip), %eax    # 0x832873
orl $0x1, %eax
movb %al, 0x813d97(%rip)     # 0x832873
jmp 0x1eaee
movzbl 0x813d8e(%rip), %eax    # 0x832873
andl $-0x2, %eax
movb %al, 0x813d85(%rip)     # 0x832873
movzbl 0x813d7b(%rip), %eax    # 0x832870
movzwl 0x813d8a(%rip), %ecx    # 0x832886
andl $0xff, %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x1eb1b
movzbl 0x813d63(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x813d5a(%rip)     # 0x832873
jmp 0x1eb2b
movzbl 0x813d51(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x813d48(%rip)     # 0x832873
movzwl 0x813d56(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1eb50
movzbl 0x813d30(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x813d25(%rip)     # 0x832873
jmp 0x1eb62
movzbl 0x813d1c(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x813d11(%rip)     # 0x832873
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: dec
static void dec() {
    value = getvalue();
    result = value - 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x813cc6(%rip)     # 0x832886
movzwl 0x813cbf(%rip), %eax    # 0x832886
subl $0x1, %eax
movw %ax, 0x813cb7(%rip)     # 0x832888
movzwl 0x813cb0(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1ebf4
movzbl 0x813c8a(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x813c81(%rip)     # 0x832873
jmp 0x1ec04
movzbl 0x813c78(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x813c6f(%rip)     # 0x832873
movzwl 0x813c7d(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1ec29
movzbl 0x813c57(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x813c4c(%rip)     # 0x832873
jmp 0x1ec3b
movzbl 0x813c43(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x813c38(%rip)     # 0x832873
movzwl 0x813c46(%rip), %edi    # 0x832888
callq 0x1d5e0
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movzbl 0x813b18(%rip), %eax    # 0x832873
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x1edc7
movw 0x813b04(%rip), %ax     # 0x83286e
movw %ax, 0x813b0f(%rip)     # 0x832880
movzwl 0x813b0c(%rip), %ecx    # 0x832884
movzwl 0x813aef(%rip), %eax    # 0x83286e
addl %ecx, %eax
movw %ax, 0x813ae6(%rip)     # 0x83286e
movzwl 0x813af1(%rip), %eax    # 0x832880
andl $0xff00, %eax           # imm = 0xFF00
movzwl 0x813ad3(%rip), %ecx    # 0x83286e
andl $0xff00, %ecx           # imm = 0xFF00
cmpl %ecx, %eax
je 0x1edb6
movl 0x813ab9(%rip), %eax    # 0x832864
addl $0x2, %eax
movl %eax, 0x813ab0(%rip)    # 0x832864
jmp 0x1edc5
movl 0x813aa8(%rip), %eax    # 0x832864
addl $0x1, %eax
movl %eax, 0x813a9f(%rip)    # 0x832864
jmp 0x1edc7
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x813a86(%rip)     # 0x832886
movzbl 0x813a6a(%rip), %eax    # 0x832871
movzwl %ax, %eax
movzwl 0x813a75(%rip), %ecx    # 0x832886
subl %ecx, %eax
movw %ax, 0x813a6e(%rip)     # 0x832888
movzbl 0x813a50(%rip), %eax    # 0x832871
movzwl 0x813a5e(%rip), %ecx    # 0x832886
andl $0xff, %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jl 0x1ee47
movzbl 0x813a37(%rip), %eax    # 0x832873
orl $0x1, %eax
movb %al, 0x813a2e(%rip)     # 0x832873
jmp 0x1ee57
movzbl 0x813a25(%rip), %eax    # 0x832873
andl $-0x2, %eax
movb %al, 0x813a1c(%rip)     # 0x832873
movzbl 0x813a13(%rip), %eax    # 0x832871
movzwl 0x813a21(%rip), %ecx    # 0x832886
andl $0xff, %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x1ee84
movzbl 0x8139fa(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x8139f1(%rip)     # 0x832873
jmp 0x1ee94
movzbl 0x8139e8(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x8139df(%rip)     # 0x832873
movzwl 0x8139ed(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1eeb9
movzbl 0x8139c7(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x8139bc(%rip)     # 0x832873
jmp 0x1eecb
movzbl 0x8139b3(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x8139a8(%rip)     # 0x832873
popq %rbp
retq
nopl (%rax)
// File: mdpkh[P]retro6k/src/fake6502.c
// Function: inc
static void inc() {
    value = getvalue();
    result = value + 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x1d420
movw %ax, 0x813626(%rip)     # 0x832886
movzwl 0x81361f(%rip), %eax    # 0x832886
addl $0x1, %eax
movw %ax, 0x813617(%rip)     # 0x832888
movzwl 0x813610(%rip), %eax    # 0x832888
andl $0xff, %eax
cmpl $0x0, %eax
je 0x1f294
movzbl 0x8135ea(%rip), %eax    # 0x832873
andl $-0x3, %eax
movb %al, 0x8135e1(%rip)     # 0x832873
jmp 0x1f2a4
movzbl 0x8135d8(%rip), %eax    # 0x832873
orl $0x2, %eax
movb %al, 0x8135cf(%rip)     # 0x832873
movzwl 0x8135dd(%rip), %eax    # 0x832888
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1f2c9
movzbl 0x8135b7(%rip), %eax    # 0x832873
orl $0x80, %eax
movb %al, 0x8135ac(%rip)     # 0x832873
jmp 0x1f2db
movzbl 0x8135a3(%rip), %eax    # 0x832873
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movb %al, 0x813598(%rip)     # 0x832873
movzwl 0x8135a6(%rip), %edi    # 0x832888
callq 0x1d5e0
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x24a0
movl $0x0, -0x1c(%rbp)
cmpl $0x5, -0x1c(%rbp)
jge 0x240c
movl -0x1c(%rbp), %esi
leaq -0x18(%rbp), %rdi
callq 0x24c0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x23ef
leaq -0x18(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x24c0
leaq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x2560
leaq -0x18(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x2900
leaq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x2560
leaq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x2900
leaq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x2900
leaq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x2560
leaq -0x18(%rbp), %rdi
movl $0x3, %esi
callq 0x2900
leaq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x2560
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, (%rax)
jne 0x2532
movl $0x20, %edi
callq 0x2170
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %esi
callq 0x2bd0
jmp 0x24fb
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq (%rax), %rax
movl $0x1, 0x4(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x2546
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x20, %esi
callq 0x2180
jmp 0x2551
movq -0x30(%rbp), %rdi
movq (%rdi), %rsi
movl -0x14(%rbp), %edx
callq 0x2c10
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2240
nopw (%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
cmpl -0x24(%rbp), %eax
jne 0x2f6c
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x33d0
jmp 0x3029
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2fa4
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2fa4
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x40(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x3400
jmp 0x3029
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x2fd8
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2fd8
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x24(%rbp), %edx
callq 0x2f20
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
jmp 0x3029
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x300c
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x300c
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x24(%rbp), %edx
callq 0x2f20
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
jmp 0x3029
movq -0x20(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x48(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq 0x3400
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x3761
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x3747
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x3753
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3778
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
// File: 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 %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x3811
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x37f7
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x3803
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3828
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
popq %rbp
retq
nop
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x39c5
jmp 0x3a13
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movslq 0x8(%rcx), %rcx
cmpq %rcx, %rax
jbe 0x39e1
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
callq 0x39a0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
callq 0x39a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x517e
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x5158
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5186
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x516e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x517a
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x517c
jmp 0x5136
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x54dd
jmp 0x54fc
leaq 0xc65(%rip), %rdi       # 0x6149
leaq 0xbe8(%rip), %rsi       # 0x60d3
movl $0x131, %edx            # imm = 0x131
leaq 0xc64(%rip), %rcx       # 0x615b
callq 0x20d0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x5521
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5508
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x3e37c(%rip), %eax     # 0x432f0
jge 0x5054
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x3e366(%rip), %eax     # 0x432f0
jge 0x5044
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x4f9d
jmp 0x5036
cmpl $0x0, 0x3e264(%rip)     # 0x43208
je 0x4fca
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x74d0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x7870
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x7a10
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x7870
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x7db0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7870
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x8810
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x7870
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x4f81
jmp 0x5046
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4f6b
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0xf8(%rbp)
movq %rdi, %rax
movq %rax, -0x100(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xc2a0
movq -0xf8(%rbp), %rdi
movb $0x0, -0x49(%rbp)
callq 0xc2c0
leaq -0x88(%rbp), %rdi
callq 0xc2e0
leaq -0xd8(%rbp), %rdi
callq 0xc300
jmp 0x5577
leaq -0x48(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0xc330
movq %rax, -0x108(%rbp)
jmp 0x558d
movq -0x108(%rbp), %rax
movq $0x0, (%rax)
leaq -0xd8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0xc360
jmp 0x55ad
leaq -0x88(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0xc390
movq %rax, -0x110(%rbp)
jmp 0x55c6
movq -0x110(%rbp), %rax
movb $0x1, (%rax)
leaq -0xd8(%rbp), %rdi
callq 0xc3c0
movb %al, -0x111(%rbp)
jmp 0x55e4
movb -0x111(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x55f5
jmp 0x56af
leaq -0xd8(%rbp), %rdi
callq 0xc3e0
movq %rax, -0x120(%rbp)
jmp 0x560a
movq -0x120(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xf0(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xc400
jmp 0x5629
leaq -0x88(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc390
movq %rax, -0x128(%rbp)
jmp 0x5645
movq -0xf8(%rbp), %rdx
movq -0x128(%rbp), %rax
movb $0x0, (%rax)
movq -0xf0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x88(%rbp), %rcx
leaq -0xd8(%rbp), %r8
callq 0xad30
jmp 0x5676
jmp 0x55d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x56d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xc420
jmp 0x56d3
movb $0x1, -0x49(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xc420
leaq -0x88(%rbp), %rdi
callq 0xc440
testb $0x1, -0x49(%rbp)
jne 0x5702
jmp 0x56f6
leaq -0x88(%rbp), %rdi
callq 0xc440
movq -0xf8(%rbp), %rdi
callq 0xb230
leaq -0x48(%rbp), %rdi
callq 0xc460
jmp 0x571b
movq -0xf8(%rbp), %rdi
callq 0xb230
leaq -0x48(%rbp), %rdi
callq 0xc460
movq -0x100(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xe0(%rbp), %rdi
callq 0x3340
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc130
movq %rax, %rcx
movl -0x10(%rbp), %eax
cmpl %ecx, %eax
jge 0xa45c
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xb4f0
movb 0x8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xa44f
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
jmp 0xa451
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa413
movq 0x38b6d(%rip), %rdi     # 0x42fd0
leaq 0x22dc5(%rip), %rsi     # 0x2d22f
callq 0x31f0
movl $0x1, %edi
callq 0x3270
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0xa4d3
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movslq -0x18(%rbp), %rsi
callq 0xb210
cmpl $-0x1, (%rax)
jne 0xa4c6
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa4c8
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xa49f
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x1c(%rbp), %rsi
callq 0xb210
cmpl $-0x1, (%rax)
je 0xa552
jmp 0xa510
movl -0x1c(%rbp), %eax
cmpl 0x38cc7(%rip), %eax     # 0x431e0
jge 0xa544
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x1c(%rbp), %rsi
callq 0xb210
cmpl $-0x1, (%rax)
jne 0xa542
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa598
jmp 0xa510
movl 0x38c96(%rip), %eax     # 0x431e0
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa598
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0xa591
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movslq -0x1c(%rbp), %rsi
callq 0xb210
cmpl $-0x1, (%rax)
je 0xa584
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xa598
jmp 0xa586
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa55b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0xb380
movq %rax, %rcx
movq -0x48(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xa65b
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x1a730
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0xa4e0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jle 0xa64b
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa662
jmp 0xa64d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa5cd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb380
movq %rax, %rcx
movq -0x38(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xa925
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0xb210
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x1a730
movq %rax, -0x30(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0xa8e2
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movl -0xc(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xb210
cmpl $-0x1, (%rax)
jne 0xa8e0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa8e2
movl -0x10(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xa915
movq -0x30(%rbp), %rdi
addq $0x18, %rdi
movl -0x10(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xb210
cmpl $-0x1, (%rax)
jne 0xa913
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa915
jmp 0xa917
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xa854
movl -0x1c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x18(%rbp), %rcx
callq 0xa670
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x18(%rbp), %rcx
callq 0xa830
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x18(%rbp), %rcx
callq 0xa930
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x30(%rbp)
movl 0x3869c(%rip), %eax     # 0x431fc
shll $0x2, %eax
imull 0x3866a(%rip), %eax     # 0x431d4
cvtsi2sd %eax, %xmm1
movsd 0x386fa(%rip), %xmm0    # 0x43270
movsd -0x20(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x386d6(%rip), %xmm1    # 0x43278
movsd -0x28(%rbp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x386c9(%rip), %xmm0    # 0x43280
movsd -0x30(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movb $0x0, -0x29(%rbp)
callq 0x2c120
movq -0x58(%rbp), %rdi
movl $0xffffffff, 0x8(%rdi)  # imm = 0xFFFFFFFF
movl $0xffffffff, 0xc(%rdi)  # imm = 0xFFFFFFFF
movsd 0x22411(%rip), %xmm0    # 0x2d030
movsd %xmm0, 0x10(%rdi)
movl -0x24(%rbp), %eax
addl -0x14(%rbp), %eax
subl $0x1, %eax
cmpl 0x385ad(%rip), %eax     # 0x431e0
jge 0xacfd
movl -0x24(%rbp), %edx
movl -0x14(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0xa5b0
movl %eax, -0x64(%rbp)
jmp 0xac62
movl -0x64(%rbp), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0xacdb
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rcx
callq 0xaaf0
movsd %xmm0, -0x70(%rbp)
jmp 0xac88
movq -0x58(%rbp), %rax
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd 0x10(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xacd9
movq -0x58(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl -0x28(%rbp), %ecx
movl %ecx, 0xc(%rax)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0xacd9
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x2c140
jmp 0xad1d
jmp 0xacdb
cmpl $0x0, -0x3c(%rbp)
jge 0xacec
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0xacf2
movl -0x3c(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xac24
movb $0x1, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0xad10
movq -0x58(%rbp), %rdi
callq 0x2c140
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3340
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xae3e
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xae50
movsd %xmm0, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xae50
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
movq -0x30(%rbp), %rax
addsd 0x18(%rax), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xae2b
movq -0x10(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0xc330
movsd (%rax), %xmm0
movq -0x30(%rbp), %rax
addsd 0x18(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc330
movsd -0x50(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xb1e0
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc390
testb $0x1, (%rax)
jne 0xae29
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc360
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc390
movb $0x1, (%rax)
jmp 0xae2b
jmp 0xae2d
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xad58
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ynilu[P]elastic/graph.cpp
// Function: Phy_graph::modlev(int)
int Phy_graph::modlev(int dis){
    if(dis <= transmission_distance_16QAM)
    {
        return 4;
    }
    if(dis <= transmission_distance_8QAM)
    {
        return 3;
    }
    if(dis <= transmission_distance_QPSK)
    {
        return 2;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x80(%rcx), %eax
jg 0x1a637
movl $0x4, -0x4(%rbp)
jmp 0x1a66e
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x84(%rcx), %eax
jg 0x1a64f
movl $0x3, -0x4(%rbp)
jmp 0x1a66e
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x88(%rcx), %eax
jg 0x1a667
movl $0x2, -0x4(%rbp)
jmp 0x1a66e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)