// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %rbx
movq %rdx, %r15
movq %rdi, %r14
leaq 0xd0(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x1d0a0
leaq 0xe0(%rsp), %rdi
movl $0x20, %esi
movq %r12, %rdx
callq 0x37a30
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0x465e7
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0xb510
cmpb $0x0, 0x38(%r14)
je 0x4660d
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x24f2f(%rip), %rdx     # 0x6b52d
leaq 0x40(%rsp), %rdi
movq %rdx, %rsi
callq 0x1be38
jmp 0x4661f
leaq 0x40(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x1b878
leaq 0x90(%rsp), %r12
movq %r12, -0x10(%r12)
xorl %eax, %eax
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
leaq 0x18(%r14), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x45584
testb %al, %al
je 0x467ea
movq 0x8(%r14), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x456e0
testq %r15, %r15
je 0x46698
leaq 0x24e9d(%rip), %rsi     # 0x6b525
movq %r15, %rdi
callq 0xb770
testl %eax, %eax
je 0x46981
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x1b878
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
je 0x46919
movq (%rsp), %rax
movzbl (%rax), %edx
cmpl $0x66, %edx
je 0x46cf1
cmpl $0x64, %edx
jne 0x46919
movq 0x20(%rsp), %rdi
callq 0x358e4
movb $0x1, %bpl
testq %rax, %rax
jne 0x46c66
movq 0x8(%rbx), %rdx
leaq 0x25d47(%rip), %rcx     # 0x6c437
movl $0x19, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x45e69(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x467e3
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x23a7c(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x25c6d(%rip), %rsi     # 0x6c3ad
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x243b0(%rip), %rsi     # 0x6ab04
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x25ce9(%rip), %rsi     # 0x6c451
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x2427f(%rip), %rsi     # 0x6aa10
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
jmp 0x46c66
movq 0x8(%rbx), %rdx
leaq 0x25831(%rip), %rcx     # 0x6c026
movl $0xc, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x45d64(%rip), %rbp     # 0x8c570
movq (%rbp), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x46912
addq $0x20, %rdi
callq 0xb7d0
movq (%rbp), %rax
movq 0x8(%rax), %r15
leaq 0x23975(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x25b66(%rip), %rsi     # 0x6c3ad
movl $0x13, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x242a9(%rip), %rsi     # 0x6ab04
movl $0xa, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x25b52(%rip), %rsi     # 0x6c3c1
movl $0xd, %edx
movq %r15, %rdi
callq 0xb5f0
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x25b39(%rip), %rsi     # 0x6c3cf
movl $0x5, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x24151(%rip), %rsi     # 0x6aa10
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%rbp), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
jmp 0x46c81
xorl %edx, %edx
leaq 0xa0(%rsp), %rdi
movq %rsp, %rsi
movq $-0x1, %rcx
callq 0xb530
leaq 0x25b2f(%rip), %rcx     # 0x6c468
leaq 0xa0(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0xb5d0
leaq 0x70(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x46acd
movq %rsi, %r12
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x46ad6
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x25a7d(%rip), %rsi     # 0x6c40e
leaq 0x25a7b(%rip), %rdx     # 0x6c413
movq %rsp, %rdi
callq 0x1be38
movq (%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2df76
cmpq $0x1, %rax
sete %bpl
je 0x46abf
movq 0x8(%rbx), %rdx
leaq 0x25d09(%rip), %rcx     # 0x6c6d5
movl $0x18, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x45b8d(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x46abf
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x237a0(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x25991(%rip), %rsi     # 0x6c3ad
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x240d4(%rip), %rsi     # 0x6ab04
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x259d0(%rip), %rsi     # 0x6c414
movl $0x22, %edx
movq %r14, %rdi
callq 0xb5f0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x23fa3(%rip), %rsi     # 0x6aa10
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0x46c6f
movups (%rcx), %xmm0
movq %rsi, %r12
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46b0f
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x4a290
testq %rax, %rax
je 0x46b47
movq 0x60(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2df76
movb $0x1, %bpl
cmpq $0x1, %rax
je 0x46c47
movq 0x8(%rbx), %rdx
leaq 0x25b83(%rip), %rcx     # 0x6c6d5
movl $0x18, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x45a07(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x46c45
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x2361a(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x2580b(%rip), %rsi     # 0x6c3ad
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x23f4e(%rip), %rsi     # 0x6ab04
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x258ac(%rip), %rsi     # 0x6c476
movl $0x1d, %edx
movq %r14, %rdi
callq 0xb5f0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x23e1d(%rip), %rsi     # 0x6aa10
movl $0xa, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebp, %ebp
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x46c5e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x90(%rsp), %r12
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46c81
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x46c98
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x46cb5
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46cd0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xe0(%rsp), %rdi
callq 0x1bad0
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edx
cmpq $0x1, %rcx
je 0x4691b
xorl %edx, %edx
cmpb $0x3a, 0x1(%rax)
sete %dl
incq %rdx
jmp 0x4691b
jmp 0x46db5
jmp 0x46d36
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46d98
movq 0xb0(%rsp), %rsi
jmp 0x46d90
movq %rax, %rbx
jmp 0x46d98
jmp 0x46db5
jmp 0x46d3f
movq %rax, %rbx
jmp 0x46e0f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0x46da1
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0x46e1c
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x46e1c
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x46d98
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46db8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x46db8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x46dcf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x46df4
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x46e0f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xe0(%rsp), %rdi
callq 0x1bad0
movq %rbx, %rdi
callq 0xb9c0