// File: /workspace/github_c_makefile_star2_O3/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 $0x378, %rsp            # imm = 0x378
movl %esi, %ebp
movq %rdi, %rbx
movl 0x239cfd(%rip), %eax    # 0x244614
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
subl 0x239ce8(%rip), %ecx    # 0x244610
addl $0x2, %ecx
movslq %ecx, %r15
leaq 0x1c0(%rsp), %r14
movq %r14, %rdi
callq 0xb37f
movb (%r14), %al
cmpb $0xa, %al
jb 0xa970
movzbl %al, %ecx
imull $0xcd, %ecx, %edx
shrl $0xb, %edx
leal 0x30(%rdx), %ecx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subb %dl, %al
orb $0x30, %al
movb $0x20, 0x2(%rsp)
movl $0x3, %r12d
movl $0x3, %r14d
jmp 0xa982
orb $0x30, %al
movl $0x2, %r12d
movl $0x2, %r14d
movl %eax, %ecx
movb $0x20, %al
addq %r15, %r14
movb %cl, (%rsp)
movb %al, 0x1(%rsp)
movl %r12d, %r13d
movq %r14, %rax
movl %r12d, %ecx
subq %r13, %rax
jbe 0xa9ca
leaq (%rsp,%r13), %rcx
xorl %edx, %edx
movl $0x2c, %esi
movb 0x1c1(%rsp,%rdx), %dil
leal 0x60(%rdi), %r8d
testb %dil, %dil
movzbl %r8b, %edi
cmovel %esi, %edi
movb %dil, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0xa9a5
movl %r14d, %ecx
movslq %ecx, %rax
movq %rsp, %r15
movb $0xa, -0x1(%rax,%r15)
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10e0
cmpq %r14, %rax
jne 0xaa6a
testl %ebp, %ebp
je 0xaa58
leaq 0x1c0(%rsp), %rdi
callq 0xb52d
movq %r14, %rax
subq %r13, %rax
jbe 0xaa37
leaq (%rsp,%r13), %rcx
xorl %edx, %edx
movl $0x2c, %esi
movb 0x1c1(%rsp,%rdx), %dil
leal 0x60(%rdi), %r8d
testb %dil, %dil
movzbl %r8b, %edi
cmovel %esi, %edi
movb %dil, (%rcx,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0xaa12
movl %r14d, %r12d
movslq %r12d, %rax
movb $0xa, -0x1(%rax,%r15)
movl $0x1, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10e0
cmpq %r14, %rax
jne 0xaa6f
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24cc
callq 0x2500