// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: make_colours
static int
make_colours(int col[], EDGE *e3)
/* Make better colours for maxdeg=3, supposing that expand3() has been
   performed at position e3 (though it hasn't been yet).
   If the virtual new vertex, nv, is not best, return 0.
   Otherwise, return the number of vertices with the same
   colour as nv (including itself).  Note that for correct
   operation, col[nv-1] must have the smallest value in col[]
   and all colours must be positive. */
{
    register int i,c,c0,nc;
    register EDGE *e;
    register int v1,v2,v3;
 
    v1 = e3->start;
    v2 = e3->end;
    v3 = e3->next->end;
 
    c0 =  (1 << ((++degree[v1])&7))
        + (1 << ((++degree[v2])&7))
        + (1 << ((++degree[v3])&7));
 
    col[nv] = 2;
    nc = 1;
 
    for (i = nv; --i >= 0;)
    {
        if (degree[i] != 3)
            col[i] = degree[i];
        else
        {
            e = firstedge[i]; 
            c = (1 << (degree[e->end]&7))
              + (1 << (degree[e->next->end]&7))
              + (1 << (degree[e->next->next->end]&7));
            if (c > c0)  
            {
                --degree[v1];
                --degree[v2];
                --degree[v3];
                return 0;
            }
            else if (c == c0) 
            {
                col[i] = 2;
                ++nc;
            }
            else 
                col[i] = 3;
        }
    }
 
    --degree[v1];
    --degree[v2];
    --degree[v3];
 
    return nc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x3c(%rbp)
movslq -0x34(%rbp), %rdx
leaq 0x10eb8(%rip), %rax     # 0x3dc00
movl (%rax,%rdx,4), %ecx
addl $0x1, %ecx
leaq 0x10eab(%rip), %rax     # 0x3dc00
movl %ecx, (%rax,%rdx,4)
andl $0x7, %ecx
movl $0x1, %eax
shll %cl, %eax
movslq -0x38(%rbp), %rsi
leaq 0x10e93(%rip), %rcx     # 0x3dc00
movl (%rcx,%rsi,4), %ecx
addl $0x1, %ecx
leaq 0x10e86(%rip), %rdx     # 0x3dc00
movl %ecx, (%rdx,%rsi,4)
andl $0x7, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movslq -0x3c(%rbp), %rsi
leaq 0x10e6a(%rip), %rcx     # 0x3dc00
movl (%rcx,%rsi,4), %ecx
addl $0x1, %ecx
leaq 0x10e5d(%rip), %rdx     # 0x3dc00
movl %ecx, (%rdx,%rsi,4)
andl $0x7, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movslq 0x22d85e(%rip), %rcx    # 0x25a620
movl $0x2, (%rax,%rcx,4)
movl $0x1, -0x28(%rbp)
movl 0x22d84a(%rip), %eax    # 0x25a620
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jl 0x2cf37
movslq -0x1c(%rbp), %rcx
leaq 0x10e0a(%rip), %rax     # 0x3dc00
cmpl $0x3, (%rax,%rcx,4)
je 0x2ce1a
movslq -0x1c(%rbp), %rcx
leaq 0x10df9(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x2cf32
movslq -0x1c(%rbp), %rcx
leaq 0x10bdb(%rip), %rax     # 0x3da00
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movslq 0x4(%rax), %rcx
leaq 0x10dc4(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %ecx
andl $0x7, %ecx
movl $0x1, %eax
shll %cl, %eax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movslq 0x4(%rcx), %rdx
leaq 0x10da4(%rip), %rcx     # 0x3dc00
movl (%rcx,%rdx,4), %ecx
andl $0x7, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movq -0x30(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq 0x18(%rcx), %rcx
movslq 0x4(%rcx), %rdx
leaq 0x10d7c(%rip), %rcx     # 0x3dc00
movl (%rcx,%rdx,4), %ecx
andl $0x7, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x2cefd
movslq -0x34(%rbp), %rcx
leaq 0x10d55(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
leaq 0x10d48(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movslq -0x38(%rbp), %rcx
leaq 0x10d3a(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
leaq 0x10d2d(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movslq -0x3c(%rbp), %rcx
leaq 0x10d1f(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
leaq 0x10d12(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x4(%rbp)
jmp 0x2cf8e
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jne 0x2cf1f
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x2, (%rax,%rcx,4)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2cf2e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl $0x3, (%rax,%rcx,4)
jmp 0x2cf30
jmp 0x2cf32
jmp 0x2cdd9
movslq -0x34(%rbp), %rcx
leaq 0x10cbe(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
leaq 0x10cb1(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movslq -0x38(%rbp), %rcx
leaq 0x10ca3(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
leaq 0x10c96(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movslq -0x3c(%rbp), %rcx
leaq 0x10c88(%rip), %rax     # 0x3dc00
movl (%rax,%rcx,4), %edx
addl $-0x1, %edx
leaq 0x10c7b(%rip), %rax     # 0x3dc00
movl %edx, (%rax,%rcx,4)
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)