// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/plantri.c
// Function: extend_min5_a
static EDGE*
extend_min5_a(EDGE *e1, EDGE *e2)

/* extends a graph in the way given by the type a extension for
   5-connected triangulations. The edges e1, e2 start at the same
   vertex and must have at least two edges on each of their sides. 

   It returns the edge characterizing this operation.
*/

{
  register EDGE *e3, *e4, *start, *run, *e1i, *e2i, *work1, *work2;
  int end1, end2, center, counter;

  e3=e1->next;
  e4=e2->prev;
  e1i=e1->invers;
  e2i=e2->invers;
  work1=e1i->prev;
  work2=e2i->next;
  center=e1->start;
  end1=e1->end;
  end2=e2->end;

  start=min5_a(nv);
  firstedge[center]=start+2;
  firstedge[nv]=start+1;

  counter=1; run=e3; run->start=run->invers->end=nv;
  do { run=run->next; run->start=run->invers->end=nv; counter++; }
  while (run != e4);

  degree[nv]=counter+3;
  degree[center]-=(counter-1);

  start->start=end1;
  start->prev=work1;
  start->next=e1i;
  work1->next=e1i->prev=start;
  (degree[end1])++;

  run=start+1;
  run->end=end1;
  run->next=e3;
  e3->prev=run;

  run++; /*start+2*/
  run->start=center;
  run->next=e2;
  run->prev=e1;
  e1->next=e2->prev=run;

  run++; /*start+3*/
  run->end=center;

  run++; /*start+4*/
  run->start=end2;
  run->prev=e2i;
  run->next=work2;
  e2i->next=work2->prev=run;
  (degree[end2])++;

  run++; /*start+5*/
  run->end=end2;
  run->prev=e4;
  e4->next=run;

  nv++; ne+=6;

  return (start+2); /* It is the minimum of the two inverse edges */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r8
movq 0x10(%rsi), %rcx
movq 0x20(%rdi), %rbx
movq 0x20(%rsi), %rax
movq 0x10(%rbx), %rdx
movq %rdx, -0x18(%rsp)
movq %rax, -0x8(%rsp)
movq 0x18(%rax), %rax
movq %rax, -0x10(%rsp)
movl (%rdi), %r9d
movl 0x230954(%rip), %edx    # 0x242600
movslq %edx, %rbp
imulq $0x180, %rbp, %r11      # imm = 0x180
leaq 0x230953(%rip), %r14    # 0x242610
leaq (%r11,%r14), %r10
addq $-0x300, %r10           # imm = 0xFD00
leaq -0x280(%r11,%r14), %rax
leaq -0x2c0(%r11,%r14), %r15
movl 0x4(%rdi), %r11d
movslq %r9d, %r12
movl 0x4(%rsi), %r14d
leaq 0x13cf6(%rip), %r9      # 0x259e0
movq %rax, (%r9,%r12,8)
movq %r15, -0x20(%rsp)
movq %r15, (%r9,%rbp,8)
movq 0x20(%r8), %r9
movl %ebp, 0x4(%r9)
movslq %r11d, %r9
movslq %r14d, %r15
movl %ebp, (%r8)
xorl %r14d, %r14d
movq %r8, %r11
movq 0x18(%r11), %r11
movq 0x20(%r11), %r13
movl %edx, 0x4(%r13)
movl %edx, (%r11)
incl %r14d
cmpq %rcx, %r11
jne 0x11d0e
leal 0x4(%r14), %r11d
leaq 0x13eb0(%rip), %r13     # 0x25be0
movl %r11d, (%r13,%rbp,4)
subl %r14d, (%r13,%r12,4)
movl %r9d, (%r10)
movq -0x18(%rsp), %r11
movq %r11, 0x10(%r10)
movq %rbx, 0x18(%r10)
movq %r10, 0x10(%rbx)
movq %r10, 0x18(%r11)
incl (%r13,%r9,4)
movl %r9d, 0x44(%r10)
movq %r8, 0x58(%r10)
movq -0x20(%rsp), %r9
movq %r9, 0x10(%r8)
movl %r12d, 0x80(%r10)
movq %rsi, 0x98(%r10)
movq %rdi, 0x90(%r10)
movq %rax, 0x10(%rsi)
movq %rax, 0x18(%rdi)
movl %r12d, 0xc4(%r10)
leaq 0x100(%r10), %rsi
movl %r15d, 0x100(%r10)
movq -0x8(%rsp), %rdi
movq %rdi, 0x110(%r10)
movq -0x10(%rsp), %r8
movq %r8, 0x118(%r10)
movq %rsi, 0x10(%r8)
movq %rsi, 0x18(%rdi)
incl (%r13,%r15,4)
movl %r15d, 0x144(%r10)
movq %rcx, 0x150(%r10)
leaq 0x140(%r10), %rsi
movq %rsi, 0x18(%rcx)
incl %edx
movl %edx, 0x230820(%rip)    # 0x242600
addl $0x6, 0x23081d(%rip)    # 0x242604
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq