// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/plantri.c
// Function: construct_numb
static void
construct_numb(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; 
    limit = numbering+ne-1;  

    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->next; run != temp; run = run->next)
    /* 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->next; run != temp; run = run->next)
    /* 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 0x18d33(%rip), %eax     # 0x24080
leal 0x1(%rax), %edx
movl %edx, 0x18d2a(%rip)     # 0x24080
cmpl $0x7530, %eax           # imm = 0x7530
jl 0xb387
movl $0x1, 0x18d19(%rip)     # 0x24080
xorl %eax, %eax
movl $0x1, %edx
leaq 0x27d8ab(%rip), %rcx    # 0x288c20
cmpq $0x100, %rax            # imm = 0x100
je 0xb387
andl $0x0, (%rax,%rcx)
addq $0x4, %rax
jmp 0xb375
movl $0x1, %eax
movslq 0x237271(%rip), %rcx    # 0x242604
movslq (%rdi), %r11
leaq 0x27d883(%rip), %r8     # 0x288c20
movl %edx, (%r8,%r11,4)
movslq 0x4(%rdi), %r10
movl %eax, %r9d
cmpl %r10d, %r11d
je 0xb3c0
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 0x23722e(%rip), %r10d   # 0x242600
movq %rsi, %r11
cmpl %r10d, %r9d
jge 0xb42d
addq $0x8, %r11
movq %r11, %rsi
movq %rdi, %r11
movq 0x18(%r11), %r11
cmpq %rdi, %r11
je 0xb413
movslq 0x4(%r11), %rbx
cmpl %edx, (%r8,%rbx,4)
je 0xb40a
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 0xb3e4
leaq -0x8(%rsi), %rbx
movq %rcx, %r11
cmpq %rcx, %rbx
je 0xb3d5
movl %eax, %edi
movq -0x80(%rsp,%rdi,8), %rdi
movq %rdi, (%rsi)
incl %eax
jmp 0xb3d2
movq %r11, %rdx
cmpq %rcx, %rdx
je 0xb46b
addq $0x8, %rdx
movq %rdx, %r11
movq %rdi, %rdx
movq 0x18(%rdx), %rdx
cmpq %rdi, %rdx
je 0xb451
movq %rdx, (%r11)
addq $0x8, %r11
jmp 0xb43f
leaq -0x8(%r11), %rsi
movq %rcx, %rdx
cmpq %rcx, %rsi
je 0xb430
movl %eax, %edx
movq -0x80(%rsp,%rdx,8), %rdi
movq %rdi, (%r11)
incl %eax
jmp 0xb42d
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r14
retq