// File: /workspace/github_cpp_makefile_star2_O1/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 $0xe8, %rsp
movq %rdi, %rbx
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2f36(%rip), %rdx      # 0x92fc
leaq 0x38(%rsp), %rdi
movq %rdx, %rsi
callq 0x59dc
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x38(%rbx), %rax
movq %rax, 0x80(%rsp)
leaq 0x10(%rbx), %rax
movq %rax, 0x28(%rsp)
leaq 0x78(%rbx), %rax
movq %rax, 0x30(%rsp)
leaq 0x58(%rbx), %rax
movq %rax, 0x78(%rsp)
movb $0x1, %r15b
xorl %r12d, %r12d
movq 0x6bc8(%rip), %r14      # 0xcfe0
xorl %ebp, %ebp
movq 0x80(%rsp), %rdi
callq 0x3170
movq 0x28(%rsp), %rdi
callq 0x3370
testl %eax, %eax
jne 0x6659
cmpl $0x0, 0xe0(%rbx)
jle 0x65f9
movl %ebp, 0x24(%rsp)
xorl %r13d, %r13d
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3270
movsbl %al, %edx
movq %r14, %rdi
leaq 0x58(%rsp), %rsi
callq 0x3470
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x65d2
leaq 0x88(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x68f4
testb $0x1, %r15b
jne 0x6508
movq 0x40(%rsp), %rdx
cmpq 0x98(%rsp), %rdx
jne 0x64c5
testq %rdx, %rdx
je 0x6508
movq 0x90(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x32a0
testl %eax, %eax
je 0x6508
movq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x73f4
movq (%rsp), %r14
movq 0x8(%rsp), %rbp
movq %rsp, %rdi
movq %r14, %rsi
callq 0x79f2
leaq 0x38(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x3150
subq %r14, %rbp
shrq $0x5, %rbp
imull $0xaaaaaaab, %ebp, %eax # imm = 0xAAAAAAAB
addl %eax, %r13d
movq %rsp, %rdi
leaq 0x88(%rsp), %rsi
callq 0x6d5c
testb $0x1, %r15b
je 0x6533
leaq 0x38(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x3150
xorl %r15d, %r15d
incl %r12d
movl %r12d, %eax
cltd
idivl 0xe4(%rbx)
testl %edx, %edx
jne 0x6591
movq 0x6a75(%rip), %rdi      # 0xcfc0
movl %r12d, %esi
callq 0x3430
movq %rax, %r14
movl $0x14, %edx
movq %rax, %rdi
leaq 0x2d53(%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 0xb0(%rsp), %rdi
callq 0x5946
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x65b8
callq 0x3260
cmpl 0xe0(%rbx), %r13d
movq 0x6a1a(%rip), %r14      # 0xcfe0
jl 0x644d
movl 0x24(%rsp), %ebp
jmp 0x65f9
movq (%rsp), %rax
movb $0x1, %bpl
cmpq 0x8(%rsp), %rax
je 0x65f9
movq 0x30(%rsp), %rdi
movq %rsp, %rsi
callq 0x73f4
movq (%rsp), %rsi
movq %rsp, %rdi
callq 0x79f2
movq 0x28(%rsp), %rdi
callq 0x31d0
movq 0x78(%rsp), %rdi
callq 0x33f0
testb $0x1, %bpl
je 0x641a
movq %rsp, %rdi
callq 0x58e2
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x6633
callq 0x3260
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x6647
callq 0x3260
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x3190
movq %rax, %rbx
jmp 0x669c
jmp 0x666b
jmp 0x666b
jmp 0x666b
movq %rax, %rbx
jmp 0x6680
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x6d86
movq %rsp, %rdi
callq 0x58e2
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x669c
callq 0x3260
leaq 0x68(%rsp), %rax
movq 0x58(%rsp), %rdi
cmpq %rax, %rdi
je 0x66b0
callq 0x3260
movq %rbx, %rdi
callq 0x3440