// File: jsteemann[P]jshund/src/./DirectoryIterator.h
// Function: jshund::DirectoryIterator::addDir(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>>)
void addDir (std::vector<std::string>& files, std::string path) {
        static const char separator = '/';

        if (! path.empty() && path[path.size() - 1] == separator) {
          // strip end separator
          path = path.substr(0, path.size() - 1);
        }

        DIR* dh = ::opendir(path.c_str()); 

        if (dh == 0) {
          return;
        }

        struct dirent* d;
        while ((d = ::readdir(dh))) {
          if (d->d_type == DT_REG) {
            std::ostringstream filename;
            filename << path << separator << d->d_name;
            files.push_back(filename.str());
          }
          else if (d->d_type == DT_DIR) {
            std::string name(d->d_name);

            if (name == ".." || name == ".") {
              continue;
            }

            std::ostringstream filename;
            filename << path << separator << name; 
            addDir(files, filename.str().c_str());
          } 
        }

        ::closedir(dh);
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdx, -0x3f0(%rbp)
movq %rdi, %rax
movq -0x3f0(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3e0(%rbp)
callq 0x3420
testb $0x1, %al
jne 0x456a
movq -0x3e8(%rbp), %rdi
callq 0x31b0
movq -0x3e8(%rbp), %rdi
movq %rax, %rsi
subq $0x1, %rsi
callq 0x34a0
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x456a
movq -0x3e8(%rbp), %rdi
callq 0x31b0
movq -0x3e8(%rbp), %rsi
movq %rax, %rcx
subq $0x1, %rcx
leaq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x3280
movq -0x3e8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x3330
leaq -0x38(%rbp), %rdi
callq 0x3170
movq -0x3e8(%rbp), %rdi
callq 0x3100
movq %rax, %rdi
callq 0x33c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x458e
jmp 0x4956
jmp 0x4590
movq -0x40(%rbp), %rdi
callq 0x33d0
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x494d
movq -0x48(%rbp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x8, %eax
jne 0x46ac
leaq -0x1c0(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0x3370
movq -0x400(%rbp), %rdi
movq -0x3e8(%rbp), %rsi
callq 0x3220
movq %rax, -0x3f8(%rbp)
jmp 0x45e7
movq -0x3f8(%rbp), %rdi
movl $0x2f, %esi
callq 0x3320
movq %rax, -0x408(%rbp)
jmp 0x4601
movq -0x408(%rbp), %rdi
movq -0x48(%rbp), %rsi
addq $0x13, %rsi
callq 0x3240
jmp 0x4617
movq -0x10(%rbp), %rax
movq %rax, -0x410(%rbp)
leaq -0x1f0(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x3270
jmp 0x4637
movq -0x410(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x4430
jmp 0x464c
leaq -0x1f0(%rbp), %rdi
callq 0x3170
leaq -0x1c0(%rbp), %rdi
callq 0x30a0
jmp 0x4948
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x469b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x3170
leaq -0x1c0(%rbp), %rdi
callq 0x30a0
jmp 0x495f
movq -0x48(%rbp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
jne 0x4946
movq -0x48(%rbp), %rax
addq $0x13, %rax
movq %rax, -0x420(%rbp)
leaq -0x211(%rbp), %rdi
movq %rdi, -0x418(%rbp)
callq 0x3470
movq -0x420(%rbp), %rsi
movq -0x418(%rbp), %rdx
leaq -0x210(%rbp), %rdi
callq 0x4060
jmp 0x46fb
leaq -0x211(%rbp), %rdi
callq 0x32c0
leaq 0xca65(%rip), %rsi      # 0x11173
leaq -0x210(%rbp), %rdi
callq 0x4110
movb %al, -0x421(%rbp)
jmp 0x4722
movb -0x421(%rbp), %al
testb $0x1, %al
jne 0x4755
jmp 0x472e
leaq 0xca3f(%rip), %rsi      # 0x11174
leaq -0x210(%rbp), %rdi
callq 0x4110
movb %al, -0x422(%rbp)
jmp 0x4749
movb -0x422(%rbp), %al
testb $0x1, %al
jne 0x4755
jmp 0x479e
movl $0x2, -0x218(%rbp)
jmp 0x48af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x211(%rbp), %rdi
callq 0x32c0
jmp 0x495f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x4938
leaq -0x390(%rbp), %rdi
callq 0x3370
jmp 0x47ac
movq -0x3e8(%rbp), %rsi
leaq -0x390(%rbp), %rdi
callq 0x3220
movq %rax, -0x430(%rbp)
jmp 0x47c8
movq -0x430(%rbp), %rdi
movl $0x2f, %esi
callq 0x3320
movq %rax, -0x438(%rbp)
jmp 0x47e2
movq -0x438(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x3220
jmp 0x47f7
movq -0x10(%rbp), %rax
movq %rax, -0x440(%rbp)
leaq -0x3d0(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x3270
jmp 0x4817
leaq -0x3d0(%rbp), %rdi
callq 0x3100
movq %rax, -0x450(%rbp)
leaq -0x3d1(%rbp), %rdi
movq %rdi, -0x448(%rbp)
callq 0x3470
movq -0x450(%rbp), %rsi
movq -0x448(%rbp), %rdx
leaq -0x3b0(%rbp), %rdi
callq 0x4060
jmp 0x4859
movq -0x440(%rbp), %rsi
movq -0x3e0(%rbp), %rdi
leaq -0x3b0(%rbp), %rdx
callq 0x44c0
jmp 0x4875
leaq -0x3b0(%rbp), %rdi
callq 0x3170
leaq -0x3d1(%rbp), %rdi
callq 0x32c0
leaq -0x3d0(%rbp), %rdi
callq 0x3170
leaq -0x390(%rbp), %rdi
callq 0x30a0
movl $0x0, -0x218(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x3170
movl -0x218(%rbp), %eax
testl %eax, %eax
je 0x48cc
jmp 0x48c7
jmp 0x4590
jmp 0x4946
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x492c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
jmp 0x4914
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1c8(%rbp)
movl %eax, -0x1cc(%rbp)
leaq -0x3b0(%rbp), %rdi
callq 0x3170
leaq -0x3d1(%rbp), %rdi
callq 0x32c0
leaq -0x3d0(%rbp), %rdi
callq 0x3170
leaq -0x390(%rbp), %rdi
callq 0x30a0
leaq -0x210(%rbp), %rdi
callq 0x3170
jmp 0x495f
jmp 0x4948
jmp 0x4590
movq -0x40(%rbp), %rdi
callq 0x3400
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0x3460
nopl (%rax,%rax)