LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x230e
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movslq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x1070
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jae 0x22fe
movq -0x40(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %edx
subl $0x30, %edx
movq 0x10(%rbp), %rax
movl (%rax), %ecx
shll %cl, %edx
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
movq 0x10(%rbp), %rax
movl (%rax), %ecx
subl $0x1, %ecx
movl %ecx, (%rax)
movq 0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x10(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x22ee
movq -0x30(%rbp), %rax
movb (%rax), %dl
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movslq (%rcx), %rcx
movb %dl, (%rax,%rcx)
movq 0x10(%rbp), %rax
movl $0x7, (%rax)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x22f0
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x2259
jmp 0x2300
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x222e
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl $0x7, -0x30(%rbp)
movb $0x0, -0x39(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x2437
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq -0x34(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x1070
movl %eax, -0x4c(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x2427
movq -0x48(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsbl (%rax,%rcx), %eax
subl $0x30, %eax
movl -0x30(%rbp), %ecx
shll %cl, %eax
movl %eax, %ecx
movsbl -0x39(%rbp), %eax
orl %ecx, %eax
movb %al, -0x39(%rbp)
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movq 0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $-0x1, -0x30(%rbp)
jne 0x241a
movb -0x39(%rbp), %dl
movq -0x20(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x2c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movb $0x0, -0x39(%rbp)
movl $0x7, -0x30(%rbp)
jmp 0x241c
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x23b3
jmp 0x2429
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x237c
cmpl $-0x1, -0x30(%rbp)
jle 0x245a
cmpl $0x7, -0x30(%rbp)
jge 0x245a
movb -0x39(%rbp), %dl
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
subl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x84, %edi
movl $0x1, %esi
callq 0x10b0
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x80, -0x14(%rbp)
jge 0x250f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x2502
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2504
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x24e1
movq -0x20(%rbp), %rdi
movl -0x18(%rbp), %edx
leaq 0xbb1(%rip), %rsi       # 0x30ce
movb $0x0, %al
callq 0x1150
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1070
movq -0x28(%rbp), %rdi
movq %rax, %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x1170
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x84, %edx
callq 0x1090
movl $0x0, -0x14(%rbp)
cmpl $0x7f, -0x14(%rbp)
jge 0x25ed
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x25dd
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xb3e(%rip), %rsi       # 0x30d2
movb $0x0, %al
callq 0x1150
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1070
movq -0x30(%rbp), %rdi
movq %rax, %rsi
addq $0x5, %rsi
movq -0x8(%rbp), %rcx
movl $0x1, %edx
callq 0x1170
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x84, %edx
callq 0x1090
jmp 0x25df
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2561
movq -0x20(%rbp), %rdi
callq 0x1030
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x24b0
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rcx
leaq 0xa83(%rip), %rsi       # 0x30c1
movb $0x0, %al
callq 0x10d0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2688
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x30(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq 0xa53(%rip), %rsi       # 0x30c9
movb $0x0, %al
callq 0x10d0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x264c
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x80, %edi
movl $0x8, %esi
callq 0x10b0
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xa22(%rip), %rsi       # 0x30e8
leaq -0x3c(%rbp), %rdx
movb $0x0, %al
callq 0x1040
movq -0x8(%rbp), %rdi
callq 0x10a0
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x27ae
movq -0x8(%rbp), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1140
movq %rax, -0x28(%rbp)
cmpq $0x1, -0x28(%rbp)
jne 0x275c
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movq -0x8(%rbp), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1140
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
je 0x275a
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
callq 0x1180
movq %rax, %rdx
movq -0x18(%rbp), %rax
movzbl -0x29(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x279e
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rdi
leaq 0x964(%rip), %rsi       # 0x30db
leaq -0x29(%rbp), %rdx
movb $0x0, %al
callq 0x1100
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
callq 0x1180
movq %rax, %rdx
movq -0x18(%rbp), %rax
movzbl -0x29(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x27a0
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x26e1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x921(%rip), %rsi       # 0x30de
movb $0x0, %al
callq 0x1040
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x29d9
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x30, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rcx
callq 0x2990
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2a0b
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x31, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
movq -0x20(%rbp), %rcx
callq 0x2990
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2a49
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2a49
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rdi
callq 0x1180
movq %rax, %rdx
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
movq %rdx, (%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2a91
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x30, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
callq 0x2a50
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2abf
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x31, (%rax,%rcx)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
callq 0x2a50
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2afb
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2afb
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x8(%rbp), %rax
movsbl 0x4(%rax), %esi
movq -0x10(%rbp), %rdx
leaq 0x5de(%rip), %rdi       # 0x30d2
movb $0x0, %al
callq 0x1080
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x23, %edi
callq 0x1bf0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x80, -0xc(%rbp)
jge 0x2c35
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x2c25
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1070
movl %eax, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x2c19
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x30, %eax
jne 0x2bdd
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2bcf
movl $0x23, %edi
callq 0x1bf0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2c09
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2bfd
movl $0x23, %edi
callq 0x1bf0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2c0b
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2b8a
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x4(%rax)
jmp 0x2c27
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2b40
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movb $0x0, %al
callq 0x16f0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x19a0
movq -0x10(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jle 0x2cd7
movl $0x18, %edi
callq 0x10f0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1850
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1850
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movq -0x28(%rbp), %rax
addl (%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movb $0x23, 0x4(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1720
jmp 0x2c64
movq -0x10(%rbp), %rdi
callq 0x1850
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x11(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1030
cmpq $0x0, %rax
jne 0x11a4
movq $0x0, -0x8(%rbp)
jmp 0x128e
movzbl -0x11(%rbp), %eax
movq %rax, -0x28(%rbp)
movq $0x100, -0x20(%rbp)     # imm = 0x100
movq -0x10(%rbp), %rcx
leaq -0x11(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1030
cmpq $0x0, %rax
jne 0x11dc
movq $0x0, -0x8(%rbp)
jmp 0x128e
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
imulq %rcx, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x11(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1030
cmpq $0x0, %rax
jne 0x1221
movq $0x0, -0x8(%rbp)
jmp 0x128e
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
imulq %rcx, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
leaq -0x11(%rbp), %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x1030
cmpq $0x0, %rax
jne 0x1266
movq $0x0, -0x8(%rbp)
jmp 0x128e
movq -0x20(%rbp), %rax
movzbl -0x11(%rbp), %ecx
imulq %rcx, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
shlq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0xd4a(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1040
leaq 0xd5e(%rip), %rdi       # 0x2026
movb $0x0, %al
callq 0x1040
leaq 0xd86(%rip), %rdi       # 0x205c
movb $0x0, %al
callq 0x1040
leaq 0xdad(%rip), %rdi       # 0x2091
movb $0x0, %al
callq 0x1040
leaq 0xdde(%rip), %rdi       # 0x20d0
movb $0x0, %al
callq 0x1040
leaq 0xe17(%rip), %rdi       # 0x2117
movb $0x0, %al
callq 0x1040
leaq 0xe4b(%rip), %rdi       # 0x2159
movb $0x0, %al
callq 0x1040
leaq 0xe71(%rip), %rdi       # 0x218d
movb $0x0, %al
callq 0x1040
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x4480
movl %eax, %edi
callq 0x44b0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x50a5
callq 0x4140
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
movb %dl, %al
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x508d
movb $-0x80, -0x11(%rbp)
movb -0x11(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x5066
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x60(%rbp), %rdi
leaq 0xef42(%rip), %rsi      # 0x14060
movl $0x25, %edx
callq 0x43f0
cmpq $0x0, -0x10(%rbp)
jne 0x513b
movl $0x0, -0x4(%rbp)
jmp 0x51f7
movl $0x25, -0x64(%rbp)
movl -0x14(%rbp), %eax
addl -0x64(%rbp), %eax
addl $0xa, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x0, %rsi
movl $0x1, %edi
callq 0x4320
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %eax
addl -0x64(%rbp), %eax
addl $0xa, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x4290
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x43f0
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %eax
addq %rax, %rdi
leaq -0x60(%rbp), %rsi
movl -0x64(%rbp), %eax
movl %eax, %edx
callq 0x43f0
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x64(%rbp), %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdi
callq 0x4b50
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4220
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x34(%rbp), %edx
callq 0x4bb0
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rdi
callq 0x45f0
movq -0x28(%rbp), %rdi
callq 0x45f0
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
leaq -0x130(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x4290
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
leaq -0x130(%rbp), %rdx
callq 0x5100
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x52a1
jmp 0x524c
leaq 0xef48(%rip), %rdi      # 0x1419b
leaq 0xef4c(%rip), %rsi      # 0x141a6
leaq 0xef5d(%rip), %rdx      # 0x141be
movl $0x217, %ecx            # imm = 0x217
movb $0x0, %al
callq 0x4080
movq -0x10(%rbp), %rsi
leaq -0x130(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0xef4a(%rip), %rdi      # 0x141cd
movb $0x0, %al
callq 0x4080
leaq 0x10a58(%rip), %rdi     # 0x15ce9
movb $0x0, %al
callq 0x4080
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5312
leaq -0x130(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x46c0
cmpl $0x0, %eax
je 0x5309
jmp 0x52b8
leaq 0xeedc(%rip), %rdi      # 0x1419b
leaq 0xeee0(%rip), %rsi      # 0x141a6
leaq 0xeef1(%rip), %rdx      # 0x141be
movl $0x21c, %ecx            # imm = 0x21C
movb $0x0, %al
callq 0x4080
leaq -0x130(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xef12(%rip), %rdi      # 0x141fd
movb $0x0, %al
callq 0x4080
leaq 0x109f0(%rip), %rdi     # 0x15ce9
movb $0x0, %al
callq 0x4080
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5312
jmp 0x530b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x2c0, %rsp            # imm = 0x2C0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0xb0(%rbp), %rdi
leaq 0xed5c(%rip), %rsi      # 0x14110
movl $0x8b, %edx
callq 0x43f0
leaq -0x1c0(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x4290
leaq -0x2c0(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x4290
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x2c0(%rbp), %rdx
callq 0x5100
leaq -0xb8(%rbp), %rdi
callq 0x4480
leaq -0xb8(%rbp), %rdi
callq 0x4380
movq %rax, -0xc0(%rbp)
leaq -0x1c0(%rbp), %rdi
movq -0xc0(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
leaq 0xedf9(%rip), %rdx      # 0x14229
callq 0x43e0
movq -0x18(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0x2c0(%rbp), %rdx
leaq -0x1c0(%rbp), %rcx
movb $0x0, %al
callq 0x4110
addq $0x2c0, %rsp            # imm = 0x2C0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: webSocket_getInType(unsigned char*)
int webSocket_getInType(unsigned char *data)
{
    char  type;
    int ret;
    type = data[0]&0x0F;

    if((data[0]&0x80) == 0x80)
    {
        if(type == 0x01) 
            ret = WCT_TXTDATA;
        else if(type == 0x02) 
            ret = WCT_BINDATA;
        else if(type == 0x08) 
            ret = WCT_DISCONN;
        else if(type == 0x09) 
            ret = WCT_PING;
        else if(type == 0x0A) 
            ret = WCT_PONG;
        else 
            return WCT_ERR;
    }
    else if(type == 0x00) 
        ret = WCT_MINDATA;
    else
        return WCT_ERR;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0xf, %eax
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x80, %eax
jne 0x5925
movsbl -0x11(%rbp), %eax
cmpl $0x1, %eax
jne 0x58ca
movl $0xffffffed, -0x18(%rbp) # imm = 0xFFFFFFED
jmp 0x5923
movsbl -0x11(%rbp), %eax
cmpl $0x2, %eax
jne 0x58dc
movl $0xffffffee, -0x18(%rbp) # imm = 0xFFFFFFEE
jmp 0x5921
movsbl -0x11(%rbp), %eax
cmpl $0x8, %eax
jne 0x58ee
movl $0xffffffef, -0x18(%rbp) # imm = 0xFFFFFFEF
jmp 0x591f
movsbl -0x11(%rbp), %eax
cmpl $0x9, %eax
jne 0x5900
movl $0xfffffff0, -0x18(%rbp) # imm = 0xFFFFFFF0
jmp 0x591d
movsbl -0x11(%rbp), %eax
cmpl $0xa, %eax
jne 0x5912
movl $0xfffffff1, -0x18(%rbp) # imm = 0xFFFFFFF1
jmp 0x591b
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x5948
jmp 0x591d
jmp 0x591f
jmp 0x5921
jmp 0x5923
jmp 0x5942
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
jne 0x5937
movl $0xffffffec, -0x18(%rbp) # imm = 0xFFFFFFEC
jmp 0x5940
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x5948
jmp 0x5942
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x640, %rsp            # imm = 0x640
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6568
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x664b
movq -0x18(%rbp), %rdi
leaq 0xdf01(%rip), %rsi      # 0x14474
callq 0x4120
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x658e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x664b
movq -0x28(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x28(%rbp)
leaq -0x230(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x4290
movq -0x28(%rbp), %rdi
leaq -0x230(%rbp), %rdx
leaq 0xdd2f(%rip), %rsi      # 0x142ee
movb $0x0, %al
callq 0x44c0
leaq -0x230(%rbp), %rdi
callq 0x4220
movl %eax, -0x2c(%rbp)
cmpl $0x1, -0x2c(%rbp)
jge 0x65e4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x664b
leaq -0x630(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x4290
leaq -0x230(%rbp), %rdi
movl -0x2c(%rbp), %esi
leaq -0x630(%rbp), %rdx
callq 0x5390
movq -0x10(%rbp), %rax
movq %rax, -0x640(%rbp)
leaq -0x630(%rbp), %rax
movq %rax, -0x638(%rbp)
leaq -0x630(%rbp), %rdi
callq 0x4220
movq -0x640(%rbp), %rdi
movq -0x638(%rbp), %rsi
movq %rax, %rdx
callq 0x42b0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x640, %rsp            # imm = 0x640
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x14(%rbp), %eax
addl $0x80, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x0, %rsi
movl $0x1, %edi
callq 0x4320
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %eax
addl $0x80, %eax
movl %eax, %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x4290
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x28(%rbp), %rdx
movl -0x14(%rbp), %ecx
addl $0x80, %ecx
movb -0x15(%rbp), %al
movl -0x1c(%rbp), %r9d
andb $0x1, %al
movzbl %al, %r8d
callq 0x5460
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
callq 0x42b0
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x45f0
movl -0x30(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4720
movq -0x8(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4390
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7d7c
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x7d73
movq -0x18(%rbp), %rax
leaq 0xc871(%rip), %rcx      # 0x14510
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0xa0(%rax)
je 0x7cd8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0xa0(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdi
callq *%rax
jmp 0x7d73
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0x7d0d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0xa8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdi
callq *%rax
jmp 0x7d73
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x98(%rax)
je 0x7d3f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0x98(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdi
callq *%rax
jmp 0x7d73
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x90(%rax)
je 0x7d71
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rdi
callq *%rax
jmp 0x7d73
movq -0x8(%rbp), %rdi
callq 0x45f0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x87cf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x887a
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x87e5
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x45f0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x87fd
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x45f0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x8815
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x45f0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x882d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x45f0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x8863
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x8861
movq -0x18(%rbp), %rdi
callq 0xb330
movq -0x18(%rbp), %rdi
movl $0x30, %esi
callq 0x4510
jmp 0x8863
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x4290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x90bc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9121
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x90d4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x45f0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x910a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x9108
movq -0x18(%rbp), %rdi
callq 0xb330
movq -0x18(%rbp), %rdi
movl $0x30, %esi
callq 0x4510
jmp 0x910a
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x4290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_httpd.cpp
// Function: httpChilent_Close(httpChilent_t*)
void httpChilent_Close(struct httpChilent_t * client)
{
    if(client == NULL)
        return;
    while(evbuffer_get_length(bufferevent_get_output(client->bev)) > 0);
    bufferev_event_cb(client->bev, BEV_EVENT_EOF, client);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x93b5
jmp 0x93ea
jmp 0x93b7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x41b0
movq %rax, %rdi
callq 0x4550
cmpq $0x0, %rax
jbe 0x93d4
jmp 0x93b7
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rdx
movl $0x10, %esi
callq 0x9890
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x981c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9886
movq -0x10(%rbp), %rdi
callq 0x4720
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x9853
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x4350
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x41c0
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
callq 0x87b0
movq -0x10(%rbp), %rdi
addq $0x78, %rdi
callq 0x90a0
movq -0x10(%rbp), %rdi
callq 0x45d0
movq -0x10(%rbp), %rdi
callq 0x45f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9c50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9c78
movq -0x10(%rbp), %rdi
callq 0x4720
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x10(%rbp), %rdi
callq 0x4390
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9d68
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9dae
movq -0x10(%rbp), %rdi
callq 0x4720
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x10(%rbp), %rdi
callq 0x4390
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)