// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: extend3
static void 
extend3(EDGE *e)

/* inserts a vertex with valence 3 in the triangle on the right hand
   side (->next direction) of the edge e */
{
    register EDGE *work1, *work2, *work3;

    work1 = STAR3(nv);
    work2 = work1+1;
    work3 = work2+1;
    firstedge[nv] = work3+1;

/* work1 starts at the beginning of e: */

    work1->start = work1->invers->end = e->start;
    e->next->prev = work1;
    work1->next = e->next;
    work1->prev = e;
    e->next = work1;
    (degree[e->start])++;

/* Now go one edge further around the triangle and the same once more */

    e = e->invers->prev;
    
    work2->start = work2->invers->end = e->start;
    e->next->prev = work2;
    work2->next = e->next;
    work2->prev = e;
    e->next = work2;
    (degree[e->start])++;

    e = e->invers->prev;

    work3->start = work3->invers->end = e->start;
    e->next->prev = work3;
    work3->next = e->next;
    work3->prev = e;
    e->next = work3;
    (degree[e->start])++;

    degree[nv] = 3;

/* Now I have 6 edges and one vertex more */

    ne += 6; 
    nv++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl 0x22ee02(%rip), %eax    # 0x25a620
shll $0x3, %eax
movslq %eax, %rcx
leaq 0x22ee05(%rip), %rax    # 0x25a630
addq $0x180, %rax            # imm = 0x180
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdx
addq $0x40, %rdx
movslq 0x22edbd(%rip), %rcx    # 0x25a620
leaq 0x12196(%rip), %rax     # 0x3da00
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movslq (%rax), %rcx
leaq 0x12335(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x12328(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movslq (%rax), %rcx
leaq 0x122b8(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x122ab(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movslq (%rax), %rcx
leaq 0x1223b(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x1222e(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movslq 0x22ec44(%rip), %rcx    # 0x25a620
leaq 0x1221d(%rip), %rax     # 0x3dc00
movl $0x3, (%rax,%rcx,4)
movl 0x22ec34(%rip), %eax    # 0x25a624
addl $0x6, %eax
movl %eax, 0x22ec2b(%rip)    # 0x25a624
movl 0x22ec21(%rip), %eax    # 0x25a620
addl $0x1, %eax
movl %eax, 0x22ec18(%rip)    # 0x25a620
popq %rbp
retq
nopw (%rax,%rax)