// File: /workspace/github_c_makefile_star2_O0/dapogon[P]cellcoal/src/cellcoal.c
// Function: PrepareSeparateFiles
void PrepareSeparateFiles(int replicate)
    {
	/* contains the simulated tree in Newick format */
    if (doPrintTree == YES)
        {
		sprintf(File,"%s/%s", resultsDir, treeDir);
		mkdir(File,S_IRWXU);
		sprintf(File,"%s/%s/%s.%04d", resultsDir, treeDir, treeFile, replicate+1);
		if ((fpTrees = fopen(File, "w")) == NULL)
            {
            fprintf (stderr, "Can't open \"%s\"\n", File);
            exit(-1);
            }
        }
		
	if (doPrintTimes == YES)
        {
		sprintf(File,"%s/%s", resultsDir, timesDir);
		mkdir(File,S_IRWXU);
		sprintf(File,"%s/%s/%s.%04d", resultsDir, timesDir, timesFile, replicate+1);
		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, SNVgenotypesDir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, SNVgenotypesDir, SNVgenotypesFile, replicate+1);
            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, SNVhaplotypesDir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, SNVhaplotypesDir, SNVhaplotypesFile, replicate+1);
            if ((fpSNVhaplotypes = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

        /* contains reference haplotypes (before errors)  for every cell */
        if (doPrintTrueHaplotypes == YES)
            {
			sprintf(File,"%s/%s", resultsDir, trueHaplotypesDir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, trueHaplotypesDir, trueHaplotypesFile, replicate+1);
            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, fullGenotypesDir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, fullGenotypesDir, fullGenotypesFile, replicate+1);
            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, fullHaplotypesDir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, fullHaplotypesDir, fullHaplotypesFile, replicate+1);
            if ((fpFullHaplotypes = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

        /* contains reads counts and log10 normalized genotype likelihoods for every SNV and cell */
        if (doNGS == YES)
            {
			sprintf(File,"%s/%s", resultsDir, VCFdir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, VCFdir, VCFfile, replicate+1);
            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, CATGdir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, CATGdir, CATGfile, replicate+1);
            if ((fpCATG = fopen(File, "w")) == NULL)
                {
                fprintf (stderr, "Can't open \"%s\"\n", File);
                exit(-1);
                }
            }

		/* contains reads counts for every SNV and cell */
		if (doPrintPILEUP == YES)
			{
			sprintf(File,"%s/%s", resultsDir, PILEUPdir);
			mkdir(File,S_IRWXU);
			sprintf(File,"%s/%s/%s.%04d", resultsDir, PILEUPdir, PILEUPfile, replicate+1);
			if ((fpPILEUP = fopen(File, "w")) == NULL)
				{
				fprintf (stderr, "Can't open \"%s\"\n", File);
				exit(-1);
				}
			}
        }
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x1, 0x41fde(%rip)     # 0x4e3e0
jne 0xc4b9
leaq 0x432a1(%rip), %rdi     # 0x4f6b0
leaq 0x3317a(%rip), %rsi     # 0x3f590
leaq 0x42513(%rip), %rdx     # 0x4e930
leaq 0x4258c(%rip), %rcx     # 0x4e9b0
movb $0x0, %al
callq 0x2280
leaq 0x4327e(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x43265(%rip), %rdi     # 0x4f6b0
leaq 0x36573(%rip), %rsi     # 0x429c5
leaq 0x424d7(%rip), %rdx     # 0x4e930
leaq 0x42550(%rip), %rcx     # 0x4e9b0
leaq 0x42dc9(%rip), %r8      # 0x4f230
movb $0x0, %al
callq 0x2280
leaq 0x4323b(%rip), %rdi     # 0x4f6b0
leaq 0x3311a(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x43308(%rip)     # 0x4f790
cmpq $0x0, %rax
jne 0xc4b7
movq 0x41b63(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x330f9(%rip), %rsi     # 0x3f598
leaq 0x4320a(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc4b9
cmpl $0x1, 0x41f24(%rip)     # 0x4e3e4
jne 0xc577
leaq 0x431e3(%rip), %rdi     # 0x4f6b0
leaq 0x330bc(%rip), %rsi     # 0x3f590
leaq 0x42455(%rip), %rdx     # 0x4e930
leaq 0x4254e(%rip), %rcx     # 0x4ea30
movb $0x0, %al
callq 0x2280
leaq 0x431c0(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x431a7(%rip), %rdi     # 0x4f6b0
leaq 0x364b5(%rip), %rsi     # 0x429c5
leaq 0x42419(%rip), %rdx     # 0x4e930
leaq 0x42512(%rip), %rcx     # 0x4ea30
leaq 0x42d8b(%rip), %r8      # 0x4f2b0
movb $0x0, %al
callq 0x2280
leaq 0x4317d(%rip), %rdi     # 0x4f6b0
leaq 0x3305c(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x43252(%rip)     # 0x4f798
cmpq $0x0, %rax
jne 0xc575
movq 0x41aa5(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x3303b(%rip), %rsi     # 0x3f598
leaq 0x4314c(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc577
cmpl $0x1, 0x41e82(%rip)     # 0x4e400
jne 0xcb76
cmpl $0x1, 0x41e41(%rip)     # 0x4e3cc
jne 0xc642
leaq 0x43118(%rip), %rdi     # 0x4f6b0
leaq 0x32ff1(%rip), %rsi     # 0x3f590
leaq 0x4238a(%rip), %rdx     # 0x4e930
leaq 0x42503(%rip), %rcx     # 0x4eab0
movb $0x0, %al
callq 0x2280
leaq 0x430f5(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x430dc(%rip), %rdi     # 0x4f6b0
leaq 0x363ea(%rip), %rsi     # 0x429c5
leaq 0x4234e(%rip), %rdx     # 0x4e930
leaq 0x424c7(%rip), %rcx     # 0x4eab0
leaq 0x42940(%rip), %r8      # 0x4ef30
movb $0x0, %al
callq 0x2280
leaq 0x430b2(%rip), %rdi     # 0x4f6b0
leaq 0x32f91(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x43217(%rip)     # 0x4f828
cmpq $0x0, %rax
jne 0xc640
movq 0x419da(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32f70(%rip), %rsi     # 0x3f598
leaq 0x43081(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc642
cmpl $0x1, 0x41d87(%rip)     # 0x4e3d0
jne 0xc700
leaq 0x4305a(%rip), %rdi     # 0x4f6b0
leaq 0x32f33(%rip), %rsi     # 0x3f590
leaq 0x422cc(%rip), %rdx     # 0x4e930
leaq 0x424c5(%rip), %rcx     # 0x4eb30
movb $0x0, %al
callq 0x2280
leaq 0x43037(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x4301e(%rip), %rdi     # 0x4f6b0
leaq 0x3632c(%rip), %rsi     # 0x429c5
leaq 0x42290(%rip), %rdx     # 0x4e930
leaq 0x42489(%rip), %rcx     # 0x4eb30
leaq 0x42902(%rip), %r8      # 0x4efb0
movb $0x0, %al
callq 0x2280
leaq 0x42ff4(%rip), %rdi     # 0x4f6b0
leaq 0x32ed3(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x43161(%rip)     # 0x4f830
cmpq $0x0, %rax
jne 0xc6fe
movq 0x4191c(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32eb2(%rip), %rsi     # 0x3f598
leaq 0x42fc3(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc700
cmpl $0x1, 0x41ccd(%rip)     # 0x4e3d4
jne 0xc7be
leaq 0x42f9c(%rip), %rdi     # 0x4f6b0
leaq 0x32e75(%rip), %rsi     # 0x3f590
leaq 0x4220e(%rip), %rdx     # 0x4e930
leaq 0x42487(%rip), %rcx     # 0x4ebb0
movb $0x0, %al
callq 0x2280
leaq 0x42f79(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x42f60(%rip), %rdi     # 0x4f6b0
leaq 0x3626e(%rip), %rsi     # 0x429c5
leaq 0x421d2(%rip), %rdx     # 0x4e930
leaq 0x4244b(%rip), %rcx     # 0x4ebb0
leaq 0x428c4(%rip), %r8      # 0x4f030
movb $0x0, %al
callq 0x2280
leaq 0x42f36(%rip), %rdi     # 0x4f6b0
leaq 0x32e15(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x43093(%rip)     # 0x4f820
cmpq $0x0, %rax
jne 0xc7bc
movq 0x4185e(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32df4(%rip), %rsi     # 0x3f598
leaq 0x42f05(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc7be
cmpl $0x1, 0x41c17(%rip)     # 0x4e3dc
jne 0xc87c
leaq 0x42ede(%rip), %rdi     # 0x4f6b0
leaq 0x32db7(%rip), %rsi     # 0x3f590
leaq 0x42150(%rip), %rdx     # 0x4e930
leaq 0x42549(%rip), %rcx     # 0x4ed30
movb $0x0, %al
callq 0x2280
leaq 0x42ebb(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x42ea2(%rip), %rdi     # 0x4f6b0
leaq 0x361b0(%rip), %rsi     # 0x429c5
leaq 0x42114(%rip), %rdx     # 0x4e930
leaq 0x4250d(%rip), %rcx     # 0x4ed30
leaq 0x42986(%rip), %r8      # 0x4f1b0
movb $0x0, %al
callq 0x2280
leaq 0x42e78(%rip), %rdi     # 0x4f6b0
leaq 0x32d57(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x42fed(%rip)     # 0x4f838
cmpq $0x0, %rax
jne 0xc87a
movq 0x417a0(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32d36(%rip), %rsi     # 0x3f598
leaq 0x42e47(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc87c
cmpl $0x1, 0x41b55(%rip)     # 0x4e3d8
jne 0xc93a
leaq 0x42e20(%rip), %rdi     # 0x4f6b0
leaq 0x32cf9(%rip), %rsi     # 0x3f590
leaq 0x42092(%rip), %rdx     # 0x4e930
leaq 0x4238b(%rip), %rcx     # 0x4ec30
movb $0x0, %al
callq 0x2280
leaq 0x42dfd(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x42de4(%rip), %rdi     # 0x4f6b0
leaq 0x360f2(%rip), %rsi     # 0x429c5
leaq 0x42056(%rip), %rdx     # 0x4e930
leaq 0x4234f(%rip), %rcx     # 0x4ec30
leaq 0x427c8(%rip), %r8      # 0x4f0b0
movb $0x0, %al
callq 0x2280
leaq 0x42dba(%rip), %rdi     # 0x4f6b0
leaq 0x32c99(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x42f37(%rip)     # 0x4f840
cmpq $0x0, %rax
jne 0xc938
movq 0x416e2(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32c78(%rip), %rsi     # 0x3f598
leaq 0x42d89(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc93a
cmpl $0x1, 0x41aab(%rip)     # 0x4e3ec
jne 0xc9f8
leaq 0x42d62(%rip), %rdi     # 0x4f6b0
leaq 0x32c3b(%rip), %rsi     # 0x3f590
leaq 0x41fd4(%rip), %rdx     # 0x4e930
leaq 0x4254d(%rip), %rcx     # 0x4eeb0
movb $0x0, %al
callq 0x2280
leaq 0x42d3f(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x42d26(%rip), %rdi     # 0x4f6b0
leaq 0x36034(%rip), %rsi     # 0x429c5
leaq 0x41f98(%rip), %rdx     # 0x4e930
leaq 0x42511(%rip), %rcx     # 0x4eeb0
leaq 0x42b8a(%rip), %r8      # 0x4f530
movb $0x0, %al
callq 0x2280
leaq 0x42cfc(%rip), %rdi     # 0x4f6b0
leaq 0x32bdb(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x42e81(%rip)     # 0x4f848
cmpq $0x0, %rax
jne 0xc9f6
movq 0x41624(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32bba(%rip), %rsi     # 0x3f598
leaq 0x42ccb(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xc9f8
cmpl $0x1, 0x419f9(%rip)     # 0x4e3f8
jne 0xcab6
leaq 0x42ca4(%rip), %rdi     # 0x4f6b0
leaq 0x32b7d(%rip), %rsi     # 0x3f590
leaq 0x41f16(%rip), %rdx     # 0x4e930
leaq 0x4238f(%rip), %rcx     # 0x4edb0
movb $0x0, %al
callq 0x2280
leaq 0x42c81(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x42c68(%rip), %rdi     # 0x4f6b0
leaq 0x35f76(%rip), %rsi     # 0x429c5
leaq 0x41eda(%rip), %rdx     # 0x4e930
leaq 0x42353(%rip), %rcx     # 0x4edb0
leaq 0x429cc(%rip), %r8      # 0x4f430
movb $0x0, %al
callq 0x2280
leaq 0x42c3e(%rip), %rdi     # 0x4f6b0
leaq 0x32b1d(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x42dcb(%rip)     # 0x4f850
cmpq $0x0, %rax
jne 0xcab4
movq 0x41566(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32afc(%rip), %rsi     # 0x3f598
leaq 0x42c0d(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xcab6
cmpl $0x1, 0x4193f(%rip)     # 0x4e3fc
jne 0xcb74
leaq 0x42be6(%rip), %rdi     # 0x4f6b0
leaq 0x32abf(%rip), %rsi     # 0x3f590
leaq 0x41e58(%rip), %rdx     # 0x4e930
leaq 0x42351(%rip), %rcx     # 0x4ee30
movb $0x0, %al
callq 0x2280
leaq 0x42bc3(%rip), %rdi     # 0x4f6b0
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x2090
movl -0x4(%rbp), %r9d
addl $0x1, %r9d
leaq 0x42baa(%rip), %rdi     # 0x4f6b0
leaq 0x35eb8(%rip), %rsi     # 0x429c5
leaq 0x41e1c(%rip), %rdx     # 0x4e930
leaq 0x42315(%rip), %rcx     # 0x4ee30
leaq 0x4298e(%rip), %r8      # 0x4f4b0
movb $0x0, %al
callq 0x2280
leaq 0x42b80(%rip), %rdi     # 0x4f6b0
leaq 0x32a5f(%rip), %rsi     # 0x3f596
callq 0x2230
movq %rax, 0x42d15(%rip)     # 0x4f858
cmpq $0x0, %rax
jne 0xcb72
movq 0x414a8(%rip), %rax     # 0x4dff8
movq (%rax), %rdi
leaq 0x32a3e(%rip), %rsi     # 0x3f598
leaq 0x42b4f(%rip), %rdx     # 0x4f6b0
movb $0x0, %al
callq 0x21b0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
jmp 0xcb74
jmp 0xcb76
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)