LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jech[P]dht/dht.c
// Function: buffer_closest_nodes
static int
buffer_closest_nodes(unsigned char *nodes, int numnodes,
                     const unsigned char *id, struct bucket *b)
{
    struct node *n = b->nodes;
    while(n) {
        if(node_good(n))
            numnodes = insert_closest_node(nodes, numnodes, id, n);
        n = n->next;
    }
    return numnodes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq 0x28(%rcx), %r12
testq %r12, %r12
je 0x8749
movq %rdx, %r14
movq %rdi, %r15
cmpl $0x2, 0xb8(%r12)
jg 0x8738
movq 0x5676(%rip), %rax      # 0xdc10
leaq -0x1c20(%rax), %rcx
cmpq %rcx, 0xa8(%r12)
jl 0x8738
addq $-0x384, %rax           # imm = 0xFC7C
cmpq %rax, 0xa0(%r12)
jl 0x8738
movzwl 0x18(%r12), %eax
movl $0x1a, %ebp
cmpl $0x2, %eax
je 0x85e1
cmpl $0xa, %eax
jne 0x875a
movl $0x26, %ebp
testl %ebx, %ebx
jle 0x867d
movl %ebp, %eax
movl %ebx, %ecx
movdqu (%r12), %xmm0
movd 0x10(%r12), %xmm1
movq %r15, %rdx
xorl %r13d, %r13d
movq %r13, %rsi
imulq %rax, %rsi
movdqu (%r15,%rsi), %xmm2
pcmpeqb %xmm0, %xmm2
movd 0x10(%r15,%rsi), %xmm3
pcmpeqb %xmm1, %xmm3
pand %xmm2, %xmm3
pmovmskb %xmm3, %esi
cmpl $0xffff, %esi           # imm = 0xFFFF
je 0x8738
xorl %esi, %esi
movb (%r12,%rsi), %r8b
movb (%rdx,%rsi), %r9b
cmpb %r9b, %r8b
je 0x8659
movb (%r14,%rsi), %dil
movl %edi, %r10d
xorb %r8b, %r10b
xorb %r9b, %dil
cmpb %dil, %r10b
movl $0x0, %edi
sbbl %edi, %edi
orl $0x1, %edi
cmpb %r9b, %r8b
jne 0x8669
incq %rsi
cmpq $0x14, %rsi
jne 0x8632
xorl %edi, %edi
testl %edi, %edi
js 0x8680
incq %r13
addq %rax, %rdx
cmpq %rcx, %r13
jne 0x8600
movl %ebx, %r13d
jmp 0x8680
xorl %r13d, %r13d
cmpl $0x8, %r13d
je 0x8738
xorl %eax, %eax
cmpl $0x8, %ebx
setl %al
movl %ebx, %ecx
addl %eax, %ebx
addl %ecx, %eax
decl %eax
cmpl %eax, %r13d
jge 0x86c4
leal 0x1(%r13), %edi
imull %ebp, %edi
addq %r15, %rdi
movl %r13d, %esi
imull %ebp, %esi
addq %r15, %rsi
movl %r13d, %eax
notl %eax
addl %ebx, %eax
imull %ebp, %eax
movslq %eax, %rdx
callq 0x2290
movzwl 0x18(%r12), %eax
cmpl $0xa, %eax
je 0x8706
cmpl $0x2, %eax
jne 0x875a
movl %r13d, %eax
movl %ebp, %ecx
imulq %rax, %rcx
movl 0x10(%r12), %edx
leaq (%r15,%rcx), %rax
addq $0x18, %rax
movl %edx, -0x8(%rax)
movdqu (%r12), %xmm0
movdqu %xmm0, -0x18(%rax)
movl 0x1c(%r12), %ecx
movl %ecx, -0x4(%rax)
jmp 0x872f
imull %ebp, %r13d
movl 0x10(%r12), %ecx
leaq (%r15,%r13), %rax
addq $0x24, %rax
movl %ecx, -0x14(%rax)
movups (%r12), %xmm0
movups %xmm0, -0x24(%rax)
movdqu 0x20(%r12), %xmm0
movdqu %xmm0, -0x10(%rax)
movzwl 0x1a(%r12), %ecx
movw %cx, (%rax)
movq 0xc0(%r12), %r12
testq %r12, %r12
jne 0x8584
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2050
// File: /workspace/github_c_makefile_star2_O1/zhoudian64[P]OS2-exp/io.c
// Function: main
int main() {
// 申请20字节内存
	char* helloString = malloc(20*sizeof(char));
// 字符串常量
	char* src = "hello, glibc.\n";
// 将src指向的内存拷贝至helloString
	strcpy(helloString, src);

// 打开文件hello.txt, 没有责创建｜可读可写｜有则从零开始, rw_rw_r
	int fd_hello = open("hello.txt", O_CREAT | O_RDWR | O_TRUNC, 0664);
// 向文件fd_hello 写入helloString
	write(fd_hello, helloString, 20*sizeof(char));
// 关闭文件
	close(fd_hello);
// 清理申请的内存
	free(helloString);
	
	char* byeString = malloc(20*sizeof(char));
// 只读
	int fd_bye = open("bye.txt", O_RDONLY);
	read(fd_bye, byeString, 20*sizeof(char));
	printf("bye.txt: %s", byeString);
	close(fd_bye);
	free(byeString);

	char glibc2clang[5] = "clang";
	fd_bye = open("bye.txt", O_WRONLY);
// 在fd_bye原有的位置+5offset
	lseek(fd_bye, 5, SEEK_SET);
	write(fd_bye, glibc2clang, 5*sizeof(char));	
	close(fd_bye);

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x14, %edi
callq 0x1090
movq %rax, %rbx
movabsq $0x67202c6f6c6c6568, %rax # imm = 0x67202C6F6C6C6568
movq %rax, (%rbx)
movabsq $0xa2e6362696c67, %rax  # imm = 0xA2E6362696C67
movq %rax, 0x7(%rbx)
leaq 0xe2e(%rip), %rdi       # 0x2013
movl $0x242, %esi            # imm = 0x242
movl $0x1b4, %edx            # imm = 0x1B4
xorl %eax, %eax
callq 0x10a0
movl %eax, %r14d
movl $0x14, %edx
movl %eax, %edi
movq %rbx, %rsi
callq 0x1040
movl %r14d, %edi
callq 0x1070
movq %rbx, %rdi
callq 0x1030
movl $0x14, %edi
callq 0x1090
movq %rax, %r14
leaq 0xdf1(%rip), %rbx       # 0x201d
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10a0
movl %eax, %r15d
movl $0x14, %edx
movl %eax, %edi
movq %r14, %rsi
callq 0x1080
leaq 0xdd4(%rip), %rdi       # 0x2025
movq %r14, %rsi
xorl %eax, %eax
callq 0x1050
movl %r15d, %edi
callq 0x1070
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x10a0
movl %eax, %ebx
movl $0x5, %esi
movl %eax, %edi
xorl %edx, %edx
callq 0x1060
leaq 0xda0(%rip), %rsi       # 0x2031
movl $0x5, %edx
movl %ebx, %edi
callq 0x1040
movl %ebx, %edi
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/CSerxzm[P]WindowstoLinuxInterface/src/../include/line.h
// Function: predealLine
int predealLine(int argc, char* argv[], char (*lines)[255]){
    int real_len=0;
    for(int j=0;j<strlen(argv[0]);j++){
        if(isalpha(argv[0][j])||isdigit(argv[0][j]))
            lines[0][real_len++]=tolower(argv[0][j]);
    }
    lines[0][real_len]='\0';
    for(int i=1;i<argc;i++){
        //printf("%s ", argv[i]);
        real_len=0;
        for(int j=0;j<strlen(argv[i]);j++){
            lines[i][real_len++]=argv[i][j];
        }
        lines[i][real_len]='\0';
        //printf("%s ", lines[i]);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq (%rsi), %r13
xorl %r15d, %r15d
cmpb $0x0, (%r13)
je 0x1232
movl %edi, -0x38(%rbp)
callq 0x10b0
movq %rax, %r12
xorl %ebx, %ebx
movq (%r12), %rax
movsbq (%r13,%rbx), %r13
testb $0xc, 0x1(%rax,%r13,2)
je 0x1219
callq 0x10a0
movq (%rax), %rax
movb (%rax,%r13,4), %al
movslq %r15d, %rcx
incl %r15d
movq -0x30(%rbp), %rdx
movb %al, (%rdx,%rcx)
incq %rbx
movq (%r14), %r13
movq %r13, %rdi
callq 0x1040
cmpq %rbx, %rax
ja 0x11ee
movslq %r15d, %r15
movl -0x38(%rbp), %edi
movq -0x30(%rbp), %rax
movb $0x0, (%rax,%r15)
cmpl $0x2, %edi
jl 0x12a8
movl %edi, %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
leaq 0xff(%rax), %r13
movl $0x1, %r12d
movq (%r14,%r12,8), %r15
cmpb $0x0, (%r15)
je 0x1284
xorl %ebx, %ebx
movb (%r15,%rbx), %al
movb %al, (%r13,%rbx)
incq %rbx
movq (%r14,%r12,8), %r15
movq %r15, %rdi
callq 0x1040
cmpq %rbx, %rax
ja 0x1263
movl %ebx, %eax
jmp 0x1286
xorl %eax, %eax
movq %r12, %rcx
shlq $0x8, %rcx
subq %r12, %rcx
addq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
incq %r12
addq $0xff, %r13
cmpq -0x38(%rbp), %r12
jne 0x1257
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/CSerxzm[P]WindowstoLinuxInterface/src/MORE.c
// Function: main
int main(int ac, char *av[])  { 
    FILE *fp;  
    if(ac==1)  
      do_more(stdin);  
    else  {  
        while(--ac)  
          if( (fp = fopen(* ++av, "r")) != NULL)  {  
              do_more(fp);  
              fclose(fp);  
          }  
          else  
            exit(1);  
    }  
    return 0;  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jne 0x12dd
movq 0x2d0d(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x1339
jmp 0x131e
je 0x131e
movq %rsi, %rbx
movl %edi, %r12d
movl $0x1, %r13d
leaq 0xd12(%rip), %r14       # 0x2004
movq (%rbx,%r13,8), %rdi
movq %r14, %rsi
callq 0x1070
testq %rax, %rax
je 0x132f
movq %rax, %r15
movq %rax, %rdi
callq 0x1339
movq %r15, %rdi
callq 0x1030
incq %r13
cmpl %r13d, %r12d
jne 0x12f2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/CSerxzm[P]WindowstoLinuxInterface/src/MORE.c
// Function: do_more
void do_more(FILE *fp)  {  
    char line[LINELEN];  
    int reply;  
    int number_line = 0;  
    FILE *fp_tty;  
    fp_tty = fopen("/dev/tty", "r");
    if(fp_tty == NULL)  
      exit(1);  
    while(fgets(line, LINELEN, fp) != NULL)  {  
        if(number_line == PAGELEN)  {  
            reply = see_more(fp_tty);  
            if(reply == 0)   
              break;  
            number_line -= reply;  
        }  
        if( fputs(line, stdout) == EOF)  
          exit(1);  
        number_line ++;  
    }  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0xcaf(%rip), %rdi       # 0x2006
leaq 0xca6(%rip), %rsi       # 0x2004
callq 0x1070
testq %rax, %rax
je 0x13ef
movq %rax, %r14
leaq -0x230(%rbp), %rdi
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
je 0x13dd
xorl %r13d, %r13d
movq 0x2c46(%rip), %r12      # 0x3fd8
leaq -0x230(%rbp), %r15
cmpl $0x18, %r13d
jne 0x13b4
movq %r14, %rdi
callq 0x13f9
testl %eax, %eax
je 0x13dd
movl $0x18, %r13d
subl %eax, %r13d
movq (%r12), %rsi
movq %r15, %rdi
callq 0x1050
cmpl $-0x1, %eax
je 0x13ef
incl %r13d
movq %r15, %rdi
movl $0x202, %esi            # imm = 0x202
movq %rbx, %rdx
callq 0x1060
testq %rax, %rax
jne 0x1399
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x1080
// File: /workspace/github_c_makefile_star2_O1/mulle-nat[P]long-long-double-trouble/int.c
// Function: main
int   main( int argc, char *argv[])
{
   double  value;

   fprintf( stderr, "int (%d bytes): %d - %d\n", (int) sizeof( int), INT_MIN, INT_MAX);
   fprintf( stderr, "double (%d bytes): %g - %g\n", (int) sizeof( double), DBL_MIN, DBL_MAX);

   assert( (double) INT_MAX <= DBL_MAX);

   // keep my code optimiza
   if( argc == 1)
      value = (double) INT_MAX;
   else
      value = (double) (INT_MAX - atoi( argv[ 1]));

   if( fits_int( value))
      printf( "FITS\n");
   else
      printf( "NOPE\n");
   return( 0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
movq 0x2f78(%rip), %r14      # 0x3ff8
movq (%r14), %rdi
leaq 0xfb3(%rip), %rsi       # 0x203d
pushq $0x4
popq %rdx
movl $0x80000000, %ecx       # imm = 0x80000000
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
xorl %eax, %eax
callq 0x1040
movq (%r14), %rdi
leaq 0xfad(%rip), %rsi       # 0x2056
pushq $0x8
popq %rdx
movsd 0xf64(%rip), %xmm0      # 0x2018
movsd 0xf64(%rip), %xmm1      # 0x2020
movb $0x2, %al
callq 0x1040
cmpl $0x1, %ebp
jne 0x10d2
movsd 0xf40(%rip), %xmm0      # 0x2010
jmp 0x10e4
movq 0x8(%rbx), %rdi
callq 0x1050
xorl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cvtsi2sd %eax, %xmm0
callq 0x11fc
testl %eax, %eax
leaq 0xf80(%rip), %rax       # 0x2072
leaq 0xf7e(%rip), %rdi       # 0x2077
cmoveq %rax, %rdi
callq 0x1030
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/mulle-nat[P]long-long-double-trouble/int.c
// Function: fits_int
int   fits_int( double value)
{
   int  i_val;
   int  fits;

   if( value < (double) INT_MIN || value > (double) INT_MAX)
      return( 0);

   i_val = (int) value;
   fits  = (double) i_val == value;
   if( ! fits)
      fprintf( stderr, "Mismatch %f with %d\n", value, i_val);

   return( fits);
}

// Assembly:
pushq %rbx
xorl %ebx, %ebx
movsd 0xe01(%rip), %xmm1      # 0x2008
ucomisd %xmm0, %xmm1
ja 0x1238
ucomisd 0xdfb(%rip), %xmm0      # 0x2010
ja 0x1238
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
movapd %xmm1, %xmm2
cmpeqsd %xmm0, %xmm2
movq %xmm2, %rbx
andl $0x1, %ebx
ucomisd %xmm0, %xmm1
jne 0x123d
jp 0x123d
movzbl %bl, %eax
popq %rbx
retq
cvttsd2si %xmm0, %edx
movq 0x2db0(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
leaq 0xdd6(%rip), %rsi       # 0x2028
movb $0x1, %al
callq 0x1040
jmp 0x1238
// File: /workspace/github_c_makefile_star2_O1/radforddc[P]icpc_siggen/icpc_fieldgen_opt.c
// Function: dist_from_contact
float dist_from_contact(cyl_pt pt, cyl_pt delta, MJD_Siggen_Setup *setup) {
  float  factor = 1, d = 0.5;
  cyl_pt test;
  int    n;

  for (n=0; n<7; n++) {  // 7 steps => 1/128 precision
    test.r = pt.r + factor * delta.r;
    test.z = pt.z + factor * delta.z;
    if (outside_detector_cyl(test, setup)) {
      factor -= d;
    } else {
      if (n == 0) return -1.0;
      factor += d;
    } 
    d /= 2.0;
  }
  return factor;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movss %xmm3, 0xc(%rsp)
movaps %xmm2, 0x20(%rsp)
movss %xmm1, 0x8(%rsp)
movaps %xmm0, 0x10(%rsp)
movss 0x39b0(%rip), %xmm1     # 0x9124
movss 0x39ac(%rip), %xmm0     # 0x9128
xorl %ebp, %ebp
movss %xmm1, 0x4(%rsp)
movaps %xmm0, %xmm1
mulss 0x20(%rsp), %xmm1
addss 0x10(%rsp), %xmm1
movss %xmm1, %xmm2            # xmm2 = xmm1[0],xmm2[1,2,3]
movaps %xmm0, %xmm1
movss %xmm0, (%rsp)
mulss 0xc(%rsp), %xmm1
addss 0x8(%rsp), %xmm1
movaps %xmm2, 0x30(%rsp)
movaps %xmm2, %xmm0
movq %rbx, %rdi
callq 0x7f7c
testl %eax, %eax
je 0x57d0
movss 0x4(%rsp), %xmm1
movss (%rsp), %xmm0
subss %xmm1, %xmm0
jmp 0x57e3
movss (%rsp), %xmm0
testl %ebp, %ebp
movss 0x4(%rsp), %xmm1
je 0x57f9
addss %xmm1, %xmm0
mulss 0x3939(%rip), %xmm1     # 0x9124
decl %ebp
cmpl $-0x7, %ebp
movaps 0x30(%rsp), %xmm2
jne 0x577e
jmp 0x5801
movss 0x391b(%rip), %xmm0     # 0x911c
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/radforddc[P]icpc_siggen/icpc_fieldgen_opt.c
// Function: report_config
int report_config(FILE *fp_out, char *config_file_name) {
  char  *c, line[256];
  FILE  *file;

  fprintf(fp_out, "# Config file: %s\n", config_file_name);
  if (!(file = fopen(config_file_name, "r"))) return 1;

  while (fgets(line, sizeof(line), file)) {
    if (strlen(line) < 3 || *line == ' ' || *line == '\t' || *line == '#') continue;
    if ((c = strchr(line, '#')) || (c = strchr(line, '\n'))) *c = '\0';
    fprintf(fp_out, "# %s\n", line);
  }
  fclose(file);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3019(%rip), %rsi      # 0x9e40
movq %r14, %rdx
xorl %eax, %eax
callq 0x1150
leaq 0x2865(%rip), %rsi      # 0x969d
movq %r14, %rdi
callq 0x11b0
testq %rax, %rax
je 0x6edc
movq %rax, %r14
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdx
callq 0x1130
testq %rax, %rax
je 0x6ed4
movq %rsp, %r15
leaq 0x2fe8(%rip), %r12      # 0x9e53
movq %r15, %rdi
callq 0x10d0
cmpq $0x3, %rax
jb 0x6ebf
movb (%rsp), %al
cmpb $0x23, %al
je 0x6ebf
cmpb $0x20, %al
je 0x6ebf
cmpb $0x9, %al
je 0x6ebf
movq %r15, %rdi
movl $0x23, %esi
callq 0x10e0
testq %rax, %rax
jne 0x6eac
movq %r15, %rdi
movl $0xa, %esi
callq 0x10e0
testq %rax, %rax
je 0x6eaf
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1150
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x1130
testq %rax, %rax
jne 0x6e6b
movq %r14, %rdi
callq 0x10c0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/eric-lo[P]3150/3-ProcessUser/envp.c
// Function: main
int main(int argc, char **argv, char **envp) {
	int i;
	for(i = 0; envp[i]; i++)
		printf("%s\n", envp[i]);
	return 0;
}

// Assembly:
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x115e
pushq %rbx
movq %rdx, %rbx
addq $0x8, %rbx
callq 0x1030
movq (%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x114c
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/tkln[P]mcwm/hidden.c
// Function: init
void init(void)
{
    int scrno;
    xcb_screen_iterator_t iter;
    
    conn = xcb_connect(NULL, &scrno);
    if (!conn)
    {
        fprintf(stderr, "can't connect to an X server\n");
        exit(1);
    }

    iter = xcb_setup_roots_iterator(xcb_get_setup(conn));

    for (int i = 0; i < scrno; ++i)
    {
        xcb_screen_next(&iter);
    }

    screen = iter.data;

    if (!screen)
    {
        fprintf(stderr, "can't get the current screen\n");
        xcb_disconnect(conn);
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %rsi
xorl %edi, %edi
callq 0x1070
movq %rax, 0x2d31(%rip)      # 0x4108
testq %rax, %rax
je 0x142c
movq %rax, %rdi
callq 0x11a0
movq %rax, %rdi
callq 0x1110
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
cmpl $0x0, 0x4(%rsp)
jle 0x1414
xorl %ebp, %ebp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x10f0
incl %ebp
cmpl 0x4(%rsp), %ebp
jl 0x1404
movq 0x8(%rsp), %rax
movq %rax, 0x2cf0(%rip)      # 0x4110
testq %rax, %rax
je 0x1431
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
callq 0x1211
callq 0x11e0
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/ksw2/kalloc.c
// Function: km_destroy
void km_destroy(void *_km)
{
	kmem_t *km = (kmem_t*)_km;
	allocated_t *p, *q;
	if (km == 0) return;
	p = &km->list_head;
	do {
		q = p->next;
		free(p->ptr);
		if (p != &km->list_head) free(p);
		p = q;
	} while (p && p->next);
	if (p != &km->list_head) free(p);
	free(km);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1fb9d9
movq %rdi, %rbx
leaq 0x18(%rdi), %r12
movq %r12, %r15
movq (%r15), %r14
movq 0x8(%r15), %rdi
callq 0x19e120
cmpq %r12, %r15
je 0x1fb9ab
movq %r15, %rdi
callq 0x19e120
testq %r14, %r14
je 0x1fb9b9
cmpq $0x0, (%r14)
movq %r14, %r15
jne 0x1fb992
cmpq %r12, %r14
je 0x1fb9c6
movq %r14, %rdi
callq 0x19e120
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x19e120
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/ksw2/kalloc.c
// Function: krealloc
void *krealloc(void *_km, void *ap, size_t n_bytes)
{
	kmem_t *km = (kmem_t*)_km;
	size_t n_units, *p, *q;

	if (n_bytes == 0) {
		kfree(km, ap); return 0;
	}
	if (km == 0) return realloc(ap, n_bytes);
	if (!ap) return kmalloc(km, n_bytes);
	n_units = 1 + (n_bytes + sizeof(size_t) - 1) / sizeof(size_t);
	p = (size_t*)ap - 1;
	if (*p >= n_units) return ap; /* TODO: this prevents shrinking */
	q = (size_t*)kmalloc(km, n_bytes);
	memcpy(q, ap, (*p - 1) * sizeof(size_t));
	kfree(km, ap);
	return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x1fbb00
testq %r14, %r14
je 0x1fbb16
testq %rbx, %rbx
je 0x1fbb26
leaq 0x7(%rdx), %rax
shrq $0x3, %rax
cmpq %rax, -0x8(%rbx)
ja 0x1fbb0d
movq %r14, %rdi
movq %rdx, %rsi
callq 0x1fbb36
movq %rax, %r15
movq -0x8(%rbx), %rax
leaq -0x8(,%rax,8), %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x19e0c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fb9e5
movq %r15, %rbx
jmp 0x1fbb0d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1fb9e5
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %rdx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x19e1e0
movq %r14, %rdi
movq %rdx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x1fbb36
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/ksw2/kalloc.c
// Function: kmalloc
void *kmalloc(void *_km, size_t n_bytes)
{
	kmem_t *km = (kmem_t*)_km;
	size_t n_units, *p, *q;

	if (n_bytes == 0) return 0;
	if (km == 0) return malloc(n_bytes);
	/* "n_units" means the number of units. The size of one unit equals to sizeof(kheader_t).
	 * "1" is the kheader_t of a block, which is always required. */
	n_units = 1 + (n_bytes + sizeof(size_t) - 1) / sizeof(size_t);
	if (n_units&1) ++n_units; /* make n_units an even number, or it will segfault if only one unit remains */

	if (!(q = km->loop_head)) { /* the first time when kmalloc() is called, intialization */
		km->base[1] = (size_t)(km->loop_head = q = km->base); *q = 0;
	}
	for (p = PTR(q);; q = p, p = PTR(p)) { /* search for a suitable block */
		if (*p >= n_units) { /* p->size if the size of current block. This line means the current block is large enough. */
			if (*p == n_units) q[1] = (size_t)PTR(p); /* no need to split the block */
			else { /* split the block */
				/* memory is allocated at the end of the block */
				*p -= n_units; /* reduce the size of the free block */
				p += *p; /* skip to the kheader_t of the allocated block */
				*p = n_units; /* set the size */
			}
			km->loop_head = q; /* set the end of chain */
			return p + 1; /* skip the kheader_t */
		}
		if (p == km->loop_head) { /* then ask for more "cores" */
			if ((p = morecore(km, n_units)) == 0) return 0;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x1fbc47
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1fbc4b
addq $0x7, %rsi
movq %rsi, %r12
shrq $0x3, %r12
andl $0x8, %esi
cmpq $0x1, %rsi
adcq $0x1, %r12
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
jne 0x1fbb87
movq %rbx, 0x10(%rbx)
movq %rbx, 0x8(%rbx)
movq $0x0, (%rbx)
movq %rbx, %rcx
movq 0x8(%rcx), %rax
movq (%rax), %rdx
cmpq %r12, %rdx
jae 0x1fbc38
leaq 0xfffff(%r12), %rcx
movabsq $0x7ffffffffff00000, %r13 # imm = 0x7FFFFFFFFFF00000
andq %rcx, %r13
leaq (,%r13,8), %r14
leaq 0x18(%rbx), %rcx
movq %rcx, (%rsp)
movq %rax, %rsi
cmpq %rsi, 0x10(%rbx)
jne 0x1fbc26
movq %r14, %rdi
callq 0x19e150
testq %rax, %rax
je 0x1fbc82
movq %rax, %r15
cmpq $0x0, 0x28(%rbx)
jne 0x1fbbe8
movq (%rsp), %rax
movq %rax, 0x28(%rbx)
movq 0x28(%rbx), %rbp
movq %r15, 0x8(%rbp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x19e0b0
movq %rax, (%rbp)
movq %rax, 0x28(%rbx)
addq %r14, 0x30(%rbx)
movq %r13, (%r15)
addq $0x8, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1fb9e5
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x1fbc47
movq 0x8(%rsi), %rax
movq (%rax), %rdx
movq %rsi, %rcx
movq %rax, %rsi
cmpq %r12, %rdx
jb 0x1fbbbf
subq %r12, %rdx
jne 0x1fbc61
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
jmp 0x1fbc6b
xorl %eax, %eax
jmp 0x1fbc73
movq %rsi, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19e150
movq %rdx, (%rax)
leaq (%rax,%rdx,8), %rax
movq %r12, (%rax)
movq %rcx, 0x10(%rbx)
addq $0x8, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19e270
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/ksw2/kalloc.c
// Function: kcalloc
void *kcalloc(void *_km, size_t count, size_t size)
{
	kmem_t *km = (kmem_t*)_km;
	void *p;
	if (size == 0 || count == 0) return 0;
	if (km == 0) return calloc(count, size);
	p = kmalloc(km, count * size);
	memset(p, 0, count * size);
	return p;
}

// Assembly:
pushq %rbx
testq %rdx, %rdx
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x1fbca2
xorl %eax, %eax
popq %rbx
retq
movq %rdx, %rbx
testq %rdi, %rdi
je 0x1fbcc4
imulq %rsi, %rbx
movq %rbx, %rsi
callq 0x1fbb36
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x19e090
movq %rsi, %rdi
movq %rbx, %rsi
popq %rbx
jmp 0x19e0b0
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/ksw2/kalloc.c
// Function: km_stat
void km_stat(const void *_km)
{
	kmem_t *km = (kmem_t*)_km;
	unsigned n_blocks, n_units;
	size_t max_block = 0, *p, *q;
	float frag;

	if (km == 0 || !(p = km->loop_head)) return;
	n_blocks = n_units = 0;
	do {
		q = PTR(p);
		if (*p > max_block) max_block = *p;
		n_units += *p;
		if (p + (*p) > q && q > p)
			kerror("[kr_stat] The end of a free block enters another free block.");
		p = q;
		++n_blocks;
	} while (p != km->loop_head);
	
	--n_blocks;
	frag = 1.0/1024.0 * n_units * sizeof(size_t) / n_blocks;
	fprintf(stderr, "[kr_stat] tot=%lu, free=%lu, n_block=%u, max_block=%lu, frag_len=%.3fK\n",
			km->total_allocated, n_units * sizeof(size_t), n_blocks, max_block * sizeof(size_t), frag);
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x1fbce2
movq %rdi, %rdx
movq 0x10(%rdi), %rax
testq %rax, %rax
jne 0x1fbce4
popq %rax
retq
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movq %rax, %r10
xorl %edi, %edi
movq (%r10), %r9
movq 0x8(%r10), %r8
leaq (%r10,%r9,8), %r11
cmpq %r8, %r11
setbe %r11b
cmpq %r8, %r10
setae %r10b
orb %r11b, %r10b
je 0x1fbd29
addq %r9, %rdi
cmpq %rcx, %r9
cmovaq %r9, %rcx
incl %esi
movq %r8, %r10
cmpq %r8, %rax
jne 0x1fbcf0
callq 0x19e29c
jmp 0x1fbce2
callq 0x19e2f4
nop
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: fill_matrix
void fill_matrix(int8_t *matrix, char *fn) {
	FILE *fp = fopen(fn, "r");
	char buffer[256];
	char *pch;
	int i = 0;

	while (0 < fgets(buffer, 256, fp)) {
		pch = strtok(buffer, ",\t");
		while (pch != NULL) {
			if (25 <= i) {
				fprintf(stderr, "Too many values in %s\n", fn);
				exit(1);
			}
			matrix[i] = atoi(pch);
			i++;
		}
	}
	if (i != 16 || i != 25) {
		fprintf(stderr, "Incorrect # of values (found %d, want 16 or 25) in %s\n", i, fn);
		exit(1);
	}

	fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rax
movq %rdi, 0x10(%rsp)
leaq 0x39285b(%rip), %rsi    # 0x596cdf
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x19e110
leaq 0x20(%rsp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %rax, 0x18(%rsp)
movq %rax, %rdx
callq 0x19e1c0
xorl %r12d, %r12d
testq %rax, %rax
jne 0x2044d5
movq 0x59db21(%rip), %rax    # 0x7a1fd8
movq (%rax), %rdi
leaq 0x392009(%rip), %rsi    # 0x5964ca
movl %r12d, %edx
movq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x19e180
jmp 0x204569
xorl %r12d, %r12d
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
leaq 0x391fc9(%rip), %rsi    # 0x5964b0
callq 0x19e1b0
testq %rax, %rax
je 0x204530
movq %rax, %rbx
movslq %r12d, %r14
cmpl $0x1a, %r14d
movl $0x19, %r13d
cmovgel %r14d, %r13d
subq %r14, %r13
addq 0x10(%rsp), %r14
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x20454c
movq %rbx, %rdi
callq 0x19e1a0
leaq 0x1(%r15), %rcx
movb %al, (%r14,%r15)
movq %rcx, %r15
testq %rbx, %rbx
jne 0x204510
addl %ecx, %r12d
movq %rbp, %rdi
movl $0x100, %esi            # imm = 0x100
movq 0x18(%rsp), %rdx
callq 0x19e1c0
testq %rax, %rax
jne 0x2044dd
jmp 0x2044b0
movq 0x59da85(%rip), %rax    # 0x7a1fd8
movq (%rax), %rdi
leaq 0x391f56(%rip), %rsi    # 0x5964b3
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x19e180
movl $0x1, %edi
callq 0x19e130
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: ksw2_data_init
ksw2_data_t *ksw2_data_init(main_opt_t *opt, const int8_t *matrix)
{
	ksw2_data_t *data = calloc(1, sizeof(ksw2_data_t));

	data->ksw2_flags = (opt->right_align_gaps == 1) ? KSW_EZ_RIGHT : 0;
	if (opt->add_cigar != 1) data->ksw2_flags |= KSW_EZ_SCORE_ONLY;
	memset(&data->ez, 0, sizeof(ksw_extz_t));
	
	//data->km = km_init(); FIXME

	data->matrix = calloc(1, sizeof(int8_t)*25);
	memcpy(data->matrix, matrix, sizeof(int8_t)*25);
	
	return data;

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movl $0x1, %edi
movl $0x48, %esi
callq 0x19e0b0
movq %rax, %r14
xorl %eax, %eax
cmpl $0x1, 0x30(%r15)
sete %al
addl %eax, %eax
movl %eax, 0x8(%r14)
cmpl $0x1, 0x24(%r15)
je 0x2045e4
orl $0x1, %eax
movl %eax, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x20(%r14)
movups %xmm0, 0x10(%r14)
movl $0x1, %edi
movl $0x19, %esi
callq 0x19e0b0
movq %rax, (%r14)
movups (%rbx), %xmm0
movups 0x9(%rbx), %xmm1
movups %xmm0, (%rax)
movups %xmm1, 0x9(%rax)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: parasail_to_func_name
void parasail_to_func_name(char *parasail_func_name, int alignment_mode, int add_cigar, int vec_strategy)
{
	parasail_func_name[0] = '\0';
	strcat(parasail_func_name, "parasail");


	// Vectorized
	switch (alignment_mode) {
		case Local: strcat(parasail_func_name, "_sw"); break; // local
		case Glocal: strcat(parasail_func_name, "_sg_dx"); break; // glocal
		case Extension: fprintf(stderr, "Parasail does not support extension\n"); exit(1);
		case Global: strcat(parasail_func_name, "_nw"); break; // global
		default: fprintf(stderr, "Unknown alignment mode: %d\n", alignment_mode); exit(1);
	}
	if (add_cigar == 1) strcat(parasail_func_name, "_trace");
	switch (vec_strategy) {
		case 0: strcat(parasail_func_name, "_striped"); break;
		case 1: strcat(parasail_func_name, "_scan"); break;
		case 2: strcat(parasail_func_name, "_diag"); break;
		default: fprintf(stderr, "Unknown parasail vectorization strategy: %d\n", vec_strategy); exit(1);
	}
	strcat(parasail_func_name, "_32"); // TODO: add this as a command line option?
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
xorl %r12d, %r12d
movb %r12b, (%rdi)
callq 0x19e070
movabsq $0x6c69617361726170, %rcx # imm = 0x6C69617361726170
movq %rcx, (%rbx,%rax)
movb %r12b, 0x8(%rbx,%rax)
cmpl $0x3, %r15d
ja 0x20475e
movl %r15d, %eax
leaq 0x391d7e(%rip), %rcx    # 0x596400
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x19e070
movl $0x77735f, (%rbx,%rax)  # imm = 0x77735F
jmp 0x2046c4
movq %rbx, %rdi
callq 0x19e070
movl $0x5f67735f, (%rbx,%rax) # imm = 0x5F67735F
movl $0x78645f, 0x3(%rbx,%rax) # imm = 0x78645F
jmp 0x2046c4
movq %rbx, %rdi
callq 0x19e070
movl $0x776e5f, (%rbx,%rax)  # imm = 0x776E5F
cmpl $0x1, %r14d
jne 0x2046e1
movq %rbx, %rdi
callq 0x19e070
movl $0x6172745f, (%rbx,%rax) # imm = 0x6172745F
movl $0x656361, 0x3(%rbx,%rax) # imm = 0x656361
cmpl $0x2, %ebp
je 0x204724
cmpl $0x1, %ebp
je 0x20470c
testl %ebp, %ebp
jne 0x204752
movq %rbx, %rdi
callq 0x19e070
movabsq $0x646570697274735f, %rcx # imm = 0x646570697274735F
movq %rcx, (%rbx,%rax)
movb $0x0, 0x8(%rbx,%rax)
jmp 0x20473a
movq %rbx, %rdi
callq 0x19e070
movl $0x6163735f, (%rbx,%rax) # imm = 0x6163735F
movw $0x6e, 0x4(%rbx,%rax)
jmp 0x20473a
movq %rbx, %rdi
callq 0x19e070
movl $0x6169645f, (%rbx,%rax) # imm = 0x6169645F
movw $0x67, 0x4(%rbx,%rax)
movq %rbx, %rdi
callq 0x19e070
movl $0x32335f, (%rbx,%rax)  # imm = 0x32335F
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
callq 0x19e64e
callq 0x19e629
movl %r15d, %edi
callq 0x19e671
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: parasail_data_init
parasail_data_t *parasail_data_init(main_opt_t *opt, const int8_t *matrix)
{
	int i, j, l;
	parasail_data_t *data = calloc(1, sizeof(parasail_data_t));
	char parasail_func_name[128];
	
	// create a matrix, don't care about the valukes
	data->matrix = parasail_matrix_create("ACGTN", matrix[0], matrix[1]); 
	// update the matrix with the correct values
	for (i = l = 0; i < 5; ++i) {
		for (j = 0; j < 5; ++j, ++l) {
			parasail_matrix_set_value(data->matrix, i, j, matrix[l]);
		}
	}

	parasail_to_func_name(parasail_func_name, opt->alignment_mode, opt->add_cigar, opt->parasail_vec_strat);
	data->func = parasail_lookup_function(parasail_func_name);

	// the global alignment function is needed for glocal when we don't align the full query
	if (opt->alignment_mode == Glocal) {
		data->func_global = data->func;
	}
	else {
		parasail_to_func_name(parasail_func_name, Global, opt->add_cigar, opt->parasail_vec_strat);
		data->func_global = parasail_lookup_function(parasail_func_name);
	}

	return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r15
movq %rdi, (%rsp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x19e0b0
movq %rax, %rbx
movsbl (%r15), %esi
movsbl 0x1(%r15), %edx
leaq 0x391dfa(%rip), %rdi    # 0x59659a
callq 0x209b67
movq %rax, %r12
movq %rbx, 0x8(%rsp)
movq %rax, (%rbx)
xorl %r13d, %r13d
xorl %ebx, %ebx
movslq %ebx, %rbx
leaq (%r15,%rbx), %r14
xorl %ebp, %ebp
movsbl (%r14,%rbp), %ecx
movq %r12, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x20a4fa
incq %rbp
cmpl $0x5, %ebp
jne 0x2047be
incl %r13d
addq %rbp, %rbx
cmpl $0x5, %r13d
jne 0x2047b5
movq (%rsp), %r14
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movl 0x3c(%r14), %ecx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x20463d
movq %r15, %rdi
callq 0x2092a8
movq 0x8(%rsp), %rbx
movq %rax, 0x8(%rbx)
cmpl $0x1, 0x20(%r14)
je 0x20483b
movl 0x24(%r14), %edx
movl 0x3c(%r14), %ecx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x3, %esi
callq 0x20463d
movq %r14, %rdi
callq 0x2092a8
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: main_opt_init_library
void main_opt_init_library(main_opt_t *opt)
{
	int i, j, k;
	int8_t matrix[25];

	// initialize scoring matrix
	for (i = k = 0; i < 4; ++i) {
		for (j = 0; j < 4; ++j) {
			matrix[k++] = i == j? opt->match_score: -opt->mismatch_score;
		}
		matrix[k++] = 0; // ambiguous base
	}
	for (j = 0; j < 5; ++j) matrix[k++] = 0;
	// overwrite if a matrix file was given
	if (opt->matrix_fn != NULL) fill_matrix(matrix, opt->matrix_fn);

	// adjust the library mode if it is set on auto
	if (opt->library == AutoLibrary) {
		switch (opt->alignment_mode) {
			case Local: 
			case Glocal: 
			case Global: opt->library = Parasail; break;
			case Extension: opt->library = Ksw2; break;
			default:
				fprintf(stderr, "Unknown alignment mode in %s: %d\n", __func__, opt->alignment_mode); 
				exit(1);
		}
	}

	switch (opt->library) {
		case Ksw2: 
			opt->_library_func = align_with_ksw2;
			opt->_library_data = (void*)ksw2_data_init(opt, matrix); 
			break;
		case Parasail: 
			opt->_library_func = align_with_parasail;
			opt->_library_data = (void*)parasail_data_init(opt, matrix); 
			break;
		default:
			fprintf(stderr, "Unknown library in %s: %d", __func__, opt->library);
			exit(1);
	}
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorl %ecx, %ecx
movabsq $0x100000000, %rax      # imm = 0x100000000
xorl %edx, %edx
movslq %ecx, %rsi
leaq (%rsp,%rsi), %rdi
shlq $0x20, %rsi
xorl %r8d, %r8d
movl %edx, %r9d
addl %r8d, %r9d
je 0x2048d4
xorl %r9d, %r9d
subl 0x4(%rbx), %r9d
jmp 0x2048d7
movl (%rbx), %r9d
movb %r9b, (%rdi)
decl %r8d
incq %rdi
addq %rax, %rsi
cmpl $-0x4, %r8d
jne 0x2048c3
movl %ecx, %edi
subl %r8d, %edi
leal 0x1(%rdi), %ecx
sarq $0x20, %rsi
movb $0x0, (%rsp,%rsi)
incl %edx
cmpl $0x4, %edx
jne 0x2048b5
incl %edi
movslq %edi, %rax
movb $0x0, 0x4(%rsp,%rax)
movl $0x0, (%rsp,%rax)
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
jne 0x20497b
cmpl $0x0, 0x38(%rbx)
jne 0x204936
movl 0x20(%rbx), %edi
cmpq $0x4, %rdi
jae 0x204988
leaq 0x391b60(%rip), %rax    # 0x596490
movl (%rax,%rdi,4), %eax
movl %eax, 0x38(%rbx)
movl 0x38(%rbx), %edi
cmpl $0x2, %edi
je 0x20495b
cmpl $0x1, %edi
jne 0x204983
leaq 0x43(%rip), %rax        # 0x20498d
movq %rax, 0x40(%rbx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2045a9
jmp 0x204971
leaq 0x27d(%rip), %rax       # 0x204bdf
movq %rax, 0x40(%rbx)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x204766
movq %rax, 0x48(%rbx)
addq $0x20, %rsp
popq %rbx
retq
movq %rsp, %rdi
callq 0x204464
callq 0x19e6be
callq 0x19e694
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: main_opt_destroy
void main_opt_destroy(main_opt_t *opt)
{
	switch (opt->library) {
		case Ksw2: ksw2_data_destroy((ksw2_data_t*)opt->_library_data); break;
		case Parasail: parasail_data_destroy((parasail_data_t*)opt->_library_data); break;
		default:
			fprintf(stderr, "Unknown library in %s: %d", __func__, opt->library);
			exit(1);
	}
	free(opt);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %edi
cmpl $0x2, %edi
je 0x204dea
cmpl $0x1, %edi
jne 0x204e0d
movq 0x48(%rbx), %rdi
callq 0x20461f
jmp 0x204dfe
movq 0x48(%rbx), %r14
movq (%r14), %rdi
callq 0x20a535
movq %r14, %rdi
callq 0x19e120
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x19e120
callq 0x19e781
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: assert_or_exit
void assert_or_exit(int condition, const char *fmt, ...)
{
	if (condition == 0) {
		fprintf(stderr, "Error: ");
		va_list args;
		va_start(args, fmt);
		vfprintf(stderr, fmt, args);
		va_end(args);
		fprintf(stderr, "\n");
		exit(1);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x204e6b
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)
testl %edi, %edi
je 0x204e7a
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
movq 0x59d154(%rip), %r14    # 0x7a1fd8
movq (%r14), %rcx
leaq 0x391775(%rip), %rdi    # 0x596603
movl $0x7, %esi
movl $0x1, %edx
callq 0x19e200
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x19e160
movq (%r14), %rsi
movl $0xa, %edi
callq 0x19e140
movl $0x1, %edi
callq 0x19e130
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: alignment_print
void alignment_print(FILE *fp, const char *query, const char *target, const main_opt_t *opt, const alignment_t *a) 
{
	int i;
	// output the score and start/end or start/length
	if (opt->offset_and_length == 1) {
		int qll = a->qle - a->qlb + 1;
		int tll = a->tle - a->tlb + 1;
		fprintf(fp, "%d\t%d\t%d\t%d\t%d", a->score, a->qlb, qll, a->tlb, tll);
	}
	else {
		fprintf(fp, "%d\t%d\t%d\t%d\t%d", a->score, a->qlb, a->qle, a->tlb, a->tle);
	}
	// output the cigar
	if (opt->add_cigar == 1) {
		fputc('\t', fp);
		if (a->n_cigar == 0) fputc('*', fp);
		for (i = 0; i < a->n_cigar; ++i) {
			fprintf(fp, "%d%c", a->cigar[i]>>4, "MID"[a->cigar[i]&0xf]);
		}
	}
	// output the query and target
	if (opt->add_seq) fprintf(fp, "\t%s\t%s", query, target);
	// flush the output so no one is waiting on buffering.
	fputc('\n', fp);
	fflush(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r13
movq %rcx, %r12
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
cmpl $0x1, 0x34(%rcx)
jne 0x2050a4
movl 0xc(%r13), %r8d
movl (%r13), %edx
movl 0x4(%r13), %ecx
subl %ecx, %r8d
incl %r8d
movl 0x10(%r13), %eax
movl 0x8(%r13), %r9d
subl %r9d, %eax
incl %eax
jmp 0x2050b8
movl (%r13), %edx
movl 0x4(%r13), %ecx
movl 0xc(%r13), %r8d
movl 0x8(%r13), %r9d
movl 0x10(%r13), %eax
movl %eax, (%rsp)
leaq 0x391753(%rip), %rsi    # 0x596815
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19e180
cmpl $0x1, 0x24(%r12)
jne 0x20513b
movl $0x9, %edi
movq %rbx, %rsi
callq 0x19e140
cmpl $0x0, 0x20(%r13)
jne 0x2050f5
movl $0x2a, %edi
movq %rbx, %rsi
callq 0x19e140
cmpl $0x0, 0x20(%r13)
jle 0x20513b
leaq 0x391726(%rip), %r14    # 0x596829
leaq 0x39171a(%rip), %rbp    # 0x596824
xorl %r15d, %r15d
movq 0x18(%r13), %rax
movl (%rax,%r15,4), %eax
movl %eax, %edx
shrl $0x4, %edx
andl $0xf, %eax
movsbl (%rax,%r14), %ecx
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x19e180
incq %r15
movslq 0x20(%r13), %rax
cmpq %rax, %r15
jl 0x20510d
cmpl $0x0, 0x28(%r12)
je 0x20515e
leaq 0x3916e3(%rip), %rsi    # 0x59682d
movq %rbx, %rdi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x19e180
movl $0xa, %edi
movq %rbx, %rsi
callq 0x19e140
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19e100
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/main.c
// Function: align
void align(char *query, char *target, main_opt_t *opt, alignment_t *alignment) 
{
	int ql = strlen(query); // query length
	int tl = strlen(target); // target length

	// remove ending newlines
	if (query[ql-1] == '\n') { query[ql-1] = '\0'; ql--; }
	if (target[tl-1] == '\n') { target[tl-1] = '\0'; tl--; }

	// reset the alignment
	alignment_reset(alignment);

	// do the alignment
	opt->_library_func(query, ql, target, tl, opt, opt->_library_data, alignment);

	// print it
	alignment_print(stdout, query, target, opt, alignment);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movabsq $-0x100000000, %rbp     # imm = 0xFFFFFFFF00000000
callq 0x19e070
movq %rax, %r13
movq %r15, %rdi
callq 0x19e070
leal -0x1(%r13), %ecx
movslq %ecx, %rdx
cmpb $0xa, (%r12,%rdx)
jne 0x2051de
movb $0x0, (%r12,%rdx)
movl %ecx, %r13d
movq %rax, %rcx
shlq $0x20, %rcx
addq %rbp, %rcx
sarq $0x20, %rcx
cmpb $0xa, (%r15,%rcx)
jne 0x2051fa
movb $0x0, (%r15,%rcx)
decl %eax
movl $0x0, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rbx)
movq 0x48(%r14), %r9
movq %rbx, (%rsp)
movq %r12, %rdi
movl %r13d, %esi
movq %r15, %rdx
movl %eax, %ecx
movq %r14, %r8
callq *0x40(%r14)
movq 0x59cd87(%rip), %rax    # 0x7a1fb0
movq (%rax), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20505c
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/cigar.c
// Function: parasail_cigar_encode_string
parasail_cigar_t* parasail_cigar_encode_string(const char *cigar)
{
    int sscanf_retcode = 0;
    size_t offset = 0;
    int chars_read = 0;
    unsigned int len = 0;
    char op = 'M';
    int done = 0;
    size_t string_length = 0;
    size_t size = 0;
    parasail_cigar_t *ret = NULL;

    string_length = strlen(cigar);
    size = sizeof(uint32_t)*string_length;
    ret = malloc(sizeof(parasail_cigar_t));
    ret->seq = malloc(size);
    ret->len = 0;

    while (!done) {
        sscanf_retcode = sscanf(
                &cigar[offset], "%u%c%n", &len, &op, &chars_read);
        if (2 != sscanf_retcode) {
            fprintf(stderr, "invalid CIGAR string\n");
            parasail_cigar_free(ret);
            return NULL;
        }
        offset += chars_read;
        ret->len += 1;
        if ((size_t)ret->len >= size) {
            size *= 2;
            ret->seq = realloc(ret->seq, size);
        }
        ret->seq[ret->len-1] = parasail_cigar_encode(len, op);
        if (offset >= string_length) {
            done = 1;
        }
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %ebx, %ebx
leaq 0x14(%rsp), %rax
movl %ebx, (%rax)
leaq 0x10(%rsp), %rax
movl %ebx, (%rax)
leaq 0xf(%rsp), %rax
movb $0x4d, (%rax)
movq %rdi, 0x20(%rsp)
callq 0x19e070
movq %rax, 0x18(%rsp)
leaq (,%rax,4), %r14
movl $0x18, %edi
callq 0x19e150
movq %rax, %r13
movq %r14, %rdi
callq 0x19e150
movq %rax, (%r13)
movl %ebx, 0x8(%r13)
xorl %r12d, %r12d
xorl %r15d, %r15d
movq 0x20(%rsp), %rax
leaq (%rax,%r15), %rdi
leaq 0x391548(%rip), %rsi    # 0x596d70
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
leaq 0x14(%rsp), %r8
xorl %eax, %eax
callq 0x19e0d0
cmpl $0x2, %eax
jne 0x2058b9
movslq 0x14(%rsp), %rbp
movslq 0x8(%r13), %rbx
leaq 0x1(%rbx), %rax
movl %eax, 0x8(%r13)
cmpq %rax, %r14
ja 0x20586c
addq %r14, %r14
movq (%r13), %rdi
movq %r14, %rsi
callq 0x19e1e0
movq %rax, (%r13)
addq %rbp, %r15
movl 0x10(%rsp), %eax
movsbq 0xf(%rsp), %rcx
shll $0x4, %eax
leaq 0x39146d(%rip), %rdx    # 0x596cf0
movzbl (%rcx,%rdx), %ecx
orl %eax, %ecx
movq (%r13), %rax
movl %ecx, (%rax,%rbx,4)
cmpq 0x18(%rsp), %r15
movl $0x1, %eax
cmovael %eax, %r12d
testl %r12d, %r12d
je 0x205818
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x19e7ab
xorl %r13d, %r13d
jmp 0x2058a7
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/cigar.c
// Function: parasail_cigar_decode
char* parasail_cigar_decode(parasail_cigar_t *cigar)
{
#define SIZE 40
    char *ret = NULL;
    size_t retlen = 0;
    size_t size = 0;
    int i = 0;

    /* initial allocation for 1 op and 3 number characters per cigar int */
    size = sizeof(char)*cigar->len*4;
    ret = malloc(size+1);
    ret[0] = '\0';

    for (i=0; i<cigar->len; ++i) {
        char tmp[SIZE];
        char op = parasail_cigar_decode_op(cigar->seq[i]);
        uint32_t len = parasail_cigar_decode_len(cigar->seq[i]);
        int snprintf_retcode = snprintf(tmp, SIZE, "%u%c", len, op);
        if (snprintf_retcode >= SIZE) {
            fprintf(stderr, "invalid CIGAR\n");
            free(ret);
            return NULL;
        }
        retlen += snprintf_retcode;
        if (retlen >= size) {
            size *= 2;
            ret = realloc(ret, size+1);
        }
        strcat(ret, tmp);
    }

    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x8(%rdi), %r13
leaq 0x1(,%r13,4), %rdi
callq 0x19e150
movq %rax, %r14
movb $0x0, (%rax)
testq %r13, %r13
jle 0x2059c0
shlq $0x2, %r13
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%rbx), %rax
movl (%rax,%r15,4), %ecx
movl %ecx, %eax
andl $0xf, %eax
movl $0x4d, %r8d
cmpl $0x9, %eax
ja 0x205954
leaq 0x39143e(%rip), %rdx    # 0x596d8d
movsbl (%rax,%rdx), %r8d
shrl $0x4, %ecx
movl $0x28, %esi
movq %rsp, %rdi
leaq 0x391432(%rip), %rdx    # 0x596d98
xorl %eax, %eax
callq 0x19e1d0
movl %eax, %ebp
cmpl $0x28, %eax
jge 0x2059b3
movslq %ebp, %rax
addq %rax, %r12
cmpq %r13, %r12
jb 0x205995
leaq 0x1(,%r13,2), %rsi
addq %r13, %r13
movq %r14, %rdi
callq 0x19e1e0
movq %rax, %r14
movq %r14, %rdi
movq %rsp, %rsi
callq 0x19e1f0
cmpl $0x28, %ebp
jge 0x2059bd
incq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jl 0x205931
jmp 0x2059c0
movq %r14, %rdi
callq 0x19e7dd
jmp 0x2059a0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nh13[P]ksw/src/parasail/src/function_lookup.c
// Function: parasail_lookup_function_info
const parasail_function_info_t * parasail_lookup_function_info(const char *funcname)
{
    const parasail_function_info_t * f = NULL;

    if (funcname) {
        int index = 0;
        f = &functions[index++];
        while (f->pointer) {
            if (0 == strcmp(funcname, f->name)) {
                break;
            }
            f = &functions[index++];
        }
        if (!f->pointer) {
            /* perhaps caller forgot "parasail_" prefix? */
            const char *prefix = "parasail_";
            char *newname = (char*)malloc(strlen(prefix)+strlen(funcname)+1);
            strcpy(newname, prefix);
            strcat(newname, funcname);
            index = 0;
            f = &functions[index++];
            while (f->pointer) {
                if (0 == strcmp(newname, f->name)) {
                    break;
                }
                f = &functions[index++];
            }
            free(newname);
        }
    }

    if (!f->pointer) {
        f = NULL;
    }

    return f;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x38dbe2(%rip), %rsi    # 0x596eb2
callq 0x19e170
leaq 0x4ee434(%rip), %r14    # 0x6f7710
testl %eax, %eax
je 0x209301
cmpq $0x0, 0x48(%r14)
sete %bpl
je 0x209308
movq 0x50(%r14), %rsi
movq %rbx, %rdi
callq 0x19e170
addq $0x48, %r14
testl %eax, %eax
jne 0x2092e0
jmp 0x209303
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x20936d
movq %rbx, %rdi
callq 0x19e070
leaq 0xa(%rax), %rdi
callq 0x19e150
movq %rax, %r15
movabsq $0x6c69617361726170, %rax # imm = 0x6C69617361726170
movq %rax, (%r15)
movw $0x5f, 0x8(%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x19e1f0
leaq 0x4ee3ce(%rip), %rbx    # 0x6f7710
movq 0x8(%rbx), %rsi
movq %r15, %rdi
callq 0x19e170
testl %eax, %eax
je 0x209362
leaq 0x48(%rbx), %r14
cmpq $0x0, 0x48(%rbx)
movq %r14, %rbx
jne 0x209342
jmp 0x209365
movq %rbx, %r14
movq %r15, %rdi
callq 0x19e120
movq (%r14), %rax
testq %rax, %rax
cmoveq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq