LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: asl
static void asl() {
    value = getvalue();
    result = value << 1;

    carrycalc(result);
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x80ff79(%rip), %eax    # 0x821785
leaq 0x959d(%rip), %rbx      # 0x1adb0
leaq -0x37e(%rip), %r14      # 0x1149c
cmpq %r14, (%rbx,%rax,8)
je 0x1182e
movzwl 0x80ff6b(%rip), %edi    # 0x821792
callq 0xe3d3
jmp 0x11834
movb 0x80ff4c(%rip), %al     # 0x821780
movzbl %al, %ecx
movw %cx, 0x80ff58(%rip)     # 0x821796
leal (%rcx,%rcx), %eax
movw %ax, 0x80ff50(%rip)     # 0x821798
movb 0x80ff35(%rip), %dl     # 0x821783
andb $0x7c, %dl
testb $0x7f, %cl
sete %sil
rolb %cl
addb %sil, %sil
andb $-0x7f, %cl
orb %dl, %cl
orb %sil, %cl
movb %cl, 0x80ff18(%rip)     # 0x821783
movzbl 0x80ff13(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
je 0x1188e
movzwl 0x80ff13(%rip), %edi    # 0x821792
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcd9e
movb %al, 0x80feec(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: bpl
static void bpl() {
    if ((status & FLAG_SIGN) == 0) {
        oldpc = pc;
        pc += reladdr;
        if ((oldpc & 0xFF00) != (pc & 0xFF00)) clockticks6502 += 2; //check if jump crossed a page boundary
            else clockticks6502++;
    }
}

// Assembly:
cmpb $0x0, 0x80febb(%rip)    # 0x821783
js 0x11905
movzwl 0x80fead(%rip), %eax    # 0x82177e
movw %ax, 0x80feb8(%rip)     # 0x821790
movzwl 0x80feb5(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80fe95(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80fe7b(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80fe6f(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movb $0x1, 0x80fe4f(%rip)    # 0x821786
movzbl 0x80fe47(%rip), %eax    # 0x821785
leaq 0x946b(%rip), %rcx      # 0x1adb0
leaq -0x4b0(%rip), %rdx      # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x11965
pushq %rax
movzwl 0x80fe38(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x1196b
movb 0x80fe15(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80fe21(%rip)     # 0x821796
movzbl 0x80fe04(%rip), %ecx    # 0x821780
andl %eax, %ecx
movw %cx, 0x80fe13(%rip)     # 0x821798
sete %al
movb 0x80fdf5(%rip), %dl     # 0x821783
andb $0x7d, %dl
addb %al, %al
movb %cl, 0x80fde7(%rip)     # 0x821780
andb $-0x80, %cl
orb %al, %cl
orb %dl, %cl
movb %cl, 0x80fddd(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movzbl 0x80fdb2(%rip), %eax    # 0x821785
leaq 0x93d6(%rip), %rcx      # 0x1adb0
leaq -0x545(%rip), %rdx      # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x119fa
pushq %rax
movzwl 0x80fda3(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x11a00
movb 0x80fd80(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80fd8c(%rip)     # 0x821796
movzbl 0x80fd6f(%rip), %ecx    # 0x821780
andl %eax, %ecx
movw %cx, 0x80fd7e(%rip)     # 0x821798
sete %cl
movb 0x80fd60(%rip), %dl     # 0x821783
andb $0x3d, %dl
addb %cl, %cl
andb $-0x40, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x80fd4f(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movzbl 0x80fd45(%rip), %eax    # 0x821785
leaq 0x9369(%rip), %rbx      # 0x1adb0
leaq -0x5b2(%rip), %r14      # 0x1149c
cmpq %r14, (%rbx,%rax,8)
je 0x11a62
movzwl 0x80fd37(%rip), %edi    # 0x821792
callq 0xe3d3
jmp 0x11a68
movb 0x80fd18(%rip), %al     # 0x821780
movzbl %al, %ecx
movw %cx, 0x80fd24(%rip)     # 0x821796
movzbl 0x80fd0a(%rip), %edx    # 0x821783
movl %edx, %eax
andl $0x1, %eax
leal (%rax,%rcx,2), %eax
movw %ax, 0x80fd10(%rip)     # 0x821798
andb $0x7c, %dl
testb %al, %al
sete %sil
rolb %cl
addb %sil, %sil
andb $-0x7f, %cl
orb %dl, %cl
orb %sil, %cl
movb %cl, 0x80fcdf(%rip)     # 0x821783
movzbl 0x80fcda(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
je 0x11ac7
movzwl 0x80fcda(%rip), %edi    # 0x821792
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcd9e
movb %al, 0x80fcb3(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x80fc80(%rip)    # 0x821783
js 0x11b06
retq
movzwl 0x80fc71(%rip), %eax    # 0x82177e
movw %ax, 0x80fc7c(%rip)     # 0x821790
movzwl 0x80fc79(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80fc59(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80fc3f(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80fc33(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movzbl 0x80fb56(%rip), %eax    # 0x821785
leaq 0x917a(%rip), %rbx      # 0x1adb0
leaq -0x7a1(%rip), %r14      # 0x1149c
cmpq %r14, (%rbx,%rax,8)
je 0x11c51
movzwl 0x80fb48(%rip), %edi    # 0x821792
callq 0xe3d3
jmp 0x11c57
movb 0x80fb29(%rip), %al     # 0x821780
movzbl %al, %ecx
movw %cx, 0x80fb35(%rip)     # 0x821796
movl %ecx, %eax
shrl %eax
movw %ax, 0x80fb2c(%rip)     # 0x821798
movl %ecx, %edx
andb $0x1, %dl
movb 0x80fb0b(%rip), %sil    # 0x821783
andb $0x7c, %sil
cmpb $0x2, %cl
setb %cl
addb %cl, %cl
orb %dl, %cl
orb %sil, %cl
movb %cl, 0x80faf4(%rip)     # 0x821783
movzbl 0x80faef(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
je 0x11cb2
movzwl 0x80faef(%rip), %edi    # 0x821792
movzwl %ax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcd9e
movb %al, 0x80fac8(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x80fa8b(%rip)   # 0x821783
jne 0x11d35
movzwl 0x80fa7d(%rip), %eax    # 0x82177e
movw %ax, 0x80fa88(%rip)     # 0x821790
movzwl 0x80fa85(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80fa65(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80fa4b(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80fa3f(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movzbl 0x80f82e(%rip), %eax    # 0x821785
leaq 0x8e52(%rip), %rbx      # 0x1adb0
leaq -0xac9(%rip), %r14      # 0x1149c
cmpq %r14, (%rbx,%rax,8)
je 0x11f79
movzwl 0x80f820(%rip), %edi    # 0x821792
callq 0xe3d3
jmp 0x11f7f
movb 0x80f801(%rip), %al     # 0x821780
movzbl %al, %ecx
movw %cx, 0x80f80d(%rip)     # 0x821796
movl %ecx, %edx
shrl %edx
movb 0x80f7ef(%rip), %sil    # 0x821783
movl %esi, %eax
shlb $0x7, %al
setne %dil
movzbl %al, %eax
andb $0x1, %cl
andb $0x7c, %sil
orb %cl, %sil
orw %dx, %ax
movw %ax, 0x80f7e4(%rip)     # 0x821798
sete %cl
addb %cl, %cl
shlb $0x7, %dil
orb %sil, %dil
orb %cl, %dil
movb %dil, 0x80f7b9(%rip)    # 0x821783
movzbl 0x80f7b4(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
je 0x11fed
movzwl 0x80f7b4(%rip), %edi    # 0x821792
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcd9e
movb %al, 0x80f78d(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x80f740(%rip)   # 0x821783
je 0x12080
movzwl 0x80f732(%rip), %eax    # 0x82177e
movw %ax, 0x80f73d(%rip)     # 0x821790
movzwl 0x80f73a(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80f71a(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80f700(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80f6f4(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x80f57d(%rip)    # 0x821783
jne 0x12243
movzwl 0x80f56f(%rip), %eax    # 0x82177e
movw %ax, 0x80f57a(%rip)     # 0x821790
movzwl 0x80f577(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80f557(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80f53d(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80f531(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movb $0x1, 0x80f505(%rip)    # 0x821786
movzbl 0x80f4fd(%rip), %eax    # 0x821785
leaq 0x8b21(%rip), %rcx      # 0x1adb0
leaq -0xdfa(%rip), %rdx      # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x122af
pushq %rax
movzwl 0x80f4ee(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x122b5
movb 0x80f4cb(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80f4d7(%rip)     # 0x821796
movb %al, 0x80f4bd(%rip)     # 0x821782
testb %al, %al
sete %cl
movb 0x80f4b3(%rip), %dl     # 0x821783
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x80f4a2(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movb $0x1, 0x80f49d(%rip)    # 0x821786
movzbl 0x80f495(%rip), %eax    # 0x821785
leaq 0x8ab9(%rip), %rcx      # 0x1adb0
leaq -0xe62(%rip), %rdx      # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x12317
pushq %rax
movzwl 0x80f486(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x1231d
movb 0x80f463(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80f46f(%rip)     # 0x821796
movb %al, 0x80f453(%rip)     # 0x821780
testb %al, %al
sete %cl
movb 0x80f44b(%rip), %dl     # 0x821783
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x80f43a(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: ldx
static void ldx() {
    penaltyop = 1;
    value = getvalue();
    x = (uint8_t)(value & 0x00FF);
   
    zerocalc(x);
    signcalc(x);
}

// Assembly:
movb $0x1, 0x80f435(%rip)    # 0x821786
movzbl 0x80f42d(%rip), %eax    # 0x821785
leaq 0x8a51(%rip), %rcx      # 0x1adb0
leaq -0xeca(%rip), %rdx      # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x1237f
pushq %rax
movzwl 0x80f41e(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x12385
movb 0x80f3fb(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80f407(%rip)     # 0x821796
movb %al, 0x80f3ec(%rip)     # 0x821781
testb %al, %al
sete %cl
movb 0x80f3e3(%rip), %dl     # 0x821783
andb $0x7d, %dl
addb %cl, %cl
andb $-0x80, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x80f3d2(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x80f36f(%rip)    # 0x821783
je 0x12451
movzwl 0x80f361(%rip), %eax    # 0x82177e
movw %ax, 0x80f36c(%rip)     # 0x821790
movzwl 0x80f369(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80f349(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80f32f(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80f323(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: cpy
static void cpy() {
    value = getvalue();
    result = (uint16_t)y - value;
   
    if (y >= (uint8_t)(value & 0x00FF)) setcarry();
        else clearcarry();
    if (y == (uint8_t)(value & 0x00FF)) setzero();
        else clearzero();
    signcalc(result);
}

// Assembly:
movzbl 0x80f2fb(%rip), %eax    # 0x821785
leaq 0x891f(%rip), %rcx      # 0x1adb0
leaq -0xffc(%rip), %rdx      # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x124b1
pushq %rax
movzwl 0x80f2ec(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x124b7
movb 0x80f2c9(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80f2d5(%rip)     # 0x821796
movzbl 0x80f2ba(%rip), %ecx    # 0x821782
movl %ecx, %edx
subl %eax, %edx
movw %dx, 0x80f2c5(%rip)     # 0x821798
cmpb %cl, %al
setbe %sil
movb 0x80f2a3(%rip), %dil    # 0x821783
andb $0x7c, %dil
cmpb %al, %cl
sete %al
addb %al, %al
orb %sil, %al
orb %dil, %al
andb $-0x80, %dl
orb %al, %dl
movb %dl, 0x80f287(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: cmp
static void cmp() {
    penaltyop = 1;
    value = getvalue();
    result = (uint16_t)a - value;
   
    if (a >= (uint8_t)(value & 0x00FF)) setcarry();
        else clearcarry();
    if (a == (uint8_t)(value & 0x00FF)) setzero();
        else clearzero();
    signcalc(result);
}

// Assembly:
movb $0x1, 0x80f282(%rip)    # 0x821786
movzbl 0x80f27a(%rip), %eax    # 0x821785
leaq 0x889e(%rip), %rcx      # 0x1adb0
leaq -0x107d(%rip), %rdx     # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x12532
pushq %rax
movzwl 0x80f26b(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x12538
movb 0x80f248(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80f254(%rip)     # 0x821796
movzbl 0x80f237(%rip), %ecx    # 0x821780
movl %ecx, %edx
subl %eax, %edx
movw %dx, 0x80f244(%rip)     # 0x821798
cmpb %cl, %al
setbe %sil
movb 0x80f222(%rip), %dil    # 0x821783
andb $0x7c, %dil
cmpb %al, %cl
sete %al
addb %al, %al
orb %sil, %al
orb %dil, %al
andb $-0x80, %dl
orb %al, %dl
movb %dl, 0x80f206(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: dec
static void dec() {
    value = getvalue();
    result = value - 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x80f1d7(%rip), %eax    # 0x821785
leaq 0x87fb(%rip), %rbx      # 0x1adb0
leaq -0x1120(%rip), %r14     # 0x1149c
cmpq %r14, (%rbx,%rax,8)
je 0x125d0
movzwl 0x80f1c9(%rip), %edi    # 0x821792
callq 0xe3d3
jmp 0x125d6
movb 0x80f1aa(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80f1b6(%rip)     # 0x821796
decl %eax
movw %ax, 0x80f1af(%rip)     # 0x821798
testb %al, %al
sete %cl
movb 0x80f18f(%rip), %dl     # 0x821783
andb $0x7d, %dl
addb %cl, %cl
movl %eax, %esi
andb $-0x80, %sil
orb %dl, %sil
orb %cl, %sil
movb %sil, 0x80f177(%rip)    # 0x821783
movzbl 0x80f172(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
je 0x1262f
movzwl 0x80f172(%rip), %edi    # 0x821792
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcd9e
movb %al, 0x80f14b(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x80f0ed(%rip)    # 0x821783
jne 0x126d3
movzwl 0x80f0df(%rip), %eax    # 0x82177e
movw %ax, 0x80f0ea(%rip)     # 0x821790
movzwl 0x80f0e7(%rip), %ecx    # 0x821794
addw %ax, %cx
movw %cx, 0x80f0c7(%rip)     # 0x82177e
xorl %ecx, %eax
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
movl 0x80f0ad(%rip), %eax    # 0x821774
sbbl $0x0, %eax
addl $0x2, %eax
movl %eax, 0x80f0a1(%rip)    # 0x821774
retq
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: cpx
static void cpx() {
    value = getvalue();
    result = (uint16_t)x - value;
   
    if (x >= (uint8_t)(value & 0x00FF)) setcarry();
        else clearcarry();
    if (x == (uint8_t)(value & 0x00FF)) setzero();
        else clearzero();
    signcalc(result);
}

// Assembly:
movzbl 0x80f0a2(%rip), %eax    # 0x821785
leaq 0x86c6(%rip), %rcx      # 0x1adb0
leaq -0x1255(%rip), %rdx     # 0x1149c
cmpq %rdx, (%rcx,%rax,8)
je 0x1270a
pushq %rax
movzwl 0x80f093(%rip), %edi    # 0x821792
callq 0xe3d3
addq $0x8, %rsp
jmp 0x12710
movb 0x80f070(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80f07c(%rip)     # 0x821796
movzbl 0x80f060(%rip), %ecx    # 0x821781
movl %ecx, %edx
subl %eax, %edx
movw %dx, 0x80f06c(%rip)     # 0x821798
cmpb %cl, %al
setbe %sil
movb 0x80f04a(%rip), %dil    # 0x821783
andb $0x7c, %dil
cmpb %al, %cl
sete %al
addb %al, %al
orb %sil, %al
orb %dil, %al
andb $-0x80, %dl
orb %al, %dl
movb %dl, 0x80f02e(%rip)     # 0x821783
retq
// File: /workspace/github_cpp_makefile_star2_O1/mdpkh[P]retro6k/src/fake6502.c
// Function: inc
static void inc() {
    value = getvalue();
    result = value + 1;
   
    zerocalc(result);
    signcalc(result);
   
    putvalue(result);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl 0x80ee4d(%rip), %eax    # 0x821785
leaq 0x8471(%rip), %rbx      # 0x1adb0
leaq -0x14aa(%rip), %r14     # 0x1149c
cmpq %r14, (%rbx,%rax,8)
je 0x1295a
movzwl 0x80ee3f(%rip), %edi    # 0x821792
callq 0xe3d3
jmp 0x12960
movb 0x80ee20(%rip), %al     # 0x821780
movzbl %al, %eax
movw %ax, 0x80ee2c(%rip)     # 0x821796
incl %eax
movw %ax, 0x80ee25(%rip)     # 0x821798
testb %al, %al
sete %cl
movb 0x80ee05(%rip), %dl     # 0x821783
andb $0x7d, %dl
addb %cl, %cl
movl %eax, %esi
andb $-0x80, %sil
orb %dl, %sil
orb %cl, %sil
movb %sil, 0x80eded(%rip)    # 0x821783
movzbl 0x80ede8(%rip), %ecx    # 0x821785
cmpq %r14, (%rbx,%rcx,8)
je 0x129b9
movzwl 0x80ede8(%rip), %edi    # 0x821792
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xcd9e
movb %al, 0x80edc1(%rip)     # 0x821780
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/DRSY[P]MyRBTree/main.cpp
// Function: main
int main() {
    RBTree tree;
    for(int i=0;i<5;++i)
        tree.insert(i);
    tree.insert(-1);
    tree.display(4);
    tree.remove(-1);
    tree.display(4);
    tree.remove(4);
    tree.remove(2);
    tree.display(4);
    tree.remove(3);
    tree.display(4);
    return 0;
}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x13a8
movq %rbx, %rdi
movl %r14d, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x1ad4
movl $0x20, %edi
callq 0x10d0
movl %r14d, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movups %xmm0, 0x10(%rax)
movq %rax, (%rbx)
movl $0x1, 0x4(%rax)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1e54
xorl %eax, %eax
xorl %edx, %edx
jmp 0x1e8b
movq %rsi, %rax
jle 0x1e6d
cmpq $0x0, 0x10(%rax)
je 0x1e87
cmpl %edx, %ecx
jle 0x1e6d
movq 0x10(%rax), %rsi
testq %rsi, %rsi
jne 0x1e7a
cmpl %edx, %ecx
jge 0x1e81
movq 0x18(%rax), %rsi
testq %rsi, %rsi
je 0x1e81
callq 0x1e44
jmp 0x1e8b
leaq 0x18(%rax), %rdx
jmp 0x1e8b
leaq 0x10(%rax), %rdx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x2151
movslq 0x8(%r15), %rax
cmpq %rbx, %rax
jae 0x2139
movl %ebx, 0x8(%r15)
movq 0x10(%r14), %rsi
incq %rbx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x2114
movq 0x18(%r14), %r14
jmp 0x2127
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl $0x0, 0x13c6f(%rip)     # 0x18300
jle 0x475a
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
cmpl $0x0, 0x13c4f(%rip)     # 0x18300
jle 0x4744
xorl %r12d, %r12d
cmpl %r12d, %ebp
je 0x4734
cmpl $0x0, 0x13b52(%rip)     # 0x18218
je 0x46e3
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x63cb
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6661
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x67ac
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6661
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x6a42
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6661
movl %ebp, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x6fd4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6661
incl %r12d
cmpl 0x13bc2(%rip), %r12d    # 0x18300
jl 0x46ba
incl %ebp
cmpl 0x13bb4(%rip), %ebp     # 0x18300
jl 0x46aa
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ynilu[P]elastic/simulator.cpp
// Function: BellmanFordSP(Aux_node*)
Aux_node2Aux_link BellmanFordSP(Aux_node* s)
{
    Aux_node2Double distTo;
    Aux_node2Aux_link edgeTo;
    Aux_node2Bool onQueue;

    queue<Aux_node*> queue;

    distTo[s] = 0.0;

    Aux_node* v;

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

    return edgeTo;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
movq %rsi, (%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, -0x30(%rax)
movl $0x1, %ecx
movq %rcx, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x30(%rdi), %rax
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movups %xmm0, 0x10(%rdi)
movl %edx, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
leaq 0x90(%rsp), %rax
movq %rax, -0x30(%rax)
movq %rcx, -0x28(%rax)
movups %xmm0, -0x20(%rax)
movl %edx, -0x10(%rax)
movups %xmm0, -0x8(%rax)
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x9f70
leaq 0x98(%rsp), %rdi
movq %rsp, %rsi
callq 0xa0e6
movq $0x0, (%rax)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x4c5f
movq (%rsp), %rcx
movq %rcx, (%rax)
addq $0x8, 0x40(%rsp)
jmp 0x4c6c
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
callq 0xa3ae
leaq 0x60(%rsp), %rdi
movq %rsp, %rsi
callq 0xa5c2
movb $0x1, (%rax)
leaq 0x60(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x98(%rsp), %r12
leaq 0x10(%rsp), %r13
movq 0x20(%rsp), %rax
cmpq %rax, 0x40(%rsp)
je 0x4d1b
movq (%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x30(%rsp), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x4cbb
addq $0x8, %rax
jmp 0x4ced
movq 0x28(%rsp), %rdi
movl $0x200, %esi            # imm = 0x200
callq 0x3230
movq 0x38(%rsp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq %rax, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa5c2
movb $0x0, (%rax)
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x83b5
jmp 0x4c93
leaq 0x10(%rsp), %rdi
callq 0x921e
leaq 0x60(%rsp), %rdi
callq 0x926e
leaq 0x98(%rsp), %rdi
callq 0x92de
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4d59
movq %rax, %r14
jmp 0x4d66
jmp 0x4d59
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x921e
leaq 0x60(%rsp), %rdi
callq 0x926e
movq %rbx, %rdi
callq 0x8a16
leaq 0x98(%rsp), %rdi
callq 0x92de
movq %r14, %rdi
callq 0x3370
// File: /workspace/github_cpp_makefile_star2_O1/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
movq 0x1329a(%rip), %rbx     # 0x18430
leaq 0x13293(%rip), %r14     # 0x18430
cmpq %r14, %rbx
je 0x5252
movl $0xb0, %r15d
movq 0x10(%rbx), %rax
movq 0x80(%rax), %r12
movq 0x88(%rax), %r13
cmpq %r13, %r12
je 0x51d8
movq (%r12), %rdi
testq %rdi, %rdi
je 0x51d2
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r12
jmp 0x51be
movq 0x10(%rbx), %rax
movq 0x80(%rax), %rcx
cmpq %rcx, 0x88(%rax)
je 0x51f3
movq %rcx, 0x88(%rax)
movq 0x10(%rbx), %rax
movq 0x98(%rax), %r12
movq 0xa0(%rax), %r13
cmpq %r13, %r12
je 0x521f
movq (%r12), %rdi
testq %rdi, %rdi
je 0x5219
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r12
jmp 0x5205
movq 0x10(%rbx), %rax
movq 0x98(%rax), %rcx
cmpq %rcx, 0xa0(%rax)
je 0x523a
movq %rcx, 0xa0(%rax)
movq 0x10(%rbx), %rdi
addq %r15, %rdi
callq 0x887c
movq (%rbx), %rbx
cmpq %r14, %rbx
jne 0x51ac
movq 0x131bf(%rip), %rbx     # 0x18418
leaq 0x131b8(%rip), %r14     # 0x18418
cmpq %r14, %rbx
je 0x52a6
movq 0x10(%rbx), %r15
movq 0xb0(%r15), %r12
addq $0xb0, %r15
cmpq %r15, %r12
je 0x5292
movq 0x10(%r12), %rdi
testq %rdi, %rdi
je 0x528c
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r12), %r12
jmp 0x5277
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x52a1
movq (%rdi), %rax
callq *0x8(%rax)
movq (%rbx), %rbx
jmp 0x5260
leaq 0x1316b(%rip), %rdi     # 0x18418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x88b8
// File: /workspace/github_cpp_makefile_star2_O1/ynilu[P]elastic/simulator.cpp
// Function: get_available_OFDM_transceiver(std::vector<OFDMTransceiver, std::allocator<OFDMTransceiver>>&)
int get_available_OFDM_transceiver(vector<OFDMTransceiver>& transceivers)
{
    for(int i = 0; i < (int)transceivers.size(); i++)
    {
        if(transceivers[i].in_used == false)
        {
            return i;
        }
    }
    cout << "error can not find available transceiver\n";
    exit(1);
    return -1;
}

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

// Assembly:
xorl %eax, %eax
cmpl %edx, %esi
jg 0x7de9
movslq %esi, %rcx
shlq $0x2, %rcx
addq 0x18(%rdi), %rcx
subl %esi, %edx
incl %edx
xorl %esi, %esi
xorl %eax, %eax
xorl %edi, %edi
cmpl $-0x1, (%rcx,%rsi,4)
sete %dil
addl %edi, %eax
incq %rsi
cmpl %esi, %edx
jne 0x7dd6
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7e2c
movl 0x103f1(%rip), %esi     # 0x181f0
cmpl %edx, %esi
movl %eax, %edi
cmovgl %esi, %edi
movslq %edi, %rdi
subq %rdx, %rdi
leaq (%rcx,%rdx,4), %rcx
addq $0x4, %rcx
xorl %edx, %edx
cmpq %rdx, %rdi
je 0x7e44
leaq 0x1(%rdx), %r8
cmpl $-0x1, (%rcx,%rdx,4)
movq %r8, %rdx
jne 0x7e16
addl %r8d, %eax
retq
movslq %esi, %rsi
incl %eax
cmpq %rsi, %rdx
jle 0x7e49
decl %eax
cmpl $-0x1, -0x4(%rcx,%rdx,4)
leaq -0x1(%rdx), %rdx
je 0x7e31
retq
incl %esi
movl %esi, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %r12
movl $0x1, %r13d
leal -0x1(%r13), %ecx
movq (%r12), %rax
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x7eb2
movl (%rax,%rcx,4), %esi
movl %r13d, %ecx
movl (%rax,%rcx,4), %edx
movq %rbx, %rdi
callq 0xa972
movq %rax, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x7dea
incl %r13d
testl %eax, %eax
cmovgl %eax, %r14d
jle 0x7e6b
jmp 0x7eb8
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
jne 0x7ef6
movb $0x1, %cl
xorl %ebp, %ebp
jmp 0x7ffb
movl %edx, %r12d
movq %rdi, %r15
movl 0x1030a(%rip), %ecx     # 0x1820c
movl %edx, %edi
notl %edi
addl %esi, %edi
leal (%rdi,%rcx,2), %edi
decl %edi
movl %esi, %ecx
subl %edi, %ecx
leal 0x1(%rsi), %r13d
cmpl $-0x1, %ecx
cmovgel %edi, %r13d
movq %rdi, 0x18(%rsp)
leal (%rdi,%r12), %ecx
movl %ecx, 0x4(%rsp)
movslq %esi, %rcx
movslq %edx, %rsi
leaq -0x4(,%rcx,4), %rcx
movq %rcx, 0x8(%rsp)
movl $0x1, %r14d
subq %r13, %r14
xorl %ecx, %ecx
movb $0x1, %dil
movl %edi, (%rsp)
shlq $0x2, %rsi
movq %rsi, 0x10(%rsp)
xorl %ebp, %ebp
xorl %ebx, %ebx
movl (%rax,%rcx,4), %esi
incl %ebx
movl (%rax,%rbx,4), %edx
movq 0x20(%rsp), %rdi
callq 0xa972
cmpl $0x2, %r13d
jl 0x7f98
movq 0x18(%rax), %rcx
addq 0x8(%rsp), %rcx
xorl %esi, %esi
cmpl $0x0, (%rcx,%rsi,4)
je 0x7f8d
decq %rsi
cmpq %rsi, %r14
jne 0x7f7d
jmp 0x7f98
subl %esi, %ebp
incl %ebp
movl $0x0, (%rsp)
movl %ebp, %ebp
movl 0x10250(%rip), %esi     # 0x181f0
movl %esi, %ecx
subl %r12d, %ecx
cmpl %esi, 0x4(%rsp)
cmovlel 0x18(%rsp), %ecx
cmpl $0x1, %ecx
jle 0x7fdc
movl %ecx, %ecx
movq 0x18(%rax), %rsi
addq 0x10(%rsp), %rsi
movl $0x1, %eax
cmpl $0x0, (%rsi,%rax,4)
je 0x7fd3
incq %rax
cmpq %rcx, %rax
jb 0x7fc3
jmp 0x7fdc
addl %eax, %ebp
movl $0x0, (%rsp)
movl %ebx, %ecx
movq (%r15), %rax
movq 0x8(%r15), %rsi
subq %rax, %rsi
sarq $0x2, %rsi
decq %rsi
cmpq %rcx, %rsi
ja 0x7f5a
movl (%rsp), %ecx
movl 0x1020b(%rip), %eax     # 0x1820c
imull 0x101dc(%rip), %eax     # 0x181e4
shll $0x2, %eax
testb $0x1, %cl
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_O1/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, 0x10(%rsp)
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
xorl %r12d, %r12d
cmpq $0x4, %rcx
je 0x80d0
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl %esi, %ecx
movq %rcx, 0x8(%rsp)
movslq %edx, %rcx
movq %rcx, (%rsp)
xorl %ebx, %ebx
movl $0x1, %r13d
xorl %r12d, %r12d
movl (%rax,%rbx,4), %esi
movl %r13d, %ebx
movl (%rax,%rbx,4), %edx
movq 0x10(%rsp), %rdi
callq 0xa972
testl %r14d, %r14d
jle 0x8099
movq 0x18(%rax), %rcx
xorl %edx, %edx
movq 0x8(%rsp), %rsi
cmpl $-0x1, -0x4(%rcx,%rsi,4)
sete %dl
addl %edx, %r12d
leal -0x1(%r12), %ecx
cmpl %ebp, %ecx
jle 0x80b7
movq 0x18(%rax), %rax
xorl %ecx, %ecx
movq (%rsp), %rdx
cmpl $-0x1, 0x4(%rax,%rdx,4)
sete %cl
addl %ecx, %r12d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
decq %rcx
incl %r13d
cmpq %rbx, %rcx
ja 0x806b
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_O1/ynilu[P]elastic/simulator.cpp
// Function: get_align_num(std::vector<int, std::allocator<int>>&, int, int, Phy_graph&)
int get_align_num(Path& path, int slot_st, int slot_ed, Phy_graph& p_graph)
{
    int num_align = 0;
    for(unsigned int node_i = 0; node_i < path.size() - 1; node_i++)
    {
        int from = path[node_i];
        int to = path[node_i + 1];
        for(auto &w : p_graph.get_node(from).neighbor)
        {
            if(w == to)
            {
                continue;
            }
            Phy_link& link = p_graph.get_link(w, from);
            num_align += num_spectrum_available(link, slot_st, slot_ed);
        }
        for(auto &v : p_graph.get_node(to).neighbor)
        {
            if(v == from)
            {
                continue;
            }
            Phy_link& link = p_graph.get_link(to, v);
            num_align += num_spectrum_available(link, slot_st, slot_ed);
        }
    }
    return num_align;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movl %edx, 0x4(%rsp)
movl %esi, (%rsp)
movq (%rdi), %rax
movq %rdi, 0x18(%rsp)
movq 0x8(%rdi), %rcx
subq %rax, %rcx
xorl %r12d, %r12d
cmpq $0x4, %rcx
je 0x8230
movslq (%rsp), %rdx
movl 0x4(%rsp), %ecx
movl %ecx, %ebp
subl %edx, %ebp
incl %ebp
shlq $0x2, %rdx
movq %rdx, 0x10(%rsp)
xorl %ecx, %ecx
xorl %r12d, %r12d
xorl %esi, %esi
movl (%rax,%rcx,4), %r13d
incl %esi
movq %rsi, 0x20(%rsp)
movl (%rax,%rsi,4), %r15d
movq 0x8(%rsp), %rdi
movl %r13d, %esi
callq 0xb390
movq 0x10(%rax), %rbx
movq 0x18(%rax), %r14
cmpq %r14, %rbx
je 0x81a7
movl (%rbx), %esi
cmpl %r15d, %esi
je 0x81a1
movq 0x8(%rsp), %rdi
movl %r13d, %edx
callq 0xa972
xorl %ecx, %ecx
movl (%rsp), %edx
cmpl 0x4(%rsp), %edx
jg 0x819e
movq 0x18(%rax), %rax
addq 0x10(%rsp), %rax
xorl %edx, %edx
xorl %ecx, %ecx
xorl %esi, %esi
cmpl $-0x1, (%rax,%rdx,4)
sete %sil
addl %esi, %ecx
incq %rdx
cmpl %edx, %ebp
jne 0x818b
addl %ecx, %r12d
addq $0x4, %rbx
jmp 0x815a
movq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0xb390
movq 0x10(%rax), %r14
movq 0x18(%rax), %rbx
cmpq %rbx, %r14
je 0x820a
movl (%r14), %edx
cmpl %r13d, %edx
je 0x8204
movq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0xa972
xorl %ecx, %ecx
movl (%rsp), %edx
cmpl 0x4(%rsp), %edx
jg 0x8201
movq 0x18(%rax), %rax
addq 0x10(%rsp), %rax
xorl %edx, %edx
xorl %ecx, %ecx
xorl %esi, %esi
cmpl $-0x1, (%rax,%rdx,4)
sete %sil
addl %esi, %ecx
incq %rdx
cmpl %edx, %ebp
jne 0x81ee
addl %ecx, %r12d
addq $0x4, %r14
jmp 0x81bc
movq 0x20(%rsp), %rsi
movl %esi, %ecx
movq 0x18(%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
decq %rdx
cmpq %rcx, %rdx
ja 0x8136
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ynilu[P]elastic/simulator.cpp
// Function: weigh_path_spectrum(std::vector<int, std::allocator<int>>&, int, int, Phy_graph&)
double weigh_path_spectrum(Path& path, int slot_st, int slot_ed, Phy_graph& p_graph)
{
    double distance = get_distance(path, slot_st, slot_ed, p_graph);
    double num_cut = get_cut_num(path, slot_st, slot_ed, p_graph);
    double num_align = get_align_num(path, slot_st, slot_ed, p_graph);
    return transceiver_slot_limit*4*hop_limit-reserved_coefficent * distance + cut_coeffcient * num_cut + align_coeffcient * num_align;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
callq 0x7eca
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x8020
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
callq 0x80e2
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl 0xff6c(%rip), %eax      # 0x1820c
imull 0xff3d(%rip), %eax      # 0x181e4
shll $0x2, %eax
cvtsi2sd %eax, %xmm1
movsd 0x10(%rsp), %xmm2
mulsd 0xffc4(%rip), %xmm2     # 0x18280
subsd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm2
mulsd 0xffba(%rip), %xmm2     # 0x18288
addsd %xmm1, %xmm2
mulsd 0xffb6(%rip), %xmm0     # 0x18290
addsd %xmm2, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ynilu[P]elastic/simulator.cpp
// Function: find_best_spectrum(std::vector<int, std::allocator<int>>&, int, Phy_graph&)
Spectrum find_best_spectrum(Path& path, int require_slots, Phy_graph& p_graph)
{
    int slot_st = 0;
    int slot_ed;
    Spectrum best_path_spectrum;
    double current_weight;
    best_path_spectrum.slot_st = -1;
    best_path_spectrum.slot_ed = -1;
    best_path_spectrum.weight = DBL_MAX;
    while(slot_st + require_slots - 1 < num_slots)
    {
        slot_ed = slot_st + require_slots - 1;
        int next_start = path_spectrum_available(path, slot_st, slot_ed, p_graph);
        if(next_start < 0) // spectrum_available
        {
            current_weight = weigh_path_spectrum(path, slot_st, slot_ed, p_graph);
            if(current_weight < best_path_spectrum.weight)
            {
                best_path_spectrum.slot_st = slot_st;
                best_path_spectrum.slot_ed = slot_ed;
                best_path_spectrum.weight = current_weight;
            }
        }
        slot_st = (next_start < 0)? slot_st+1:next_start;
    }
    return best_path_spectrum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
callq 0x10504
movq $-0x1, 0x8(%rbx)
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rbx, (%rsp)
movq %rax, 0x10(%rbx)
cmpl %r15d, 0xfeca(%rip)     # 0x181f0
jl 0x838e
movq %r15, %rbx
xorl %r13d, %r13d
movl %ebx, %ebp
decl %ebp
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r14, %rcx
callq 0x7e4f
movl %eax, %r15d
testl %eax, %eax
jns 0x8378
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
movq %r14, %rcx
callq 0x8242
movq (%rsp), %rax
movsd 0x10(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x8378
movq (%rsp), %rax
movl %r13d, 0x8(%rax)
movl %ebp, 0xc(%rax)
movsd %xmm0, 0x10(%rax)
incl %r13d
testl %r15d, %r15d
cmovnsl %r15d, %r13d
leal (%rbx,%r13), %ebp
cmpl 0xfe64(%rip), %ebp      # 0x181f0
jle 0x8330
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rsp), %rdi
callq 0x10510
movq %r14, %rdi
callq 0x3370