// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl 0x2e4a7(%rip), %eax     # 0x3c090
addl $0x1, %eax
movl %eax, 0x2e49e(%rip)     # 0x3c090
cmpl $0x7530, %eax           # imm = 0x7530
jle 0xdc3e
movl $0x1, 0x2e48d(%rip)     # 0x3c090
movl $0x0, -0x250(%rbp)
cmpl $0x40, -0x250(%rbp)
jge 0xdc3c
movslq -0x250(%rbp), %rcx
leaq 0x29301c(%rip), %rax    # 0x2a0c40
movl $0x0, (%rax,%rcx,4)
movl -0x250(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x250(%rbp)
jmp 0xdc0d
jmp 0xdc3e
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movslq 0x24c9d3(%rip), %rcx    # 0x25a624
shlq $0x3, %rcx
addq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x28(%rbp)
movl 0x2e42a(%rip), %edx     # 0x3c090
movq -0x8(%rbp), %rax
movslq (%rax), %rcx
leaq 0x292fcc(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
je 0xdcb9
movl 0x2e404(%rip), %edx     # 0x3c090
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x292fa5(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movl $0x2, -0x244(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x238(%rbp)
jmp 0xdcc3
movl $0x1, -0x244(%rbp)
movl $0x1, -0x248(%rbp)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, -0x18(%rbp)
movl -0x244(%rbp), %eax
cmpl 0x24c938(%rip), %eax    # 0x25a620
jge 0xddd7
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xdd93
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24c(%rbp)
movslq -0x24c(%rbp), %rcx
leaq 0x292f1d(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x2e364(%rip), %eax     # 0x3c090
je 0xdd6b
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x244(%rbp), %rax
movq %rcx, -0x240(%rbp,%rax,8)
movl -0x244(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x244(%rbp)
movl 0x2e336(%rip), %edx     # 0x3c090
movslq -0x24c(%rbp), %rcx
leaq 0x292ed8(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xdcfa
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xddd2
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movslq -0x248(%rbp), %rax
movq -0x240(%rbp,%rax,8), %rcx
movq %rcx, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x248(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x248(%rbp)
jmp 0xdcdc
jmp 0xddd9
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xde62
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0xde1e
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xddef
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0xde5d
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movslq -0x248(%rbp), %rax
movq -0x240(%rbp,%rax,8), %rcx
movq %rcx, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl -0x248(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x248(%rbp)
jmp 0xddd9
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax,%rax)