// File: williewillus[P]panda_scratchpad/src/checker/DiskContents.cpp
// Function: DiskContents::makeFiles(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_ofstream<char, std::char_traits<char>>&)
bool DiskContents::makeFiles(string base_path, ofstream &diff_file) {
  get_contents(base_path.c_str());
  for (auto &i : contents) {
    if (S_ISDIR((i.second).stat_attr.st_mode)) {
      string filepath = base_path + i.first + "/" + "_dummy";
      int fd = open(filepath.c_str(), O_CREAT|O_RDWR);
      if (fd < 0) {
        diff_file <<  "Couldn't create file " << filepath << endl;
        cout <<  "Couldn't create file " << filepath << endl;
        return false;
      }
      close(fd);
    }
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rsi, -0xd0(%rbp)
movq %rdi, %rax
movq -0xd0(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movq %rax, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
callq 0x6220
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x1f970
movq -0xc0(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x22870
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x228a0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x228d0
testb $0x1, %al
jne 0x2217d
jmp 0x2237a
leaq -0x30(%rbp), %rdi
callq 0x22900
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x150(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x2236a
movq -0xc8(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x22a00
movq -0xd8(%rbp), %rsi
leaq 0x363a(%rip), %rdx      # 0x2580a
leaq -0x80(%rbp), %rdi
callq 0x9d60
jmp 0x221db
leaq 0x37ba(%rip), %rdx      # 0x2599c
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x9d60
jmp 0x221f1
leaq -0x80(%rbp), %rdi
callq 0x69d8
leaq -0xa0(%rbp), %rdi
callq 0x69d8
leaq -0x60(%rbp), %rdi
callq 0x6220
movq %rax, %rdi
xorl %eax, %eax
movl $0x42, %esi
callq 0x63d0
movl %eax, -0xdc(%rbp)
jmp 0x22226
movl -0xdc(%rbp), %eax
movl %eax, -0xb0(%rbp)
cmpl $0x0, -0xb0(%rbp)
jge 0x2233a
movq -0x20(%rbp), %rdi
leaq 0x3759(%rip), %rsi      # 0x259a3
callq 0x6520
movq %rax, -0xe8(%rbp)
jmp 0x22258
movq -0xe8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x64a0
movq %rax, -0xf0(%rbp)
jmp 0x22271
movq -0xf0(%rbp), %rdi
movq 0x12d19(%rip), %rsi     # 0x34f98
callq 0x6580
jmp 0x22286
movq 0x12d33(%rip), %rdi     # 0x34fc0
leaq 0x370f(%rip), %rsi      # 0x259a3
callq 0x6520
movq %rax, -0xf8(%rbp)
jmp 0x222a2
movq -0xf8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x64a0
movq %rax, -0x100(%rbp)
jmp 0x222bb
movq -0x100(%rbp), %rdi
movq 0x12ccf(%rip), %rsi     # 0x34f98
callq 0x6580
jmp 0x222d0
movb $0x0, -0x1(%rbp)
movl $0x1, -0xb4(%rbp)
jmp 0x22351
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x2230f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x69d8
leaq -0xa0(%rbp), %rdi
callq 0x69d8
jmp 0x2238c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x69d8
jmp 0x2238c
movl -0xb0(%rbp), %edi
callq 0x6980
jmp 0x22347
movl $0x0, -0xb4(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x69d8
movl -0xb4(%rbp), %eax
testl %eax, %eax
je 0x22368
jmp 0x22366
jmp 0x2237e
jmp 0x2236a
jmp 0x2236c
leaq -0x30(%rbp), %rdi
callq 0x22920
jmp 0x22167
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0x68a0
nopl (%rax,%rax)