LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/teodorst[P]app-huffman/huffman.c
// Function: read_configuration
char** read_configuration(FILE *codification_fp, unsigned long long int *nbits) {
    char **codification = (char**) calloc(128, sizeof(char*));
    char *line = NULL;
    ssize_t nread;
    char index;
    int i;
    size_t line_length;
    int codification_length;

    // read number of lines from codification
    fscanf(codification_fp, "%d", &codification_length);
    fgetc(codification_fp);

    // read codification
    for(i = 0; i < codification_length; i ++ ) {
        nread = getline(&line, &line_length, codification_fp);
        if (nread == 1) {
            index = line[0];
            nread = getline(&line, &line_length, codification_fp);
            if (nread != -1) {
                line[nread-1] = '\0';
                codification[(unsigned char)index] = strdup(line+3);
            }
        } else {
            line[nread-1] = '\0';
            sscanf(line, "%c", &index);
            codification[(unsigned char)index] = strdup(line+4);
        }
    }


    // read number of bits
    fscanf(codification_fp, "%llu", nbits);

    free(line);
    return codification;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, %r15
movl $0x80, %edi
movl $0x8, %esi
callq 0x10e0
movq %rax, %rbx
movq $0x0, 0x8(%rsp)
leaq 0x108a(%rip), %rsi      # 0x3102
leaq 0x14(%rsp), %r14
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1050
movq %r15, %rdi
callq 0x10c0
cmpl $0x0, (%r14)
jle 0x2133
leaq 0x8(%rsp), %r12
leaq 0x20(%rsp), %r13
leaq 0x7(%rsp), %r14
xorl %ebp, %ebp
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1170
movq 0x8(%rsp), %rcx
cmpq $0x1, %rax
jne 0x20f5
movb (%rcx), %al
movb %al, 0x7(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1170
cmpq $-0x1, %rax
je 0x2127
movq 0x8(%rsp), %rcx
movb $0x0, -0x1(%rcx,%rax)
movq 0x8(%rsp), %rdi
addq $0x3, %rdi
jmp 0x2119
movb $0x0, -0x1(%rcx,%rax)
movq 0x8(%rsp), %rdi
leaq 0xfef(%rip), %rsi       # 0x30f5
movq %r14, %rdx
xorl %eax, %eax
callq 0x1130
movq 0x8(%rsp), %rdi
addq $0x4, %rdi
callq 0x11b0
movzbl 0x7(%rsp), %ecx
movq %rax, (%rbx,%rcx,8)
incl %ebp
cmpl 0x14(%rsp), %ebp
jl 0x20ad
leaq 0xfbe(%rip), %rsi       # 0x30f8
movq %r15, %rdi
movq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x1050
movq 0x8(%rsp), %rdi
callq 0x1030
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/teodorst[P]app-huffman/huffman.c
// Function: read_configuration_pthreads
char **read_configuration_pthreads(FILE *codification_fp, unsigned long long int *nbits_buffer, int* input_buffer_contors, size_t *size) {
    char **codification = (char**) calloc(128, sizeof(char*));
    char *line = NULL;
    ssize_t nread;
    char index;
    int i;
    size_t line_length;
    int codification_length;

    // read number of lines from codification
    fscanf(codification_fp, "%d", &codification_length);
    fgetc(codification_fp);

    // read codification
    for(i = 0; i < codification_length; i ++ ) {
        nread = getline(&line, &line_length, codification_fp);
        if (nread == 1) {
            index = line[0];
            nread = getline(&line, &line_length, codification_fp);
            if (nread != -1) {
                line[nread-1] = '\0';
                codification[(unsigned char)index] = strdup(line+3);
            }
        } else {
            line[nread-1] = '\0';
            sscanf(line, "%c", &index);
            codification[(unsigned char)index] = strdup(line+4);
        }
    }

    int threads_no = 0;
    // read number of threads and bits
    fscanf(codification_fp, "%d\n%lu\n", &threads_no, size);

    for (i = 0; i < threads_no; i ++) {
        fscanf(codification_fp, "%llu %d", nbits_buffer + i, input_buffer_contors + i);
    }

    free(line);
    return codification;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movl $0x80, %edi
movl $0x8, %esi
callq 0x10e0
movq %rax, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
leaq 0xf5d(%rip), %rsi       # 0x3102
leaq 0x1c(%rsp), %r13
movq %r12, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1050
movq %r12, %rdi
callq 0x10c0
cmpl $0x0, (%r13)
jle 0x2266
leaq 0x10(%rsp), %rbp
leaq 0x30(%rsp), %r13
xorl %r15d, %r15d
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1170
movq 0x10(%rsp), %rcx
cmpq $0x1, %rax
jne 0x221f
movb (%rcx), %al
movb %al, 0xf(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1170
cmpq $-0x1, %rax
je 0x2258
movq 0x10(%rsp), %rcx
movb $0x0, -0x1(%rcx,%rax)
movq 0x10(%rsp), %rdi
addq $0x3, %rdi
jmp 0x2245
movb $0x0, -0x1(%rcx,%rax)
movq 0x10(%rsp), %rdi
leaq 0xec5(%rip), %rsi       # 0x30f5
leaq 0xf(%rsp), %rdx
xorl %eax, %eax
callq 0x1130
movq 0x10(%rsp), %rdi
addq $0x4, %rdi
callq 0x11b0
movzbl 0xf(%rsp), %ecx
movq 0x20(%rsp), %rdx
movq %rax, (%rdx,%rcx,8)
incl %r15d
cmpl 0x1c(%rsp), %r15d
jl 0x21d7
leaq 0x18(%rsp), %r13
movl $0x0, (%r13)
leaq 0xe61(%rip), %rsi       # 0x30db
movq %r12, %rdi
movq %r13, %rdx
movq 0x28(%rsp), %rcx
xorl %eax, %eax
callq 0x1050
cmpl $0x0, (%r13)
jle 0x22c5
leaq 0xe63(%rip), %r13       # 0x30fd
xorl %r15d, %r15d
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1050
incq %r15
movslq 0x18(%rsp), %rax
addq $0x4, %rbx
addq $0x8, %r14
cmpq %rax, %r15
jl 0x229d
movq 0x10(%rsp), %rdi
callq 0x1030
movq 0x20(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/teodorst[P]app-huffman/huffman.c
// Function: find_codification
void find_codification(node_t *node, char *path, int level, char **codification) {
    if (node->left != NULL){
        path[level] = 48;
        find_codification(node->left, path, level + 1, codification);
    }

    if (node->right != NULL){
        path[level] = 49;
        find_codification(node->right, path, level + 1, codification);
    }

    /* if a leaf is found */
    if (!(node->left) && !(node->right)){
        path[level] = '\0';
        codification[(unsigned char)node->data] = strdup(path);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
movslq %edx, %r12
je 0x2317
movb $0x30, (%r15,%r12)
movq 0x8(%r14), %rdi
leal 0x1(%r12), %edx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x22e3
cmpq $0x0, 0x10(%r14)
je 0x2337
movb $0x31, (%r15,%r12)
movq 0x10(%r14), %rdi
leal 0x1(%r12), %edx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x22e3
cmpq $0x0, 0x8(%r14)
jne 0x235b
cmpq $0x0, 0x10(%r14)
jne 0x235b
movb $0x0, (%r15,%r12)
movq %r15, %rdi
callq 0x11b0
movzbl 0x4(%r14), %ecx
movq %rax, (%rbx,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/teodorst[P]app-huffman/huffman.c
// Function: print_codes
void print_codes(node_t *root, char *path, int level) {
    if (root->left != NULL){
        path[level] = 48;
        print_codes(root->left, path, level + 1);
    }

    if (root->right != NULL){
        path[level] = 49;
        print_codes(root->right, path, level + 1);
    }

    /* if a leaf is found */
    if (!(root->left) && !(root->right)){
        path[level] = '\0';
        /* print the codification for letter */
        printf("%c : %s\n", root->data, path);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
movslq %edx, %r15
je 0x2391
movb $0x30, (%rbx,%r15)
movq 0x8(%r14), %rdi
leal 0x1(%r15), %edx
movq %rbx, %rsi
callq 0x2367
cmpq $0x0, 0x10(%r14)
je 0x23ad
movb $0x31, (%rbx,%r15)
movq 0x10(%r14), %rdi
leal 0x1(%r15), %edx
movq %rbx, %rsi
callq 0x2367
cmpq $0x0, 0x8(%r14)
jne 0x23bb
cmpq $0x0, 0x10(%r14)
je 0x23c1
popq %rbx
popq %r14
popq %r15
retq
movb $0x0, (%rbx,%r15)
movsbl 0x4(%r14), %esi
leaq 0xd1a(%rip), %rdi       # 0x30ec
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O1/teodorst[P]app-huffman/huffman.c
// Function: build_huffman_tree_from_codification
node_t* build_huffman_tree_from_codification(char **codification) {
    int i;
    int current_code_index = 0;
    int codification_length;

    // init the root node
    node_t* root = init_node('#');
    node_t* node = root;

    for (i = 0; i < 128; i ++) {
        if (codification[i]) {
            node = root;
            codification_length = strlen(codification[i]);
            current_code_index = 0;
            for (current_code_index = 0; current_code_index < codification_length; current_code_index ++) {
                if (codification[i][current_code_index] == '0') {
                    if (node->left == NULL) {
                        node->left = init_node('#');
                    }
                    node = node->left;
                }
                else {
                    if (node->right == NULL) {
                        node->right = init_node('#');
                    }
                    node = node->right;
                }
            }
            node->data = i;
        }
    }
    return root;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x18, %edi
callq 0x1120
movq %rax, %r14
movb $0x23, 0x4(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rdi
testq %rdi, %rdi
je 0x247c
callq 0x1090
movq %rax, %r15
movq %r14, %rax
testl %r15d, %r15d
jle 0x2478
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq %r14, %rax
movq (%rbx,%r12,8), %rcx
cmpb $0x30, (%rcx,%r13)
jne 0x2448
leaq 0x8(%rax), %rbp
cmpq $0x0, 0x8(%rax)
jne 0x246c
jmp 0x2453
leaq 0x10(%rax), %rbp
cmpq $0x0, 0x10(%rax)
jne 0x246c
movl $0x18, %edi
callq 0x1120
movb $0x23, 0x4(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movq %rax, (%rbp)
movq (%rbp), %rax
incq %r13
cmpq %r13, %r15
jne 0x2430
movb %r12b, 0x4(%rax)
incq %r12
cmpq $0x80, %r12
jne 0x240a
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/teodorst[P]app-huffman/huffman.c
// Function: build_huffman_tree
node_t* build_huffman_tree(unsigned long long int* frequecy){
    /* initialize and populate the priority queue */
    heap_t *h = init_priority_queue();
    insert_values_in_queue(frequecy, h);

    while (h->len > 1) {
        node_t* root = (struct node_t*) malloc (sizeof(struct node_t));
        node_t* left;
        node_t* right;

        /* extract two nodes from heap to form their root node */
        left = pop(h);
        right = pop(h);
        /* populate the root node */
        root->priority = left->priority + right->priority;
        root->data = '#';
        root->left = left;
        root->right = right;

        /* insert root node into the heap */
        push(h, root);
    }

    /* return the only node left in heap */
    return pop(h);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %eax, %eax
callq 0x1684
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x17c7
cmpl $0x2, 0x8(%rbx)
jl 0x2503
movl $0x18, %edi
callq 0x1120
movq %rax, %r14
movq %rbx, %rdi
callq 0x171b
movq %rax, %r15
movq %rbx, %rdi
callq 0x171b
movl (%rax), %ecx
addl (%r15), %ecx
movl %ecx, (%r14)
movb $0x23, 0x4(%r14)
movq %r15, 0x8(%r14)
movq %rax, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1693
cmpl $0x1, 0x8(%rbx)
jg 0x24bd
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x171b
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/extracters/tpdump/tpdump.c
// Function: read_len
size_t read_len ( FILE* fi )
/* Read a little-endian four-byte number */
{ unsigned char c;      /* A Character from the file */
  size_t i;
  size_t n;             /* the number */
  if ( fread ( &c, 1, 1, fi ) == 0 )
    return (0);
  n = c; i = 256;
  if ( fread ( &c, 1, 1, fi ) == 0 )
    return (0);
  n += i*c;
  i *= 256;
  if ( fread ( &c, 1, 1, fi ) == 0 )
    return (0);
  n += i*c;
  i *= 256;
  if ( fread ( &c, 1, 1, fi ) == 0 )
    return (0);
  n += i*c;
  i *= 256;
  return (n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7(%rsp), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x122e
leaq 0x7(%rsp), %rdi
movzbl (%rdi), %r14d
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x122e
leaq 0x7(%rsp), %rdi
movzbl (%rdi), %r15d
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x122e
leaq 0x7(%rsp), %rdi
movzbl (%rdi), %r12d
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x122e
shll $0x8, %r15d
orq %r14, %r15
shll $0x10, %r12d
orq %r15, %r12
movzbl 0x7(%rsp), %eax
shll $0x18, %eax
orq %r12, %rax
jmp 0x1230
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/extracters/tpdump/tpdump.c
// Function: usage
void usage ( char* argv[] )
{ printf ( "Usage: %s [options] <input_file>\n", argv[0] );
  printf ( " Options: -w to print word marks on a separate line)\n" );
  printf ( "          -# number of 'files' to print (default 1)\n");
  printf ( "          -a print all of each record, including blank lines,\n");
  printf ( "             which are otherwise suppressed (except for the last one)\n");
  printf ( "          -e E11 format, i.e., don't require even-length records\n" );
  printf ( "          -h Use the H (Fortran) print arrangement\n");
  printf ( "          -o Use the 'old simh' print arrangement\n");
}

// Assembly:
pushq %rax
movq (%rdi), %rsi
leaq 0xdf9(%rip), %rdi       # 0x2040
xorl %eax, %eax
callq 0x1060
leaq 0xe91(%rip), %rdi       # 0x20e6
callq 0x1040
leaq 0xeba(%rip), %rdi       # 0x211b
callq 0x1040
leaq 0xee2(%rip), %rdi       # 0x214f
callq 0x1040
leaq 0xf14(%rip), %rdi       # 0x218d
callq 0x1040
leaq 0xf4e(%rip), %rdi       # 0x21d3
callq 0x1040
leaq 0xf83(%rip), %rdi       # 0x2214
callq 0x1040
leaq 0xfaa(%rip), %rdi       # 0x2247
popq %rax
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: accpt_error_cb(evconnlistener*, void*)
static void accpt_error_cb(struct evconnlistener *listener, void *ctx)
{
    struct event_base *base = evconnlistener_get_base(listener);
    int err = EVUTIL_SOCKET_ERROR();
    ctx =(void *)ctx;//(消除警告)
    fprintf(stderr, "Got an error %d (%s) the listener."
            "Shuttinf sown.\r\n",err, evutil_socket_error_to_string(err));
    event_base_loopexit(base, NULL);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
callq 0x3200
movq %rax, %rbx
callq 0x3070
movl (%rax), %ebp
movq 0xd6e9(%rip), %rax      # 0x10fd8
movq (%rax), %r14
movl %ebp, %edi
callq 0x3170
leaq 0x9416(%rip), %rsi      # 0xcd16
movq %r14, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x35e0
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x3330
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: base64_encode(unsigned char const*, char*, int)
int base64_encode( const unsigned char *bindata, char *base64, int binlength)
{
    int i, j;
    unsigned char current;
    for ( i = 0, j = 0 ; i < binlength ; i += 3 )
    {
        current = (bindata[i] >> 2) ;
        current &= (unsigned char)0x3F;
        base64[j++] = base64char[(int)current];
        current = ( (unsigned char)(bindata[i] << 4 ) ) & ( (unsigned char)0x30 ) ;
        if ( i + 1 >= binlength )
        {
            base64[j++] = base64char[(int)current];
            base64[j++] = '=';
            base64[j++] = '=';
            break;
        }
        current |= ( (unsigned char)(bindata[i+1] >> 4) ) & ( (unsigned char) 0x0F );
        base64[j++] = base64char[(int)current];
        current = ( (unsigned char)(bindata[i+1] << 2) ) & ( (unsigned char)0x3C ) ;
        if ( i + 2 >= binlength )
        {
            base64[j++] = base64char[(int)current];
            base64[j++] = '=';
            break;
        }
        current |= ( (unsigned char)(bindata[i+2] >> 6) ) & ( (unsigned char) 0x03 );
        base64[j++] = base64char[(int)current];
        current = ( (unsigned char)bindata[i+2] ) & ( (unsigned char)0x3F ) ;
        base64[j++] = base64char[(int)current];
    }
    base64[j] = '\0';
    return j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edx, %edx
jle 0x43a0
movl %edx, %ecx
movl $0x1, %r9d
xorl %eax, %eax
leaq 0x6d18(%rip), %r8       # 0xb020
movzbl -0x1(%rdi,%r9), %r10d
shrl $0x2, %r10d
movb (%r10,%r8), %r10b
movb %r10b, (%rsi,%rax)
movzbl -0x1(%rdi,%r9), %r10d
shll $0x4, %r10d
andl $0x30, %r10d
cmpq %rcx, %r9
jae 0x43a4
movzbl (%rdi,%r9), %r11d
shrl $0x4, %r11d
movzbl %r10b, %r10d
orq %r11, %r10
movb (%r10,%r8), %r10b
movb %r10b, 0x1(%rsi,%rax)
movzbl (%rdi,%r9), %r10d
shll $0x2, %r10d
andl $0x3c, %r10d
leal 0x1(%r9), %r11d
cmpl %edx, %r11d
jge 0x43c2
movzbl 0x1(%rdi,%r9), %r11d
shrl $0x6, %r11d
movzbl %r10b, %r10d
orq %r11, %r10
movb (%r10,%r8), %r10b
movb %r10b, 0x2(%rsi,%rax)
movzbl 0x1(%rdi,%r9), %r10d
andl $0x3f, %r10d
movb (%r10,%r8), %r10b
movb %r10b, 0x3(%rsi,%rax)
addq $0x4, %rax
addq $0x3, %r9
leal -0x1(%r9), %r10d
cmpl %edx, %r10d
jl 0x4308
jmp 0x43dc
xorl %eax, %eax
jmp 0x43dc
movb (%r10,%r8), %cl
leal 0x1(%rax), %edx
andl $-0x3, %edx
movb %cl, (%rsi,%rdx)
movl %eax, %ecx
andl $-0x4, %ecx
movw $0x3d3d, 0x2(%rsi,%rcx) # imm = 0x3D3D
addl $0x4, %eax
jmp 0x43dc
movb (%r10,%r8), %cl
leal 0x2(%rax), %edx
andl $-0x2, %edx
movb %cl, (%rsi,%rdx)
leal 0x4(%rax), %ecx
andl $-0x4, %eax
movb $0x3d, 0x3(%rsi,%rax)
movl %ecx, %eax
cltq
movb $0x0, (%rsi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: base64_decode(char const*, unsigned char*)
int base64_decode( const char *base64, unsigned char *bindata)
{
    int i, j;
    unsigned char k;
    unsigned char temp[4];
    for ( i = 0, j = 0; base64[i] != '\0' ; i += 4 )
    {
        memset( temp, 0xFF, sizeof(temp) );
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i] )
                temp[0]= k;
        }
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i+1] )
                temp[1]= k;
        }
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i+2] )
                temp[2]= k;
        }
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i+3] )
                temp[3]= k;
        }
        bindata[j++] = ((unsigned char)(((unsigned char)(temp[0] << 2))&0xFC)) | \
                       ((unsigned char)((unsigned char)(temp[1]>>4)&0x03));
        if ( base64[i+2] == '=' )
            break;
        bindata[j++] = ((unsigned char)(((unsigned char)(temp[1] << 4))&0xF0)) | \
                       ((unsigned char)((unsigned char)(temp[2]>>2)&0x0F));
        if ( base64[i+3] == '=' )
            break;
        bindata[j++] = ((unsigned char)(((unsigned char)(temp[2] << 6))&0xF0)) | \
                       ((unsigned char)(temp[3]&0x3F));
    }
    return j;
}

// Assembly:
movb (%rdi), %r10b
testb %r10b, %r10b
je 0x44e3
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %ecx, %ecx
leaq 0x6c1e(%rip), %r8       # 0xb020
xorl %edx, %edx
xorl %eax, %eax
movb $-0x1, %r9b
xorl %r11d, %r11d
cmpb %r10b, (%r11,%r8)
movzbl %r9b, %r9d
cmovel %r11d, %r9d
incq %r11
cmpq $0x40, %r11
jne 0x440c
movb 0x1(%rdi,%rcx), %r11b
movb $-0x1, %r10b
xorl %ebx, %ebx
cmpb %r11b, (%rbx,%r8)
movzbl %r10b, %r10d
cmovel %ebx, %r10d
incq %rbx
cmpq $0x40, %rbx
jne 0x442b
movb 0x2(%rdi,%rcx), %bl
movb $-0x1, %r11b
xorl %r14d, %r14d
cmpb %bl, (%r14,%r8)
movzbl %r11b, %r11d
cmovel %r14d, %r11d
incq %r14
cmpq $0x40, %r14
jne 0x444a
movb 0x3(%rdi,%rcx), %r14b
movb $-0x1, %bl
xorl %r15d, %r15d
cmpb %r14b, (%r15,%r8)
movzbl %bl, %ebx
cmovel %r15d, %ebx
incq %r15
cmpq $0x40, %r15
jne 0x4469
shlb $0x2, %r9b
movl %r10d, %r14d
shrb $0x4, %r14b
andb $0x3, %r14b
orb %r9b, %r14b
movb %r14b, (%rsi,%rdx)
cmpb $0x3d, 0x2(%rdi,%rcx)
je 0x44e6
shlb $0x4, %r10b
movl %r11d, %r9d
shrb $0x2, %r9b
andb $0xf, %r9b
orb %r10b, %r9b
movb %r9b, 0x1(%rsi,%rdx)
cmpb $0x3d, 0x3(%rdi,%rcx)
je 0x44ea
shlb $0x6, %r11b
andb $0x3f, %bl
orb %r11b, %bl
addl $0x3, %eax
movb %bl, 0x2(%rsi,%rdx)
addq $0x3, %rdx
movb 0x4(%rdi,%rcx), %r10b
addq $0x4, %rcx
testb %r10b, %r10b
jne 0x4406
movl %edx, %eax
jmp 0x44ed
xorl %eax, %eax
retq
incl %eax
jmp 0x44ed
addl $0x2, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: webSocket_getRandomString(unsigned char*, unsigned int)
void webSocket_getRandomString(unsigned char *buf, unsigned int len)
{
    unsigned int i;
    unsigned char temp;
    srand((int)time(0));
    for(i = 0; i < len; i++)
    {
        temp = (unsigned char)(rand()%256);
        if(temp == 0)   // 随机数不要0, 0 会干扰对字符串长度的判断
            temp = 128;
        buf[i] = temp;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
xorl %edi, %edi
callq 0x33d0
movl %eax, %edi
callq 0x3400
testl %r14d, %r14d
je 0x453b
movl %r14d, %r14d
xorl %r15d, %r15d
movl $0x80, %r12d
callq 0x3120
testb %al, %al
cmovel %r12d, %eax
movb %al, (%rbx,%r15)
incq %r15
cmpq %r15, %r14
jne 0x4524
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: webSocket_buildRespondShakeKey(unsigned char*, unsigned int, unsigned char*)
int webSocket_buildRespondShakeKey(unsigned char *acceptKey, unsigned int acceptKeyLen, unsigned char *respondKey)
{
    char *clientKey;  
    char *sha1Data;  
    int  n;  
    const char GUID[] = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";  
    unsigned int GUIDLEN;

    if(acceptKey == NULL)  
        return 0;  
    GUIDLEN = sizeof(GUID);
    clientKey = (char *)calloc(1, sizeof(char)*(acceptKeyLen + GUIDLEN + 10));  
    memset(clientKey, 0, (acceptKeyLen + GUIDLEN + 10));
    //
    memcpy(clientKey, acceptKey, acceptKeyLen); 
    memcpy(&clientKey[acceptKeyLen], GUID, GUIDLEN);
    clientKey[acceptKeyLen + GUIDLEN] = '\0';
    //
    sha1Data = sha1_hash(clientKey);  
    n = strlen(sha1Data);  
    //


    n = base64_encode((const unsigned char *)sha1Data, (char *)respondKey, n);
    //
    free(sha1Data);
    free(clientKey);
    return n;
}

// Assembly:
testq %rdi, %rdi
je 0x464d
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r12d
movq %rdi, %r15
leal 0x25(%r12), %ebx
leal 0x2f(%r12), %r13d
movl $0x1, %edi
movq %r13, %rsi
movq %rdx, -0x30(%rbp)
callq 0x32b0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x3250
movl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3350
movabsq $0x31314235384344, %rax # imm = 0x31314235384344
movq %rax, 0x1d(%r14,%r12)
movaps 0x6a7e(%rip), %xmm0     # 0xb070
movups %xmm0, (%r14,%r12)
movaps 0x6a82(%rip), %xmm0     # 0xb080
movups %xmm0, 0x10(%r14,%r12)
movb $0x0, (%r14,%rbx)
movq %r14, %rdi
callq 0x42ac
movq %rax, %r15
movq %rax, %rdi
callq 0x31f0
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movl %eax, %edx
callq 0x42eb
movl %eax, %ebx
movq %r15, %rdi
callq 0x3500
movq %r14, %rdi
callq 0x3500
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: webSocket_matchShakeKey(unsigned char*, unsigned int, unsigned char*, unsigned int)
int webSocket_matchShakeKey(unsigned char *myKey, unsigned int myKeyLen, unsigned char *acceptKey, unsigned int acceptKeyLen)
{
    unsigned int retLen;
    unsigned char tempKey[256] = {0};
    //
    retLen = webSocket_buildRespondShakeKey(myKey, myKeyLen, tempKey);
    //printf("webSocket_matchShakeKey :\r\n%d : %s\r\n%d : %s\r\n", acceptKeyLen, acceptKey, retLen, tempKey);
    //
    if(retLen != acceptKeyLen)
    {
        De_printf("webSocket_matchShakeKey : len err\r\n%s\r\n%s\r\n%s\r\n", myKey, tempKey, acceptKey);
        return -1;
    }
    else if(strcmp((const char *)tempKey, (const char *)acceptKey) != 0)
    {
        De_printf("webSocket_matchShakeKey : str err\r\n%s\r\n%s\r\n", tempKey, acceptKey);
        return -1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %ecx, %r12d
movq %rdx, -0x30(%rbp)
movl %esi, %r13d
movq %rdi, %r14
leaq -0x130(%rbp), %rbx
xorl %r15d, %r15d
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3250
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq 0x4583
cmpl %r12d, %eax
jne 0x46f3
leaq -0x130(%rbp), %rdi
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x35c0
testl %eax, %eax
je 0x4742
leaq 0x6aec(%rip), %rdi      # 0xb1ab
leaq 0x6af0(%rip), %rsi      # 0xb1b6
leaq 0x6b01(%rip), %rdx      # 0xb1ce
movl $0x21c, %ecx            # imm = 0x21C
xorl %eax, %eax
callq 0x3080
leaq 0x6b2d(%rip), %rdi      # 0xb20d
leaq -0x130(%rbp), %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3080
jmp 0x4730
leaq 0x6ab1(%rip), %rdi      # 0xb1ab
leaq 0x6ab5(%rip), %rsi      # 0xb1b6
leaq 0x6ac6(%rip), %rdx      # 0xb1ce
movl $0x217, %ecx            # imm = 0x217
xorl %eax, %eax
callq 0x3080
leaq 0x6ac2(%rip), %rdi      # 0xb1dd
leaq -0x130(%rbp), %rdx
movq %r14, %rsi
movq -0x30(%rbp), %rcx
xorl %eax, %eax
callq 0x3080
leaq 0x6da7(%rip), %rdi      # 0xb4de
callq 0x3680
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: webSocket_buildHttpRespond(unsigned char*, unsigned int, char*)
void webSocket_buildHttpRespond(unsigned char *acceptKey, unsigned int acceptKeyLen, char *package)
{
    const char httpDemo[] = "HTTP/1.1 101 Switching Protocols\r\n"
        "Upgrade: websocket\r\n"
        "Server: Microsoft-HTTPAPI/2.0\r\n"
        "Connection: Upgrade\r\n"
        "Sec-WebSocket-Accept: %s\r\n"
        "%s\r\n\r\n";  // 时间打包待续        // 格式如 "Date: Tue, 20 Jun 2017 08:50:41 CST\r\n"
    time_t now;
    struct tm *tm_now;
    char timeStr[256] = {0};
    unsigned char respondShakeKey[256] = {0};
    // 构建回应的握手key
    webSocket_buildRespondShakeKey(acceptKey, acceptKeyLen, respondShakeKey);   
    // 构建回应时间字符串
    time(&now);
    tm_now = localtime(&now);
    strftime(timeStr, sizeof(timeStr), "Date: %a, %d %b %Y %T %Z", tm_now);
    // 组成回复信息
    sprintf(package, httpDemo, respondShakeKey, timeStr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r13
leaq -0x230(%rbp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x3250
leaq -0x130(%rbp), %r15
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x3250
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x4583
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x33d0
movq %r12, %rdi
callq 0x3300
leaq 0x6a4f(%rip), %rdx      # 0xb239
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rax, %rcx
callq 0x3340
leaq 0x691f(%rip), %rsi      # 0xb120
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x30f0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: delayms(unsigned int)
void delayms(unsigned int ms)
{
    struct timeval tim;
    tim.tv_sec = ms/1000;
    tim.tv_usec = (ms%1000)*1000;
    select(0, NULL, NULL, NULL, &tim);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, %eax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
shrq $0x26, %rax
leaq -0x10(%rbp), %r8
movq %rax, (%r8)
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %edi
imull $0x3e8, %edi, %eax      # imm = 0x3E8
movq %rax, 0x8(%r8)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x33f0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: ev_webSocket_serverLinkToClient(bufferevent*, char*, unsigned int)
int ev_webSocket_serverLinkToClient(struct bufferevent * client, char *recvBuf, unsigned int bufLen)
{
    char *p;
    int ret;
    char recvShakeKey[512], respondPackage[1024];
    if(bufLen==0)
        return -1;
    if((p = strstr(recvBuf, "Sec-WebSocket-Key: ")) == NULL)
        return -1;
    p += strlen("Sec-WebSocket-Key: ");
    //
    memset(recvShakeKey, 0, sizeof(recvShakeKey));
    sscanf(p, "%s", recvShakeKey);      // 取得握手key
    ret = strlen(recvShakeKey);
    if(ret < 1)
        return -1;
    //
    memset(respondPackage, 0, sizeof(respondPackage));
    webSocket_buildHttpRespond((unsigned char*)recvShakeKey,(unsigned int)ret, ( char *)respondPackage);
    //
    return bufferevent_write(client,respondPackage, strlen(respondPackage));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x600, %rsp            # imm = 0x600
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
testl %edx, %edx
je 0x5289
movq %rdi, %rbx
leaq 0x6263(%rip), %rax      # 0xb456
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3100
testq %rax, %rax
je 0x5289
movq %rax, %r15
addq $0x13, %r15
leaq -0x220(%rbp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x3250
leaq 0x60d3(%rip), %rsi      # 0xb2fe
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3410
movq %r12, %rdi
callq 0x31f0
movq %rax, %r15
testl %r15d, %r15d
jle 0x5289
leaq -0x620(%rbp), %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x3250
leaq -0x220(%rbp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x4778
movq %r14, %rdi
callq 0x31f0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3260
movl %eax, %r14d
movl %r14d, %eax
addq $0x600, %rsp            # imm = 0x600
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: ev_webSocket_send(bufferevent*, unsigned char*, unsigned int, bool, Websocket_CommunicationType)
int ev_webSocket_send(struct bufferevent * bufferev, unsigned char *data, unsigned int dataLen, bool mod, Websocket_CommunicationType type)
{
    unsigned char *webSocketPackage;
    unsigned int retLen, ret;
    /* unsigned int i; */

    /* printf("webSocket_send : %d\r\n", dataLen); */
    //---------- websocket数据打包 ----------
    webSocketPackage = (unsigned char *)calloc(1, sizeof(char)*(dataLen + 128));  memset(webSocketPackage, 0, (dataLen + 128));
    retLen = webSocket_enPackage(data, dataLen, webSocketPackage, (dataLen + 128), mod, type);
    
       /* printf("webSocket_send : %d\r\n" , retLen); */
       /* for(i = 0; i < retLen; i ++)  printf("%.2X ", webSocketPackage[i]); */
       /* printf("\r\n"); */
    ret = bufferevent_write(bufferev, webSocketPackage, retLen); 
    free(webSocketPackage);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x2c(%rbp)
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, -0x38(%rbp)
leal 0x80(%r12), %ebx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x32b0
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x3250
movq %r13, %rdi
movl %r12d, %esi
movq %r14, %rdx
movl %ebx, %ecx
movl %r15d, %r8d
movl -0x2c(%rbp), %r9d
callq 0x4823
movl %eax, %edx
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x3260
movl %eax, %ebx
movq %r14, %rdi
callq 0x3500
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: HttpServer_GetThreadPool(httpServer_t*)
threadpool_t * HttpServer_GetThreadPool(httpServer_t * httpServer)
{
    pthread_mutex_lock(&httpServer->lock);
    threadpool_t *pool =  httpServer->pool;
    pthread_mutex_unlock(&httpServer->lock);
    return pool;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3620
movq 0x70(%rbx), %r14
movq %rbx, %rdi
callq 0x3310
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: webSocke_thread_cb(void*)
void *webSocke_thread_cb(void * arg)
{
    if(arg != NULL)
    {
        WebddSocket_Thread_Cb_arg_t * cb_arg = (WebddSocket_Thread_Cb_arg_t *)arg;
        switch(cb_arg->type)
        {
        case Ws_Cb_Type_connect:
            if(cb_arg->client->httpServer->ws_connect_cb != NULL)
                cb_arg->client->httpServer->ws_connect_cb(cb_arg->client);
            break;
        case Ws_Cb_Type_disconnect:
            if(cb_arg->client->httpServer->ws_disconnect_cb != NULL)
                cb_arg->client->httpServer->ws_disconnect_cb(cb_arg->client);
            break;
        case Ws_Cb_Type_write:
            if(cb_arg->client->httpServer->ws_weite_cb != NULL)
                cb_arg->client->httpServer->ws_weite_cb(cb_arg->client);
            break;
        case Ws_Cb_Type_read:
            if(cb_arg->client->httpServer->ws_read_cb != NULL)
                cb_arg->client->httpServer->ws_read_cb(cb_arg->client);
            break;
        }
        free(arg);
    }
    return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x63ca
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpq $0x3, %rax
ja 0x63c1
leaq 0x51cd(%rip), %rcx      # 0xb540
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0x90(%rax), %rax
jmp 0x63ba
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0xa0(%rax), %rax
jmp 0x63ba
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0xa8(%rax), %rax
jmp 0x63ba
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0x98(%rax), %rax
testq %rax, %rax
je 0x63c1
callq *%rax
movq %rbx, %rdi
callq 0x3500
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: http_request_free(http_request_t*)
int http_request_free(struct http_request_t *request)
{
    if(request == NULL)
        return -1;
    if(request->method != NULL)
        free(request->method);
    if(request->request_data != NULL)
        free(request->request_data);
    if(request->url != NULL)
        free(request->url);
    if(request->http_version != NULL)
        free(request->http_version);
    if(request->HeadParameter != NULL)
        delete request->HeadParameter;
    memset(request, 0, sizeof(http_request_t));

    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x6a87
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x6a1f
callq 0x3500
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x6a2d
callq 0x3500
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x6a3b
callq 0x3500
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x6a49
callq 0x3500
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x6a67
movq %r14, %rdi
callq 0x7ee2
movl $0x30, %esi
movq %r14, %rdi
callq 0x3460
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x30(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: http_resqonse_free(http_resqonse_t*)
int http_resqonse_free(struct http_resqonse_t *resqonse)
{
    if(resqonse == NULL)
        return -1;
    if(resqonse->resqonse_data != NULL)
        free(resqonse->resqonse_data);
    if(resqonse->HeadParameter != NULL)
        delete resqonse->HeadParameter;
    memset(resqonse, 0, sizeof(http_resqonse_t));
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x6fcf
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6f9d
callq 0x3500
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x6fbb
movq %r14, %rdi
callq 0x7ee2
movl $0x30, %esi
movq %r14, %rdi
callq 0x3460
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x3620
cmpl $0x0, 0x84(%rbx)
jne 0x7289
leaq 0x28(%rbx), %r14
leaq 0x8(%rsp), %r15
leaq 0xa27c(%rip), %rbp      # 0x1144c
movq %rbx, %rdi
callq 0x3310
leaq 0xa269(%rip), %rax      # 0x11448
imull $0x3e8, (%rax), %edi    # imm = 0x3E8
callq 0x35d0
movq %rbx, %rdi
callq 0x3620
movq %r14, %rdi
callq 0x3620
movq 0x50(%rbx), %rax
movq 0x18(%rax), %r12
addq $0x8, %rax
cmpq %rax, %r12
je 0x7274
movq %r15, %rdi
xorl %esi, %esi
callq 0x3690
movq 0x28(%r12), %rdi
callq 0x3620
movq 0x28(%r12), %rdi
cmpl $0x2, 0x38(%rdi)
ja 0x725e
movq 0x8(%rsp), %rax
subq 0xb8(%rdi), %rax
movslq (%rbp), %rcx
cmpq %rcx, %rax
jle 0x725e
callq 0x3310
movq %r12, %rdi
callq 0x32c0
movq %rax, %r13
movq 0x28(%r12), %rdi
callq 0x72a2
movq %r13, %r12
jmp 0x726e
callq 0x3310
movq %r12, %rdi
callq 0x32c0
movq %rax, %r12
movq 0x50(%rbx), %rax
jmp 0x7202
movq %r14, %rdi
callq 0x3310
cmpl $0x0, 0x84(%rbx)
je 0x71d0
movq %rbx, %rdi
callq 0x3310
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpChilent_free(httpChilent_t*)
int httpChilent_free(struct httpChilent_t* client)
{
    if(client == NULL)
        return-1;
    pthread_mutex_lock(&client->lock);
    if(client->receive_evbuff != NULL)
    {
        evbuffer_lock(client->receive_evbuff);
        evbuffer_free(client->receive_evbuff);
    }
    http_request_free(&client->request);
    http_resqonse_free(&client->resqonse);
    pthread_mutex_destroy(&client->lock);
    free(client);
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x7481
pushq %rbx
movq %rdi, %rbx
callq 0x3620
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x745b
callq 0x32d0
movq 0x98(%rbx), %rdi
callq 0x31a0
leaq 0x40(%rbx), %rdi
callq 0x6a06
leaq 0x78(%rbx), %rdi
callq 0x6f83
movq %rbx, %rdi
callq 0x34e0
movq %rbx, %rdi
callq 0x3500
xorl %eax, %eax
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_setHttpHandler(httpServer_t*, void (*)(httpChilent_t*))
int httpServer_setHttpHandler(httpServer_t *httpServer, httpd_handler_t handler)
{
    if(httpServer == NULL)
        return -1;
    pthread_mutex_lock(&httpServer->lock);
    httpServer->handler = handler;
    pthread_mutex_unlock(&httpServer->lock);
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x7716
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3620
movq %r14, 0x88(%rbx)
movq %rbx, %rdi
callq 0x3310
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_setWebSocket_cb(httpServer_t*, void (*)(httpChilent_t*), void (*)(httpChilent_t*), void (*)(httpChilent_t*))
int httpServer_setWebSocket_cb(httpServer_t * httpServer, webSocket_cb_t ws_write_cb, webSocket_cb_t ws_connect_cb, webSocket_cb_t ws_disConnect_cb)
{
    if(httpServer == NULL)
        return -1;
    pthread_mutex_lock(&httpServer->lock);
    httpServer->ws_weite_cb = ws_write_cb;
    httpServer->ws_connect_cb = ws_connect_cb;
    httpServer->ws_disconnect_cb = ws_disConnect_cb;
    pthread_mutex_unlock(&httpServer->lock);
    return 0;
}

// Assembly:
testq %rdi, %rdi
je 0x77a7
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x3620
movq %r12, 0x98(%r14)
movq %r15, 0xa0(%r14)
movq %rbx, 0xa8(%r14)
movq %r14, %rdi
callq 0x3310
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_setWebSocket_read_cb(httpServer_t*, void (*)(httpChilent_t*), char const*)
int httpServer_setWebSocket_read_cb(httpServer_t * httpServer, webSocket_cb_t ws_read_cb,const char * url)
{
    if(httpServer == NULL)
        return -1;
    pthread_mutex_lock(&httpServer->lock);
    httpServer->webSocket_url = (char *)malloc(strlen(url)); 
    if(httpServer->webSocket_url == NULL)
    {
        return -1;
    }
    httpServer->ws_read_cb = ws_read_cb;
    strcpy(httpServer->webSocket_url, url);
    pthread_mutex_unlock(&httpServer->lock);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x7804
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x3620
movq %r14, %rdi
callq 0x31f0
movq %rax, %rdi
callq 0x35a0
movq %rax, 0xb0(%rbx)
testq %rax, %rax
je 0x7804
movq %r15, 0x90(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x33e0
movq %rbx, %rdi
callq 0x3310
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_free(httpServer_t*)
int httpServer_free(httpServer_t * httpServer)
{
    if(httpServer == NULL)
        return -1;
    httpServer->shutdown = true;
    if(httpServer->http_supervise_thread != 0)
        pthread_join(httpServer->http_supervise_thread, NULL);
    if(httpServer->http_listeber)
    {
        evconnlistener_free(httpServer->http_listeber);
    }
    if(httpServer->evb_thpool)
    {
        evbase_threadpool_destroy(httpServer->evb_thpool);
    }
    pthread_mutex_lock(&httpServer->clientMap_lock);
    if(httpServer->clientMap)
    {
        BufferevMap:: iterator i;
        for(i=httpServer->clientMap->begin();i != httpServer->clientMap->end(); i++)
        {
            httpChilent_free(i->second);
        }
        delete httpServer->clientMap;

    }
    pthread_mutex_destroy(&httpServer->lock);
    pthread_mutex_destroy(&httpServer->clientMap_lock);
    if(httpServer)
    {
        free(httpServer);
    }
    return 0;

}

// Assembly:
testq %rdi, %rdi
je 0x78d8
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, 0x84(%rdi)
movq 0x78(%rdi), %rdi
testq %rdi, %rdi
je 0x783f
xorl %esi, %esi
callq 0x33b0
movq 0x68(%rbx), %rdi
testq %rdi, %rdi
je 0x784d
callq 0x30e0
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x785b
callq 0x882f
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x3620
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0x78b2
movq 0x18(%rax), %r15
movq 0x50(%rbx), %r12
leaq 0x8(%r12), %rax
cmpq %rax, %r15
je 0x7898
movq 0x28(%r15), %rdi
callq 0x7430
movq %r15, %rdi
callq 0x32c0
movq %rax, %r15
jmp 0x7874
testq %r12, %r12
je 0x78b2
movq %r12, %rdi
callq 0x7f74
movl $0x30, %esi
movq %r12, %rdi
callq 0x3460
movq %rbx, %rdi
callq 0x34e0
movq %r14, %rdi
callq 0x34e0
movq %rbx, %rdi
callq 0x3500
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpServer_getArg(httpServer_t*)
void* httpServer_getArg(httpServer_t *httpServer)
{
    pthread_mutex_lock(&httpServer->lock);
    void * arg = httpServer->arg;
    pthread_mutex_unlock(&httpServer->lock);
    return arg;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3620
movq 0xb8(%rbx), %r14
movq %rbx, %rdi
callq 0x3310
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: bufferev_read_cb(bufferevent*, void*)
static void bufferev_read_cb(struct bufferevent *bev,void *ctx)
{
    bev = (struct bufferevent *)bev;
    struct httpChilent_t *client = (struct httpChilent_t *)ctx;
    pthread_mutex_lock(&client->lock);
    if(client->stat == HTTP_WS_DATA )
    {
        if(client->httpServer->ws_read_cb != NULL)
            threadpool_add(client->httpServer->pool, ws_read_cb_thread, client);
        pthread_mutex_unlock(&client->lock);
    }
    else
    {
        client->stat = HTTP_REQUEST;
        if(client->httpServer->handler != NULL)
            threadpool_add(client->httpServer->pool, httpd_handler_thread, client);
        pthread_mutex_unlock(&client->lock);
    }
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x3620
cmpl $0x5, 0x38(%rbx)
jne 0x7ced
movq 0x28(%rbx), %rax
cmpq $0x0, 0x90(%rax)
je 0x7d15
leaq -0xd16(%rip), %rsi      # 0x6fd5
jmp 0x7d09
movl $0x3, 0x38(%rbx)
movq 0x28(%rbx), %rax
cmpq $0x0, 0x88(%rax)
je 0x7d15
leaq -0x127c(%rip), %rsi     # 0x6a8d
movq 0x70(%rax), %rdi
movq %rbx, %rdx
callq 0x920d
movq %rbx, %rdi
popq %rbx
jmp 0x3310
// File: /workspace/github_c_makefile_star2_O1/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: bufferev_write_cb(bufferevent*, void*)
static void bufferev_write_cb(struct bufferevent *bev,void *ctx)
{
    bev = (struct bufferevent *)bev;
    httpChilent_t *client = (httpChilent_t *)ctx;
    pthread_mutex_lock(&client->lock);
    gettimeofday(&client->final_optime,NULL);
    if( client->stat != HTTP_WS_DATA)
        client->stat = HTTP_IDLE;
    if(client->stat == HTTP_WS_DATA)
    {
        WebddSocket_Thread_Cb_arg_t * cb_arg = (WebddSocket_Thread_Cb_arg_t *)malloc(sizeof(WebddSocket_Thread_Cb_arg_t));
        cb_arg->client = client;
        cb_arg->type = Ws_Cb_Type_write;
        threadpool_add(evbase_threadpool_get_threadpool(client->httpServer->evb_thpool), webSocke_thread_cb, cb_arg);
    }
    pthread_mutex_unlock(&client->lock);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x3620
leaq 0xb8(%rbx), %rdi
xorl %esi, %esi
callq 0x3690
cmpl $0x5, 0x38(%rbx)
je 0x7d48
movl $0x2, 0x38(%rbx)
cmpl $0x5, 0x38(%rbx)
jne 0x7d84
movl $0x10, %edi
callq 0x35a0
movq %rax, %r14
movq %rbx, (%rax)
movl $0x1, 0x8(%rax)
movq 0x28(%rbx), %rax
movq 0x60(%rax), %rdi
callq 0x85bc
leaq -0x1a1f(%rip), %rsi     # 0x635a
movq %rax, %rdi
movq %r14, %rdx
callq 0x920d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3310
nop