// File: /workspace/github_cpp_makefile_star2_O3/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 0xb4b7(%rip), %rcx      # 0x10fc8
movq %rsp, %rsi
xorl %edx, %edx
callq 0x2040
movl %eax, %ebp
movq (%r14), %rdx
leaq 0x7629(%rip), %rsi      # 0xd150
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2360
cmpl $0x2, %ebp
jg 0x5b54
leaq 0x761c(%rip), %rdi      # 0xd159
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2460
jmp 0x5cd5
movl %ebp, %r12d
leaq 0x1(%r12), %r13
leaq 0x75f2(%rip), %r15      # 0xd155
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
ja 0x5b63
leaq 0x75cc(%rip), %rdi      # 0xd159
movl $0x3, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x2460
cmpl $0x3, %ebp
jl 0x5cd5
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 0x5cc8
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 0x754b(%rip), %rsi      # 0xd13e
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 0x5c30
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5c37
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 0x5c6b
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 0x5af3
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5cb1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5cc8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
decq %r12
cmpq $0x3, %r12
ja 0x5bba
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5ceb
movq %rax, %rbx
jmp 0x5d23
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5d3a
movq 0x18(%rsp), %rsi
jmp 0x5d32
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x5d23
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5d3a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2400