// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/plantri.c
// Function: scandouble
static void
scandouble(int nbtot, int nbop, int numdoubles,
          EDGE *oldflip[], EDGE *oldmate[], int oldnflip, EDGE *lastflip)

/* The main node of the recursion for creating double edges. 
   As this procedure is entered, nv,ne,degree etc are set for some graph,
   and nbtot/nbop are the values returned by canon() for that graph.
   numdoubles is the number of undirected edges with a parallel mate.
   oldflip and oldnflip are the flips for the parent graph, and lastflip
   is what was flipped to make this graph.  The initial call is
   distinguished by oldnflip==0.  There are no loops yet. */
{
    register int i,j;
    int xnbtot,xnbop,nflips,xnumdoubles,ngood;
    EDGE *flip[MAXE/2],*mate[MAXE/2],*good[MAXE];
    int feasible[MAXE/2];
    int a,b,c,d;
    long ama,amb,amc,amd;

    if (minconnec == 2) got_one(nbtot,nbop,2+(numdoubles==0));

#ifdef PRE_FILTER_DOUBLE
    if (!(PRE_FILTER_DOUBLE)) return;
#endif

    if (oldnflip == 0)
    {
        make_am();
        find_double_makers(flip,&nflips,mate);
    }
    else 
        update_double_makers(flip,&nflips,mate,
                                        oldflip,oldnflip,oldmate,lastflip);

    find_feasible_flips(flip,mate,nflips,feasible,nbtot);
    
    if (minconnec == 1) scanordloops(nbtot,nbop,numdoubles);

    for (i = 0; i < nflips; ++i)
    {
        if (!feasible[i]) continue;

        a = flip[i]->start;     ama = am[a];
        b = flip[i]->end;       amb = am[b];
        c = flip[i]->prev->end; amc = am[c];
        d = flip[i]->next->end; amd = am[d];
        am[a] = ama & ~BIT(b);
        am[b] = amb & ~BIT(a);
        am[c] = amc | BIT(d);
        am[d] = amd | BIT(c);
        switch_edge(flip[i]);

        doubles[numdoubles] = flip[i];
        for (j = 0; j < numdoubles; ++j) if (doubles[j] == mate[i]) break;
        if (j == numdoubles)
        {
            doubles[numdoubles+1] = mate[i];
            xnumdoubles = numdoubles + 2;
        }
        else
            xnumdoubles = numdoubles + 1;

        make_edge_colours(flip[i],doubles,xnumdoubles,good,&ngood);

        if (ngood > 0
	    && canon_edge(good,ngood,degree,numbering,&xnbtot,&xnbop))
                scandouble(xnbtot,xnbop,xnumdoubles,flip,mate,nflips,flip[i]);

        am[a] = ama;
        am[b] = amb;
        am[c] = amc;
        am[d] = amd;
        switch_edge_back(flip[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1ab0, %rsp           # imm = 0x1AB0
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
cmpl $0x2, 0x101c5(%rip)     # 0x3c0b0
jne 0x2bf07
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
cmpl $0x0, -0xc(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edx
addl $0x2, %edx
callq 0x8080
cmpl $0x0, -0x24(%rbp)
jne 0x2bf2b
callq 0x2de50
leaq -0x610(%rbp), %rdi
leaq -0xbe0(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x2dee0
jmp 0x2bf56
leaq -0x610(%rbp), %rdi
leaq -0xbe0(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x20(%rbp), %r9
movq 0x10(%rbp), %rax
leaq -0x38(%rbp), %rsi
movq %rax, (%rsp)
callq 0x2e080
leaq -0x610(%rbp), %rdi
leaq -0xbe0(%rbp), %rsi
movl -0x38(%rbp), %edx
leaq -0x1a70(%rbp), %rcx
movl -0x4(%rbp), %r8d
callq 0x2e790
cmpl $0x1, 0x10132(%rip)     # 0x3c0b0
jne 0x2bf8e
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movl -0xc(%rbp), %edx
callq 0x2ea60
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x2c2d7
movslq -0x28(%rbp), %rax
cmpl $0x0, -0x1a70(%rbp,%rax,4)
jne 0x2bfb4
jmp 0x2c2c9
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rax
movl (%rax), %eax
movl %eax, -0x1a74(%rbp)
movslq -0x1a74(%rbp), %rcx
leaq 0x49acaa(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq %rax, -0x1a88(%rbp)
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1a78(%rbp)
movslq -0x1a78(%rbp), %rcx
leaq 0x49ac7c(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq %rax, -0x1a90(%rbp)
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1a7c(%rbp)
movslq -0x1a7c(%rbp), %rcx
leaq 0x49ac4a(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq %rax, -0x1a98(%rbp)
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1a80(%rbp)
movslq -0x1a80(%rbp), %rcx
leaq 0x49ac18(%rip), %rax    # 0x4c6c80
movq (%rax,%rcx,8), %rax
movq %rax, -0x1aa0(%rbp)
movq -0x1a88(%rbp), %rdx
movl -0x1a78(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
xorq $-0x1, %rax
andq %rax, %rdx
movslq -0x1a74(%rbp), %rcx
leaq 0x49abe1(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movq -0x1a90(%rbp), %rdx
movl -0x1a74(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
xorq $-0x1, %rax
andq %rax, %rdx
movslq -0x1a78(%rbp), %rcx
leaq 0x49abb1(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movq -0x1a98(%rbp), %rdx
movl -0x1a80(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq %rax, %rdx
movslq -0x1a7c(%rbp), %rcx
leaq 0x49ab85(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movq -0x1aa0(%rbp), %rdx
movl -0x1a7c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq %rax, %rdx
movslq -0x1a80(%rbp), %rcx
leaq 0x49ab59(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rdi
callq 0x23c60
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rdx
movslq -0xc(%rbp), %rcx
leaq 0x49ad2d(%rip), %rax    # 0x4c6e80
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2c192
movslq -0x2c(%rbp), %rcx
leaq 0x49ad0f(%rip), %rax    # 0x4c6e80
movq (%rax,%rcx,8), %rax
movslq -0x28(%rbp), %rcx
cmpq -0xbe0(%rbp,%rcx,8), %rax
jne 0x2c185
jmp 0x2c192
jmp 0x2c187
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2c15e
movl -0x2c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x2c1c5
movslq -0x28(%rbp), %rax
movq -0xbe0(%rbp,%rax,8), %rdx
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rcx
leaq 0x49acca(%rip), %rax    # 0x4c6e80
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2c1ce
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rdi
movl -0x3c(%rbp), %edx
leaq -0x1780(%rbp), %rcx
leaq 0x49ac95(%rip), %rsi    # 0x4c6e80
leaq -0x40(%rbp), %r8
callq 0x2f500
cmpl $0x0, -0x40(%rbp)
jle 0x2c254
leaq -0x1780(%rbp), %rdi
movl -0x40(%rbp), %esi
leaq 0x119f5(%rip), %rdx     # 0x3dc00
leaq 0x11aee(%rip), %rcx     # 0x3dd00
leaq -0x30(%rbp), %r8
leaq -0x34(%rbp), %r9
callq 0x244e0
cmpl $0x0, %eax
je 0x2c254
movl -0x30(%rbp), %edi
movl -0x34(%rbp), %esi
movl -0x3c(%rbp), %edx
leaq -0x610(%rbp), %rcx
leaq -0xbe0(%rbp), %r8
movl -0x38(%rbp), %r9d
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rax
movq %rax, (%rsp)
callq 0x2bec0
movq -0x1a88(%rbp), %rdx
movslq -0x1a74(%rbp), %rcx
leaq 0x49aa17(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movq -0x1a90(%rbp), %rdx
movslq -0x1a78(%rbp), %rcx
leaq 0x49a9fe(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movq -0x1a98(%rbp), %rdx
movslq -0x1a7c(%rbp), %rcx
leaq 0x49a9e5(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movq -0x1aa0(%rbp), %rdx
movslq -0x1a80(%rbp), %rcx
leaq 0x49a9cc(%rip), %rax    # 0x4c6c80
movq %rdx, (%rax,%rcx,8)
movslq -0x28(%rbp), %rax
movq -0x610(%rbp,%rax,8), %rdi
callq 0x24c40
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2bf95
addq $0x1ab0, %rsp           # imm = 0x1AB0
popq %rbp
retq