LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: akitsu-sanae[P]adtpp/src/main.cpp
// Function: main
int main(int argc, const char* argv[]) {
    if (argc == 1) {
        std::cout << parse(std::cin) << std::endl;
    } else if (argc == 2) {
        std::ifstream input{argv[1]};
        std::cout << parse(input) << std::endl;
    } else {
        std::cerr << format("Usage: {} [filename]", argv[0]) << std::endl;
        std::cerr<< "if filename is not given, read from stdin" << std::endl;
        return -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x8edf
movq 0x6162(%rip), %rsi      # 0xefd8
leaq -0x48(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x8b30
movq -0x2f0(%rbp), %rsi
movq 0x6124(%rip), %rdi      # 0xefb8
callq 0x37d0
movq %rax, -0x2e8(%rbp)
jmp 0x8ea2
movq -0x2e8(%rbp), %rdi
movq 0x60f0(%rip), %rsi      # 0xefa0
callq 0x3270
jmp 0x8eb7
leaq -0x48(%rbp), %rdi
callq 0x95a0
jmp 0x90bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x95a0
jmp 0x90c7
cmpl $0x2, -0x8(%rbp)
jne 0x8fa3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x260(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
movl $0x8, %edx
callq 0x33b0
movq -0x2f8(%rbp), %rsi
leaq -0x298(%rbp), %rdi
callq 0x8b30
jmp 0x8f1e
movq 0x6093(%rip), %rdi      # 0xefb8
leaq -0x298(%rbp), %rsi
callq 0x37d0
movq %rax, -0x300(%rbp)
jmp 0x8f3a
movq -0x300(%rbp), %rdi
movq 0x6058(%rip), %rsi      # 0xefa0
callq 0x3270
jmp 0x8f4f
leaq -0x298(%rbp), %rdi
callq 0x95a0
leaq -0x260(%rbp), %rdi
callq 0x3080
jmp 0x90b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x8f92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x95a0
leaq -0x260(%rbp), %rdi
callq 0x3080
jmp 0x90c7
leaq -0x2d9(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x3390
movq -0x308(%rbp), %rdx
leaq 0x26bc(%rip), %rsi      # 0xb680
leaq -0x2d8(%rbp), %rdi
callq 0x75c0
jmp 0x8fd2
movq -0x10(%rbp), %rdx
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0x90d0
jmp 0x8feb
movq 0x5ffe(%rip), %rdi      # 0xeff0
leaq -0x2b8(%rbp), %rsi
callq 0x3200
movq %rax, -0x310(%rbp)
jmp 0x9007
movq -0x310(%rbp), %rdi
movq 0x5f8b(%rip), %rsi      # 0xefa0
callq 0x3270
jmp 0x901c
leaq -0x2b8(%rbp), %rdi
callq 0x3140
leaq -0x2d8(%rbp), %rdi
callq 0x3140
leaq -0x2d9(%rbp), %rdi
callq 0x3290
movq 0x5fa9(%rip), %rdi      # 0xeff0
leaq 0x2647(%rip), %rsi      # 0xb695
callq 0x3220
movq %rax, %rdi
movq 0x5f43(%rip), %rsi      # 0xefa0
callq 0x3270
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x90bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x90ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x909f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x3140
leaq -0x2d8(%rbp), %rdi
callq 0x3140
leaq -0x2d9(%rbp), %rdi
callq 0x3290
jmp 0x90c7
jmp 0x90bb
movl -0x4(%rbp), %eax
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3380
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_CDB::squash(int)
void FU_CDB::squash(int ROB_i)
{
    int R_f = CPU_ROB->get_front();
    int R_r = CPU_ROB->get_rear();
    pthread_mutex_lock(&Q_lock);
    if (front == rear)
    {
        pthread_mutex_unlock(&Q_lock);
        return;
    }
    for (int i = rear; ;)
    {
        int j = (i-1)%Q_LEN;
        if (j == front || !is_prev_index(ROB_i, queue[j].source, R_f, R_r))
            break;
        rear = j;
        i = (--i)%Q_LEN;
    }
    if (is_prev_index(ROB_i, bus.source, R_f, R_r))
        bus.source = -2;
    pthread_mutex_unlock(&Q_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x2a3c2(%rip), %rax     # 0x2f460
movq (%rax), %rdi
callq 0xe5d0
movl %eax, -0x10(%rbp)
leaq 0x2a3b0(%rip), %rax     # 0x2f460
movq (%rax), %rdi
callq 0xe5e0
movq -0x28(%rbp), %rdi
movl %eax, -0x14(%rbp)
addq $0x810, %rdi            # imm = 0x810
callq 0x4510
movq -0x28(%rbp), %rcx
movl 0x808(%rcx), %eax
cmpl 0x80c(%rcx), %eax
jne 0x50f2
movq -0x28(%rbp), %rdi
addq $0x810, %rdi            # imm = 0x810
callq 0x42c0
jmp 0x519e
movq -0x28(%rbp), %rax
movl 0x80c(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl $0x100, %esi            # imm = 0x100
cltd
idivl %esi
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x808(%rcx), %eax
je 0x513d
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %edi
movslq -0x1c(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x1aec0
testb $0x1, %al
jne 0x513f
jmp 0x5162
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x80c(%rax)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl %edx, -0x18(%rbp)
jmp 0x50ff
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %edi
movl 0x804(%rax), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x1aec0
testb $0x1, %al
jne 0x5180
jmp 0x518e
movq -0x28(%rbp), %rax
movl $0xfffffffe, 0x804(%rax) # imm = 0xFFFFFFFE
movq -0x28(%rbp), %rdi
addq $0x810, %rdi            # imm = 0x810
callq 0x42c0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_CDB::CDB_automat()
void FU_CDB::CDB_automat()
{
    next_vdd = 0;
    while(true)
    {
        at_rising_edge(next_vdd);
        at_falling_edge(next_vdd);
        pthread_mutex_lock(&Q_lock);
        if (front != rear)
        {
            bus.source = queue[front].source;
            bus.value = queue[front].value;
            msg_log("About to broadcast, source ROB = " + to_string(bus.source), 3);
            front = (++front)%Q_LEN;
        }
        pthread_mutex_unlock(&Q_lock);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x0, 0x838(%rax)
movq -0x60(%rbp), %rdi
addq $0x838, %rdi            # imm = 0x838
callq 0x12130
movq -0x60(%rbp), %rdi
addq $0x838, %rdi            # imm = 0x838
callq 0x121a0
movq -0x60(%rbp), %rdi
addq $0x810, %rdi            # imm = 0x810
callq 0x4510
movq -0x60(%rbp), %rcx
movl 0x808(%rcx), %eax
cmpl 0x80c(%rcx), %eax
je 0x52d9
movq -0x60(%rbp), %rax
movslq 0x808(%rax), %rcx
movl 0x4(%rax,%rcx,8), %ecx
movl %ecx, 0x804(%rax)
movslq 0x808(%rax), %rcx
movl (%rax,%rcx,8), %ecx
movl %ecx, 0x800(%rax)
movl 0x804(%rax), %esi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x8410
movq -0x68(%rbp), %rdx
leaq 0x1cdca(%rip), %rsi     # 0x22021
leaq -0x28(%rbp), %rdi
callq 0x83c0
jmp 0x5262
leaq -0x28(%rbp), %rdi
movl $0x3, %esi
callq 0x12060
jmp 0x5272
leaq -0x28(%rbp), %rdi
callq 0x4240
leaq -0x48(%rbp), %rdi
callq 0x4240
movq -0x60(%rbp), %rcx
movl 0x808(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x808(%rcx)
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x60(%rbp), %rax
movl %edx, 0x808(%rax)
jmp 0x52d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x52ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4240
leaq -0x48(%rbp), %rdi
callq 0x4240
jmp 0x52ee
movq -0x60(%rbp), %rdi
addq $0x810, %rdi            # imm = 0x810
callq 0x42c0
jmp 0x51ce
movq -0x50(%rbp), %rdi
callq 0x45f0
nopw (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_Q::squash(int)
void FU_Q::squash(int ROB_i)
{
    int R_f = CPU_ROB->get_front();
    int R_r = CPU_ROB->get_rear();
    pthread_mutex_lock(&Q_lock);
    if (front == rear)
    {
        pthread_mutex_unlock(&Q_lock);
        return;
    }
    for (int i = rear; ;)
    {
        int j = (i-1)%Q_LEN;
        if (j == front || !is_prev_index(ROB_i, queue[j].dest, R_f, R_r))
            break;
        rear = j;
        i = (--i)%Q_LEN;
    }
    pthread_mutex_unlock(&Q_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x29db2(%rip), %rax     # 0x2f460
movq (%rax), %rdi
callq 0xe5d0
movl %eax, -0x10(%rbp)
leaq 0x29da0(%rip), %rax     # 0x2f460
movq (%rax), %rdi
callq 0xe5e0
movq -0x28(%rbp), %rdi
movl %eax, -0x14(%rbp)
addq $0x3808, %rdi           # imm = 0x3808
callq 0x4510
movq -0x28(%rbp), %rcx
movl 0x3800(%rcx), %eax
cmpl 0x3804(%rcx), %eax
jne 0x5702
movq -0x28(%rbp), %rdi
addq $0x3808, %rdi           # imm = 0x3808
callq 0x42c0
jmp 0x5788
movq -0x28(%rbp), %rax
movl 0x3804(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl $0x100, %esi            # imm = 0x100
cltd
idivl %esi
movl %edx, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x3800(%rcx), %eax
je 0x5753
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %edi
movslq -0x1c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x1aec0
testb $0x1, %al
jne 0x5755
jmp 0x5778
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x3804(%rax)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movl %edx, -0x18(%rbp)
jmp 0x570f
movq -0x28(%rbp), %rdi
addq $0x3808, %rdi           # imm = 0x3808
callq 0x42c0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_Q::deQ()
FU_QEntry *FU_Q::deQ()
{
    if (front == rear)
        return nullptr;
    FU_QEntry* ret = &queue[front];
    front = (++front)%Q_LEN;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movl 0x3800(%rcx), %eax
cmpl 0x3804(%rcx), %eax
jne 0x57b8
movq $0x0, -0x8(%rbp)
jmp 0x57fa
movq -0x20(%rbp), %rcx
movslq 0x3800(%rcx), %rax
imulq $0x38, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
movq %rax, -0x18(%rbp)
movl 0x3800(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x3800(%rcx)
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movq -0x20(%rbp), %rax
movl %edx, 0x3800(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: functionUnit::squash(int)
void functionUnit::squash(int ROB_i)
{
    for (auto _rs : rs)
        _rs->squash(ROB_i);
    queue.squash(ROB_i);
    squash_p.R_f = CPU_ROB->get_front();
    squash_p.R_r = CPU_ROB->get_rear();
    squash_p.ROB_i = brcUnit.squash_ROB_i();
    squash_p.flag = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x3870, %rax           # imm = 0x3870
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8560
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8590
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x85c0
testb $0x1, %al
jne 0x584e
jmp 0x5875
leaq -0x20(%rbp), %rdi
callq 0x8600
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x210a0
leaq -0x20(%rbp), %rdi
callq 0x8620
jmp 0x583b
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movl -0xc(%rbp), %esi
callq 0x5690
leaq 0x29bd4(%rip), %rax     # 0x2f460
movq (%rax), %rdi
callq 0xe5d0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x3898(%rax)
leaq 0x29bb9(%rip), %rax     # 0x2f460
movq (%rax), %rdi
callq 0xe5e0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x389c(%rax)
leaq 0x29bc6(%rip), %rdi     # 0x2f488
callq 0x105f0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x38a0(%rax)
movb $0x1, 0x38a4(%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: intAdder::intAdder()
intAdder::intAdder()
{
    for (int i = 0; i<CPU_cfg->int_add->rs_num; i++)
    {
        auto tmp = new resStation(&queue, INTGR);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x8640
movq -0x30(%rbp), %rax
leaq 0x2939c(%rip), %rcx     # 0x2eca0
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x29b34(%rip), %rcx     # 0x2f450
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x59ab
movl $0x50, %edi
callq 0x4380
movq %rax, -0x38(%rbp)
jmp 0x593b
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
xorl %edx, %edx
callq 0x20cc0
jmp 0x5950
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21930
jmp 0x5963
movq -0x30(%rbp), %rdi
addq $0x3870, %rdi           # imm = 0x3870
leaq -0x18(%rbp), %rsi
callq 0x86a0
jmp 0x5979
jmp 0x597b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5912
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x59b1
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x4350
jmp 0x59b1
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x8710
movq -0x20(%rbp), %rdi
callq 0x45f0
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpAdder::flpAdder()
flpAdder::flpAdder()
{
    for (int i = 0; i<CPU_cfg->fp_add->rs_num; i++)
    {
        auto tmp = new resStation(&queue, FLTP);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
    int latency = CPU_cfg->fp_add->exe_time - 1;
    pLatency_Q = nullptr;
    if (latency)
    {
        pLatency_Q = new FU_QEntry[latency];
        for (int i = 0; i<latency; i++)
            pLatency_Q[i].res = nullptr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x8640
movq -0x38(%rbp), %rax
leaq 0x28894(%rip), %rcx     # 0x2ecb8
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x29014(%rip), %rcx     # 0x2f450
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x64d4
movl $0x50, %edi
callq 0x4380
movq %rax, -0x40(%rbp)
jmp 0x645b
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
callq 0x20cc0
jmp 0x6473
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21930
jmp 0x6486
movq -0x38(%rbp), %rdi
addq $0x3870, %rdi           # imm = 0x3870
leaq -0x18(%rbp), %rsi
callq 0x86a0
jmp 0x649c
jmp 0x649e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6432
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x6574
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x4350
jmp 0x6574
movq -0x38(%rbp), %rax
leaq 0x28f71(%rip), %rcx     # 0x2f450
movq (%rcx), %rcx
movq 0x10(%rcx), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, -0x28(%rbp)
movq $0x0, 0x38a8(%rax)
cmpl $0x0, -0x28(%rbp)
je 0x656e
movslq -0x28(%rbp), %rax
movl $0x38, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x4030
movq %rax, -0x48(%rbp)
jmp 0x6525
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x38a8(%rax)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x656c
movq -0x38(%rbp), %rax
movq 0x38a8(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x653b
jmp 0x656e
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x8710
movq -0x20(%rbp), %rdi
callq 0x45f0
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpAdder::~flpAdder()
flpAdder::~flpAdder()
{
    for (auto &p : rs)
    {
        delete p;
        p = nullptr;
    }
    if (pLatency_Q)
        delete pLatency_Q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x2870d(%rip), %rcx     # 0x2ecb8
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x3870, %rax           # imm = 0x3870
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8560
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8590
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x85c0
testb $0x1, %al
jne 0x65e9
jmp 0x6626
leaq -0x18(%rbp), %rdi
callq 0x8600
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x6610
movq -0x38(%rbp), %rdi
callq 0x4350
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x8620
jmp 0x65d6
movq -0x30(%rbp), %rax
cmpq $0x0, 0x38a8(%rax)
je 0x6654
movq -0x30(%rbp), %rax
movq 0x38a8(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x6652
movq -0x40(%rbp), %rdi
callq 0x4350
jmp 0x6654
movq -0x30(%rbp), %rdi
callq 0x8710
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpAdder::shift(FU_QEntry&, FU_QEntry&)
void flpAdder::shift(FU_QEntry &in, FU_QEntry &out)
{
    int size = CPU_cfg->fp_add->exe_time - 1;
    if (!size)
    {
        out = in;
        return;
    }
    out = pLatency_Q[size-1];
    for (int i = size-1; i>0; i--)
        pLatency_Q[i] = pLatency_Q[i-1];
    pLatency_Q[0] = in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x28dbd(%rip), %rax     # 0x2f450
movq (%rax), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x66c0
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdi
movl $0x38, %edx
callq 0x42f0
jmp 0x6752
movq -0x28(%rbp), %rax
movq 0x38a8(%rax), %rsi
movl -0x1c(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x38, %rax, %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdi
movl $0x38, %edx
callq 0x42f0
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jle 0x6739
movq -0x28(%rbp), %rax
movq 0x38a8(%rax), %rsi
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rsi
movq 0x38a8(%rax), %rdi
movslq -0x20(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rdi
movl $0x38, %edx
callq 0x42f0
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x66f1
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rsi
movq 0x38a8(%rax), %rdi
movl $0x38, %edx
callq 0x42f0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpMtplr::flpMtplr()
flpMtplr::flpMtplr()
{
    for (int i = 0; i<CPU_cfg->fp_mul->rs_num; i++)
    {
        auto tmp = new resStation(&queue, FLTP);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
    int latency = CPU_cfg->fp_mul->exe_time - 1;
    pLatency_Q = nullptr;
    if (latency)
    {
        pLatency_Q = new FU_QEntry[latency];
        for (int i = 0; i<latency; i++)
            pLatency_Q[i].res = nullptr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x8640
movq -0x38(%rbp), %rax
leaq 0x281ac(%rip), %rcx     # 0x2ecd0
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x28914(%rip), %rcx     # 0x2f450
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x6bd4
movl $0x50, %edi
callq 0x4380
movq %rax, -0x40(%rbp)
jmp 0x6b5b
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x8, %rsi
movl $0x1, %edx
callq 0x20cc0
jmp 0x6b73
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21930
jmp 0x6b86
movq -0x38(%rbp), %rdi
addq $0x3870, %rdi           # imm = 0x3870
leaq -0x18(%rbp), %rsi
callq 0x86a0
jmp 0x6b9c
jmp 0x6b9e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6b32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x6c74
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x4350
jmp 0x6c74
movq -0x38(%rbp), %rax
leaq 0x28871(%rip), %rcx     # 0x2f450
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
movl 0x4(%rcx), %ecx
subl $0x1, %ecx
movl %ecx, -0x28(%rbp)
movq $0x0, 0x38a8(%rax)
cmpl $0x0, -0x28(%rbp)
je 0x6c6e
movslq -0x28(%rbp), %rax
movl $0x38, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x4030
movq %rax, -0x48(%rbp)
jmp 0x6c25
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x38a8(%rax)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jge 0x6c6c
movq -0x38(%rbp), %rax
movq 0x38a8(%rax), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x6c3b
jmp 0x6c6e
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x8710
movq -0x20(%rbp), %rdi
callq 0x45f0
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpMtplr::~flpMtplr()
flpMtplr::~flpMtplr()
{
    for (auto &p : rs)
    {
        delete p;
        p = nullptr;
    }
    if (pLatency_Q)
        delete pLatency_Q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x28025(%rip), %rcx     # 0x2ecd0
addq $0x10, %rcx
movq %rcx, (%rax)
addq $0x3870, %rax           # imm = 0x3870
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8560
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x8590
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x85c0
testb $0x1, %al
jne 0x6ce9
jmp 0x6d26
leaq -0x18(%rbp), %rdi
callq 0x8600
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x6d10
movq -0x38(%rbp), %rdi
callq 0x4350
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
leaq -0x18(%rbp), %rdi
callq 0x8620
jmp 0x6cd6
movq -0x30(%rbp), %rax
cmpq $0x0, 0x38a8(%rax)
je 0x6d54
movq -0x30(%rbp), %rax
movq 0x38a8(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x6d52
movq -0x40(%rbp), %rdi
callq 0x4350
jmp 0x6d54
movq -0x30(%rbp), %rdi
callq 0x8710
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: flpMtplr::shift(FU_QEntry&, FU_QEntry&)
void flpMtplr::shift(FU_QEntry &in, FU_QEntry &out)
{
    int size = CPU_cfg->fp_mul->exe_time - 1;
    if (!size)
    {
        out = in;
        return;
    }
    out = pLatency_Q[size-1];
    for (int i = size-1; i>0; i--)
        pLatency_Q[i] = pLatency_Q[i-1];
    pLatency_Q[0] = in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x286bd(%rip), %rax     # 0x2f450
movq (%rax), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6dc0
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdi
movl $0x38, %edx
callq 0x42f0
jmp 0x6e52
movq -0x28(%rbp), %rax
movq 0x38a8(%rax), %rsi
movl -0x1c(%rbp), %eax
subl $0x1, %eax
cltq
imulq $0x38, %rax, %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdi
movl $0x38, %edx
callq 0x42f0
movl -0x1c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jle 0x6e39
movq -0x28(%rbp), %rax
movq 0x38a8(%rax), %rsi
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rsi
movq 0x38a8(%rax), %rdi
movslq -0x20(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rdi
movl $0x38, %edx
callq 0x42f0
movl -0x20(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x6df1
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rsi
movq 0x38a8(%rax), %rdi
movl $0x38, %edx
callq 0x42f0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: ldsdUnit::ldsdUnit()
ldsdUnit::ldsdUnit()
{
    for (int i = 0; i<CPU_cfg->ld_str->rs_num; i++)
    {
        auto tmp = new resStation(&queue, INTGR);
        init_resStation(tmp);
        rs.push_back(tmp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x8640
movq -0x30(%rbp), %rax
leaq 0x27ac4(%rip), %rcx     # 0x2ece8
addq $0x10, %rcx
movq %rcx, (%rax)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x28214(%rip), %rcx     # 0x2f450
movq (%rcx), %rcx
movq 0x20(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x72cb
movl $0x50, %edi
callq 0x4380
movq %rax, -0x38(%rbp)
jmp 0x725b
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x8, %rsi
xorl %edx, %edx
callq 0x20cc0
jmp 0x7270
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21930
jmp 0x7283
movq -0x30(%rbp), %rdi
addq $0x3870, %rdi           # imm = 0x3870
leaq -0x18(%rbp), %rsi
callq 0x86a0
jmp 0x7299
jmp 0x729b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7232
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x72d1
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x4350
jmp 0x72d1
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x8710
movq -0x20(%rbp), %rdi
callq 0x45f0
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: nopBublr::nopBublr()
nopBublr::nopBublr()
{
    bubble.ROB_i = -1;
    bubble.ROB_E = nullptr;
    for (int i = 0; i<3; i++)
    {
        shifter[i].ROB_i = -1;
        shifter[i].ROB_E = nullptr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jge 0x7899
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
addq $0x10, %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7855
popq %rbp
retq
nopl (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: nopBublr::FU_automat()
void nopBublr::FU_automat()
{
    next_vdd = 0;
    while (true)
    {
        at_rising_edge(next_vdd);
        for (int i = 2; i>0; i--)
            shifter[i] = shifter[i-1];
        shifter[0] = bubble;
        bubble.ROB_i = -1;
        bubble.ROB_E = nullptr;
        if (shifter[0].ROB_E)
            shifter[0].ROB_E->output.exe = sys_clk.get_prog_cyc();
        if (shifter[1].ROB_E)
        {
            shifter[1].ROB_E->output.wBack = sys_clk.get_prog_cyc();
            shifter[1].ROB_E->wrtnBack = true;
        }
        if (shifter[2].ROB_E)
        {
            shifter[2].ROB_E->output.commit = sys_clk.get_prog_cyc();
            shifter[2].ROB_E->finished = true;
        }
        at_falling_edge(next_vdd);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, 0x48(%rax)
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
callq 0x12130
movl $0x2, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x7a08
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x10, %rcx
movl -0xc(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
addq $0x10, %rax
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x79bf
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x8(%rax), %rcx
movq %rcx, 0x18(%rax)
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rax)
cmpq $0x0, 0x18(%rax)
je 0x7a49
leaq 0x28361(%rip), %rdi     # 0x2fd98
callq 0x116c0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl %ecx, 0x54(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x7a75
leaq 0x2833d(%rip), %rdi     # 0x2fd98
callq 0x116c0
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
movl %edx, 0x5c(%rcx)
movq 0x28(%rax), %rax
movb $0x1, 0x1(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x7aa0
leaq 0x28311(%rip), %rdi     # 0x2fd98
callq 0x116c0
movl %eax, %edx
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rcx
movl %edx, 0x60(%rcx)
movq 0x38(%rax), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rdi
addq $0x48, %rdi
callq 0x121a0
jmp 0x79ab
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/ROB.cpp
// Function: ROB::get_entry(int)
ROBEntry *ROB::get_entry(int index)
{
    if (index >= size || index < 0)
    {
        err_log("ROB access out of range");
        return nullptr;
    }
    return &buf[index];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x58(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x10(%rcx), %eax
jge 0xe4f5
cmpl $0x0, -0x14(%rbp)
jge 0xe56d
leaq -0x39(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0x4600
movq -0x60(%rbp), %rdx
leaq 0x13d23(%rip), %rsi     # 0x22230
leaq -0x38(%rbp), %rdi
callq 0x44c0
jmp 0xe518
leaq -0x38(%rbp), %rdi
callq 0x11880
jmp 0xe523
leaq -0x38(%rbp), %rdi
callq 0x4240
leaq -0x39(%rbp), %rdi
callq 0x43d0
movq $0x0, -0x8(%rbp)
jmp 0xe587
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0xe562
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4240
leaq -0x39(%rbp), %rdi
callq 0x43d0
jmp 0xe591
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x45f0
nopw (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/ROB.cpp
// Function: ROB::add_entry(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, opCode)
int ROB::add_entry(string n, string d, opCode c)
{
    if ((rear+1)%size == front)
        throw -1;
    int index = rear;
    rear = (rear + 1)%size;
    ROBEntry *tmp = buf + index;
    (*tmp).code = c;
    (*tmp).name = n;
    (*tmp).regName = d;
    (*tmp).finished = false;
    (*tmp).wrtnBack = false;
    (*tmp).output.issue = sys_clk.get_prog_cyc();
    (*tmp).output.exe = -1;
    (*tmp).output.mem = -1;
    (*tmp).output.wBack = -1;
    (*tmp).output.commit = -1;
    return index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movl 0x4(%rcx), %eax
addl $0x1, %eax
cltd
idivl 0x10(%rcx)
movq -0x30(%rbp), %rax
cmpl (%rax), %edx
jne 0xe65c
movl $0x4, %edi
callq 0x41c0
movq %rax, %rdi
movl $0xffffffff, (%rdi)     # imm = 0xFFFFFFFF
movq 0x20945(%rip), %rsi     # 0x2ef98
xorl %eax, %eax
movl %eax, %edx
callq 0x45c0
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rcx
movl 0x4(%rcx), %eax
movl %eax, -0x20(%rbp)
movl 0x4(%rcx), %eax
addl $0x1, %eax
cltd
idivl 0x10(%rcx)
movq -0x30(%rbp), %rax
movl %edx, 0x4(%rax)
movq 0x8(%rax), %rax
movslq -0x20(%rbp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
callq 0x4050
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq $0x28, %rdi
callq 0x4050
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x1(%rax)
leaq 0x216c9(%rip), %rdi     # 0x2fd98
callq 0x116c0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x54(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x58(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x5c(%rax) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movl $0xffffffff, 0x60(%rax) # imm = 0xFFFFFFFF
movl -0x20(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/ROB.cpp
// Function: init_CPU_ROB()
void init_CPU_ROB()
{
    if (CPU_ROB)
        delete CPU_ROB;
    CPU_ROB = new ROB(*(CPU_cfg->ROB_num));
    while(pthread_create(&CPU_ROB->handle, NULL, &ROB_thread_container, CPU_ROB));
    clk_wait_list.push_back(&CPU_ROB->next_vdd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x20541(%rip), %rax     # 0x2f460
cmpq $0x0, (%rax)
je 0xef4d
leaq 0x20534(%rip), %rax     # 0x2f460
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xef4b
movq -0x20(%rbp), %rdi
callq 0xe430
movq -0x20(%rbp), %rdi
callq 0x4350
jmp 0xef4d
movl $0x28, %edi
callq 0x4380
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
leaq 0x204e8(%rip), %rax     # 0x2f450
movq (%rax), %rax
movq (%rax), %rax
movl (%rax), %esi
callq 0xe360
jmp 0xef77
movq -0x28(%rbp), %rcx
leaq 0x204de(%rip), %rax     # 0x2f460
movq %rcx, (%rax)
leaq 0x204d4(%rip), %rax     # 0x2f460
movq (%rax), %rdi
addq $0x18, %rdi
leaq 0x204c6(%rip), %rax     # 0x2f460
movq (%rax), %rcx
xorl %eax, %eax
movl %eax, %esi
leaq -0xc8(%rip), %rdx       # 0xeee0
callq 0x4630
cmpl $0x0, %eax
je 0xefcb
jmp 0xef85
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x8(%rbp)
movl %eax, -0xc(%rbp)
callq 0x4350
jmp 0xeff3
leaq 0x2048e(%rip), %rax     # 0x2f460
movq (%rax), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
leaq 0x20e24(%rip), %rdi     # 0x2fe08
leaq -0x18(%rbp), %rsi
callq 0x8530
addq $0x30, %rsp
popq %rbp
retq
movq -0x8(%rbp), %rdi
callq 0x45f0
nopl (%rax)
// File: Ziang95[P]Tomasulo_simulator/branch.cpp
// Function: BTB::addEntry(int, int)
void BTB::addEntry(int _instr_i, int _target)
{
    int index = _instr_i%BTB_LEN;
    buf[index].target = _target;
    buf[index].predicted = true;
    buf[index].taken = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movq -0x20(%rbp), %rax
movl %edx, -0x14(%rbp)
movl -0x10(%rbp), %edx
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,8)
movslq -0x14(%rbp), %rcx
movb $0x1, 0x4(%rax,%rcx,8)
movslq -0x14(%rbp), %rcx
movb $0x1, 0x5(%rax,%rcx,8)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/branch.cpp
// Function: BTB::getEntry(int)
BTBEntry* BTB::getEntry(int _instr_i)
{
    int index = _instr_i%BTB_LEN;
    if (buf[index].predicted)
        return &buf[index];
    else
        return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movq -0x20(%rbp), %rax
movl %edx, -0x18(%rbp)
movslq -0x18(%rbp), %rcx
testb $0x1, 0x4(%rax,%rcx,8)
je 0x10575
movq -0x20(%rbp), %rax
movslq -0x18(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x1057d
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/clock.cpp
// Function: clk_tick::clk_tick()
clk_tick::clk_tick()
{
    vdd_0 = vdd_1 = PTHREAD_COND_INITIALIZER;
    vdd = 0;
    prog_started = false;
    prog_cyc = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x41e0
movq -0x40(%rbp), %rdi
addq $0x10, %rdi
movq %rdi, -0x48(%rbp)
leaq -0x38(%rbp), %rsi
movl $0x30, %edx
callq 0x42f0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdi
addq $0x40, %rdi
movl $0x30, %edx
callq 0x42f0
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
movb $0x0, 0x1(%rax)
movl $0x0, 0x4(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: Ziang95[P]Tomasulo_simulator/clock.cpp
// Function: all_unit_ready_for_one()
int all_unit_ready_for_one()
{
    int r = 1;
    for (const int* v : clk_wait_list)
    {
        if (!v)
        {
            err_log("null Ptr encountered in clk_wait_list");
            return -1;
        }
        r *= *v;
    }
    return r == 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x1, -0x8(%rbp)
leaq 0x1e692(%rip), %rax     # 0x2fe08
movq %rax, -0x10(%rbp)
leaq 0x1e687(%rip), %rdi     # 0x2fe08
callq 0x9c40
movq %rax, -0x18(%rbp)
leaq 0x1e677(%rip), %rdi     # 0x2fe08
callq 0x9ad0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x122d0
testb $0x1, %al
jne 0x117b0
jmp 0x11859
leaq -0x18(%rbp), %rdi
callq 0x12310
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1183e
leaq -0x49(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x4600
movq -0x68(%rbp), %rdx
leaq 0x10ac3(%rip), %rsi     # 0x222a2
leaq -0x48(%rbp), %rdi
callq 0x44c0
jmp 0x117ea
leaq -0x48(%rbp), %rdi
callq 0x11880
jmp 0x117f5
leaq -0x48(%rbp), %rdi
callq 0x4240
leaq -0x49(%rbp), %rdi
callq 0x43d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x11868
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x11833
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4240
leaq -0x49(%rbp), %rdi
callq 0x43d0
jmp 0x11871
movq -0x28(%rbp), %rax
movl (%rax), %eax
imull -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x12330
jmp 0x1179a
cmpl $0x1, -0x8(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x45f0
nopw (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/clock.cpp
// Function: all_unit_ready_for_zero()
int all_unit_ready_for_zero()
{
    int r = 0;
    for (const int* v : clk_wait_list)
    {
        if (!v)
        {
            err_log("null Ptr encountered in clk_wait_list");
            return -1;
        }
        r += *v;
    }
    return r == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x8(%rbp)
leaq 0x1e4b2(%rip), %rax     # 0x2fe08
movq %rax, -0x10(%rbp)
leaq 0x1e4a7(%rip), %rdi     # 0x2fe08
callq 0x9c40
movq %rax, -0x18(%rbp)
leaq 0x1e497(%rip), %rdi     # 0x2fe08
callq 0x9ad0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x122d0
testb $0x1, %al
jne 0x11990
jmp 0x11a38
leaq -0x18(%rbp), %rdi
callq 0x12310
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x11a1e
leaq -0x49(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x4600
movq -0x68(%rbp), %rdx
leaq 0x108e3(%rip), %rsi     # 0x222a2
leaq -0x48(%rbp), %rdi
callq 0x44c0
jmp 0x119ca
leaq -0x48(%rbp), %rdi
callq 0x11880
jmp 0x119d5
leaq -0x48(%rbp), %rdi
callq 0x4240
leaq -0x49(%rbp), %rdi
callq 0x43d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x11a47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x11a13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4240
leaq -0x49(%rbp), %rdi
callq 0x43d0
jmp 0x11a50
movq -0x28(%rbp), %rax
movl (%rax), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x12330
jmp 0x1197a
cmpl $0x0, -0x8(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x45f0
nopl (%rax)
// File: Ziang95[P]Tomasulo_simulator/clock.cpp
// Function: msg_log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void msg_log(string msg, int lvl)
{
    if (debug_level < lvl) return;
    pthread_mutex_lock(&cout_lock);
    cout<<"[Pro_cyc="<<sys_clk.get_prog_cyc()<<", vdd="<<sys_clk.get_vdd()<<"] "<<msg<<endl;
    pthread_mutex_unlock(&cout_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x20e56(%rip), %rax     # 0x32ed0
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jge 0x12086
jmp 0x12124
leaq 0x1d2fb(%rip), %rdi     # 0x2f388
callq 0x4510
movq 0x1cf27(%rip), %rdi     # 0x2efc0
leaq 0x10295(%rip), %rsi     # 0x22335
callq 0x4370
movq %rax, -0x28(%rbp)
leaq 0x1dce8(%rip), %rdi     # 0x2fd98
callq 0x116c0
movq -0x28(%rbp), %rdi
movl %eax, %esi
callq 0x45e0
movq %rax, %rdi
leaq 0x10275(%rip), %rsi     # 0x2233f
callq 0x4370
movq %rax, -0x20(%rbp)
leaq 0x1dcbe(%rip), %rdi     # 0x2fd98
callq 0x11680
movq -0x20(%rbp), %rdi
movzbl %al, %esi
andl $0x1, %esi
callq 0x4610
movq %rax, %rdi
leaq 0x1024e(%rip), %rsi     # 0x22346
callq 0x4370
movq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x4340
movq %rax, %rdi
movq 0x1ce95(%rip), %rsi     # 0x2efa8
callq 0x43a0
leaq 0x1d269(%rip), %rdi     # 0x2f388
callq 0x42c0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/clock.cpp
// Function: at_rising_edge(int&)
void at_rising_edge(int &next_vdd)
{
    pthread_mutex_lock(&boradcast_lock);
    next_vdd = 1;
    while(sys_clk.get_vdd() == 0)
        pthread_cond_wait(&(sys_clk.vdd_1), &boradcast_lock);
    pthread_mutex_unlock(&boradcast_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x1d26d(%rip), %rdi     # 0x2f3b0
callq 0x4510
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
leaq 0x1dc3f(%rip), %rdi     # 0x2fd98
callq 0x11680
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x12181
leaq 0x1dc29(%rip), %rdi     # 0x2fd98
addq $0x10, %rdi
leaq 0x1d236(%rip), %rsi     # 0x2f3b0
callq 0x4530
jmp 0x12152
leaq 0x1d228(%rip), %rdi     # 0x2f3b0
callq 0x42c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/clock.cpp
// Function: at_falling_edge(int&)
void at_falling_edge(int &next_vdd)
{
    pthread_mutex_lock(&boradcast_lock);
    next_vdd = 0;
    while(sys_clk.get_vdd() == 1)
        pthread_cond_wait(&(sys_clk.vdd_0), &boradcast_lock);
    pthread_mutex_unlock(&boradcast_lock);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x1d1fd(%rip), %rdi     # 0x2f3b0
callq 0x4510
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
leaq 0x1dbcf(%rip), %rdi     # 0x2fd98
callq 0x11680
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x121f1
leaq 0x1dbb9(%rip), %rdi     # 0x2fd98
addq $0x40, %rdi
leaq 0x1d1c6(%rip), %rsi     # 0x2f3b0
callq 0x4530
jmp 0x121c2
leaq 0x1d1b8(%rip), %rdi     # 0x2f3b0
callq 0x42c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/import.cpp
// Function: get_opcode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
opCode get_opcode(string opName)
{
    for (char &c : opName)
        c = toupper(c);
    if (opName == "ADD")
        return ADD;
    else if (opName == "ADD.D")
        return ADD_D;
    else if (opName == "ADDI")
        return ADDI;
    else if (opName == "SUB")
        return SUB;
    else if (opName == "SUB.D")
        return SUB_D;
    else if (opName == "MULT.D")
        return MUL_D;
    else if (opName == "BEQ")
        return BEQ;
    else if (opName == "BNE")
        return BNE;
    else if (opName == "LD")
        return LD;
    else if (opName == "SD")
        return SD;
    else if (opName == "NOP")
        return NOP;
    else
        return ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4320
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4200
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x15890
testb $0x1, %al
jne 0x12391
jmp 0x123bd
leaq -0x20(%rbp), %rdi
callq 0x158d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %edi
callq 0x4650
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
leaq -0x20(%rbp), %rdi
callq 0x158f0
jmp 0x1237e
movq -0x38(%rbp), %rdi
leaq 0xffc4(%rip), %rsi      # 0x2238c
callq 0xfae0
testb $0x1, %al
jne 0x123d3
jmp 0x123df
movl $0x0, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xffa6(%rip), %rsi      # 0x22390
callq 0xfae0
testb $0x1, %al
jne 0x123f5
jmp 0x12401
movl $0x1, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xff8a(%rip), %rsi      # 0x22396
callq 0xfae0
testb $0x1, %al
jne 0x12417
jmp 0x12423
movl $0x4, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xff6d(%rip), %rsi      # 0x2239b
callq 0xfae0
testb $0x1, %al
jne 0x12439
jmp 0x12445
movl $0x2, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xff4f(%rip), %rsi      # 0x2239f
callq 0xfae0
testb $0x1, %al
jne 0x1245b
jmp 0x12467
movl $0x3, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xff33(%rip), %rsi      # 0x223a5
callq 0xfae0
testb $0x1, %al
jne 0x1247d
jmp 0x12489
movl $0x5, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xff18(%rip), %rsi      # 0x223ac
callq 0xfae0
testb $0x1, %al
jne 0x1249f
jmp 0x124ab
movl $0x9, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xfefa(%rip), %rsi      # 0x223b0
callq 0xfae0
testb $0x1, %al
jne 0x124c1
jmp 0x124ca
movl $0x8, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xfedf(%rip), %rsi      # 0x223b4
callq 0xfae0
testb $0x1, %al
jne 0x124e0
jmp 0x124e9
movl $0x6, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xfec3(%rip), %rsi      # 0x223b7
callq 0xfae0
testb $0x1, %al
jne 0x124ff
jmp 0x12508
movl $0x7, -0x4(%rbp)
jmp 0x1252e
movq -0x38(%rbp), %rdi
leaq 0xfea7(%rip), %rsi      # 0x223ba
callq 0xfae0
testb $0x1, %al
jne 0x1251e
jmp 0x12527
movl $0xa, -0x4(%rbp)
jmp 0x1252e
movl $0xb, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Ziang95[P]Tomasulo_simulator/././headers/import.h
// Function: config::~config()
~config()
        {
            if (ROB_num) delete ROB_num;
            if (int_add) delete int_add;
            if (fp_add) delete fp_add;
            if (fp_mul) delete fp_mul;
            if (ld_str) delete ld_str;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x15986
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x15984
movq -0x18(%rbp), %rdi
callq 0x4350
jmp 0x15986
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x159ae
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x159ac
movq -0x20(%rbp), %rdi
callq 0x4350
jmp 0x159ae
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x159d6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x159d4
movq -0x28(%rbp), %rdi
callq 0x4350
jmp 0x159d6
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x159fe
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x159fc
movq -0x30(%rbp), %rdi
callq 0x4350
jmp 0x159fe
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x15a26
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x15a24
movq -0x38(%rbp), %rdi
callq 0x4350
jmp 0x15a26
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: Ziang95[P]Tomasulo_simulator/instruction.cpp
// Function: instr_queue::ptr_advance()
bool instr_queue::ptr_advance()
{
    if (head >= size)
    {
        err_log("Instr queue acccess out of range while advancing");
        return false;
    }
    head ++;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x50(%rbp)
movslq (%rcx), %rax
cmpq 0x8(%rcx), %rax
jb 0x178d1
leaq -0x31(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x4600
movq -0x58(%rbp), %rdx
leaq 0xacf9(%rip), %rsi      # 0x2256e
leaq -0x30(%rbp), %rdi
callq 0x44c0
jmp 0x17880
leaq -0x30(%rbp), %rdi
callq 0x11880
jmp 0x1788b
leaq -0x30(%rbp), %rdi
callq 0x4240
leaq -0x31(%rbp), %rdi
callq 0x43d0
movb $0x0, -0x1(%rbp)
jmp 0x178e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x178c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x4240
leaq -0x31(%rbp), %rdi
callq 0x43d0
jmp 0x178eb
movq -0x50(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x45f0
nopw %cs:(%rax,%rax)