// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/plantri.c
// Function: construct_numb_mirror
static void 
construct_numb_mirror(EDGE *givenedge, EDGE *numbering[])

/* Starts at givenedge and writes the edges in the well defined order 
   into the list.  Works like testcanon. Look there for comments.  */
{
    EDGE *temp, **tail, **limit, *run;  
    EDGE *startedge[MAXN+1]; 
    int last_number, actual_number, vertex;

    RESETMARKS_V;

    tail = numbering; /* The first entry of the numbering list */
    limit = numbering+ne-1;  /* Last valid entry of the numbering list */

    MARK_V(givenedge->start); 
    if (givenedge->start != givenedge->end)
      {
	MARK_V(givenedge->end);
	last_number = 2;
	startedge[1] = givenedge->invers;
      }
    else last_number = 1; 

    actual_number = 1;
    temp = *tail = givenedge;

    while (last_number < nv)
    {  
        for (run = temp->prev; run != temp; run = run->prev)
    /* this loop marks all edges around temp->origin. */
          { vertex = run->end;
            if (!ISMARKED_V(vertex))
              { startedge[last_number] = run->invers;
                last_number++; MARK_V(vertex); }
            tail++; *tail = run; 
          }
          if (tail != limit)
            {
              tail++;
              *tail = temp = startedge[actual_number];  actual_number++; }
    }

    while (tail != limit) 
                /* Now we know that all numbers have been given */
    {  
        for (run = temp->prev; run != temp; run = run->prev)
    /* this loop marks all edges around temp->origin. */
          { tail++; *tail = run; }
        if (tail != limit)
        { 
       /* Next vertex to explore: */
            tail++;
            *tail = temp = startedge[actual_number];  actual_number++; }
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl 0x18bfa(%rip), %eax     # 0x24080
leal 0x1(%rax), %edx
movl %edx, 0x18bf1(%rip)     # 0x24080
cmpl $0x7530, %eax           # imm = 0x7530
jl 0xb4c0
movl $0x1, 0x18be0(%rip)     # 0x24080
xorl %eax, %eax
movl $0x1, %edx
leaq 0x27d772(%rip), %rcx    # 0x288c20
cmpq $0x100, %rax            # imm = 0x100
je 0xb4c0
andl $0x0, (%rax,%rcx)
addq $0x4, %rax
jmp 0xb4ae
movl $0x1, %eax
movslq 0x237138(%rip), %rcx    # 0x242604
movslq (%rdi), %r11
leaq 0x27d74a(%rip), %r8     # 0x288c20
movl %edx, (%r8,%r11,4)
movslq 0x4(%rdi), %r10
movl %eax, %r9d
cmpl %r10d, %r11d
je 0xb4f9
movl %edx, (%r8,%r10,4)
movq 0x20(%rdi), %r9
movq %r9, -0x78(%rsp)
movl $0x2, %r9d
leaq (%rsi,%rcx,8), %rcx
addq $-0x8, %rcx
movq %rdi, (%rsi)
movl 0x2370f5(%rip), %r10d   # 0x242600
movq %rsi, %r11
cmpl %r10d, %r9d
jge 0xb566
addq $0x8, %r11
movq %r11, %rsi
movq %rdi, %r11
movq 0x10(%r11), %r11
cmpq %rdi, %r11
je 0xb54c
movslq 0x4(%r11), %rbx
cmpl %edx, (%r8,%rbx,4)
je 0xb543
movq 0x20(%r11), %r14
movslq %r9d, %r9
movq %r14, -0x80(%rsp,%r9,8)
incl %r9d
movl %edx, (%r8,%rbx,4)
movq %r11, (%rsi)
addq $0x8, %rsi
jmp 0xb51d
leaq -0x8(%rsi), %rbx
movq %rcx, %r11
cmpq %rcx, %rbx
je 0xb50e
movl %eax, %edi
movq -0x80(%rsp,%rdi,8), %rdi
movq %rdi, (%rsi)
incl %eax
jmp 0xb50b
movq %r11, %rdx
cmpq %rcx, %rdx
je 0xb5a4
addq $0x8, %rdx
movq %rdx, %r11
movq %rdi, %rdx
movq 0x10(%rdx), %rdx
cmpq %rdi, %rdx
je 0xb58a
movq %rdx, (%r11)
addq $0x8, %r11
jmp 0xb578
leaq -0x8(%r11), %rsi
movq %rcx, %rdx
cmpq %rcx, %rsi
je 0xb569
movl %eax, %edx
movq -0x80(%rsp,%rdx,8), %rdi
movq %rdi, (%r11)
incl %eax
jmp 0xb566
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
retq