// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdx, %rbx
movq %rsi, 0x30(%rsp)
movq %rdi, 0x58(%rsp)
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x3044
movq (%rbx), %rax
cmpb $0x2f, -0x1(%rax,%rcx)
jne 0x3044
decq %rcx
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2220
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2270
movq (%r14), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x3044
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2200
movq (%rbx), %rdi
callq 0x22d0
testq %rax, %rax
je 0x3291
movq %rax, %r12
movq %rax, %rdi
callq 0x22e0
testq %rax, %rax
je 0x3289
movq %rax, %r13
leaq 0x10(%rsp), %r15
leaq 0x80(%rsp), %rbp
movzbl 0x12(%r13), %eax
cmpl $0x4, %eax
je 0x3133
cmpl $0x8, %eax
jne 0x3275
movq %rbp, %rdi
callq 0x22a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rbp, %rdi
callq 0x2250
movb $0x2f, 0x10(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2250
movq %rax, %r14
addq $0x13, %r13
movq %r13, %rdi
callq 0x20f0
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x2250
movq %r15, %rdi
leaq 0x88(%rsp), %rsi
callq 0x2310
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x3390
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3112
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbp, %rdi
movq 0x8eac(%rip), %rsi      # 0xbfc8
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x20c0
jmp 0x3275
leaq 0x13(%r13), %r14
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
callq 0x20f0
leaq (%rax,%r13), %rdx
addq $0x13, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x770a
movq %r15, %rdi
leaq 0x508b(%rip), %rsi      # 0x81f1
callq 0x20b0
testl %eax, %eax
leaq 0x60(%rsp), %r14
je 0x3259
movq %r15, %rdi
leaq 0x5070(%rip), %rsi      # 0x81f2
callq 0x20b0
testl %eax, %eax
je 0x3259
movq %rbp, %rdi
callq 0x22a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rbp, %rdi
callq 0x2250
movb $0x2f, 0x38(%rsp)
movl $0x1, %edx
movq %rax, %rdi
leaq 0x38(%rsp), %rsi
callq 0x2250
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rax, %rdi
callq 0x2250
leaq 0x38(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x2310
movq 0x38(%rsp), %rsi
movq %r14, %rdi
leaq 0xf(%rsp), %rdx
callq 0x2da2
movq 0x58(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
callq 0x2fd0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x3221
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x323d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbp, %rdi
movq 0x8d81(%rip), %rsi      # 0xbfc8
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x20c0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3275
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r12, %rdi
callq 0x22e0
movq %rax, %r13
testq %rax, %rax
jne 0x3079
movq %r12, %rdi
callq 0x2320
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x32c7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x32c7
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x331a
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x331a
jmp 0x3317
movq %rax, %rbx
jmp 0x333b
movq %rax, %rbx
jmp 0x337d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x335c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x335c
jmp 0x3359
movq %rax, %rbx
movq 0x8ca7(%rip), %rsi      # 0xbfc8
leaq 0x80(%rsp), %rdi
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x20c0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x337d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x337d
movq %rax, %rbx
movq 0x8c65(%rip), %rsi      # 0xbfc8
leaq 0x80(%rsp), %rdi
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2380