LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/teodorst[P]app-huffman/huffman.c
// Function: decode_bytes_for_chunk
int decode_bytes_for_chunk(node_t *root, char *buffer, unsigned long long int nbits, node_t **remainig_node, char* out_buffer) {

    int i, j;
    node_t *node = *remainig_node;
    unsigned long long int nbytes = nbits % 8 == 0 ? nbits/8 : nbits/8 + 1;
    unsigned long long int count_bits = 0L;
    int bit;
    int length = 0;

    for (i = 0; i < nbytes; i++) {
        for (j = 7 ; j >= 0 && count_bits < nbits; j--) {

            /* get bit */
            bit = (buffer[i] >> j) & 1;

            if (bit == 0) {
                /* go left in tree*/
                node = node->left;
            } else {
                /* go right in tree */
                node = node->right;
            }

            /* depth search from the root */
            if (node->left == NULL && node->right == NULL) {
                out_buffer[length ++] = node->data;
                node = root;
            }

            count_bits ++;
        }
    }

    *remainig_node = node;
    return length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rcx), %r9
movl %edx, %eax
andl $0x7, %eax
movq %rdx, %r10
shrq $0x3, %r10
cmpq $0x1, %rax
sbbq $-0x1, %r10
xorl %r11d, %r11d
movl $0x7, %ebx
xorl %r14d, %r14d
xorl %eax, %eax
cmpq %r10, %r11
je 0x1906
movl %ebx, %ebp
testl %ebp, %ebp
js 0x1901
cmpq %rdx, %r14
jae 0x1901
movsbl (%rsi,%r11), %r15d
xorl %r12d, %r12d
btl %ebp, %r15d
setb %r12b
movq 0x8(%r9,%r12,8), %r9
cmpq $0x0, 0x8(%r9)
jne 0x18fa
cmpq $0x0, 0x10(%r9)
jne 0x18fa
movb 0x4(%r9), %r9b
movslq %eax, %r15
incl %eax
movb %r9b, (%r8,%r15)
movq %rdi, %r9
incq %r14
decl %ebp
jmp 0x18be
incq %r11
jmp 0x18b7
movq %r9, (%rcx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/teodorst[P]app-huffman/huffman.c
// Function: decode_bytes_for_chunk_pthreads
int decode_bytes_for_chunk_pthreads(node_t *root, char *buffer, unsigned long long int nbits, char* out_buffer) {

    int i, j;
    node_t *node = root;
    unsigned long long int nbytes = nbits % 8 == 0 ? nbits/8 : nbits/8 + 1;
    unsigned long long int count_bits = 0L;
    int bit;
    int length = 0;
    for (i = 0; i < nbytes; i++) {
        for (j = 7 ; j >= 0 && count_bits < nbits; j--) {

            /* get bit */
            bit = (buffer[i] >> j) & 1;

            if (bit == 0) {
                /* go left in tree*/
                node = node->left;

            } else {
                /* go right in tree */
                node = node->right;
            }

            /* depth search from the root */
            if (node->left == NULL && node->right == NULL) {
                out_buffer[length ++] = node->data;
                node = root;
            }

            count_bits ++;
        }
    }

    return length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %eax
andl $0x7, %eax
movq %rdx, %r8
shrq $0x3, %r8
cmpq $0x1, %rax
sbbq $-0x1, %r8
xorl %r9d, %r9d
movl $0x7, %r10d
movq %rdi, %rbx
xorl %r11d, %r11d
xorl %eax, %eax
cmpq %r8, %r9
je 0x198c
movl %r10d, %ebp
testl %ebp, %ebp
js 0x1987
cmpq %rdx, %r11
jae 0x1987
movsbl (%rsi,%r9), %r14d
xorl %r15d, %r15d
btl %ebp, %r14d
setb %r15b
movq 0x8(%rbx,%r15,8), %rbx
cmpq $0x0, 0x8(%rbx)
jne 0x1980
cmpq $0x0, 0x10(%rbx)
jne 0x1980
movb 0x4(%rbx), %bl
movslq %eax, %r14
incl %eax
movb %bl, (%rcx,%r14)
movq %rdi, %rbx
incq %r11
decl %ebp
jmp 0x1945
incq %r9
jmp 0x193d
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/teodorst[P]app-huffman/huffman.c
// Function: write_codification_for_input_file
unsigned long long int write_codification_for_input_file(char **codification, FILE* input_fp, FILE* output_fp) {
    size_t nread = 0;
    int chunk_size = 0;
    char *buf = calloc(CHUNK, sizeof(char));
    char *output_buffer = calloc(CHUNK, sizeof(char));
    char output_char = 0;
    int output_buffer_contor = 0;
    int contor = 7;
    unsigned long long int bits = 0L;

    while((nread = fread(buf, 1, CHUNK, input_fp)) > 0) {
        chunk_size = CHUNK > nread ? nread : CHUNK;
        write_codification_for_chunk(buf, chunk_size, codification, output_buffer, &output_buffer_contor, &output_char, &contor, &bits);
        fwrite(output_buffer, 1, output_buffer_contor, output_fp);
        memset(buf, '\0', CHUNK);
        memset(output_buffer, '\0', CHUNK);
        output_buffer_contor = 0;
    }

    // if there are some bits to write in the last byte.
    if (contor > 7 && contor > -1 ) {
        fwrite(&output_char, 1, 1, output_fp);
    }

    return bits;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x18(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movl $0x6400000, %ebx        # imm = 0x6400000
pushq $0x1
popq %r12
movl $0x6400000, %edi        # imm = 0x6400000
movq %r12, %rsi
callq 0x10e0
movq %rax, %r13
movl $0x6400000, %edi        # imm = 0x6400000
movq %r12, %rsi
callq 0x10e0
movq %rax, %rbp
leaq 0x10(%rsp), %rax
andl $0x0, (%rax)
leaq 0xf(%rsp), %rax
movb $0x0, (%rax)
leaq 0x14(%rsp), %rax
movl $0x7, (%rax)
leaq 0x20(%rsp), %rax
andq $0x0, (%rax)
movl $0x6400000, %edx        # imm = 0x6400000
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0x1070
testq %rax, %rax
je 0x1c0e
cmpq %rbx, %rax
cmovaeq %rbx, %rax
movq %r13, %rdi
movl %eax, %esi
movq %r15, %rdx
movq %rbp, %rcx
leaq 0x10(%rsp), %r8
leaq 0xf(%rsp), %r9
leaq 0x20(%rsp), %rax
pushq %rax
leaq 0x1c(%rsp), %rax
pushq %rax
callq 0x1c38
popq %rax
popq %rcx
movslq 0x10(%rsp), %rdx
movq %rbp, %rdi
movq %r12, %rsi
movq 0x18(%rsp), %rcx
callq 0x11a0
movl $0x6400000, %edx        # imm = 0x6400000
movq %r13, %rdi
xorl %esi, %esi
callq 0x10b0
movl $0x6400000, %edx        # imm = 0x6400000
movq %rbp, %rdi
xorl %esi, %esi
callq 0x10b0
andl $0x0, 0x10(%rsp)
jmp 0x1b8a
cmpl $0x8, 0x14(%rsp)
jl 0x1c24
movsbl 0xf(%rsp), %edi
movq 0x18(%rsp), %rsi
callq 0x10d0
movq 0x20(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/teodorst[P]app-huffman/huffman.c
// Function: write_codification_for_chunk
void write_codification_for_chunk(char *chunk, int chunk_size, char **codification, char* output_buffer,
    int *output_buffer_contor, char* output_char, int* contor, unsigned long long int* bits) {
    int i, j;

    for (i = 0; i < chunk_size; i ++) {
        char *codif = codification[(unsigned char)chunk[i]];
        for (j = 0; j < strlen(codif); j ++) {
            *output_char |= (codif[j] - 48) << *contor;
            *contor -= 1;
            *bits += 1;
            if (*contor == -1) {
                output_buffer[*output_buffer_contor] = *output_char;
                *contor = 7;
                *output_char = 0;
                *output_buffer_contor += 1;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, 0x20(%rsp)
movq %rdx, 0x8(%rsp)
movq %rdi, (%rsp)
movq 0x68(%rsp), %rbp
movq 0x60(%rsp), %r13
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
movq %rsi, 0x10(%rsp)
cmpq 0x10(%rsp), %rcx
je 0x1ce9
movq (%rsp), %rax
movq %rcx, 0x18(%rsp)
movzbl (%rax,%rcx), %eax
movq 0x8(%rsp), %rcx
movq (%rcx,%rax,8), %r12
xorl %r15d, %r15d
movq %r12, %rdi
callq 0x1090
cmpq %r15, %rax
jbe 0x1cdf
movzbl (%r12,%r15), %eax
addl $0xd0, %eax
movb (%r13), %cl
shll %cl, %eax
orb %al, (%rbx)
subl $0x1, (%r13)
setae %al
incq (%rbp)
testb %al, %al
jne 0x1cda
movb (%rbx), %al
movslq (%r14), %rcx
movq 0x20(%rsp), %rdx
movb %al, (%rdx,%rcx)
movl $0x7, (%r13)
movb $0x0, (%rbx)
incl (%r14)
incq %r15
jmp 0x1c90
movq 0x18(%rsp), %rcx
incq %rcx
jmp 0x1c70
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/teodorst[P]app-huffman/huffman.c
// Function: write_codification_for_chunk_pthreads
void write_codification_for_chunk_pthreads(char *chunk, int index, int upper_limit, char **codification,
    char *output_buffer, int *output_buffer_contor, unsigned long long int *bits) {

    *output_buffer_contor = index;
    *bits = 0;
    int output_buffer_contor_static = index;
    int contor = 7;
    int i, j;
    char output_char = 0;
    char *codif = NULL;
    int codif_size = 0;

    for (i = index; i < upper_limit; i ++) {
        codif = codification[(unsigned char)chunk[i]];
        codif_size = strlen(codif);
        for (j = 0; j < codif_size; j ++) {
            output_char |= (codif[j] - 48) << contor;
            contor --;
            *bits += 1;

            if (contor == -1) {
                output_buffer[output_buffer_contor_static++] = output_char;
                output_char = 0;
                contor = 7;
            }
        }
    }

    if (contor > -1 && contor < 7) {
        output_buffer[output_buffer_contor_static] = output_char;
        output_buffer_contor_static += 1;
    }

    *output_buffer_contor = output_buffer_contor_static - index;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r14
movq %rcx, 0x20(%rsp)
movq 0x70(%rsp), %r15
movq %r9, 0x10(%rsp)
movl %esi, (%r9)
andq $0x0, (%r15)
movq %rdi, 0x18(%rsp)
movslq %esi, %rcx
movslq %edx, %rax
movq %rax, 0x28(%rsp)
pushq $0x7
popq %r13
movl %esi, 0xc(%rsp)
movl %esi, %ebp
xorl %r12d, %r12d
cmpq 0x28(%rsp), %rcx
jge 0x1daf
movq 0x18(%rsp), %rax
movq %rcx, 0x30(%rsp)
movzbl (%rax,%rcx), %eax
movq 0x20(%rsp), %rcx
movq (%rcx,%rax,8), %rbx
movq %rbx, %rdi
callq 0x1090
pushq $0x7
popq %rdi
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
xorl %edx, %edx
cmpq %rdx, %rax
je 0x1da5
movzbl (%rbx,%rdx), %esi
addl $0xd0, %esi
movl %r13d, %ecx
shll %cl, %esi
orb %sil, %r12b
incq (%r15)
subl $0x1, %r13d
jae 0x1da0
movslq %ebp, %rcx
incl %ebp
movb %r12b, (%r14,%rcx)
xorl %r12d, %r12d
movl %edi, %r13d
incq %rdx
jmp 0x1d71
movq 0x30(%rsp), %rcx
incq %rcx
jmp 0x1d3c
cmpl $0x6, %r13d
ja 0x1dbe
movslq %ebp, %rbp
movb %r12b, (%r14,%rbp)
incl %ebp
subl 0xc(%rsp), %ebp
movq 0x10(%rsp), %rax
movl %ebp, (%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/teodorst[P]app-huffman/huffman.c
// Function: write_codification
void write_codification(FILE* codification_fp, char **codification) {
    int i, codification_length = 0;
    char *output_string = (char*) calloc(MAX_BITS_CODE + 5, sizeof(char));

    // write codification matrix length
    for(i = 0; i < 128; i ++) {
        if (codification[i] != NULL) {
            codification_length ++;
        }
    }

    sprintf(output_string, "%d\n", codification_length);
    fwrite(output_string, 1, strlen(output_string), codification_fp);
    memset(output_string, '\0', MAX_BITS_CODE + 5);

    for (i = 0; i < MAX_BITS_CODE; i ++) {
        if (codification[i] != NULL) {
            sprintf(output_string, "%c : %s\n", i, codification[i]);
            fwrite(output_string, strlen(codification[i]) + 5, 1, codification_fp);
            memset(output_string, 0, MAX_BITS_CODE + 5);
        }
    }
    free(output_string);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %rsi
movl $0x84, %edi
callq 0x10e0
movq %rax, %r15
xorl %eax, %eax
xorl %edx, %edx
cmpq $0x80, %rax
je 0x1e3c
cmpq $0x1, (%rbx,%rax,8)
sbbl $-0x1, %edx
incq %rax
jmp 0x1e27
leaq 0x12a5(%rip), %rsi      # 0x30e8
movq %r15, %rdi
xorl %eax, %eax
callq 0x1180
movq %r15, %rdi
callq 0x1090
pushq $0x1
popq %r12
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x11a0
movl $0x84, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x10b0
leaq 0x126c(%rip), %r13      # 0x30ec
xorl %ebp, %ebp
cmpq $0x7f, %rbp
je 0x1ecf
movq (%rbx,%rbp,8), %rcx
testq %rcx, %rcx
je 0x1eca
movq %r15, %rdi
movq %r13, %rsi
movl %ebp, %edx
xorl %eax, %eax
callq 0x1180
movq (%rbx,%rbp,8), %rdi
callq 0x1090
leaq 0x5(%rax), %rsi
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x11a0
movl $0x84, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x10b0
incq %rbp
jmp 0x1e82
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O2/teodorst[P]app-huffman/huffman.c
// Function: write_metadata_file_pthreads
void write_metadata_file_pthreads(FILE* codification_fp, char **codification, size_t size, int num_threads, unsigned long long int* nbits_buffer, int *output_buffer_contors) {
    // write codification
    write_codification(codification_fp, codification);

    // write number of bits
    fprintf(codification_fp, "%d\n%lu\n", num_threads, size);
    int i;
    for (i = 0; i < num_threads; i ++) {
        fprintf(codification_fp, "%llu %d\n", nbits_buffer[i], output_buffer_contors[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %r14
movl %ecx, %r15d
movq %rdx, %r13
movq %rdi, %r12
callq 0x1e02
leaq 0x11d0(%rip), %rsi      # 0x30db
xorl %ebp, %ebp
movq %r12, %rdi
movl %r15d, %edx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1100
testl %r15d, %r15d
cmovlel %ebp, %r15d
leaq 0x11b8(%rip), %r13      # 0x30e3
xorl %ebp, %ebp
cmpq %rbp, %r15
je 0x1f4b
movq (%r14,%rbp,8), %rdx
movl (%rbx,%rbp,4), %ecx
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1100
incq %rbp
jmp 0x1f2d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x8
popq %rsi
movl $0x80, %edi
callq 0x10e0
movq %rax, %rbx
leaq 0x8(%rsp), %r12
andq $0x0, (%r12)
leaq 0x1171(%rip), %rsi      # 0x3102
leaq 0x14(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1050
movq %r15, %rdi
callq 0x10c0
leaq 0x20(%rsp), %r13
leaq 0x7(%rsp), %r14
xorl %ebp, %ebp
cmpl 0x14(%rsp), %ebp
jge 0x203f
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1170
movq 0x8(%rsp), %rcx
cmpq $0x1, %rax
jne 0x2006
movb (%rcx), %al
movb %al, 0x7(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1170
cmpq $-0x1, %rax
je 0x2038
movq 0x8(%rsp), %rcx
movb $0x0, -0x1(%rcx,%rax)
movq 0x8(%rsp), %rdi
addq $0x3, %rdi
jmp 0x202a
movb $0x0, -0x1(%rcx,%rax)
movq 0x8(%rsp), %rdi
leaq 0x10de(%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
jmp 0x1fb4
leaq 0x10b2(%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_O2/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, %r15
pushq $0x8
popq %rsi
movl $0x80, %edi
callq 0x10e0
movq %rax, 0x20(%rsp)
leaq 0x10(%rsp), %rbp
andq $0x0, (%rbp)
leaq 0x1052(%rip), %rsi      # 0x3102
leaq 0x1c(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1050
movq %r15, %rdi
callq 0x10c0
leaq 0x30(%rsp), %r13
xorl %r12d, %r12d
cmpl 0x1c(%rsp), %r12d
jge 0x2163
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1170
movq 0x10(%rsp), %rcx
cmpq $0x1, %rax
jne 0x2122
movb (%rcx), %al
movb %al, 0xf(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1170
cmpq $-0x1, %rax
je 0x215b
movq 0x10(%rsp), %rcx
movb $0x0, -0x1(%rcx,%rax)
movq 0x10(%rsp), %rdi
addq $0x3, %rdi
jmp 0x2148
movb $0x0, -0x1(%rcx,%rax)
movq 0x10(%rsp), %rdi
leaq 0xfc2(%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 %r12d
jmp 0x20cf
leaq 0x18(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0xf69(%rip), %rsi       # 0x30db
movq %r15, %rdi
movq 0x28(%rsp), %rcx
xorl %eax, %eax
callq 0x1050
leaq 0xf75(%rip), %r13       # 0x30fd
xorl %r12d, %r12d
movslq 0x18(%rsp), %rax
cmpq %rax, %r12
jge 0x21b5
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1050
incq %r12
addq $0x4, %rbx
addq $0x8, %r14
jmp 0x218b
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_O2/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 0x2207
movb $0x30, (%r15,%r12)
movq 0x8(%r14), %rdi
leal 0x1(%r12), %edx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x21d3
cmpq $0x0, 0x10(%r14)
je 0x2227
movb $0x31, (%r15,%r12)
movq 0x10(%r14), %rdi
leal 0x1(%r12), %edx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x21d3
cmpq $0x0, 0x8(%r14)
jne 0x224b
cmpq $0x0, 0x10(%r14)
jne 0x224b
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_O2/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 0x2281
movb $0x30, (%rbx,%r15)
movq 0x8(%r14), %rdi
leal 0x1(%r15), %edx
movq %rbx, %rsi
callq 0x2257
cmpq $0x0, 0x10(%r14)
je 0x229d
movb $0x31, (%rbx,%r15)
movq 0x10(%r14), %rdi
leal 0x1(%r15), %edx
movq %rbx, %rsi
callq 0x2257
cmpq $0x0, 0x8(%r14)
jne 0x22ab
cmpq $0x0, 0x10(%r14)
je 0x22b1
popq %rbx
popq %r14
popq %r15
retq
movb $0x0, (%rbx,%r15)
movsbl 0x4(%r14), %esi
leaq 0xe2a(%rip), %rdi       # 0x30ec
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x23
popq %rbp
movl %ebp, %edi
callq 0x1874
movq %rax, (%rsp)
xorl %r13d, %r13d
cmpq $0x80, %r13
je 0x2364
movq (%rbx,%r13,8), %rdi
testq %rdi, %rdi
je 0x235f
callq 0x1090
movq %rax, %r15
testl %r15d, %r15d
movl $0x0, %eax
cmovlel %eax, %r15d
xorl %r12d, %r12d
movq (%rsp), %r14
cmpq %r12, %r15
je 0x235b
movq (%rbx,%r13,8), %rax
cmpb $0x30, (%rax,%r12)
jne 0x233c
movq 0x8(%r14), %rax
testq %rax, %rax
jne 0x2353
addq $0x8, %r14
jmp 0x2349
movq 0x10(%r14), %rax
testq %rax, %rax
jne 0x2353
addq $0x10, %r14
movl %ebp, %edi
callq 0x1874
movq %rax, (%r14)
incq %r12
movq %rax, %r14
jmp 0x231d
movb %r13b, 0x4(%r14)
incq %r13
jmp 0x22f0
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %eax, %eax
callq 0x1608
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1734
pushq $0x18
popq %r14
cmpl $0x2, 0x8(%rbx)
jl 0x23e2
movq %r14, %rdi
callq 0x1120
movq %rax, %r15
movq %rbx, %rdi
callq 0x1688
movq %rax, %r12
movq %rbx, %rdi
callq 0x1688
movl (%rax), %ecx
addl (%r12), %ecx
movl %ecx, (%r15)
movb $0x23, 0x4(%r15)
movq %r12, 0x8(%r15)
movq %rax, 0x10(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1613
jmp 0x239b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1688
// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x121e
leaq 0x7(%rsp), %rdi
movzbl (%rdi), %r14d
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x121e
leaq 0x7(%rsp), %rdi
movzbl (%rdi), %r15d
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x121e
leaq 0x7(%rsp), %rdi
movzbl (%rdi), %r12d
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %rbx, %rcx
callq 0x1050
testq %rax, %rax
je 0x121e
shll $0x8, %r15d
orq %r14, %r15
shll $0x10, %r12d
orq %r15, %r12
movzbl 0x7(%rsp), %eax
shll $0x18, %eax
orq %r12, %rax
jmp 0x1220
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xdcd(%rip), %rdi       # 0x2004
xorl %eax, %eax
callq 0x1060
leaq 0xe65(%rip), %rdi       # 0x20aa
callq 0x1040
leaq 0xe8e(%rip), %rdi       # 0x20df
callq 0x1040
leaq 0xeb6(%rip), %rdi       # 0x2113
callq 0x1040
leaq 0xee8(%rip), %rdi       # 0x2151
callq 0x1040
leaq 0xf22(%rip), %rdi       # 0x2197
callq 0x1040
leaq 0xf57(%rip), %rdi       # 0x21d8
callq 0x1040
leaq 0xf7e(%rip), %rdi       # 0x220b
popq %rax
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
movslq %edx, %r8
xorl %eax, %eax
leaq 0x6601(%rip), %rcx      # 0xa020
xorl %r9d, %r9d
cmpq %r8, %r9
jge 0x3ae0
movzbl (%rdi,%r9), %r10d
shrl $0x2, %r10d
movb (%r10,%rcx), %r10b
movb %r10b, (%rsi,%rax)
movzbl (%rdi,%r9), %r11d
shll $0x4, %r11d
andl $0x30, %r11d
leaq 0x1(%r9), %r10
cmpl %edx, %r10d
jge 0x3abc
movzbl 0x1(%rdi,%r9), %ebx
shrl $0x4, %ebx
movzbl %r11b, %r11d
orq %rbx, %r11
movb (%r11,%rcx), %r11b
movb %r11b, 0x1(%rsi,%rax)
movzbl 0x1(%rdi,%r9), %r11d
shll $0x2, %r11d
andl $0x3c, %r11d
incq %r10
cmpl %edx, %r10d
jge 0x3ad0
movzbl 0x2(%rdi,%r9), %ebx
shrl $0x6, %ebx
movzbl %r11b, %r11d
orq %rbx, %r11
movb (%r11,%rcx), %r11b
movb %r11b, 0x2(%rsi,%rax)
movzbl 0x2(%rdi,%r9), %r9d
andl $0x3f, %r9d
movb (%r9,%rcx), %r9b
movb %r9b, 0x3(%rsi,%rax)
addq $0x4, %rax
incq %r10
movq %r10, %r9
jmp 0x3a22
movb (%r11,%rcx), %cl
movb %cl, 0x1(%rsi,%rax)
movw $0x3d3d, 0x2(%rsi,%rax) # imm = 0x3D3D
addl $0x4, %eax
jmp 0x3ae0
movb (%r11,%rcx), %cl
movb %cl, 0x2(%rsi,%rax)
movb $0x3d, 0x3(%rsi,%rax)
addl $0x4, %eax
cltq
movb $0x0, (%rsi,%rax)
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %eax, %eax
leaq 0x6523(%rip), %rcx      # 0xa020
xorl %edx, %edx
movb (%rdi,%rdx), %r9b
testb %r9b, %r9b
je 0x3bf7
movb $-0x1, %r8b
xorl %r10d, %r10d
cmpq $0x40, %r10
je 0x3b29
cmpb %r9b, (%r10,%rcx)
movzbl %r8b, %r8d
cmovel %r10d, %r8d
incq %r10
jmp 0x3b12
movb 0x1(%rdi,%rdx), %r10b
movb $-0x1, %r9b
xorl %r11d, %r11d
cmpq $0x40, %r11
je 0x3b4b
cmpb %r10b, (%r11,%rcx)
movzbl %r9b, %r9d
cmovel %r11d, %r9d
incq %r11
jmp 0x3b34
movq %rdx, %r11
orq $0x2, %r11
movb 0x2(%rdi,%rdx), %bl
movb $-0x1, %r10b
xorl %r14d, %r14d
cmpq $0x40, %r14
je 0x3b73
cmpb %bl, (%r14,%rcx)
movzbl %r10b, %r10d
cmovel %r14d, %r10d
incq %r14
jmp 0x3b5c
movq %rdx, %r14
orq $0x3, %r14
movb 0x3(%rdi,%rdx), %r15b
movb $-0x1, %bl
xorl %r12d, %r12d
cmpq $0x40, %r12
je 0x3b9a
cmpb %r15b, (%r12,%rcx)
movzbl %bl, %ebx
cmovel %r12d, %ebx
incq %r12
jmp 0x3b84
shlb $0x2, %r8b
movl %r9d, %r15d
shrb $0x4, %r15b
andb $0x3, %r15b
orb %r8b, %r15b
movb %r15b, (%rsi,%rax)
cmpb $0x3d, (%rdi,%r11)
je 0x3bf0
shlb $0x4, %r9b
movl %r10d, %r8d
shrb $0x2, %r8b
andb $0xf, %r8b
orb %r9b, %r8b
movb %r8b, 0x1(%rsi,%rax)
cmpb $0x3d, (%rdi,%r14)
je 0x3bf4
shlb $0x6, %r10b
andb $0x3f, %bl
orb %r10b, %bl
movb %bl, 0x2(%rsi,%rax)
addq $0x3, %rax
addq $0x4, %rdx
jmp 0x3aff
incl %eax
jmp 0x3bf7
addl $0x2, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15d, %r15d
xorl %edi, %edi
callq 0x33e0
movl %eax, %edi
callq 0x3410
movl %r14d, %r14d
movl $0x80, %r12d
cmpq %r15, %r14
je 0x3c44
callq 0x3120
testb %al, %al
cmovel %r12d, %eax
movb %al, (%rbx,%r15)
incq %r15
jmp 0x3c2b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3d46
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r15
leal 0x25(%r12), %r13d
leal 0x2f(%r12), %esi
pushq $0x1
popq %rdi
callq 0x32c0
movq %rax, %r14
movl %r12d, %r12d
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3360
movabsq $0x31314235384344, %rax # imm = 0x31314235384344
movq %rax, 0x1d(%r14,%r12)
movaps 0x6384(%rip), %xmm0     # 0xa070
movups %xmm0, (%r14,%r12)
movaps 0x6388(%rip), %xmm0     # 0xa080
movups %xmm0, 0x10(%r14,%r12)
movb $0x0, (%r14,%r13)
movq %r14, %rdi
callq 0x39dc
movq %rax, %r15
movq %rax, %rdi
callq 0x31f0
movq %r15, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x3a0e
movl %eax, %ebx
movq %r15, %rdi
callq 0x3520
movq %r14, %rdi
callq 0x3520
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_O2/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 0x3260
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
callq 0x3c90
cmpl %r12d, %eax
jne 0x3dec
leaq -0x130(%rbp), %rdi
movq -0x30(%rbp), %rbx
movq %rbx, %rsi
callq 0x35f0
testl %eax, %eax
je 0x3e39
leaq 0x63f3(%rip), %rdi      # 0xa1ab
leaq 0x63f7(%rip), %rsi      # 0xa1b6
leaq 0x6408(%rip), %rdx      # 0xa1ce
movl $0x21c, %ecx            # imm = 0x21C
xorl %eax, %eax
callq 0x3080
leaq 0x6434(%rip), %rdi      # 0xa20d
leaq -0x130(%rbp), %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3080
jmp 0x3e29
leaq 0x63b8(%rip), %rdi      # 0xa1ab
leaq 0x63bc(%rip), %rsi      # 0xa1b6
leaq 0x63cd(%rip), %rdx      # 0xa1ce
movl $0x217, %ecx            # imm = 0x217
xorl %eax, %eax
callq 0x3080
leaq 0x63c9(%rip), %rdi      # 0xa1dd
leaq -0x130(%rbp), %rdx
movq %r14, %rsi
movq -0x30(%rbp), %rcx
xorl %eax, %eax
callq 0x3080
leaq 0x66ae(%rip), %rdi      # 0xa4de
callq 0x36b0
pushq $-0x1
popq %r15
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_O2/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 0x3260
leaq -0x130(%rbp), %r15
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x3260
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x3c90
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x33e0
movq %r12, %rdi
callq 0x3310
leaq 0x6358(%rip), %rdx      # 0xa239
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdi
movq %rax, %rcx
callq 0x3350
leaq 0x6228(%rip), %rsi      # 0xa120
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_O2/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
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divl %ecx
leaq -0x10(%rbp), %r8
movq %rax, (%r8)
imull $0x3e8, %edx, %eax      # imm = 0x3E8
movq %rax, 0x8(%r8)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3400
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x1
popq %r14
testl %edx, %edx
je 0x4911
movq %rdi, %rbx
leaq 0x5bdb(%rip), %rax      # 0xa456
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3100
testq %rax, %rax
je 0x4911
movq %rax, %r15
addq $0x13, %r15
leaq -0x220(%rbp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x3260
leaq 0x5a4b(%rip), %rsi      # 0xa2fe
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3420
movq %r12, %rdi
callq 0x31f0
movq %rax, %r15
testl %r15d, %r15d
jle 0x4911
leaq -0x620(%rbp), %r14
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x3260
leaq -0x220(%rbp), %rdi
movl %r15d, %esi
movq %r14, %rdx
callq 0x3e6f
movq %r14, %rdi
callq 0x31f0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3270
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_O2/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, %r14d
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
leal 0x80(%r15), %r13d
pushq $0x1
popq %rdi
movq %r13, %rsi
callq 0x32c0
movq %rax, %rbx
movq %r12, %rdi
movl %r15d, %esi
movq %rax, %rdx
movl %r13d, %ecx
movl %r14d, %r8d
movl -0x2c(%rbp), %r9d
callq 0x3f1a
movl %eax, %edx
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x3270
movl %eax, %r14d
movq %rbx, %rdi
callq 0x3520
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x3650
movq 0x70(%rbx), %r14
movq %rbx, %rdi
callq 0x3320
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5926
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpq $0x3, %rax
ja 0x591d
leaq 0x4c71(%rip), %rcx      # 0xa540
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0x90(%rax), %rax
jmp 0x5916
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0xa0(%rax), %rax
jmp 0x5916
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0xa8(%rax), %rax
jmp 0x5916
movq (%rbx), %rdi
movq 0x28(%rdi), %rax
movq 0x98(%rax), %rax
testq %rax, %rax
je 0x591d
callq *%rax
movq %rbx, %rdi
callq 0x3520
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x5ec5
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3520
movq 0x28(%rbx), %rdi
callq 0x3520
movq 0x10(%rbx), %rdi
callq 0x3520
movq 0x18(%rbx), %rdi
callq 0x3520
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x5ea8
movq %r14, %rdi
callq 0x74d4
pushq $0x30
popq %rsi
movq %r14, %rdi
callq 0x3470
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
andq $0x0, 0x30(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
retq