// File: /workspace/github_c_makefile_star2_O1/mishun[P]plantri/plantri.c
// Function: write_dual_alpha
static void
write_dual_alpha(FILE *f, int doflip)

/* Write the dual in alphabetic format.  Always write in next direction,
   and if doflip != 0 also write in prev direction. */
{
    int i,j,start;
    unsigned char code[MAXN+MAXE+4];
    unsigned char precode[MAXN+MAXE+1];
    size_t length;

    length=2+ne+(ne/2)-nv;
    compute_dual_code(precode);

    if (precode[0] >= 10) 
    {
        code[0] = '0' + precode[0]/10;
        code[1] = '0' + precode[0]%10;
        code[2] = ' ';
        length += 3;
	start=3;
    }
    else
    {
        code[0] = '0' + precode[0];
        code[1] = ' ';
        length += 2;
	start=2;
    }

    for (i = 1, j=start; j < length; ++i, ++j)
        if (precode[i]==0) code[j]=',';
        else code[j]=precode[i]-1+'a';

    code[j-1]='\n';
    if (fwrite(code,sizeof(unsigned char),length,f) != length)
    {
        fprintf(stderr,">E %s: fwrite() failed\n",cmdname);
        perror(">E ");
        exit(1);
    }
    if (doflip)
      { compute_dual_code_mirror(precode);
        for (i = 1, j=start; j < length; ++i, ++j)
	    if (precode[i]==0) code[j]=',';
            else code[j]=precode[i]-1+'a';
        code[j-1]='\n';
        if (fwrite(code,sizeof(unsigned char),length,f) != length)
	  {
	    fprintf(stderr,">E %s: fwrite() failed\n",cmdname);
	    perror(">E ");
	    exit(1);
	  }
      }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x388, %rsp            # imm = 0x388
movl %esi, %ebp
movq %rdi, 0x8(%rsp)
movl 0x239db5(%rip), %eax    # 0x244614
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
subl 0x239da0(%rip), %ecx    # 0x244610
addl $0x2, %ecx
movslq %ecx, %rbx
leaq 0x1d0(%rsp), %r14
movq %r14, %rdi
callq 0xb2bb
movb (%r14), %al
cmpb $0xa, %al
jb 0xa8c0
movzbl %al, %ecx
imull $0xcd, %ecx, %ecx
shrl $0xb, %ecx
leal 0x30(%rcx), %edx
movb %dl, 0x10(%rsp)
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subb %cl, %al
orb $0x30, %al
movb %al, 0x11(%rsp)
movb $0x20, 0x12(%rsp)
movl $0x3, %r13d
movl $0x3, %r14d
jmp 0xa8d7
orb $0x30, %al
movb %al, 0x10(%rsp)
movb $0x20, 0x11(%rsp)
movl $0x2, %r13d
movl $0x2, %r14d
addq %rbx, %r14
movl %r13d, %ebx
movq %r14, %r12
movl %r13d, %eax
subq %rbx, %r12
jbe 0xa91b
leaq (%rsp,%rbx), %rax
addq $0x10, %rax
xorl %ecx, %ecx
movl $0x2c, %edx
movb 0x1d1(%rsp,%rcx), %sil
leal 0x60(%rsi), %edi
testb %sil, %sil
movzbl %dil, %esi
cmovel %edx, %esi
movb %sil, (%rax,%rcx)
incq %rcx
cmpq %rcx, %r12
jne 0xa8f7
movl %r14d, %eax
cltq
leaq 0x10(%rsp), %r15
movb $0xa, -0x1(%rax,%r15)
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
callq 0x10f0
cmpq %r14, %rax
jne 0xa9c0
testl %ebp, %ebp
je 0xa9ae
leaq 0x1d0(%rsp), %rdi
callq 0xb469
cmpq %rbx, %r14
jbe 0xa98b
leaq (%rsp,%rbx), %rax
addq $0x10, %rax
xorl %ecx, %ecx
movl $0x2c, %edx
movb 0x1d1(%rsp,%rcx), %sil
leal 0x60(%rsi), %edi
testb %sil, %sil
movzbl %dil, %esi
cmovel %edx, %esi
movb %sil, (%rax,%rcx)
incq %rcx
cmpq %rcx, %r12
jne 0xa967
movl %r14d, %r13d
movslq %r13d, %rax
movb $0xa, -0x1(%rax,%r15)
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
callq 0x10f0
cmpq %r14, %rax
jne 0xa9c5
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2548
callq 0x257c