// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: update_double_makers
static void
update_double_makers(EDGE *list[], int *number, EDGE *de_list[],
    EDGE *oldlist[], int oldnumber, EDGE *oldde_list[], EDGE *lastflipped)

/* Add more comments.  All edges in the parameters are in min form. */
{
    int a,b,c,d; /* the 4 vertices affected by the last check */
    int i, j, counter;
    EDGE *run, *dummy;
    int degneeded;

    degneeded = (minimumdeg == 3 ? 4 : 3);

    RESETMARKS_V;

    a=lastflipped->start; MARK_V(a);
    b=lastflipped->end; MARK_V(b);
    c=lastflipped->prev->end; MARK_V(c);
    d=lastflipped->next->end; MARK_V(d);

/* abcd must all be distinct, since with lastflipped before and after the
   flipping all edges of K_4 are present, so there would have been a loop
   before or after -- but so far there are no loops... */

    counter=0;

    for (i=0; i<oldnumber; i++)
      { run=oldlist[i]; 
        if (!(ISMARKED_V(run->start) || ISMARKED_V(run->end)))
                        /* in this case it will be checked from abcd */
       /* The other thing to check is that the edge to be doubled was not
      switched away */
            if (lastflipped != oldde_list[i])
              { list[counter]=run;
                de_list[counter]=oldde_list[i];
                counter++; }
    /* if it was switched away, there is NO other edge that would be
       doubled, since this would mean that already the edge switched
       away was in a double edge and edges contained in double edges
       are never switched away, since they cannot double another
       (Jordan Curve Theorem). */
      }

/* Note: It is not possible that some edge not adjacent to abcd can double
   lastflipped in its new position and is not yet included in the old list:
   Lastflipped was flipped in order to double some edge, so there already
   was some edge with these endpoints to double. */


    if (degree[a]>=degneeded)
      { run=firstedge[a];
        for (j=degree[a]; j; j--, run=run->next)
          if ((degree[run->end]>=degneeded) &&
                                 ((run==run->min) || !ISMARKED_V(run->end)))
      /* edges inside the set are regarded twice, so only one of the
         directions should be worked on, edges leaving the set are
         regarded only once */
          { 
              if (ISADJ(run->next->end,run->prev->end))
              {   dummy = firstedge[run->next->end];
                  while (dummy->end != run->prev->end) dummy = dummy->next;
                  list[counter] = run->min; 
                  de_list[counter] = dummy->min;
                  counter++;
              }
          }
      }

    if (degree[b]>=degneeded)
      { run=firstedge[b];
        for (j=degree[b]; j; j--, run=run->next)
          if ((degree[run->end]>=degneeded) &&
                          ((run==run->min) || !ISMARKED_V(run->end)))
          {
              if (ISADJ(run->next->end,run->prev->end))
              {   dummy = firstedge[run->next->end];
                  while (dummy->end != run->prev->end) dummy = dummy->next;
                  list[counter] = run->min;
                  de_list[counter] = dummy->min;
                  counter++;
              }
          }
      }
    
    if (degree[c]>=degneeded)
      { run=firstedge[c];
        for (j=degree[c]; j; j--, run=run->next)
          if ((degree[run->end]>=degneeded) &&
                          ((run==run->min) || !ISMARKED_V(run->end)))
          {
              if (ISADJ(run->next->end,run->prev->end))
              {   dummy = firstedge[run->next->end];
                  while (dummy->end != run->prev->end) dummy = dummy->next;
                  list[counter] = run->min;
                  de_list[counter] = dummy->min;
                  counter++;
              }
          }
      }
    
    if (degree[d]>=degneeded)
      { run=firstedge[d];
        for (j=degree[d]; j; j--, run=run->next)
          if ((degree[run->end]>=degneeded) &&
                          ((run==run->min) || !ISMARKED_V(run->end)))
          {
              if (ISADJ(run->next->end,run->prev->end))
              {   dummy = firstedge[run->next->end];
                  while (dummy->end != run->prev->end) dummy = dummy->next;
                  list[counter] = run->min;
                  de_list[counter] = dummy->min;
                  counter++;
              }
          }
      }

    *number=counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movl 0xe112(%rip), %edx      # 0x3c1b8
movl $0x3, %eax
movl $0x4, %ecx
cmpl $0x3, %edx
cmovel %ecx, %eax
movl %eax, -0x64(%rbp)
movl 0xdfd1(%rip), %eax      # 0x3c090
addl $0x1, %eax
movl %eax, 0xdfc8(%rip)      # 0x3c090
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x2e105
movl $0x1, 0xdfb7(%rip)      # 0x3c090
movl $0x0, -0x68(%rbp)
cmpl $0x40, -0x68(%rbp)
jge 0x2e103
movslq -0x68(%rbp), %rcx
leaq 0x272b4f(%rip), %rax    # 0x2a0c40
movl $0x0, (%rax,%rcx,4)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x2e0e0
jmp 0x2e105
movq 0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movl 0xdf7c(%rip), %edx      # 0x3c090
movslq -0x34(%rbp), %rcx
leaq 0x272b21(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq 0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x38(%rbp)
movl 0xdf5e(%rip), %edx      # 0x3c090
movslq -0x38(%rbp), %rcx
leaq 0x272b03(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq 0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movl 0xdf3c(%rip), %edx      # 0x3c090
movslq -0x3c(%rbp), %rcx
leaq 0x272ae1(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq 0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x40(%rbp)
movl 0xdf1a(%rip), %edx      # 0x3c090
movslq -0x40(%rbp), %rcx
leaq 0x272abf(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x2e236
movq -0x20(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movslq (%rax), %rcx
leaq 0x272a84(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0xdecb(%rip), %eax      # 0x3c090
je 0x2e226
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x272a6a(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0xdeb1(%rip), %eax      # 0x3c090
je 0x2e226
movq 0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movslq -0x44(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x2e224
movq -0x58(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x18(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2e226
jmp 0x2e228
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2e192
movslq -0x34(%rbp), %rcx
leaq 0xf9bf(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e386
movslq -0x34(%rbp), %rcx
leaq 0xf7a8(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movslq -0x34(%rbp), %rcx
leaq 0xf995(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x2e384
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0xf976(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e368
movq -0x58(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x2e2c2
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27298d(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0xddd4(%rip), %eax      # 0x3c090
je 0x2e368
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x4989ab(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl 0x4(%rcx), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x2e366
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0xf6f5(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x4(%rcx), %eax
je 0x2e335
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2e313
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x8(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2e368
jmp 0x2e36a
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x2e271
jmp 0x2e386
movslq -0x38(%rbp), %rcx
leaq 0xf86f(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e4d6
movslq -0x38(%rbp), %rcx
leaq 0xf658(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movslq -0x38(%rbp), %rcx
leaq 0xf845(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x2e4d4
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0xf826(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e4b8
movq -0x58(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x2e412
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27283d(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0xdc84(%rip), %eax      # 0x3c090
je 0x2e4b8
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x49885b(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl 0x4(%rcx), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x2e4b6
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0xf5a5(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x4(%rcx), %eax
je 0x2e485
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2e463
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x8(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2e4b8
jmp 0x2e4ba
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x2e3c1
jmp 0x2e4d6
movslq -0x3c(%rbp), %rcx
leaq 0xf71f(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e626
movslq -0x3c(%rbp), %rcx
leaq 0xf508(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movslq -0x3c(%rbp), %rcx
leaq 0xf6f5(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x2e624
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0xf6d6(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e608
movq -0x58(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x2e562
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x2726ed(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0xdb34(%rip), %eax      # 0x3c090
je 0x2e608
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x49870b(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl 0x4(%rcx), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x2e606
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0xf455(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x4(%rcx), %eax
je 0x2e5d5
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2e5b3
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x8(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2e608
jmp 0x2e60a
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x2e511
jmp 0x2e626
movslq -0x40(%rbp), %rcx
leaq 0xf5cf(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e776
movslq -0x40(%rbp), %rcx
leaq 0xf3b8(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movslq -0x40(%rbp), %rcx
leaq 0xf5a5(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
je 0x2e774
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0xf586(%rip), %rax      # 0x3dc00
movl (%rax,%rcx,4), %eax
cmpl -0x64(%rbp), %eax
jl 0x2e758
movq -0x58(%rbp), %rax
movq -0x58(%rbp), %rcx
cmpq 0x28(%rcx), %rax
je 0x2e6b2
movq -0x58(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27259d(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0xd9e4(%rip), %eax      # 0x3c090
je 0x2e758
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0x4985bb(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
movl 0x4(%rcx), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x2e756
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movslq 0x4(%rax), %rcx
leaq 0xf305(%rip), %rax      # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl 0x4(%rcx), %eax
je 0x2e725
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2e703
movq -0x58(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x8(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2e758
jmp 0x2e75a
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x2e661
jmp 0x2e776
movl -0x4c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)