// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1e8, %rsp            # imm = 0x1E8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
movq (%rdx), %rdi
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x2c0a
cmpb $0x2f, -0x1(%rdi,%rcx)
jne 0x2c0a
decq %rcx
leaq 0x70(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x2220
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2270
movq %r15, %rdi
callq 0x20f0
movq (%rbx), %rdi
callq 0x22f0
testq %rax, %rax
je 0x2d68
movq %rax, %r12
leaq 0x30(%rsp), %r13
leaq 0x70(%rsp), %r15
movq %r12, %rdi
callq 0x2300
testq %rax, %rax
je 0x2d60
movq %rax, %rbp
movzbl 0x12(%rax), %eax
cmpl $0x4, %eax
je 0x2c9e
cmpl $0x8, %eax
jne 0x2c25
movq %r15, %rdi
callq 0x22b0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21c0
movq %rax, %rdi
pushq $0x2f
popq %rsi
callq 0x2260
addq $0x13, %rbp
movq %rax, %rdi
movq %rbp, %rsi
callq 0x21e0
movq %r13, %rdi
leaq 0x78(%rsp), %rsi
callq 0x2320
movq %r14, %rdi
movq %r13, %rsi
callq 0x2dee
movq %r13, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x2080
jmp 0x2c25
addq $0x13, %rbp
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x29fc
movq %r13, %rdi
leaq 0x451b(%rip), %rsi      # 0x71d5
callq 0x2a37
testb %al, %al
jne 0x2d53
movq %r13, %rdi
leaq 0x4505(%rip), %rsi      # 0x71d6
callq 0x2a37
testb %al, %al
jne 0x2d53
movq %r15, %rdi
callq 0x22b0
movq %r15, %rdi
movq %rbx, %rsi
callq 0x21c0
leaq 0x50(%rsp), %rbp
movq %rax, %rdi
pushq $0x2f
popq %rsi
callq 0x2260
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
leaq 0x10(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x2320
movq 0x10(%rsp), %rsi
movq %rbp, %rdi
leaq 0x7(%rsp), %rdx
callq 0x29fc
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x2bb0
movq %rbp, %rdi
callq 0x20f0
leaq 0x10(%rsp), %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x2080
movq %r13, %rdi
callq 0x20f0
jmp 0x2c25
movq %r12, %rdi
callq 0x2330
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x20f0
jmp 0x2d8c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20f0
jmp 0x2da2
jmp 0x2d9f
movq %rax, %rbx
jmp 0x2dac
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x2080
leaq 0x30(%rsp), %rdi
callq 0x20f0
jmp 0x2ddb
movq %rax, %rbx
jmp 0x2ddb
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20f0
jmp 0x2dd1
jmp 0x2dce
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x2080
movq %rbx, %rdi
callq 0x2380