// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/dataprov_fs2.cc
// Function: scdc_dataset_fs2_access::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: '" << params << "'");

      bool ret = false;

      const string sub = (params.empty())?"/":params;
      string pwd_path, abs_path;

      if (!dataprov_fs2()->make_pwd_path(pwd, sub, pwd_path))
      {
        result = "invalid path";
        SCDC_FAIL(__func__ << ": make path '" << pwd << "' + '" << sub << "' failed: " << result);
        goto do_return;
      }

      dataprov_fs2()->make_abs_path(pwd_path, abs_path);
      SCDC_TRACE("do_cmd_cd: pwd_path: '" << pwd_path << "', abs_path: '" << abs_path << "'");

      z_fs_stat_t stat;

      if (!z_fs_stat(abs_path.c_str(), &stat))
      {
        result = "path does not exist";
        SCDC_FAIL(__func__ << ": checking path '" << abs_path << "' failed: " << result);
        goto do_return;
      }

      pwd_file = stat.is_file;
      SCDC_TRACE("do_cmd_cd: pwd_file: " << pwd_file);

      ret = scdc_dataset_fs2::do_cmd_cd(pwd_path, input, output, result);

do_return:
      SCDC_TRACE(__func__ << ": return: " << ret);

      return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %r15
movq 0x8(%rsi), %rdx
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
testq %rdx, %rdx
je 0x4a957
movq (%rsi), %rsi
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x1d19a
jmp 0x4a96f
leaq 0x1f9ef(%rip), %rsi     # 0x6a34d
leaq 0x1f9e9(%rip), %rdx     # 0x6a34e
leaq 0x28(%rsp), %rdi
callq 0x1bee6
leaq 0x58(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq %rax, -0x8(%rbx)
movb %al, (%rbx)
leaq 0x18(%r15), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x45ada
testb %al, %al
je 0x4a9f9
movq 0x8(%r15), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x45c32
movq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x35bca
testq %rax, %rax
je 0x4ab06
cmpq $0x0, 0x70(%rsp)
setne 0x38(%r15)
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x4acc4
movl %eax, %ebp
jmp 0x4ac0d
movq 0x8(%r14), %rdx
leaq 0x215aa(%rip), %rcx     # 0x6bfae
movl $0xc, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x41b55(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4ac0b
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x8(%rax), %r12
leaq 0x1f746(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r12, %rdi
callq 0xb5f0
leaq 0x218df(%rip), %rsi     # 0x6c335
movl $0x13, %edx
movq %r12, %rdi
callq 0xb5f0
leaq 0x20196(%rip), %rsi     # 0x6ac00
movl $0x9, %edx
movq %r12, %rdi
callq 0xb5f0
leaq 0x218cb(%rip), %rsi     # 0x6c349
movl $0xd, %edx
movq %r12, %rdi
callq 0xb5f0
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdx
movq %r12, %rdi
callq 0xb5f0
movq %rax, %r15
leaq 0x218b2(%rip), %rsi     # 0x6c357
movl $0x5, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r15
leaq 0x1ff22(%rip), %rsi     # 0x6a9f0
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb4d0
jmp 0x4abe5
movq 0x8(%r14), %rdx
leaq 0x21c15(%rip), %rcx     # 0x6c726
movl $0x13, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x41a48(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4ac0b
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r15
leaq 0x1f63b(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x217d4(%rip), %rsi     # 0x6c335
movl $0x13, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x2008b(%rip), %rsi     # 0x6ac00
movl $0x9, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x21bb1(%rip), %rsi     # 0x6c73a
movl $0x11, %edx
movq %r15, %rdi
callq 0xb5f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r15
leaq 0x1fe3e(%rip), %rsi     # 0x6a9f0
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
leaq 0x41971(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4ac24
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4ac40
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4ac5c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4ac8a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rcx
leaq 0x58(%rsp), %rdx
callq 0xc286
movq %r14, %rdi
callq 0xb9c0
nop