LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/FU.cpp
// Function: FU_CDB::enQ(memCell*, int)
bool FU_CDB::enQ(memCell *v, int s)
{
    pthread_mutex_lock(&Q_lock);
    if ((rear+1)%Q_LEN == front)
    {
        err_log("The reserv_CDB queue is full");
        pthread_mutex_unlock(&Q_lock);
        return false;
    }
    int index = rear;
    rear = (++rear)%Q_LEN;
    int pos = 0;
    for (; (front + pos)%Q_LEN != index && queue[(front + pos)%Q_LEN].source < s; pos++);
    for (int i = index; (Q_LEN + i)%Q_LEN != (front + pos)%Q_LEN; i--)
        queue[(Q_LEN+i)%Q_LEN] = queue[(Q_LEN+i-1)%Q_LEN];
    index = (front+pos)%Q_LEN;
    queue[index].value = *v;
    queue[index].source = s;
    pthread_mutex_unlock(&Q_lock);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rsi, -0x30(%rbp)
movq %rdi, %r15
leaq 0x810(%rdi), %rbx
movq %rbx, %rdi
callq 0x3380
movl 0x808(%r15), %r13d
movl 0x80c(%r15), %eax
leal 0x1(%rax), %ecx
leal 0x100(%rax), %edx
testl %ecx, %ecx
cmovsl %edx, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
negl %ecx
leal (%rax,%rcx), %r12d
incl %r12d
cmpl %r13d, %r12d
je 0x3c93
movl %r12d, 0x80c(%r15)
leal 0xff(%r13), %esi
testl %r13d, %r13d
cmovnsl %r13d, %esi
andl $0xffffff00, %esi       # imm = 0xFFFFFF00
movl %r13d, %ecx
subl %esi, %ecx
cmpl %eax, %ecx
je 0x3c2f
leal 0x1(%r13), %esi
movslq %ecx, %rdi
cmpl %r14d, 0x4(%r15,%rdi,8)
jge 0x3c2f
leal 0xff(%rsi), %edi
testl %esi, %esi
cmovnsl %esi, %edi
andl $0xffffff00, %edi       # imm = 0xFFFFFF00
movl %esi, %ecx
subl %edi, %ecx
incl %esi
cmpl %eax, %ecx
jne 0x3c0a
leal 0x1ff(%rax), %esi
testl %edx, %edx
cmovnsl %edx, %esi
andl $0xffffff00, %esi       # imm = 0xFFFFFF00
negl %esi
leal (%rax,%rsi), %edx
addl $0x100, %edx            # imm = 0x100
cmpl %ecx, %edx
je 0x3c7f
addl $0xff, %eax
leal 0xff(%rax), %esi
testl %eax, %eax
cmovnsl %eax, %esi
andl $0xffffff00, %esi       # imm = 0xFFFFFF00
movslq %edx, %rdx
movl %eax, %edi
subl %esi, %edi
movslq %edi, %rsi
movq (%r15,%rsi,8), %r8
movq %r8, (%r15,%rdx,8)
decl %eax
movl %edi, %edx
cmpl %ecx, %esi
jne 0x3c54
movslq %ecx, %rax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%r15,%rax,8)
movl %r14d, 0x4(%r15,%rax,8)
jmp 0x3ccb
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x11362(%rip), %rsi     # 0x15004
leaq 0x11377(%rip), %rdx     # 0x15020
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x7202
movq %r14, %rdi
callq 0x9777
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x3ccb
callq 0x3230
cmpl %r13d, %r12d
setne %r14b
movq %rbx, %rdi
callq 0x31e0
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x3cfd
callq 0x3230
movq %rbx, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %rbx
leaq 0x17628(%rip), %r14     # 0x1b368
movq (%r14), %rdi
callq 0x7fc0
movl %eax, %r12d
movq (%r14), %rdi
callq 0x7fc8
movl %eax, %r13d
leaq 0x810(%rbx), %rdi
movq %rdi, -0x38(%rbp)
callq 0x3380
movl 0x80c(%rbx), %r15d
cmpl %r15d, 0x808(%rbx)
je 0x3ded
leal -0x1(%r15), %eax
leal 0xfe(%r15), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
negl %ecx
leal (%r15,%rcx), %r14d
decl %r14d
cmpl 0x808(%rbx), %r14d
je 0x3dc5
movslq %r14d, %rax
movl 0x4(%rbx,%rax,8), %esi
movl -0x2c(%rbp), %edi
movl %r12d, %edx
movl %r13d, %ecx
callq 0xf729
testb %al, %al
je 0x3dc5
movl %r14d, 0x80c(%rbx)
movb $0x1, %al
movl %r14d, %r15d
jmp 0x3dc7
xorl %eax, %eax
testb %al, %al
jne 0x3d76
movl 0x804(%rbx), %esi
movl -0x2c(%rbp), %edi
movl %r12d, %edx
movl %r13d, %ecx
callq 0xf729
testb %al, %al
je 0x3ded
movl $0xfffffffe, 0x804(%rbx) # imm = 0xFFFFFFFE
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
leaq 0x838(%rdi), %r14
movl $0x0, 0x838(%rdi)
leaq 0x810(%rdi), %r15
movq %r14, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movq %r14, %rdi
callq 0x9fdf
movq %r14, %rdi
callq 0xa03d
movq %r15, %rdi
callq 0x3380
movslq 0x808(%rbx), %rax
cmpl 0x80c(%rbx), %eax
je 0x3fc7
movl 0x4(%rbx,%rax,8), %r14d
movl %r14d, 0x804(%rbx)
movl (%rbx,%rax,8), %eax
movl %eax, 0x800(%rbx)
movl %r14d, %r13d
negl %r13d
cmovsl %r14d, %r13d
movl $0x1, %r12d
cmpl $0xa, %r13d
jb 0x3ed5
movl $0x4, %r12d
movl %r13d, %eax
movl $0xd1b71759, %edx       # imm = 0xD1B71759
cmpl $0x63, %eax
jbe 0x3ecc
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x3ed2
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x3ed5
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r12d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x3e9c
addl $-0x3, %r12d
jmp 0x3ed5
addl $-0x2, %r12d
jmp 0x3ed5
decl %r12d
movq %r15, %rbx
shrl $0x1f, %r14d
movl %r14d, %esi
addl %r12d, %esi
leaq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %r15
movq %r15, %rdi
movl $0x2d, %edx
callq 0x32b0
movq -0x58(%rbp), %rdi
addq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x703e
movl $0x21, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x11100(%rip), %rcx     # 0x15021
callq 0x3280
leaq -0x68(%rbp), %r14
movq %r14, -0x78(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3f4a
movq %rdx, -0x78(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x68(%rbp)
jmp 0x3f51
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq %rbx, %r15
movq 0x8(%rax), %rdx
movq %rdx, -0x70(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x78(%rbp), %rdi
movl $0x3, %esi
callq 0x9f03
movq -0x38(%rbp), %rbx
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x3f8b
callq 0x3230
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
movq -0x30(%rbp), %r14
je 0x3fa1
callq 0x3230
movl 0x808(%rbx), %eax
leal 0x1(%rax), %ecx
leal 0x100(%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
andl $0xffffff00, %edx       # imm = 0xFFFFFF00
negl %edx
addl %edx, %eax
incl %eax
movl %eax, 0x808(%rbx)
movq %r15, %rdi
callq 0x31e0
jmp 0x3e38
movq %rax, %rbx
movq -0x78(%rbp), %rdi
cmpq %r14, %rdi
je 0x3fea
callq 0x3230
jmp 0x3fea
movq %rax, %rbx
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x3ffc
callq 0x3230
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
leaq 0x170e4(%rip), %rbx     # 0x1b368
movq (%rbx), %rdi
callq 0x7fc0
movl %eax, %r15d
movq (%rbx), %rdi
callq 0x7fc8
movl %eax, %r13d
leaq 0x3808(%r14), %rdi
movq %rdi, -0x38(%rbp)
callq 0x3380
movl 0x3804(%r14), %r12d
cmpl %r12d, 0x3800(%r14)
je 0x4315
leal -0x1(%r12), %eax
leal 0xfe(%r12), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
negl %ecx
leal (%r12,%rcx), %ebx
decl %ebx
cmpl 0x3800(%r14), %ebx
je 0x430f
movslq %ebx, %rax
imulq $0x38, %rax, %rax
movl 0x4(%r14,%rax), %esi
movl -0x2c(%rbp), %edi
movl %r15d, %edx
movl %r13d, %ecx
callq 0xf729
testb %al, %al
je 0x430f
movl %ebx, 0x3804(%r14)
movb $0x1, %al
movl %ebx, %r12d
jmp 0x4311
xorl %eax, %eax
testb %al, %al
jne 0x42ba
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/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
movslq 0x3800(%rdi), %rcx
cmpl 0x3804(%rdi), %ecx
jne 0x4343
xorl %eax, %eax
jmp 0x436a
imulq $0x38, %rcx, %rax
addq %rdi, %rax
leal 0x1(%rcx), %edx
leal 0x100(%rcx), %esi
testl %edx, %edx
cmovnsl %edx, %esi
andl $0xffffff00, %esi       # imm = 0xFFFFFF00
negl %esi
addl %esi, %ecx
incl %ecx
movl %ecx, 0x3800(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq 0x3870(%rdi), %r15
movq 0x3878(%rdi), %r12
cmpq %r12, %r15
je 0x43a1
movq (%r15), %rdi
movl %r14d, %esi
callq 0x13dca
addq $0x8, %r15
jmp 0x438b
leaq 0x8(%rbx), %rdi
movl %r14d, %esi
callq 0x4266
leaq 0x16fb4(%rip), %r14     # 0x1b368
movq (%r14), %rdi
callq 0x7fc0
movl %eax, 0x3898(%rbx)
movq (%r14), %rdi
callq 0x7fc8
movl %eax, 0x389c(%rbx)
leaq 0x16fb9(%rip), %rdi     # 0x1b390
callq 0x8f88
movl %eax, 0x38a0(%rbx)
movb $0x1, 0x38a4(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x3870(%rdi)
movq $0x0, 0x3880(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x1686d(%rip), %rax     # 0x1aca8
movq %rax, (%rdi)
leaq 0x16f13(%rip), %r12     # 0x1b358
movq (%r12), %rax
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
jle 0x44cb
movq %rdi, %rbx
leaq 0x3870(%rdi), %rax
movq %rax, -0x38(%rbp)
leaq 0x8(%rdi), %r15
xorl %r14d, %r14d
movl $0x50, %edi
callq 0x3250
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x139a0
movq %r13, -0x30(%rbp)
movq %r13, %rdi
callq 0x14add
movq 0x3878(%rbx), %rsi
cmpq 0x3880(%rbx), %rsi
je 0x44ae
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x3878(%rbx)
jmp 0x44bb
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x73d6
incl %r14d
movq (%r12), %rax
movq 0x8(%rax), %rax
cmpl (%rax), %r14d
jl 0x4467
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r13, %rdi
callq 0x3230
jmp 0x44ea
movq %rax, %r14
leaq 0x16887(%rip), %rax     # 0x1ad78
movq %rax, (%rbx)
movq 0x3870(%rbx), %rdi
testq %rdi, %rdi
je 0x4505
callq 0x3230
movq %r14, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x3870(%rdi)
movq $0x0, 0x3880(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x15b7e(%rip), %rax     # 0x1acc0
movq %rax, (%rdi)
leaq 0x1620c(%rip), %r12     # 0x1b358
movq (%r12), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
jle 0x51d2
leaq 0x3870(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x8(%rbx), %r15
xorl %r14d, %r14d
movl $0x50, %edi
callq 0x3250
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x139a0
movq %r13, -0x30(%rbp)
movq %r13, %rdi
callq 0x14add
movq 0x3878(%rbx), %rsi
cmpq 0x3880(%rbx), %rsi
je 0x51b5
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x3878(%rbx)
jmp 0x51c2
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x73d6
incl %r14d
movq (%r12), %rax
movq 0x10(%rax), %rax
cmpl (%rax), %r14d
jl 0x516b
movslq 0x4(%rax), %r15
leaq -0x1(%r15), %r14
movq $0x0, 0x38a8(%rbx)
testl %r14d, %r14d
je 0x522d
movl $0x38, %ecx
movq %r14, %rax
mulq %rcx
movq $-0x1, %rdi
cmovnoq %rax, %rdi
callq 0x3030
movq %rax, 0x38a8(%rbx)
cmpl $0x2, %r15d
jl 0x522d
movl %r14d, %ecx
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
movq $0x0, 0x8(%rax,%rdx)
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x521b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x524b
movq %rax, %r14
movq %r13, %rdi
callq 0x3230
jmp 0x524e
movq %rax, %r14
leaq 0x15b23(%rip), %rax     # 0x1ad78
movq %rax, (%rbx)
movq 0x3870(%rbx), %rdi
testq %rdi, %rdi
je 0x5269
callq 0x3230
movq %r14, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x15a3a(%rip), %rax     # 0x1acc0
movq %rax, (%rdi)
movq 0x3870(%rdi), %r14
movq 0x3878(%rdi), %r15
cmpq %r15, %r14
je 0x52b6
movq (%r14), %rdi
testq %rdi, %rdi
je 0x52a9
callq 0x3230
movq $0x0, (%r14)
addq $0x8, %r14
jmp 0x5297
movq 0x38a8(%rbx), %rdi
testq %rdi, %rdi
je 0x52c7
callq 0x3230
leaq 0x15aaa(%rip), %rax     # 0x1ad78
movq %rax, (%rbx)
movq 0x3870(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x52ec
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3230
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x16059(%rip), %rax     # 0x1b358
movq (%rax), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rax), %rax
cmpq $0x1, %rax
je 0x539a
movl %eax, %ecx
movq 0x38a8(%rdi), %r8
addq $-0x2, %rax
imulq $0x38, %rax, %r9
movq 0x30(%r8,%r9), %r10
movq %r10, 0x30(%rdx)
movups (%r8,%r9), %xmm0
movups 0x10(%r8,%r9), %xmm1
movups 0x20(%r8,%r9), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
cmpl $0x3, %ecx
jl 0x5393
movl %eax, %eax
imulq $0x38, %rax, %rcx
incq %rax
movq 0x38a8(%rdi), %rdx
movq -0x8(%rdx,%rcx), %r8
movq %r8, 0x30(%rdx,%rcx)
movups -0x38(%rdx,%rcx), %xmm0
movups -0x28(%rdx,%rcx), %xmm1
movups -0x18(%rdx,%rcx), %xmm2
movups %xmm2, 0x20(%rdx,%rcx)
movups %xmm1, 0x10(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
decq %rax
addq $-0x38, %rcx
cmpq $0x1, %rax
jg 0x5358
movq 0x38a8(%rdi), %rdx
movq 0x30(%rsi), %rax
movq %rax, 0x30(%rdx)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x3870(%rdi)
movq $0x0, 0x3880(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x1543a(%rip), %rax     # 0x1acd8
movq %rax, (%rdi)
leaq 0x15ab0(%rip), %r12     # 0x1b358
movq (%r12), %rax
movq 0x18(%rax), %rax
cmpl $0x0, (%rax)
jle 0x592e
leaq 0x3870(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0x8(%rbx), %r15
xorl %r14d, %r14d
movl $0x50, %edi
callq 0x3250
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x139a0
movq %r13, -0x30(%rbp)
movq %r13, %rdi
callq 0x14add
movq 0x3878(%rbx), %rsi
cmpq 0x3880(%rbx), %rsi
je 0x5911
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x3878(%rbx)
jmp 0x591e
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x73d6
incl %r14d
movq (%r12), %rax
movq 0x18(%rax), %rax
cmpl (%rax), %r14d
jl 0x58c7
movslq 0x4(%rax), %r15
leaq -0x1(%r15), %r14
movq $0x0, 0x38a8(%rbx)
testl %r14d, %r14d
je 0x5989
movl $0x38, %ecx
movq %r14, %rax
mulq %rcx
movq $-0x1, %rdi
cmovnoq %rax, %rdi
callq 0x3030
movq %rax, 0x38a8(%rbx)
cmpl $0x2, %r15d
jl 0x5989
movl %r14d, %ecx
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
movq $0x0, 0x8(%rax,%rdx)
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x5977
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x59a7
movq %rax, %r14
movq %r13, %rdi
callq 0x3230
jmp 0x59aa
movq %rax, %r14
leaq 0x153c7(%rip), %rax     # 0x1ad78
movq %rax, (%rbx)
movq 0x3870(%rbx), %rdi
testq %rdi, %rdi
je 0x59c5
callq 0x3230
movq %r14, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x152f6(%rip), %rax     # 0x1acd8
movq %rax, (%rdi)
movq 0x3870(%rdi), %r14
movq 0x3878(%rdi), %r15
cmpq %r15, %r14
je 0x5a12
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5a05
callq 0x3230
movq $0x0, (%r14)
addq $0x8, %r14
jmp 0x59f3
movq 0x38a8(%rbx), %rdi
testq %rdi, %rdi
je 0x5a23
callq 0x3230
leaq 0x1534e(%rip), %rax     # 0x1ad78
movq %rax, (%rbx)
movq 0x3870(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x5a48
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3230
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x158fd(%rip), %rax     # 0x1b358
movq (%rax), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rax
cmpq $0x1, %rax
je 0x5af6
movl %eax, %ecx
movq 0x38a8(%rdi), %r8
addq $-0x2, %rax
imulq $0x38, %rax, %r9
movq 0x30(%r8,%r9), %r10
movq %r10, 0x30(%rdx)
movups (%r8,%r9), %xmm0
movups 0x10(%r8,%r9), %xmm1
movups 0x20(%r8,%r9), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
cmpl $0x3, %ecx
jl 0x5aef
movl %eax, %eax
imulq $0x38, %rax, %rcx
incq %rax
movq 0x38a8(%rdi), %rdx
movq -0x8(%rdx,%rcx), %r8
movq %r8, 0x30(%rdx,%rcx)
movups -0x38(%rdx,%rcx), %xmm0
movups -0x28(%rdx,%rcx), %xmm1
movups -0x18(%rdx,%rcx), %xmm2
movups %xmm2, 0x20(%rdx,%rcx)
movups %xmm1, 0x10(%rdx,%rcx)
movups %xmm0, (%rdx,%rcx)
decq %rax
addq $-0x38, %rcx
cmpq $0x1, %rax
jg 0x5ab4
movq 0x38a8(%rdi), %rdx
movq 0x30(%rsi), %rax
movq %rax, 0x30(%rdx)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups 0x20(%rsi), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x3870(%rdi)
movq $0x0, 0x3880(%rdi)
movb $0x0, 0x38a4(%rdi)
movups %xmm0, 0x3808(%rdi)
movups %xmm0, 0x3818(%rdi)
movups %xmm0, 0x3828(%rdi)
leaq 0x14cf9(%rip), %rax     # 0x1acf0
movq %rax, (%rdi)
leaq 0x15357(%rip), %r12     # 0x1b358
movq (%r12), %rax
movq 0x20(%rax), %rax
cmpl $0x0, (%rax)
jle 0x6087
movq %rdi, %rbx
leaq 0x3870(%rdi), %rax
movq %rax, -0x38(%rbp)
leaq 0x8(%rdi), %r15
xorl %r14d, %r14d
movl $0x50, %edi
callq 0x3250
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x139a0
movq %r13, -0x30(%rbp)
movq %r13, %rdi
callq 0x14add
movq 0x3878(%rbx), %rsi
cmpq 0x3880(%rbx), %rsi
je 0x606a
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x3878(%rbx)
jmp 0x6077
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x73d6
incl %r14d
movq (%r12), %rax
movq 0x20(%rax), %rax
cmpl (%rax), %r14d
jl 0x6023
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r13, %rdi
callq 0x3230
jmp 0x60a6
movq %rax, %r14
leaq 0x14ccb(%rip), %rax     # 0x1ad78
movq %rax, (%rbx)
movq 0x3870(%rbx), %rdi
testq %rdi, %rdi
je 0x60c1
callq 0x3230
movq %r14, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0xffffffff, (%rdi)     # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rdi)
xorl %eax, %eax
movl $0xffffffff, 0x10(%rdi,%rax) # imm = 0xFFFFFFFF
movq $0x0, 0x18(%rdi,%rax)
addq $0x10, %rax
cmpq $0x30, %rax
jne 0x6950
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movl $0x0, 0x48(%rdi)
leaq 0x10(%rdi), %r12
leaq 0x20(%rdi), %r13
leaq 0x15275(%rip), %r15     # 0x1bca0
movq %r14, %rdi
callq 0x9fdf
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
movups (%rbx), %xmm0
movups %xmm0, (%r12)
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rbx)
cmpq $0x0, 0x18(%rbx)
je 0x6a74
movq %r15, %rdi
callq 0x9674
movq 0x18(%rbx), %rcx
movl %eax, 0x54(%rcx)
cmpq $0x0, 0x28(%rbx)
je 0x6a8e
movq %r15, %rdi
callq 0x9674
movq 0x28(%rbx), %rcx
movl %eax, 0x5c(%rcx)
movb $0x1, 0x1(%rcx)
cmpq $0x0, 0x38(%rbx)
je 0x6aa7
movq %r15, %rdi
callq 0x9674
movq 0x38(%rbx), %rcx
movl %eax, 0x60(%rcx)
movb $0x1, (%rcx)
movq %r14, %rdi
callq 0xa03d
jmp 0x6a2b
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x20, %rsp
testl %esi, %esi
js 0x7f54
cmpl %esi, 0x10(%rdi)
jle 0x7f54
movl %esi, %eax
leaq (%rax,%rax,4), %rax
shlq $0x5, %rax
addq 0x8(%rdi), %rax
jmp 0x7f8e
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xd2c6(%rip), %rsi      # 0x15229
leaq 0xd2d6(%rip), %rdx      # 0x15240
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x7202
movq %rbx, %rdi
callq 0x9777
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x7f8c
callq 0x3230
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x7fa8
callq 0x3230
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movslq 0x4(%rdi), %rbx
leal 0x1(%rbx), %eax
cltd
idivl 0x10(%rdi)
cmpl (%rdi), %edx
je 0x804c
movl %edx, 0x4(%rdi)
movq 0x8(%rdi), %r15
leaq (%rbx,%rbx,4), %r12
shlq $0x5, %r12
leaq (%r15,%r12), %rdi
addq $0x8, %rdi
movl %ecx, 0x44(%rdi)
callq 0x3160
addq %r12, %r15
addq $0x28, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3160
movw $0x0, -0x28(%r15)
leaq 0x13c72(%rip), %rdi     # 0x1bca0
callq 0x9674
movl %eax, 0x28(%r15)
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x2c(%r15)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x4, %edi
callq 0x3140
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x12f2d(%rip), %rsi     # 0x1af90
movq %rax, %rdi
xorl %edx, %edx
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x12845(%rip), %r14     # 0x1b368
movq (%r14), %rbx
testq %rbx, %rbx
je 0x8b3b
movq %rbx, %rdi
callq 0x7e9c
movq %rbx, %rdi
callq 0x3230
movl $0x28, %edi
callq 0x3250
movq %rax, %rbx
leaq 0x12809(%rip), %rax     # 0x1b358
movq (%rax), %rax
movq (%rax), %rax
movl (%rax), %esi
movq %rbx, %rdi
callq 0x7de8
movq %rbx, (%r14)
leaq -0x61(%rip), %rbx       # 0x8b08
movq (%r14), %rcx
leaq 0x18(%rcx), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3460
testl %eax, %eax
jne 0x8b69
movq (%r14), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
leaq 0x13180(%rip), %rcx     # 0x1bd10
movq 0x8(%rcx), %rsi
cmpq 0x10(%rcx), %rsi
je 0x8ba4
movq %rax, (%rsi)
addq $0x8, 0x8(%rcx)
jmp 0x8bb4
leaq 0x13165(%rip), %rdi     # 0x1bd10
leaq -0x18(%rbp), %rdx
callq 0x729c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3230
movq %r14, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x12652(%rip), %rax     # 0x1bd10
movq (%rax), %r13
movq 0x8(%rax), %r14
cmpq %r14, %r13
sete %sil
je 0x973e
movl $0x1, %r12d
leaq -0x40(%rbp), %rbx
movq (%r13), %r15
testq %r15, %r15
je 0x96e7
imull (%r15), %r12d
jmp 0x9721
movb %sil, -0x29(%rbp)
movq %rbx, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0xbba1(%rip), %rsi      # 0x1529b
leaq 0xbbbf(%rip), %rdx      # 0x152c0
callq 0x7202
leaq -0x50(%rbp), %rdi
callq 0x9777
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x971d
callq 0x3230
movb -0x29(%rbp), %sil
testq %r15, %r15
je 0x9733
addq $0x8, %r13
cmpq %r14, %r13
sete %sil
jne 0x96d8
xorl %ecx, %ecx
cmpl $0x1, %r12d
sete %cl
jmp 0x9743
movl $0x1, %ecx
testb $0x1, %sil
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x976f
callq 0x3230
movq %r14, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x124b1(%rip), %rax     # 0x1bd10
movq (%rax), %r13
movq 0x8(%rax), %r14
cmpq %r14, %r13
sete %sil
je 0x98da
xorl %r12d, %r12d
leaq -0x40(%rbp), %rbx
movq (%r13), %r15
testq %r15, %r15
je 0x9884
addl (%r15), %r12d
jmp 0x98be
movb %sil, -0x29(%rbp)
movq %rbx, -0x50(%rbp)
leaq -0x50(%rbp), %rdi
leaq 0xba04(%rip), %rsi      # 0x1529b
leaq 0xba22(%rip), %rdx      # 0x152c0
callq 0x7202
leaq -0x50(%rbp), %rdi
callq 0x9777
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x98ba
callq 0x3230
movb -0x29(%rbp), %sil
testq %r15, %r15
je 0x98d0
addq $0x8, %r13
cmpq %r14, %r13
sete %sil
jne 0x9876
xorl %ecx, %ecx
testl %r12d, %r12d
sete %cl
jmp 0x98df
movl $0x1, %ecx
testb $0x1, %sil
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovnel %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %rbx, %rdi
je 0x990b
callq 0x3230
movq %r14, %rdi
callq 0x3440
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
leaq 0x14ece(%rip), %rax     # 0x1edd8
cmpl %esi, (%rax)
jge 0x9f0f
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x1136c(%rip), %rbx     # 0x1b290
movq %rbx, %rdi
callq 0x3380
movq 0x1109d(%rip), %r15     # 0x1afd0
leaq 0xb3f4(%rip), %rsi      # 0x1532e
movl $0x9, %edx
movq %r15, %rdi
callq 0x32a0
leaq 0x11d52(%rip), %r12     # 0x1bca0
movl 0x4(%r12), %esi
movq %r15, %rdi
callq 0x3430
movq %rax, %r15
leaq 0xb3d3(%rip), %rsi      # 0x15338
movl $0x6, %edx
movq %rax, %rdi
callq 0x32a0
movzbl (%r12), %esi
movq %r15, %rdi
callq 0x3400
movq %rax, %r15
leaq 0xb3b6(%rip), %rsi      # 0x1533f
movl $0x2, %edx
movq %rax, %rdi
callq 0x32a0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x32a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3240
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x31a0
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x112c5(%rip), %rdi     # 0x1b2b8
callq 0x3380
movl $0x1, (%rbx)
leaq 0x11c9b(%rip), %r15     # 0x1bca0
cmpb $0x0, (%r15)
jne 0xa027
leaq 0x10(%r15), %rbx
leaq 0x112a2(%rip), %r14     # 0x1b2b8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3390
cmpb $0x1, (%r15)
jne 0xa016
leaq 0x1128a(%rip), %rdi     # 0x1b2b8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x11267(%rip), %rdi     # 0x1b2b8
callq 0x3380
movl $0x0, (%rbx)
leaq 0x11c3d(%rip), %r15     # 0x1bca0
cmpb $0x1, (%r15)
jne 0xa085
leaq 0x40(%r15), %rbx
leaq 0x11244(%rip), %r14     # 0x1b2b8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3390
cmpb $0x0, (%r15)
jne 0xa074
leaq 0x1122c(%rip), %rdi     # 0x1b2b8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0xa123
movq (%rbx), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x3480
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0xa10d
leaq 0xb24a(%rip), %rsi      # 0x15374
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa215
leaq 0xb237(%rip), %rsi      # 0x15378
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa219
leaq 0xb226(%rip), %rsi      # 0x1537e
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa220
leaq 0xb214(%rip), %rsi      # 0x15383
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa227
leaq 0xb201(%rip), %rsi      # 0x15387
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa22e
leaq 0xb1f0(%rip), %rsi      # 0x1538d
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa235
leaq 0xb1e0(%rip), %rsi      # 0x15394
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa23c
leaq 0xb1d1(%rip), %rsi      # 0x15398
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa243
leaq 0xb1c2(%rip), %rsi      # 0x1539c
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa24a
leaq 0xb1b2(%rip), %rsi      # 0x1539f
movq %rbx, %rdi
callq 0x30c0
testl %eax, %eax
je 0xa251
leaq 0xb1a2(%rip), %rsi      # 0x153a2
movq %rbx, %rdi
callq 0x30c0
cmpl $0x1, %eax
movl $0xb, %eax
sbbl $0x0, %eax
jmp 0xa256
xorl %eax, %eax
jmp 0xa256
movl $0x1, %eax
jmp 0xa256
movl $0x4, %eax
jmp 0xa256
movl $0x2, %eax
jmp 0xa256
movl $0x3, %eax
jmp 0xa256
movl $0x5, %eax
jmp 0xa256
movl $0x9, %eax
jmp 0xa256
movl $0x8, %eax
jmp 0xa256
movl $0x6, %eax
jmp 0xa256
movl $0x7, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xc376
callq 0x3230
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xc384
callq 0x3230
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xc392
callq 0x3230
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xc3a0
callq 0x3230
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0xc3b4
popq %rbx
popq %rbp
jmp 0x3230
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movslq (%rdi), %r14
movq 0x8(%rdi), %r15
cmpq %r14, %r15
jbe 0xcc67
leal 0x1(%r14), %eax
movl %eax, (%rdi)
jmp 0xcca0
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x88df(%rip), %rsi      # 0x15556
leaq 0x8908(%rip), %rdx      # 0x15586
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x7202
movq %rbx, %rdi
callq 0x9777
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xcca0
callq 0x3230
cmpq %r14, %r15
seta %al
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xccc4
callq 0x3230
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/instruction.cpp
// Function: instr_queue::ptr_branch(int)
bool instr_queue::ptr_branch(int offset)
{
    int dest = offset + head + 1;
    if (dest >= size || dest < 0)
    {
        err_log("Instr queue acccess out of range while branching");
        return false;
    }
    head = dest;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movslq (%rdi), %rcx
movslq %esi, %rdx
leaq (%rcx,%rdx), %rax
incq %rax
cmpq %rax, 0x8(%rdi)
seta %sil
addq %rdx, %rcx
cmpl $-0x1, %ecx
setge %bl
andb %sil, %bl
je 0xcd00
movl %eax, (%rdi)
jmp 0xcd38
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x8878(%rip), %rsi      # 0x15587
leaq 0x88a1(%rip), %rdx      # 0x155b7
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x7202
movq %r14, %rdi
callq 0x9777
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xcd38
callq 0x3230
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0xcd56
callq 0x3230
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/issue.cpp
// Function: get_reg_or_rob(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int&, memCell&)
void get_reg_or_rob(string regName, int &Q, memCell &V)
{
    auto found = RAT.find(regName);
    if (found != RAT.end())
    {
        int tmp = found->second;
        ROBEntry *R = CPU_ROB->get_entry(tmp);
        if (R->wrtnBack)
            V = R->value;
        else
            Q = tmp;
    }
    else
        reg->get(regName, V);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xeeb9(%rip), %rdi      # 0x1bc60
movq %r15, %rsi
callq 0x8d0a
testq %rax, %rax
je 0xcdd7
movl 0x28(%rax), %r15d
leaq 0xe5a9(%rip), %rax      # 0x1b368
movq (%rax), %rdi
movl %r15d, %esi
callq 0x7f30
cmpb $0x1, 0x1(%rax)
jne 0xce1e
movl 0x48(%rax), %eax
movl %eax, (%rbx)
jmp 0xce21
leaq 0xeeba(%rip), %rax      # 0x1bc98
movq (%rax), %r14
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x7168
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x13584
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xce21
callq 0x3230
jmp 0xce21
movl %r15d, (%r14)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0xce3f
callq 0x3230
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/issue.cpp
// Function: check_squash()
bool check_squash()
{
    msg_log("Checking squash status", 4);
    if (brcUnit.squash_ROB_i() > -1)
    {
        pthread_mutex_lock(&squash_mutex);
        instr_Q->squash = true;
        pthread_cond_broadcast(&squash_cond);
        pthread_mutex_unlock(&squash_mutex);
        at_rising_edge(next_vdd);
        at_falling_edge(next_vdd);
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x8784(%rip), %rsi      # 0x155e5
leaq 0x8793(%rip), %rdx      # 0x155fb
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x7202
movq %rbx, %rdi
movl $0x4, %esi
callq 0x9f03
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0xce8f
callq 0x3230
leaq 0xe4fa(%rip), %rdi      # 0x1b390
callq 0x8f88
movl %eax, %ebx
testl %eax, %eax
js 0xcee9
leaq 0xe478(%rip), %r14      # 0x1b320
movq %r14, %rdi
callq 0x3380
leaq 0xe4a9(%rip), %rax      # 0x1b360
movq (%rax), %rax
movb $0x1, 0x4(%rax)
leaq 0xe42b(%rip), %rdi      # 0x1b2f0
callq 0x30f0
movq %r14, %rdi
callq 0x31e0
leaq 0xe46f(%rip), %r14      # 0x1b348
movq %r14, %rdi
callq 0x9fdf
movq %r14, %rdi
callq 0xa03d
testl %ebx, %ebx
setns %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0xcf08
callq 0x3230
movq %rbx, %rdi
callq 0x3440
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/memory.cpp
// Function: memory::memory(int)
memory::memory(int sz)
{
    buf = new memCell[sz];
    for (int i = 0; i < sz; i++)
        buf[i].f = 0.;
    size = sz;
    Lfront = Lrear = 0;
    Sfront = Srear = 0;
    LDQ_lock = SDQ_lock = PTHREAD_MUTEX_INITIALIZER;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movb $0x0, 0x28(%rdi)
movslq %esi, %r15
leaq (,%r15,4), %rax
testl %r15d, %r15d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, (%rbx)
testl %r15d, %r15d
jle 0xe855
movl %r14d, %eax
xorl %ecx, %ecx
movq (%rbx), %rdx
movl $0x0, (%rdx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0xe843
movl %r14d, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/memory.cpp
// Function: is_prev_index(int, int, int, int)
bool is_prev_index(int i, int j, int front, int rear)
{
    if (i == j) return false;
    if (rear < front)
    {
        rear += CPU_ROB->size;
        i += i<front?CPU_ROB->size:0;
        j += j<front?CPU_ROB->size:0;
    }
    return j - i > 0;
}

// Assembly:
cmpl %esi, %edi
jne 0xf730
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
cmpl %edx, %ecx
jge 0xf765
xorl %eax, %eax
movl $0x0, %ecx
cmpl %edx, %edi
jge 0xf750
leaq 0xbc1e(%rip), %rcx      # 0x1b368
movq (%rcx), %rcx
movl 0x10(%rcx), %ecx
cmpl %edx, %esi
jge 0xf761
leaq 0xbc0d(%rip), %rax      # 0x1b368
movq (%rax), %rax
movl 0x10(%rax), %eax
addl %ecx, %edi
addl %eax, %esi
cmpl %edi, %esi
setg %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/memory.cpp
// Function: memory::LD_enQ(int, int)
LSQEntry* memory::LD_enQ(int rbi, int addr)
{
    pthread_mutex_lock(&LDQ_lock);
    if ((Lrear+1)%Q_LEN == Lfront)
    {
        pthread_mutex_unlock(&LDQ_lock);
        throw -2;
    }
    int index = Lrear;
    Lrear = (++Lrear)%Q_LEN;
    Load_Q[index].rob_i = rbi;
    Load_Q[index].addr = addr;
    Load_Q[index].code = LD;
    Load_Q[index].ready = false;
    pthread_mutex_unlock(&LDQ_lock);
    return Load_Q + index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
leaq 0x30(%rdi), %rbx
movq %rbx, %rdi
callq 0x3380
movslq 0x10(%r12), %rax
leal 0x1(%rax), %ecx
leal 0x100(%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
andl $0xffffff00, %edx       # imm = 0xFFFFFF00
negl %edx
leal (%rax,%rdx), %ecx
incl %ecx
cmpl 0xc(%r12), %ecx
je 0xf7f3
movl %ecx, 0x10(%r12)
leaq (%rax,%rax,2), %rax
leaq (%r12,%rax,8), %r12
addq $0x88, %r12
movl %r15d, (%r12)
movl %r14d, 0x10(%r12)
movl $0x6, 0x8(%r12)
movb $0x0, 0x14(%r12)
movq %rbx, %rdi
callq 0x31e0
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x31e0
movl $0x4, %edi
callq 0x3140
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movq 0xb77e(%rip), %rsi      # 0x1af90
movq %rax, %rdi
xorl %edx, %edx
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O1/Ziang95[P]Tomasulo_simulator/memory.cpp
// Function: memory::SD_enQ(int, int, int, memCell)
LSQEntry* memory::SD_enQ(int rbi, int Qj, int addr, memCell val)
{
    pthread_mutex_lock(&SDQ_lock);
    if ((Srear+1)%Q_LEN == Sfront)
    {
        pthread_mutex_unlock(&SDQ_lock);
        throw -1;
    }
    int index = Srear;
    Srear = (++Srear)%Q_LEN;
    Stor_Q[index].rob_i = rbi;
    Stor_Q[index].addr = addr;
    Stor_Q[index].SD_source = Qj;
    Stor_Q[index].code = LD;
    Stor_Q[index].val = val;
    Stor_Q[index].ready = false;
    pthread_mutex_unlock(&SDQ_lock);
    return Stor_Q + index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, -0x2c(%rbp)
movl %ecx, %r12d
movl %edx, %r15d
movl %esi, %r13d
movq %rdi, %r14
leaq 0x58(%rdi), %rbx
movq %rbx, %rdi
callq 0x3380
movslq 0x18(%r14), %rax
leal 0x1(%rax), %ecx
leal 0x100(%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
andl $0xffffff00, %edx       # imm = 0xFFFFFF00
negl %edx
leal (%rax,%rdx), %ecx
incl %ecx
cmpl 0x14(%r14), %ecx
je 0xf8b7
movl %ecx, 0x18(%r14)
leaq (%rax,%rax,2), %rax
leaq (%r14,%rax,8), %r14
addq $0x1888, %r14           # imm = 0x1888
movl %r13d, (%r14)
movl %r12d, 0x10(%r14)
movl %r15d, 0x4(%r14)
movl $0x6, 0x8(%r14)
movl -0x2c(%rbp), %eax
movl %eax, 0xc(%r14)
movb $0x0, 0x14(%r14)
movq %rbx, %rdi
callq 0x31e0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x31e0
movl $0x4, %edi
callq 0x3140
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0xb6ba(%rip), %rsi      # 0x1af90
movq %rax, %rdi
xorl %edx, %edx
callq 0x3420