// File: williewillus[P]panda_scratchpad/src/checker/DiskContents.cpp
// Function: DiskContents::sanity_checks(std::basic_ofstream<char, std::char_traits<char>>&)
bool DiskContents::sanity_checks(ofstream &diff_file) {
  cout << __func__ << endl;
  string base_path = "/mnt/pmem0";
  if (!makeFiles(base_path, diff_file)) {
    cout << "Failed: Couldn't create files in all directories" << endl;
    diff_file << "Failed: Couldn't create files in all directories" << endl;
    return false;
  }

  if (!deleteFiles(base_path, diff_file)) {
    cout << "Failed: Couldn't delete all the existing directories" << endl;
    diff_file << "Failed: Couldn't delete all the existing directories" << endl;
    return false;
  }

  cout << "Passed sanity checks" << endl;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq 0x12bfb(%rip), %rdi     # 0x34fc0
leaq 0x35ed(%rip), %rsi      # 0x259b9
callq 0x6520
movq %rax, %rdi
movq 0x12bbd(%rip), %rsi     # 0x34f98
callq 0x6580
leaq -0x39(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x68b0
movq -0xa0(%rbp), %rdx
leaq 0x2fa5(%rip), %rsi      # 0x253a3
leaq -0x38(%rbp), %rdi
callq 0x6670
jmp 0x22409
leaq -0x39(%rbp), %rdi
callq 0x6590
leaq -0x70(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6240
jmp 0x22421
movq -0xa8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x70(%rbp), %rsi
callq 0x220f0
movb %al, -0xa9(%rbp)
jmp 0x2243d
movb -0xa9(%rbp), %al
xorb $-0x1, %al
movb %al, -0xaa(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x69d8
movb -0xaa(%rbp), %al
testb $0x1, %al
jne 0x22463
jmp 0x22517
movq 0x12b56(%rip), %rdi     # 0x34fc0
leaq 0x3556(%rip), %rsi      # 0x259c7
callq 0x6520
movq %rax, -0xb8(%rbp)
jmp 0x2247f
movq -0xb8(%rbp), %rdi
movq 0x12b0b(%rip), %rsi     # 0x34f98
callq 0x6580
jmp 0x22494
movq -0x18(%rbp), %rdi
leaq 0x3528(%rip), %rsi      # 0x259c7
callq 0x6520
movq %rax, -0xc0(%rbp)
jmp 0x224ad
movq -0xc0(%rbp), %rdi
movq 0x12add(%rip), %rsi     # 0x34f98
callq 0x6580
jmp 0x224c2
movb $0x0, -0x1(%rbp)
movl $0x1, -0x74(%rbp)
jmp 0x22633
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0x6590
jmp 0x22653
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x2264a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x69d8
jmp 0x2264a
leaq -0x98(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6240
jmp 0x22529
movq -0xa8(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x98(%rbp), %rsi
callq 0x219d0
movb %al, -0xc1(%rbp)
jmp 0x22548
movb -0xc1(%rbp), %al
xorb $-0x1, %al
movb %al, -0xc2(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x69d8
movb -0xc2(%rbp), %al
testb $0x1, %al
jne 0x22571
jmp 0x225f7
movq 0x12a48(%rip), %rdi     # 0x34fc0
leaq 0x3479(%rip), %rsi      # 0x259f8
callq 0x6520
movq %rax, -0xd0(%rbp)
jmp 0x2258d
movq -0xd0(%rbp), %rdi
movq 0x129fd(%rip), %rsi     # 0x34f98
callq 0x6580
jmp 0x225a2
movq -0x18(%rbp), %rdi
leaq 0x344b(%rip), %rsi      # 0x259f8
callq 0x6520
movq %rax, -0xd8(%rbp)
jmp 0x225bb
movq -0xd8(%rbp), %rdi
movq 0x129cf(%rip), %rsi     # 0x34f98
callq 0x6580
jmp 0x225d0
movb $0x0, -0x1(%rbp)
movl $0x1, -0x74(%rbp)
jmp 0x22633
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x69d8
jmp 0x2264a
movq 0x129c2(%rip), %rdi     # 0x34fc0
leaq 0x3428(%rip), %rsi      # 0x25a2d
callq 0x6520
movq %rax, -0xe0(%rbp)
jmp 0x22613
movq -0xe0(%rbp), %rdi
movq 0x12977(%rip), %rsi     # 0x34f98
callq 0x6580
jmp 0x22628
movb $0x1, -0x1(%rbp)
movl $0x1, -0x74(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x69d8
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xe0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x69d8
movq -0x48(%rbp), %rdi
callq 0x68a0
nopl (%rax)