// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x80, %edi
movl $0x8, %esi
callq 0x10b0
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x8ca(%rip), %rsi       # 0x30e8
leaq -0x4c(%rbp), %rdx
movb $0x0, %al
callq 0x1040
movq -0x8(%rbp), %rdi
callq 0x10a0
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x2906
movq -0x8(%rbp), %rdx
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1140
movq %rax, -0x38(%rbp)
cmpq $0x1, -0x38(%rbp)
jne 0x28b4
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x39(%rbp)
movq -0x8(%rbp), %rdx
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1140
movq %rax, -0x38(%rbp)
cmpq $-0x1, -0x38(%rbp)
je 0x28b2
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
addq $0x3, %rdi
callq 0x1180
movq %rax, %rdx
movq -0x28(%rbp), %rax
movzbl -0x39(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x28f6
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
leaq 0x80c(%rip), %rsi       # 0x30db
leaq -0x39(%rbp), %rdx
movb $0x0, %al
callq 0x1100
movq -0x30(%rbp), %rdi
addq $0x4, %rdi
callq 0x1180
movq %rax, %rdx
movq -0x28(%rbp), %rax
movzbl -0x39(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x28f8
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x2839
movl $0x0, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rcx
leaq 0x7a5(%rip), %rsi       # 0x30c1
leaq -0x50(%rbp), %rdx
movb $0x0, %al
callq 0x1040
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x2971
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movslq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x18(%rbp), %rcx
movslq -0x40(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rcx
leaq 0x784(%rip), %rsi       # 0x30e3
movb $0x0, %al
callq 0x1040
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x292e
movq -0x30(%rbp), %rdi
callq 0x1030
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)