// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: make_5exp_list
static void
make_5exp_list(EDGE *list1[], EDGE *list2[], int *listlength,
               EDGE *nf4cycleedges[], int numnf4cycleedges)

/* returns the list of legal 5-expansions for the mindeg5 4-connectivity
   case, that is of (undirected) pairs of edges so that:

   (i) both edges start at the same point of valency >=6
   (ii) in between them there are (on one side) exactly two edges and
        these are not on an nf-4-cycle
   (iii) their endpoints have a common neighbour of valency 5 (so
         especially both edges must be on an nf-4-cycle)

   The list comes in pairs of two, that is: for 0<=i<*listlength
   list1[i] and list2[i] belong together.

   It is assumed that there are no nf-3-cycles.

   nf4cycleedges[] must be a list of all undirected edges -- that
   is: always containing edge->min lying on nf-4-cycles and
   numnf4cycleedges their number.
*/

{ 
  int i, counter;
  EDGE *run, *run1, *end;

  RESETMARKS;
  for (i = numnf4cycleedges; --i >= 0; )
    { MARKLO(nf4cycleedges[i]); MARKLO(nf4cycleedges[i]->invers); }

  counter=0;

  for (i=0; i<nv; i++)
    if (degree[i]>=6)
      { run=firstedge[i];
      if (degree[i]==6)
        /* This case is special, since for opposite edges, the "same" expansion
           would be done, but different edges would be ckecked to judge whether
           it is legal. If deg>6 there is a 1-1 correspondence between the two
           edges in between and the expansion edgepair */
        { end=run->next->next->next;
        do
          { 
            if (ISMARKEDLO(run))
              { run1=run->next->next->next;
              /* is done inside the loop and not as a second run variable,
                 since most likely the loop is entered not too often, so
                 that in those rare cases where it is entered, it pays off
                 to have three "nexts". */  
              if (ISMARKEDLO(run1) &&
                  ((!ISMARKEDLO(run->next) && !ISMARKEDLO(run1->prev)) ||
                   (!ISMARKEDLO(run1->next) && !ISMARKEDLO(run->prev))))
                if (common_5_endpoint(run,run1))
                  { list1[counter]=run;
                    list2[counter]=run1; counter++; }
              }
            run=run->next;
          }
        while (run != end);
        }

      else /* degree > 6 */
        { end=run;
        do
          { 
            if (ISMARKEDLO(run))
              { run1=run->next->next->next;
              if (ISMARKEDLO(run1) &&
                  (!ISMARKEDLO(run->next) && !ISMARKEDLO(run1->prev)))
                if (common_5_endpoint(run,run1))
                  { list1[counter]=run;
                    list2[counter]=run1; counter++; }
              }
            run=run->next;
          }
        while (run != end);
        } /*else deg>6 */
      }/* end deg>=6 */

  *listlength=counter;

  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl 0x16f22(%rip), %eax     # 0x3c084
addl $0x2, %eax
movl %eax, 0x16f19(%rip)     # 0x3c084
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x251b2
movl $0x2, 0x16f08(%rip)     # 0x3c084
movl $0x0, -0x4c(%rbp)
cmpl $0x1198, -0x4c(%rbp)    # imm = 0x1198
jge 0x251b0
movslq -0x4c(%rbp), %rcx
leaq 0x235499(%rip), %rax    # 0x25a630
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x0, 0x30(%rax)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x25183
jmp 0x251b2
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
jl 0x251f6
movl 0x16eb8(%rip), %ecx     # 0x3c084
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x30(%rax)
movl 0x16ea3(%rip), %ecx     # 0x3c084
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x30(%rax)
jmp 0x251b8
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl 0x235413(%rip), %eax    # 0x25a620
jge 0x25419
movslq -0x28(%rbp), %rcx
leaq 0x189e2(%rip), %rax     # 0x3dc00
cmpl $0x6, (%rax,%rcx,4)
jl 0x25409
movslq -0x28(%rbp), %rcx
leaq 0x187cd(%rip), %rax     # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movslq -0x28(%rbp), %rcx
leaq 0x189ba(%rip), %rax     # 0x3dc00
cmpl $0x6, (%rax,%rcx,4)
jne 0x25348
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x16e13(%rip), %eax     # 0x3c084
jne 0x25329
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x16dec(%rip), %eax     # 0x3c084
jne 0x25327
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x30(%rax), %eax
cmpl 0x16dd5(%rip), %eax     # 0x3c084
je 0x252c4
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %eax
cmpl 0x16dc2(%rip), %eax     # 0x3c084
jne 0x252ea
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x30(%rax), %eax
cmpl 0x16daf(%rip), %eax     # 0x3c084
je 0x25327
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %eax
cmpl 0x16d9c(%rip), %eax     # 0x3c084
je 0x25327
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x25870
cmpl $0x0, %eax
je 0x25325
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x25327
jmp 0x25329
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x25264
jmp 0x25407
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x16d27(%rip), %eax     # 0x3c084
jne 0x253eb
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x30(%rax), %eax
cmpl 0x16d00(%rip), %eax     # 0x3c084
jne 0x253e9
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x30(%rax), %eax
cmpl 0x16ced(%rip), %eax     # 0x3c084
je 0x253e9
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %eax
cmpl 0x16cda(%rip), %eax     # 0x3c084
je 0x253e9
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x25870
cmpl $0x0, %eax
je 0x253e7
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x253e9
jmp 0x253eb
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jne 0x25350
jmp 0x25407
jmp 0x25409
jmp 0x2540b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x25204
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)