// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: scdc_dataset_fs2_store::do_cmd_rm(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, _scdc_dataset_inout_t*, _scdc_dataset_inout_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool do_cmd_rm(const string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
    {
      SCDC_TRACE("do_cmd_rm: '" << params << "'");

      scdc_dataprov_fs2 *dataprov_fs2 = static_cast<scdc_dataprov_fs2 *>(dataprov);

      if (params.empty())
      {
        result = "empty path";
        SCDC_FAIL(__func__ << ": writing to store failed: " << result);
        return false;

      } else if (admin)
      {
        SCDC_TRACE("do_cmd_rm: deleting store '" << params << "'");

        string store_path;
        dataprov_fs2->do_full_path(0, store_path);

        store_path += DIR_STORE_PREFIX + string(params) + "/";

        SCDC_TRACE("do_cmd_rm: store_path: '" << store_path << "'");

        if (!z_fs_is_directory(store_path.c_str()))
        {
          result = string("store does not exist");
          SCDC_FAIL("do_cmd_rm: removing store '" << store_path << "' failed: " << result);
          return false;
        }

        if (!z_fs_rm_r(store_path.c_str()))
        {
          result = string("remove failed: ") + strerror(errno);
          SCDC_FAIL("do_cmd_rm: removing store '" << store_path << "' failed: " << result);
          return false;
        }

      } else if (pwd.size() == 0)
      {
        result = "no store selected";
        SCDC_FAIL(__func__ << ": creating entry failed: " << result);
        return false;

      } else
      {
        SCDC_TRACE("do_cmd_rm: deleting entry '" << params << "'");

        string store_path;
        dataprov_fs2->do_full_path(0, store_path);

        store_path += DIR_STORE_PREFIX + pwd + "/";

        SCDC_TRACE("do_cmd_rm: store_path: '" << store_path << "'");

        string entry_path = store_path + DIR_ENTRY_PREFIX + params + DIR_ENTRY_SUFFIX;

        SCDC_TRACE("do_cmd_rm: entry_path: '" << entry_path.c_str() << "'");

        if (!z_fs_is_file(entry_path.c_str()))
        {
          result = "entry does not exist";
          SCDC_FAIL("do_cmd_rm: removing entry '" << entry_path << "' failed: " << result);
          return false;
        }

        if (remove(entry_path.c_str()) != 0)
        {
          result = string("remove failed: ") + strerror(errno);
          SCDC_FAIL("do_cmd_rm: removing entry '" << entry_path << "' failed: " << result);
          return false;
        }
      }

      return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %r8, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x3a088
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rdi), %rdi
cmpb $0x1, 0x6c(%r15)
leaq 0x60(%rsp), %rax
jne 0x3a0f2
leaq 0x50(%rsp), %rdx
movq %rax, (%rdx)
andq $0x0, 0x8(%rdx)
movb $0x0, 0x10(%rdx)
xorl %esi, %esi
callq 0x3783e
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0xb750
leaq 0x195e5(%rip), %rsi     # 0x5359f
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x218cd
leaq 0x1737d(%rip), %rdx     # 0x5134d
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1cb18
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xba90
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x70(%rsp), %rdi
callq 0xb230
movq 0x50(%rsp), %rdi
callq 0x2d93f
testq %rax, %rax
je 0x3a2c9
movq 0x50(%rsp), %rdi
callq 0x2db42
testq %rax, %rax
jne 0x3a456
leaq 0x196c9(%rip), %rsi     # 0x53702
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x1a132
callq 0xb060
movl (%rax), %edi
callq 0xb180
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x1cb18
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x10(%rsp), %rdi
jmp 0x3a2f2
leaq 0x19534(%rip), %rsi     # 0x535c3
movq %rbx, %rdi
callq 0xba40
leaq 0x3b4e2(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3a43d
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x170c5(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x19493(%rip), %rsi     # 0x53562
movq %rax, %rdi
callq 0xb520
leaq 0x193da(%rip), %rsi     # 0x534b8
movq %rax, %rdi
callq 0xb520
leaq 0x194e1(%rip), %rsi     # 0x535ce
jmp 0x3a29d
cmpq $0x0, 0x20(%r15)
je 0x3a238
leaq 0x50(%rsp), %rdx
movq %rax, (%rdx)
andq $0x0, 0x8(%rdx)
movb $0x0, 0x10(%rdx)
xorl %esi, %esi
callq 0x3783e
addq $0x18, %r15
leaq 0x1947f(%rip), %rsi     # 0x5359f
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x19ae2
leaq 0x17219(%rip), %rdx     # 0x5134d
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1cb18
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xba90
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x19440(%rip), %rdx     # 0x535ad
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1d867
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %r14, %rdx
callq 0x1eeb2
leaq 0x18328(%rip), %rdx     # 0x524bd
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1cb18
leaq 0x10(%rsp), %rdi
callq 0xb230
leaq 0x70(%rsp), %rdi
callq 0xb230
movq 0x30(%rsp), %rdi
callq 0x2d974
testq %rax, %rax
je 0x3a38d
movq 0x30(%rsp), %rdi
callq 0xb9d0
testl %eax, %eax
je 0x3a44c
leaq 0x1951e(%rip), %rsi     # 0x53702
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1a132
callq 0xb060
movl (%rax), %edi
callq 0xb180
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
movq %rax, %rdx
callq 0x1cb18
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x70(%rsp), %rdi
callq 0xb230
jmp 0x3a39c
leaq 0x193d4(%rip), %rsi     # 0x53613
movq %rbx, %rdi
callq 0xba40
leaq 0x3b332(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3a43d
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x16f15(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x192e3(%rip), %rsi     # 0x53562
movq %rax, %rdi
callq 0xb520
leaq 0x1922a(%rip), %rsi     # 0x534b8
movq %rax, %rdi
callq 0xb520
leaq 0x193a5(%rip), %rsi     # 0x53642
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x3a43d
leaq 0x19401(%rip), %rsi     # 0x536d1
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1a132
leaq 0x30(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x3b282(%rip), %rax     # 0x75580
movq (%rax), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3a433
addq $0x20, %rdi
callq 0xb800
leaq 0x3b264(%rip), %r14     # 0x75580
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x16e5e(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x1922c(%rip), %rsi     # 0x53562
movq %rax, %rdi
callq 0xb520
leaq 0x193a1(%rip), %rsi     # 0x536e6
movq %rax, %rdi
callq 0xb520
leaq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0xb490
leaq 0x17644(%rip), %rsi     # 0x519a5
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x3a433
leaq 0x19303(%rip), %rsi     # 0x53697
movq %rbx, %rdi
callq 0xba40
leaq 0x3b1dd(%rip), %rax     # 0x75580
movq (%rax), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3a429
addq $0x20, %rdi
callq 0xb800
leaq 0x3b1c3(%rip), %r14     # 0x75580
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x16dbd(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x1918b(%rip), %rsi     # 0x53562
movq %rax, %rdi
callq 0xb520
leaq 0x1932c(%rip), %rsi     # 0x53712
movq %rax, %rdi
callq 0xb520
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0xb490
leaq 0x175a3(%rip), %rsi     # 0x519a5
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x50(%rsp), %rdi
callq 0xb230
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x30(%rsp), %rdi
callq 0xb230
leaq 0x50(%rsp), %rdi
callq 0xb230
movb $0x1, %al
jmp 0x3a43f
jmp 0x3a490
jmp 0x3a4d7
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xb230
jmp 0x3a4cb
jmp 0x3a4c8
jmp 0x3a4d7
jmp 0x3a4ad
jmp 0x3a4bc
jmp 0x3a4d7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb230
jmp 0x3a493
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x3a4d0
jmp 0x3a4d7
jmp 0x3a4d7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb230
jmp 0x3a4b0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb230
jmp 0x3a4bf
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x3a4d0
jmp 0x3a4d7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xb230
jmp 0x3a4da
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0