// File: /workspace/github_cpp_makefile_star2_O1/williewillus[P]panda_scratchpad/src/checker/DiskContents.cpp
// Function: DiskContents::compare_entries_at_path(DiskContents&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::basic_ofstream<char, std::char_traits<char>>&)
bool DiskContents::compare_entries_at_path(DiskContents &compare_disk,
  string &path, ofstream &diff_file) {
  bool retValue = true;

  if (disk_path.compare(compare_disk.disk_path) == 0) {
    return retValue;
  }

  string base_path = "/mnt/pmem0" + path;

  /*if (compare_disk.mount_disk() != 0) {
    cout << "Mounting " << compare_disk.disk_path << " failed" << endl;
  }*/

  string compare_disk_mount_point(compare_disk.get_mount_point());
  string compare_path = compare_disk_mount_point + path;

  fileAttributes base_fa, compare_fa;
  bool failed_stat = false;
  struct stat base_statbuf, compare_statbuf;
  if (stat(base_path.c_str(), &base_statbuf) == -1) {
    diff_file << "Failed stating the file " << base_path << endl;
    failed_stat = true;
  }
  if (stat(compare_path.c_str(), &compare_statbuf) == -1) {
    diff_file << "Failed stating the file " << compare_path << endl;
    failed_stat = true;
  }

  if (failed_stat) {
    //compare_disk.unmount_and_delete_mount_point();
    return false;
  }

  base_fa.set_stat_attr(base_path, false);
  compare_fa.set_stat_attr(compare_path, false);
  if (!(base_fa.compare_stat_attr(compare_fa.stat_attr))) {
    diff_file << "DIFF: Content Mismatch " << path << endl << endl;
    diff_file << base_path << ":" << endl;
    diff_file << base_fa << endl << endl;
    diff_file << compare_path << ":" << endl;
    diff_file << compare_fa << endl << endl;
    //compare_disk.unmount_and_delete_mount_point();
    return false;
  }

  if (base_fa.is_regular_file()) {
    base_fa.set_md5sum(base_path);
    compare_fa.set_md5sum(compare_path);
    if (base_fa.compare_md5sum(compare_fa.md5sum) != 0) {
      diff_file << "DIFF : Data Mismatch of " << path << endl;
      diff_file << base_path << " has md5sum " << base_fa.md5sum << endl;
      diff_file << compare_path << " has md5sum " << compare_fa.md5sum;
      diff_file << endl << endl;
      //compare_disk.unmount_and_delete_mount_point();
      return false;
    }
  }

  //compare_disk.unmount_and_delete_mount_point();
  return retValue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5b8, %rsp            # imm = 0x5B8
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
addq $0x8, %rdi
addq $0x8, %rsi
callq 0x5050
testl %eax, %eax
je 0x12376
leaq 0x3185(%rip), %rsi      # 0x151f2
leaq -0x48(%rbp), %rdi
movq %r14, %rdx
callq 0xd239
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x28(%r15), %rsi
movq 0x30(%r15), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x8052
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r14, %rdx
callq 0x13a79
leaq -0x2f0(%rbp), %rdi
callq 0x10770
leaq -0x4b8(%rbp), %rdi
callq 0x10770
movq -0x48(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
callq 0x5410
movl %eax, %r15d
cmpl $-0x1, %eax
jne 0x12129
leaq 0x35ef(%rip), %rsi      # 0x156d1
movl $0x18, %edx
movq %rbx, %rdi
callq 0x54f0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %r12, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
movq -0x68(%rbp), %rdi
leaq -0x548(%rbp), %rsi
callq 0x5410
cmpl $-0x1, %eax
je 0x1237e
cmpl $-0x1, %r15d
je 0x1252d
leaq -0x118(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x8052
movq -0x128(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x5410
movq -0x128(%rbp), %rdi
cmpq %r15, %rdi
je 0x12192
callq 0x5460
leaq -0xf8(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %rdi
callq 0x8052
movq -0x108(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x5410
movq -0x108(%rbp), %rdi
cmpq %r15, %rdi
je 0x121d8
callq 0x5460
movq -0x1d0(%rbp), %rax
cmpq -0x398(%rbp), %rax
jne 0x12592
movl -0x388(%rbp), %eax
cmpl %eax, -0x1c0(%rbp)
jne 0x12592
movq -0x390(%rbp), %rax
cmpq %rax, -0x1c8(%rbp)
jne 0x12592
movl -0x384(%rbp), %eax
cmpl %eax, -0x1bc(%rbp)
jne 0x12592
movl -0x380(%rbp), %eax
cmpl %eax, -0x1b8(%rbp)
jne 0x12592
movq -0x370(%rbp), %rax
cmpq %rax, -0x1a8(%rbp)
jne 0x12592
movq -0x368(%rbp), %rax
cmpq %rax, -0x1a0(%rbp)
jne 0x12592
movq -0x360(%rbp), %rax
cmpq %rax, -0x198(%rbp)
jne 0x12592
movl $0xf000, %eax           # imm = 0xF000
andl -0x1c0(%rbp), %eax
movb $0x1, %r15b
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x12530
leaq -0xd8(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x8052
leaq -0x2f0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x1089e
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
je 0x122d1
callq 0x5460
leaq -0xb8(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0x8052
leaq -0x4b8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x1089e
movq -0xc8(%rbp), %rdi
cmpq %r15, %rdi
je 0x12317
callq 0x5460
leaq -0x98(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x310(%rbp), %rsi
movq -0x308(%rbp), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x8052
movq -0x140(%rbp), %r12
movq -0xa0(%rbp), %r13
cmpq %r12, %r13
movq %r12, %rdx
cmovbq %r13, %rdx
testq %rdx, %rdx
je 0x123be
movq -0xa8(%rbp), %rsi
movq -0x148(%rbp), %rdi
callq 0x54b0
testl %eax, %eax
sete %al
jmp 0x123c0
movb $0x1, %r15b
jmp 0x1257d
leaq 0x334c(%rip), %rsi      # 0x156d1
movl $0x18, %edx
movq %rbx, %rdi
callq 0x54f0
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5470
jmp 0x1251a
movb $0x1, %al
cmpq %r13, %r12
sete %r12b
andb %al, %r12b
movq -0xa8(%rbp), %rdi
cmpq %r15, %rdi
je 0x123db
callq 0x5460
movb $0x1, %r15b
testb %r12b, %r12b
leaq -0x78(%rbp), %r13
jne 0x12530
leaq 0x32b9(%rip), %rsi      # 0x156ab
movl $0x18, %edx
movq %rbx, %rdi
callq 0x54f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %r14
leaq 0x3272(%rip), %rsi      # 0x156c4
movl $0xc, %edx
movq %rax, %rdi
callq 0x54f0
movq -0x148(%rbp), %rsi
movq -0x140(%rbp), %rdx
movq %r14, %rdi
callq 0x54f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %r14
leaq 0x320b(%rip), %rsi      # 0x156c4
movl $0xc, %edx
movq %rax, %rdi
callq 0x54f0
movq -0x310(%rbp), %rsi
movq -0x308(%rbp), %rdx
movq %r14, %rdi
callq 0x54f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
xorl %r15d, %r15d
leaq -0x4b8(%rbp), %rdi
callq 0x10812
leaq -0x2f0(%rbp), %rdi
callq 0x10812
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1255a
callq 0x5460
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x1256b
callq 0x5460
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1257d
callq 0x5460
movl %r15d, %eax
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30fa(%rip), %rsi      # 0x15693
movl $0x17, %edx
movq %rbx, %rdi
callq 0x54f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x54f0
movq %rax, %r14
leaq 0x304f(%rip), %rsi      # 0x15672
movl $0x1, %edx
movq %rax, %rdi
callq 0x54f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x5470
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5300
leaq -0x2f0(%rbp), %rsi
movq %rbx, %rdi
callq 0x10a73
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
jmp 0x1267c
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r15, %rdi
je 0x1269f
callq 0x5460
jmp 0x1269f
movq %rax, %rbx
jmp 0x126ab
movq %rax, %rbx
jmp 0x126b7
movq %rax, %rbx
jmp 0x126c9
movq %rax, %rbx
jmp 0x126da
movq %rax, %rbx
leaq -0x4b8(%rbp), %rdi
callq 0x10812
leaq -0x2f0(%rbp), %rdi
callq 0x10812
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x126c9
callq 0x5460
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x126da
callq 0x5460
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x126ec
callq 0x5460
movq %rbx, %rdi
callq 0x57c0