// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/filemanage.cc
// Function: FileManage::directoryList(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
void FileManage::directoryList(vector<string> &res,const string &dirname,bool allowdot)

{ // List full pathnames of all directories under the directory -dir-
  DIR *dir;
  struct dirent *entry;
  string dirfinal;

  dirfinal = dirname;
  if (dirfinal[dirfinal.size()-1] != separator)
    dirfinal += separator;

  dir = opendir(dirfinal.c_str());
  if (dir == (DIR *)0) return;
  entry = readdir(dir);
  while(entry != (struct dirent *)0) {
    if (entry->d_type == DT_DIR) {
      string fullname(entry->d_name);
      if ((fullname!=".")&&(fullname!="..")) {
	if (allowdot || (fullname[0] != '.'))
	  res.push_back( dirfinal + fullname );
      }
    }
    entry = readdir(dir);
  }
  closedir(dir);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, 0xc(%rsp)
movq %rdi, 0x30(%rsp)
leaq 0x20(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq $0x0, -0x8(%rbx)
movb $0x0, (%rbx)
leaq 0x10(%rsp), %rdi
callq 0x3fc60
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
movq 0x5250e(%rip), %rax     # 0xa2fd0
movb (%rax), %al
cmpb %al, -0x1(%rdi,%rcx)
je 0x50adc
movsbl %al, %esi
leaq 0x10(%rsp), %rdi
callq 0x40490
movq 0x10(%rsp), %rdi
callq 0x41620
testq %rax, %rax
je 0x50be3
movq %rax, %r15
movq %rax, %rdi
callq 0x41760
movq %rax, %r14
leaq 0x48(%rsp), %rbp
leaq 0x38(%rsp), %r12
leaq 0x58(%rsp), %r13
testq %r14, %r14
je 0x50bd6
cmpb $0x4, 0x12(%r14)
jne 0x50bc6
leaq 0x13(%r14), %rbx
movq %rbp, 0x38(%rsp)
movq %rbx, %rdi
callq 0x3f9e0
leaq (%r14,%rax), %rdx
addq $0x13, %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x3f8a0
movq %r12, %rdi
leaq 0x2f267(%rip), %rsi     # 0x7fdb0
callq 0x3f590
testl %eax, %eax
je 0x50baf
movq %r12, %rdi
leaq 0x2f253(%rip), %rsi     # 0x7fdaf
callq 0x3f590
testl %eax, %eax
je 0x50baf
cmpb $0x0, 0xc(%rsp)
jne 0x50b76
movq 0x38(%rsp), %rax
cmpb $0x2e, (%rax)
je 0x50baf
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x42390
movq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x3f7b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x50baf
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x40880
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x50bc6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x40880
movq %r15, %rdi
callq 0x41760
movq %rax, %r14
jmp 0x50b07
movq %r15, %rdi
callq 0x41960
leaq 0x20(%rsp), %rbx
movq 0x10(%rsp), %rdi
cmpq %rbx, %rdi
je 0x50bfa
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x50c4a
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x50c2f
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x50c2f
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x50c4d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x40880
jmp 0x50c4d
jmp 0x50c4a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x50c69
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x40880
movq %rbx, %rdi
callq 0x41f10
nop