// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1aa8, %rsp           # imm = 0x1AA8
movl %r9d, %r12d
movq %r8, %r13
movq %rcx, %rbp
movq %rdx, 0x10(%rsp)
movl %esi, 0x20(%rsp)
movl %edi, 0x8(%rsp)
cmpl $0x2, 0xb0f8(%rip)      # 0x240a0
jne 0x18fc1
xorl %edx, %edx
cmpl $0x1, 0x10(%rsp)
adcl $0x2, %edx
movl 0x8(%rsp), %edi
movl 0x20(%rsp), %esi
callq 0x658a
testl %r12d, %r12d
je 0x195bc
movq 0x1ae0(%rsp), %rsi
xorl %eax, %eax
cmpl $0x3, 0xb1cd(%rip)      # 0x241a8
sete %al
movl 0xb09c(%rip), %edx      # 0x24080
leal 0x1(%rdx), %ecx
movl %ecx, 0xb093(%rip)      # 0x24080
cmpl $0x7530, %edx           # imm = 0x7530
jl 0x1901e
pushq $0x1
popq %rcx
movl $0x1, 0xb07e(%rip)      # 0x24080
xorl %edx, %edx
leaq 0x26fc15(%rip), %rdi    # 0x288c20
cmpq $0x100, %rdx            # imm = 0x100
je 0x1901e
andl $0x0, (%rdx,%rdi)
addq $0x4, %rdx
jmp 0x1900b
addl $0x3, %eax
movslq (%rsi), %rbx
leaq 0x26fbf5(%rip), %rdx    # 0x288c20
movl %ecx, (%rdx,%rbx,4)
movslq 0x4(%rsi), %r9
movl %ecx, (%rdx,%r9,4)
movq 0x10(%rsi), %rdi
movslq 0x4(%rdi), %r8
movl %ecx, (%rdx,%r8,4)
movq 0x18(%rsi), %rdi
movslq 0x4(%rdi), %rdi
movq %rdi, 0x18(%rsp)
movl %ecx, (%rdx,%rdi,4)
xorl %r10d, %r10d
testl %r12d, %r12d
cmovlel %r10d, %r12d
xorl %r15d, %r15d
cmpq %r10, %r12
je 0x190a1
movq (%rbp,%r10,8), %r11
movslq (%r11), %r14
cmpl %ecx, (%rdx,%r14,4)
je 0x1909c
movslq 0x4(%r11), %r14
cmpl %ecx, (%rdx,%r14,4)
je 0x1909c
movq (%r13,%r10,8), %r14
cmpq %rsi, %r14
je 0x1909c
movslq %r15d, %r15
movq %r11, 0x930(%rsp,%r15,8)
movq %r14, 0x360(%rsp,%r15,8)
incl %r15d
incq %r10
jmp 0x1905f
leaq 0xcb38(%rip), %rsi      # 0x25be0
movl (%rsi,%rbx,4), %r10d
cmpl %eax, %r10d
jge 0x1969b
movq %r15, %r13
movl (%rsi,%r9,4), %r10d
cmpl %eax, %r10d
jge 0x1972c
movl (%rsi,%r8,4), %r9d
cmpl %eax, %r9d
jge 0x197bb
movq 0x18(%rsp), %rdi
movl (%rsi,%rdi,4), %r8d
cmpl %eax, %r8d
jge 0x19841
cmpl $0x1, 0x8(%rsp)
jne 0x1910f
xorl %ecx, %ecx
testl %r13d, %r13d
movl $0x0, %eax
cmovgl %r13d, %eax
cmpq %rcx, %rax
je 0x191e4
movl $0x1, 0x70(%rsp,%rcx,4)
incq %rcx
jmp 0x190f9
movl 0x2294ef(%rip), %eax    # 0x242604
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
leaq 0xcbbd(%rip), %rdx      # 0x25ce0
cmpq %rcx, %rax
je 0x19137
movq (%rdx), %rsi
movl %ecx, 0x34(%rsi)
incq %rcx
addq $0x8, %rdx
jmp 0x19123
movslq 0x8(%rsp), %rax
imulq $0xba0, %rax, %rcx      # imm = 0xBA0
leaq 0xcb96(%rip), %rdx      # 0x25ce0
movl 0xaf2c(%rip), %eax      # 0x2407c
leal 0x2(%rax), %esi
movl %esi, 0xaf23(%rip)      # 0x2407c
cmpl $0x752f, %eax           # imm = 0x752F
jl 0x19189
movl $0x2, 0xaf12(%rip)      # 0x2407c
pushq $0x30
popq %rax
pushq $0x2
popq %rsi
leaq 0x229499(%rip), %rdi    # 0x242610
cmpq $0x46630, %rax          # imm = 0x46630
je 0x19189
andl $0x0, (%rax,%rdi)
addq $0x40, %rax
jmp 0x19177
addq %rdx, %rcx
xorl %edi, %edi
testl %r13d, %r13d
movl $0x0, %eax
cmovgl %r13d, %eax
cmpq %rax, %rdi
je 0x191e4
movq 0x930(%rsp,%rdi,8), %r8
movslq 0x34(%r8), %r8
movq (%rdx,%r8,8), %r9
cmpl %esi, 0x30(%r9)
jne 0x191bf
andl $0x0, 0x70(%rsp,%rdi,4)
incq %rdi
jmp 0x1919a
leaq (%rdx,%r8,8), %r8
movl $0x1, 0x70(%rsp,%rdi,4)
cmpq %rcx, %r8
jae 0x191ba
movq (%r8), %r9
movq 0x28(%r9), %r9
movl %esi, 0x30(%r9)
addq $0xba0, %r8             # imm = 0xBA0
jmp 0x191cb
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x1927d
cmpl $0x0, 0x70(%rsp,%rcx,4)
je 0x19275
movq 0x360(%rsp,%rcx,8), %rdx
movq 0x10(%rdx), %rsi
movq 0x18(%rdx), %rdx
movslq 0x4(%rdx), %r10
movslq 0x4(%rsi), %rsi
movq 0x930(%rsp,%rcx,8), %rdx
movslq (%rdx), %r9
movslq 0x4(%rdx), %r8
leaq 0xc9bc(%rip), %r11      # 0x25be0
movl (%r11,%r9,4), %edx
movl (%r11,%r8,4), %edi
addl %edi, %edx
addl $-0x2, %edx
movl (%r11,%rsi,4), %edi
addl (%r11,%r10,4), %edi
cmpl %edx, %edi
jl 0x19270
cmpl %r9d, %r10d
sete %r11b
cmpl %r8d, %r10d
sete %r10b
orb %r11b, %r10b
movzbl %r10b, %r10d
cmpl %r9d, %esi
sete %r9b
cmpl %r8d, %esi
sete %sil
orb %r9b, %sil
movzbl %sil, %esi
addl %r10d, %esi
subl %esi, %edi
cmpl %edx, %edi
jge 0x19275
andl $0x0, 0x70(%rsp,%rcx,4)
incq %rcx
jmp 0x191e6
movq %r13, 0x38(%rsp)
cmpl $0x1, 0xae17(%rip)      # 0x240a0
jne 0x1929d
movl 0x8(%rsp), %edi
movl 0x20(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x19a50
movq 0x10(%rsp), %rax
movslq %eax, %rcx
movq %rcx, 0x48(%rsp)
leal 0x1(%rax), %ecx
movl %ecx, 0x2c(%rsp)
movslq %ecx, %rcx
movq %rcx, 0x40(%rsp)
leal 0x2(%rax), %ecx
movl %ecx, 0x28(%rsp)
xorl %r13d, %r13d
testl %eax, %eax
movl $0x0, %ebx
cmovgl %eax, %ebx
movq 0x38(%rsp), %rax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, 0x50(%rsp)
leaq 0x495978(%rip), %r14    # 0x4aec60
cmpq 0x50(%rsp), %r13
je 0x195aa
cmpl $0x0, 0x70(%rsp,%r13,4)
je 0x19587
movq 0x930(%rsp,%r13,8), %rbp
movslq (%rbp), %rdx
movq (%r14,%rdx,8), %rsi
movslq 0x4(%rbp), %rdi
movq (%r14,%rdi,8), %r8
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
movslq 0x4(%rax), %r15
movq (%r14,%r15,8), %r9
movslq 0x4(%rcx), %r12
movq (%r14,%r12,8), %rcx
movq %rsi, 0x20(%rsp)
movq %rsi, %rax
btrq %rdi, %rax
movq %rax, (%r14,%rdx,8)
movq %r8, 0x68(%rsp)
movq %r8, %rax
movq %rdx, 0x8(%rsp)
btrq %rdx, %rax
movq %rdi, 0x18(%rsp)
movq %rax, (%r14,%rdi,8)
movq %r9, 0x60(%rsp)
movq %r9, %rax
btsq %r12, %rax
movq %rax, (%r14,%r15,8)
movq %rcx, 0x58(%rsp)
movq %rcx, %rax
btsq %r15, %rax
movq %rax, (%r14,%r12,8)
movq %rbp, %rdi
callq 0x15561
movq 0x48(%rsp), %rax
leaq 0x495ad3(%rip), %rcx    # 0x4aee60
movq %rbp, (%rcx,%rax,8)
xorl %eax, %eax
cmpq %rax, %rbx
je 0x193ae
movq (%rcx), %rdx
cmpq 0x360(%rsp,%r13,8), %rdx
je 0x193b0
incq %rax
addq $0x8, %rcx
jmp 0x19393
movl %ebx, %eax
movl 0x2c(%rsp), %r11d
cmpl 0x10(%rsp), %eax
jne 0x193d8
movq 0x360(%rsp,%r13,8), %rax
movq 0x40(%rsp), %rcx
leaq 0x495a91(%rip), %rdx    # 0x4aee60
movq %rax, (%rdx,%rcx,8)
movl 0x28(%rsp), %r11d
movq 0x10(%rbp), %rax
movq 0x18(%rbp), %rcx
movslq 0x4(%rax), %rax
leaq 0xc7f5(%rip), %rsi      # 0x25be0
movslq (%rsi,%rax,4), %rdx
movslq 0x4(%rcx), %rax
movslq (%rsi,%rax,4), %rax
addq %rdx, %rax
shlq $0x14, %rax
movslq (%rbp), %rcx
movslq (%rsi,%rcx,4), %rcx
movslq 0x4(%rbp), %rdx
movslq (%rsi,%rdx,4), %rsi
movq %rsi, %rdx
shlq $0xa, %rdx
addq %rcx, %rdx
leaq (%rdx,%rax), %rdi
shlq $0xa, %rcx
addq %rsi, %rcx
addq %rcx, %rax
cmpq %rax, %rdi
cmovlq %rdi, %rax
xorl %esi, %esi
cmpq %rcx, %rdx
jg 0x1943f
movq %rbp, 0xf00(%rsp)
pushq $0x1
popq %rsi
cmpq %rdx, %rcx
jle 0x1958f
movl %r11d, %ecx
movl %ecx, %edx
leaq 0x495a0c(%rip), %rdi    # 0x4aee60
leaq (%rdi,%rdx,8), %rdi
addq $-0x8, %rdi
testl %ecx, %ecx
jle 0x194f3
movq (%rdi), %rdx
decl %ecx
addq $-0x8, %rdi
cmpq %rbp, %rdx
je 0x1945c
movq 0x10(%rdx), %rdi
movq 0x18(%rdx), %r8
movslq 0x4(%rdi), %rdi
leaq 0xc75b(%rip), %r10      # 0x25be0
movslq (%r10,%rdi,4), %rdi
movslq 0x4(%r8), %r8
movslq (%r10,%r8,4), %r8
addq %rdi, %r8
shlq $0x14, %r8
movslq (%rdx), %rdi
movslq (%r10,%rdi,4), %rdi
movslq 0x4(%rdx), %r9
movslq (%r10,%r9,4), %r10
movq %r10, %r9
shlq $0xa, %r9
addq %rdi, %r9
addq %r8, %r9
cmpq %rax, %r9
jl 0x19551
shlq $0xa, %rdi
addq %r10, %rdi
addq %r8, %rdi
cmpq %rax, %rdi
jl 0x19551
cmpq %rax, %r9
jne 0x194e2
movslq %esi, %r8
incl %esi
movq %rdx, 0xf00(%rsp,%r8,8)
cmpq %rax, %rdi
jne 0x1944b
movslq %esi, %rdi
jmp 0x19597
testl %esi, %esi
jle 0x19551
leaq 0xf00(%rsp), %rdi
leaq 0x34(%rsp), %rdx
leaq 0x30(%rsp), %rcx
movq %r12, %r14
movq %r15, %r12
movl %r11d, %r15d
callq 0x15978
movl %r15d, %edx
movq %r12, %r15
movq %r14, %r12
leaq 0x495739(%rip), %r14    # 0x4aec60
testl %eax, %eax
je 0x19551
movl 0x34(%rsp), %edi
movl 0x30(%rsp), %esi
movq %rbp, (%rsp)
leaq 0x930(%rsp), %rcx
leaq 0x360(%rsp), %r8
movq 0x38(%rsp), %r9
callq 0x18f7a
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, (%r14,%rax,8)
movq 0x18(%rsp), %rax
movq 0x68(%rsp), %rcx
movq %rcx, (%r14,%rax,8)
movq 0x60(%rsp), %rax
movq %rax, (%r14,%r15,8)
movq 0x58(%rsp), %rax
movq %rax, (%r14,%r12,8)
movq %rbp, %rdi
callq 0x15fb3
incq %r13
jmp 0x192e8
movl %esi, %edi
movq %rbp, %rdx
movl %r11d, %ecx
incl %esi
movq 0x20(%rdx), %rdx
movq %rdx, 0xf00(%rsp,%rdi,8)
jmp 0x1944b
addq $0x1aa8, %rsp           # imm = 0x1AA8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x22903e(%rip), %eax    # 0x242600
xorl %esi, %esi
testl %eax, %eax
cmovlel %esi, %eax
leaq 0xc410(%rip), %rcx      # 0x259e0
leaq 0x495689(%rip), %rdx    # 0x4aec60
cmpq %rax, %rsi
je 0x19600
movq (%rcx,%rsi,8), %rdi
movq %rdi, %r9
xorl %r8d, %r8d
movb 0x4(%r9), %r10b
btsq %r10, %r8
movq 0x18(%r9), %r9
cmpq %rdi, %r9
jne 0x195e6
movq %r8, (%rdx,%rsi,8)
incq %rsi
jmp 0x195d7
xorl %esi, %esi
cmpl $0x3, 0xab9f(%rip)      # 0x241a8
sete %sil
addl $0x3, %esi
xorl %edi, %edi
leaq 0xc5c7(%rip), %r8       # 0x25be0
xorl %r13d, %r13d
cmpq %rax, %rdi
je 0x190e4
movl (%r8,%rdi,4), %r9d
cmpl %esi, %r9d
jge 0x19633
incq %rdi
jmp 0x1961c
leaq (%rcx,%rdi,8), %r10
subl $0x1, %r9d
jb 0x1962e
movq (%r10), %r10
cmpq 0x28(%r10), %r10
jne 0x19695
movslq 0x4(%r10), %r11
cmpl %esi, (%r8,%r11,4)
jl 0x19695
movq 0x10(%r10), %r11
movq 0x18(%r10), %rbx
movslq 0x4(%rbx), %rbx
movq (%rdx,%rbx,8), %r14
movl 0x4(%r11), %r11d
btq %r11, %r14
jae 0x19695
leaq (%rcx,%rbx,8), %r14
movq (%r14), %rbx
leaq 0x18(%rbx), %r14
cmpl %r11d, 0x4(%rbx)
jne 0x1966e
movslq %r13d, %r13
movq %r10, 0x930(%rsp,%r13,8)
movq 0x28(%rbx), %r11
movq %r11, 0x360(%rsp,%r13,8)
incl %r13d
addq $0x18, %r10
jmp 0x19637
leaq 0xc33e(%rip), %r11      # 0x259e0
leaq (%r11,%rbx,8), %rbx
leaq 0x4955b3(%rip), %r14    # 0x4aec60
movq %r15, %r13
subl $0x1, %r10d
jb 0x190b8
movq %r13, %rdi
movq (%rbx), %rbx
movslq 0x4(%rbx), %r13
cmpl %eax, (%rsi,%r13,4)
jl 0x19723
movq 0x28(%rbx), %r12
cmpq %r12, %rbx
je 0x196d9
cmpl %ecx, (%rdx,%r13,4)
je 0x19723
movq 0x10(%rbx), %r13
movq 0x18(%rbx), %r15
movslq 0x4(%r15), %r15
movq (%r14,%r15,8), %rbp
movl 0x4(%r13), %r13d
btq %r13, %rbp
jae 0x19723
leaq (%r11,%r15,8), %r15
movq (%r15), %rbp
leaq 0x18(%rbp), %r15
cmpl %r13d, 0x4(%rbp)
jne 0x196f7
movq %rdi, %r13
movslq %r13d, %r13
movq %r12, 0x930(%rsp,%r13,8)
movq 0x28(%rbp), %r15
movq %r15, 0x360(%rsp,%r13,8)
incl %r13d
jmp 0x19726
movq %rdi, %r13
addq $0x18, %rbx
jmp 0x196b0
leaq 0xc2ad(%rip), %r11      # 0x259e0
leaq (%r11,%r9,8), %r9
leaq 0x495522(%rip), %rbx    # 0x4aec60
subl $0x1, %r10d
jb 0x190c5
movq (%r9), %r9
movslq 0x4(%r9), %r12
cmpl %eax, (%rsi,%r12,4)
jl 0x197b5
movq 0x28(%r9), %r14
cmpq %r14, %r9
je 0x19764
cmpl %ecx, (%rdx,%r12,4)
je 0x197b5
movq %r13, %rdi
movq 0x10(%r9), %r12
movq 0x18(%r9), %r15
movslq 0x4(%r15), %r15
movq (%rbx,%r15,8), %r13
movl 0x4(%r12), %r12d
btq %r12, %r13
jae 0x197b2
leaq (%r11,%r15,8), %r15
movq (%r15), %r13
leaq 0x18(%r13), %r15
cmpl %r12d, 0x4(%r13)
jne 0x19786
movslq %edi, %rdi
movq %r14, 0x930(%rsp,%rdi,8)
movq 0x28(%r13), %r14
movq %rdi, %r13
movq %r14, 0x360(%rsp,%rdi,8)
incl %r13d
jmp 0x197b5
movq %rdi, %r13
addq $0x18, %r9
jmp 0x1973e
leaq 0xc21e(%rip), %r10      # 0x259e0
leaq (%r10,%r8,8), %r8
leaq 0x495493(%rip), %r11    # 0x4aec60
subl $0x1, %r9d
jb 0x190d2
movq (%r8), %r8
movslq 0x4(%r8), %r14
cmpl %eax, (%rsi,%r14,4)
jl 0x1983b
movq 0x28(%r8), %rbx
cmpq %rbx, %r8
je 0x197f3
cmpl %ecx, (%rdx,%r14,4)
je 0x1983b
movq 0x10(%r8), %r14
movq 0x18(%r8), %r15
movslq 0x4(%r15), %r15
movq (%r11,%r15,8), %r12
movl 0x4(%r14), %r14d
btq %r14, %r12
jae 0x1983b
leaq (%r10,%r15,8), %r15
movq (%r15), %r12
leaq 0x18(%r12), %r15
cmpl %r14d, 0x4(%r12)
jne 0x19811
movslq %r13d, %r13
movq %rbx, 0x930(%rsp,%r13,8)
movq 0x28(%r12), %rbx
movq %rbx, 0x360(%rsp,%r13,8)
incl %r13d
addq $0x18, %r8
jmp 0x197cd
leaq 0xc198(%rip), %r9       # 0x259e0
leaq (%r9,%rdi,8), %rdi
leaq 0x49540d(%rip), %r10    # 0x4aec60
subl $0x1, %r8d
jb 0x190e4
movq (%rdi), %rdi
movslq 0x4(%rdi), %rbx
cmpl %eax, (%rsi,%rbx,4)
jl 0x198bb
movq 0x28(%rdi), %r11
cmpq %r11, %rdi
je 0x19877
cmpl %ecx, (%rdx,%rbx,4)
je 0x198bb
movq 0x10(%rdi), %rbx
movq 0x18(%rdi), %r14
movslq 0x4(%r14), %r14
movq (%r10,%r14,8), %r15
movl 0x4(%rbx), %ebx
btq %rbx, %r15
jae 0x198bb
leaq (%r9,%r14,8), %r15
movq (%r15), %r14
leaq 0x18(%r14), %r15
cmpl %ebx, 0x4(%r14)
jne 0x19894
movslq %r13d, %r13
movq %r11, 0x930(%rsp,%r13,8)
movq 0x28(%r14), %r11
movq %r11, 0x360(%rsp,%r13,8)
incl %r13d
addq $0x18, %rdi
jmp 0x19853