LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/waynebhayes[P]SAHap/src/utils.cpp
// Function: log_poisson_pmf
double log_poisson_pmf(double l, unsigned k) {
  double r = -l;

  for (auto i = k; i > 0; i--) {
    r += log(l/i);
  }

  return r;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movapd %xmm0, %xmm2
movapd 0x705(%rip), %xmm0      # 0xb040
xorpd %xmm2, %xmm0
testl %edi, %edi
je 0xa984
movl %edi, %ebx
movapd %xmm2, 0x10(%rsp)
movapd %xmm0, (%rsp)
movl %ebx, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, %xmm0
callq 0x2200
movapd 0x10(%rsp), %xmm2
movapd (%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, (%rsp)
movapd (%rsp), %xmm0
decl %ebx
jne 0xa94b
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/waynebhayes[P]SAHap/src/utils.cpp
// Function: log_poisson_1_cdf
double log_poisson_1_cdf(double l, unsigned k) {
#if 0
  if (log_poisson_1_cdf_l != l) {
    fill(log_poisson_1_cdf_memo, log_poisson_1_cdf_memo + 1000, 10);
    log_poisson_1_cdf_l = l;
  }

  if (k < 1000 && log_poisson_1_cdf_memo[k] < 0) {
    return log_poisson_1_cdf_memo[k];
  }
#endif
  // cout << "log_poisson_1_cdf(" << l << ", " << k << ")" << endl;

  assert(l>0);
  double pmax = 2, max = -1e30;
  for (unsigned i = k; pmax != max; ++i) {
    pmax = max;
    double logpmf = log_poisson_pmf(l, i);
    if (logpmf > max) {
      max = logpmf;
    }
  }

  double r = (max == 1 && k < l) ? 0 : max / .894;

  /*
  if (k < 1000) {
    log_poisson_1_cdf_memo[k] = r;
  }

  cout << "k = " << k << ", r = " << r << endl;
  */

  return r;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movapd %xmm0, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jbe 0xaa67
movl %edi, %ebx
movapd 0x692(%rip), %xmm0      # 0xb040
xorpd %xmm2, %xmm0
movapd %xmm0, 0x10(%rsp)
movsd 0xf90(%rip), %xmm0      # 0xb950
movl %edi, %ebp
movapd %xmm2, 0x20(%rsp)
movsd %xmm0, 0x8(%rsp)
movapd 0x10(%rsp), %xmm3
testl %ebp, %ebp
je 0xaa12
movl %ebp, %r14d
movaps 0x10(%rsp), %xmm3
movaps %xmm3, 0x30(%rsp)
movl %r14d, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm2
movapd %xmm2, %xmm0
callq 0x2200
movapd 0x30(%rsp), %xmm3
movapd 0x20(%rsp), %xmm2
addsd %xmm0, %xmm3
decl %r14d
jne 0xa9e0
movsd 0x8(%rsp), %xmm0
maxsd %xmm0, %xmm3
incl %ebp
ucomisd %xmm3, %xmm0
movapd %xmm3, %xmm0
jne 0xa9c8
jp 0xa9c8
movl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movapd %xmm3, %xmm1
divsd 0xf18(%rip), %xmm1      # 0xb958
cmpeqsd 0x697(%rip), %xmm3      # 0xb0e0
andnpd %xmm1, %xmm3
cmpltsd %xmm2, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm0
orpd %xmm3, %xmm0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xef2(%rip), %rdi       # 0xb960
leaq 0xeef(%rip), %rsi       # 0xb964
leaq 0xef6(%rip), %rcx       # 0xb972
movl $0x43, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O3/miniupnp[P]hfsplustools/src/hfscommon.c
// Function: hexdump
void hexdump(const unsigned char * p, unsigned int n, unsigned int a)
{
	unsigned int i, j;

	while (n > 0) {
		i = (n >= 16) ? 16 : n;
		printf("%08x: ", a);
		for (j = 0; j < i; j++) {
			printf("%02x ", (unsigned)p[j]);
		}
		for (; j < 16; j++)
			printf("   ");
		printf ("| ");
		for (j = 0; j < i; j++) {
			if (isgraph(p[j]))
				putchar(p[j]);
			else
				putchar(' ');
		}
		putchar('\n');
		n -= i;
		p += i;
		a += i;
	}
}

// Assembly:
testl %esi, %esi
je 0x1aef
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x1837(%rip), %r12      # 0x323c
cmpl $0x10, %esi
movl $0x10, %r13d
movl %esi, (%rsp)
cmovbl %esi, %r13d
leaq 0x1819(%rip), %rdi      # 0x3235
movl %edx, 0x4(%rsp)
movl %edx, %esi
xorl %eax, %eax
callq 0x1090
movl %r13d, %eax
addl %r13d, %eax
cmpq $0x10, %r13
movl $0xf, %ecx
cmovaeq %r13, %rcx
subl %ecx, %eax
addl $-0x2, %eax
movq $-0x1, %rbp
movq %r13, %rbx
movl %eax, %r15d
movzbl 0x1(%r14,%rbp), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x1090
incq %rbp
leal -0x1(%r15), %eax
decq %rbx
jne 0x1a4b
cmpq $0xe, %rbp
leaq 0x1c54(%rip), %rbx      # 0x36c9
ja 0x1a86
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1090
incl %r15d
jne 0x1a77
leaq 0x17b5(%rip), %rdi      # 0x3242
xorl %eax, %eax
callq 0x1090
callq 0x1150
movq %rax, %r15
xorl %ebx, %ebx
movq (%r15), %rcx
movzbl (%r14,%rbx), %eax
cmpw $0x0, (%rcx,%rax,2)
movl $0x20, %edi
jns 0x1ab4
movl %eax, %edi
callq 0x1040
incq %rbx
cmpq %rbx, %r13
jne 0x1a9e
movl $0xa, %edi
callq 0x1040
addq %r13, %r14
movl 0x4(%rsp), %edx
addl %r13d, %edx
movl (%rsp), %esi
subl %r13d, %esi
jne 0x1a05
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/miniupnp[P]hfsplustools/src/hfscommon.c
// Function: print_hfs_uni
static void print_hfs_uni(const unsigned char * p)
{
	uint16_t len;
	len = readu16(p);
	p += 2;
	putchar('"');
	while(len > 0) {
		if(p[0] || p[1] < 32) {
			printf("\\u%02x%02x", p[0], p[1]);
		} else {
			putchar(p[1]);
		}
		p += 2;
		len--;
	}
	putchar('"');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %ebp
movzbl 0x1(%rdi), %r14d
movl $0x22, %edi
callq 0x1040
movl %r14d, %eax
orw %bp, %ax
je 0x2433
shll $0x8, %ebp
movzwl %r14w, %eax
addl %ebp, %eax
movzwl %ax, %r15d
leaq 0x1558(%rip), %r14      # 0x394c
xorl %r12d, %r12d
movzbl 0x2(%rbx,%r12,2), %esi
testl %esi, %esi
setne %al
movb 0x3(%rbx,%r12,2), %cl
movzbl %cl, %edx
cmpb $0x20, %dl
setb %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x2423
movq %r14, %rdi
xorl %eax, %eax
callq 0x1090
jmp 0x242a
movl %edx, %edi
callq 0x1040
incq %r12
cmpw %r12w, %r15w
jne 0x23f7
movl $0x22, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/miniupnp[P]hfsplustools/src/hfscommon.c
// Function: load_catalog
unsigned char * load_catalog(FILE * f)
{
	unsigned char * catalog;
	int offset;
	if(block_size == 0) {
		fprintf(stderr, "block_size==0 !\n");
		return 0;
	}
	if(catalog_start_block == 0) {
		fprintf(stderr, "catalog_start_block == 0 !\n");
		return 0;
	}
	if(catalog_block_count == 0) {
		fprintf(stderr, "catalog_block_count == 0 !\n");
		return 0;
	}
	offset = hfs_part_sector * SECTOR_SIZE;
	offset += block_size * catalog_start_block;
	if(fseek(f, offset, SEEK_SET) != 0) {
		perror("fseek");
		return 0;
	}
	catalog = malloc(catalog_block_count * block_size);
	if(!catalog) {
		fprintf(stderr, "memory allocation error\n");
		return 0;
	}
	if(fread(catalog, block_size, catalog_block_count, f) != catalog_block_count) {
		fprintf(stderr, "failed to read catalog file\n");
		free(catalog);
		return 0;
	}
	printf("%u bytes in catalog\n", catalog_block_count * block_size);
	return catalog;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x370a(%rip), %eax      # 0x60cc
testl %eax, %eax
je 0x2a59
movl 0x3700(%rip), %ecx      # 0x60d0
testl %ecx, %ecx
je 0x2a60
cmpl $0x0, 0x36f5(%rip)      # 0x60d4
je 0x2a67
movq %rdi, %r14
movl 0x36d6(%rip), %edx      # 0x60c4
shll $0x9, %edx
imull %eax, %ecx
addl %edx, %ecx
movslq %ecx, %rsi
xorl %edx, %edx
callq 0x1100
testl %eax, %eax
jne 0x2a6e
movl 0x36c9(%rip), %r15d     # 0x60d4
movl 0x36ba(%rip), %r12d     # 0x60cc
movl %r12d, %edi
imull %r15d, %edi
callq 0x10d0
testq %rax, %rax
je 0x2a7c
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1070
movl 0x3697(%rip), %esi      # 0x60d4
cmpq %rsi, %rax
jne 0x2a83
imull 0x3683(%rip), %esi      # 0x60cc
leaq 0xd97(%rip), %rdi       # 0x37e7
xorl %eax, %eax
callq 0x1090
jmp 0x2a8d
callq 0x1411
jmp 0x2a8b
callq 0x13f5
jmp 0x2a8b
callq 0x13d9
jmp 0x2a8b
leaq 0x58f(%rip), %rdi       # 0x3004
callq 0x1120
jmp 0x2a8b
callq 0x13bd
jmp 0x2a8b
movq %rbx, %rdi
callq 0x1394
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/miniupnp[P]hfsplustools/src/hfscommon.c
// Function: save_catalog
int save_catalog(FILE * f, unsigned char * catalog)
{
	int offset;
	if(block_size == 0) {
		fprintf(stderr, "block_size==0 !\n");
		return 0;
	}
	if(catalog_start_block == 0) {
		fprintf(stderr, "catalog_start_block == 0 !\n");
		return 0;
	}
	if(catalog_block_count == 0) {
		fprintf(stderr, "catalog_block_count == 0 !\n");
		return 0;
	}
	offset = hfs_part_sector * SECTOR_SIZE;
	offset += block_size * catalog_start_block;
	if(fseek(f, offset, SEEK_SET) != 0) {
		perror("fseek");
		return 0;
	}
	if(fwrite(catalog, block_size, catalog_block_count, f) != catalog_block_count) {
		fprintf(stderr, "failed to write to file\n");
		return 0;
	}
	if(fflush(f) != 0) {
		perror("fflush");
		return 0;
	}
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x3626(%rip), %eax      # 0x60cc
testl %eax, %eax
je 0x2b1d
movl 0x3620(%rip), %ecx      # 0x60d0
testl %ecx, %ecx
je 0x2b24
cmpl $0x0, 0x3619(%rip)      # 0x60d4
je 0x2b2b
movq %rsi, %r14
movq %rdi, %rbx
movl 0x35fb(%rip), %edx      # 0x60c4
shll $0x9, %edx
imull %eax, %ecx
addl %edx, %ecx
movslq %ecx, %rsi
xorl %edx, %edx
callq 0x1100
testl %eax, %eax
jne 0x2b32
movl 0x35e7(%rip), %esi      # 0x60cc
movl 0x35e9(%rip), %edx      # 0x60d4
movq %r14, %rdi
movq %rbx, %rcx
callq 0x1140
movl 0x35d8(%rip), %ecx      # 0x60d4
cmpq %rcx, %rax
jne 0x2b40
movq %rbx, %rdi
callq 0x10e0
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0x2b47
leaq 0xcfa(%rip), %rdi       # 0x3815
jmp 0x2b39
callq 0x1481
jmp 0x2b45
callq 0x1465
jmp 0x2b45
callq 0x1449
jmp 0x2b45
leaq 0x4cb(%rip), %rdi       # 0x3004
callq 0x1120
jmp 0x2b45
callq 0x142d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/miniupnp[P]hfsplustools/src/hfscommon.c
// Function: read_catalog
int read_catalog(FILE * f)
{
	unsigned char * catalog;
	uint32_t node;
	//struct find_infos infos;

	catalog = load_catalog(f);
	if(catalog == NULL)
		return 0;
	printf("Catalog Header Node :\n");
	if(!print_node(catalog)) {	/* header node */
		free(catalog);
		return 0;
	}
	printf("Catalog Root Node :\n");
	print_node(catalog + catalog_root_node * catalog_node_size);/* root node */
#if 0
	hfs_find(catalog, 1 /* root parent id */, NULL, &infos);
	printf("----\n");
	if(hfs_find(catalog, 2 /* root id */, "fichiers", &infos)) {
		printf("/fichiers found : id=%u\n", infos.folder_id);
		if(hfs_find(catalog, infos.folder_id, "MYRIADE_3E.app", &infos)) {
			printf("found ! flags=%04X\n", readu16(infos.p + 56));
			//found = 1;
		}
	}
#endif
	printf("Catalog Leaf Nodes :\n");
	for(node = catalog_first_leaf_node; node != 0; node = next_node(catalog, node)) {
		print_node(catalog + node * catalog_node_size);
	}
	free(catalog);
	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
callq 0x29b4
testq %rax, %rax
je 0x2be4
movq %rax, %rbx
leaq 0xfd5(%rip), %rdi       # 0x3b40
callq 0x1060
movq %rbx, %rdi
callq 0x1f8d
testl %eax, %eax
je 0x2be8
leaq 0xfd3(%rip), %rdi       # 0x3b56
callq 0x1060
movl 0x3556(%rip), %edi      # 0x60e4
imull 0x3543(%rip), %edi      # 0x60d8
addq %rbx, %rdi
callq 0x1f8d
leaq 0xfc6(%rip), %rdi       # 0x3b6a
callq 0x1060
movl 0x352c(%rip), %r14d     # 0x60dc
movl $0x1, %ebp
testl %r14d, %r14d
je 0x2bea
movl 0x3524(%rip), %edi      # 0x60e4
imull %r14d, %edi
addq %rbx, %rdi
callq 0x1f8d
movl 0x3512(%rip), %edi      # 0x60e4
imull %edi, %r14d
movl (%rbx,%r14), %r14d
bswapl %r14d
testl %r14d, %r14d
jne 0x2bc0
jmp 0x2bea
xorl %ebp, %ebp
jmp 0x2bf2
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1030
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/miniupnp[P]hfsplustools/src/hfscommon.c
// Function: hfs_uni_to_str
static int hfs_uni_to_str(char * d, int n, const unsigned char * p)
{
	uint16_t len;
	int i, j;
	len = readu16(p);
	p += 2;
	for(i = 0, j = 0; i < len && j < (n - 1); i++) {
		if(p[0] || p[1] < 32) {
			j += snprintf(d + j, 7, "\\u%02x%02x", p[0], p[1]);
		} else {
			d[j++] = p[1];
		}
		p += 2;
	}
	d[j++] = '\0';
	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl (%rsi), %ecx
rolw $0x8, %cx
xorl %eax, %eax
testw %cx, %cx
je 0x2f08
movq %rsi, %r14
movzwl %cx, %ebp
movl $0x1, %r12d
leaq 0xa9e(%rip), %r15       # 0x394c
xorl %r13d, %r13d
movzbl (%r14,%r12,2), %ecx
testl %ecx, %ecx
setne %dl
movb 0x1(%r14,%r12,2), %al
cmpb $0x20, %al
setb %sil
orb %dl, %sil
movslq %r13d, %rdi
addq %rbx, %rdi
cmpb $0x1, %sil
jne 0x2eea
movzbl %al, %r8d
movl $0x7, %esi
movq %r15, %rdx
xorl %eax, %eax
callq 0x10a0
jmp 0x2ef1
movb %al, (%rdi)
movl $0x1, %eax
addl %eax, %r13d
cmpl %ebp, %r12d
jae 0x2f05
incq %r12
cmpl $0xff, %r13d
jl 0x2eb1
movslq %r13d, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DASmap.c
// Function: init_file_iterator
File_Iterator *init_file_iterator(FILE *input)
{ File_Iterator *it;

  it = Malloc(sizeof(File_Iterator),"Allocating file iterator");
  it->input = input;
  it->lineno = 1;
  rewind(input);
  return (it);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8d0a(%rip), %rsi      # 0xb004
movl $0x18, %edi
callq 0x2af5
movq %rax, %r14
movq %rbx, (%rax)
movl $0x1, 0x8(%rax)
movq %rbx, %rdi
callq 0x1110
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DASmap.c
// Function: next_read
int next_read(File_Iterator *it)
{ static char nbuffer[MAX_BUFFER];

  char *eol;
  int   x;

  if (fgets(nbuffer,MAX_BUFFER,it->input) == NULL)
    { if (feof(it->input))
        return (1);
      SYSTEM_READ_ERROR;
    }
  if ((eol = index(nbuffer,'\n')) == NULL)
    { fprintf(stderr,"%s: Line %d in read list is longer than %d chars!\n",
                     Prog_Name,it->lineno,MAX_BUFFER-1);
      return (1);
    }
  *eol = '\0';
  x = sscanf(nbuffer," %d %d %d",&(it->read),&(it->beg),&(it->end));
  if (x == 1)
    it->beg = -1;
  else if (x != 3)
    { fprintf(stderr,"%s: Line %d of read list is improperly formatted\n",Prog_Name,it->lineno);
      return (1);
    }
  it->lineno += 1;
  return (0);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdx
leaq 0xde9b(%rip), %rdi      # 0x101d0
movl $0x2711, %esi           # imm = 0x2711
callq 0x1180
testq %rax, %rax
je 0x2399
leaq 0xde85(%rip), %rdi      # 0x101d0
movl $0xa, %esi
callq 0x1140
testq %rax, %rax
je 0x23b1
movb $0x0, (%rax)
leaq 0xc(%rbx), %rdx
leaq 0x10(%rbx), %r14
leaq 0x14(%rbx), %r8
leaq 0xde60(%rip), %rdi      # 0x101d0
leaq 0x8cf9(%rip), %rsi      # 0xb070
xorl %ebp, %ebp
movq %r14, %rcx
xorl %eax, %eax
callq 0x1200
cmpl $0x3, %eax
je 0x2394
cmpl $0x1, %eax
jne 0x23bb
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
incl 0x8(%rbx)
jmp 0x23aa
movq (%rbx), %rdi
callq 0x11b0
movl $0x1, %ebp
testl %eax, %eax
je 0x23ca
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x12e8
jmp 0x23c3
movq %rbx, %rdi
callq 0x12c0
movl $0x1, %ebp
jmp 0x23aa
callq 0x1316
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Count_Args
int Count_Args(char *var)
{ int   cnt, lev;
  char *s;

  cnt = 1;
  lev = 0;
  for (s = var; *s != '\0'; s++)
    if (*s == ',')
      { if (lev == 0)
          cnt += 1;
      }
    else if (*s == '(')
      lev += 1;
    else if (*s == ')')
      lev -= 1;
  return (cnt);
}

// Assembly:
xorl %ecx, %ecx
movl $0x1, %eax
movzbl (%rdi), %edx
cmpl $0x28, %edx
jle 0x2ae1
cmpl $0x29, %edx
je 0x2ae7
cmpl $0x2c, %edx
jne 0x2aef
cmpl $0x1, %ecx
adcl $0x0, %eax
jmp 0x2aef
jne 0x2aeb
incl %ecx
jmp 0x2aef
decl %ecx
jmp 0x2aef
testl %edx, %edx
je 0x2af4
incq %rdi
jmp 0x2ac7
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Malloc
void *Malloc(int64 size, char *mesg)
{ void *p;

  if ((p = malloc(size)) == NULL)
    { if (mesg == NULL)
        EPRINTF(EPLACE,"%s: Out of memory\n",Prog_Name);
      else
        EPRINTF(EPLACE,"%s: Out of memory (%s)\n",Prog_Name,mesg);
    }
  return (p);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
callq 0x11f0
movq %rax, %rbx
testq %rax, %rax
je 0x2b14
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xd4dd(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq 0xfdc3(%rip), %rdx      # 0x128e8
testq %r14, %r14
jne 0x2b3a
leaq 0x877f(%rip), %rsi      # 0xb2b0
xorl %eax, %eax
callq 0x11a0
jmp 0x2b09
leaq 0x8782(%rip), %rsi      # 0xb2c3
movq %r14, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x2b09
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Realloc
void *Realloc(void *p, int64 size, char *mesg)
{ if (size <= 0)
    size = 1;
  if ((p = realloc(p,size)) == NULL)
    { if (mesg == NULL)
        EPRINTF(EPLACE,"%s: Out of memory\n",Prog_Name);
      else
        EPRINTF(EPLACE,"%s: Out of memory (%s)\n",Prog_Name,mesg);
    }
  return (p);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
cmpq $0x2, %rsi
movl $0x1, %eax
cmovlq %rax, %rsi
callq 0x1210
movq %rax, %rbx
testq %rax, %rax
je 0x2b79
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xd478(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq 0xfd5e(%rip), %rdx      # 0x128e8
testq %r14, %r14
jne 0x2b9f
leaq 0x871a(%rip), %rsi      # 0xb2b0
xorl %eax, %eax
callq 0x11a0
jmp 0x2b6e
leaq 0x871d(%rip), %rsi      # 0xb2c3
movq %r14, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x2b6e
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Strdup
char *Strdup(char *name, char *mesg)
{ char *s;

  if (name == NULL)
    return (NULL);
  if ((s = strdup(name)) == NULL)
    { if (mesg == NULL)
        EPRINTF(EPLACE,"%s: Out of memory\n",Prog_Name);
      else
        EPRINTF(EPLACE,"%s: Out of memory (%s)\n",Prog_Name,mesg);
    }
  return (s);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2bf3
movq %rsi, %r14
callq 0x1290
movq %rax, %rbx
testq %rax, %rax
jne 0x2bf5
movq 0xd426(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq 0xfd0c(%rip), %rdx      # 0x128e8
testq %r14, %r14
jne 0x2c00
leaq 0x86c8(%rip), %rsi      # 0xb2b0
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x11a0
jmp 0x2bf5
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x86bc(%rip), %rsi      # 0xb2c3
xorl %ebx, %ebx
movq %r14, %rcx
xorl %eax, %eax
callq 0x11a0
jmp 0x2bf5
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Fopen
FILE *Fopen(char *name, char *mode)
{ FILE *f;

  if (name == NULL || mode == NULL)
    return (NULL);
  if ((f = fopen(name,mode)) == NULL)
    EPRINTF(EPLACE,"%s: Cannot open %s for '%s'\n",Prog_Name,name,mode);
  return (f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
je 0x2c2f
xorl %r15d, %r15d
jmp 0x2c42
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1240
movq %rax, %r15
testq %rax, %rax
je 0x2c4b
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
movq 0xd3a6(%rip), %rax      # 0xfff8
movq (%rax), %rdi
movq 0xfc8c(%rip), %rdx      # 0x128e8
leaq 0x8678(%rip), %rsi      # 0xb2db
xorl %r15d, %r15d
movq %r14, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x11a0
jmp 0x2c42
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: PathTo
char *PathTo(char *name)
{ char *path, *find;

  if (name == NULL)
    return (NULL);
  if ((find = rindex(name,'/')) != NULL)
    { *find = '\0';
      path = Strdup(name,"Extracting path from");
      *find = '/';
    }
  else
    path = Strdup(".","Allocating default path");
  return (path);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2cab
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x1250
testq %rax, %rax
je 0x2cb5
movq %rax, %r14
movb $0x0, (%rax)
leaq 0x865b(%rip), %rsi      # 0xb2f8
movq %rbx, %rdi
callq 0x2bb2
movb $0x2f, (%r14)
jmp 0x2cad
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8892(%rip), %rdi      # 0xb54e
leaq 0x864a(%rip), %rsi      # 0xb30d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2bb2
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Root
char *Root(char *name, char *suffix)
{ char *path, *find, *dot;
  int   epos;

  if (name == NULL)
    return (NULL);
  find = rindex(name,'/');
  if (find == NULL)
    find = name;
  else
    find += 1;
  if (suffix == NULL)
    { dot = strchr(find,'.');
      if (dot != NULL)
        *dot = '\0';
      path = Strdup(find,"Extracting root from");
      if (dot != NULL)
        *dot = '.';
    }
  else
    { epos  = strlen(find);
      epos -= strlen(suffix);
      if (epos > 0 && strcasecmp(find+epos,suffix) == 0)
        { find[epos] = '\0';
          path = Strdup(find,"Extracting root from");
          find[epos] = suffix[0];
        }
      else
        path = Strdup(find,"Allocating root");
    }
  return (path);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x2d36
movq %rsi, %r14
movq %rdi, %r15
movl $0x2f, %esi
callq 0x1250
leaq 0x1(%rax), %rbx
testq %rax, %rax
cmoveq %r15, %rbx
movq %rbx, %rdi
testq %r14, %r14
je 0x2d3a
callq 0x10e0
movq %rax, %r15
movq %r14, %rdi
callq 0x10e0
subq %rax, %r15
testl %r15d, %r15d
jle 0x2d2d
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
addq %rbx, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1050
testl %eax, %eax
je 0x2d64
leaq 0x8606(%rip), %rsi      # 0xb33a
jmp 0x2d8a
xorl %eax, %eax
jmp 0x2d7d
movl $0x2e, %esi
callq 0x10f0
testq %rax, %rax
je 0x2d83
movq %rax, %r14
movb $0x0, (%rax)
leaq 0x85cf(%rip), %rsi      # 0xb325
movq %rbx, %rdi
callq 0x2bb2
movb $0x2e, (%r14)
jmp 0x2d7d
movb $0x0, (%r15)
leaq 0x85b6(%rip), %rsi      # 0xb325
movq %rbx, %rdi
callq 0x2bb2
movb (%r14), %cl
movb %cl, (%r15)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x859b(%rip), %rsi      # 0xb325
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2bb2
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Catenate
char *Catenate(char *path, char *sep, char *root, char *suffix)
{ static char *cat = NULL;
  static int   max = -1;
  int   len;

  if (path == NULL || root == NULL || sep == NULL || suffix == NULL)
    return (NULL);
  len =  strlen(path);
  len += strlen(sep);
  len += strlen(root);
  len += strlen(suffix);
  if (len > max)
    { max = ((int) (1.2*len)) + 100;
      cat = (char *) realloc(cat,max+1);
      if (cat == NULL)
        { EPRINTF(EPLACE,"%s: Out of memory (Making path name for %s)\n",Prog_Name,root);
          return (NULL);
        }
    }
  sprintf(cat,"%s%s%s%s",path,sep,root,suffix);
  return (cat);
}

// Assembly:
movq %rdx, %xmm0
movq %rdi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %rcx, %xmm0
movq %rsi, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
je 0x2dd8
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
callq 0x10e0
movq %rax, %r13
movq %r15, %rdi
callq 0x10e0
movq %rax, %rbp
addl %r13d, %ebp
movq %rbx, %rdi
callq 0x10e0
movq %rax, %r13
movq %r14, %rdi
callq 0x10e0
addl %r13d, %eax
addl %ebp, %eax
movq 0xfacc(%rip), %rdi      # 0x128f0
cmpl %eax, 0xd37e(%rip)      # 0x101a8
jge 0x2e62
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x840d(%rip), %xmm0     # 0xb248
cvttsd2si %xmm0, %eax
leal 0x64(%rax), %ecx
movl %ecx, 0xd360(%rip)      # 0x101a8
addl $0x65, %eax
movslq %eax, %rsi
callq 0x1210
movq %rax, %rdi
movq %rax, 0xfa93(%rip)      # 0x128f0
testq %rax, %rax
je 0x2e92
leaq 0x850e(%rip), %rsi      # 0xb377
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x1260
movq 0xfa6d(%rip), %rax      # 0x128f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1341
xorl %eax, %eax
jmp 0x2e83
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Numbered_Suffix
char *Numbered_Suffix(char *left, int num, char *right)
{ static char *sfx = NULL;
  static int   max = -1;
  int   len;

  if (left == NULL || right == NULL)
    return (NULL);
  len =  strlen(left);
  len += strlen(right) + 40;
  if (len > max)
    { max = ((int) (1.2*len)) + 100;
      sfx = (char *) realloc(sfx,max+1);
      if (sfx == NULL)
        { EPRINTF(EPLACE,"%s: Out of memory (Making number suffix for %d)\n",Prog_Name,num);
          return (NULL);
        }
    }
  sprintf(sfx,"%s%d%s",left,num,right);
  return (sfx);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
je 0x2eb1
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
callq 0x10e0
movq %rax, %r12
movq %r14, %rdi
callq 0x10e0
addl %r12d, %eax
addl $0x28, %eax
movq 0xfa1a(%rip), %rdi      # 0x128f8
cmpl %eax, 0xd2c8(%rip)      # 0x101ac
jge 0x2f19
cvtsi2sd %eax, %xmm0
mulsd 0x8356(%rip), %xmm0     # 0xb248
cvttsd2si %xmm0, %eax
leal 0x64(%rax), %ecx
movl %ecx, 0xd2ad(%rip)      # 0x101ac
addl $0x65, %eax
movslq %eax, %rsi
callq 0x1210
movq %rax, %rdi
movq %rax, 0xf9e4(%rip)      # 0x128f8
testq %rax, %rax
je 0x2f42
leaq 0x8491(%rip), %rsi      # 0xb3b1
movq %r15, %rdx
movl %ebx, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x1260
movq 0xf9c2(%rip), %rax      # 0x128f8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %ebx, %edi
callq 0x1363
xorl %eax, %eax
jmp 0x2f36
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Number_Digits
int  Number_Digits(int64 num)
{ int digit;

  digit = 0;
  while (num >= 1)
    { num /= 10;
      digit += 1;
    }
  return (digit);
}

// Assembly:
xorl %ecx, %ecx
testq %rdi, %rdi
jle 0x32ac
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
movq %rdi, %rax
mulq %rsi
shrq $0x3, %rdx
incl %ecx
cmpq $0x9, %rdi
movq %rdx, %rdi
ja 0x3297
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Compress_Read
void Compress_Read(int len, char *s)
{ int   i;
  char  c, d;
  char *s0, *s1, *s2, *s3;

  s0 = s;
  s1 = s0+1;
  s2 = s1+1;
  s3 = s2+1;

  c = s1[len];
  d = s2[len];
  s0[len] = s1[len] = s2[len] = 0;

  for (i = 0; i < len; i += 4)
    *s++ = (char ) ((s0[i] << 6) | (s1[i] << 4) | (s2[i] << 2) | s3[i]);

  s1[len] = c;
  s2[len] = d;
}

// Assembly:
movslq %edi, %rax
movb 0x1(%rsi,%rax), %cl
movb 0x2(%rsi,%rax), %dl
movb $0x0, 0x2(%rsi,%rax)
movw $0x0, (%rsi,%rax)
testl %eax, %eax
jle 0x3303
xorl %edi, %edi
xorl %r8d, %r8d
movb (%rsi,%r8), %r9b
movb 0x1(%rsi,%r8), %r10b
shlb $0x6, %r9b
shlb $0x4, %r10b
orb %r9b, %r10b
movb 0x2(%rsi,%r8), %r9b
shlb $0x2, %r9b
orb %r10b, %r9b
orb 0x3(%rsi,%r8), %r9b
movb %r9b, (%rsi,%rdi)
addq $0x4, %r8
incq %rdi
cmpq %rax, %r8
jl 0x32ce
movb %cl, 0x1(%rsi,%rax)
movb %dl, 0x2(%rsi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Uncompress_Read
void Uncompress_Read(int len, char *s)
{ int   i, tlen, byte;
  char *s0, *s1, *s2, *s3;
  char *t;

  s0 = s;
  s1 = s0+1;
  s2 = s1+1;
  s3 = s2+1;

  tlen = (len-1)/4;

  t = s+tlen;
  for (i = tlen*4; i >= 0; i -= 4)
    { byte = *t--;
      s0[i] = (char) ((byte >> 6) & 0x3);
      s1[i] = (char) ((byte >> 4) & 0x3);
      s2[i] = (char) ((byte >> 2) & 0x3);
      s3[i] = (char) (byte & 0x3);
    }
  s[len] = 4;
}

// Assembly:
cmpl $-0x2, %edi
jl 0x3378
leal -0x1(%rdi), %eax
leal 0x2(%rdi), %edx
testl %eax, %eax
cmovnsl %eax, %edx
movl %edx, %eax
sarl $0x2, %eax
andl $-0x4, %edx
addq %rsi, %rax
leaq (%rdx,%rsi), %rcx
addq $0x3, %rcx
addl $0x4, %edx
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
movl %r9d, %r10d
shrb $0x6, %r10b
movb %r10b, -0x3(%rcx,%r8,4)
movl %r9d, %r10d
shrb $0x4, %r10b
andb $0x3, %r10b
movb %r10b, -0x2(%rcx,%r8,4)
movl %r9d, %r10d
shrb $0x2, %r10b
andb $0x3, %r10b
movb %r10b, -0x1(%rcx,%r8,4)
andb $0x3, %r9b
movb %r9b, (%rcx,%r8,4)
addl $-0x4, %edx
decq %r8
cmpl $0x3, %edx
jg 0x3335
movslq %edi, %rax
movb $0x4, (%rsi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Lower_Read
void Lower_Read(char *s)
{ static char letter[4] = { 'a', 'c', 'g', 't' };

  for ( ; *s != 4; s++)
    *s = letter[(int) *s];
  *s = '\0';
}

// Assembly:
movb (%rdi), %al
cmpb $0x4, %al
je 0x33a0
leaq 0x8c5d(%rip), %rcx      # 0xbfea
movsbq %al, %rax
movb (%rax,%rcx), %al
movb %al, (%rdi)
movb 0x1(%rdi), %al
incq %rdi
cmpb $0x4, %al
jne 0x338d
movb $0x0, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Upper_Read
void Upper_Read(char *s)
{ static char letter[4] = { 'A', 'C', 'G', 'T' };

  for ( ; *s != 4; s++)
    *s = letter[(int) *s];
  *s = '\0';
}

// Assembly:
movb (%rdi), %al
cmpb $0x4, %al
je 0x33c4
leaq 0x8c3d(%rip), %rcx      # 0xbfee
movsbq %al, %rax
movb (%rax,%rcx), %al
movb %al, (%rdi)
movb 0x1(%rdi), %al
incq %rdi
cmpb $0x4, %al
jne 0x33b1
movb $0x0, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Letter_Arrow
void Letter_Arrow(char *s)
{ static char letter[4] = { '1', '2', '3', '4' };

  for ( ; *s != 4; s++)
    *s = letter[(int) *s];
  *s = '\0';
}

// Assembly:
movb (%rdi), %al
cmpb $0x4, %al
je 0x33e8
leaq 0x8c1d(%rip), %rcx      # 0xbff2
movsbq %al, %rax
movb (%rax,%rcx), %al
movb %al, (%rdi)
movb 0x1(%rdi), %al
incq %rdi
cmpb $0x4, %al
jne 0x33d5
movb $0x0, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Free_DB_Stub
void Free_DB_Stub(DAZZ_STUB *stub)
{ int i;

  if (stub == NULL)
    return;
  if (stub->fname != NULL)
    { for (i = 0; i < stub->nfiles; i++)
        free(stub->fname[i]);
      free(stub->fname-1);
    }
  if (stub->prolog != NULL)
    { for (i = 0; i < stub->nfiles; i++)
        free(stub->prolog[i]);
      free(stub->prolog-1);
    }
  if (stub->nreads != NULL)
    free(stub->nreads-1);
  free(stub->ublocks);
  free(stub->tblocks);
  free(stub);
}

// Assembly:
testq %rdi, %rdi
je 0x39c8
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x395f
cmpl $0x0, (%rbx)
jle 0x3956
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x393a
movq 0x10(%rbx), %rdi
addq $-0x8, %rdi
callq 0x1030
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3995
cmpl $0x0, (%rbx)
jle 0x398c
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1030
incq %r14
movslq (%rbx), %rax
cmpq %rax, %r14
jl 0x3970
movq 0x18(%rbx), %rdi
addq $-0x8, %rdi
callq 0x1030
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x39a7
addq $-0x4, %rdi
callq 0x1030
movq 0x38(%rbx), %rdi
callq 0x1030
movq 0x40(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: sizeof_DB
int64 sizeof_DB(DAZZ_DB *db)
{ int64       s;
  DAZZ_TRACK *t;

  s = sizeof(DAZZ_DB)
    + sizeof(DAZZ_READ)*(db->nreads+2)
    + strlen(db->path)+1
    + (db->totlen+db->nreads+4);

  t = db->tracks;
  if (t != NULL && strcmp(t->name,".@qvs") == 0)
    { DAZZ_QV *q = (DAZZ_QV *) t;
      s += sizeof(DAZZ_QV)
         + sizeof(uint16) * db->nreads
         + q->ncodes * sizeof(QVcoding)
         + 6;
      t = t->next;
    }

  for (; t != NULL; t = t->next)
    { s += sizeof(DAZZ_TRACK)
         + strlen(t->name)+1
         + t->size * (db->nreads+1);
      if (t->data != NULL)
        { if (t->size == 8)
            s += sizeof(int)*((int64 *) t->anno)[db->nreads];
          else //  t->size == 4
            s += sizeof(int)*((int *) t->anno)[db->nreads];
        }
    }

  return (s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movslq 0x30(%rdi), %r15
movq 0x48(%rdi), %rdi
callq 0x10e0
addq %r15, %rax
addq 0x28(%r14), %rax
leaq (%r15,%r15,4), %rcx
leaq (%rax,%rcx,8), %rbx
addq $0xc5, %rbx
movq 0x68(%r14), %r14
testq %r14, %r14
je 0x489d
movq 0x8(%r14), %rdi
leaq 0x6e35(%rip), %rsi      # 0xb663
callq 0x1190
testl %eax, %eax
jne 0x4853
movslq 0x10(%r14), %rax
leaq (%rax,%rax,8), %rax
leaq (%rbx,%r15,2), %rcx
leaq (%rcx,%rax,8), %rbx
addq $0x36, %rbx
movq (%r14), %r14
testq %r14, %r14
je 0x489d
leal 0x1(%r15), %ebp
movq 0x8(%r14), %rdi
callq 0x10e0
movl 0x10(%r14), %ecx
movl %ecx, %edx
imull %ebp, %edx
movslq %edx, %rdx
addq %rbx, %rax
leaq (%rdx,%rax), %rbx
addq $0x41, %rbx
cmpq $0x0, 0x28(%r14)
je 0x4895
movq 0x18(%r14), %rax
cmpl $0x8, %ecx
jne 0x488d
movq (%rax,%r15,8), %rax
jmp 0x4891
movslq (%rax,%r15,4), %rax
leaq (%rbx,%rax,4), %rbx
movq (%r14), %r14
testq %r14, %r14
jne 0x4857
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Print_Read
void Print_Read(char *s, int width)
{ int i;

  if (s[0] < 4)
    { for (i = 0; s[i] != 4; i++)
        { if (i%width == 0 && i != 0)
            printf("\n");
          printf("%d",s[i]);
        }
      printf("\n");
    }
  else
    { for (i = 0; s[i] != '\0'; i++)
        { if (i%width == 0 && i != 0)
            printf("\n");
          printf("%c",s[i]);
        }
      printf("\n");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movb (%rdi), %cl
cmpb $0x4, %cl
jge 0x4b19
leaq 0x659a(%rip), %r15      # 0xb077
xorl %r12d, %r12d
movl %r12d, %eax
cltd
idivl %ebx
testq %r12, %r12
je 0x4afd
testl %edx, %edx
jne 0x4afd
movl $0xa, %edi
callq 0x1040
movb (%r14,%r12), %cl
movsbl %cl, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x1100
movb 0x1(%r14,%r12), %cl
incq %r12
cmpb $0x4, %cl
jne 0x4ae0
jmp 0x4b4d
xorl %r15d, %r15d
movl %r15d, %eax
cltd
idivl %ebx
testq %r15, %r15
je 0x4b39
testl %edx, %edx
jne 0x4b39
movl $0xa, %edi
callq 0x1040
movb (%r14,%r15), %cl
movsbl %cl, %edi
callq 0x1040
movb 0x1(%r14,%r15), %cl
incq %r15
testb %cl, %cl
jne 0x4b1c
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Close_DB
void Close_DB(DAZZ_DB *db)
{ if (db->loaded)
    free(((char *) (db->bases)) - 1);
  else if (db->bases != NULL)
    fclose((FILE *) db->bases);
  if (db->reads != NULL)
    free(db->reads-1);
  free(db->path);

  Close_QVs(db);

  Close_Arrow(db);

  while (db->tracks != NULL)
    Close_Track(db,db->tracks);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x50(%rdi)
movq 0x58(%rdi), %rdi
je 0x4b7a
decq %rdi
callq 0x1030
jmp 0x4b84
testq %rdi, %rdi
je 0x4b84
callq 0x10c0
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x4b96
addq $-0x28, %rdi
callq 0x1030
movq 0x48(%rbx), %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x4bc4
movq %rbx, %rdi
callq 0x4c61
movq 0x68(%rbx), %rsi
testq %rsi, %rsi
je 0x4bc2
movq %rbx, %rdi
callq 0x4ccb
jmp 0x4baf
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Close_QVs
void Close_QVs(DAZZ_DB *db)
{ DAZZ_TRACK *track;
  DAZZ_QV    *qvtrk;
  int         i;

  Active_DB = NULL;

  track = db->tracks;
  if (track != NULL && strcmp(track->name,".@qvs") == 0)
    { qvtrk = (DAZZ_QV *) track;
      for (i = 0; i < qvtrk->ncodes; i++)
        Free_QVcoding(qvtrk->coding+i);
      free(qvtrk->coding);
      free(qvtrk->table);
      fclose(qvtrk->quiva);
      db->tracks = track->next;
      free(track);
    }
  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq $0x0, 0xdd39(%rip) # 0x12910
movq 0x68(%rdi), %r14
testq %r14, %r14
je 0x4bf7
movq %rdi, %rbx
movq 0x8(%r14), %rdi
leaq 0x6a75(%rip), %rsi      # 0xb663
callq 0x1190
testl %eax, %eax
je 0x4c03
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0x0, 0x10(%r14)
jle 0x4c2c
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x18(%r14), %rdi
addq %r15, %rdi
callq 0x9073
incq %r12
movslq 0x10(%r14), %rax
addq $0x48, %r15
cmpq %rax, %r12
jl 0x4c10
movq 0x18(%r14), %rdi
callq 0x1030
movq 0x20(%r14), %rdi
callq 0x1030
movq 0x28(%r14), %rdi
callq 0x10c0
movq (%r14), %rax
movq %rax, 0x68(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Close_Arrow
void Close_Arrow(DAZZ_DB *db)
{ DAZZ_ARROW *atrack;

  Arrow_DB = NULL;
  if (db->tracks != NULL && db->tracks->name == atrack_name)
    { atrack = (DAZZ_ARROW *) db->tracks;
      if (atrack->loaded)
        free(atrack->arrow);
      else
        fclose((FILE *) atrack->arrow);
      free(atrack->aoff);
      db->tracks = db->tracks->next;
      free(atrack);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq $0x0, 0xdc90(%rip) # 0x12900
movq 0x68(%rdi), %r14
testq %r14, %r14
je 0x4c86
leaq 0x7236(%rip), %rax      # 0xbeb6
cmpq %rax, 0x8(%r14)
je 0x4c8e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %rbx
cmpl $0x0, 0x20(%r14)
movq 0x18(%r14), %rdi
je 0x4ca3
callq 0x1030
jmp 0x4ca8
callq 0x10c0
movq 0x10(%r14), %rdi
callq 0x1030
movq 0x68(%rbx), %rax
movq (%rax), %rax
movq %rax, 0x68(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Close_Track
void Close_Track(DAZZ_DB *db, DAZZ_TRACK *track)
{ DAZZ_TRACK *record, *prev;

  prev = NULL;
  for (record = db->tracks; record != NULL; record = record->next)
    { if (track == record)
        { free(record->anno);
          free(record->alen);
          if (record->loaded)
            free(record->data);
          else
            fclose((FILE *) record->data);
          free(record->name);
          if (prev == NULL)
            db->tracks = record->next;
          else
            prev->next = record->next;
          free(record);
          return;
        }
      prev = record;
    }
  return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x68, %rbx
xorl %eax, %eax
movq %rbx, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x4d13
movq %rax, %r15
movq %r14, %rax
cmpq %rsi, %r14
jne 0x4cdc
movq 0x18(%r14), %rdi
callq 0x1030
movq 0x20(%r14), %rdi
callq 0x1030
cmpl $0x0, 0x30(%r14)
movq 0x28(%r14), %rdi
je 0x4d19
callq 0x1030
jmp 0x4d1e
popq %rbx
popq %r14
popq %r15
retq
callq 0x10c0
movq 0x8(%r14), %rdi
callq 0x1030
testq %r15, %r15
movq (%r14), %rax
cmovneq %r15, %rbx
movq %rax, (%rbx)
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: New_Read_Buffer
char *New_Read_Buffer(DAZZ_DB *db)
{ char *read;

  read = (char *) Malloc(db->maxlen+4,"Allocating New Read Buffer");
  if (read == NULL)
    EXIT(NULL);
  return (read+1);
}

// Assembly:
pushq %rax
movslq 0x20(%rdi), %rdi
addq $0x4, %rdi
leaq 0x6946(%rip), %rsi      # 0xb697
callq 0x2af5
testq %rax, %rax
je 0x4d60
incq %rax
popq %rcx
retq
movl $0x1, %edi
callq 0x1270
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Load_All_Reads
int Load_All_Reads(DAZZ_DB *db, int ascii)
{ FILE      *bases = (FILE *) db->bases;
  int        nreads = db->nreads;
  DAZZ_READ *reads = db->reads;
  void     (*translate)(char *s);

  char  *seq;
  int64  o, off;
  int    i, len, clen;

  if (db->loaded)
    return (0);

  seq = (char *) Malloc(db->totlen+nreads+4,"Allocating All Sequence Reads");
  if (seq == NULL)
    EXIT(1);

  *seq++ = 4;

  if (ascii == 1)
    translate = Lower_Read;
  else
    translate = Upper_Read;

  o = 0;
  for (i = 0; i < nreads; i++)
    { len = reads[i].rlen;
      off = reads[i].boff;
      if (ftello(bases) != off)
        fseeko(bases,off,SEEK_SET);
      clen = COMPRESSED_LEN(len);
      if (clen > 0)
        { if (fread(seq+o,clen,1,bases) != 1)
            { EPRINTF(EPLACE,"%s: Read of .bps file failed (Load_All_Sequences)\n",Prog_Name);
              free(seq-1);
              EXIT(1);
            }
        }
      Uncompress_Read(len,seq+o);
      if (ascii)
        translate(seq+o);
      reads[i].boff = o;
      o += (len+1);
    }
  reads[nreads].boff = o;

  fclose(bases);

  db->bases  = (void *) seq;
  db->loaded = 1;

  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
cmpl $0x0, 0x50(%rdi)
jne 0x53b4
movl %esi, %ebp
movq %rdi, %rbx
movq 0x58(%rdi), %r14
movq 0x60(%rdi), %r15
movslq 0x30(%rdi), %r12
movq 0x28(%rdi), %rax
leaq (%r12,%rax), %rdi
addq $0x4, %rdi
leaq 0x6469(%rip), %rsi      # 0xb701
callq 0x2af5
testq %rax, %rax
je 0x53cf
movq %rbx, 0x20(%rsp)
movq %rax, %rcx
incq %rcx
movq %rcx, 0x8(%rsp)
movb $0x4, (%rax)
cmpl $0x1, %ebp
leaq -0x1f43(%rip), %rcx     # 0x3380
leaq -0x1f26(%rip), %rdx     # 0x33a4
cmoveq %rcx, %rdx
movq %rdx, 0x28(%rsp)
testl %r12d, %r12d
movq %r12, 0x18(%rsp)
jle 0x5387
movq %rax, 0x10(%rsp)
movl %ebp, 0x4(%rsp)
leaq (,%r12,8), %rax
leaq (%rax,%rax,4), %rax
movq %rax, 0x30(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
movslq 0x4(%r15,%rbx), %r12
movq 0x10(%r15,%rbx), %r13
movq %r14, %rdi
callq 0x1080
cmpq %r13, %rax
je 0x5323
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x1230
leal 0x3(%r12), %eax
sarl $0x2, %eax
testl %eax, %eax
movq 0x8(%rsp), %r13
jle 0x534f
movq %r13, %rdi
addq %rbp, %rdi
movl %eax, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x10b0
cmpq $0x1, %rax
jne 0x53c5
addq %rbp, %r13
movl %r12d, %edi
movq %r13, %rsi
callq 0x330c
cmpl $0x0, 0x4(%rsp)
je 0x536b
movq %r13, %rdi
callq *0x28(%rsp)
movq %rbp, 0x10(%r15,%rbx)
addq %r12, %rbp
incq %rbp
addq $0x28, %rbx
cmpq %rbx, 0x30(%rsp)
jne 0x52ff
jmp 0x5389
xorl %ebp, %ebp
movq 0x18(%rsp), %rax
leaq (%rax,%rax,4), %rax
movq %rbp, 0x10(%r15,%rax,8)
movq %r14, %rdi
callq 0x10c0
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x58(%rax)
movl $0x1, 0x50(%rax)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rdi
callq 0x16be
movl $0x1, %edi
callq 0x1270
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Open_Arrow
int Open_Arrow(DAZZ_DB *db)
{ int64      *avector;
  DAZZ_ARROW *atrack;
  FILE       *afile;
  DAZZ_READ  *reads;
  int         i, nreads;

  if (db->tracks != NULL && db->tracks->name == atrack_name)
    return (0);
 
  if ((db->allarr & DB_ARROW) == 0)
    { EPRINTF(EPLACE,"%s: The DB is not an Arrow database (Open_Arrow)\n",Prog_Name);
      EXIT(1);
    }
  if (db->loaded)
    { EPRINTF(EPLACE,"%s: Cannot open Arrow vectors after loading all reads (Open_Arrow)\n",
                        Prog_Name);
      EXIT(1);
    }

  afile = Fopen(MyCatenate(db->path,"","",".arw"),"r");
  if (afile == NULL)
    return (-1);

  nreads  = db->nreads;
  avector = (int64 *) Malloc(sizeof(int64)*nreads,"Allocating Arrow index");
  atrack  = (DAZZ_ARROW *) Malloc(sizeof(DAZZ_ARROW),"Allocating Arrow track");
  if (avector == NULL || atrack == NULL)
    { fclose(afile);
      if (avector != NULL)
        free(avector);
      EXIT(1);
    }
  db->tracks     = (DAZZ_TRACK *) atrack;
  atrack->next   = NULL;
  atrack->name   = atrack_name;
  atrack->aoff   = avector;
  atrack->arrow  = (void *) afile;
  atrack->loaded = 0;


  reads = db->reads;
  for (i = 0; i < nreads; i++)
    avector[i] = reads[i].boff;
  return (0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0x53fe
leaq 0x6ac2(%rip), %rcx      # 0xbeb6
cmpq %rcx, 0x8(%rax)
je 0x54c8
testb $0x2, 0xc(%rbx)
je 0x54dd
cmpl $0x0, 0x50(%rbx)
jne 0x54e2
movq 0x48(%rbx), %rdi
leaq 0x659d(%rip), %rdx      # 0xb9ba
leaq 0x63a4(%rip), %rcx      # 0xb7c8
movq %rdx, %rsi
callq 0x427d
leaq 0x697e(%rip), %rsi      # 0xbdb1
movq %rax, %rdi
callq 0x2c15
testq %rax, %rax
je 0x54cc
movq %rax, %r15
movslq 0x30(%rbx), %r12
leaq (,%r12,8), %rdi
leaq 0x6373(%rip), %rsi      # 0xb7cd
callq 0x2af5
movq %rax, %r14
leaq 0x637b(%rip), %rsi      # 0xb7e4
movl $0x28, %edi
callq 0x2af5
testq %r14, %r14
je 0x54e7
testq %rax, %rax
je 0x54e7
movq %rax, 0x68(%rbx)
movq $0x0, (%rax)
leaq 0x6a27(%rip), %rcx      # 0xbeb6
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
movl $0x0, 0x20(%rax)
testl %r12d, %r12d
jle 0x54c8
movq 0x60(%rbx), %rcx
addq $0x10, %rcx
xorl %eax, %eax
xorl %edx, %edx
movq (%rcx), %rsi
movq %rsi, (%r14,%rdx,8)
incq %rdx
addq $0x28, %rcx
cmpq %rdx, %r12
jne 0x54b3
jmp 0x54d1
xorl %eax, %eax
jmp 0x54d1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1719
callq 0x16f1
movq %r15, %rdi
callq 0x10c0
testq %r14, %r14
je 0x54fc
movq %r14, %rdi
callq 0x1030
movl $0x1, %edi
callq 0x1270
// File: /workspace/github_c_makefile_star2_O3/thegenemyers[P]DASCRUBBER/DB.c
// Function: Load_Arrow
int Load_Arrow(DAZZ_DB *db, int i, char *arrow, int ascii)
{ FILE      *afile;
  int64      off;
  int        len, clen;

  if (db != Arrow_DB)
    { if (db->tracks == NULL || db->tracks->name != atrack_name)
        { EPRINTF(EPLACE,"%s: Arrow data is not available (Load_Arrow)\n",Prog_Name);
          EXIT(1);
        }
      Arrow_Ptr = (DAZZ_ARROW *) db->tracks;
      Arrow_DB  = db;
    }

  if (i < 0 || i >= db->nreads)
    { EPRINTF(EPLACE,"%s: Index out of bounds (Load_Arrow)\n",Prog_Name);
      EXIT(1);
    }

  afile = (FILE *) Arrow_Ptr->arrow;
  off   = Arrow_Ptr->aoff[i];
  len   = db->reads[i].rlen;

  if (ftello(afile) != off)
    fseeko(afile,off,SEEK_SET);
  clen = COMPRESSED_LEN(len);
  if (clen > 0)
    { if (fread(arrow,clen,1,afile) != 1)
        { EPRINTF(EPLACE,"%s: Failed read of .arw file (Load_Arrow)\n",Prog_Name);
          EXIT(1);
        }
    }
  Uncompress_Read(len,arrow);
  if (ascii == 1)
    { Letter_Arrow(arrow);
      arrow[-1] = '\0';
    }
  else
    arrow[-1] = 4;
  return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %rbx
cmpq %rdi, 0xd3e6(%rip)      # 0x12900
je 0x5548
movq 0x68(%rdi), %rax
testq %rax, %rax
je 0x5608
leaq 0x6986(%rip), %rcx      # 0xbeb6
cmpq %rcx, 0x8(%rax)
jne 0x5608
movq %rax, 0xd3c7(%rip)      # 0x12908
movq %rdi, 0xd3b8(%rip)      # 0x12900
testl %esi, %esi
js 0x5603
cmpl %esi, 0x30(%rdi)
jle 0x5603
movq 0xd3a8(%rip), %rax      # 0x12908
movq 0x10(%rax), %rcx
movq 0x18(%rax), %r15
movl %esi, %eax
movq (%rcx,%rax,8), %r12
movq 0x60(%rdi), %rcx
leaq (%rax,%rax,4), %rax
movl 0x4(%rcx,%rax,8), %r14d
movq %r15, %rdi
callq 0x1080
cmpq %r12, %rax
je 0x5595
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1230
leal 0x3(%r14), %eax
sarl $0x2, %eax
testl %eax, %eax
jle 0x55b8
movl %eax, %esi
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rcx
callq 0x10b0
cmpq $0x1, %rax
jne 0x560d
movl %r14d, %edi
movq %rbx, %rsi
callq 0x330c
movb $0x4, %al
cmpl $0x1, %ebp
jne 0x55f5
movb (%rbx), %al
movq %rbx, %rcx
cmpb $0x4, %al
je 0x55f0
leaq 0x6a18(%rip), %rdx      # 0xbff2
movq %rbx, %rcx
movsbq %al, %rax
movb (%rax,%rdx), %al
movb %al, (%rcx)
movb 0x1(%rcx), %al
incq %rcx
cmpb $0x4, %al
jne 0x55dd
movb $0x0, (%rcx)
xorl %eax, %eax
movb %al, -0x1(%rbx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1791
callq 0x1741
callq 0x1769