// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: common_5_endpoint
static int
common_5_endpoint(EDGE *e, EDGE *e1)

/* returns 1, if the endpoints of e and e1 have a common neighbour
   with valency 5, different from their start and different from
   e->prev->end, e->next->end, e1->prev->end, e1->next->end, 0 else.
   It is assumed that the starting points of e, e1 are the same, and that

*/

/*  Alternate version:
{
    EDGE *ee;
    int k;

    RESETMARKS_V;

    ee = e->invers->next->next;
    for (k = degree[ee->start]-3; --k >= 0; ee = ee->next)
	if (degree[ee->end] == 5) MARK_V(ee->end);

    ee = e1->invers->next->next;
    for (k = degree[ee->start]-3; --k >= 0; ee = ee->next) 
        if (ISMARKED_V(ee->end)) return TRUE;

    return FALSE;
}
*/
  
{
  EDGE *run, *last;

  RESETMARKS_V;

  e=e->invers; e1=e1->invers;

  run=e->next->next;
  if (degree[run->end]==5) MARK_V(run->end);
  run=run->next;
  if (degree[run->end]==5) MARK_V(run->end);
  last=e->prev->prev;
  while (run!=last)
    { run=run->next;
    if (degree[run->end]==5) MARK_V(run->end);
    }

  run=e1->next->next;
  if (ISMARKED_V(run->end)) return 1;
  run=run->next;
  if (ISMARKED_V(run->end)) return 1;
  last=e1->prev->prev;
  while (run!=last)
    { run=run->next;
    if (ISMARKED_V(run->end)) return 1;
    }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl 0x1680e(%rip), %eax     # 0x3c090
addl $0x1, %eax
movl %eax, 0x16805(%rip)     # 0x3c090
cmpl $0x7530, %eax           # imm = 0x7530
jle 0x258c8
movl $0x1, 0x167f4(%rip)     # 0x3c090
movl $0x0, -0x2c(%rbp)
cmpl $0x40, -0x2c(%rbp)
jge 0x258c6
movslq -0x2c(%rbp), %rcx
leaq 0x27b38c(%rip), %rax    # 0x2a0c40
movl $0x0, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x258a3
jmp 0x258c8
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x18301(%rip), %rax     # 0x3dc00
cmpl $0x5, (%rax,%rcx,4)
jne 0x2591d
movl 0x16785(%rip), %edx     # 0x3c090
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27b326(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x182c8(%rip), %rax     # 0x3dc00
cmpl $0x5, (%rax,%rcx,4)
jne 0x25956
movl 0x1674c(%rip), %edx     # 0x3c090
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27b2ed(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x259ab
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x18275(%rip), %rax     # 0x3dc00
cmpl $0x5, (%rax,%rcx,4)
jne 0x259a9
movl 0x166f9(%rip), %edx     # 0x3c090
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27b29a(%rip), %rax    # 0x2a0c40
movl %edx, (%rax,%rcx,4)
jmp 0x25966
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27b276(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x166bd(%rip), %eax     # 0x3c090
jne 0x259e1
movl $0x1, -0x4(%rbp)
jmp 0x25a62
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27b244(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x1668b(%rip), %eax     # 0x3c090
jne 0x25a10
movl $0x1, -0x4(%rbp)
jmp 0x25a62
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x25a5b
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x27b1fb(%rip), %rax    # 0x2a0c40
movl (%rax,%rcx,4), %eax
cmpl 0x16642(%rip), %eax     # 0x3c090
jne 0x25a59
movl $0x1, -0x4(%rbp)
jmp 0x25a62
jmp 0x25a20
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)