// File: /workspace/github_cpp_makefile_star2_O2/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 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x258c(%rip), %rsi      # 0x82fc
leaq 0x38(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x30c0
movq %rsp, %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
leaq 0x38(%rbx), %rax
movq %rax, 0x30(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x78(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0x58(%rbx), %rax
movq %rax, 0x20(%rsp)
movb $0x1, %bpl
xorl %r15d, %r15d
leaq 0x78(%rsp), %r12
movq 0x30(%rsp), %rdi
callq 0x3160
movq 0x18(%rsp), %rdi
callq 0x449c
xorl %r14d, %r14d
movl 0xe0(%rbx), %r13d
cmpl %r13d, %r14d
jge 0x5ed6
movq 0x71f6(%rip), %rdi      # 0xcfe0
leaq 0x58(%rsp), %rsi
callq 0x3040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5eef
movq %r12, %rdi
leaq 0x58(%rsp), %rsi
callq 0x6172
testb $0x1, %bpl
jne 0x5e6d
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x64bc
testb %al, %al
je 0x5e6d
movq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x6ba0
movq 0x8(%rsp), %rax
subq (%rsp), %rax
cqto
pushq $0x60
popq %rcx
idivq %rcx
movq %rax, %r13
movq %rsp, %rdi
callq 0x616a
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x3140
addl %r13d, %r14d
movq %rsp, %rdi
movq %r12, %rsi
callq 0x64c6
testb $0x1, %bpl
je 0x5e90
leaq 0x38(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x3140
incl %r15d
movl %r15d, %eax
cltd
idivl 0xe4(%rbx)
testl %edx, %edx
jne 0x5ec7
movq 0x7110(%rip), %rdi      # 0xcfb8
movl %r15d, %esi
callq 0x33e0
movq %rax, %rdi
leaq 0x23fe(%rip), %rsi      # 0x82b8
callq 0x3260
movq %rax, %rdi
callq 0x3110
movq %r12, %rdi
callq 0x539e
xorl %ebp, %ebp
jmp 0x5dd3
movq 0x18(%rsp), %rdi
callq 0x31b0
movq 0x20(%rsp), %rdi
callq 0x33b0
jmp 0x5dbc
movq (%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x5f0f
movq 0x28(%rsp), %rdi
movq %rsp, %rsi
callq 0x6ba0
movq %rsp, %rdi
callq 0x616a
movq 0x18(%rsp), %rdi
callq 0x31b0
movq 0x20(%rsp), %rdi
callq 0x33b0
cmpl %r13d, %r14d
jge 0x5dbc
movq %rsp, %rdi
callq 0x5348
leaq 0x38(%rsp), %rdi
callq 0x3458
leaq 0x58(%rsp), %rdi
callq 0x3458
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x5f87
jmp 0x5f63
jmp 0x5f63
movq %rax, %rbx
jmp 0x5f75
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x539e
movq %rsp, %rdi
callq 0x5348
leaq 0x38(%rsp), %rdi
callq 0x3458
leaq 0x58(%rsp), %rdi
callq 0x3458
movq %rbx, %rdi
callq 0x33f0
nop