// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: scdc_dataset_fs2_store::do_cmd_cd(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_cd(const string &params, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
    {
      SCDC_TRACE("do_cmd_cd: '" << params << "'");

      if (params == "ADMIN")
      {
        admin = true;
        return scdc_dataset::do_cmd_cd(params, input, output, result);
      }

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

      if (!params.empty())
      {
        string store_path;
        dataprov_fs2->do_full_path(0, store_path);

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

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

        if (!z_fs_is_directory(store_path.c_str()))
        {
          result = "store does not exist";
          SCDC_FAIL(__func__ << ": changing to store '" << params << "' failed: " << result);
          return false;
        }
      }

      admin = false;

      return scdc_dataset_fs2::do_cmd_cd(params, input, output, result);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
leaq 0x16eff(%rip), %rsi     # 0x51b9f
movq %r14, %rdi
callq 0x19be0
testb %al, %al
je 0x3acd5
movb $0x1, 0x6c(%r13)
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x243e4
cmpq $0x0, 0x8(%r14)
je 0x3ad79
movq 0x8(%r13), %rdi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %rdx
xorl %esi, %esi
callq 0x3783e
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0xb750
leaq 0x1888c(%rip), %rsi     # 0x5359f
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x218cd
leaq 0x16624(%rip), %rdx     # 0x5134d
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1cb18
movq %rsp, %rdi
leaq 0x60(%rsp), %rsi
callq 0xba90
leaq 0x60(%rsp), %rdi
callq 0xb230
leaq 0x40(%rsp), %rdi
callq 0xb230
leaq 0x20(%rsp), %rdi
callq 0xb230
movq (%rsp), %rdi
callq 0x2d93f
testq %rax, %rax
je 0x3ad97
movq %rsp, %rdi
callq 0xb230
movb $0x0, 0x6c(%r13)
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x3a99a
jmp 0x3ae47
leaq 0x18933(%rip), %rsi     # 0x536d1
movq %rbx, %rdi
callq 0xba40
leaq 0x3a7d3(%rip), %r15     # 0x75580
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x3ae3d
addq $0x20, %rdi
callq 0xb800
movq (%r15), %rax
movq 0x8(%rax), %rdi
leaq 0x163b6(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x18784(%rip), %rsi     # 0x53562
movq %rax, %rdi
callq 0xb520
leaq 0x16dc8(%rip), %rsi     # 0x51bb5
movq %rax, %rdi
callq 0xb520
leaq 0x18981(%rip), %rsi     # 0x5377d
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r14, %rsi
callq 0xb490
leaq 0x16b8f(%rip), %rsi     # 0x519a5
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3e0
movq %rsp, %rdi
callq 0xb230
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xb230
jmp 0x3ae6a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xb230
jmp 0x3ae79
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb230
jmp 0x3ae8a
jmp 0x3ae87
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0
nop