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

/* Write 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=nv+ne;
    compute_code(precode);

    if (nv >= 10) 
    {
        code[0] = '0' + nv/10;
        code[1] = '0' + nv%10;
        code[2] = ' ';
        length += 3;
	start=3;
    }
    else
    {
        code[0] = '0' + nv;
        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_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 0x239e6d(%rip), %r15d   # 0x244610
movl 0x239e6b(%rip), %eax    # 0x244614
addl %r15d, %eax
movslq %eax, %r13
leaq 0x1c0(%rsp), %rdi
callq 0xb0f1
cmpl $0xa, %r15d
jl 0xa7f6
movl %r15d, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x23, %rcx
leal (%rcx,%rcx), %eax
leal (%rax,%rax,4), %eax
subl %eax, %r15d
movl %r15d, %eax
orb $0x30, %al
movb $0x20, 0x2(%rsp)
movl $0x3, %r12d
movl $0x3, %r14d
movl %ecx, %r15d
jmp 0xa804
movl $0x2, %r12d
movb $0x20, %al
movl $0x2, %r14d
addq %r13, %r14
addb $0x30, %r15b
movb %r15b, (%rsp)
movb %al, 0x1(%rsp)
movl %r12d, %r13d
movq %r14, %rax
movl %r12d, %ecx
subq %r13, %rax
jbe 0xa851
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 0xa82c
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 0xa8f1
testl %ebp, %ebp
je 0xa8df
leaq 0x1c0(%rsp), %rdi
callq 0xb236
movq %r14, %rax
subq %r13, %rax
jbe 0xa8be
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 0xa899
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 0xa8f6
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2464
callq 0x2498