// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/maf.c
// Function: mafWriteDelimiter
void mafWriteDelimiter(FILE *f, struct mafAli *ali, char delimiter)
/* Write next alignment to file. */
{
struct mafComp *comp;
int srcChars = 0, startChars = 0, sizeChars = 0, srcSizeChars = 0;

/* Write out alignment header */
fprintf(f, "a score=%f%c", ali->score, delimiter);

/* include region definition */
if (ali->regDef != NULL)
    fprintf(f, "r %s %d %s%c", ali->regDef->type, ali->regDef->size, ali->regDef->id, delimiter);

/* Figure out length of each field. */
for (comp = ali->components; comp != NULL; comp = comp->next)
    {
    int len = 0;
    /* a name like '.' will break some tools, so replace it
    * with a generic name */
    if (sameString(comp->src,"."))
	comp->src=cloneString("defaultName");
    len = strlen(comp->src);
    if (srcChars < len)
        srcChars = len;
    len = digitsBaseTen(comp->start);
    if (startChars < len)
        startChars = len;
    len = digitsBaseTen(comp->size);
    if (sizeChars < len)
        sizeChars = len;
    len = digitsBaseTen(comp->srcSize);
    if (srcSizeChars < len)
        srcSizeChars = len;
    }

/* Write out each component. */
for (comp = ali->components; comp != NULL; comp = comp->next)
    {
    if ((comp->size == 0) && (comp->leftStatus))
	fprintf(f, "e %-*s %*d %*d %c %*d %c%c", 
	    srcChars, comp->src, startChars, comp->start, 
	    sizeChars, comp->leftLen, comp->strand, 
	    srcSizeChars, comp->srcSize, comp->leftStatus, delimiter);
    else
	{
	fprintf(f, "s %-*s %*d %*d %c %*d %s%c", 
	    srcChars, comp->src, startChars, comp->start, 
	    sizeChars, comp->size, comp->strand, 
	    srcSizeChars, comp->srcSize, comp->text, delimiter);

	if (comp->quality)
		fprintf(f, "q %-*s %s%c",
		srcChars + startChars + sizeChars + srcSizeChars + 5,
		comp->src, comp->quality, delimiter);

	if (comp->leftStatus)
	    fprintf(f,"i %-*s %c %d %c %d%c",srcChars,comp->src,
		comp->leftStatus,comp->leftLen,comp->rightStatus,comp->rightLen, delimiter);
	}

    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movb %dl, %al
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movb %al, -0x31(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsbl -0x31(%rbp), %edx
leaq 0x9c92a(%rip), %rsi     # 0xdb6da
movb $0x1, %al
callq 0x6a80
movq -0x30(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x3edfb
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rdx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %ecx
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %r8
movsbl -0x31(%rbp), %r9d
leaq 0x9c8f3(%rip), %rsi     # 0xdb6e7
movb $0x0, %al
callq 0x6a80
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3eed0
movl $0x0, -0x54(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x9b8d8(%rip), %rsi     # 0xda700
callq 0x6a40
cmpl $0x0, %eax
jne 0x3ee49
leaq 0x9c8bb(%rip), %rdi     # 0xdb6f4
callq 0x2a450
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x62c0
movl %eax, -0x54(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x3ee67
movl -0x54(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x40(%rbp), %rax
movl 0x18(%rax), %edi
callq 0x47630
movl %eax, -0x54(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x3ee84
movl -0x54(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x47630
movl %eax, -0x54(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x3eea1
movl -0x54(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x40(%rbp), %rax
movl 0x10(%rax), %edi
callq 0x47630
movl %eax, -0x54(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x3eebe
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0x3eec0
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x3ee07
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3f0a1
movq -0x40(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x3ef7d
movq -0x40(%rbp), %rax
movsbl 0x30(%rax), %eax
cmpl $0x0, %eax
je 0x3ef7d
movq -0x28(%rbp), %rdi
movl -0x44(%rbp), %edx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movl -0x48(%rbp), %r8d
movq -0x40(%rbp), %rax
movl 0x18(%rax), %r9d
movl -0x4c(%rbp), %r12d
movq -0x40(%rbp), %rax
movl 0x34(%rax), %r15d
movq -0x40(%rbp), %rax
movsbl 0x14(%rax), %r14d
movl -0x50(%rbp), %ebx
movq -0x40(%rbp), %rax
movl 0x10(%rax), %r11d
movq -0x40(%rbp), %rax
movsbl 0x30(%rax), %r10d
movsbl -0x31(%rbp), %eax
leaq 0x9c7af(%rip), %rsi     # 0xdb700
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x6a80
jmp 0x3f08f
movq -0x28(%rbp), %rdi
movl -0x44(%rbp), %edx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movl -0x48(%rbp), %r8d
movq -0x40(%rbp), %rax
movl 0x18(%rax), %r9d
movl -0x4c(%rbp), %r12d
movq -0x40(%rbp), %rax
movl 0x1c(%rax), %r15d
movq -0x40(%rbp), %rax
movsbl 0x14(%rax), %r14d
movl -0x50(%rbp), %ebx
movq -0x40(%rbp), %rax
movl 0x10(%rax), %r11d
movq -0x40(%rbp), %rax
movq 0x20(%rax), %r10
movsbl -0x31(%rbp), %eax
leaq 0x9c750(%rip), %rsi     # 0xdb71b
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movl %eax, 0x30(%rsp)
movb $0x0, %al
callq 0x6a80
movq -0x40(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x3f033
movq -0x28(%rbp), %rdi
movl -0x44(%rbp), %edx
addl -0x48(%rbp), %edx
addl -0x4c(%rbp), %edx
addl -0x50(%rbp), %edx
addl $0x5, %edx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movq 0x28(%rax), %r8
movsbl -0x31(%rbp), %r9d
leaq 0x9c70a(%rip), %rsi     # 0xdb736
movb $0x0, %al
callq 0x6a80
movq -0x40(%rbp), %rax
cmpb $0x0, 0x30(%rax)
je 0x3f08d
movq -0x28(%rbp), %rdi
movl -0x44(%rbp), %edx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x40(%rbp), %rax
movsbl 0x30(%rax), %r8d
movq -0x40(%rbp), %rax
movl 0x34(%rax), %r9d
movq -0x40(%rbp), %rax
movsbl 0x38(%rax), %r11d
movq -0x40(%rbp), %rax
movl 0x3c(%rax), %r10d
movsbl -0x31(%rbp), %eax
leaq 0x9c6c9(%rip), %rsi     # 0xdb742
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x6a80
jmp 0x3f08f
jmp 0x3f091
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x3eedc
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop