// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d19a
leaq 0xe0(%rsp), %rdi
movl $0x20, %esi
movq %r12, %rdx
callq 0x37d96
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0x46b37
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0xb510
cmpb $0x0, 0x38(%r14)
je 0x46b5d
leaq 0x70(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x249bf(%rip), %rdx     # 0x6b50d
leaq 0x60(%rsp), %rdi
movq %rdx, %rsi
callq 0x1bee6
jmp 0x46b6f
leaq 0x60(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x1b92c
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 0x60(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x45ada
testb %al, %al
je 0x46d2e
movq 0x8(%r14), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x45c32
testq %r15, %r15
je 0x46be8
leaq 0x2492d(%rip), %rsi     # 0x6b505
movq %r15, %rdi
callq 0xb770
testl %eax, %eax
je 0x46ee9
movq %rsp, %rdi
leaq 0xe0(%rsp), %rsi
callq 0x1b92c
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x46e84
movq (%rsp), %rcx
cmpb $0x64, (%rcx)
jne 0x46e5d
movq 0x20(%rsp), %rdi
callq 0x35c2e
movb $0x1, %bpl
testq %rax, %rax
jne 0x471c8
movq 0x8(%rbx), %rdx
leaq 0x2578b(%rip), %rcx     # 0x6c3bf
movl $0x19, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x45925(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x46d27
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x23518(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x256b1(%rip), %rsi     # 0x6c335
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x23e4c(%rip), %rsi     # 0x6aae4
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x2572d(%rip), %rsi     # 0x6c3d9
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 0x23d1b(%rip), %rsi     # 0x6a9f0
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 0x471c8
movq 0x8(%rbx), %rdx
leaq 0x25275(%rip), %rcx     # 0x6bfae
movl $0xc, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x45820(%rip), %rbp     # 0x8c570
movq (%rbp), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x46e56
addq $0x20, %rdi
callq 0xb7d0
movq (%rbp), %rax
movq 0x8(%rax), %r15
leaq 0x23411(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x255aa(%rip), %rsi     # 0x6c335
movl $0x13, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x23d45(%rip), %rsi     # 0x6aae4
movl $0xa, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x25596(%rip), %rsi     # 0x6c349
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 0x2557d(%rip), %rsi     # 0x6c357
movl $0x5, %edx
movq %rax, %rdi
callq 0xb5f0
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %r14, %rdi
callq 0xb5f0
movq %rax, %r14
leaq 0x23bed(%rip), %rsi     # 0x6a9f0
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 0x471e3
testq %rax, %rax
je 0x46e84
movq (%rsp), %rcx
cmpb $0x66, (%rcx)
jne 0x46e84
movl $0x1, %edx
cmpq $0x1, %rax
je 0x46e86
xorl %edx, %edx
cmpb $0x3a, 0x1(%rcx)
sete %dl
incq %rdx
jmp 0x46e86
xorl %edx, %edx
leaq 0xa0(%rsp), %rdi
movq %rsp, %rsi
movq $-0x1, %rcx
callq 0xb530
leaq 0x2554c(%rip), %rcx     # 0x6c3f0
leaq 0xa0(%rsp), %rdi
movl $0xd, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0xb5d0
leaq 0x50(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x47035
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x4703b
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2549d(%rip), %rsi     # 0x6c396
leaq 0x2549b(%rip), %rdx     # 0x6c39b
movq %rsp, %rdi
callq 0x1bee6
movq (%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e213
cmpq $0x1, %rax
sete %bpl
je 0x47027
movq 0x8(%rbx), %rdx
leaq 0x25729(%rip), %rcx     # 0x6c65d
movl $0x18, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x45625(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x47027
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x23218(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x253b1(%rip), %rsi     # 0x6c335
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x23b4c(%rip), %rsi     # 0x6aae4
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x253f0(%rip), %rsi     # 0x6c39c
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 0x23a1b(%rip), %rsi     # 0x6a9f0
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 0x471d1
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47074
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x4a7d2
testq %rax, %rax
je 0x470ac
movq 0x40(%rsp), %rsi
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2e213
movb $0x1, %bpl
cmpq $0x1, %rax
je 0x471ac
movq 0x8(%rbx), %rdx
leaq 0x255a6(%rip), %rcx     # 0x6c65d
movl $0x18, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x454a2(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x471aa
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x23095(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x2522e(%rip), %rsi     # 0x6c335
movl $0x13, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x239c9(%rip), %rsi     # 0x6aae4
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x252cf(%rip), %rsi     # 0x6c3fe
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 0x23898(%rip), %rsi     # 0x6a9f0
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 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x471c8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x471e3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x471fa
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x47217
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47232
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xe0(%rsp), %rdi
callq 0x1bb7e
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x472ff
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x472e2
movq 0xb0(%rsp), %rsi
jmp 0x472da
jmp 0x4727d
jmp 0x472ff
movq %rax, %rbx
jmp 0x472e2
jmp 0x47284
movq %rax, %rbx
jmp 0x47351
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0x472eb
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
cmpq %r13, %rdi
je 0x4735e
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x4735e
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x472e2
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47302
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x47302
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x47319
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x80(%rsp), %rdi
cmpq %r12, %rdi
je 0x47336
movq 0x90(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x47351
movq 0x70(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0xe0(%rsp), %rdi
callq 0x1bb7e
movq %rbx, %rdi
callq 0xb9c0