// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/compcoup/compcoup.cc
// Function: scdc_compcoup::dataset_cmd(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 scdc_compcoup::dataset_cmd(const std::string &cmd, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
{
  SCDC_TRACE_F("cmd: '" << cmd << "'");

  bool ret = false;
  string res;

  string scmd, suri, sparams;
  split_cmdline(cmd.c_str(), cmd.size(), &scmd, &suri, &sparams);
  suri = ltrim(suri, ":");

  scdc_dataset *dataset = dataprovs->dataset_open(suri, res);

  if (!dataset)
  {
    result = "opening dataset '" + suri + "' failed: " + res;
    SCDC_FAIL_F(result);
    goto do_return;
  }

  SCDC_TRACE_F("dataset: " << dataset);

  {
    string cmdline;
    join_cmdline(scmd.c_str(), 0, sparams.c_str(), cmdline);

    ret = dataset->do_cmd(cmdline, input, output, result);

    if (!ret)
    {
      result = "command failed: " + result;
      SCDC_FAIL_F(result);
    }

    SCDC_TRACE_F("command " << (ret?"successful":"failed") << ", result: '" << result << "'");
  }

  if (!dataprovs->dataset_close(dataset, res))
  {
    result = "closing dataset failed: " + res + ", previous command " + (ret?"successful: ":"failed: ") + result;
    SCDC_FAIL_F(result);
    goto do_return;
  }

do_return:
  SCDC_TRACE_F("return: " << ret << ", result: '" + result + "'");

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r13
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rdi, %r14
xorl %ecx, %ecx
leaq 0xd8(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
leaq 0xb8(%rsp), %rdx
movq %rdx, -0x10(%rdx)
andq $0x0, -0x8(%rdx)
movb %cl, (%rax)
movb %cl, (%rdx)
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
leaq 0xc8(%rsp), %rdx
leaq 0x68(%rsp), %rcx
leaq 0xa8(%rsp), %r8
callq 0x1a97b
leaq 0x1814(%rip), %rsi      # 0x51344
leaq 0x68(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0xb300
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0xb0e0
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
callq 0xb2e0
movq 0x8(%r14), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x1c23e
movq %rax, %r15
testq %rax, %rax
je 0x4fdb1
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xc8(%rsp), %rdi
movq 0xa8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
xorl %esi, %esi
callq 0x1abbc
movq (%r15), %rax
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq *0x10(%rax)
movl %eax, %ebp
testb %al, %al
jne 0x4fc71
leaq 0x5977(%rip), %rsi      # 0x55547
leaq 0x8(%rsp), %rdi
movq %rbx, %rdx
callq 0x19ae2
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb690
movq %r12, %rdi
callq 0xb230
leaq 0x25984(%rip), %r12     # 0x75580
movq (%r12), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4fc71
addq $0x20, %rdi
callq 0xb800
movq (%r12), %rax
movq 0x8(%rax), %rdi
leaq 0x1569(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0x5911(%rip), %rsi      # 0x5553c
movq %rax, %rdi
callq 0xb520
leaq 0x809(%rip), %rsi       # 0x50443
movq %rax, %rdi
callq 0xb520
leaq 0x4e5a(%rip), %rsi      # 0x54aa3
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3e0
leaq 0x28(%rsp), %rdi
callq 0xb230
movq 0x8(%r14), %rdi
leaq 0x88(%rsp), %rdx
movq %r15, %rsi
callq 0x1c460
testb %al, %al
jne 0x4fea6
leaq 0x58ba(%rip), %rsi      # 0x55558
leaq 0xe8(%rsp), %rdi
leaq 0x88(%rsp), %rdx
callq 0x19ae2
leaq 0x58b7(%rip), %rdx      # 0x55571
leaq 0x48(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1cb18
leaq 0x58b2(%rip), %rax      # 0x55585
leaq 0x1ccd(%rip), %rdx      # 0x519a7
testb %bpl, %bpl
cmovneq %rax, %rdx
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1cb18
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x1eeb2
leaq 0x28(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x8(%rsp), %rdi
callq 0xb230
leaq 0x48(%rsp), %rdi
callq 0xb230
leaq 0xe8(%rsp), %rdi
callq 0xb230
leaq 0x2583e(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4fea6
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x1421(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0x57c9(%rip), %rsi      # 0x5553c
movq %rax, %rdi
callq 0xb520
leaq 0x6c1(%rip), %rsi       # 0x50443
movq %rax, %rdi
callq 0xb520
leaq 0x4d12(%rip), %rsi      # 0x54aa3
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
jmp 0x4fe8f
leaq 0x5772(%rip), %rsi      # 0x5552a
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x19ae2
leaq 0x1bd7(%rip), %rdx      # 0x519a5
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1cb18
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x1eeb2
leaq 0x28(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb690
movq %r14, %rdi
callq 0xb230
leaq 0x8(%rsp), %rdi
callq 0xb230
leaq 0x48(%rsp), %rdi
callq 0xb230
leaq 0x25759(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4fea4
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x1340(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0x56e8(%rip), %rsi      # 0x5553c
movq %rax, %rdi
callq 0xb520
leaq 0x5e0(%rip), %rsi       # 0x50443
movq %rax, %rdi
callq 0xb520
leaq 0x4c31(%rip), %rsi      # 0x54aa3
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb490
movq %rax, %rdi
callq 0xb270
xorl %ebp, %ebp
leaq 0x256ea(%rip), %rax     # 0x75580
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x4fea6
xorl %ebp, %ebp
leaq 0xa8(%rsp), %rdi
callq 0xb230
leaq 0x68(%rsp), %rdi
callq 0xb230
leaq 0xc8(%rsp), %rdi
callq 0xb230
leaq 0x88(%rsp), %rdi
callq 0xb230
movl %ebp, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb230
jmp 0x4fefd
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb230
jmp 0x4ff0c
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
jmp 0x4ff3d
jmp 0x4ff46
jmp 0x4ff35
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb230
jmp 0x4ff2c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x4ff3d
jmp 0x4ff46
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xb230
jmp 0x4ff49
jmp 0x4ff46
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xb230
leaq 0x68(%rsp), %rdi
callq 0xb230
leaq 0xc8(%rsp), %rdi
callq 0xb230
leaq 0x88(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0