// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x3a0, %rsp            # imm = 0x3A0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl 0x250748(%rip), %eax    # 0x25a620
addl 0x250746(%rip), %eax    # 0x25a624
cltq
movq %rax, -0x398(%rbp)
leaq -0x390(%rbp), %rdi
callq 0xaa00
cmpl $0xa, 0x250726(%rip)    # 0x25a620
jl 0x9f4e
movl 0x25071e(%rip), %eax    # 0x25a620
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %eax
movb %al, -0x1d0(%rbp)
movl 0x250707(%rip), %eax    # 0x25a620
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %al
movb %al, -0x1cf(%rbp)
movb $0x20, -0x1ce(%rbp)
movq -0x398(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x398(%rbp)
movl $0x3, -0x18(%rbp)
jmp 0x9f7d
movl 0x2506cc(%rip), %eax    # 0x25a620
addl $0x30, %eax
movb %al, -0x1d0(%rbp)
movb $0x20, -0x1cf(%rbp)
movq -0x398(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x398(%rbp)
movl $0x2, -0x18(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rax
cmpq -0x398(%rbp), %rax
jae 0x9feb
movslq -0x10(%rbp), %rax
movzbl -0x390(%rbp,%rax), %eax
cmpl $0x0, %eax
jne 0x9fb6
movslq -0x14(%rbp), %rax
movb $0x2c, -0x1d0(%rbp,%rax)
jmp 0x9fd5
movslq -0x10(%rbp), %rax
movzbl -0x390(%rbp,%rax), %eax
subl $0x1, %eax
addl $0x61, %eax
movb %al, %cl
movslq -0x14(%rbp), %rax
movb %cl, -0x1d0(%rbp,%rax)
jmp 0x9fd7
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9f8a
movl -0x14(%rbp), %eax
subl $0x1, %eax
cltq
movb $0xa, -0x1d0(%rbp,%rax)
leaq -0x1d0(%rbp), %rdi
movq -0x398(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x10d0
cmpq -0x398(%rbp), %rax
je 0xa055
movq 0x31fd1(%rip), %rax     # 0x3bff8
movq (%rax), %rdi
movq 0x3208f(%rip), %rdx     # 0x3c0c0
leaq 0x2e3d8(%rip), %rsi     # 0x38410
movb $0x0, %al
callq 0x1060
leaq 0x2e35e(%rip), %rdi     # 0x383a4
callq 0x10a0
movl $0x1, %edi
callq 0x10c0
cmpl $0x0, -0xc(%rbp)
je 0xa145
leaq -0x390(%rbp), %rdi
callq 0xad00
movl $0x1, -0x10(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rax
cmpq -0x398(%rbp), %rax
jae 0xa0d9
movslq -0x10(%rbp), %rax
movzbl -0x390(%rbp,%rax), %eax
cmpl $0x0, %eax
jne 0xa0a4
movslq -0x14(%rbp), %rax
movb $0x2c, -0x1d0(%rbp,%rax)
jmp 0xa0c3
movslq -0x10(%rbp), %rax
movzbl -0x390(%rbp,%rax), %eax
subl $0x1, %eax
addl $0x61, %eax
movb %al, %cl
movslq -0x14(%rbp), %rax
movb %cl, -0x1d0(%rbp,%rax)
jmp 0xa0c5
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa078
movl -0x14(%rbp), %eax
subl $0x1, %eax
cltq
movb $0xa, -0x1d0(%rbp,%rax)
leaq -0x1d0(%rbp), %rdi
movq -0x398(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x10d0
cmpq -0x398(%rbp), %rax
je 0xa143
movq 0x31ee3(%rip), %rax     # 0x3bff8
movq (%rax), %rdi
movq 0x31fa1(%rip), %rdx     # 0x3c0c0
leaq 0x2e2ea(%rip), %rsi     # 0x38410
movb $0x0, %al
callq 0x1060
leaq 0x2e270(%rip), %rdi     # 0x383a4
callq 0x10a0
movl $0x1, %edi
callq 0x10c0
jmp 0xa145
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbp
retq
nop