// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libParallel/parallel_channel.cpp
// Function: CChannel_import::send(void*, bool)
bool send(TChanData data,bool isWait){
        assert(data!=0);
        {
            CAutoLocker locker(_locker);
            while (true) {
                if (_isClosed) return false;
                if ((_maxDataCount<=0)||(_dataList.size()<(size_t)_maxDataCount)) {
                    try{
                        _dataList.push_back(data);
                    }catch(...){
                        return false;
                    }
                    condvar_signal(_acceptCond);
                    if (_maxDataCount==0) //must wait accepted?
                        break;// to wait accepted
                    else
                        return true; //ok
                }else if(!isWait){
                    return false;
                }//else wait
                ++_waitingCount;
                condvar_wait(_sendCond,&locker);
                --_waitingCount;
            }
        }

        //wait accepted
        while (true) { //wait _dataList empty
            {
                CAutoLocker locker(_locker);
                if (_isClosed) break;
                if (_dataList.empty()) break;
            }
            this_thread_yield(); //todo:优化;
        }
        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x20(%rsp)
testq %rsi, %rsi
je 0x48eea
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq $0x0, (%rsp)
movb $0x0, 0x8(%rsp)
testq %rax, %rax
je 0x48d92
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x2095c
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq (%rsp), %rcx
movq %rcx, (%rdi)
movq %rax, (%rsp)
movb 0x8(%rsp), %al
movb %al, 0x8(%rdi)
movb $0x1, 0x8(%rsp)
callq 0x20946
cmpb $0x0, 0x78(%rbx)
je 0x48daf
xorl %ebp, %ebp
movq %rsp, %rdi
callq 0x20946
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r15
movq 0x48(%rbx), %rax
movq 0x68(%rbx), %rcx
testq %rcx, %rcx
jle 0x48e21
movq 0x60(%rbx), %rdx
movq %rdx, %rsi
subq 0x40(%rbx), %rsi
shrq $0x3, %rsi
cmpq $0x1, %rdx
adcq $-0x1, %rsi
movq 0x38(%rbx), %rdx
movq %rax, %rdi
subq 0x50(%rbx), %rdi
shlq $0x6, %rsi
sarq $0x3, %rdi
subq 0x28(%rbx), %rdx
sarq $0x3, %rdx
addq %rdi, %rdx
addq %rsi, %rdx
cmpq %rcx, %rdx
jb 0x48e21
testb %bpl, %bpl
je 0x48d98
incq 0x70(%rbx)
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x48813
decq 0x70(%rbx)
movb 0x78(%rbx), %al
cmpb $0x1, %al
jne 0x48db2
jmp 0x48d98
movq 0x58(%rbx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x48e38
movq %r14, (%rax)
addq $0x8, 0x48(%rbx)
jmp 0x48e46
leaq 0x18(%rbx), %rdi
leaq 0x20(%rsp), %rsi
callq 0x491e6
movq 0x10(%rbx), %rdi
callq 0x48818
movb $0x1, %bpl
cmpq $0x0, 0x68(%rbx)
jne 0x48d9a
movq %rsp, %r14
movq %r14, %rdi
callq 0x20946
leaq 0x10(%rsp), %r15
movq (%rbx), %rax
movq $0x0, (%rsp)
movb $0x0, 0x8(%rsp)
testq %rax, %rax
je 0x48ebb
movq %rax, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %r15, %rdi
callq 0x2095c
movq 0x10(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq %rax, (%rsp)
movb 0x8(%rsp), %al
movb %al, 0x18(%rsp)
movb $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x20946
cmpb $0x0, 0x78(%rbx)
jne 0x48eda
movq 0x48(%rbx), %rax
cmpq 0x28(%rbx), %rax
je 0x48eda
movq %r14, %rdi
callq 0x20946
callq 0x48822
jmp 0x48e6d
movq %rsp, %rdi
callq 0x20946
movb $0x1, %bpl
jmp 0x48da2
leaq 0x1973b(%rip), %rdi     # 0x6262c
leaq 0x196e2(%rip), %rsi     # 0x625da
leaq 0x19735(%rip), %rcx     # 0x62634
movl $0x55, %edx
callq 0x4200
movq %rax, %rdi
callq 0x4120
callq 0x4520
jmp 0x48d98
jmp 0x48f21
jmp 0x48f21
jmp 0x48f21
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x45e0