// File: /workspace/github_c_makefile_star2_O3/mishun[P]plantri/plantri.c
// Function: write_digits
static void
write_digits(FILE *f, int doflip)
 
/* Write in alphabetic format.  Always write in next direction,
   and if doflip != 0 also write in prev direction.  This output
   procedure uses the internal numbering of vertices and is 
   intended for debugging purposes. */
{
    int i,k;
    EDGE *ex,*e;
    unsigned char code[2*MAXN+2*MAXE+9];
    int nvsize;
    int lastnum,w;
    int nbop,nbtot,nbpart;
    EDGE **nb0,**nb,**nblim;
#define CODE0(x) ((x)<10 ? '0'+(x) : 'a'+(x)-10)
 
    if (oneswitch)
    {
	nbop = gotone_nbop;
	nbtot = gotone_nbtot;
	nbpart = (nbop==0 || nbop==nbtot ? nbtot : nbop);
	fprintf(f,"%d %d %d %d %d\n",nv,ne,(doflip?2:1),nbpart,nbtot);

	nb0 = (EDGE**) numbering[0];
	nblim = (EDGE**) numbering[doflip ? nbpart : nbtot];

	if (nblim != (EDGE**) numbering[1])
	    for (nb = nb0; nb < nblim; nb += MAXE)
	    {
		for (i = 0; i < ne; ++i)
		    fprintf(f," %c%c",CODE0(nb[i]->start),CODE0(nb[i]->end));
		fprintf(f,"\n");
	    }
    }
    
    if (nv >= 10) 
    {
        code[0] = '0' + nv/10;
        code[1] = '0' + nv%10;
        code[2] = ' ';
        nvsize = k = 3;
    }
    else
    {
        code[0] = '0' + nv;
        code[1] = ' ';
        nvsize = k = 2;
    }

    if (missing_vertex < 0) lastnum = nv-1;
    else                    lastnum = nv;
 
    for (i = 0; i <= lastnum; ++i)
    {
	if (i != missing_vertex)
	{
            e = ex = firstedge[i];
            do
            {
		w = e->end;
		code[k++] = CODE0(w);
                e = e->next;
            }
            while (e != ex);
            code[k++] = ',';
	}
    }
    code[k-1] = '\n';
 
    if (doflip)
    {
        for (i = 0; i <nvsize; ++i) code[k++] = code[i];
    
        for (i = 0; i <= lastnum; ++i)
        {
	    if (i != missing_vertex)
            {
                e = ex = firstedge[i];
                do
                {
                    w = e->end;
		    code[k++] = CODE0(w);
                    e = e->prev;
                }
                while (e != ex);
                code[k++] = ',';
	    }
        }
    }
    code[k-1] = '\n';
 
    if (fwrite(code,(size_t)1,(size_t)k,f) != (size_t)k)
    {
        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, 0xc(%rsp)
movq %rdi, %rbx
cmpb $0x1, 0x1bd51(%rip)     # 0x26254
jne 0xa5d6
movl 0x23a0f8(%rip), %r9d    # 0x244608
movl 0x23a0f6(%rip), %eax    # 0x24460c
testl %r9d, %r9d
cmovel %eax, %r9d
movl 0x23a0ed(%rip), %edx    # 0x244610
movl 0x23a0eb(%rip), %ecx    # 0x244614
xorl %r8d, %r8d
cmpl $0x0, 0xc(%rsp)
setne %r8b
movl %r9d, %r14d
cmovel %eax, %r14d
incl %r8d
movl %eax, (%rsp)
leaq 0x15fd4(%rip), %rsi     # 0x2051d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1060
cmpl $0x2, %r14d
jl 0xa5d6
movslq %r14d, %rax
imulq $0xba0, %rax, %r15      # imm = 0xBA0
leaq 0x1d786(%rip), %r12     # 0x27cf0
addq %r12, %r15
leaq 0x15fb9(%rip), %r14     # 0x2052d
cmpl $0x0, 0x23a099(%rip)    # 0x244614
jle 0xa5bd
xorl %r13d, %r13d
movq (%r12,%r13,8), %rax
movl (%rax), %ecx
movl 0x4(%rax), %eax
leal 0x57(%rcx), %esi
leal 0x30(%rcx), %edx
cmpl $0xa, %ecx
cmovgel %esi, %edx
leal 0x57(%rax), %esi
leal 0x30(%rax), %ecx
cmpl $0xa, %eax
cmovgel %esi, %ecx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
incq %r13
movslq 0x23a05c(%rip), %rax    # 0x244614
cmpq %rax, %r13
jl 0xa580
movl $0xa, %edi
movq %rbx, %rsi
callq 0x1040
addq $0xba0, %r12            # imm = 0xBA0
cmpq %r15, %r12
jb 0xa574
movl 0x23a034(%rip), %esi    # 0x244610
cmpl $0xa, %esi
jl 0xa609
movl %esi, %eax
movl $0xcccccccd, %ecx       # imm = 0xCCCCCCCD
imulq %rax, %rcx
shrq $0x23, %rcx
leal (%rcx,%rcx), %eax
leal (%rax,%rax,4), %eax
movl %esi, %edx
subl %eax, %edx
orb $0x30, %dl
movb $0x20, 0x12(%rsp)
movl $0x3, %edi
jmp 0xa612
movl $0x2, %edi
movb $0x20, %dl
movl %esi, %ecx
movabsq $0x100000000, %rax      # imm = 0x100000000
addb $0x30, %cl
movb %cl, 0x10(%rsp)
movb %dl, 0x11(%rsp)
movl 0x1ba5b(%rip), %ecx     # 0x26088
movl %ecx, %edx
sarl $0x1f, %edx
addl %esi, %edx
movl %edi, 0x8(%rsp)
movl %edi, %esi
js 0xa6a8
leal 0x1(%rdx), %edi
xorl %r9d, %r9d
leaq 0x1d3a7(%rip), %r10     # 0x279f0
movl 0x8(%rsp), %esi
cmpq %rcx, %r9
je 0xa6a0
movq (%r10,%r9,8), %r14
movslq %esi, %r11
leal 0x1(%r11), %esi
leaq (%rsp,%r11), %r15
addq $0x10, %r15
shlq $0x20, %r11
movq %r14, %r12
movl 0x4(%r12), %r13d
leal 0x57(%r13), %ebp
leal 0x30(%r13), %r8d
cmpl $0xa, %r13d
cmovgel %ebp, %r8d
movb %r8b, (%r15)
movq 0x18(%r12), %r12
incl %esi
incq %r15
addq %rax, %r11
cmpq %r14, %r12
jne 0xa66c
sarq $0x20, %r11
movb $0x2c, 0x10(%rsp,%r11)
incq %r9
cmpq %rdi, %r9
jne 0xa64d
movslq %esi, %r10
leaq 0x10(%rsp), %rdi
movb $0xa, -0x1(%r10,%rdi)
cmpl $0x0, 0xc(%rsp)
je 0xa751
movl 0x8(%rsp), %r9d
addq %rsp, %r10
addq $0x10, %r10
xorl %r8d, %r8d
movb 0x10(%rsp,%r8), %r11b
movb %r11b, (%r10,%r8)
incq %r8
cmpq %r8, %r9
jne 0xa6d0
movl %esi, %esi
addq %r8, %rsi
testl %edx, %edx
js 0xa751
incl %edx
xorl %r8d, %r8d
leaq 0x1d2fa(%rip), %r9      # 0x279f0
cmpq %rcx, %r8
je 0xa749
movq (%r9,%r8,8), %r11
movslq %esi, %r10
leal 0x1(%r10), %esi
leaq (%rsp,%r10), %r14
addq $0x10, %r14
shlq $0x20, %r10
movq %r11, %r15
movl 0x4(%r15), %r12d
leal 0x57(%r12), %ebp
leal 0x30(%r12), %r13d
cmpl $0xa, %r12d
cmovgel %ebp, %r13d
movb %r13b, (%r14)
movq 0x10(%r15), %r15
incl %esi
incq %r14
addq %rax, %r10
cmpq %r11, %r15
jne 0xa715
sarq $0x20, %r10
movb $0x2c, 0x10(%rsp,%r10)
incq %r8
cmpq %rdx, %r8
jne 0xa6f6
movslq %esi, %r14
movb $0xa, -0x1(%r14,%rdi)
movl $0x1, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10e0
cmpq %r14, %rax
jne 0xa781
addq $0x388, %rsp            # imm = 0x388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2430