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

      bool ret = false;

      stringlist psl(' ', params);

      const string sub = (!pwd_file)?psl.front_pop():"";
      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_get: pwd_path: '" << pwd_path << "', abs_path: '" << abs_path << "'");

      if (z_fs_is_directory(abs_path.c_str()))
      {
        SCDC_TRACE("do_cmd_get: fstar output from directory");

        if (scdc_dataset_output_redirect(output, "from:fs", abs_path.c_str(), params.c_str()) != SCDC_SUCCESS)
        {
          result = "output redirection failed";
          SCDC_FAIL("do_cmd_get: redirecting output '" << params << "' from directory '" << abs_path.c_str() << "' failed: " << result);

        } else ret = true;

      } else
      {
        SCDC_TRACE("do_cmd_get: plain output from file");

        string conf = "from:streamdup:" + psl.front_pop();

        FILE *file = open_file(abs_path, true, false);

        if (scdc_dataset_output_redirect(output, conf.c_str(), file) != SCDC_SUCCESS)
        {
          result = "output redirection failed";
          SCDC_FAIL("do_cmd_get: redirecting output from file '" << abs_path << "' failed: " << result);

        } else ret = true;

        close_file(file);
      }

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

      return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
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, -0x140(%rbp)
jmp 0x73abc
movb $0x0, -0x29(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0xc270
movq -0x148(%rbp), %rdx
leaq -0x58(%rbp), %rdi
movl $0x20, %esi
callq 0x5ff80
jmp 0x73aeb
leaq -0x78(%rbp), %rdi
callq 0xc3e0
movq -0x140(%rbp), %rax
movb 0x38(%rax), %al
movb $0x0, -0xaa(%rbp)
testb $0x1, %al
jne 0x73b1d
leaq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x25b00
jmp 0x73b1b
jmp 0x73b55
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0xcbc0
movq -0x150(%rbp), %rdx
movb $0x1, -0xaa(%rbp)
leaq 0x32a5f(%rip), %rsi     # 0xa65a4
leaq -0xa8(%rbp), %rdi
callq 0x27820
jmp 0x73b53
jmp 0x73b55
testb $0x1, -0xaa(%rbp)
jne 0x73b60
jmp 0x73b6c
leaq -0xa9(%rbp), %rdi
callq 0xc730
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0xc960
leaq -0xf0(%rbp), %rdi
callq 0xc960
movq -0x140(%rbp), %rdi
callq 0x77520
movq -0x140(%rbp), %rsi
movq -0x160(%rbp), %rcx
movq %rax, %rdi
addq $0x18, %rsi
leaq -0xa8(%rbp), %rdx
callq 0x714c0
movb %al, -0x151(%rbp)
jmp 0x73bc0
movb -0x151(%rbp), %al
testb $0x1, %al
jne 0x73dba
jmp 0x73bd0
movq -0x28(%rbp), %rdi
leaq 0x34453(%rip), %rsi     # 0xa802e
callq 0xc920
jmp 0x73be2
jmp 0x73be4
leaq 0x60abd(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x73db1
leaq 0x60aa4(%rip), %rax     # 0xd46a8
movq %rax, -0x170(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x170(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x32584(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x168(%rbp)
jmp 0x73c3a
movq -0x168(%rbp), %rdi
leaq 0x34765(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x178(%rbp)
jmp 0x73c56
movq -0x178(%rbp), %rdi
leaq 0x32f60(%rip), %rsi     # 0xa6bc4
callq 0xc670
movq %rax, -0x180(%rbp)
jmp 0x73c72
movq -0x180(%rbp), %rdi
leaq 0x34741(%rip), %rsi     # 0xa83c1
callq 0xc670
movq %rax, -0x188(%rbp)
jmp 0x73c8e
movq -0x188(%rbp), %rdi
movq -0x140(%rbp), %rsi
addq $0x18, %rsi
callq 0xc5b0
movq %rax, -0x190(%rbp)
jmp 0x73cae
movq -0x190(%rbp), %rdi
leaq 0x34713(%rip), %rsi     # 0xa83cf
callq 0xc670
movq %rax, -0x198(%rbp)
jmp 0x73cca
movq -0x198(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x1a0(%rbp)
jmp 0x73ce6
movq -0x1a0(%rbp), %rdi
leaq 0x32cd4(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x1a8(%rbp)
jmp 0x73d02
movq -0x1a8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x1b0(%rbp)
jmp 0x73d1b
movq -0x1b0(%rbp), %rdi
movq 0x60297(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x73d30
leaq 0x60971(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x73db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xc3e0
jmp 0x74290
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x74287
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0xaa(%rbp)
jne 0x73d8c
jmp 0x73d98
leaq -0xa9(%rbp), %rdi
callq 0xc730
jmp 0x74287
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x74263
jmp 0x73db3
jmp 0x73db5
jmp 0x74216
movq -0x140(%rbp), %rdi
callq 0x77520
movq %rax, %rdi
leaq -0xd0(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x71620
jmp 0x73dde
jmp 0x73de0
jmp 0x73de2
jmp 0x73de4
leaq -0xf0(%rbp), %rdi
callq 0xc260
movq %rax, %rdi
callq 0x5d460
movq %rax, -0x1b8(%rbp)
jmp 0x73e01
movq -0x1b8(%rbp), %rax
cmpq $0x0, %rax
je 0x73fdb
jmp 0x73e14
jmp 0x73e16
jmp 0x73e18
movq -0x20(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xc260
movq %rax, -0x1c8(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc260
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rdx
movq %rax, %rcx
leaq 0x34640(%rip), %rsi     # 0xa8497
xorl %eax, %eax
callq 0x47200
movq %rax, -0x1c0(%rbp)
jmp 0x73e67
movq -0x1c0(%rbp), %rax
cmpq $0x1, %rax
je 0x73fd2
movq -0x28(%rbp), %rdi
leaq 0x3461c(%rip), %rsi     # 0xa849f
callq 0xc920
jmp 0x73e8a
jmp 0x73e8c
leaq 0x60815(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x73fcc
leaq 0x607fc(%rip), %rax     # 0xd46a8
movq %rax, -0x1e0(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x1e0(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x322dc(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x1d8(%rbp)
jmp 0x73ee2
movq -0x1d8(%rbp), %rdi
leaq 0x344bd(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x1e8(%rbp)
jmp 0x73efe
movq -0x1e8(%rbp), %rdi
leaq 0x345ad(%rip), %rsi     # 0xa84b9
callq 0xc670
movq %rax, -0x1f0(%rbp)
jmp 0x73f1a
movq -0x1f0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x1f8(%rbp)
jmp 0x73f33
movq -0x1f8(%rbp), %rdi
leaq 0x34599(%rip), %rsi     # 0xa84da
callq 0xc670
movq %rax, -0x200(%rbp)
jmp 0x73f4f
leaq -0xf0(%rbp), %rdi
callq 0xc260
movq -0x200(%rbp), %rdi
movq %rax, %rsi
callq 0xc670
movq %rax, -0x208(%rbp)
jmp 0x73f73
movq -0x208(%rbp), %rdi
leaq 0x32a47(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x210(%rbp)
jmp 0x73f8f
movq -0x210(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x218(%rbp)
jmp 0x73fa8
movq -0x218(%rbp), %rdi
movq 0x6000a(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x73fbd
leaq 0x606e4(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x73fce
jmp 0x73fd0
jmp 0x73fd6
movb $0x1, -0x29(%rbp)
jmp 0x74214
jmp 0x73fdd
jmp 0x73fdf
jmp 0x73fe1
leaq -0x130(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x25b00
jmp 0x73ff3
leaq 0x344f3(%rip), %rsi     # 0xa84ed
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rdx
callq 0x3b040
jmp 0x7400f
leaq -0x130(%rbp), %rdi
callq 0xc3e0
movq -0x140(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x77540
movq %rax, -0x220(%rbp)
jmp 0x7403e
movq -0x220(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc260
movq -0x230(%rbp), %rdi
movq %rax, %rsi
movq -0x138(%rbp), %rdx
xorl %eax, %eax
callq 0x47200
movq %rax, -0x228(%rbp)
jmp 0x74084
movq -0x228(%rbp), %rax
cmpq $0x1, %rax
je 0x741f1
movq -0x28(%rbp), %rdi
leaq 0x343ff(%rip), %rsi     # 0xa849f
callq 0xc920
jmp 0x740a7
jmp 0x740a9
leaq 0x605f8(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x741eb
leaq 0x605df(%rip), %rax     # 0xd46a8
movq %rax, -0x240(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x240(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x320bf(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x238(%rbp)
jmp 0x740ff
movq -0x238(%rbp), %rdi
leaq 0x342a0(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x248(%rbp)
jmp 0x7411b
movq -0x248(%rbp), %rdi
leaq 0x343d4(%rip), %rsi     # 0xa84fd
callq 0xc670
movq %rax, -0x250(%rbp)
jmp 0x74137
movq -0x250(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x258(%rbp)
jmp 0x74153
movq -0x258(%rbp), %rdi
leaq 0x32867(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x260(%rbp)
jmp 0x7416f
movq -0x260(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x268(%rbp)
jmp 0x74188
movq -0x268(%rbp), %rdi
movq 0x5fe2a(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x7419d
leaq 0x60504(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x741eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x130(%rbp), %rdi
callq 0xc3e0
jmp 0x74263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc3e0
jmp 0x74263
jmp 0x741ed
jmp 0x741ef
jmp 0x741f5
movb $0x1, -0x29(%rbp)
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x77710
leaq -0x110(%rbp), %rdi
callq 0xc3e0
jmp 0x74216
jmp 0x74218
jmp 0x7421a
jmp 0x7421c
movb -0x29(%rbp), %al
movb %al, -0x269(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xc3e0
leaq -0xd0(%rbp), %rdi
callq 0xc3e0
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
leaq -0x58(%rbp), %rdi
callq 0x25c90
movb -0x269(%rbp), %al
andb $0x1, %al
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
leaq -0xf0(%rbp), %rdi
callq 0xc3e0
leaq -0xd0(%rbp), %rdi
callq 0xc3e0
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
leaq -0x58(%rbp), %rdi
callq 0x25c90
movq -0x80(%rbp), %rdi
callq 0xcba0
nopl (%rax)