// File: 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:
subq $0xf8, %rsp
movb %dl, %al
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
andb $0x1, %al
movb %al, 0xe7(%rsp)
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xdc610
movq 0x50(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0xce450
jmp 0x10a5a8
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xd5290
movq 0x40(%rsp), %rdi
movq %rax, %rsi
decq %rsi
callq 0xe2f50
movq %rax, 0x48(%rsp)
jmp 0x10a5d1
movq 0x48(%rsp), %rax
movsbl (%rax), %eax
movq 0xbd9f0(%rip), %rcx     # 0x1c7fd0
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x10a61b
movq 0xbd9e2(%rip), %rax     # 0x1c7fd0
movsbl (%rax), %esi
leaq 0xb0(%rsp), %rdi
callq 0xd46b0
jmp 0x10a600
jmp 0x10a61b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x10a87a
leaq 0xb0(%rsp), %rdi
callq 0xd1d80
movq %rax, %rdi
callq 0xdd9d0
movq %rax, 0x38(%rsp)
jmp 0x10a637
movq 0x38(%rsp), %rax
movq %rax, 0xd8(%rsp)
cmpq $0x0, 0xd8(%rsp)
jne 0x10a65f
movl $0x1, 0xa0(%rsp)
jmp 0x10a865
movq 0xd8(%rsp), %rdi
callq 0xde0c0
movq %rax, 0x30(%rsp)
jmp 0x10a673
movq 0x30(%rsp), %rax
movq %rax, 0xd0(%rsp)
cmpq $0x0, 0xd0(%rsp)
je 0x10a84b
movq 0xd0(%rsp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
jne 0x10a827
movq 0xd0(%rsp), %rax
addq $0x13, %rax
movq %rax, 0x20(%rsp)
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xe0c80
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0xe00a0
jmp 0x10a6dd
leaq 0x7f(%rsp), %rdi
callq 0xd8ec0
leaq 0x7d6be(%rip), %rsi     # 0x187dac
leaq 0x80(%rsp), %rdi
callq 0xd6530
movb %al, 0x1f(%rsp)
jmp 0x10a701
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x10a70e
jmp 0x10a809
leaq 0x7d696(%rip), %rsi     # 0x187dab
leaq 0x80(%rsp), %rdi
callq 0xd6530
movb %al, 0x1e(%rsp)
jmp 0x10a728
movb 0x1e(%rsp), %al
testb $0x1, %al
jne 0x10a735
jmp 0x10a809
testb $0x1, 0xe7(%rsp)
jne 0x10a768
xorl %eax, %eax
movl %eax, %esi
leaq 0x80(%rsp), %rdi
callq 0xe2f50
movq %rax, 0x10(%rsp)
jmp 0x10a757
movq 0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x10a807
movq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0xe28b0
jmp 0x10a791
movq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xd5950
jmp 0x10a7a2
leaq 0x58(%rsp), %rdi
callq 0xd4550
jmp 0x10a807
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x7f(%rsp), %rdi
callq 0xd8ec0
jmp 0x10a87a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x10a818
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xd4550
jmp 0x10a818
jmp 0x10a809
leaq 0x80(%rsp), %rdi
callq 0xd4550
jmp 0x10a827
leaq 0x80(%rsp), %rdi
callq 0xd4550
jmp 0x10a87a
movq 0xd8(%rsp), %rdi
callq 0xde0c0
movq %rax, (%rsp)
jmp 0x10a83a
movq (%rsp), %rax
movq %rax, 0xd0(%rsp)
jmp 0x10a680
movq 0xd8(%rsp), %rdi
callq 0xdee90
jmp 0x10a85a
movl $0x0, 0xa0(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0xd4550
addq $0xf8, %rsp
retq
leaq 0xb0(%rsp), %rdi
callq 0xd4550
movq 0xa8(%rsp), %rdi
callq 0xe0be0
nopw %cs:(%rax,%rax)