// File: /workspace/github_c_makefile_star2_O0/icebert[P]pblat/lib/dnautil.c
// Function: reverseComplementSlashSeparated
char *reverseComplementSlashSeparated(char *alleleStr)
/* Given a slash-separated series of sequences (a common representation of variant alleles),
 * returns a slash-sep series with the reverse complement of each sequence (if it is a
 * nucleotide sequence).
 * Special behavior to support dbSNP's variant allele conventions:
 * 1. Reverse the order of sequences (to maintain alphabetical ordering).
 * 2. If alleleStr begins with "-/", then after reversing, move "-/" back to the beginning. */
{
int len = strlen(alleleStr);
char choppyCopy[len+1];
safecpy(choppyCopy, sizeof(choppyCopy), alleleStr);
char *alleles[len];
int alCount = chopByChar(choppyCopy, '/', alleles, ArraySize(alleles));
char *outStr = needMem(len+1);
int i;
for (i = alCount-1;  i >= 0;  i--)
    {
    char *allele = alleles[i];
    int alLen = strlen(allele);
    if (isAllNt(allele, alLen))
        reverseComplement(allele, alLen);
    if (i != alCount-1)
        safecat(outStr, len+1, "/");
    safecat(outStr, len+1, allele);
    }
if (startsWith("-/", alleleStr))
    {
    // Keep "-/" at the beginning:
    memmove(outStr+2, outStr, len-2);
    outStr[0] = '-';
    outStr[1] = '/';
    }
return outStr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x62c0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
incl %eax
movl %eax, %esi
movq %rsp, %rax
movq %rax, -0x18(%rbp)
movq %rsi, %rax
addq $0xf, %rax
andq $-0x10, %rax
movq %rsp, %rdi
subq %rax, %rdi
movq %rdi, -0x60(%rbp)
movq %rdi, %rsp
movq %rsi, -0x20(%rbp)
movq -0x8(%rbp), %rdx
callq 0x2caf0
movq -0x60(%rbp), %rdi
movl -0xc(%rbp), %eax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rdx
subq %rcx, %rdx
movq %rdx, -0x58(%rbp)
movq %rdx, %rsp
movq %rax, -0x28(%rbp)
shlq $0x3, %rax
shrq $0x3, %rax
movl %eax, %ecx
movl $0x2f, %esi
callq 0x2eb50
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x40c50
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jl 0x334ff
movq -0x58(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x62c0
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x33550
cmpl $0x0, %eax
je 0x334b5
movq -0x48(%rbp), %rdi
movslq -0x4c(%rbp), %rsi
callq 0x33300
movl -0x3c(%rbp), %eax
movl -0x2c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x334db
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0xabba9(%rip), %rdx     # 0xdf07f
callq 0x311e0
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x48(%rbp), %rdx
callq 0x311e0
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x33471
movq -0x8(%rbp), %rsi
leaq 0xa7061(%rip), %rdi     # 0xda56b
callq 0x2d3d0
cmpl $0x0, %eax
je 0x3353d
movq -0x38(%rbp), %rdi
addq $0x2, %rdi
movq -0x38(%rbp), %rsi
movl -0xc(%rbp), %eax
subl $0x2, %eax
movslq %eax, %rdx
callq 0x6c60
movq -0x38(%rbp), %rax
movb $0x2d, (%rax)
movq -0x38(%rbp), %rax
movb $0x2f, 0x1(%rax)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)