// File: /workspace/github_cpp_makefile_star2_O3/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 (%rdx), %rdi
movq 0x8(%rdx), %rcx
testq %rcx, %rcx
je 0x3013
cmpb $0x2f, -0x1(%rdi,%rcx)
jne 0x3013
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 0x3010
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2200
movq (%rbx), %rdi
callq 0x22d0
testq %rax, %rax
je 0x325d
movq %rax, %rbp
movq %rax, %rdi
callq 0x22e0
testq %rax, %rax
je 0x3255
movq %rax, %r15
leaq 0x10(%rsp), %r13
leaq 0x80(%rsp), %r12
movzbl 0x12(%r15), %eax
cmpl $0x4, %eax
je 0x30ff
cmpl $0x8, %eax
jne 0x3241
movq %r12, %rdi
callq 0x22a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r12, %rdi
callq 0x2250
movb $0x2f, 0x10(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2250
movq %rax, %r14
addq $0x13, %r15
movq %r15, %rdi
callq 0x20f0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2250
movq %r13, %rdi
leaq 0x88(%rsp), %rsi
callq 0x2310
movq 0x30(%rsp), %rdi
movq %r13, %rsi
callq 0x335c
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x30de
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r12, %rdi
movq 0x8ee0(%rip), %rsi      # 0xbfc8
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x20c0
jmp 0x3241
leaq 0x13(%r15), %r14
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
callq 0x20f0
leaq (%r15,%rax), %rdx
addq $0x13, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x76ea
movq %r13, %rdi
leaq 0x50bf(%rip), %rsi      # 0x81f1
callq 0x20b0
testl %eax, %eax
leaq 0x60(%rsp), %r14
je 0x3225
movq %r13, %rdi
leaq 0x50a4(%rip), %rsi      # 0x81f2
callq 0x20b0
testl %eax, %eax
je 0x3225
movq %r12, %rdi
callq 0x22a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r12, %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 0x2d6c
movq 0x58(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %r14, %rdx
callq 0x2f9c
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x31ed
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x3209
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r12, %rdi
movq 0x8db5(%rip), %rsi      # 0xbfc8
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x20c0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3241
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbp, %rdi
callq 0x22e0
movq %rax, %r15
testq %rax, %rax
jne 0x3045
movq %rbp, %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 0x3293
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x3293
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x32e6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x32e6
jmp 0x32e3
movq %rax, %rbx
jmp 0x3307
movq %rax, %rbx
jmp 0x3349
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3328
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x3328
jmp 0x3325
movq %rax, %rbx
movq 0x8cdb(%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 0x3349
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x3349
movq %rax, %rbx
movq 0x8c99(%rip), %rsi      # 0xbfc8
leaq 0x80(%rsp), %rdi
callq 0x2110
leaq 0xf0(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2380