// File: /workspace/github_cpp_makefile_star2_O1/girdhari9[P]TEXPLORER/cmd_functions.cpp
// Function: snapshot(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, _IO_FILE*)
void snapshot(string current_path,FILE *file_pointer){
    struct dirent ** dir_namelist;
    int n = scandir(current_path.c_str(),&dir_namelist,NULL, alphasort);
    int x = n;
    fprintf(file_pointer,"%s\n\n",current_path.c_str());
    while(n--){
        if(n<2) break;
        fprintf(file_pointer,"%s\t",dir_namelist[n]->d_name);
    }
    fprintf(file_pointer,"\n\n\n");
    while(x--){
        if(x<2) break;
        else if(dir_namelist[x]->d_type == 4){
            string new_current_path = current_path + "/" + dir_namelist[x]->d_name;
            snapshot(new_current_path,file_pointer);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0xb517(%rip), %rcx      # 0x10fc8
movq %rsp, %rsi
xorl %edx, %edx
callq 0x2040
movl %eax, %ebp
movq (%r14), %rdx
leaq 0x7659(%rip), %rsi      # 0xd120
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2360
movl %ebp, %r12d
cmpl $0x3, %ebp
jl 0x5b08
leaq 0x1(%r12), %r13
leaq 0x7640(%rip), %r15      # 0xd125
movq (%rsp), %rax
movq -0x10(%rax,%r13,8), %rdx
addq $0x13, %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2360
decq %r13
cmpq $0x3, %r13
jg 0x5ae5
leaq 0x761a(%rip), %rdi      # 0xd129
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2460
cmpl $0x3, %ebp
jl 0x5c57
leaq 0x38(%rsp), %rbp
incq %r12
leaq 0x8(%rsp), %r15
leaq 0x48(%rsp), %r13
movq (%rsp), %rax
movq -0x10(%rax,%r12,8), %rax
cmpb $0x4, 0x12(%rax)
jne 0x5c4a
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2aec
movq %r15, %rdi
leaq 0x7599(%rip), %rsi      # 0xd10e
callq 0x2450
movq (%rsp), %rax
movq -0x10(%rax,%r12,8), %rsi
addq $0x13, %rsi
movq %r15, %rdi
callq 0x2450
movq %rbp, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5bb2
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5bb9
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5bed
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x2aec
movq %r13, %rdi
movq %rbx, %rsi
callq 0x5a93
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5c33
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5c4a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
decq %r12
cmpq $0x3, %r12
jg 0x5b3c
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5c6d
movq %rax, %rbx
jmp 0x5ca5
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5cbc
movq 0x18(%rsp), %rsi
jmp 0x5cb4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5ca5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5cbc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2400