// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: extend_quadr_P0
static EDGE
*extend_quadr_P0(EDGE *e1)

/* extends a graph in the way given by the type P0 extension for
   quadrangulations. 

   The new path is inserted on the left of e1. 

   It returns the directed edge starting at the new vertex with the
   new face on its left.

   In the picture: e1=b->a, the edge c->a is returned and
   vertex c is the new point nv.

       ?
       a
      / \
    ?b   c?    
      \ /    
       d
       ?
*/

{
  register EDGE *start, *dummy, *dummy2;
  int buffer;

  start=quadr_P0(nv);

  degree[nv]=2;

  buffer=e1->end;
  dummy=e1->invers; dummy2=dummy->prev;
  start->start=buffer;
  start->next=dummy; dummy->prev=start;
  start->prev=dummy2; dummy2->next=start;
  degree[buffer]++;

  start++;
  firstedge[nv]=start;
  start->end=buffer;

  e1=e1->next;
  start++;
  buffer=e1->end;
  dummy=e1->invers; dummy2=dummy->next;
  start->start=buffer;
  start->next=dummy2; dummy2->prev=start;
  start->prev=dummy; dummy->next=start;
  degree[buffer]++;

  (start+1)->end=buffer;

  nv++; ne+=4;

  return (start-1); 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl 0x2533b2(%rip), %eax    # 0x25a620
shll $0x2, %eax
movslq %eax, %rcx
leaq 0x2533b5(%rip), %rax    # 0x25a630
addq $-0x200, %rax           # imm = 0xFE00
addq $0x4000, %rax           # imm = 0x4000
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movslq 0x253387(%rip), %rcx    # 0x25a620
leaq 0x36960(%rip), %rax     # 0x3dc00
movl $0x2, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movslq -0x24(%rbp), %rcx
leaq 0x368f3(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x368e6(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdx
movslq 0x2532ec(%rip), %rcx    # 0x25a620
leaq 0x366c5(%rip), %rax     # 0x3da00
movq %rdx, (%rax,%rcx,8)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movslq -0x24(%rbp), %rcx
leaq 0x36839(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x3682c(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x44(%rax)
movl 0x253239(%rip), %eax    # 0x25a620
addl $0x1, %eax
movl %eax, 0x253230(%rip)    # 0x25a620
movl 0x25322e(%rip), %eax    # 0x25a624
addl $0x4, %eax
movl %eax, 0x253225(%rip)    # 0x25a624
movq -0x10(%rbp), %rax
addq $-0x40, %rax
popq %rbp
retq
nopl (%rax)