// File: /workspace/github_c_makefile_star2_O1/mishun[P]plantri/plantri.c
// Function: extend_bip_Q
static void
extend_bip_Q(EDGE *ref)

/* This routine is the implementation of the Q-operation in Batagelj's
   paper.  It inserts one new vertex -- nv. The reference edge ref is
   the one starting at the vertex to be split that will (always) become a 
   valency 4 vertex in the new graph. 

        a
   |\  /   reference edge nv->a
   | \/nv
   | /\
   |/  \

The operations can only be understood by drawing a picture containing the edge
numbers as initialized in init_P_op().
*/
{
    EDGE *a,*b,*c,*d,*x,*start;
    int dummy, dummy2;

    start=Q_op(nv);

    firstedge[nv]=ref;
    x=ref->next;
    b=ref->prev->invers;
    a=b->prev;

    d=x->next->invers;
    c=d->next;

    ref->start=ref->invers->end=x->start=x->invers->end=nv;

    ref->prev=start+4;

    c->prev=start+1;
    d->next=start+2;
    b->prev=start+3; 
    a->next=start+5;

    dummy=c->start; dummy2=a->start;
    (degree[dummy])+=2; (degree[dummy2])+=2;
    degree[nv]=4; (degree[b->end])-=2;
    start->prev=x; x->next=start; start->end=dummy; start++;
    /*1*/ start->next=c; c->prev=start; start->start=dummy; start++;
    /*2*/ start->prev=d; d->next=start; start->start=dummy;
          start->end=dummy2; start++;
    /*3*/ start->next=b; b->prev=start; start->start=dummy2;
          start->end=dummy; start++;
    /*4*/ start->next=ref; ref->prev=start; start->end=dummy2; start++;
    /*5*/ start->prev=a; a->next=start; start->start=dummy2;

    b=b->invers; d=d->invers;

    firstedge[b->start]=b;
    b->next=d;
    d->prev=b;


    nv++;
    ne+=6;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x226d7f(%rip), %rdx    # 0x244610
leaq (%rdx,%rdx,2), %r9
shlq $0x7, %r9
leaq 0x226d80(%rip), %rcx    # 0x244620
leaq 0xa149(%rip), %rax      # 0x279f0
movq %rdi, (%rax,%rdx,8)
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rbx
movq 0x20(%rax), %rsi
movq 0x10(%rsi), %r12
movq 0x18(%rbx), %r8
movq 0x20(%rbx), %r11
movq 0x20(%r8), %r10
movq 0x18(%r10), %r15
movl %edx, 0x4(%r11)
movl %edx, (%rbx)
movq 0x20(%rdi), %r11
movl %edx, 0x4(%r11)
movl %edx, (%rdi)
movq %rcx, %rax
leaq 0xc700(%r9,%rcx), %rcx
movq %rcx, -0x8(%rsp)
movq %rcx, 0x10(%rdi)
leaq 0xc640(%r9,%rax), %rcx
movq %rcx, -0x10(%rsp)
movq %rcx, 0x10(%r15)
leaq 0xc680(%r9,%rax), %r13
movq %r13, 0x18(%r10)
leaq 0xc6c0(%r9,%rax), %rbp
movq %rbp, 0x10(%rsi)
leaq 0xc740(%r9,%rax), %r14
movq %r14, 0x18(%r12)
movslq (%r15), %rax
movslq (%r12), %rcx
leaq 0xa2bd(%rip), %r8       # 0x27bf0
addl $0x2, (%r8,%rax,4)
addl $0x2, (%r8,%rcx,4)
movl $0x4, (%r8,%rdx,4)
movslq 0x4(%rsi), %r11
addl $-0x2, (%r8,%r11,4)
leaq 0x226ccb(%rip), %r8     # 0x244620
addq %r9, %r8
addq $0xc600, %r8            # imm = 0xC600
movq %rbx, -0x70(%r13)
movq %r8, 0x18(%rbx)
movl %eax, -0x7c(%r13)
movq %r15, -0x68(%rbp)
movq -0x10(%rsp), %r8
movq %r8, 0x10(%r15)
movl %eax, -0x80(%rbp)
movq %r10, -0x30(%rbp)
movq %r13, 0x18(%r10)
movl %eax, -0x40(%rbp)
movl %ecx, -0x3c(%rbp)
movq %rsi, -0x68(%r14)
movq %rbp, 0x10(%rsi)
movl %ecx, -0x80(%r14)
movl %eax, -0x7c(%r14)
movq %rdi, -0x28(%r14)
movq -0x8(%rsp), %rax
movq %rax, 0x10(%rdi)
movl %ecx, -0x3c(%r14)
movq %r12, 0x10(%r14)
movq %r14, 0x18(%r12)
movl %ecx, (%r14)
movq 0x20(%rsi), %rax
movq 0x20(%r10), %rcx
movslq (%rax), %rsi
leaq 0xa028(%rip), %rdi      # 0x279f0
movq %rax, (%rdi,%rsi,8)
movq %rcx, 0x18(%rax)
movq %rax, 0x10(%rcx)
leal 0x1(%rdx), %eax
movl %eax, 0x226c33(%rip)    # 0x244610
addl $0x6, 0x226c30(%rip)    # 0x244614
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq