// File: /workspace/github_c_makefile_star2_O3/pwelke[P]GraphMiningTools/cactustree.c
// Function: processRootTree
struct Characteristics *processRootTree(struct Vertex *root, struct Graph *graph, struct ShallowGraph **rootedComponents, struct Graph *pattern, struct GraphPool *gPool, struct ShallowGraphPool *sgPool){
    struct VertexList *ehlp;
    struct VertexList **deletedEdges;
    struct Characteristics *chars=NULL, *newChars, *res;
    int numComponents, treeNumber=0;
    char exNext;
    root->visited=root->visited | 1;
    for(ehlp=root->neighborhood;ehlp;ehlp=ehlp->next){
        if(1^(ehlp->endPoint->visited)){
            res=processRootTree(ehlp->endPoint, graph, rootedComponents, pattern, gPool, sgPool);
            if(hasSolution(res)){
                freeCharacteristics(chars);
                return res;
            }
            chars=mergeCharacteristics(chars,res);
        }
    }
    //printf("root tree %i", root->number);
    //printCharacteristics(chars);

    numComponents=rootedComponents[root->number]->data;
    deletedEdges=malloc(numComponents*sizeof(struct VertexList *));
    newChars=NULL;
    initSpanningTree(rootedComponents[root->number], deletedEdges,1);
    treeNumber=0;
    do{
        newChars=processComponentTree(graph, graph->vertices[root->d], graph->vertices[root->d], treeNumber, rootedComponents, chars, newChars, pattern, gPool, sgPool);
        exNext=nextSpanningTree(rootedComponents[root->number], deletedEdges,1);
        ++treeNumber;
    }while(exNext);
    freeCharacteristics(chars);
    free(deletedEdges);
    return newChars;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbp
orb $0x1, 0x1c(%rdi)
movq 0x8(%rdi), %r14
xorl %ebx, %ebx
testq %r14, %r14
je 0x40ec
movq $0x0, 0x8(%rsp)
movq %rdx, 0x28(%rsp)
movq %rbp, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%r14), %rdi
cmpl $0x1, 0x1c(%rdi)
je 0x40d3
movq %rcx, %r13
movq %r8, %rbp
movq %r9, %r12
callq 0x401f
movq %rax, %r15
testq %rax, %rax
movq 0x8(%rsp), %rdi
je 0x40ae
movq %r15, %rax
movslq 0x4(%rax), %rcx
testq %rcx, %rcx
jle 0x40a5
movq 0x8(%rax), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %r8
cmpq $0x0, (%r8,%rsi,8)
jne 0x40e2
incq %rsi
cmpq %rsi, %rcx
jne 0x4092
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x4083
movq %r15, %rsi
callq 0x427b
movq %rax, 0x8(%rsp)
movq %r12, %r9
movq %rbp, %r8
movq %r13, %rcx
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rbp
movq 0x18(%rsp), %rsi
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x405b
jmp 0x40f5
callq 0x41e4
jmp 0x419f
movq $0x0, 0x8(%rsp)
movq %rcx, 0x30(%rsp)
movq %r8, 0x38(%rsp)
movq %r9, 0x40(%rsp)
movslq 0x18(%rbp), %rax
movq (%rdx,%rax,8), %r15
movslq 0x28(%r15), %rdi
shlq $0x3, %rdi
movq %rdx, %r12
movq %rsi, %r13
callq 0x1190
movq %r15, %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rsi
movl $0x1, %edx
callq 0x43d0
xorl %r15d, %r15d
movq 0x8(%rsp), %r14
movq 0x10(%r13), %rax
movslq 0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq %r13, %rdi
movq %rdx, %rsi
movl %ebx, %ecx
movq %r12, %r8
movq %r14, %r9
pushq 0x40(%rsp)
pushq 0x40(%rsp)
pushq 0x40(%rsp)
pushq %r15
callq 0x4466
addq $0x20, %rsp
movq %rax, %r15
movslq 0x18(%rbp), %rax
movq (%r12,%rax,8), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x4614
incl %ebx
testb %al, %al
jne 0x413c
movq %r14, %rdi
callq 0x41e4
movq 0x10(%rsp), %rdi
callq 0x1030
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq