// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/plantri.c
// Function: compute_dual_code_mirror
static void
compute_dual_code_mirror(unsigned char code[])
 
/* works like compute_code_mirror -- only for the dual */

{
    register EDGE *run, *run2;
    EDGE *temp;  
    EDGE *startedge[MAXF+1]; 
    int number[MAXF+1], i; 
    int last_number, actual_number;
    int nf;
    EDGE *givenedge;

    nf=2+(ne/2)-nv;
    *code=nf; code++;
    RESETMARKS; /* The face on the right has already been numbered
                   if and only if it is marked. */
    for (i = 0; i < nf; i++) number[i] = 0;
 
    if (code_edge==NULL) givenedge=firstedge[0];
    else givenedge=code_edge->invers;

    run=givenedge;
    do { MARKLO(run); run->rightface=1; run=run->invers->prev;
       } while (run!=givenedge);
    if (!ISMARKED(givenedge->invers)) /* no loop in the dual at this point */
      { run2=run=givenedge->invers;
        do { MARKLO(run2); run2->rightface=2; run2=run2->invers->prev;
           } while (run2!=run);
	last_number = 2;
	startedge[1] = givenedge; /* the startedge has the face it
				     belongs to on the LEFT */
      }
    else  last_number = 1;  

    actual_number = 1;
    temp = givenedge->invers;

    while (last_number < nf)
    {   
        *code= temp->rightface; code++;
        for (run = temp->invers->next; run != temp; run = run->invers->next)
	  /* run also has the face it runs around on the left */
          { if (!ISMARKED(run))
	    { startedge[last_number] = run->invers;
              last_number++;
	      run2=run;
	      do
		{ MARKLO(run2); run2->rightface=last_number;
		  run2=run2->invers->prev;
                } while (run2!=run);
	      *code = last_number;
	    }
	  else *code=run->rightface;
	  code++;
	  }
        *code = 0;  code++;
        temp = startedge[actual_number];  actual_number++;
    }

    while (actual_number <= nf) 
    {  	*code=temp->rightface; code++;
        for (run = temp->invers->next; run != temp; run = run->invers->next)
          { 
            *code = run->rightface; code++;
          }
        *code = 0;
        code++;
        temp = startedge[actual_number];  actual_number++;
    }
}

// Assembly:
movl 0x237f4e(%rip), %eax    # 0x242604
movl $0x2, %esi
cltd
idivl %esi
subl 0x237f3c(%rip), %eax    # 0x242600
addl $0x2, %eax
movb %al, (%rdi)
movl 0x199ad(%rip), %edx     # 0x2407c
leal 0x2(%rdx), %ecx
movl %ecx, 0x199a4(%rip)     # 0x2407c
cmpl $0x752f, %edx           # imm = 0x752F
jl 0xa714
movl $0x2, 0x19992(%rip)     # 0x2407c
movabsq $0x30, %rdx
movl $0x2, %ecx
leaq 0x237f10(%rip), %r8     # 0x242610
cmpq $0x46630, %rdx          # imm = 0x46630
je 0xa714
andl $0x0, (%rdx,%r8)
addq $0x40, %rdx
jmp 0xa700
pushq %rbx
subq $0x370, %rsp            # imm = 0x370
movq 0x237ee5(%rip), %rdx    # 0x242608
leaq 0x20(%rdx), %r8
testq %rdx, %rdx
leaq 0x1b2af(%rip), %rdx     # 0x259e0
cmovneq %r8, %rdx
movq (%rdx), %r8
movq %r8, %rdx
movl %ecx, 0x30(%rdx)
movl $0x1, 0x8(%rdx)
movq 0x20(%rdx), %rdx
movq 0x10(%rdx), %rdx
cmpq %r8, %rdx
jne 0xa73b
movq 0x20(%r8), %rdx
cmpl %ecx, 0x30(%rdx)
jge 0xa77e
movq %rdx, %r9
movl %ecx, 0x30(%r9)
movl $0x2, 0x8(%r9)
movq 0x20(%r9), %r9
movq 0x10(%r9), %r9
cmpq %rdx, %r9
jne 0xa75e
movq %r8, -0x78(%rsp)
jmp 0xa783
movl $0x1, %esi
addq $0x20, %r8
movabsq $0x1, %rdx
xorl %r9d, %r9d
movq (%r8), %r8
cmpl %eax, %esi
jge 0xa807
movb 0x8(%r8), %r10b
movb %r10b, 0x1(%rdi)
addq $0x2, %rdi
movq %r8, %r10
movq 0x20(%r10), %r10
movq 0x18(%r10), %r10
cmpq %r8, %r10
je 0xa7f4
cmpl %ecx, 0x30(%r10)
jge 0xa7e8
movq 0x20(%r10), %rbx
movslq %esi, %r11
movq %rbx, -0x80(%rsp,%r11,8)
incl %r11d
movq %r10, %rsi
movl %ecx, 0x30(%rsi)
movl %r11d, 0x8(%rsi)
movq 0x20(%rsi), %rsi
movq 0x10(%rsi), %rsi
cmpq %r10, %rsi
jne 0xa7cf
movl %r11d, %esi
jmp 0xa7ec
movl 0x8(%r10), %r11d
movb %r11b, (%rdi)
incq %rdi
jmp 0xa7aa
movb $0x0, (%rdi)
leaq (%rsp,%rdx,8), %r8
addq $-0x80, %r8
incq %rdx
incl %r9d
jmp 0xa794
incq %rdi
cmpl %eax, %r9d
cmovgl %r9d, %eax
incl %eax
cmpq %rax, %rdx
je 0xa844
incq %rdi
movq %r8, %rcx
movb 0x8(%rcx), %sil
movb %sil, -0x1(%rdi)
movq 0x20(%rcx), %rcx
movq 0x18(%rcx), %rcx
incq %rdi
cmpq %r8, %rcx
jne 0xa81e
movb $0x0, -0x1(%rdi)
movq -0x80(%rsp,%rdx,8), %r8
incq %rdx
jmp 0xa813
addq $0x370, %rsp            # imm = 0x370
popq %rbx
retq