LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/utils.c
// Function: swap2
static void swap2(void *x, void *y, size_t l) {
   char *a = x, *b = y, c;
   while(l--) {
      c = *a;
      *a++ = *b;
      *b++ = c;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x18(%rbp)
cmpq $0x0, %rax
je 0x4d9b
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movq -0x28(%rbp), %rax
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movb -0x29(%rbp), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x4d50
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_chdir
int file_chdir(char* dir){
  
  char* oldwd = getcwd(NULL,0);
  if (!oldwd) die(__func__);
  if (chdir(dir) == -1) die(__func__);

  free(oldwd);
return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x2160
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4e2f
leaq 0xcbea(%rip), %rdi      # 0x11a14
callq 0x4230
movq -0x8(%rbp), %rdi
callq 0x20e0
cmpl $-0x1, %eax
jne 0x4e49
leaq 0xcbd0(%rip), %rdi      # 0x11a14
callq 0x4230
movq -0x10(%rbp), %rdi
callq 0x10ad0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_open
FILE* file_open(char *c_file, const char * c_mode){
  
  FILE* f_in;
  
  f_in = fopen(c_file, c_mode);
  if (!f_in) {perror(__func__); exit(EXIT_FAILURE);}
  fseek(f_in, 0, SEEK_SET);
  
return f_in;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2200
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4e9e
leaq 0xcb90(%rip), %rdi      # 0x11a1f
callq 0x2210
movl $0x1, %edi
callq 0x2270
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x21e0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_size
size_t file_size(FILE* f_in){

    fseek(f_in, 0, SEEK_END);
    size_t length = ftell(f_in);
    rewind(f_in);
  
return length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x21e0
movq -0x8(%rbp), %rdi
callq 0x21a0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2110
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_read
uint_t file_read(FILE* f_in){

  uint_t value;

  int e = fread(&value, sizeof(uint_t), 1, f_in);
  if(e!=1) {perror("read error"); exit(1);}

return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
leaq -0x10(%rbp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x2090
movl %eax, -0x14(%rbp)
cmpl $0x1, -0x14(%rbp)
je 0x4f82
leaq 0xcac1(%rip), %rdi      # 0x11a34
callq 0x2210
movl $0x1, %edi
callq 0x2270
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_load
char* file_load(FILE* f_in) {
  
  size_t len = 0;
  ssize_t size = 0;
  char *c_aux = NULL;
  
  /*Read one line*/
  size = getline(&c_aux, &len, f_in);
  if (size == -1) {perror(__func__); exit(EXIT_FAILURE);}

  /*Copy line to c_buffer*/
  char *c_buffer = (char*) malloc((size+1)*sizeof(char));
  strncpy(c_buffer, c_aux, size);

  c_buffer[size-1] = END_MARKER;
  c_buffer[size] = '\0';

  free(c_aux);

return c_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x2250
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0x5086
leaq 0xc9c8(%rip), %rdi      # 0x11a3f
callq 0x2210
movl $0x1, %edi
callq 0x2270
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
callq 0x10960
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2050
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movb $0x24, (%rax,%rcx)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rdi
callq 0x10ad0
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: load_multiple_txt
char** load_multiple_txt(FILE* f_in, int_t k, size_t *n) {

  char **c_buffer = (char**) malloc(k*sizeof(char*));

  int_t i;
  for(i=0; i<k; i++){
    size_t len = 0;
    c_buffer[i] = NULL;
      
    ssize_t size = getline(&c_buffer[i], &len, f_in);
    if (size == -1){
      printf("K = %" PRIdN" \n", i);
      return 0;
    }
    c_buffer[i][size-1] = 0;

    (*n) += (size_t)size;
  }


return c_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10960
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x5a2d
movq $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x2250
movq %rax, -0x40(%rbp)
cmpq $-0x1, -0x40(%rbp)
jne 0x59f6
movq -0x30(%rbp), %rsi
leaq 0xc064(%rip), %rdi      # 0x11a49
movb $0x0, %al
callq 0x20f0
movq $0x0, -0x8(%rbp)
jmp 0x5a35
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x598d
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: load_multiple_fastq
char** load_multiple_fastq(FILE* f_in, int_t k, size_t *n){

  char **c_buffer = (char**) malloc(k*sizeof(char*));

  int_t i;
  for(i=0; i<k; i++){
    size_t len = 0;
    char *buf = NULL;

    ssize_t size = getline(&buf, &len, f_in); // @'s line
    //printf("Line of size: %d\n", strlen(buf));
    free(buf);buf = NULL;
    if (size <= 1) return 0;

    c_buffer[i] = NULL; len=0;
    size = getline(&c_buffer[i], &len, f_in); // read line
    //printf("Line of size: %d\n", strlen(c_buffer[i]));
    c_buffer[i][size-1] = 0;
    (*n) += (size_t)size;

    buf = NULL; len = 0;  
    size = getline(&buf, &len, f_in); // +'s line
    // printf("Line of size: %d\n", strlen(buf));
    free(buf);
    buf = NULL; len = 0;  
    size = getline(&buf, &len, f_in); // @'s line
    //printf("Line of size: %d\n", strlen(buf));
    free(buf);buf = NULL;
    //printf("Line %d OK\n", i);
    // free(buf);
  }
  return c_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10960
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x5b98
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rdx
leaq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2250
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x10ad0
movq $0x0, -0x40(%rbp)
cmpq $0x1, -0x48(%rbp)
jg 0x5ac5
movq $0x0, -0x8(%rbp)
jmp 0x5ba0
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x2250
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x48(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdx
leaq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2250
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x10ad0
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdx
leaq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2250
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x10ad0
movq $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x5a6d
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: load_multiple_qs
char** load_multiple_qs(FILE* f_in, int_t k){

  char **c_buffer = (char**) malloc(k*sizeof(char*));

  int_t i;
  for(i=0; i<k; i++){
    size_t len = 0;
    char *buf = NULL;

    ssize_t size = getline(&buf, &len, f_in); // @'s line
    //printf("Line of size: %d\n", strlen(buf));
    free(buf);buf = NULL;
    if (size <= 1) return 0;

    buf = NULL; len = 0;  
    size = getline(&buf, &len, f_in); // read line
    // printf("Line of size: %d\n", strlen(buf));
    free(buf);
    buf = NULL; len = 0;  
    size = getline(&buf, &len, f_in); // +'s line
    //printf("Line of size: %d\n", strlen(buf));
    free(buf);buf = NULL;
    //printf("Line %d OK\n", i);
    // free(buf);

    c_buffer[i] = NULL; len=0;
    size = getline(&c_buffer[i], &len, f_in); // read line
    //printf("Line of size: %d\n", strlen(c_buffer[i]));
    c_buffer[i][size-1] = 0;
  }
  return c_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10960
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x5cf6
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2250
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x10ad0
movq $0x0, -0x38(%rbp)
cmpq $0x1, -0x40(%rbp)
jg 0x5c31
movq $0x0, -0x8(%rbp)
jmp 0x5cfe
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2250
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x10ad0
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2250
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x10ad0
movq $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rsi
callq 0x2250
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x5bd9
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_load_multiple_qs_chunks
char** file_load_multiple_qs_chunks(char* c_file, int_t k, FILE *f_in) {

/* .ext
 * .fastq - strings separated by four lines
 */

  const char *type = get_filename_ext(c_file);
  char **c_buffer = NULL; // = (char**) malloc(k*sizeof(char*));

  if(strcmp(type,"fastq") == 0 || strcmp(type,"fq") == 0)
    c_buffer = load_multiple_qs(f_in, k);
  else{
    printf("Error: file not recognized (.fastq or .fq)\n");
    exit (EXIT_FAILURE);
  }

return c_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4da0
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rdi
leaq 0xbd0f(%rip), %rsi      # 0x11a53
callq 0x2180
cmpl $0x0, %eax
je 0x5d63
movq -0x20(%rbp), %rdi
leaq 0xbd00(%rip), %rsi      # 0x11a59
callq 0x2180
cmpl $0x0, %eax
jne 0x5d76
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5bb0
movq %rax, -0x28(%rbp)
jmp 0x5d8e
leaq 0xbcdf(%rip), %rdi      # 0x11a5c
movb $0x0, %al
callq 0x20f0
movl $0x1, %edi
callq 0x2270
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_count_multiple
int_t* file_count_multiple(char* c_file, int_t *k, uint_t chunk_size, int_t *chunks, size_t *n, FILE *f_in, ssize_t **pos) {

/* .ext
 * .txt   - strings per line
 * .fa .fasta - strings separated by '>' line
 * .fastq - strings separated by four lines
 */

  const char *type = get_filename_ext(c_file);
  int_t *K = NULL; 
  *pos = NULL; 

  if(strcmp(type,"txt") == 0)
    K = count_multiple_txt(f_in, k, chunk_size, n, chunks, pos);

  else if(strcmp(type,"fasta") == 0 || strcmp(type,"fa")==0 )
    K = count_multiple_fasta(f_in, k, chunk_size, n, chunks, pos);

  else if(strcmp(type,"fastq") == 0 || strcmp(type,"fq")==0 )
    K = count_multiple_fastq(f_in, k, chunk_size, n, chunks, pos);

  else{
    printf("Error: file not recognized (.txt, .fa, .fasta, .fastq, .fq)\n");
    exit(EXIT_FAILURE);
  }

  //sets the pointer to the beginning of the file
  rewind(f_in);

return K;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4da0
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq 0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x38(%rbp), %rdi
leaq 0xba79(%rip), %rsi      # 0x11a88
callq 0x2180
cmpl $0x0, %eax
jne 0x603f
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x50e0
movq %rax, -0x40(%rbp)
jmp 0x60f5
movq -0x38(%rbp), %rdi
leaq 0xba42(%rip), %rsi      # 0x11a8c
callq 0x2180
cmpl $0x0, %eax
je 0x6069
movq -0x38(%rbp), %rdi
leaq 0xba33(%rip), %rsi      # 0x11a92
callq 0x2180
cmpl $0x0, %eax
jne 0x608c
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x55f0
movq %rax, -0x40(%rbp)
jmp 0x60f3
movq -0x38(%rbp), %rdi
leaq 0xb9bc(%rip), %rsi      # 0x11a53
callq 0x2180
cmpl $0x0, %eax
je 0x60b6
movq -0x38(%rbp), %rdi
leaq 0xb9ad(%rip), %rsi      # 0x11a59
callq 0x2180
cmpl $0x0, %eax
jne 0x60d9
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x5330
movq %rax, -0x40(%rbp)
jmp 0x60f1
leaq 0xb9b5(%rip), %rdi      # 0x11a95
movb $0x0, %al
callq 0x20f0
movl $0x1, %edi
callq 0x2270
jmp 0x60f3
jmp 0x60f5
movq -0x30(%rbp), %rdi
callq 0x2110
movq -0x40(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_load_multiple_chunks
char** file_load_multiple_chunks(char* c_file, int_t k, size_t *n, FILE *f_in) {

/* .ext
 * .txt   - strings per line
 * .fa .fasta - strings separated by '>' line
 * .fastq - strings separated by four lines
 */

  const char *type = get_filename_ext(c_file);
  char **c_buffer = NULL; // = (char**) malloc(k*sizeof(char*));

  if(strcmp(type,"txt") == 0)
    c_buffer = load_multiple_txt(f_in, k, n);

  else if(strcmp(type,"fasta") == 0 || strcmp(type,"fa")==0 )
    c_buffer = load_multiple_fasta(f_in, k, n);

  else if(strcmp(type,"fastq") == 0 || strcmp(type,"fq")==0 )
    c_buffer = load_multiple_fastq(f_in, k, n);

  else{
    printf("Error: file not recognized (.txt, .fa, .fasta, .fastq, .fq)\n");
    exit(EXIT_FAILURE);
  }

return c_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4da0
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x28(%rbp), %rdi
leaq 0xb940(%rip), %rsi      # 0x11a88
callq 0x2180
cmpl $0x0, %eax
jne 0x616c
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5960
movq %rax, -0x30(%rbp)
jmp 0x620a
movq -0x28(%rbp), %rdi
leaq 0xb915(%rip), %rsi      # 0x11a8c
callq 0x2180
cmpl $0x0, %eax
je 0x6196
movq -0x28(%rbp), %rdi
leaq 0xb906(%rip), %rsi      # 0x11a92
callq 0x2180
cmpl $0x0, %eax
jne 0x61ad
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5da0
movq %rax, -0x30(%rbp)
jmp 0x6208
movq -0x28(%rbp), %rdi
leaq 0xb89b(%rip), %rsi      # 0x11a53
callq 0x2180
cmpl $0x0, %eax
je 0x61d7
movq -0x28(%rbp), %rdi
leaq 0xb88c(%rip), %rsi      # 0x11a59
callq 0x2180
cmpl $0x0, %eax
jne 0x61ee
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5a40
movq %rax, -0x30(%rbp)
jmp 0x6206
leaq 0xb8a0(%rip), %rdi      # 0x11a95
movb $0x0, %al
callq 0x20f0
movl $0x1, %edi
callq 0x2270
jmp 0x6208
jmp 0x620a
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/file.c
// Function: file_load_multiple
char** file_load_multiple(char* c_file, int k, size_t *n) {

/* .ext
 * .txt   - strings per line
 * .fa .fasta - strings separated by '>' line
 * .fastq - strings separated by four lines
 */

  FILE* f_in = file_open(c_file, "rb");
  if(!f_in) return 0;

  const char *type = get_filename_ext(c_file);
  char **c_buffer = NULL; // = (char**) malloc(k*sizeof(char*));

  if(strcmp(type,"txt") == 0)
    c_buffer = load_multiple_txt(f_in, k, n);

  else if(strcmp(type,"fasta") == 0 || strcmp(type,"fa")==0 )
    c_buffer = load_multiple_fasta(f_in, k, n);

  else if(strcmp(type,"fastq") == 0 || strcmp(type,"fq")==0 )
    c_buffer = load_multiple_fastq(f_in, k, n);
  else{
    printf("Error: file not recognized (.txt, .fa, .fasta, .fastq, .fq)\n");
    exit(EXIT_FAILURE);
  }

  fclose(f_in);

return c_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xb45d(%rip), %rsi      # 0x1169b
callq 0x4e60
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x625b
movq $0x0, -0x8(%rbp)
jmp 0x634e
movq -0x10(%rbp), %rdi
callq 0x4da0
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
leaq 0xb80d(%rip), %rsi      # 0x11a88
callq 0x2180
cmpl $0x0, %eax
jne 0x629f
movq -0x28(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5960
movq %rax, -0x38(%rbp)
jmp 0x633d
movq -0x30(%rbp), %rdi
leaq 0xb7e2(%rip), %rsi      # 0x11a8c
callq 0x2180
cmpl $0x0, %eax
je 0x62c9
movq -0x30(%rbp), %rdi
leaq 0xb7d3(%rip), %rsi      # 0x11a92
callq 0x2180
cmpl $0x0, %eax
jne 0x62e0
movq -0x28(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5da0
movq %rax, -0x38(%rbp)
jmp 0x633b
movq -0x30(%rbp), %rdi
leaq 0xb768(%rip), %rsi      # 0x11a53
callq 0x2180
cmpl $0x0, %eax
je 0x630a
movq -0x30(%rbp), %rdi
leaq 0xb759(%rip), %rsi      # 0x11a59
callq 0x2180
cmpl $0x0, %eax
jne 0x6321
movq -0x28(%rbp), %rdi
movslq -0x14(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x5a40
movq %rax, -0x38(%rbp)
jmp 0x6339
leaq 0xb76d(%rip), %rdi      # 0x11a95
movb $0x0, %al
callq 0x20f0
movl $0x1, %edi
callq 0x2270
jmp 0x633b
jmp 0x633d
movq -0x28(%rbp), %rdi
callq 0x20c0
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/suffix_array.c
// Function: suffix_array_write
int suffix_array_write(int_t *SA, int_t n, char* c_file, const char* ext){

  FILE *f_out;
  char *c_out = malloc((strlen(c_file)+strlen(ext))*sizeof(char));
  
  sprintf(c_out, "%s.%s", c_file, ext);
  f_out = file_open(c_out, "wb");
  
  fwrite(SA, sizeof(int_t), n, f_out);
  
  file_close(f_out);
  free(c_out);

return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20d0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20d0
movq -0x38(%rbp), %rdi
addq %rax, %rdi
shlq $0x0, %rdi
callq 0x10960
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0xb58e(%rip), %rsi      # 0x11b33
movb $0x0, %al
callq 0x2260
movq -0x30(%rbp), %rdi
leaq 0xb143(%rip), %rsi      # 0x116fa
callq 0x4e60
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x8, %esi
callq 0x2280
movq -0x28(%rbp), %rdi
callq 0x4ec0
movq -0x30(%rbp), %rdi
callq 0x10ad0
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/suffix_array.c
// Function: suffix_array_read
int_t* suffix_array_read(int_t n, char* c_file, const char* ext){

  FILE *f_in;
  char *c_in = malloc((strlen(c_file)+strlen(ext))*sizeof(char));
  
  sprintf(c_in, "%s.%s", c_file, ext);
  f_in = file_open(c_in, "rb");
  
  int_t *SA = (int_t*) malloc(n*sizeof(int_t));
  size_t e = fread(SA, sizeof(int_t), n, f_in);
  if(e!=n) {perror(__func__); exit(1);}
  
  file_close(f_in);
  free(c_in);

return SA;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20d0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20d0
movq -0x40(%rbp), %rdi
addq %rax, %rdi
shlq $0x0, %rdi
callq 0x10960
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq 0xb4e2(%rip), %rsi      # 0x11b33
movb $0x0, %al
callq 0x2260
movq -0x28(%rbp), %rdi
leaq 0xb038(%rip), %rsi      # 0x1169b
callq 0x4e60
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10960
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rdx
movq -0x20(%rbp), %rcx
movl $0x8, %esi
callq 0x2090
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0x66b7
leaq 0xb491(%rip), %rdi      # 0x11b39
callq 0x2210
movl $0x1, %edi
callq 0x2270
movq -0x20(%rbp), %rdi
callq 0x4ec0
movq -0x28(%rbp), %rdi
callq 0x10ad0
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/suffix_array.c
// Function: suffix_array_print
int_t suffix_array_print(unsigned char *T, int_t *SA, size_t n, int cs){

int_t i;
  for(i=0; i<n; i++){

    printf("%" PRIdN ") %" PRIdN "\t", i, SA[i]);
  
    int_t j=SA[i];
    for(j=SA[i]; (j<SA[i]+5); j++)
      printf("%" PRIdN " ", chr(j));
    printf("\n");
  }

return 1;
}

// 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 $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x67cf
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0xb427(%rip), %rdi      # 0x11b4b
movb $0x0, %al
callq 0x20f0
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
addq $0x5, %rcx
cmpq %rcx, %rax
jge 0x67b0
movslq -0x1c(%rbp), %rax
cmpq $0x8, %rax
jne 0x6780
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0x6790
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
leaq 0xb3ba(%rip), %rdi      # 0x11b55
movb $0x0, %al
callq 0x20f0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x674b
leaq 0xa9b6(%rip), %rdi      # 0x1116d
movb $0x0, %al
callq 0x20f0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x66ff
movl $0x1, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/suffix_array.c
// Function: sleq
int_t sleq(unsigned char *T, int_t a, int_t b, size_t n, int cs, unsigned char sentinel) {

  size_t i;

  for(i=0; i<n; i++){

          if (chr(a) < chr(b))
      return 1;
          else if (chr(a) > chr(b))
                  return 0;
    else if(chr(a)==sentinel && chr(b)==sentinel){// $_i < $_j iff i < j
      if(a < b) 
        return 1;
      else  
        return 0;
    }
    a++;
    b++;
        }

return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %r9b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movb %al, -0x2d(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x69c5
movslq -0x2c(%rbp), %rax
cmpq $0x8, %rax
jne 0x6830
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
jmp 0x6840
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0x8, %rax
jne 0x6864
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
jmp 0x6874
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jge 0x688e
movq $0x1, -0x8(%rbp)
jmp 0x69cd
movslq -0x2c(%rbp), %rax
cmpq $0x8, %rax
jne 0x68aa
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
jmp 0x68ba
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movslq -0x2c(%rbp), %rax
cmpq $0x8, %rax
jne 0x68de
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
jmp 0x68ee
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rcx
cmpq %rcx, %rax
jle 0x6908
movq $0x0, -0x8(%rbp)
jmp 0x69cd
movslq -0x2c(%rbp), %rax
cmpq $0x8, %rax
jne 0x6924
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
jmp 0x6934
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movzbl -0x2d(%rbp), %ecx
cmpq %rcx, %rax
jne 0x6998
movslq -0x2c(%rbp), %rax
cmpq $0x8, %rax
jne 0x695d
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
jmp 0x696d
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movzbl -0x2d(%rbp), %ecx
cmpq %rcx, %rax
jne 0x6998
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x698e
movq $0x1, -0x8(%rbp)
jmp 0x69cd
movq $0x0, -0x8(%rbp)
jmp 0x69cd
jmp 0x699a
jmp 0x699c
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x6806
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/lcp_array.c
// Function: lcp_kasai
int lcp_kasai(char* T, int_t* SA, uint_t n, int_t* LCP){
  
  uint_t *ISA = (uint_t* ) malloc(n * sizeof(uint_t));
  find_inverse(SA, n, ISA);
  
  uint_t l = 0;
  uint_t j, k, i;
  
  for(i = 0; i < n; i++){

    k = ISA[i];
  
    if(!k) {
      LCP[k] = 0;
    }
    else{
      
      j = SA[k-1];
      while(T[i+l] == T[j+l] && !(T[i+l] == 0 && T[j+l]==0)){
        l++; 
      }
      
      LCP[k] = l;
      if(T[i+l] == 0 && T[j+l]==0) LCP[k]++;
      if(l>0) l--;
    }
  } 
  
  free(ISA);

return 0;
}

// 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)
movq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10960
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x6cc0
movq $0x0, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x6e99
movq -0x28(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x6d94
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x6e86
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
addq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rdx
addq -0x30(%rbp), %rdx
movsbl (%rax,%rdx), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x49(%rbp)
jne 0x6e0c
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
addq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x4a(%rbp)
jne 0x6e04
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
addq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
xorb $-0x1, %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x6e15
jmp 0x6e23
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6da8
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
addq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x6e71
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
addq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x6e71
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x30(%rbp)
jbe 0x6e84
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6e86
jmp 0x6e88
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x6d5a
movq -0x28(%rbp), %rdi
callq 0x10ad0
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/lcp_array.c
// Function: lcp_PHI_int
int lcp_PHI_int(int_t* T, int_t* SA, int_t* LCP, uint_t n, int cs){

  uint_t* PLCP = (uint_t*) malloc(n * sizeof(uint_t));;

  //PHI is stored in PLCP array
  uint_t i,j;
  for (i=0, j = 0; i < n; ++i) {
    PLCP[SA[i]] = j;
    j = SA[i];
  }

  int_t l;
  for (i=0, l=0; i < n-1; ++i) {
    while (chr(i+l) == chr(PLCP[i]+l)) {
        ++l;
    }
    PLCP[i] = l;
    if (l) --l;
  }

  for (i=0; i < n; ++i) {
    LCP[i] = PLCP[SA[i]];
  }
  
  free(PLCP);

return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x20(%rbp), %rdi
shlq $0x3, %rdi
callq 0x10960
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x71bd
movq -0x40(%rbp), %rdx
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x717d
movq $0x0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x72b8
jmp 0x71e4
movslq -0x24(%rbp), %rax
cmpq $0x8, %rax
jne 0x7204
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
addq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
jmp 0x7218
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
addq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movslq -0x24(%rbp), %rax
cmpq $0x8, %rax
jne 0x7248
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
addq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
jmp 0x7264
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
addq -0x48(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7282
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x71e4
movq -0x48(%rbp), %rdx
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x48(%rbp)
je 0x72a5
movq -0x48(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x72a7
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x71cd
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x72f8
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x72c0
movq -0x30(%rbp), %rdi
callq 0x10ad0
xorl %eax, %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/lcp_array.c
// Function: lcp_array_print
int lcp_array_print(unsigned char *T, int_t *SA, int_t *LCP, size_t n, int cs){

  int_t i;

        for(i=0; i<n; i++){

                printf("%" PRIdN ") %" PRIdN ", %" PRIdN "  \t", i, SA[i], LCP[i]);

                int_t j=SA[i];
                for(j=SA[i]; (j<SA[i]+min(10,LCP[i]+10)); j++)
                        printf("%" PRIdN " ", chr(j));
                printf("\n");
        }

return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x7b8f
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xa17d(%rip), %rdi      # 0x11c12
movb $0x0, %al
callq 0x20f0
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
addq $0xa, %rcx
movl $0xa, %eax
cmpq %rcx, %rax
jge 0x7af9
movl $0xa, %eax
movq %rax, -0x50(%rbp)
jmp 0x7b0d
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
movq -0x50(%rbp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jge 0x7b70
movslq -0x24(%rbp), %rax
cmpq $0x8, %rax
jne 0x7b3d
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
jmp 0x7b4d
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rsi
leaq 0x9ffd(%rip), %rdi      # 0x11b55
movb $0x0, %al
callq 0x20f0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x7abc
leaq 0x95f6(%rip), %rdi      # 0x1116d
movb $0x0, %al
callq 0x20f0
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7a64
movl $0x1, %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/lib/lcp_array.c
// Function: lcp_array_write
int lcp_array_write(int_t *SA, int_t *LCP, int_t n, char* c_file, const char* ext){

  FILE *f_out;
  char *c_out = malloc((strlen(c_file)+strlen(ext))*sizeof(char));
  
  sprintf(c_out, "%s.%s", c_file, ext);
  f_out = file_open(c_out, "wb");
        
  int_t i;
  for(i=0; i<n; i++){//writes SA, LCP interleaved
    fwrite(&SA[i], sizeof(int_t), 1, f_out);
    fwrite(&LCP[i], sizeof(int_t), 1, f_out);
  }
  
  file_close(f_out);
  free(c_out);

return 1;
}

// 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)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x20d0
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20d0
movq -0x48(%rbp), %rdi
addq %rax, %rdi
shlq $0x0, %rdi
callq 0x10960
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x9f3a(%rip), %rsi      # 0x11b33
movb $0x0, %al
callq 0x2260
movq -0x38(%rbp), %rdi
leaq 0x9aef(%rip), %rsi      # 0x116fa
callq 0x4e60
movq %rax, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x7c78
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2280
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x2280
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x7c1c
movq -0x30(%rbp), %rdi
callq 0x4ec0
movq -0x38(%rbp), %rdi
callq 0x10ad0
movl $0x1, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/src/gsacak.c
// Function: getBuckets_k
void getBuckets_k(int_t *s, 
  uint_t *bkt, uint_t n,
  unsigned int K, int end, int cs) { 
  uint_t i, sum=0;
  
  // clear all buckets .
  for(i=0; i<K; i++) bkt[i]=0; 
  
  // compute the size of each bucket .
  for(i=0; i<n; i++) bkt[chr(i)]++; 
  
  for(i=0; i<K; i++) { 
    sum+=bkt[i]; 
    bkt[i]=end ? sum-1 : sum-bkt[i]; 
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jae 0x8215
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x81eb
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x827d
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movslq -0x24(%rbp), %rax
cmpq $0x8, %rax
jne 0x824b
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
jmp 0x825b
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x821d
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jae 0x82eb
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x82b9
movq -0x38(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x82cd
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rdx
subq (%rcx,%rdx,8), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8285
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSuffix0
void putSuffix0(uint_t *SA, 
  int_t *s, uint_t *bkt, 
  uint_t n, unsigned int K, int_t n1, int cs) {
  uint_t i, j;

  // find the end of each bucket.
  getBuckets_k(s, bkt, n, K, true, cs);

  // put the suffixes into their buckets.
  for(i=n1-1; i>0; i--) {
    j=SA[i]; SA[i]=0;
    SA[bkt[chr(j)]--]=j;
  }
  SA[0]=n-1; // set the single sentinel suffix.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl 0x10(%rbp), %r9d
movl $0x1, %r8d
callq 0x81c0
movq -0x30(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jbe 0x83e0
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movslq 0x10(%rbp), %rax
cmpq $0x8, %rax
jne 0x839c
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
jmp 0x83ac
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rdx
movq -0x48(%rbp), %rsi
movq -0x60(%rbp), %rdi
movq (%rsi,%rdi,8), %rcx
movq %rcx, %r8
addq $-0x1, %r8
movq %r8, (%rsi,%rdi,8)
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x833d
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSuffix0_generalized
void putSuffix0_generalized(uint_t *SA, 
  uint_t *s, uint_t *bkt, 
  uint_t n, unsigned int K, int_t n1, int cs, uint_t separator) {
  uint_t i, j;

  // find the end of each bucket.
  getBuckets_k((int_t*)s, bkt, n, K, true, cs);

  int_t tmp=bkt[separator]--;// shifts one position left of bkt[separator]

  // put the suffixes into their buckets.
  for(i=n1-1; i>0; i--) {
    j=SA[i]; SA[i]=0;
    SA[bkt[chr(j)]--]=j;
  }

 // SA[0]=n-1; // set the single sentinel suffix.

  SA[tmp]=SA[0]-1;// insert the last separator at the end of bkt[separator]

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl 0x10(%rbp), %r9d
movl $0x1, %r8d
callq 0x81c0
movq -0x18(%rbp), %rcx
movq 0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rax
movq %rax, %rsi
addq $-0x1, %rsi
movq %rsi, (%rcx,%rdx,8)
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jbe 0x850f
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq 0x10(%rbp), %rax
cmpq $0x8, %rax
jne 0x84cb
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
jmp 0x84db
movq -0x10(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rdx
movq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rdi
movq (%rsi,%rdi,8), %rcx
movq %rcx, %r8
addq $-0x1, %r8
movq %r8, (%rsi,%rdi,8)
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x846c
movq -0x8(%rbp), %rax
movq (%rax), %rdx
subq $0x1, %rdx
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSuffix0_generalized_LCP
void putSuffix0_generalized_LCP(uint_t *SA, int_t *LCP,
  uint_t *s, uint_t *bkt, 
  uint_t n, unsigned int K, int_t n1, int cs, uint_t separator) {
  uint_t i, j;
  int_t l;

  // find the end of each bucket.
  getBuckets_k((int_t*)s, bkt, n, K, true, cs);

  int_t tmp=bkt[separator]--;// shifts one position left of bkt[separator]

  // put the suffixes into their buckets.
  for(i=n1-1; i>0; i--) {
    j=SA[i]; SA[i]=U_MAX;
    l=LCP[i]; LCP[i]=0;

    SA[bkt[chr(j)]]=j;
    LCP[bkt[chr(j)]--]=l;
  }

 // SA[0]=n-1; // set the single sentinel suffix.

  SA[tmp]=SA[0]-1;// insert the last separator at the end of bkt[separator]

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x20(%rbp), %rax
movl 0x18(%rbp), %eax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movl 0x18(%rbp), %r9d
movl $0x1, %r8d
callq 0x81c0
movq -0x20(%rbp), %rcx
movq 0x20(%rbp), %rdx
movq (%rcx,%rdx,8), %rax
movq %rax, %rsi
addq $-0x1, %rsi
movq %rsi, (%rcx,%rdx,8)
movq %rax, -0x50(%rbp)
movq 0x10(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jbe 0x86d1
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq $-0x1, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movslq 0x18(%rbp), %rax
cmpq $0x8, %rax
jne 0x8622
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
jmp 0x8632
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq -0x68(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq -0x70(%rbp), %rsi
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movslq 0x18(%rbp), %rax
cmpq $0x8, %rax
jne 0x8684
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x90(%rbp)
jmp 0x8697
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rax
movq -0x88(%rbp), %rdx
movq -0x78(%rbp), %rsi
movq -0x90(%rbp), %rdi
movq (%rsi,%rdi,8), %rcx
movq %rcx, %r8
addq $-0x1, %r8
movq %r8, (%rsi,%rdi,8)
movq %rdx, (%rax,%rcx,8)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x85a3
movq -0x8(%rbp), %rax
movq (%rax), %rdx
subq $0x1, %rdx
movq -0x8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)