// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: http_supervise_thread(void*)
void *http_supervise_thread(void * arg)
{
    httpServer_t *httpServer=(httpServer_t *)arg;
    pthread_mutex_lock(&httpServer->lock);
    while(!httpServer->shutdown)
    {
        pthread_mutex_unlock(&httpServer->lock);
        usleep(1000*HTTPSERVER_SUPERVISE_TIME);
        pthread_mutex_lock(&httpServer->lock);
        pthread_mutex_lock(&httpServer->clientMap_lock);
        for(BufferevMap::iterator i = httpServer->clientMap->begin();
            i != httpServer->clientMap->end();)
        {
            struct timeval date;
            gettimeofday(&date, NULL);
            pthread_mutex_lock(&i->second->lock);
            if(((i->second->stat == HTTP_CONNECTED) 
              ||(i->second->stat == HTTP_IDLE)
              ||(i->second->stat == HTTP_DISCONNECTED))
              &&(date.tv_sec - (i->second)->final_optime.tv_sec) > HTTPSERVER_IDLE_TIMEROUT)
            {
                pthread_mutex_unlock(&i->second->lock);
                httpChilent_Close_nolock((i++)->second);
            }
            else
            {
                pthread_mutex_unlock(&i->second->lock);
                i++;
            }
        }
        pthread_mutex_unlock(&httpServer->clientMap_lock);
    }
    pthread_mutex_unlock(&httpServer->lock);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4720
movq -0x10(%rbp), %rax
cmpl $0x0, 0x84(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x9426
jmp 0x9586
movq -0x10(%rbp), %rdi
callq 0x4390
leaq 0x1409e(%rip), %rax     # 0x1d4d4
imull $0x3e8, (%rax), %edi    # imm = 0x3E8
callq 0x46d0
movq -0x10(%rbp), %rdi
callq 0x4720
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x4720
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xb270
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
callq 0xb240
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0xb2a0
testb $0x1, %al
jne 0x948f
jmp 0x9574
leaq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4780
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rdi
callq 0x4720
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rax
cmpl $0x1, 0x38(%rax)
je 0x94e7
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rax
cmpl $0x2, 0x38(%rax)
je 0x94e7
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rax
cmpl $0x0, 0x38(%rax)
jne 0x954e
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq 0x8(%rcx), %rcx
subq 0xb8(%rcx), %rax
leaq 0x13fc7(%rip), %rcx     # 0x1d4d8
movslq (%rcx), %rcx
cmpq %rcx, %rax
jle 0x954e
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rdi
callq 0x4390
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xb2f0
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rdi
callq 0x95a0
jmp 0x956f
leaq -0x18(%rbp), %rdi
callq 0xb2d0
movq 0x8(%rax), %rdi
callq 0x4390
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xb2f0
movq %rax, -0x40(%rbp)
jmp 0x9468
movq -0x10(%rbp), %rdi
addq $0x28, %rdi
callq 0x4390
jmp 0x940d
movq -0x10(%rbp), %rdi
callq 0x4390
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)