// File: /workspace/github_cpp_makefile_star2_O3/CastellanZhang[P]lambdaFM/src/Frame/pc_frame.cpp
// Function: pc_frame::proThread()
void pc_frame::proThread()
{
    string line;
    int line_num = 0;
    int i = 0;
    bool finished_flag = false;
    bool first_line = true;
    string last_qid = "";
    vector<fm_sample> sampleGrp;
    while(true)
    {
        sem_wait(&semPro);
        bufMtx.lock();
        for(i = 0; i < bufSize;)
        {
            if(!getline(cin, line))
            {
                if(!sampleGrp.empty())
                {
                    buffer.push(sampleGrp);
                    sampleGrp.clear();
                }
                finished_flag = true;
                break;
            }
            line_num++;
            fm_sample sample(line);
            if(!first_line && last_qid != sample.qid)
            {
                buffer.push(sampleGrp);
                i += sampleGrp.size();
                sampleGrp.clear();
                last_qid = sample.qid;
            }
            sampleGrp.push_back(sample);
            if(first_line)
            {
                first_line = false;
                last_qid = sample.qid;
            }
            if(line_num%logNum == 0)
            {
                cout << line_num << " lines have finished" << endl;
            }
        }
        bufMtx.unlock();
        sem_post(&semCon);
        if(finished_flag)
        {
            break;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2f0a(%rip), %rdx      # 0x92fc
leaq 0x28(%rsp), %rdi
movq %rdx, %rsi
callq 0x5a10
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x38(%rbx), %rax
movq %rax, 0x70(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x78(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x58(%rbx), %rax
movq %rax, 0x68(%rsp)
movb $0x1, %r13b
xorl %r12d, %r12d
movq 0x6b9f(%rip), %rbp      # 0xcfe0
movq 0x70(%rsp), %rdi
callq 0x3170
movq 0x18(%rsp), %rdi
callq 0x3370
testl %eax, %eax
jne 0x667a
xorl %r15d, %r15d
cmpl $0x0, 0xe0(%rbx)
jle 0x65ef
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %edx
movq %rbp, %rdi
leaq 0x48(%rsp), %rsi
callq 0x3470
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x65f4
leaq 0x78(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x68f4
testb $0x1, %r13b
jne 0x6526
movq 0x30(%rsp), %rdx
cmpq 0x88(%rsp), %rdx
jne 0x64e3
testq %rdx, %rdx
je 0x6526
movq 0x80(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x32a0
testl %eax, %eax
je 0x6526
movq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x73ec
movq (%rsp), %r14
movq 0x8(%rsp), %rbp
movq %rsp, %rdi
movq %r14, %rsi
callq 0x79e4
leaq 0x28(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x3150
subq %r14, %rbp
shrq $0x5, %rbp
imull $0xaaaaaaab, %ebp, %eax # imm = 0xAAAAAAAB
addl %eax, %r15d
movq %rsp, %rdi
leaq 0x78(%rsp), %rsi
callq 0x6d54
testb $0x1, %r13b
je 0x654b
leaq 0x28(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x3150
incl %r12d
movl %r12d, %eax
cltd
idivl 0xe4(%rbx)
testl %edx, %edx
jne 0x65a9
movq 0x6a5d(%rip), %rdi      # 0xcfc0
movl %r12d, %esi
callq 0x3430
movq %rax, %r14
movl $0x14, %edx
movq %rax, %rdi
leaq 0x2d3b(%rip), %rsi      # 0x92b8
callq 0x32e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31a0
leaq 0xa0(%rsp), %rdi
callq 0x597a
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x65d0
callq 0x3260
xorl %r13d, %r13d
movl $0x0, %r14d
cmpl 0xe0(%rbx), %r15d
movq 0x69f9(%rip), %rbp      # 0xcfe0
jl 0x646d
jmp 0x661b
xorl %r14d, %r14d
jmp 0x661b
movq (%rsp), %rax
movb $0x1, %r14b
cmpq 0x8(%rsp), %rax
je 0x661b
movq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x73ec
movq (%rsp), %rsi
movq %rsp, %rdi
callq 0x79e4
movq 0x18(%rsp), %rdi
callq 0x31d0
movq 0x68(%rsp), %rdi
callq 0x33f0
testb %r14b, %r14b
je 0x6441
movq %rsp, %rdi
callq 0x5916
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6654
callq 0x3260
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6668
callq 0x3260
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3190
movq %rax, %rbx
jmp 0x66ba
jmp 0x668c
jmp 0x668c
jmp 0x668c
movq %rax, %rbx
jmp 0x669e
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x6d7e
movq %rsp, %rdi
callq 0x5916
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x66ba
callq 0x3260
leaq 0x58(%rsp), %rax
movq 0x48(%rsp), %rdi
cmpq %rax, %rdi
je 0x66ce
callq 0x3260
movq %rbx, %rdi
callq 0x3440