// File: /workspace/github_c_makefile_star2_O1/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), %r10
movq 0x10(%rsi), %rcx
movq 0x20(%rdi), %r11
movq 0x20(%rsi), %rax
movq 0x10(%r11), %rdx
movq %rdx, -0x18(%rsp)
movq %rax, -0x8(%rsp)
movq 0x18(%rax), %rax
movq %rax, -0x10(%rsp)
movl (%rdi), %r8d
movl 0x4(%rdi), %ebp
movslq 0x2316c1(%rip), %rbx    # 0x244610
leaq (%rbx,%rbx,2), %r14
shlq $0x7, %r14
leaq 0x2316c2(%rip), %r15    # 0x244620
leaq (%r14,%r15), %r9
addq $-0x300, %r9            # imm = 0xFD00
leaq -0x280(%r14,%r15), %rax
leaq -0x2c0(%r14,%r15), %r12
movl 0x4(%rsi), %r14d
movslq %r8d, %r15
leaq 0x14a69(%rip), %r8      # 0x279f0
movq %rax, (%r8,%r15,8)
movq %r12, (%r8,%rbx,8)
movq 0x20(%r10), %r8
movl %ebx, 0x4(%r8)
movslq %ebp, %r13
movslq %r14d, %r14
movl %ebx, (%r10)
xorl %r8d, %r8d
movq %r10, %rbp
movq 0x18(%rbp), %rbp
movl 0x231660(%rip), %ebx    # 0x244610
movq 0x20(%rbp), %rdx
movl %ebx, 0x4(%rdx)
movl %ebx, (%rbp)
incl %r8d
cmpq %rcx, %rbp
jne 0x12fa6
leal 0x4(%r8), %edx
movslq 0x231643(%rip), %rbp    # 0x244610
leaq 0x14c1c(%rip), %rbx     # 0x27bf0
movl %edx, (%rbx,%rbp,4)
subl %r8d, (%rbx,%r15,4)
movl %r13d, (%r9)
movq -0x18(%rsp), %rdx
movq %rdx, 0x10(%r9)
movq %r11, 0x18(%r9)
movq %r9, 0x10(%r11)
movq %r9, 0x18(%rdx)
incl (%rbx,%r13,4)
movl %r13d, 0x44(%r9)
movq %r10, 0x58(%r9)
movq %r12, 0x10(%r10)
movl %r15d, 0x80(%r9)
movq %rsi, 0x98(%r9)
movq %rdi, 0x90(%r9)
movq %rax, 0x10(%rsi)
movq %rax, 0x18(%rdi)
movl %r15d, 0xc4(%r9)
leaq 0x100(%r9), %rdx
movl %r14d, 0x100(%r9)
movq -0x8(%rsp), %rsi
movq %rsi, 0x110(%r9)
movq -0x10(%rsp), %rdi
movq %rdi, 0x118(%r9)
movq %rdx, 0x10(%rdi)
movq %rdx, 0x18(%rsi)
incl (%rbx,%r14,4)
movl %r14d, 0x144(%r9)
movq %rcx, 0x150(%r9)
leaq 0x140(%r9), %rdx
movq %rdx, 0x18(%rcx)
leal 0x1(%rbp), %ecx
movl %ecx, 0x231595(%rip)    # 0x244610
addl $0x6, 0x231592(%rip)    # 0x244614
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq