// File: 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
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
jmp 0x778fc
movb $0x0, -0x29(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcb60
movb $0x0, -0x52(%rbp)
testb $0x1, %al
jne 0x77913
jmp 0x77942
leaq -0x51(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0xcbc0
movq -0xd8(%rbp), %rdx
movb $0x1, -0x52(%rbp)
leaq 0x2ea38(%rip), %rsi     # 0xa636d
leaq -0x50(%rbp), %rdi
callq 0x27820
jmp 0x77940
jmp 0x77953
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0xc270
jmp 0x77951
jmp 0x77953
testb $0x1, -0x52(%rbp)
jne 0x7795b
jmp 0x77964
leaq -0x51(%rbp), %rdi
callq 0xc730
leaq -0x88(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0xc960
leaq -0xa8(%rbp), %rdi
callq 0xc960
movq -0xd0(%rbp), %rdi
callq 0x77520
movq -0xd0(%rbp), %rsi
movq -0xe8(%rbp), %rcx
movq %rax, %rdi
addq $0x18, %rsi
leaq -0x50(%rbp), %rdx
callq 0x714c0
movb %al, -0xd9(%rbp)
jmp 0x779b5
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x77b90
jmp 0x779c5
movq -0x28(%rbp), %rdi
leaq 0x3065e(%rip), %rsi     # 0xa802e
callq 0xc920
jmp 0x779d7
jmp 0x779d9
leaq 0x5ccc8(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x77b87
leaq 0x5ccaf(%rip), %rax     # 0xd46a8
movq %rax, -0xf8(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0xf8(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x2e78f(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0xf0(%rbp)
jmp 0x77a2f
movq -0xf0(%rbp), %rdi
leaq 0x30970(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x100(%rbp)
jmp 0x77a4b
movq -0x100(%rbp), %rdi
leaq 0x2f24b(%rip), %rsi     # 0xa6ca4
callq 0xc670
movq %rax, -0x108(%rbp)
jmp 0x77a67
movq -0x108(%rbp), %rdi
leaq 0x3094c(%rip), %rsi     # 0xa83c1
callq 0xc670
movq %rax, -0x110(%rbp)
jmp 0x77a83
movq -0x110(%rbp), %rdi
movq -0xd0(%rbp), %rsi
addq $0x18, %rsi
callq 0xc5b0
movq %rax, -0x118(%rbp)
jmp 0x77aa3
movq -0x118(%rbp), %rdi
leaq 0x3091e(%rip), %rsi     # 0xa83cf
callq 0xc670
movq %rax, -0x120(%rbp)
jmp 0x77abf
movq -0x120(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x128(%rbp)
jmp 0x77ad8
movq -0x128(%rbp), %rdi
leaq 0x2eee2(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x130(%rbp)
jmp 0x77af4
movq -0x130(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x138(%rbp)
jmp 0x77b0d
movq -0x138(%rbp), %rdi
movq 0x5c4a5(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x77b22
leaq 0x5cb7f(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x77b87
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
testb $0x1, -0x52(%rbp)
jne 0x77b47
jmp 0x77b50
leaq -0x51(%rbp), %rdi
callq 0xc730
jmp 0x77db7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
leaq -0x88(%rbp), %rdi
callq 0xc3e0
leaq -0x50(%rbp), %rdi
callq 0xc3e0
jmp 0x77db7
jmp 0x77b89
jmp 0x77b8b
jmp 0x77d76
movq -0xd0(%rbp), %rdi
callq 0x77520
movq %rax, %rdi
leaq -0x88(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x71620
jmp 0x77bb4
jmp 0x77bb6
jmp 0x77bb8
jmp 0x77bba
leaq -0xa8(%rbp), %rdi
callq 0xc260
movq %rax, %rdi
leaq -0xc8(%rbp), %rsi
callq 0x5d640
movq %rax, -0x140(%rbp)
jmp 0x77bde
movq -0x140(%rbp), %rax
cmpq $0x0, %rax
jne 0x77d28
movq -0x28(%rbp), %rdi
leaq 0x30ba4(%rip), %rsi     # 0xa879e
callq 0xc920
jmp 0x77c01
jmp 0x77c03
leaq 0x5ca9e(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x77d22
leaq 0x5ca85(%rip), %rax     # 0xd46a8
movq %rax, -0x150(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x150(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x2e565(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x148(%rbp)
jmp 0x77c59
movq -0x148(%rbp), %rdi
leaq 0x30746(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x158(%rbp)
jmp 0x77c75
movq -0x158(%rbp), %rdi
leaq 0x2f021(%rip), %rsi     # 0xa6ca4
callq 0xc670
movq %rax, -0x160(%rbp)
jmp 0x77c91
movq -0x160(%rbp), %rdi
leaq 0x30b13(%rip), %rsi     # 0xa87b2
callq 0xc670
movq %rax, -0x168(%rbp)
jmp 0x77cad
movq -0x168(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x170(%rbp)
jmp 0x77cc9
movq -0x170(%rbp), %rdi
leaq 0x2ecf1(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x178(%rbp)
jmp 0x77ce5
movq -0x178(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x180(%rbp)
jmp 0x77cfe
movq -0x180(%rbp), %rdi
movq 0x5c2b4(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x77d13
leaq 0x5c98e(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x77d24
jmp 0x77d26
jmp 0x77d76
movq -0xd0(%rbp), %rax
cmpq $0x0, -0xc0(%rbp)
setne %cl
andb $0x1, %cl
movb %cl, 0x38(%rax)
jmp 0x77d42
jmp 0x77d44
movq -0xd0(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x88(%rbp), %rsi
callq 0x77e40
movb %al, -0x181(%rbp)
jmp 0x77d6b
movb -0x181(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x77d78
jmp 0x77d7a
jmp 0x77d7c
movb -0x29(%rbp), %al
movb %al, -0x182(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
leaq -0x88(%rbp), %rdi
callq 0xc3e0
leaq -0x50(%rbp), %rdi
callq 0xc3e0
movb -0x182(%rbp), %al
andb $0x1, %al
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0xcba0