// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movl %ecx, %ebx
movl %esi, -0x1c(%rbp)
movslq %esi, %rax
movq 0x7c33(%rip), %rcx      # 0xa298
cmpl %edi, (%rcx,%rax,4)
jne 0x26bf
movq 0x7c17(%rip), %rax      # 0xa288
subq 0x7c08(%rip), %rax      # 0xa280
movq 0x7bc1(%rip), %rcx      # 0xa240
subq 0x7bb2(%rip), %rcx      # 0xa238
cmpq %rcx, %rax
jae 0x2844
leaq 0x7bd2(%rip), %rdi      # 0xa268
leaq 0x7bb3(%rip), %rsi      # 0xa250
callq 0x4f44
leaq 0x7bd7(%rip), %rdi      # 0xa280
leaq 0x7b88(%rip), %rsi      # 0xa238
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4f44
movl %edx, %r14d
movl %edi, %r15d
movq 0x7b74(%rip), %rax      # 0xa240
cmpq 0x7b75(%rip), %rax      # 0xa248
je 0x26e4
movl %esi, (%rax)
addq $0x4, %rax
movq %rax, 0x7b5e(%rip)      # 0xa240
jmp 0x26f7
leaq 0x7b4d(%rip), %rdi      # 0xa238
leaq -0x1c(%rbp), %rdx
movq %rax, %rsi
callq 0x548e
movslq -0x1c(%rbp), %rax
movq 0x7b06(%rip), %rcx      # 0xa208
leaq (%rax,%rax,2), %rax
movslq 0x7ba3(%rip), %rdx      # 0xa2b0
movq (%rcx,%rax,8), %rax
leaq (%rax,%rdx,4), %rdx
addq $-0x4, %rdx
movq 0x7b38(%rip), %rsi      # 0xa258
cmpq 0x7b39(%rip), %rsi      # 0xa260
je 0x273a
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x7b20(%rip)      # 0xa258
jmp 0x2746
leaq 0x7b0f(%rip), %rdi      # 0xa250
callq 0x548e
movslq -0x1c(%rbp), %rax
movq 0x7b47(%rip), %rcx      # 0xa298
movl %r15d, (%rcx,%rax,4)
movslq -0x1c(%rbp), %rax
movq 0x7a70(%rip), %rcx      # 0xa1d0
leaq (%rax,%rax,2), %rdx
movq (%rcx,%rdx,8), %rax
movq 0x8(%rcx,%rdx,8), %rcx
subq %rax, %rcx
cmpq $0x4, %rcx
jne 0x278d
movl (%rax), %esi
incl %r14d
movl %r15d, %edi
movl %r14d, %edx
movl %ebx, %ecx
callq 0x264c
jmp 0x2844
movslq 0x7b1c(%rip), %r14      # 0xa2b0
movslq -0x1c(%rbp), %rax
movq 0x7a69(%rip), %rcx      # 0xa208
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdx
movq 0x8(%rcx,%rax,8), %rax
subq %rdx, %rax
sarq $0x2, %rax
cmpq %r14, %rax
jbe 0x281e
leaq (,%r14,4), %r15
leaq 0x7a89(%rip), %rbx      # 0xa250
addq %r15, %rdx
movq 0x7a87(%rip), %rsi      # 0xa258
cmpq 0x7a88(%rip), %rsi      # 0xa260
je 0x27eb
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x7a6f(%rip)      # 0xa258
jmp 0x27f3
movq %rbx, %rdi
callq 0x548e
incq %r14
movslq -0x1c(%rbp), %rax
movq 0x7a07(%rip), %rcx      # 0xa208
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rdx
movq 0x8(%rcx,%rax,8), %rax
subq %rdx, %rax
sarq $0x2, %rax
addq $0x4, %r15
cmpq %r14, %rax
ja 0x27c7
leaq 0x7a43(%rip), %rdi      # 0xa268
leaq 0x7a24(%rip), %rsi      # 0xa250
callq 0x4f44
leaq 0x7a48(%rip), %rdi      # 0xa280
leaq 0x79f9(%rip), %rsi      # 0xa238
callq 0x4f44
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq