// File: eryxcc[P]lois/tests/autotest.cpp
// Function: analyzeStructure(std::vector<lois::term, std::allocator<lois::term>>&, lois::RelTree&, lois::lsetof<lois::term> const&, unsigned long, unsigned long)
void analyzeStructure(vector<term>& v, RelTree& tree, const lsetof<term>& A, size_t a=0, size_t b=0) {

  if(b>a) a=a+1, b=0;
  
  if(a == v.size()) {
    int i = 0;
    for(int j=1; j<a; j++) i = strindex[i][j];
    // cout << "possible tree structure: "; drawTree(v, i); cout << endl;
    numstruct++;
    return;
    }

  term lca = tree.lca(v[a], v[b]);

  {
 
    rbool psi = ftrue;
    for(size_t i=0; i<v.size(); i++) {
      If(psi && v[i] == lca) {
        strindex[a][b] = strindex[b][a] = i;
        analyzeStructure(v, tree, A, a, b+1);
        }
      psi = psi && (v[i] != lca);
      }

    If(psi) {
      strindex[a][b] = strindex[b][a] = v.size();
      v.push_back(lca);
      analyzeStructure(v, tree, A, a, b+1);
      v.pop_back();
      }
    }

  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x980d
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x111b0
movq %rax, %rcx
movq -0x1f0(%rbp), %rax
cmpq %rcx, %rax
jne 0x9883
movl $0x0, -0x2c(%rbp)
movl $0x1, -0x30(%rbp)
movslq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x986f
movslq -0x2c(%rbp), %rcx
leaq 0x9bb6d(%rip), %rax     # 0xa53c0
shlq $0x6, %rcx
addq %rcx, %rax
movslq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x983e
movl 0x9bf4b(%rip), %eax     # 0xa57c0
addl $0x1, %eax
movl %eax, 0x9bf42(%rip)     # 0xa57c0
jmp 0x9e59
movq -0x10(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x11190
movq %rax, -0x1f8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x11190
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
movq %rax, %rcx
leaq -0x40(%rbp), %rdi
callq 0x111d0
leaq -0x50(%rbp), %rdi
leaq 0x9bf5c(%rip), %rsi     # 0xa5830
callq 0x11030
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x8(%rbp), %rdi
callq 0x111b0
movq %rax, %rcx
movq -0x208(%rbp), %rax
cmpq %rcx, %rax
jae 0x9c42
leaq -0x98(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11030
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x11190
movq %rax, %rsi
leaq -0xa8(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x43290
jmp 0x993a
leaq -0x88(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x42150
jmp 0x9956
leaq -0x78(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x10ff0
jmp 0x9968
leaq -0x88(%rbp), %rdi
callq 0x11060
leaq -0xa8(%rbp), %rdi
callq 0x11060
leaq -0x98(%rbp), %rdi
callq 0x11060
leaq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x3ead0
jmp 0x99a6
movq -0x60(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x3eb60
jmp 0x99b8
jmp 0x99ba
leaq -0xe8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x11080
movb %al, -0x209(%rbp)
jmp 0x99d5
movb -0x209(%rbp), %al
testb $0x1, %al
jne 0x9abf
jmp 0x99e5
leaq -0x118(%rbp), %rdi
callq 0x110e0
leaq -0xe8(%rbp), %rdi
callq 0x110e0
leaq -0x78(%rbp), %rdi
callq 0x11120
jmp 0x9b6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9a5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9a51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x11060
leaq -0xa8(%rbp), %rdi
callq 0x11060
leaq -0x98(%rbp), %rdi
callq 0x11060
jmp 0x9e62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9b5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9b52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x110e0
jmp 0x9b52
leaq -0xe8(%rbp), %rdi
callq 0x110b0
movb %al, -0x20a(%rbp)
jmp 0x9ad3
movb -0x20a(%rbp), %al
andb $0x1, %al
movb %al, -0x119(%rbp)
testb $0x1, -0x119(%rbp)
jne 0x9aec
jmp 0x9b3d
movl -0x58(%rbp), %edx
movq -0x28(%rbp), %rsi
shlq $0x6, %rsi
leaq 0x9b8c2(%rip), %rax     # 0xa53c0
movq %rax, %rcx
addq %rsi, %rcx
movq -0x20(%rbp), %rsi
movl %edx, (%rcx,%rsi,4)
movq -0x20(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
incq %r8
callq 0x97d0
jmp 0x9b3b
jmp 0x9b3d
jmp 0x9b3f
leaq -0xe8(%rbp), %rdi
callq 0x3ea80
jmp 0x9b4d
jmp 0x99ba
leaq -0xe8(%rbp), %rdi
callq 0x110e0
leaq -0x78(%rbp), %rdi
callq 0x11120
jmp 0x9e62
leaq -0x140(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11030
movq -0x8(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x11190
movq %rax, %rsi
leaq -0x150(%rbp), %rdi
leaq -0x40(%rbp), %rdx
callq 0x433b0
jmp 0x9b9e
leaq -0x130(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x150(%rbp), %rdx
callq 0x42150
jmp 0x9bba
leaq -0x50(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x11290
leaq -0x130(%rbp), %rdi
callq 0x11060
leaq -0x150(%rbp), %rdi
callq 0x11060
leaq -0x140(%rbp), %rdi
callq 0x11060
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x98e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9c31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x11060
leaq -0x140(%rbp), %rdi
callq 0x11060
jmp 0x9e62
leaq -0x180(%rbp), %rdi
movq %rdi, -0x218(%rbp)
leaq -0x50(%rbp), %rsi
callq 0x11030
movq -0x218(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x10ff0
jmp 0x9c6e
leaq -0x180(%rbp), %rdi
callq 0x11060
leaq -0x170(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x3ead0
jmp 0x9c9d
movq -0x158(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x3eb60
jmp 0x9cb2
jmp 0x9cb4
leaq -0x1b0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x11080
movb %al, -0x219(%rbp)
jmp 0x9ccf
movb -0x219(%rbp), %al
testb $0x1, %al
jne 0x9d7c
jmp 0x9cdf
leaq -0x1e0(%rbp), %rdi
callq 0x110e0
leaq -0x1b0(%rbp), %rdi
callq 0x110e0
leaq -0x170(%rbp), %rdi
callq 0x11120
jmp 0x9e47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x11060
jmp 0x9e62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9e39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9e2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x110e0
jmp 0x9e2d
leaq -0x1b0(%rbp), %rdi
callq 0x110b0
movb %al, -0x21a(%rbp)
jmp 0x9d90
movb -0x21a(%rbp), %al
andb $0x1, %al
movb %al, -0x1e1(%rbp)
testb $0x1, -0x1e1(%rbp)
jne 0x9da9
jmp 0x9e18
movq -0x8(%rbp), %rdi
callq 0x111b0
movl %eax, %edx
movq -0x28(%rbp), %rsi
shlq $0x6, %rsi
leaq 0x9b5fd(%rip), %rax     # 0xa53c0
movq %rax, %rcx
addq %rsi, %rcx
movq -0x20(%rbp), %rsi
movl %edx, (%rcx,%rsi,4)
movq -0x20(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq -0x28(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x112c0
jmp 0x9df1
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
incq %r8
callq 0x97d0
jmp 0x9e0f
movq -0x8(%rbp), %rdi
callq 0x11330
jmp 0x9e1a
leaq -0x1b0(%rbp), %rdi
callq 0x3ea80
jmp 0x9e28
jmp 0x9cb4
leaq -0x1b0(%rbp), %rdi
callq 0x110e0
leaq -0x170(%rbp), %rdi
callq 0x11120
jmp 0x9e62
leaq -0x50(%rbp), %rdi
callq 0x11060
leaq -0x40(%rbp), %rdi
callq 0x11360
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x11060
leaq -0x40(%rbp), %rdi
callq 0x11360
movq -0xb0(%rbp), %rdi
callq 0x84d0