LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/ck_args_wt_results.c
// Function: write_results_to_file
void write_results_to_file(struct smoothp* smp, struct rates* seisr, struct catalog * cat, struct boundaries *boundR, char *outf)
/*--------------------------------------------------------------------------*/
{
  int cnt;
  float magv;
  float tmpsum=0.0;

// quick check of earthquake numbers
  for (cnt=0; cnt<seisr->nv; cnt++) {
    tmpsum=tmpsum+seisr->asum[cnt]*7;
  }
  fprintf(stderr,"tmpsum (no. M0+ eqs in 7 years) = %.4f\n", tmpsum);

// if a smoothed seismicity model is generated, output results at M0(10^a), M4, M5 and unsmoothed model
  if ( smp->apply_sm ) {
// M0, 10^a values
    magv=0.0;
    write_asum_to_file(seisr, outf, cat, magv);
    fprintf(stderr,"Writing to csv file...\n");
    write_asum_to_csvfile(seisr, outf, cat, boundR, magv);
// M0, 10^a, un-smoothed 
//    write_unsmoothed_asum_to_file(seisr, outf);

// M3.0, 10^(a-3.0b) values
/*
*    magv=3.0;
*    write_asum_to_file(seisr, outf, cat, magv);
// M3.5, 10^(a-3.5b) values
*    magv=3.5;
*    write_asum_to_file(seisr, outf, cat, magv);
// M4, 10^(a-4b) values
*    magv=4.0;
*    write_asum_to_file(seisr, outf, cat, magv);
// M4.5, 10^(a-4.5b) values
*    magv=4.5;
*    write_asum_to_file(seisr, outf, cat, magv);
*
// M5, 10^(a-5b) values
*    magv=5.0;
*    write_asum_to_file(seisr, outf, cat, magv);
*/    
  }
  else {
    magv=0.0;
    write_asum_to_file(seisr, outf, cat, magv);
    magv=cat->minMag;
    write_asum_to_file(seisr, outf, cat, magv);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movslq 0x298100(%rsi), %rax
xorps %xmm0, %xmm0
testq %rax, %rax
jle 0x1bb4
xorps %xmm0, %xmm0
xorl %ecx, %ecx
movss 0x5a96(%rip), %xmm1     # 0x762c
movss 0x14c080(%r12,%rcx,4), %xmm2
mulss %xmm1, %xmm2
addss %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x1b96
cvtss2sd %xmm0, %xmm0
movq 0x843d(%rip), %rbp      # 0x9ff8
movq (%rbp), %rdi
leaq 0x5c9b(%rip), %rsi      # 0x7861
movb $0x1, %al
callq 0x1100
movl 0x8(%r13), %r13d
xorps %xmm0, %xmm0
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4afc
testl %r13d, %r13d
jne 0x1c08
movss 0x4(%rbx), %xmm0
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4afc
movq (%rbp), %rcx
leaq 0x5c76(%rip), %rdi      # 0x7889
pushq $0x17
popq %rsi
pushq $0x1
popq %rdx
callq 0x11a0
xorps %xmm0, %xmm0
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5180
// File: /workspace/github_c_makefile_star2_O1/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/read_write_params.c
// Function: read_params_new_old
int read_params_new_old(char *parf, struct compl_levels* cat_comp, struct boundaries* reg, 
  struct catalog* cat, struct smoothp* smp, char *outfnm, int new_style_formatting) 
/*--------------------------------------------------------------------------*/
{
  int retVal=0;

// read parameters
  if ( new_style_formatting ) {
//    retVal=read_params_new(parf, &cat_compl, &region, &cat, &smoothing_params, outf);
    retVal=read_params_new(parf, cat_comp, reg, cat, smp, outfnm);
    if ( (cat_comp->variableCompleteness) == 1 ) read_completenessVals(cat_comp);
    if ( ! retVal ) fprintf(stderr, "\nError reading parameter file, %s with newer-style formatting\n", outfnm); 
  }
  else {
//    retVal=read_params(parf, &cat_comp, &reg, &cat, &smp, outfnm);
    retVal=read_params(parf, cat_comp, reg, cat, smp, outfnm);
    if ( ! retVal ) fprintf(stderr, "\nError reading parameter file, %s with older-style formatting\n", outfnm); 
    fprintf(stderr,"Old-style formatting for parameter input is deprecated and is no longer supported. The option remains in the code for legacy comparisons but requires to user to modify the code to remove the exit statment in the read_write_params.c function.\n");
    exit(1);
  }
  cat_comp->end_yr=cat->end_yr;
  cat_comp->dMag=cat->dMag;

  return retVal;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rsi, %r15
cmpl $0x0, 0x30(%rsp)
je 0x2148
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r9
callq 0x219f
movl %eax, %ebp
cmpl $0x1, (%r15)
jne 0x2107
movq %r15, %rdi
callq 0x267b
testl %ebp, %ebp
je 0x212b
movl (%r14), %eax
movl %eax, 0x10(%r15)
movss 0x8(%r14), %xmm0
movss %xmm0, 0x64(%r15)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x7ec6(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4273(%rip), %rsi      # 0x63af
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0x210b
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r9
callq 0x26c4
testl %eax, %eax
jne 0x2175
movq 0x7e97(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x4283(%rip), %rsi      # 0x63ee
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1100
movq 0x7e7c(%rip), %rax      # 0x9ff8
movq (%rax), %rcx
leaq 0x42a7(%rip), %rdi      # 0x642d
movl $0xf2, %esi
movl $0x1, %edx
callq 0x11a0
movl $0x1, %edi
callq 0x1190
// File: /workspace/github_c_makefile_star2_O1/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/smooth_seis_rates.c
// Function: get_sigma_value
float get_sigma_value(struct smoothp* smp, struct eqcat* catn, int eqno)
/*--------------------------------------------------------------------------*/
{
  int neighbor_num=-999, neighbor_num_2=-999;
  float sigma;

// fixed-radius smoothing
  if (smp->adapt_sm == 0 ) {
    sigma=smp->sigfix;
  }
// adaptive-radius smoothing
  else {
// shift for c array indexing
    neighbor_num=smp->nnum-1;
    if ( smp->nnum2_log == 0 ) {
      sigma=catn->dist_nbr[eqno][neighbor_num];
    }
    else {
      neighbor_num_2=smp->nnum2-1;
      sigma=(catn->dist_nbr[eqno][neighbor_num]+catn->dist_nbr[eqno][neighbor_num_2])/2;
    }
    if (sigma < smp->sigmin) sigma=smp->sigmin;
  }
  
  return sigma;
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
je 0x401c
movslq 0x18(%rdi), %rax
decq %rax
cmpl $0x0, 0x10(%rdi)
je 0x4022
movslq 0x1c(%rdi), %rcx
movslq %edx, %rdx
leaq (%rdx,%rdx,4), %rdx
leaq (%rsi,%rdx,8), %rdx
cltq
movss 0xbe6e4(%rdx,%rax,4), %xmm0
addss 0xbe6e0(%rdx,%rcx,4), %xmm0
mulss 0x30be(%rip), %xmm0     # 0x70d8
jmp 0x4036
movss 0x2c(%rdi), %xmm0
retq
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rsi,%rcx,8), %rcx
movss 0xbe6e4(%rcx,%rax,4), %xmm0
movss 0x24(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x4021
movaps %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/smooth_seis_rates.c
// Function: check_earthquake_catalog_gaps
float check_earthquake_catalog_gaps(struct eqcat* eqcatp, struct compl_levels* cat_compp, int eqno)
/*--------------------------------------------------------------------------*/
{
  int cnt, cnt1, np, nyrs;
  int eqyr, eqmon, eqday, eqlineno;
  float eqlon, eqlat, eqmag;
  float plon[NPP], plat[NPP];

// assign coordinates
  eqlon=eqcatp->lon[eqno];
  eqlat=eqcatp->lat[eqno];
  eqmag=eqcatp->mag[eqno];
  eqyr=eqcatp->year[eqno];
  eqmon=eqcatp->month[eqno];
  eqday=eqcatp->day[eqno];
  eqlineno=eqcatp->lineno[eqno];

// loop through polygons and check if eq epicenter is within polygons
  for(cnt=0;cnt<cat_compp->polygons.npoly; cnt++) {
    np=cat_compp->polygons.elem[cnt].npts;
    nyrs=cat_compp->polygons.elem[cnt].nyears;
    for(cnt1=0;cnt1<np;cnt1++) {
      plon[cnt1]=cat_compp->polygons.elem[cnt].lon[cnt1];
      plat[cnt1]=cat_compp->polygons.elem[cnt].lat[cnt1];
    }
    if ( lxyint_(&eqlon,&eqlat,plon,plat,&np) ) { 
      fprintf(
          stderr,
          "EQ-reduced-time-for-rate: %8.3f %8.3f %6d %4d %4d %8.4f %6d\n",
          eqlon, eqlat, eqyr, eqmon, eqday, eqmag, eqlineno);
      return nyrs;
    }
  }

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movslq %edx, %rax
movss 0x668a4(%rdi,%rax,4), %xmm0
movss %xmm0, 0x8(%rsp)
movss 0x75304(%rdi,%rax,4), %xmm0
movss %xmm0, 0x4(%rsp)
xorps %xmm0, %xmm0
cmpl $0x0, 0x2983c4(%rsi)
jle 0x4154
movq %rsi, %r12
movss 0x57e44(%rdi,%rax,4), %xmm0
movss %xmm0, 0xc(%rsp)
movl 0x4(%rdi,%rax,4), %ecx
movl %ecx, 0x18(%rsp)
movl 0xea64(%rdi,%rax,4), %ecx
movl %ecx, 0x14(%rsp)
movl 0x1d4c4(%rdi,%rax,4), %ecx
movl %ecx, 0x10(%rsp)
movl 0x3a984(%rdi,%rax,4), %eax
movl %eax, 0x1c(%rsp)
leaq 0x2983c8(%rsi), %rbp
xorl %r13d, %r13d
leaq 0x80(%rsp), %r15
leaq 0x30(%rsp), %rbx
movq %rsi, 0x28(%rsp)
movslq (%rbp), %r14
movl %r14d, 0x24(%rsp)
movl 0x4(%rbp), %eax
movl %eax, 0x20(%rsp)
testq %r14, %r14
jle 0x411c
leaq 0x8(%rbp), %rsi
leaq 0x58(%rbp), %r12
shlq $0x2, %r14
movq %r15, %rdi
movq %r14, %rdx
callq 0x1120
movq %rbx, %rdi
movq %r12, %rsi
movq 0x28(%rsp), %r12
movq %r14, %rdx
callq 0x1120
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq %r15, %rdx
movq %rbx, %rcx
leaq 0x24(%rsp), %r8
callq 0x3a4d
testl %eax, %eax
jne 0x4166
incq %r13
movslq 0x2983c4(%r12), %rax
addq $0xa8, %rbp
cmpq %rax, %r13
jl 0x40dd
xorps %xmm0, %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x5e8b(%rip), %rax      # 0x9ff8
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
movq (%rax), %rdi
cvtss2sd 0x4(%rsp), %xmm1
cvtss2sd 0xc(%rsp), %xmm2
leaq 0x3064(%rip), %rsi      # 0x71f0
movl 0x18(%rsp), %edx
movl 0x14(%rsp), %ecx
movl 0x10(%rsp), %r8d
movl 0x1c(%rsp), %r9d
movb $0x3, %al
callq 0x1100
xorps %xmm0, %xmm0
cvtsi2ssl 0x20(%rsp), %xmm0
jmp 0x4154
// File: /workspace/github_c_makefile_star2_O1/usgs[P]nshmp-haz-catalogs/src/agrid/adaptive/ck_args_wt_results.c
// Function: check_args
int check_args(int argc, char **argv, char *paramf, char *summf, char *paramf_format, int *stop_run, int *newp)
/*--------------------------------------------------------------------------*/
{
/* CHECK INPUT ARGUMENTS */
  if (  (argc != 2) && (argc != 4) && (argc !=5)  ) {
    fprintf(stderr,"USAGE: %s [parameter file] [parameter file formatting (new/old)] [summary file name] [[ optional quit before run (1) ]]\n", argv[0]);
    fprintf(stderr,"For parameter file formatting, enter -h, as single command line argument.\n");
    fprintf(stderr,"Enter (new/old) to specify the formatting style for the parameter file.\n");
    fprintf(stderr,"Optional quit argument will stop run before seismicity rate calculations to permit check of parameters.\n"); exit(1);
  }
  sscanf(argv[1],"%s",paramf);
  if ( argc > 2) {
    sscanf(argv[2],"%s",paramf_format);
    sscanf(argv[3],"%s",summf);
    if (argc > 4) sscanf(argv[4],"%d", stop_run);
  }

// check for help option
  if ( STREQ(paramf,"-h") ) {
    print_param_format();
    return 1;
  }
// check pareter file formatting
  if ( STREQ(paramf_format,"new") ) {
    fprintf(stderr,"Using new parameter file formatting...\n");
    *newp=1;
    return 0;
  }
  else if ( STREQ(paramf_format,"old") ) {
    fprintf(stderr,"Using old parameter file formatting...\n");
    *newp=0;
    return 0;
  }
  else {
    fprintf(stderr,"User must enter 'new' or 'old' to specify the style of formatting for the parameter file - %s.\n", paramf_format);
    return 1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, (%rsp)
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %r13d
leal -0x4(%r13), %eax
cmpl $0x2, %eax
jb 0x5381
cmpl $0x2, %r13d
jne 0x548e
movq 0x8(%r12), %rdi
leaq 0xfee(%rip), %rsi       # 0x637b
movq %r14, %rdx
xorl %eax, %eax
callq 0x1130
cmpl $0x3, %r13d
jl 0x53e5
movq 0x10(%r12), %rdi
leaq 0xfd2(%rip), %r15       # 0x637b
movq %r15, %rsi
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x1130
movq 0x18(%r12), %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1130
cmpl $0x5, %r13d
jl 0x53e5
movq 0x20(%r12), %rdi
leaq 0xf9a(%rip), %rsi       # 0x6375
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1130
leaq 0x23ba(%rip), %rsi      # 0x77a6
movq %r14, %rdi
callq 0x10f0
testl %eax, %eax
jne 0x5411
callq 0x11d0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40(%rsp), %r14
leaq 0x238c(%rip), %rsi      # 0x77a9
movq (%rsp), %r15
movq %r15, %rdi
callq 0x10f0
testl %eax, %eax
jne 0x5437
movq %r14, %rdi
callq 0x1c40
jmp 0x5471
leaq 0x2397(%rip), %rsi      # 0x77d5
movq %r15, %rdi
callq 0x10f0
movq 0x4bab(%rip), %rcx      # 0x9ff8
movq (%rcx), %rcx
testl %eax, %eax
jne 0x5475
leaq 0x237e(%rip), %rdi      # 0x77d9
movl $0x27, %esi
movl $0x1, %edx
callq 0x11a0
movl $0x0, (%r14)
xorl %eax, %eax
jmp 0x5402
leaq 0x2385(%rip), %rsi      # 0x7801
movq %rcx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1100
jmp 0x53fd
movq %r12, %rdi
callq 0x1c68
nop
// File: /workspace/github_c_makefile_star2_O1/Mikejmoffitt[P]romtools/binvert/binvert.c
// Function: main
int main(int argc, char **argv)
{
	FILE *fi, *fo;
	size_t fsize;
	char *buf;

	if (argc < 3)
	{
		printf("Usage: %s in_fname out_fname\n", argv[0]);
		return 0;
	}

	fi = fopen(argv[1], "rb");
	if (!fi)
	{
		fprintf(stderr, "Couldn't open %s for reading.\n",
		        argv[1]);
		return 1;
	}

	fseek(fi, 0L, SEEK_END);
	fsize = ftell(fi);
	fseek(fi, 0L, SEEK_SET);

	buf = (char *)malloc(sizeof(char) * fsize);
	if (!buf)
	{
		fprintf(stderr, "Couldn't allocate %zu for buffer.\n", fsize);
		fclose(fi);
		return 1;
	}

	fo = fopen(argv[2], "wb");
	if (!fo)
	{
		fclose(fi);
		free(buf);
		fprintf(stderr, "Couldn't open %s for writing.\n", argv[2]);
		return 1;
	}

	for (size_t i = 0; i < fsize; i++)
	{
		buf[fsize - i - 1] = fgetc(fi);
	}

	fwrite((void *)buf, fsize, 1, fo);

	printf("Wrote %zu ($%X) bytes to %s.\n", fsize, (int)fsize, argv[2]);

	fclose(fi);
	fclose(fo);
	free(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpl $0x2, %edi
jg 0x1257
movq (%r14), %rsi
leaq 0xdbb(%rip), %rdi       # 0x2004
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x1050
jmp 0x132b
movq 0x8(%r14), %rdi
leaq 0xdc0(%rip), %rsi       # 0x2022
callq 0x10b0
testq %rax, %rax
je 0x133c
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x10a0
movq %rbx, %rdi
callq 0x1080
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10a0
movq %r15, %rdi
callq 0x1090
testq %rax, %rax
je 0x134a
movq %rax, %r12
movq 0x10(%r14), %rdi
addq $0x10, %r14
leaq 0xdab(%rip), %rsi       # 0x2067
callq 0x10b0
testq %rax, %rax
je 0x136f
movq %rax, %r13
testq %r15, %r15
je 0x12e7
movq %r15, %rbp
movq %rbx, %rdi
callq 0x1060
movb %al, -0x1(%r12,%rbp)
decq %rbp
jne 0x12d5
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq 0x10c0
movq (%r14), %rcx
leaq 0xd85(%rip), %rdi       # 0x2089
xorl %ebp, %ebp
movq %r15, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x1040
movq %r13, %rdi
callq 0x1040
movq %r12, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x8, %r14
movq %r14, %rdi
callq 0x1119
jmp 0x137d
movq 0x2ca7(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xce9(%rip), %rsi       # 0x2044
movq %r15, %rdx
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x1040
jmp 0x137d
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x10e0
movl $0x1, %ebp
jmp 0x132b
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/main_gsacak.c
// Function: usage
void usage(char *name){
  printf("\n\tUsage: %s [options] FILE N\n\n",name);
  puts("Computes SA (and optionally LCP array) for the first N sequences of a");
  puts("collection using algorithm gSACA-K from Louza et al. DCC 16 paper. ");
  puts("Sequences from FILE are extracted according to FILE's");
  puts("extension; currently supported extensions are: .txt .fasta .fastq\n");
  puts("Available options:");
  puts("\t-h      this help message");
  puts("\t-m RAM  available memory in MB (def: no limit)");
  puts("\t-o OUT  base name for output files (def: FILE)");
  puts("\t-L      compute LCP array as well (use only with option -s)");
  puts("\t-c      check SA and LCP");
  puts("\t-s      output SA (ext: .sa) and possibly LCP (ext: .sa_lcp)");
  puts("\t-l      output suffix lengths (ext: .sl)");
  puts("\t-q      output QS sequences permuted according to the BWT (ext: .qs)");
  puts("\t-b      output BWT (ext: .bwt)");
  puts("\t-r      output RLE(BWT) (ext: .rle.bwt)");
  puts("\t-g D    output LCP in gap format D bytes per entry (ext: .D.lcp)");
  puts("\t-x      extract individual input files and stop");
  puts("\t-X      convert input to raw+len format (ext: .cat .len) and stop");
  // puts("\t-L    lengths of the input sequences in FILE.len (no separator)");
  puts("\t-R      compute data structures for the reversed string\n");
  puts("\t-v      verbose output (more v's for more verbose)\n");
  printf("sizeof(int): %zu bytes\n", sizeof(int_t));
  printf("Max text size: %zu\n", WORD);
  exit(EXIT_FAILURE);
}

// Assembly:
pushq %rax
movq %rdi, %rsi
leaq 0x8785(%rip), %rdi      # 0xb0cc
xorl %eax, %eax
callq 0x20f0
leaq 0x8796(%rip), %rdi      # 0xb0eb
callq 0x2080
leaq 0x87d0(%rip), %rdi      # 0xb131
callq 0x2080
leaq 0x8808(%rip), %rdi      # 0xb175
callq 0x2080
leaq 0x8832(%rip), %rdi      # 0xb1ab
callq 0x2080
leaq 0x8869(%rip), %rdi      # 0xb1ee
callq 0x2080
leaq 0x8870(%rip), %rdi      # 0xb201
callq 0x2080
leaq 0x887f(%rip), %rdi      # 0xb21c
callq 0x2080
leaq 0x88a3(%rip), %rdi      # 0xb24c
callq 0x2080
leaq 0x88c7(%rip), %rdi      # 0xb27c
callq 0x2080
leaq 0x88f8(%rip), %rdi      # 0xb2b9
callq 0x2080
leaq 0x8906(%rip), %rdi      # 0xb2d3
callq 0x2080
leaq 0x8938(%rip), %rdi      # 0xb311
callq 0x2080
leaq 0x8956(%rip), %rdi      # 0xb33b
callq 0x2080
leaq 0x8990(%rip), %rdi      # 0xb381
callq 0x2080
leaq 0x89a4(%rip), %rdi      # 0xb3a1
callq 0x2080
leaq 0x89c1(%rip), %rdi      # 0xb3ca
callq 0x2080
leaq 0x89f7(%rip), %rdi      # 0xb40c
callq 0x2080
leaq 0x8a1c(%rip), %rdi      # 0xb43d
callq 0x2080
leaq 0x8a53(%rip), %rdi      # 0xb480
callq 0x2080
leaq 0x8a81(%rip), %rdi      # 0xb4ba
callq 0x2080
leaq 0x8aaa(%rip), %rdi      # 0xb4ef
movl $0x8, %esi
xorl %eax, %eax
callq 0x20f0
leaq 0x8aaf(%rip), %rdi      # 0xb507
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
xorl %eax, %eax
callq 0x20f0
movl $0x1, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: time_stop
double time_stop(time_t t_time, clock_t c_clock){

	double aux1 = (clock() - c_clock) / (double)(CLOCKS_PER_SEC);
	double aux2 = difftime (time(NULL),t_time);
	
	printf("CLOCK = %lf TIME = %lf\n", aux1, aux2);
	
	return aux1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x20b0
subq %rbx, %rax
cvtsi2sd %rax, %xmm0
divsd 0x7ba9(%rip), %xmm0     # 0xb820
movsd %xmm0, (%rsp)
xorl %edi, %edi
callq 0x21c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x2100
movapd %xmm0, %xmm1
leaq 0x7b8f(%rip), %rdi      # 0xb828
movsd (%rsp), %xmm0
movb $0x2, %al
callq 0x20f0
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: dies
void dies(const char* where, char* format, ...) {

	int_t err = errno;
	va_list val;

	printf("Error at %s: %s.\n",where,errno ? strerror(errno) : "errno not set");
	va_start(val,format);
	vprintf(format,val);
	va_end(val);
	printf("\n");

	exit(err ? err : 1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x3d57
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
callq 0x2050
movl (%rax), %ebx
movl (%rax), %edi
testl %edi, %edi
jne 0x3d6d
leaq 0x7ae7(%rip), %rdx      # 0xb852
jmp 0x3d75
callq 0x2290
movq %rax, %rdx
leaq 0x7ac4(%rip), %rdi      # 0xb840
movq %r15, %rsi
xorl %eax, %eax
callq 0x20f0
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsi)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsi)
movq %r14, %rdi
callq 0x21d0
movl $0xa, %edi
callq 0x2040
cmpl $0x1, %ebx
adcl $0x0, %ebx
movl %ebx, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: print_char
int_t print_char(char* A, int_t n){

	int_t i;
	for(i=0; i<n; i++)	
		printf("%" PRIdN ") %c\n", i, A[i]);

	printf("\n");

return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
jle 0x3e01
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7a7c(%rip), %r15      # 0xb860
xorl %r12d, %r12d
movsbl (%r14,%r12), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x20f0
incq %r12
cmpq %r12, %rbx
jne 0x3de7
movl $0xa, %edi
callq 0x2040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: print_int
int_t print_int(int_t* A, int_t n){

	int_t i;
	for(i=0; i<n; i++)	
		printf("%" PRIdN ") %" PRIdN "\n", i, A[i]);

	printf("\n");

return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
jle 0x3e4f
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7a36(%rip), %r15      # 0xb869
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x20f0
incq %r12
cmpq %r12, %rbx
jne 0x3e36
movl $0xa, %edi
callq 0x2040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: min_range
int_t min_range(int_t* A, int_t l, int_t r){


	if(r>l)return 0;

	printf("[l, r] = [%" PRIdN ", %" PRIdN "]\n", l, r);

	int_t min = INT_MAX;
	int_t i;
	for(i=l; i<=l; i++)
		min = (A[i]<min?A[i]:min);

	printf("min = %" PRIdN "\n", min);

return min;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq %rsi, %rdx
jle 0x3e74
xorl %ebx, %ebx
jmp 0x3ea9
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x79f2(%rip), %rdi      # 0xb873
xorl %eax, %eax
callq 0x20f0
movq (%r14,%rbx,8), %rax
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
cmpq %rbx, %rax
cmovlq %rax, %rbx
leaq 0x79e9(%rip), %rdi      # 0xb888
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: cat_int
int_t* cat_int(unsigned char** R, int k, int_t *n){

	(*n)++; //add 0 at the end

	int_t i, j;
	int_t l=0;
	int_t *str_int = (int_t*) malloc((*n)*sizeof(int_t));

	for(i=0; i<k; i++){
		int_t m = strlen((char*)R[i]);
		for(j=0; j<m; j++){
			//removes symbols > 255
			if(R[i][j]+1<256) str_int[l++] = R[i][j]+(k+1);
			else (*n)--;
		}
//		for(j=0; j<m; j++)
//			str_int[l++] = R[i][j]+(k+1);
		str_int[l++] = i+1; //add $_i as separator
	}
	
	str_int[l++]=0;
        if(*n>l){
		str_int = (int_t*) realloc(str_int, (l)*sizeof(int_t));
		printf("N = %" PRIdN "\n", l);
	}
	*n = l;

return str_int;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, 0x10(%rsp)
movq (%rdx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rdx)
leaq 0x8(,%rax,8), %rdi
callq 0x9fd2
movq %rax, %r14
testl %ebp, %ebp
jle 0x3f49
movslq %ebp, %rax
movq %rax, 0x8(%rsp)
incl %ebp
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %r13
movq %r13, %rdi
callq 0x20d0
testq %rax, %rax
jle 0x3f36
xorl %ecx, %ecx
movzbl (%r13,%rcx), %edx
cmpl $0xff, %edx
je 0x3f2b
addl %ebp, %edx
movq %rdx, (%r14,%r15,8)
incq %r15
jmp 0x3f2e
decq (%rbx)
incq %rcx
cmpq %rcx, %rax
jne 0x3f12
incq %r12
movq %r12, (%r14,%r15,8)
incq %r15
cmpq 0x8(%rsp), %r12
jne 0x3efa
jmp 0x3f4c
xorl %r15d, %r15d
movq $0x0, (%r14,%r15,8)
incq %r15
cmpq %r15, (%rbx)
jle 0x3f80
leaq (,%r15,8), %rsi
movq %r14, %rdi
callq 0xa152
movq %rax, %r14
leaq 0x791d(%rip), %rdi      # 0xb893
movq %r15, %rsi
xorl %eax, %eax
callq 0x20f0
movq %r15, (%rbx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: cat_char
unsigned char* cat_char(unsigned char** R, int k, size_t *n){

	(*n)++; //add 0 at the end

	int_t i, j;
	int_t l=0;
	unsigned char *str = (unsigned char*) malloc((*n)*sizeof(unsigned char));

	for(i=0; i<k; i++){
		int_t m = strlen((char*)R[i]);
		//removes empty strings
		if(m==0){
			(*n)--;
			continue;
		}
		for(j=0; j<m; j++){
			//removes symbols > 255
			if(R[i][j]+1<256) str[l++] = R[i][j]+1;
			else (*n)--;
		}
		str[l++] = 1; //add 1 as separator
	}

	str[l++]=0;
  if(*n>l){
		str = (unsigned char*) realloc(str, (l)*sizeof(unsigned char));
		printf("N = %" PRIdN "\n", l);
	}
	*n = l;

return str;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, (%rsp)
movq (%rdx), %rdi
incq %rdi
movq %rdi, (%rdx)
callq 0x9fd2
movq %rax, %r14
testl %ebp, %ebp
jle 0x40dd
movslq %ebp, %rbp
xorl %r12d, %r12d
xorl %r15d, %r15d
movq (%rsp), %rax
movq (%rax,%r12,8), %r13
movq %r13, %rdi
callq 0x20d0
testq %rax, %rax
je 0x40d0
jle 0x40c6
xorl %ecx, %ecx
movb (%r13,%rcx), %dl
cmpb $-0x1, %dl
je 0x40bb
incb %dl
movb %dl, (%r14,%r15)
incq %r15
jmp 0x40be
decq (%rbx)
incq %rcx
cmpq %rcx, %rax
jne 0x40a6
movb $0x1, (%r14,%r15)
incq %r15
jmp 0x40d3
decq (%rbx)
incq %r12
cmpq %rbp, %r12
jne 0x408d
jmp 0x40e0
xorl %r15d, %r15d
movb $0x0, (%r14,%r15)
incq %r15
cmpq %r15, (%rbx)
jbe 0x410c
movq %r14, %rdi
movq %r15, %rsi
callq 0xa152
movq %rax, %r14
leaq 0x7791(%rip), %rdi      # 0xb893
movq %r15, %rsi
xorl %eax, %eax
callq 0x20f0
movq %r15, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/utils.c
// Function: sort
static void sort(char *array, size_t size, int (*cmp)(void*,void*), int begin, int end) {
   if (end > begin) {
      void *pivot = array + begin;
      int l = begin + size;
      int r = end;
      while(l < r) {
         if (cmp(array+l,pivot) <= 0) {
            l += size;
         } else if ( cmp(array+r, pivot) > 0 )  {
            r -= size;
         } else if ( l < r ) {
            swap2(array+l, array+r, size);
         }
      }
      l -= size;
      swap2(array+begin, array+l, size);
      sort(array, size, cmp, begin, l);
      sort(array, size, cmp, r, end);
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebp
movq %rdx, %r14
movq %rsi, 0x18(%rsp)
movq %rdi, %r12
movl %r8d, 0x2c(%rsp)
movq %rdi, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
cmpl %ecx, %ebp
jle 0x4280
movslq %ecx, %r15
addq %r12, %r15
movq 0x18(%rsp), %r10
leal (%r10,%rcx), %r9d
cmpl %ebp, %r9d
movq %rcx, 0x30(%rsp)
jge 0x4233
movq 0x10(%rsp), %rdi
movl %ebp, 0xc(%rsp)
movslq %r9d, %r13
addq %rdi, %r13
movq %rdi, %rbx
movq %r13, %rdi
movq %r15, %rsi
movl %r9d, %r12d
callq *%r14
testl %eax, %eax
jle 0x41da
movq %r14, %rax
movl 0xc(%rsp), %ebp
movslq %ebp, %r14
addq %rbx, %r14
movq %r14, %rdi
movq %r15, %rbx
movq %r15, %rsi
callq *%rax
testl %eax, %eax
jle 0x41ee
movq 0x18(%rsp), %r10
subl %r10d, %ebp
movq 0x20(%rsp), %r14
movq 0x10(%rsp), %rdi
movl %r12d, %r9d
movq %rbx, %r15
jmp 0x4228
movq 0x18(%rsp), %r10
addl %r10d, %r12d
movl 0xc(%rsp), %ebp
movl %r12d, %r9d
movq %rbx, %rdi
jmp 0x4228
movq 0x18(%rsp), %r10
testq %r10, %r10
movl %r12d, %r9d
movq %rbx, %r15
je 0x421a
xorl %eax, %eax
movb (%r13,%rax), %cl
movb (%r14,%rax), %dl
movb %dl, (%r13,%rax)
movb %cl, (%r14,%rax)
incq %rax
cmpq %rax, %r10
jne 0x4200
movq 0x20(%rsp), %r14
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %ebp
cmpl %ebp, %r9d
jl 0x4187
jmp 0x4238
movq 0x10(%rsp), %rdi
subl %r10d, %r9d
testq %r10, %r10
je 0x425f
movslq %r9d, %rax
addq %rdi, %rax
xorl %ecx, %ecx
movb (%r15,%rcx), %dl
movb (%rax,%rcx), %r8b
movb %r8b, (%r15,%rcx)
movb %dl, (%rax,%rcx)
incq %rcx
cmpq %rcx, %r10
jne 0x4248
movq %rdi, %r12
movq %r10, %rsi
movq %r14, %rdx
movq 0x30(%rsp), %rcx
movl %r9d, %r8d
callq 0x4132
movl %ebp, %ecx
movl 0x2c(%rsp), %ebp
jmp 0x415d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %edi, %edi
xorl %esi, %esi
callq 0x2160
movq %rax, %rbx
testq %rax, %rax
jne 0x4368
leaq 0x7539(%rip), %rdi      # 0xb89c
callq 0x3cb2
movq %r14, %rdi
callq 0x20e0
cmpl $-0x1, %eax
jne 0x4381
leaq 0x7520(%rip), %rdi      # 0xb89c
callq 0x3cb2
movq %rbx, %rdi
callq 0xa089
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
callq 0x2200
testq %rax, %rax
je 0x43b2
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21e0
movq %rbx, %rax
popq %rbx
retq
callq 0x23a4
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
movl $0x2, %edx
callq 0x21e0
movq %rbx, %rdi
callq 0x21a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rax
movq %rdi, %rcx
movq %rsp, %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x20a0
cmpl $0x1, %eax
jne 0x4420
movq (%rsp), %rax
popq %rcx
retq
callq 0x23ce
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rdx
xorl %eax, %eax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdi
movq %rax, (%rdi)
callq 0x2250
cmpq $-0x1, %rax
je 0x44ef
movq %rax, %rbx
movq %rax, %rdi
incq %rdi
callq 0x9fd2
movq %rax, %r14
movq (%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2060
movw $0x24, -0x1(%r14,%rbx)
movq %r15, %rdi
callq 0xa089
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x23e3
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, (%rsp)
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq (,%rsi,8), %rdi
callq 0x9fd2
movq %rax, %rbx
testq %r15, %r15
jle 0x4c67
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %ebp, %ebp
movq %r14, 0x10(%rsp)
leaq (%rbx,%r12), %rdi
movq %r14, (%rbx,%rbp,8)
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x2250
movq %rax, %r13
cmpq $-0x1, %rax
je 0x4c40
movq (%rbx,%rbp,8), %rax
movb $0x0, -0x1(%rax,%r13)
movq (%rsp), %rax
addq %r13, (%rax)
jmp 0x4c51
leaq 0x6c8a(%rip), %rdi      # 0xb8d1
movq %rbp, %rsi
xorl %eax, %eax
callq 0x20f0
cmpq $-0x1, %r13
je 0x4c65
incq %rbp
addq $0x8, %r12
cmpq %rbp, %r15
jne 0x4c08
jmp 0x4c67
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x18(%rsp)
movq %rsi, %r15
movq %rdi, %r12
leaq (,%rsi,8), %rdi
callq 0x9fd2
testq %r15, %r15
jle 0x4d83
movq %rsp, %r14
movq %rax, 0x10(%rsp)
movq %rax, %rbx
xorl %r13d, %r13d
movq %r13, 0x8(%rsp)
movq %r13, (%rsp)
movq %r14, %rbp
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x2250
movq %rax, %r14
movq (%rsp), %rdi
callq 0xa089
movq %r13, (%rsp)
cmpq $0x2, %r14
jl 0x4d81
movq %r15, 0x20(%rsp)
xorl %r15d, %r15d
movq %r15, (%rbx)
movq %r15, 0x8(%rsp)
movq %rbx, %rdi
movq %r12, %r13
leaq 0x8(%rsp), %r12
movq %r12, %rsi
movq %r13, %rdx
callq 0x2250
movq (%rbx), %rcx
movb $0x0, -0x1(%rcx,%rax)
movq 0x18(%rsp), %rcx
addq %rax, (%rcx)
movq %r15, (%rsp)
movq %r15, 0x8(%rsp)
movq %rbp, %r14
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2250
movq (%rsp), %rdi
callq 0xa089
movq %r15, (%rsp)
movq %r15, 0x8(%rsp)
movq 0x20(%rsp), %r15
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %r12
movq %r13, %rdx
callq 0x2250
movq (%rsp), %rdi
callq 0xa089
addq $0x8, %rbx
decq %r15
jne 0x4cb3
movq 0x10(%rsp), %rax
jmp 0x4d83
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq (,%rsi,8), %rdi
callq 0x9fd2
testq %r14, %r14
jle 0x4e82
xorl %r12d, %r12d
movq %rsp, %rbx
movq %rax, 0x10(%rsp)
movq %rax, %rbp
movq %r12, 0x8(%rsp)
movq %r12, (%rsp)
movq %rbx, %r13
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x2250
movq %rax, %rbx
movq (%rsp), %rdi
callq 0xa089
movq %r12, (%rsp)
cmpq $0x2, %rbx
jl 0x4e80
movq %r12, (%rsp)
movq %r12, 0x8(%rsp)
movq %r13, %rbx
movq %r13, %rdi
leaq 0x8(%rsp), %r13
movq %r13, %rsi
movq %r15, %rdx
callq 0x2250
movq (%rsp), %rdi
callq 0xa089
movq %r12, (%rsp)
movq %r12, 0x8(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2250
movq (%rsp), %rdi
callq 0xa089
movq %r12, (%rsp)
movq %r12, (%rbp)
movq %r12, 0x8(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x2250
movq (%rbp), %rcx
movb $0x0, -0x1(%rcx,%rax)
addq $0x8, %rbp
decq %r14
jne 0x4dca
movq 0x10(%rsp), %rax
jmp 0x4e82
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movl $0x2e, %esi
callq 0x2130
leaq 0x1(%rax), %r15
cmpq %r12, %rax
leaq 0x6bee(%rip), %rcx      # 0xbaa8
cmoveq %rcx, %r15
testq %rax, %rax
cmoveq %rcx, %r15
leaq 0x6a0f(%rip), %rsi      # 0xb8db
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x4eeb
leaq 0x6a02(%rip), %rsi      # 0xb8e1
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
jne 0x4f01
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4d92
leaq 0x6a4a(%rip), %rdi      # 0xb952
callq 0x2080
movl $0x1, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %r8, %rbp
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r14
movl $0x2e, %esi
callq 0x2130
leaq 0x1(%rax), %r15
cmpq %r14, %rax
leaq 0x6976(%rip), %rcx      # 0xbaa8
cmoveq %rcx, %r15
testq %rax, %rax
cmoveq %rcx, %r15
movq 0x40(%rsp), %rax
movq $0x0, (%rax)
leaq 0x6794(%rip), %rsi      # 0xb8e4
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x51e9
movq %r12, %r14
movq (%rsp), %r12
leaq 0x677a(%rip), %rsi      # 0xb8e8
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x51ce
leaq 0x676d(%rip), %rsi      # 0xb8ee
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x51ce
leaq 0x6747(%rip), %rsi      # 0xb8db
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x51b3
leaq 0x673a(%rip), %rsi      # 0xb8e1
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
jne 0x5220
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %r12, %r8
movq 0x40(%rsp), %r9
callq 0x46a5
jmp 0x5203
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %r12, %r8
movq 0x40(%rsp), %r9
callq 0x4919
jmp 0x5203
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq (%rsp), %r8
movq 0x40(%rsp), %r9
callq 0x44f4
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6756(%rip), %rdi      # 0xb97d
callq 0x2080
movl $0x1, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
movl $0x2e, %esi
callq 0x2130
leaq 0x1(%rax), %r12
cmpq %r13, %rax
leaq 0x6845(%rip), %rcx      # 0xbaa8
cmoveq %rcx, %r12
testq %rax, %rax
cmoveq %rcx, %r12
leaq 0x666f(%rip), %rsi      # 0xb8e4
movq %r12, %rdi
callq 0x2180
testl %eax, %eax
je 0x52fb
leaq 0x6660(%rip), %rsi      # 0xb8e8
movq %r12, %rdi
callq 0x2180
testl %eax, %eax
je 0x52e4
leaq 0x6653(%rip), %rsi      # 0xb8ee
movq %r12, %rdi
callq 0x2180
testl %eax, %eax
je 0x52e4
leaq 0x662d(%rip), %rsi      # 0xb8db
movq %r12, %rdi
callq 0x2180
testl %eax, %eax
je 0x52cd
leaq 0x6620(%rip), %rsi      # 0xb8e1
movq %r12, %rdi
callq 0x2180
testl %eax, %eax
jne 0x5312
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4c79
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4f17
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4bd1
leaq 0x6664(%rip), %rdi      # 0xb97d
callq 0x2080
movl $0x1, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r12
leaq 0x62b3(%rip), %rsi      # 0xb5f2
callq 0x4393
movq %rax, %rbx
movq %r12, %rdi
movl $0x2e, %esi
callq 0x2130
leaq 0x1(%rax), %r15
cmpq %r12, %rax
leaq 0x6746(%rip), %rcx      # 0xbaa8
cmoveq %rcx, %r15
testq %rax, %rax
cmoveq %rcx, %r15
leaq 0x6570(%rip), %rsi      # 0xb8e4
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x53ec
leaq 0x6561(%rip), %rsi      # 0xb8e8
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x53dc
leaq 0x6554(%rip), %rsi      # 0xb8ee
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x53dc
leaq 0x652e(%rip), %rsi      # 0xb8db
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
je 0x53cc
leaq 0x6521(%rip), %rsi      # 0xb8e1
movq %r15, %rdi
callq 0x2180
testl %eax, %eax
jne 0x5411
movslq %ebp, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4c79
jmp 0x53fa
movslq %ebp, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4f17
jmp 0x53fa
movslq %ebp, %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4bd1
movq %rax, %r14
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6565(%rip), %rdi      # 0xb97d
callq 0x2080
movl $0x1, %edi
callq 0x2270
// File: /workspace/github_c_makefile_star2_O1/felipelouza[P]egap/tools/lib/file.c
// Function: file_load_concat
unsigned char** file_load_concat(char* c_file, char *len_file, int k, int_t *n) {

  unsigned char **c_buffer = (unsigned char**) malloc(k*sizeof(unsigned char*));
  if(c_buffer==NULL) die("out of mem");

  FILE *f = fopen(c_file,"rb");
  if(f==NULL) {perror("sequence file missing"); fprintf(stderr, "<%s> ", c_file); die("file_load_concat");}
  FILE *fl = fopen(len_file,"rb");
  if(fl==NULL) {perror("sequence file missing"); fprintf(stderr, "<%s> ", len_file); die("file_load_concat");}
  
  int i;
  for(i=0;i<k;i++) {
    uint32_t size;
    size_t r = fread(&size, 4, 1, fl);// assume big endian!
    if(r!=1) die("len file too short");
    c_buffer[i] = malloc((size+1)*sizeof(char));
    if(!c_buffer[i]) die("out of mem");
    r = fread(c_buffer[i], 1, size, f);
    if(r!=size) die("concat file too short");
    c_buffer[i][size] = 0;
    *n += size+1;
  }
  fclose(fl);
  fclose(f);
  return c_buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x20(%rsp)
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r12
movslq %edx, %rdi
shlq $0x3, %rdi
callq 0x9fd2
movq %rax, 0x18(%rsp)
testq %rax, %rax
jne 0x5464
leaq 0x6492(%rip), %rdi      # 0xb8f1
callq 0x3cb2
leaq 0x6187(%rip), %rsi      # 0xb5f2
movq %r12, %rdi
callq 0x2200
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x5564
leaq 0x616a(%rip), %rsi      # 0xb5f2
movq %r13, %rdi
callq 0x2200
movq %rax, %r12
testq %rax, %rax
je 0x5571
testl %ebp, %ebp
jle 0x553e
movl %ebp, %r14d
xorl %r15d, %r15d
movl $0x4, %esi
movl $0x1, %edx
leaq 0xc(%rsp), %rdi
movq %r12, %rcx
callq 0x20a0
cmpq $0x1, %rax
je 0x54d3
leaq 0x645b(%rip), %rdi      # 0xb929
callq 0x3cb2
movl 0xc(%rsp), %ebp
leal 0x1(%rbp), %r13d
movq %r13, %rdi
callq 0x9fd2
movq %rax, %rbx
movq 0x18(%rsp), %rax
movq %rbx, (%rax,%r15,8)
testq %rbx, %rbx
jne 0x5500
leaq 0x63f6(%rip), %rdi      # 0xb8f1
callq 0x3cb2
movl $0x1, %esi
movq %rbx, %rdi
movq %rbp, %rdx
movq 0x10(%rsp), %rcx
callq 0x20a0
cmpq %rbp, %rax
je 0x5526
leaq 0x641b(%rip), %rdi      # 0xb93c
callq 0x3cb2
movb $0x0, (%rbx,%rbp)
movq 0x20(%rsp), %rax
addq %r13, (%rax)
incq %r15
cmpq %r15, %r14
jne 0x54aa
movq %r12, %rdi
callq 0x20c0
movq 0x10(%rsp), %rdi
callq 0x20c0
movq 0x18(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
callq 0x23f8
jmp 0x5481
movq %r13, %rdi
callq 0x2430
jmp 0x549c
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x9fd2
movq %rax, %r15
leaq 0x63fc(%rip), %rsi      # 0xb9b9
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x2260
leaq 0x6067(%rip), %rsi      # 0xb63b
movq %r15, %rdi
callq 0x4393
movq %rax, %r12
movl $0x8, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x2280
movq %r12, %rdi
callq 0x43b7
movq %r15, %rdi
callq 0xa089
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq