LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x20d0
movq %rax, %r15
movq %r12, %rdi
callq 0x20d0
addq %rax, %r15
movq %r15, %rdi
callq 0x9fe6
movq %rax, %r15
leaq 0x63e6(%rip), %rsi      # 0xb9bb
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x2260
leaq 0x6057(%rip), %rsi      # 0xb643
movq %r15, %rdi
callq 0x4413
movq %rax, %r12
movl $0x8, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2280
movq %r12, %rdi
callq 0x4437
movq %r15, %rdi
callq 0xa09d
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20d0
movq %rax, %r14
movq %r15, %rdi
callq 0x20d0
addq %rax, %r14
movq %r14, %rdi
callq 0x9fe6
movq %rax, %r14
leaq 0x6359(%rip), %rsi      # 0xb9bb
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x2260
leaq 0x5f81(%rip), %rsi      # 0xb5fa
movq %r14, %rdi
callq 0x4413
movq %rax, %r12
leaq (,%rbx,8), %rdi
callq 0x9fe6
movq %rax, %r15
movl $0x8, %esi
movq %rax, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x20a0
cmpq %rbx, %rax
jne 0x56cb
movq %r12, %rdi
callq 0x4437
movq %r14, %rdi
callq 0xa09d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x241d
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
testq %rdx, %rdx
je 0x5751
movl %ecx, %ebx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x62ea(%rip), %rbp      # 0xb9dd
xorl %r13d, %r13d
movq (%r15,%r13,8), %rdx
leaq 0x62d2(%rip), %rdi      # 0xb9d3
movq %r13, %rsi
xorl %eax, %eax
callq 0x20f0
movq (%r15,%r13,8), %r14
decq %r14
cmpl $0x8, %ebx
jne 0x571e
movq 0x8(%r12,%r14,8), %rsi
jmp 0x5724
movzbl 0x1(%r12,%r14), %esi
movq %rbp, %rdi
xorl %eax, %eax
callq 0x20f0
movq (%r15,%r13,8), %rax
addq $0x4, %rax
incq %r14
cmpq %rax, %r14
jl 0x5712
movl $0xa, %edi
callq 0x2040
incq %r13
cmpq (%rsp), %r13
jne 0x56f6
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0x1, %eax
testq %rcx, %rcx
je 0x57c6
pushq %rbx
movzbl %r9b, %r10d
cmpl $0x8, %r8d
jne 0x5790
movq (%rdi,%rsi,8), %rbx
movq (%rdi,%rdx,8), %r11
cmpq %r11, %rbx
jl 0x57c5
jg 0x57b9
cmpq %r10, %rbx
je 0x57a7
jmp 0x57ac
movb (%rdi,%rsi), %bl
movzbl (%rdi,%rdx), %r11d
cmpb %r11b, %bl
jb 0x57c5
cmpb %r11b, %bl
ja 0x57b9
cmpb %r9b, %bl
jne 0x57ac
cmpq %r10, %r11
je 0x57bd
incq %rsi
incq %rdx
decq %rcx
jne 0x5774
jmp 0x57c5
xorl %eax, %eax
jmp 0x57c5
xorl %eax, %eax
cmpq %rdx, %rsi
setl %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/lib/suffix_array.c
// Function: suffix_array_check
int_t suffix_array_check(unsigned char *T, int_t *SA,  size_t n, int cs, unsigned char sentinel){

  int_t i,j,k;
  
  for (i = 0; i < n-1;  i++) {
    size_t min = SA[i+1]<SA[i]?(n-SA[i]):(n-SA[i+1]);
    if (!sleq(T, SA[i], SA[i+1], min, cs, sentinel)){

      printf("#%" PRIdN ") %" PRIdN ", %" PRIdN "&\n", i, SA[i], SA[i+1]);

      for(j=SA[i], k=SA[i+1]; (j<SA[i]+5); j++, k++)
        printf("%" PRIdN " | %" PRIdN "\n", chr(j), chr(k));
      printf("\n");

      return 0;
    }
  }

  unsigned char *tmp = (unsigned char*) malloc(n*sizeof(unsigned char));

  for (i = 0; i < n;  i++) 
    tmp[i] = 0;

  for (i = 0; i < n;  i++) 
    tmp[SA[i]] = 1;
  
  for (i = 0; i < n;  i++){ 
    if(!tmp[i]){
      free(tmp);
      fprintf(stderr, "Error: is not a permutation\n");
      return 0;
    }
  }

  free(tmp);
  
return 1;  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0x8(%rsp)
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %eax
subq %rdx, %rax
movq %rax, 0x10(%rsp)
movq $-0x1, %r15
movzbl %r8b, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
addq %r15, %rax
cmpq $-0x1, %rax
je 0x58bc
movq 0x8(%rbx,%r15,8), %r13
movq 0x10(%rbx,%r15,8), %rbp
cmpq %r13, %rbp
movq %r13, %rax
cmovgq %rbp, %rax
movq %r12, %rcx
subq %rax, %rcx
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl 0x8(%rsp), %r8d
movl 0xc(%rsp), %r9d
callq 0x5765
incq %r15
testq %rax, %rax
jne 0x57fe
leaq 0x6191(%rip), %rdi      # 0xb9e2
movq %r15, %rsi
movq %r13, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x20f0
movq (%rbx,%r15,8), %r13
movq 0x8(%rbx,%r15,8), %rbp
decq %r13
leaq 0x617f(%rip), %r12      # 0xb9f3
cmpl $0x8, 0x8(%rsp)
jne 0x5886
movq 0x8(%r14,%r13,8), %rsi
movq (%r14,%rbp,8), %rdx
jmp 0x5891
movzbl 0x1(%r14,%r13), %esi
movzbl (%r14,%rbp), %edx
movq %r12, %rdi
xorl %eax, %eax
callq 0x20f0
incq %rbp
movq (%rbx,%r15,8), %rax
addq $0x4, %rax
incq %r13
cmpq %rax, %r13
jl 0x5874
movl $0xa, %edi
callq 0x2040
xorl %eax, %eax
jmp 0x590b
movq %r12, %rdi
callq 0x9fe6
movq %rax, %r14
testq %r12, %r12
je 0x58fe
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2150
movq (%rbx,%r15,8), %rax
movb $0x1, (%r14,%rax)
incq %r15
cmpq %r15, %r12
jne 0x58dc
xorl %eax, %eax
cmpb $0x0, (%r14,%rax)
je 0x591a
incq %rax
cmpq %rax, %r12
jne 0x58ef
movq %r14, %rdi
callq 0xa09d
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x2432
jmp 0x58b8
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq (,%rdx,8), %rdi
callq 0x9fe6
testq %r14, %r14
je 0x59ea
xorl %ecx, %ecx
movq (%r15,%rcx,8), %rdx
movq %rcx, (%rax,%rdx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x596a
xorl %ecx, %ecx
movq %r12, %rdx
xorl %esi, %esi
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x59d8
movq -0x8(%r15,%rdi,8), %r9
addq %r12, %r9
leaq -0x1(%rsi), %r8
movq %rsi, %r11
movb (%r9,%rsi), %r10b
incq %rsi
incq %r8
cmpb %r10b, (%rdx,%r11)
jne 0x59ae
testb %r10b, %r10b
jne 0x5996
leaq -0x1(%rsi), %r10
movq %r10, (%rbx,%rdi,8)
cmpb $0x0, -0x1(%rdx,%rsi)
jne 0x59c9
cmpb $0x0, -0x1(%r9,%rsi)
jne 0x59c9
movq %rsi, (%rbx,%rdi,8)
subq $0x1, %r8
movl $0x0, %esi
cmovaeq %r8, %rsi
jmp 0x59df
movq $0x0, (%rbx)
incq %rcx
incq %rdx
cmpq %r14, %rcx
jne 0x5981
movq %rax, %rdi
callq 0xa09d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/lib/lcp_array.c
// Function: lcp_PHI
int lcp_PHI(unsigned char* T, int_t* SA, int_t* LCP, uint_t n, int cs, unsigned char separator){

  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) && !(chr(i+l) == separator && chr(PLCP[i]+l)==separator) ) {
        ++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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %r12d
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r13
leaq (,%rcx,8), %rdi
callq 0x9fe6
testq %rbx, %rbx
je 0x5a53
xorl %edx, %edx
xorl %ecx, %ecx
movq (%r15,%rcx,8), %rsi
movq %rdx, (%rax,%rsi,8)
incq %rcx
movq %rsi, %rdx
cmpq %rcx, %rbx
jne 0x5a33
movq %rbx, %rcx
decq %rcx
jne 0x5a5a
jmp 0x5ad9
movq $-0x1, %rcx
movq %r14, (%rsp)
movzbl %bpl, %edx
xorl %r14d, %r14d
movq %r13, %rsi
movq %r13, %rdi
xorl %r8d, %r8d
movq (%rax,%r8,8), %r9
leaq (%r9,%r13), %r10
leaq (,%r9,8), %r11
addq %r13, %r11
movq %r14, %r9
cmpl $0x8, %r12d
jne 0x5a9b
movq (%rdi,%r9,8), %r14
cmpq (%r11,%r9,8), %r14
jne 0x5aaf
cmpq %rdx, %r14
jne 0x5aaa
jmp 0x5aaf
movb (%rsi,%r9), %r14b
cmpb (%r10,%r9), %r14b
jne 0x5aaf
cmpb %bpl, %r14b
je 0x5aaf
incq %r9
jmp 0x5a84
movq %r9, (%rax,%r8,8)
subq $0x1, %r9
movl $0x0, %r14d
cmovaeq %r9, %r14
incq %r8
addq $0x8, %rdi
incq %rsi
cmpq %rcx, %r8
jne 0x5a6e
testq %rbx, %rbx
movq (%rsp), %r14
je 0x5aef
xorl %ecx, %ecx
movq (%r15,%rcx,8), %rdx
movq (%rax,%rdx,8), %rdx
movq %rdx, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x5adb
movq %rax, %rdi
callq 0xa09d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq (,%rcx,8), %rdi
callq 0x9fe6
testq %rbx, %rbx
je 0x5b52
xorl %edx, %edx
xorl %ecx, %ecx
movq (%r15,%rcx,8), %rsi
movq %rdx, (%rax,%rsi,8)
incq %rcx
movq %rsi, %rdx
cmpq %rcx, %rbx
jne 0x5b35
movq %rbx, %rcx
decq %rcx
jne 0x5b59
jmp 0x5bc1
movq $-0x1, %rcx
xorl %edx, %edx
movq %r12, %rsi
movq %r12, %rdi
xorl %r8d, %r8d
decq %rdx
cmpl $0x8, %ebp
jne 0x5b80
movq 0x8(%rdi,%rdx,8), %r9
movq (%rax,%r8,8), %r10
leaq (%r12,%r10,8), %r10
movq 0x8(%r10,%rdx,8), %r10
jmp 0x5b93
movzbl 0x1(%rsi,%rdx), %r9d
movq (%rax,%r8,8), %r10
addq %r12, %r10
movzbl 0x1(%rdx,%r10), %r10d
incq %rdx
cmpq %r10, %r9
je 0x5b67
movq %rdx, (%rax,%r8,8)
subq $0x1, %rdx
movl $0x0, %r9d
cmovbq %r9, %rdx
incq %r8
addq $0x8, %rdi
incq %rsi
cmpq %rcx, %r8
jne 0x5b64
testq %rbx, %rbx
je 0x5bd7
xorl %ecx, %ecx
movq (%r15,%rcx,8), %rdx
movq (%rax,%rdx,8), %rdx
movq %rdx, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x5bc3
movq %rax, %rdi
callq 0xa09d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/lib/lcp_array.c
// Function: lcp_array_check
int lcp_array_check(unsigned char *T, int_t *SA, int_t *LCP, uint_t n, int cs, unsigned char separator){
  
  uint_t i,j,k;
  uint_t h;
  uint64_t sum=0;
  int_t maximum=0;

  for(i=1;i<n;i++) {
    
    j=SA[i-1]; k=SA[i];
    for(h=0;j+h<n && k+h<n;h++) if(chr(j+h)!=chr(k+h) || (chr(j+h)==separator && chr(k+h)==separator)) break;
    
    if(LCP[i]!=h) {
      fprintf(stdout,"isNotLCP! Incorrect LCP value: LCP[%" PRIdN "]=%" PRIdN "!=%" PRIdN "\t(%" PRIdN ")\n", i, LCP[i],h, SA[i]);
      return 0;
    }
    sum+=LCP[i];
    maximum=max(maximum, LCP[i]);
  }
  printf("LCP[%d]=%" PRIdN "\n",0,LCP[0]);
  printf("LCP_mean = %.2lf\n", (double)sum/(double)n);
  printf("LCP_max = %" PRIdN "\n", maximum);
  
return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdi, 0x10(%rsp)
cmpq $0x2, %rcx
jb 0x5cdd
movzbl %r9b, %edi
movl $0x1, %eax
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %rdx, 0x8(%rsp)
movq %rsi, (%rsp)
movq -0x8(%rsi,%rax,8), %rcx
movq (%rsi,%rax,8), %r10
movq %r14, %r13
subq %rcx, %r13
jbe 0x5c8e
movq 0x10(%rsp), %rdx
leaq (%rdx,%rcx,8), %rbp
addq %rdx, %rcx
leaq (%rdx,%r10,8), %r15
addq %r10, %rdx
xorl %r11d, %r11d
leaq (%r10,%r11), %rsi
cmpq %r14, %rsi
jae 0x5c83
cmpl $0x8, %r8d
jne 0x5c69
movq (%rbp,%r11,8), %rsi
cmpq (%r15,%r11,8), %rsi
jne 0x5c83
cmpq %rdi, %rsi
jne 0x5c78
jmp 0x5c83
movb (%rcx,%r11), %sil
cmpb (%rdx,%r11), %sil
jne 0x5c83
cmpb %r9b, %sil
je 0x5c83
incq %r11
cmpq %r11, %r13
jne 0x5c48
movq %r13, %r11
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
jmp 0x5c91
xorl %r11d, %r11d
movq (%rdx,%rax,8), %rcx
cmpq %r11, %rcx
jne 0x5d4d
addq %r11, %r12
cmpq %r11, %rbx
cmovleq %r11, %rbx
incq %rax
cmpq %r14, %rax
jne 0x5c21
movq %r12, %xmm0
punpckldq 0x534f(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x5357(%rip), %xmm0     # 0xb020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
jmp 0x5ce9
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
xorl %ebx, %ebx
movq (%rdx), %rdx
leaq 0x5d60(%rip), %rdi      # 0xba53
xorl %esi, %esi
xorl %eax, %eax
callq 0x20f0
movq %r14, %xmm0
punpckldq 0x5307(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x530f(%rip), %xmm0     # 0xb020
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
leaq 0x5d32(%rip), %rdi      # 0xba60
movb $0x1, %al
callq 0x20f0
leaq 0x5d36(%rip), %rdi      # 0xba72
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
movl $0x1, %ebx
jmp 0x5d70
movq 0x9274(%rip), %rdx      # 0xefc8
movq (%rdx), %rdi
leaq 0x5cbd(%rip), %rsi      # 0xba1b
xorl %ebx, %ebx
movq %rax, %rdx
movq %r11, %r8
movq %r10, %r9
xorl %eax, %eax
callq 0x2190
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
testq %rcx, %rcx
je 0x5e1f
movl %r8d, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
xorl %r14d, %r14d
movq (%r12,%r14,8), %rdx
movq (%r15,%r14,8), %rcx
leaq 0x5ce3(%rip), %rdi      # 0xba9a
movq %r14, %rsi
xorl %eax, %eax
callq 0x20f0
cmpq $-0x9, (%r15,%r14,8)
jl 0x5e0c
movq (%r12,%r14,8), %rbp
cmpl $0x8, %ebx
jne 0x5dd8
movq (%r13,%rbp,8), %rsi
jmp 0x5dde
movzbl (%r13,%rbp), %esi
leaq 0x5bf8(%rip), %rdi      # 0xb9dd
xorl %eax, %eax
callq 0x20f0
incq %rbp
movq (%r15,%r14,8), %rax
leaq 0xa(%rax), %rcx
testq %rax, %rax
movl $0xa, %eax
cmovgq %rax, %rcx
addq (%r12,%r14,8), %rcx
cmpq %rcx, %rbp
jl 0x5dcc
movl $0xa, %edi
callq 0x2040
incq %r14
cmpq (%rsp), %r14
jne 0x5da8
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, %rdi
callq 0x20d0
movq %rax, %r12
movq %r13, %rdi
callq 0x20d0
addq %rax, %r12
movq %r12, %rdi
callq 0x9fe6
movq %rax, %r12
leaq 0x5b46(%rip), %rsi      # 0xb9bb
movq %rax, %rdi
movq %rbp, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x2260
leaq 0x57b7(%rip), %rsi      # 0xb643
movq %r12, %rdi
callq 0x4413
movq %rax, %r13
testq %rbx, %rbx
jle 0x5ed3
movl $0x8, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r13, %rcx
callq 0x2280
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rcx
callq 0x2280
addq $0x8, %r14
addq $0x8, %r15
decq %rbx
jne 0x5e9c
movq %r13, %rdi
callq 0x4437
movq %r12, %rdi
callq 0xa09d
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: compute_lcp_phi_sparse
void compute_lcp_phi_sparse(int_t *s, uint_t *SA1, 
  uint_t *RA, int_t *LCP, int_t *PLCP,
  uint_t n1, int cs, uint_t separator) {

  uint_t i;

  PLCP[SA1[0]]=0;//PLCP* (lms) is stored in PLCP array
  for(i=1; i<n1; i++)
    PLCP[SA1[i]] = LCP[i]; 

  LCP[SA1[0]]=0;//PHI is stored in LCP array
  for(i=1; i<n1; i++)
    LCP[SA1[i]] = SA1[i-1]; //RA[SA1[i-1]];

  int_t l=0; //q=0;
  for(i=0; i<n1-1;i++){
    if(chr(RA[i])==separator) continue;

    l = max(PLCP[i], l);//consider the LCP-value of the lms-substrings

    while(chr(RA[i]+l)==chr(RA[LCP[i]]+l) && !(chr(RA[i]+l) == separator && chr(RA[LCP[i]]+l)==separator) ) ++l;
    PLCP[i]=l;

    if(LCP[i]==n1-1) l -= RA[i+1]-RA[i];
    else l -= max(RA[i+1]-RA[i], RA[LCP[i]+1]-RA[LCP[i]]);//LCP[i] stores the distance of i-th suffix to its successor
  }

  LCP[0]=0;
  for(i=1; i<n1;i++) LCP[i]=PLCP[SA1[i]];

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rsi), %rax
movq $0x0, (%r8,%rax,8)
cmpq $0x2, %r9
jb 0x5f8c
movl $0x1, %eax
movq (%rcx,%rax,8), %r11
movq (%rsi,%rax,8), %r10
movq %r11, (%r8,%r10,8)
incq %rax
cmpq %rax, %r9
jne 0x5f47
movq (%rsi), %rax
movq $0x0, (%rcx,%rax,8)
cmpq $0x2, %r9
jb 0x609a
movl $0x1, %eax
movq -0x8(%rsi,%rax,8), %r11
movq (%rsi,%rax,8), %r10
movq %r11, (%rcx,%r10,8)
incq %rax
cmpq %rax, %r9
jne 0x5f75
jmp 0x5f97
movq (%rsi), %rax
movq $0x0, (%rcx,%rax,8)
movq %r9, %rbp
decq %rbp
je 0x609a
movq %r9, -0x8(%rsp)
movq 0x40(%rsp), %r10
movl 0x38(%rsp), %r11d
xorl %ebx, %ebx
xorl %r14d, %r14d
movq (%rdx,%r14,8), %r12
cmpl $0x8, %r11d
jne 0x5fc7
movq (%rdi,%r12,8), %rax
jmp 0x5fcc
movzbl (%rdi,%r12), %eax
cmpq %r10, %rax
je 0x6061
movq %rbp, %r9
movq (%r8,%r14,8), %rax
cmpq %rbx, %rax
cmovgq %rax, %rbx
leaq (%rdi,%r12), %r15
leaq (%rdi,%r12,8), %r12
movq (%rcx,%r14,8), %rax
movq (%rdx,%rax,8), %rax
leaq (%rdi,%rax), %r13
leaq (%rdi,%rax,8), %rbp
cmpl $0x8, %r11d
jne 0x6014
movq (%r12,%rbx,8), %rax
cmpq (%rbp,%rbx,8), %rax
jne 0x602a
cmpq %r10, (%r12,%rbx,8)
je 0x6020
jmp 0x6025
movzbl (%r15,%rbx), %eax
cmpb (%r13,%rbx), %al
jne 0x602a
cmpq %r10, %rax
je 0x602a
incq %rbx
jmp 0x5ffb
movq %rbx, (%r8,%r14,8)
movq (%rcx,%r14,8), %r12
movq (%rdx,%r14,8), %r13
movq 0x8(%rdx,%r14,8), %r15
movq %r9, %rbp
cmpq %r9, %r12
jne 0x604b
subq %r15, %r13
addq %r13, %rbx
jmp 0x6061
subq %r13, %r15
movq 0x8(%rdx,%r12,8), %rax
subq (%rdx,%r12,8), %rax
cmpq %rax, %r15
cmovaq %r15, %rax
subq %rax, %rbx
incq %r14
cmpq %rbp, %r14
jne 0x5fb7
movq $0x0, (%rcx)
movq -0x8(%rsp), %r9
cmpq $0x2, %r9
jb 0x60a1
movl $0x1, %eax
movq (%rsi,%rax,8), %rdx
movq (%r8,%rdx,8), %rdx
movq %rdx, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r9
jne 0x6084
jmp 0x60a1
movq $0x0, (%rcx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movl %r8d, %ebx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movl %ecx, %r15d
testl %ecx, %ecx
je 0x60e7
leaq (,%r15,8), %rdx
movq %r14, %rdi
xorl %esi, %esi
movl %ecx, 0x4(%rsp)
callq 0x2150
movl 0x4(%rsp), %ecx
testq %r12, %r12
je 0x610c
xorl %eax, %eax
cmpl $0x8, %ebp
jne 0x60fa
movq (%r13,%rax,8), %rdx
jmp 0x6100
movzbl (%r13,%rax), %edx
incq (%r14,%rdx,8)
incq %rax
cmpq %rax, %r12
jne 0x60ee
testl %ecx, %ecx
je 0x6132
xorl %ecx, %ecx
xorl %eax, %eax
movq (%r14,%rax,8), %rdx
testl %ebx, %ebx
leaq -0x1(%rdx,%rcx), %rsi
cmoveq %rcx, %rsi
addq %rdx, %rcx
movq %rsi, (%r14,%rax,8)
incq %rax
cmpq %rax, %r15
jne 0x6114
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movl 0x40(%rsp), %ebp
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
movl $0x1, %r8d
movl %ebp, %r9d
callq 0x60ac
decq %r14
je 0x61ae
movq (%r15,%r14,8), %rax
movq $0x0, (%r15,%r14,8)
cmpl $0x8, %ebp
jne 0x6196
movq (%r13,%rax,8), %rcx
jmp 0x619c
movzbl (%r13,%rax), %ecx
movq (%r12,%rcx,8), %rdx
leaq -0x1(%rdx), %rsi
movq %rsi, (%r12,%rcx,8)
movq %rax, (%r15,%rdx,8)
jmp 0x6179
decq %rbx
movq %rbx, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl 0x40(%rsp), %ebp
movq 0x48(%rsp), %r13
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
movl $0x1, %r8d
movl %ebp, %r9d
callq 0x60ac
movq (%r15,%r13,8), %rax
leaq -0x1(%rax), %rcx
movq %rcx, (%r15,%r13,8)
decq %rbx
je 0x623c
movq (%r14,%rbx,8), %rcx
movq $0x0, (%r14,%rbx,8)
cmpl $0x8, %ebp
jne 0x6225
movq (%r12,%rcx,8), %rdx
jmp 0x622a
movzbl (%r12,%rcx), %edx
movq (%r15,%rdx,8), %rsi
leaq -0x1(%rsi), %rdi
movq %rdi, (%r15,%rdx,8)
movq %rcx, (%r14,%rsi,8)
jmp 0x6209
movq (%r14), %rcx
decq %rcx
movq %rcx, (%r14,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl 0x48(%rsp), %ebp
movq 0x40(%rsp), %r13
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
movl $0x1, %r8d
movl %ebp, %r9d
callq 0x60ac
movq 0x50(%rsp), %rdx
movq (%r14,%rdx,8), %rax
leaq -0x1(%rax), %rcx
movq %rcx, (%r14,%rdx,8)
decq %r13
je 0x62f8
movq (%rbx,%r13,8), %rdx
movq $-0x1, (%rbx,%r13,8)
movq (%r12,%r13,8), %rcx
movq $0x0, (%r12,%r13,8)
cmpl $0x8, %ebp
jne 0x62d4
movq (%r15,%rdx,8), %rsi
movq (%r14,%rsi,8), %rsi
movq %rdx, (%rbx,%rsi,8)
movq (%r15,%rdx,8), %rdx
jmp 0x62e6
movzbl (%r15,%rdx), %esi
movq (%r14,%rsi,8), %rsi
movq %rdx, (%rbx,%rsi,8)
movzbl (%r15,%rdx), %edx
movq (%r14,%rdx,8), %rsi
leaq -0x1(%rsi), %rdi
movq %rdi, (%r14,%rdx,8)
movq %rcx, (%r12,%rsi,8)
jmp 0x62a0
movq (%rbx), %rcx
decq %rcx
movq %rcx, (%rbx,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSuffix0_generalized_DA
void putSuffix0_generalized_DA(uint_t *SA, int_t *DA,
  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;
    DA[bkt[chr(j)]--]=DA[i];
  }

 // SA[0]=n-1; // set the single sentinel suffix.

  SA[tmp]=SA[0]-1;// insert the last separator at the end of bkt[separator]
  DA[tmp]=tmp-1;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl 0x48(%rsp), %ebp
movq 0x40(%rsp), %r13
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
movl $0x1, %r8d
movl %ebp, %r9d
callq 0x60ac
movq 0x50(%rsp), %rdx
movq (%r15,%rdx,8), %rax
leaq -0x1(%rax), %rcx
movq %rcx, (%r15,%rdx,8)
decq %r13
je 0x63ac
movq (%r14,%r13,8), %rdx
movq $0x0, (%r14,%r13,8)
cmpl $0x8, %ebp
jne 0x6384
movq (%r12,%rdx,8), %rsi
movq (%r15,%rsi,8), %rsi
movq %rdx, (%r14,%rsi,8)
movq (%r12,%rdx,8), %rdx
jmp 0x6396
movzbl (%r12,%rdx), %esi
movq (%r15,%rsi,8), %rsi
movq %rdx, (%r14,%rsi,8)
movzbl (%r12,%rdx), %edx
movq (%rbx,%r13,8), %rsi
movq (%r15,%rdx,8), %rdi
leaq -0x1(%rdi), %r8
movq %r8, (%r15,%rdx,8)
movq %rsi, (%rbx,%rdi,8)
jmp 0x635c
movq (%r14), %rdx
decq %rdx
movq %rdx, (%r14,%rax,8)
movq %rcx, (%rbx,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSuffix0_generalized_LCP_DA
void putSuffix0_generalized_LCP_DA(uint_t *SA, int_t *LCP,  int_t *DA, 
  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;
    DA[bkt[chr(j)]]=DA[i];
    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]
  DA[tmp]=tmp-1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rax
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movl 0x50(%rsp), %r9d
movq 0x48(%rsp), %rbp
movl 0x40(%rsp), %ecx
movq %r12, %rdi
movq %r8, %rsi
movq %rax, %rdx
movl $0x1, %r8d
callq 0x60ac
movl 0x50(%rsp), %r9d
movq 0x58(%rsp), %rdx
movq (%r15,%rdx,8), %rax
leaq -0x1(%rax), %rcx
movq %rcx, (%r15,%rdx,8)
decq %rbp
je 0x649b
movq (%r14,%rbp,8), %rsi
movq $-0x1, (%r14,%rbp,8)
movq (%r13,%rbp,8), %rdx
movq $0x0, (%r13,%rbp,8)
cmpl $0x8, %r9d
jne 0x6465
movq (%r12,%rsi,8), %rdi
movq (%r15,%rdi,8), %rdi
movq %rsi, (%r14,%rdi,8)
movq (%rbx,%rbp,8), %rdi
movq (%r12,%rsi,8), %r8
movq (%r15,%r8,8), %r8
movq %rdi, (%rbx,%r8,8)
movq (%r12,%rsi,8), %rsi
jmp 0x6488
movzbl (%r12,%rsi), %edi
movq (%r15,%rdi,8), %rdi
movq %rsi, (%r14,%rdi,8)
movq (%rbx,%rbp,8), %rdi
movzbl (%r12,%rsi), %r8d
movq (%r15,%r8,8), %r8
movq %rdi, (%rbx,%r8,8)
movzbl (%r12,%rsi), %esi
movq (%r15,%rsi,8), %rdi
leaq -0x1(%rdi), %r8
movq %r8, (%r15,%rsi,8)
movq %rdx, (%r13,%rdi,8)
jmp 0x641e
movq (%r14), %rdx
decq %rdx
movq %rdx, (%r14,%rax,8)
movq %rcx, (%rbx,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: induceSAl0
void induceSAl0(uint_t *SA,
  int_t *s, uint_t *bkt,
  uint_t n, unsigned int K, int_t suffix, int cs) {
  uint_t i, j;

  // find the head of each bucket.
  getBuckets_k(s, bkt, n, K, false, cs);

  bkt[0]++; // skip the virtual sentinel.
  for(i=0; i<n; i++)
    if(SA[i]>0) {
      j=SA[i]-1;
      if(chr(j)>=chr(j+1)) {
        SA[bkt[chr(j)]]=j;
        bkt[chr(j)]++;
        if(!suffix && i>0) SA[i]=0;
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x40(%rsp), %ebp
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x60ac
incq (%r15)
testq %r14, %r14
je 0x6564
xorl %eax, %eax
movq (%r13,%rax,8), %rcx
testq %rcx, %rcx
je 0x655c
leaq -0x1(%rcx), %rdx
cmpl $0x8, %ebp
jne 0x6525
movq -0x8(%r12,%rcx,8), %rsi
cmpq (%r12,%rcx,8), %rsi
jl 0x655c
movq (%r15,%rsi,8), %rsi
movq %rdx, (%r13,%rsi,8)
movq -0x8(%r12,%rcx,8), %rcx
jmp 0x653f
movzbl -0x1(%r12,%rcx), %esi
cmpb (%r12,%rcx), %sil
jb 0x655c
movq (%r15,%rsi,8), %rcx
movq %rdx, (%r13,%rcx,8)
movzbl (%r12,%rdx), %ecx
testq %rbx, %rbx
setne %dl
incq (%r15,%rcx,8)
testq %rax, %rax
sete %cl
orb %dl, %cl
jne 0x655c
movq $0x0, (%r13,%rax,8)
incq %rax
cmpq %rax, %r14
jne 0x64f7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: induceSAs0
void induceSAs0(uint_t *SA,
  int_t *s, uint_t *bkt,
  uint_t n, unsigned int K, int_t suffix, int cs) {
  uint_t i, j;

  // find the end of each bucket.
  getBuckets_k(s, bkt, n, K, true, cs);

  for(i=n-1; i>0; i--)
    if(SA[i]>0) {
      j=SA[i]-1;
      if(chr(j)<=chr(j+1) && bkt[chr(j)]<i) {
        SA[bkt[chr(j)]]=j;
        bkt[chr(j)]--;
        if(!suffix) SA[i]=0;
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x40(%rsp), %ebp
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
movl $0x1, %r8d
movl %ebp, %r9d
callq 0x60ac
decq %r14
je 0x6616
movq (%r13,%r14,8), %rcx
testq %rcx, %rcx
je 0x65ab
leaq -0x1(%rcx), %rax
cmpl $0x8, %ebp
jne 0x65e3
movq -0x8(%r12,%rcx,8), %rdx
cmpq (%r12,%rcx,8), %rdx
jg 0x65ab
movq (%r15,%rdx,8), %rdx
cmpq %r14, %rdx
jae 0x65ab
movq %rax, (%r13,%rdx,8)
movq -0x8(%r12,%rcx,8), %rax
jmp 0x6602
movzbl -0x1(%r12,%rcx), %edx
cmpb (%r12,%rcx), %dl
ja 0x65ab
movq (%r15,%rdx,8), %rcx
cmpq %r14, %rcx
jae 0x65ab
movq %rax, (%r13,%rcx,8)
movzbl (%r12,%rax), %eax
decq (%r15,%rax,8)
testq %rbx, %rbx
jne 0x65ab
movq $0x0, (%r13,%r14,8)
jmp 0x65ab
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: induceSAl0_generalized
void induceSAl0_generalized(uint_t *SA,
  uint_t *s, uint_t *bkt,
  uint_t n, unsigned int K, int_t suffix, int cs, uint_t separator) {
  uint_t i, j;

  // find the head of each bucket.
  getBuckets_k((int_t*)s, bkt, n, K, false, cs);

  bkt[0]++; // skip the virtual sentinel.
  for(i=0; i<n; i++)
    if(SA[i]>0) {
      j=SA[i]-1;
      if(chr(j)>=chr(j+1) ) {
	if(chr(j)!=separator)//gsa-is
          SA[bkt[chr(j)]++]=j;
        if(!suffix && i>0) SA[i]=0;
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x40(%rsp), %ebp
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x60ac
incq (%r15)
testq %r14, %r14
je 0x66cd
movq 0x48(%rsp), %rax
xorl %ecx, %ecx
movq (%r13,%rcx,8), %rdx
testq %rdx, %rdx
je 0x66c5
cmpl $0x8, %ebp
jne 0x6685
movq -0x8(%r12,%rdx,8), %rsi
cmpq (%r12,%rdx,8), %rsi
jge 0x6691
jmp 0x66c5
movzbl -0x1(%r12,%rdx), %esi
cmpb (%r12,%rdx), %sil
jb 0x66c5
cmpq %rax, %rsi
je 0x66aa
decq %rdx
movq (%r15,%rsi,8), %rdi
leaq 0x1(%rdi), %r8
movq %r8, (%r15,%rsi,8)
movq %rdx, (%r13,%rdi,8)
testq %rbx, %rbx
setne %dl
testq %rcx, %rcx
sete %sil
orb %dl, %sil
jne 0x66c5
movq $0x0, (%r13,%rcx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x6669
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: induceSAs0_generalized
void induceSAs0_generalized(uint_t *SA,
  uint_t *s, uint_t *bkt,
  uint_t n, uint_t K, int_t suffix, 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);

  for(i=n-1; i>0; i--)
    if(SA[i]>0) {
      j=SA[i]-1;
      if(chr(j)<=chr(j+1) && bkt[chr(j)]<i) {
        if(chr(j)!=separator)
	  SA[bkt[chr(j)]--]=j;
        if(!suffix) SA[i]=0;
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x40(%rsp), %ebp
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
movl $0x1, %r8d
movl %ebp, %r9d
callq 0x60ac
decq %r14
je 0x6777
movq 0x48(%rsp), %rax
movq (%r13,%r14,8), %rcx
testq %rcx, %rcx
je 0x6772
cmpl $0x8, %ebp
jne 0x673a
movq -0x8(%r12,%rcx,8), %rdx
cmpq (%r12,%rcx,8), %rdx
jle 0x6746
jmp 0x6772
movzbl -0x1(%r12,%rcx), %edx
cmpb (%r12,%rcx), %dl
ja 0x6772
movq (%r15,%rdx,8), %rsi
cmpq %r14, %rsi
jae 0x6772
cmpq %rax, %rdx
je 0x6764
decq %rcx
leaq -0x1(%rsi), %rdi
movq %rdi, (%r15,%rdx,8)
movq %rcx, (%r13,%rsi,8)
testq %rbx, %rbx
jne 0x6772
movq $0x0, (%r13,%r14,8)
decq %r14
jne 0x671e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: induceSAl0_generalized_DA
void induceSAl0_generalized_DA(uint_t *SA, int_t* DA,
  uint_t *s, uint_t *bkt,
  uint_t n, unsigned int K, int cs, uint_t separator) {
  uint_t i, j;

  // find the head of each bucket.
  getBuckets_k((int_t*)s, bkt, n, K, false, cs);

  bkt[0]++; // skip the virtual sentinel.
  for(i=0; i<n; i++)
    if(SA[i]>0) {
      j=SA[i]-1;
      if(chr(j)>=chr(j+1) ) {
	    if(chr(j)!=separator){//gsa-is
          SA[bkt[chr(j)]]=j;
          DA[bkt[chr(j)]++]=DA[i];
	    }
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x40(%rsp), %ebp
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x60ac
incq (%r14)
testq %rbx, %rbx
je 0x7173
movq 0x48(%rsp), %rax
xorl %ecx, %ecx
movq (%r13,%rcx,8), %rsi
testq %rsi, %rsi
je 0x716b
leaq -0x1(%rsi), %rdx
cmpl $0x8, %ebp
jne 0x7138
movq -0x8(%r15,%rsi,8), %rdi
cmpq (%r15,%rsi,8), %rdi
setl %r8b
cmpq %rax, %rdi
sete %r9b
orb %r8b, %r9b
jne 0x716b
movq (%r14,%rdi,8), %rdi
movq %rdx, (%r13,%rdi,8)
movq -0x8(%r15,%rsi,8), %rdx
jmp 0x7157
movzbl -0x1(%r15,%rsi), %edi
cmpb (%r15,%rsi), %dil
jb 0x716b
cmpq %rax, %rdi
je 0x716b
movq (%r14,%rdi,8), %rsi
movq %rdx, (%r13,%rsi,8)
movzbl (%r15,%rdx), %edx
movq (%r12,%rcx,8), %rsi
movq (%r14,%rdx,8), %rdi
leaq 0x1(%rdi), %r8
movq %r8, (%r14,%rdx,8)
movq %rsi, (%r12,%rdi,8)
incq %rcx
cmpq %rcx, %rbx
jne 0x70fc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: induceSAs0_generalized_DA
void induceSAs0_generalized_DA(uint_t *SA, int_t* DA,
  uint_t *s, uint_t *bkt,
  uint_t n, uint_t K, 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);

  for(i=n-1; i>0; i--)
    if(SA[i]>0) {
      j=SA[i]-1;
      if(chr(j)<=chr(j+1) && bkt[chr(j)]<i) {
        if(chr(j)!=separator){
		  SA[bkt[chr(j)]]=j;
		  DA[bkt[chr(j)]--]=DA[i];
	    }
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl 0x40(%rsp), %ebp
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
movl $0x1, %r8d
movl %ebp, %r9d
callq 0x60ac
decq %rbx
je 0x7253
movq 0x48(%rsp), %rax
movq (%r13,%rbx,8), %rdx
testq %rdx, %rdx
je 0x724a
leaq -0x1(%rdx), %rcx
cmpl $0x8, %ebp
jne 0x7209
movq -0x8(%r15,%rdx,8), %rdi
cmpq (%r15,%rdx,8), %rdi
jg 0x724a
movq (%r14,%rdi,8), %rsi
cmpq %rbx, %rsi
setae %r8b
cmpq %rax, %rdi
sete %dil
orb %r8b, %dil
jne 0x724a
movq %rcx, (%r13,%rsi,8)
movq -0x8(%r15,%rdx,8), %rcx
jmp 0x7236
movzbl -0x1(%r15,%rdx), %esi
cmpb (%r15,%rdx), %sil
ja 0x724a
movq (%r14,%rsi,8), %rdx
cmpq %rbx, %rdx
setae %dil
cmpq %rax, %rsi
sete %sil
orb %dil, %sil
jne 0x724a
movq %rcx, (%r13,%rdx,8)
movzbl (%r15,%rcx), %ecx
movq (%r12,%rbx,8), %rdx
movq (%r14,%rcx,8), %rsi
leaq -0x1(%rsi), %rdi
movq %rdi, (%r14,%rcx,8)
movq %rdx, (%r12,%rsi,8)
decq %rbx
jne 0x71c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSubstr0
void putSubstr0(uint_t *SA,
  int_t *s, uint_t *bkt,
  uint_t n, unsigned int K, int cs) {
  uint_t i, cur_t, succ_t;

  // find the end of each bucket.
  getBuckets_k(s, bkt, n, K, true, cs);

  // set each item in SA as empty.
  for(i=0; i<n; i++) SA[i]=0;

  succ_t=0; // s[n-2] must be L-type.
  for(i=n-2; i>0; i--) {
    cur_t=(chr(i-1)<chr(i) ||
           (chr(i-1)==chr(i) && succ_t==1)
          )?1:0;
    if(cur_t==0 && succ_t==1) SA[bkt[chr(i)]--]=i;
    succ_t=cur_t;
  }

  // set the single sentinel LMS-substring.
  SA[0]=n-1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
movl $0x1, %r8d
callq 0x60ac
testq %rbx, %rbx
je 0x7c4a
leaq (,%rbx,8), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2150
movq %rbx, %rax
addq $-0x2, %rax
jne 0x7c51
jmp 0x7c9e
movq $-0x2, %rax
xorl %ecx, %ecx
cmpl $0x8, %ebp
jne 0x7c67
movq (%r12,%rax,8), %rsi
movb $0x1, %dl
cmpq %rsi, -0x8(%r12,%rax,8)
jge 0x7c7b
jmp 0x7c97
movb -0x1(%r12,%rax), %dil
movzbl (%r12,%rax), %esi
movb $0x1, %dl
cmpb %sil, %dil
jb 0x7c97
cmpb %sil, %dil
sete %dl
andb %cl, %dl
andb $0x1, %cl
cmpb %dl, %cl
je 0x7c97
movq (%r15,%rsi,8), %rcx
leaq -0x1(%rcx), %rdi
movq %rdi, (%r15,%rsi,8)
movq %rax, (%r14,%rcx,8)
movl %edx, %ecx
decq %rax
jne 0x7c53
decq %rbx
movq %rbx, (%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSubstr0_generalized
void putSubstr0_generalized(uint_t *SA,
  uint_t *s, uint_t *bkt,
  uint_t n, unsigned int K, int cs, uint_t separator) {
  uint_t i, cur_t, succ_t;

  // find the end of each bucket.
  getBuckets_k((int_t*)s, bkt, n, K, true, cs);

  // set each item in SA as empty.
  for(i=0; i<n; i++) SA[i]=0;

  // gsa-is
  int_t tmp=bkt[separator]--;// shifts one position left of bkt[separator]
  
  SA[0]=n-1;// set the single sentinel LMS-substring.

  SA[tmp] = SA[0]-1; // insert the last separator at the end of bkt[separator]

  int_t p=n-2;

  succ_t=0; // s[n-2] must be L-type.
  for(i=n-2; i>0; i--) {
    cur_t=(chr(i-1)<chr(i) ||
           (chr(i-1)==chr(i) && succ_t==1)
          )?1:0;
    if(cur_t==0 && succ_t==1){

      if(chr(i)==separator)
        SA[++bkt[chr(p)]]=0; // removes LMS-positions that induces separator suffixes

      SA[bkt[chr(i)]--]=i;
      p=i;
    }
    succ_t=cur_t;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x40(%rsp), %rbp
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
movl $0x1, %r8d
callq 0x60ac
testq %r13, %r13
je 0x7cfa
leaq (,%r13,8), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2150
movq (%r14,%rbp,8), %rax
leaq -0x1(%rax), %rcx
movq %rcx, (%r14,%rbp,8)
leaq -0x1(%r13), %rcx
movq %rcx, (%r12)
addq $-0x2, %r13
movq %r13, (%r12,%rax,8)
je 0x7dc9
xorl %edx, %edx
movq %r13, %rax
cmpl $0x8, %ebx
jne 0x7d67
movq (%r15,%rax,8), %rsi
movb $0x1, %cl
cmpq %rsi, -0x8(%r15,%rax,8)
jl 0x7dbe
sete %cl
andb %dl, %cl
andb $0x1, %dl
cmpb %cl, %dl
je 0x7dbe
cmpq %rbp, %rsi
jne 0x7d61
movq (%r15,%r13,8), %rdx
movq (%r14,%rdx,8), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, (%r14,%rdx,8)
movq $0x0, 0x8(%r12,%rsi,8)
movq (%r15,%rax,8), %rsi
jmp 0x7dab
movb -0x1(%r15,%rax), %dil
movzbl (%r15,%rax), %esi
movb $0x1, %cl
cmpb %sil, %dil
jb 0x7dbe
cmpb %sil, %dil
sete %cl
andb %dl, %cl
andb $0x1, %dl
cmpb %cl, %dl
je 0x7dbe
cmpq %rbp, %rsi
jne 0x7dab
movzbl (%r15,%r13), %edx
movq (%r14,%rdx,8), %rsi
leaq 0x1(%rsi), %rdi
movq %rdi, (%r14,%rdx,8)
movq $0x0, 0x8(%r12,%rsi,8)
movzbl (%r15,%rax), %esi
movq (%r14,%rsi,8), %rdx
leaq -0x1(%rdx), %rdi
movq %rdi, (%r14,%rsi,8)
movq %rax, (%r12,%rdx,8)
movq %rax, %r13
movl %ecx, %edx
decq %rax
jne 0x7d21
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: putSuffix1
void putSuffix1(int_t *SA, int_t *s, int_t n1, int cs) {
  int_t i, j, pos=n1, cur, pre=-1;
  
  for(i=n1-1; i>0; i--) {
    j=SA[i]; SA[i]=EMPTY_k;
    cur=chr(j);
    if(cur!=pre) {
      pre=cur; pos=cur;
    }
    SA[pos--]=j;
  }
}

// Assembly:
cmpq $0x2, %rdx
jl 0x7e27
leaq 0x1(%rdx), %rax
movq $-0x1, %r9
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
movq -0x10(%rdi,%rax,8), %r10
movq %r8, -0x10(%rdi,%rax,8)
cmpl $0x8, %ecx
jne 0x7e08
movq (%rsi,%r10,8), %r11
jmp 0x7e0d
movzbl (%rsi,%r10), %r11d
cmpq %r9, %r11
cmovneq %r11, %rdx
movq %r10, (%rdi,%rdx,8)
decq %rdx
decq %rax
movq %r11, %r9
cmpq $0x2, %rax
ja 0x7df3
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: getLengthOfLMS
uint_t getLengthOfLMS(int_t *s, 
  uint_t n, int level, uint_t x, int cs) {
  if(x==n-1) return 1;  
  
  uint_t dist=0, i=1;  
  while(1) {
    if(chr(x+i)<chr(x+i-1)) break;
    i++;
  }  
  while(1) {
    if(x+i>n-1 || chr(x+i)>chr(x+i-1)) break;
    if(x+i==n-1 || chr(x+i)<chr(x+i-1)) dist=i;
    i++;
  }
  
  return dist+1;
}

// Assembly:
decq %rsi
movl $0x1, %eax
cmpq %rcx, %rsi
je 0x845e
pushq %rbx
leaq (%rdi,%rcx,8), %r9
addq $0x8, %r9
leaq (%rdi,%rcx), %r10
incq %r10
xorl %edx, %edx
cmpl $0x8, %r8d
jne 0x83e8
movq -0x8(%r9,%rdx,8), %rbx
movq (%r9,%rdx,8), %r11
jmp 0x83f3
movzbl (%r10,%rdx), %r11d
movzbl -0x1(%r10,%rdx), %ebx
incq %rdx
cmpq %rbx, %r11
jge 0x83d7
addq %rdx, %rcx
cmpq %rsi, %rcx
popq %rbx
ja 0x845e
xorl %eax, %eax
cmpl $0x8, %r8d
jne 0x8417
movq -0x8(%rdi,%rcx,8), %r10
movq (%rdi,%rcx,8), %r9
jmp 0x8422
movzbl (%rdi,%rcx), %r9d
movzbl -0x1(%rdi,%rcx), %r10d
cmpq %r10, %r9
jg 0x845b
cmpq %rcx, %rsi
je 0x844d
cmpl $0x8, %r8d
jne 0x843d
movq -0x8(%rdi,%rcx,8), %r10
movq (%rdi,%rcx,8), %r9
jmp 0x8448
movzbl (%rdi,%rcx), %r9d
movzbl -0x1(%rdi,%rcx), %r10d
cmpq %r10, %r9
jge 0x8450
movq %rdx, %rax
incq %rdx
incq %rcx
cmpq %rsi, %rcx
jbe 0x8406
incq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/felipelouza[P]egap/tools/src/gsacak.c
// Function: getSAlms
void getSAlms(uint_t *SA, 
  int_t *s, 
  uint_t *s1, uint_t n, 
  uint_t n1, int level, int cs) {
  uint_t i, j, cur_t, succ_t;

  j=n1-1; s1[j--]=n-1;
  succ_t=0; // s[n-2] must be L-type
  for(i=n-2; i>0; i--) {
    cur_t=(chr(i-1)<chr(i) ||
          (chr(i-1)==chr(i) && succ_t==1))?1:0;
    if(cur_t==0 && succ_t==1) s1[j--]=i;
    succ_t=cur_t;
  }
}

// Assembly:
leaq -0x1(%rcx), %rax
movq %rax, -0x8(%rdx,%r8,8)
addq $-0x2, %rcx
je 0x8c54
movl 0x8(%rsp), %eax
addq $-0x2, %r8
xorl %edi, %edi
cmpl $0x8, %eax
jne 0x8c1f
movq -0x8(%rsi,%rcx,8), %r10
movq (%rsi,%rcx,8), %r11
movb $0x1, %r9b
cmpq %r11, %r10
jge 0x8c32
jmp 0x8c4c
movzbl -0x1(%rsi,%rcx), %r10d
movzbl (%rsi,%rcx), %r11d
movb $0x1, %r9b
cmpb %r11b, %r10b
jb 0x8c4c
cmpq %r11, %r10
sete %r9b
andb %dil, %r9b
andb $0x1, %dil
cmpb %r9b, %dil
je 0x8c4c
movq %rcx, (%rdx,%r8,8)
decq %r8
movl %r9d, %edi
decq %rcx
jne 0x8c07
retq