// File: /workspace/github_c_makefile_star2_O0/dapogon[P]cellcoal/src/cellcoal.c
// Function: PrintPILEUP
void PrintPILEUP (FILE *fp)
	{
	int		i, j, k, snv;
	int		referenceAllele;
	
	for (snv=0; snv<numSNVs; snv++)
		{
		j = SNVsites[snv];

		/* PILEUP: CHROMOSOME */
		fprintf (fp,"%d", 1);
		
		/* PILEUP: POSITION */
		fprintf (fp,"\t%d", j+1);

		/* PILEUP: REFERENCE allele(s) => healthy root alleles */
		referenceAllele = allSites[j].referenceAllele;
		fprintf (fp,"\t%c", WhichNuc(referenceAllele));
		
		for (i=0; i<numCells+1; i++)
			{
			/* PILEUP: NUMBER OF READS */
			fprintf (fp, "\t%d\t", cell[i].site[j].numReads);
			
			/* PILEUP: READ BASES */
			if (allSites[j].countA > 0)
				{
				if (referenceAllele != A)
					for (k=0; k<cell[i].site[j].readCount[A]; k++)
						fprintf (fp, "A");
				else
					for (k=0; k<cell[i].site[j].readCount[A]; k++)
						fprintf (fp, ".");
				}
			
			if (allSites[j].countC > 0)
				{
				if (referenceAllele != C)
					for (k=0; k<cell[i].site[j].readCount[C]; k++)
						fprintf (fp, "C");
				else
					for (k=0; k<cell[i].site[j].readCount[C]; k++)
						fprintf (fp, ".");
				}

			if (allSites[j].countG > 0)
				{
				if (referenceAllele != G)
					for (k=0; k<cell[i].site[j].readCount[G]; k++)
						fprintf (fp, "G");
				else
					for (k=0; k<cell[i].site[j].readCount[G]; k++)
						fprintf (fp, ".");
				}

			if (allSites[j].countT > 0)
				{
				if (referenceAllele != T)
					for (k=0; k<cell[i].site[j].readCount[T]; k++)
						fprintf (fp, "T");
				else
					for (k=0; k<cell[i].site[j].readCount[T]; k++)
						fprintf (fp, ".");
				}

			fprintf (fp, "\t");
			
			/* PILEUP: READ QUALITIES */  /* put always highest quality */
			for (k=0; k<cell[i].site[j].numReads; k++)
				fprintf (fp, "~");
				}
	
		fprintf (fp,"\n");

		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0x38664(%rip), %eax     # 0x4f810
jge 0x17638
movq 0x385f7(%rip), %rax     # 0x4f7b0
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x2b007(%rip), %rsi     # 0x421d5
movl $0x1, %edx
movb $0x0, %al
callq 0x21b0
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %edx
addl $0x1, %edx
leaq 0x2afe9(%rip), %rsi     # 0x421d4
movb $0x0, %al
callq 0x21b0
movq 0x385af(%rip), %rax     # 0x4f7a8
movslq -0x10(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
movl 0x6c(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %edi
callq 0x18d80
movq -0x28(%rbp), %rdi
movsbl %al, %edx
leaq 0x2afad(%rip), %rsi     # 0x421d8
movb $0x0, %al
callq 0x21b0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl 0x36f92(%rip), %ecx     # 0x4e1d4
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x17618
movq -0x8(%rbp), %rdi
movq 0x385c0(%rip), %rax     # 0x4f818
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movl (%rax), %edx
leaq 0x2af62(%rip), %rsi     # 0x421dc
movb $0x0, %al
callq 0x21b0
movq 0x38520(%rip), %rax     # 0x4f7a8
movslq -0x10(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x38(%rax)
jle 0x1734a
cmpl $0x0, -0x1c(%rbp)
je 0x172f7
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x38561(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x172f5
movq -0x8(%rbp), %rdi
leaq 0x2b85d(%rip), %rsi     # 0x42b40
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x172ad
jmp 0x17348
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x38510(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl (%rcx), %eax
jge 0x17346
movq -0x8(%rbp), %rdi
leaq 0x2b611(%rip), %rsi     # 0x42945
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x172fe
jmp 0x17348
jmp 0x1734a
movq 0x38457(%rip), %rax     # 0x4f7a8
movslq -0x10(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x3c(%rax)
jle 0x17415
cmpl $0x1, -0x1c(%rbp)
je 0x173c1
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x38498(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl 0x4(%rcx), %eax
jge 0x173bf
movq -0x8(%rbp), %rdi
leaq 0x2b5c6(%rip), %rsi     # 0x42973
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x17376
jmp 0x17413
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x38446(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl 0x4(%rcx), %eax
jge 0x17411
movq -0x8(%rbp), %rdi
leaq 0x2b546(%rip), %rsi     # 0x42945
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x173c8
jmp 0x17413
jmp 0x17415
movq 0x3838c(%rip), %rax     # 0x4f7a8
movslq -0x10(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x40(%rax)
jle 0x174e0
cmpl $0x2, -0x1c(%rbp)
je 0x1748c
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x383cd(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1748a
movq -0x8(%rbp), %rdi
leaq 0x2b528(%rip), %rsi     # 0x429a0
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x17441
jmp 0x174de
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x3837b(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl 0x8(%rcx), %eax
jge 0x174dc
movq -0x8(%rbp), %rdi
leaq 0x2b47b(%rip), %rsi     # 0x42945
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x17493
jmp 0x174de
jmp 0x174e0
movq 0x382c1(%rip), %rax     # 0x4f7a8
movslq -0x10(%rbp), %rcx
imulq $0x88, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x44(%rax)
jle 0x175ab
cmpl $0x3, -0x1c(%rbp)
je 0x17557
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x38302(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl 0xc(%rcx), %eax
jge 0x17555
movq -0x8(%rbp), %rdi
leaq 0x2a7c6(%rip), %rsi     # 0x41d09
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1750c
jmp 0x175a9
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x382b0(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
cmpl 0xc(%rcx), %eax
jge 0x175a7
movq -0x8(%rbp), %rdi
leaq 0x2b3b0(%rip), %rsi     # 0x42945
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1755e
jmp 0x175a9
jmp 0x175ab
movq -0x8(%rbp), %rdi
leaq 0x2ac29(%rip), %rsi     # 0x421df
movb $0x0, %al
callq 0x21b0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq 0x3824a(%rip), %rcx     # 0x4f818
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x7, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jge 0x17608
movq -0x8(%rbp), %rdi
leaq 0x2abeb(%rip), %rsi     # 0x421e1
movb $0x0, %al
callq 0x21b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x175c4
jmp 0x1760a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x17239
movq -0x8(%rbp), %rdi
leaq 0x2fa12(%rip), %rsi     # 0x47035
movb $0x0, %al
callq 0x21b0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x171a3
addq $0x30, %rsp
popq %rbp
retq
nop