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

      if (input && strcmp(input->format, "fstar") == 0)
      {
        SCDC_TRACE(__func__ << ": fstar input to directory");

        string conf = "to:fs";

        if (scdc_dataset_input_redirect(input, conf.c_str(), abs_path.c_str()) != SCDC_SUCCESS)
        {
          result = "input redirection failed";
          SCDC_FAIL(__func__ << ": redirecting input to directory '" << abs_path << "' failed: " << result);

        } else ret = true;

      } else
      {
        string p = psl.front_pop();

        if (!p.empty() && p[0] == 'd')
        {
          SCDC_TRACE(__func__ << ": create directory");

          if (!z_fs_mkdir(abs_path.c_str()))
          {
            result = "directory creation failed";
            SCDC_FAIL(__func__ << ": creating directory '" << abs_path << "' failed: " << result);

          } else ret = true;

        } else
        {
          SCDC_TRACE(__func__ << ": plain input to file");

          size_t i = 0;

          if (!p.empty() && p[0] == 'f')
          {
            ++i;

            if (p.size() > 1 && p[1] == ':') ++i;
          }

          string conf = "to:streamdup:" + p.substr(i);

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

          if (!file || scdc_dataset_input_redirect(input, conf.c_str(), file) != SCDC_SUCCESS)
          {
            result = "input redirection failed";
            SCDC_FAIL(__func__ << ": redirecting input to file '" << abs_path << "' failed: " << result);

          } else ret = true;

          close_file(file);
        }
      }

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

      return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
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, -0x190(%rbp)
jmp 0x72f7c
movb $0x0, -0x29(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0xc270
movq -0x198(%rbp), %rdx
leaq -0x58(%rbp), %rdi
movl $0x20, %esi
callq 0x5ff80
jmp 0x72fab
leaq -0x78(%rbp), %rdi
callq 0xc3e0
movq -0x190(%rbp), %rax
movb 0x38(%rax), %al
movb $0x0, -0xaa(%rbp)
testb $0x1, %al
jne 0x72fdd
leaq -0xa8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x25b00
jmp 0x72fdb
jmp 0x73015
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0xcbc0
movq -0x1a0(%rbp), %rdx
movb $0x1, -0xaa(%rbp)
leaq 0x3359f(%rip), %rsi     # 0xa65a4
leaq -0xa8(%rbp), %rdi
callq 0x27820
jmp 0x73013
jmp 0x73015
testb $0x1, -0xaa(%rbp)
jne 0x73020
jmp 0x7302c
leaq -0xa9(%rbp), %rdi
callq 0xc730
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0xc960
leaq -0xf0(%rbp), %rdi
callq 0xc960
movq -0x190(%rbp), %rdi
callq 0x77520
movq -0x190(%rbp), %rsi
movq -0x1b0(%rbp), %rcx
movq %rax, %rdi
addq $0x18, %rsi
leaq -0xa8(%rbp), %rdx
callq 0x714c0
movb %al, -0x1a1(%rbp)
jmp 0x73080
movb -0x1a1(%rbp), %al
testb $0x1, %al
jne 0x7327a
jmp 0x73090
movq -0x28(%rbp), %rdi
leaq 0x34f93(%rip), %rsi     # 0xa802e
callq 0xc920
jmp 0x730a2
jmp 0x730a4
leaq 0x615fd(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x73271
leaq 0x615e4(%rip), %rax     # 0xd46a8
movq %rax, -0x1c0(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x1c0(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x330c4(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x1b8(%rbp)
jmp 0x730fa
movq -0x1b8(%rbp), %rdi
leaq 0x352a5(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x1c8(%rbp)
jmp 0x73116
movq -0x1c8(%rbp), %rdi
leaq 0x33a28(%rip), %rsi     # 0xa6b4c
callq 0xc670
movq %rax, -0x1d0(%rbp)
jmp 0x73132
movq -0x1d0(%rbp), %rdi
leaq 0x35281(%rip), %rsi     # 0xa83c1
callq 0xc670
movq %rax, -0x1d8(%rbp)
jmp 0x7314e
movq -0x1d8(%rbp), %rdi
movq -0x190(%rbp), %rsi
addq $0x18, %rsi
callq 0xc5b0
movq %rax, -0x1e0(%rbp)
jmp 0x7316e
movq -0x1e0(%rbp), %rdi
leaq 0x35253(%rip), %rsi     # 0xa83cf
callq 0xc670
movq %rax, -0x1e8(%rbp)
jmp 0x7318a
movq -0x1e8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x1f0(%rbp)
jmp 0x731a6
movq -0x1f0(%rbp), %rdi
leaq 0x33814(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x1f8(%rbp)
jmp 0x731c2
movq -0x1f8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x200(%rbp)
jmp 0x731db
movq -0x200(%rbp), %rdi
movq 0x60dd7(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x731f0
leaq 0x614b1(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x73271
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x78(%rbp), %rdi
callq 0xc3e0
jmp 0x73a82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x73a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
testb $0x1, -0xaa(%rbp)
jne 0x7324c
jmp 0x73258
leaq -0xa9(%rbp), %rdi
callq 0xc730
jmp 0x73a79
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x73a55
jmp 0x73273
jmp 0x73275
jmp 0x73a08
movq -0x190(%rbp), %rdi
callq 0x77520
movq %rax, %rdi
leaq -0xd0(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x71620
jmp 0x7329e
jmp 0x732a0
jmp 0x732a2
jmp 0x732a4
cmpq $0x0, -0x18(%rbp)
je 0x734f5
movq -0x18(%rbp), %rdi
leaq 0x34222(%rip), %rsi     # 0xa74dc
callq 0xc970
cmpl $0x0, %eax
jne 0x734f5
jmp 0x732ca
jmp 0x732cc
jmp 0x732ce
leaq -0x111(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0xcbc0
movq -0x208(%rbp), %rdx
leaq 0x3511f(%rip), %rsi     # 0xa840e
leaq -0x110(%rbp), %rdi
callq 0x27820
jmp 0x732fd
leaq -0x111(%rbp), %rdi
callq 0xc730
movq -0x18(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc260
movq %rax, -0x218(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xc260
movq -0x220(%rbp), %rdi
movq -0x218(%rbp), %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x47060
movq %rax, -0x210(%rbp)
jmp 0x73354
movq -0x210(%rbp), %rax
cmpq $0x1, %rax
je 0x734e0
movq -0x28(%rbp), %rdi
leaq 0x35365(%rip), %rsi     # 0xa86d5
callq 0xc920
jmp 0x73377
jmp 0x73379
leaq 0x61328(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x734da
leaq 0x6130f(%rip), %rax     # 0xd46a8
movq %rax, -0x230(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x230(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x32def(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x228(%rbp)
jmp 0x733cf
movq -0x228(%rbp), %rdi
leaq 0x34fd0(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x238(%rbp)
jmp 0x733eb
movq -0x238(%rbp), %rdi
leaq 0x33753(%rip), %rsi     # 0xa6b4c
callq 0xc670
movq %rax, -0x240(%rbp)
jmp 0x73407
movq -0x240(%rbp), %rdi
leaq 0x34fff(%rip), %rsi     # 0xa8414
callq 0xc670
movq %rax, -0x248(%rbp)
jmp 0x73423
movq -0x248(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x250(%rbp)
jmp 0x7343f
movq -0x250(%rbp), %rdi
leaq 0x3357b(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x258(%rbp)
jmp 0x7345b
movq -0x258(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x260(%rbp)
jmp 0x73474
movq -0x260(%rbp), %rdi
movq 0x60b3e(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x73489
leaq 0x61218(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x734da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x111(%rbp), %rdi
callq 0xc730
jmp 0x73a55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc3e0
jmp 0x73a55
jmp 0x734dc
jmp 0x734de
jmp 0x734e4
movb $0x1, -0x29(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc3e0
jmp 0x73a06
leaq -0x138(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x25b00
jmp 0x73507
leaq -0x138(%rbp), %rdi
callq 0xcb60
testb $0x1, %al
jne 0x736d3
xorl %eax, %eax
movl %eax, %esi
leaq -0x138(%rbp), %rdi
callq 0xcd00
movq %rax, -0x268(%rbp)
jmp 0x73534
movq -0x268(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x64, %eax
jne 0x736d3
jmp 0x73549
jmp 0x7354b
jmp 0x7354d
leaq -0xf0(%rbp), %rdi
callq 0xc260
movq %rax, %rdi
callq 0x5d710
movq %rax, -0x270(%rbp)
jmp 0x7356a
movq -0x270(%rbp), %rax
cmpq $0x0, %rax
jne 0x736ca
movq -0x28(%rbp), %rdi
leaq 0x34eb1(%rip), %rsi     # 0xa8437
callq 0xc920
jmp 0x7358d
jmp 0x7358f
leaq 0x61112(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x736c4
leaq 0x610f9(%rip), %rax     # 0xd46a8
movq %rax, -0x280(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x280(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x32bd9(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x278(%rbp)
jmp 0x735e5
movq -0x278(%rbp), %rdi
leaq 0x34dba(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x288(%rbp)
jmp 0x73601
movq -0x288(%rbp), %rdi
leaq 0x3353d(%rip), %rsi     # 0xa6b4c
callq 0xc670
movq %rax, -0x290(%rbp)
jmp 0x7361d
movq -0x290(%rbp), %rdi
leaq 0x34e26(%rip), %rsi     # 0xa8451
callq 0xc670
movq %rax, -0x298(%rbp)
jmp 0x73639
movq -0x298(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x2a0(%rbp)
jmp 0x73655
movq -0x2a0(%rbp), %rdi
leaq 0x33365(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x2a8(%rbp)
jmp 0x73671
movq -0x2a8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x2b0(%rbp)
jmp 0x7368a
movq -0x2b0(%rbp), %rdi
movq 0x60928(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x7369f
leaq 0x61002(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x736c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x739f8
jmp 0x736c6
jmp 0x736c8
jmp 0x736ce
movb $0x1, -0x29(%rbp)
jmp 0x739ea
jmp 0x736d5
jmp 0x736d7
jmp 0x736d9
movq $0x0, -0x140(%rbp)
leaq -0x138(%rbp), %rdi
callq 0xcb60
testb $0x1, %al
jne 0x73781
xorl %eax, %eax
movl %eax, %esi
leaq -0x138(%rbp), %rdi
callq 0xcd00
movq %rax, -0x2b8(%rbp)
jmp 0x73711
movq -0x2b8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jne 0x73781
movq -0x140(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
leaq -0x138(%rbp), %rdi
callq 0xc460
cmpq $0x1, %rax
jbe 0x7377f
leaq -0x138(%rbp), %rdi
movl $0x1, %esi
callq 0xcd00
movq %rax, -0x2c0(%rbp)
jmp 0x7375e
movq -0x2c0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x7377f
movq -0x140(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x140(%rbp)
jmp 0x73781
movq -0x140(%rbp), %rdx
leaq -0x180(%rbp), %rdi
leaq -0x138(%rbp), %rsi
movq $-0x1, %rcx
callq 0xc6b0
jmp 0x737a4
leaq 0x34cbd(%rip), %rsi     # 0xa8468
leaq -0x160(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x3b040
jmp 0x737c0
leaq -0x180(%rbp), %rdi
callq 0xc3e0
movq -0x190(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x77540
movq %rax, -0x2c8(%rbp)
jmp 0x737ef
movq -0x2c8(%rbp), %rax
movq %rax, -0x188(%rbp)
cmpq $0x0, -0x188(%rbp)
je 0x73850
movq -0x18(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x160(%rbp), %rdi
callq 0xc260
movq -0x2d8(%rbp), %rdi
movq %rax, %rsi
movq -0x188(%rbp), %rdx
xorl %eax, %eax
callq 0x47060
movq %rax, -0x2d0(%rbp)
jmp 0x7383f
movq -0x2d0(%rbp), %rax
cmpq $0x1, %rax
je 0x739c5
movq -0x28(%rbp), %rdi
leaq 0x34e7a(%rip), %rsi     # 0xa86d5
callq 0xc920
jmp 0x73862
jmp 0x73864
leaq 0x60e3d(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x739bf
leaq 0x60e24(%rip), %rax     # 0xd46a8
movq %rax, -0x2e8(%rbp)
movq (%rax), %rdi
callq 0x25800
movq -0x2e8(%rbp), %rax
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x32904(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x2e0(%rbp)
jmp 0x738ba
movq -0x2e0(%rbp), %rdi
leaq 0x34ae5(%rip), %rsi     # 0xa83ad
callq 0xc670
movq %rax, -0x2f0(%rbp)
jmp 0x738d6
movq -0x2f0(%rbp), %rdi
leaq 0x33268(%rip), %rsi     # 0xa6b4c
callq 0xc670
movq %rax, -0x2f8(%rbp)
jmp 0x738f2
movq -0x2f8(%rbp), %rdi
leaq 0x34b76(%rip), %rsi     # 0xa8476
callq 0xc670
movq %rax, -0x300(%rbp)
jmp 0x7390e
movq -0x300(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x308(%rbp)
jmp 0x7392a
movq -0x308(%rbp), %rdi
leaq 0x33090(%rip), %rsi     # 0xa69c8
callq 0xc670
movq %rax, -0x310(%rbp)
jmp 0x73946
movq -0x310(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x318(%rbp)
jmp 0x7395f
movq -0x318(%rbp), %rdi
movq 0x60653(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x73974
leaq 0x60d2d(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x739bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x180(%rbp), %rdi
callq 0xc3e0
jmp 0x739f8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x160(%rbp), %rdi
callq 0xc3e0
jmp 0x739f8
jmp 0x739c1
jmp 0x739c3
jmp 0x739c9
movb $0x1, -0x29(%rbp)
movq -0x190(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0x77710
jmp 0x739de
leaq -0x160(%rbp), %rdi
callq 0xc3e0
leaq -0x138(%rbp), %rdi
callq 0xc3e0
jmp 0x73a06
leaq -0x138(%rbp), %rdi
callq 0xc3e0
jmp 0x73a55
jmp 0x73a08
jmp 0x73a0a
jmp 0x73a0c
jmp 0x73a0e
movb -0x29(%rbp), %al
movb %al, -0x319(%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 -0x319(%rbp), %al
andb $0x1, %al
addq $0x320, %rsp            # imm = 0x320
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,%rax)