// File: /workspace/github_cpp_makefile_star2_O3/kingufl[P]Rmapper/graph_traverse.cpp
// Function: DFS(int, int, int, int)
void DFS(int source, int thisnode, int thislvl, int toplvl){


    if(nodestatus[thisnode]==source){
        if(longestpath.size()<thispath.size()){
            longestcontig=thiscontig;
            longestpath=thispath;
        }
        return;
    }

    thispath.push_back(thisnode);
    thiscontig.push_back(nodefrag[thisnode][kmersize-1]);
    nodestatus[thisnode]=source;

    int iterationcontigsize=thiscontig.size();

    if(graphf[thisnode].size()==1){
        DFS(source,graphf[thisnode][0],thislvl+1,toplvl);
    }
    else{
            for(int ii=kmersize;ii<nodefrag[thisnode].size();ii++){
                thiscontig.push_back(nodefrag[thisnode][ii]);
            }

            longestcontig=thiscontig;
            longestpath=thispath;
    }

//    for(int nextnode: graphf[thisnode]){
//
//
//
//        thispath.resize(thislvl);
//        thiscontig.resize(iterationcontigsize);
//
//    }

//    if(longestpath.size()<thispath.size()){
//
//
//    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %esi, -0x24(%rbp)
movslq %esi, %rcx
movq 0x7c2e(%rip), %rax      # 0xa298
cmpl %edi, (%rax,%rcx,4)
jne 0x26c6
movq 0x7c12(%rip), %rax      # 0xa288
subq 0x7c03(%rip), %rax      # 0xa280
movq 0x7bbc(%rip), %rcx      # 0xa240
subq 0x7bad(%rip), %rcx      # 0xa238
cmpq %rcx, %rax
jae 0x2857
leaq 0x7bcd(%rip), %rdi      # 0xa268
leaq 0x7bae(%rip), %rsi      # 0xa250
callq 0x4fb8
leaq 0x7bd2(%rip), %rdi      # 0xa280
leaq 0x7b83(%rip), %rsi      # 0xa238
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4fb8
movl %edx, %r14d
movl %edi, %r15d
movq 0x7b6d(%rip), %rax      # 0xa240
cmpq 0x7b6e(%rip), %rax      # 0xa248
je 0x26eb
movl %esi, (%rax)
addq $0x4, %rax
movq %rax, 0x7b57(%rip)      # 0xa240
jmp 0x2705
leaq 0x7b46(%rip), %rdi      # 0xa238
leaq -0x24(%rbp), %r12
movq %rax, %rsi
movq %r12, %rdx
callq 0x5536
movslq (%r12), %rcx
movq 0x7afc(%rip), %rax      # 0xa208
leaq (%rcx,%rcx,2), %rcx
movslq 0x7b99(%rip), %rdx      # 0xa2b0
movq (%rax,%rcx,8), %rax
leaq (%rax,%rdx,4), %rdx
addq $-0x4, %rdx
movq 0x7b2e(%rip), %rsi      # 0xa258
cmpq 0x7b2f(%rip), %rsi      # 0xa260
je 0x2744
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x7b16(%rip)      # 0xa258
jmp 0x2750
leaq 0x7b05(%rip), %rdi      # 0xa250
callq 0x5536
movslq -0x24(%rbp), %rax
movq 0x7b3d(%rip), %rcx      # 0xa298
movl %r15d, (%rcx,%rax,4)
movslq -0x24(%rbp), %rax
movq 0x7a66(%rip), %rdx      # 0xa1d0
leaq (%rax,%rax,2), %rcx
movq (%rdx,%rcx,8), %rax
movq 0x8(%rdx,%rcx,8), %rdx
subq %rax, %rdx
cmpq $0x4, %rdx
jne 0x2797
movl (%rax), %esi
incl %r14d
movl %r15d, %edi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x264c
jmp 0x2857
movslq 0x7b12(%rip), %r14      # 0xa2b0
movq 0x7a63(%rip), %rax      # 0xa208
movq (%rax,%rcx,8), %rdx
movq 0x8(%rax,%rcx,8), %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
cmpq %r14, %rcx
jbe 0x2831
movq 0x7a97(%rip), %rsi      # 0xa258
movq 0x7a98(%rip), %rcx      # 0xa260
leaq (,%r14,4), %r15
leaq 0x7a79(%rip), %rbx      # 0xa250
addq %r15, %rdx
cmpq %rcx, %rsi
je 0x27f0
movl (%rdx), %edx
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x7a6a(%rip)      # 0xa258
jmp 0x280d
movq %rbx, %rdi
callq 0x5536
movq 0x7a59(%rip), %rsi      # 0xa258
movq 0x7a5a(%rip), %rcx      # 0xa260
movq 0x79fb(%rip), %rax      # 0xa208
incq %r14
movslq -0x24(%rbp), %rdx
leaq (%rdx,%rdx,2), %rdi
movq (%rax,%rdi,8), %rdx
movq 0x8(%rax,%rdi,8), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
addq $0x4, %r15
cmpq %r14, %rdi
ja 0x27d7
leaq 0x7a30(%rip), %rdi      # 0xa268
leaq 0x7a11(%rip), %rsi      # 0xa250
callq 0x4fb8
leaq 0x7a35(%rip), %rdi      # 0xa280
leaq 0x79e6(%rip), %rsi      # 0xa238
callq 0x4fb8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq