// File: /workspace/github_c_makefile_star2_O0/dapogon[P]cellcoal/src/cellcoal.c
// Function: PrepareGlobalFiles
void PrepareGlobalFiles(int argc, char **argv)
    {
    char File[MAX_NAME];
		
    /* contains the simulated tree in Newick format */
    if (doPrintTree == YES)
        {
		sprintf(File,"%s/%s", resultsDir, treeFile);
        if ((fpTrees = fopen(File, "w")) == NULL)
            {
            fprintf (stderr, "Can't open \"%s\"\n", File);
            exit(-1);
            }
        }
		
    /* contains a list of times and branch lenghts for all nodes in the simulated trees */
    if (doPrintTimes == YES)
        {
		sprintf(File,"%s/%s", resultsDir, timesFile);
        if ((fpTimes = fopen(File, "w")) == NULL)
            {
            fprintf (stderr, "Can't open \"%s\"\n", File);
            exit(-1);
            }
        }
		
    if (doSimulateData == YES)
        {
        /* contains SNV genotypes for every cell */
        if (doPrintSNVgenotypes == YES)
            {
			sprintf(File,"%s/%s", resultsDir, SNVgenotypesFile);
             if ((fpSNVgenotypes = fopen(File, "w")) == NULL)
                {
				fprintf (stderr, "Can't open \"%s\"\n", File);
				exit(-1);
                }
            }
			
        /* contains haplotypes for variable sites for every cell */
        if (doPrintSNVhaplotypes == YES)
            {
			sprintf(File,"%s/%s", resultsDir, SNVhaplotypesFile);
            if ((fpSNVhaplotypes = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

        /* contains error-free haplotypes for variable sites for every cell */
        if (doPrintTrueHaplotypes == YES)
            {
			sprintf(File,"%s/%s", resultsDir, trueHaplotypesFile);
            if ((fpTrueHaplotypes = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

        /* contains all genotypes (variable or invariable) for every cell */
        if (doPrintFullGenotypes == YES)
            {
			sprintf(File,"%s/%s", resultsDir, fullGenotypesFile);
            if ((fpFullGenotypes = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

        /* contains haplotypes for all sites for every cell */
        if (doPrintFullHaplotypes == YES)
            {
			sprintf(File,"%s/%s", resultsDir, fullHaplotypesFile);
            if ((fpFullHaplotypes = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

        /* contains reads counts and genotype likelihoods for every SNV and cell */
        if (doNGS == YES)
            {
			sprintf(File,"%s/%s", resultsDir, VCFfile);
            if ((fpVCF = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }
  
         /* contains reads counts for every SNV and cell */
        if (doPrintCATG == YES)
            {
			sprintf(File,"%s/%s", resultsDir, CATGfile);
            if ((fpCATG = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

		if (doPrintPILEUP == YES)
			{
			sprintf(File,"%s/%s", resultsDir, PILEUPfile);
			if ((fpPILEUP = fopen(File, "w")) == NULL)
				{
				fprintf (stderr, "Can't open \"%s\"\n", File);
				exit(-1);
				}
			}

       }

   if (doPrintSNVgenotypes == YES)
        {
       /*fprintf (fpSNVgenotypes, "%s - ",PROGRAM_NAME);
        PrintDate (fpSNVgenotypes);
        fprintf (fpSNVgenotypes, "SNV genotypes\n");
        PrintCommandLine (fpSNVgenotypes, argc, argv);*/
        fprintf (fpSNVgenotypes,"%d\n", numDataSets);
        }

    if (doPrintSNVhaplotypes == YES)
        {
        /*fprintf (fpSNVhaplotypes, "%s - ",PROGRAM_NAME);
        PrintDate (fpSNVhaplotypes);
        fprintf (fpSNVhaplotypes, "SNV haplotypes\n");
        PrintCommandLine (fpSNVhaplotypes, argc, argv);*/
        fprintf (fpSNVhaplotypes,"%d\n", numDataSets);
        }

   if (doPrintFullGenotypes == YES)
        {
        /*fprintf (fpFullGenotypes, "%s - ",PROGRAM_NAME);
        PrintDate (fpFullGenotypes);
        fprintf (fpFullGenotypes, "Full genotypes\n");
        PrintCommandLine (fpFullGenotypes, argc, argv);*/
        fprintf (fpFullGenotypes,"%d\n", numDataSets);
        }

    if (doPrintFullHaplotypes == YES)
        {
        /*fprintf (fpFullHaplotypes, "%s - ",PROGRAM_NAME);
        PrintDate (fpFullHaplotypes);
        fprintf (fpFullHaplotypes, "Full haplotypes\n");
        PrintCommandLine (fpFullHaplotypes, argc, argv);*/
        fprintf (fpFullHaplotypes,"%d\n", numDataSets);
        }

	if (doPrintTrueHaplotypes == YES)
		{
		/*fprintf (fpTrueHaplotypes, "%s - ",PROGRAM_NAME);
		 PrintDate (fpTrueHaplotypes);
		 fprintf (fpTrueHaplotypes, "True haplotypes\n");
		 PrintCommandLine (fpTrueHaplotypes, argc, argv);*/
		fprintf (fpTrueHaplotypes,"%d\n", numDataSets);
		}
	
	if (doNGS == YES)
        {
        /*fprintf (fpVCF, "%s - ",PROGRAM_NAME);
        PrintDate (fpVCF);
        fprintf (fpVCF, "Read counts and genotype likelihoods\n");
        PrintCommandLine (fpVCF, argc, argv);*/
        fprintf (fpVCF,"%d\n", numDataSets);
        }

	if (doPrintCATG == YES)
        {
        /*fprintf (fpCATG, "%s - ",PROGRAM_NAME);
        PrintDate (fpCATG);
        fprintf (fpCATG, "Read counts\n");
        PrintCommandLine (fpCATG, argc, argv);*/
        fprintf (fpCATG,"%d\n", numDataSets);
        }

	if (doPrintPILEUP == YES)
		{
		/*fprintf (fpPILEUP, "%s - ",PROGRAM_NAME);
		PrintDate (fpPILEUP);
		fprintf (fpPILEUP, "Read counts\n");
		PrintCommandLine (fpPILEUP, argc, argv);*/
		fprintf (fpPILEUP,"%d\n", numDataSets);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, 0x43577(%rip)     # 0x4e3e0
jne 0xaed9
leaq -0x90(%rbp), %rdi
leaq 0x34717(%rip), %rsi     # 0x3f590
leaq 0x43ab0(%rip), %rdx     # 0x4e930
leaq 0x443a9(%rip), %rcx     # 0x4f230
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x346fa(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x448e8(%rip)     # 0x4f790
cmpq $0x0, %rax
jne 0xaed7
movq 0x43143(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x346d2(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xaed9
cmpl $0x1, 0x43504(%rip)     # 0x4e3e4
jne 0xaf50
leaq -0x90(%rbp), %rdi
leaq 0x346a0(%rip), %rsi     # 0x3f590
leaq 0x43a39(%rip), %rdx     # 0x4e930
leaq 0x443b2(%rip), %rcx     # 0x4f2b0
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x34683(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x44879(%rip)     # 0x4f798
cmpq $0x0, %rax
jne 0xaf4e
movq 0x430cc(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x3465b(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xaf50
cmpl $0x1, 0x434a9(%rip)     # 0x4e400
jne 0xb317
cmpl $0x1, 0x43468(%rip)     # 0x4e3cc
jne 0xafd4
leaq -0x90(%rbp), %rdi
leaq 0x3461c(%rip), %rsi     # 0x3f590
leaq 0x439b5(%rip), %rdx     # 0x4e930
leaq 0x43fae(%rip), %rcx     # 0x4ef30
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x345ff(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x44885(%rip)     # 0x4f828
cmpq $0x0, %rax
jne 0xafd2
movq 0x43048(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x345d7(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xafd4
cmpl $0x1, 0x433f5(%rip)     # 0x4e3d0
jne 0xb04b
leaq -0x90(%rbp), %rdi
leaq 0x345a5(%rip), %rsi     # 0x3f590
leaq 0x4393e(%rip), %rdx     # 0x4e930
leaq 0x43fb7(%rip), %rcx     # 0x4efb0
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x34588(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x44816(%rip)     # 0x4f830
cmpq $0x0, %rax
jne 0xb049
movq 0x42fd1(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x34560(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xb04b
cmpl $0x1, 0x43382(%rip)     # 0x4e3d4
jne 0xb0c2
leaq -0x90(%rbp), %rdi
leaq 0x3452e(%rip), %rsi     # 0x3f590
leaq 0x438c7(%rip), %rdx     # 0x4e930
leaq 0x43fc0(%rip), %rcx     # 0x4f030
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x34511(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x4478f(%rip)     # 0x4f820
cmpq $0x0, %rax
jne 0xb0c0
movq 0x42f5a(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x344e9(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xb0c2
cmpl $0x1, 0x43313(%rip)     # 0x4e3dc
jne 0xb139
leaq -0x90(%rbp), %rdi
leaq 0x344b7(%rip), %rsi     # 0x3f590
leaq 0x43850(%rip), %rdx     # 0x4e930
leaq 0x440c9(%rip), %rcx     # 0x4f1b0
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x3449a(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x44730(%rip)     # 0x4f838
cmpq $0x0, %rax
jne 0xb137
movq 0x42ee3(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x34472(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xb139
cmpl $0x1, 0x43298(%rip)     # 0x4e3d8
jne 0xb1b0
leaq -0x90(%rbp), %rdi
leaq 0x34440(%rip), %rsi     # 0x3f590
leaq 0x437d9(%rip), %rdx     # 0x4e930
leaq 0x43f52(%rip), %rcx     # 0x4f0b0
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x34423(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x446c1(%rip)     # 0x4f840
cmpq $0x0, %rax
jne 0xb1ae
movq 0x42e6c(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x343fb(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xb1b0
cmpl $0x1, 0x43235(%rip)     # 0x4e3ec
jne 0xb227
leaq -0x90(%rbp), %rdi
leaq 0x343c9(%rip), %rsi     # 0x3f590
leaq 0x43762(%rip), %rdx     # 0x4e930
leaq 0x4435b(%rip), %rcx     # 0x4f530
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x343ac(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x44652(%rip)     # 0x4f848
cmpq $0x0, %rax
jne 0xb225
movq 0x42df5(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x34384(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xb227
cmpl $0x1, 0x431ca(%rip)     # 0x4e3f8
jne 0xb29e
leaq -0x90(%rbp), %rdi
leaq 0x34352(%rip), %rsi     # 0x3f590
leaq 0x436eb(%rip), %rdx     # 0x4e930
leaq 0x441e4(%rip), %rcx     # 0x4f430
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x34335(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x445e3(%rip)     # 0x4f850
cmpq $0x0, %rax
jne 0xb29c
movq 0x42d7e(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x3430d(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xb29e
cmpl $0x1, 0x43157(%rip)     # 0x4e3fc
jne 0xb315
leaq -0x90(%rbp), %rdi
leaq 0x342db(%rip), %rsi     # 0x3f590
leaq 0x43674(%rip), %rdx     # 0x4e930
leaq 0x441ed(%rip), %rcx     # 0x4f4b0
movb $0x0, %al
callq 0x2280
leaq -0x90(%rbp), %rdi
leaq 0x342be(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x44574(%rip)     # 0x4f858
cmpq $0x0, %rax
jne 0xb313
movq 0x42d07(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq -0x90(%rbp), %rdx
leaq 0x34296(%rip), %rsi     # 0x3f598
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xb315
jmp 0xb317
cmpl $0x1, 0x430ae(%rip)     # 0x4e3cc
jne 0xb33b
movq 0x44501(%rip), %rdi     # 0x4f828
movl 0x42ea3(%rip), %edx     # 0x4e1d0
leaq 0x36e87(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
cmpl $0x1, 0x4308e(%rip)     # 0x4e3d0
jne 0xb35f
movq 0x444e5(%rip), %rdi     # 0x4f830
movl 0x42e7f(%rip), %edx     # 0x4e1d0
leaq 0x36e63(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
cmpl $0x1, 0x43076(%rip)     # 0x4e3dc
jne 0xb383
movq 0x444c9(%rip), %rdi     # 0x4f838
movl 0x42e5b(%rip), %edx     # 0x4e1d0
leaq 0x36e3f(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
cmpl $0x1, 0x4304e(%rip)     # 0x4e3d8
jne 0xb3a7
movq 0x444ad(%rip), %rdi     # 0x4f840
movl 0x42e37(%rip), %edx     # 0x4e1d0
leaq 0x36e1b(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
cmpl $0x1, 0x43026(%rip)     # 0x4e3d4
jne 0xb3cb
movq 0x44469(%rip), %rdi     # 0x4f820
movl 0x42e13(%rip), %edx     # 0x4e1d0
leaq 0x36df7(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
cmpl $0x1, 0x4301a(%rip)     # 0x4e3ec
jne 0xb3ef
movq 0x4446d(%rip), %rdi     # 0x4f848
movl 0x42def(%rip), %edx     # 0x4e1d0
leaq 0x36dd3(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
cmpl $0x1, 0x43002(%rip)     # 0x4e3f8
jne 0xb413
movq 0x44451(%rip), %rdi     # 0x4f850
movl 0x42dcb(%rip), %edx     # 0x4e1d0
leaq 0x36daf(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
cmpl $0x1, 0x42fe2(%rip)     # 0x4e3fc
jne 0xb437
movq 0x44435(%rip), %rdi     # 0x4f858
movl 0x42da7(%rip), %edx     # 0x4e1d0
leaq 0x36d8b(%rip), %rsi     # 0x421bb
movb $0x0, %al
callq 0x21b0
addq $0x90, %rsp
popq %rbp
retq