// File: 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
movq %rsp, %rbp
subq $0x2f0, %rsp            # imm = 0x2F0
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, -0x1f0(%rbp)
jmp 0xa44fc
movb $0x0, -0x29(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xc960
leaq -0x70(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0xc960
leaq -0x90(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0xc960
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0xc960
movq -0x10(%rbp), %rdi
callq 0xc260
movq %rax, -0x210(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc460
movq -0x210(%rbp), %rdi
movq -0x208(%rbp), %rdx
movq -0x200(%rbp), %rcx
movq -0x1f8(%rbp), %r8
movq %rax, %rsi
callq 0x2a040
jmp 0xa457e
leaq 0x1ddf(%rip), %rsi      # 0xa6364
leaq -0x90(%rbp), %rdi
callq 0xa4cc0
movq %rax, -0x218(%rbp)
jmp 0xa459a
movq -0x218(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0xc070
jmp 0xa45af
movq -0x1f0(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x2d950
movq %rax, -0x220(%rbp)
jmp 0xa45d3
movq -0x220(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0xa47da
leaq 0x5f7c(%rip), %rsi      # 0xaa572
leaq -0x128(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x25900
jmp 0xa460b
leaq 0x23b6(%rip), %rdx      # 0xa69c8
leaq -0x108(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x2eef0
jmp 0xa4627
leaq -0xe8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x34a30
jmp 0xa4640
movq -0x28(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0xc850
leaq -0xe8(%rbp), %rdi
callq 0xc3e0
leaq -0x108(%rbp), %rdi
callq 0xc3e0
leaq -0x128(%rbp), %rdi
callq 0xc3e0
leaq 0x3002d(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0x228(%rbp)
jmp 0xa468c
movq -0x228(%rbp), %rax
cmpq $0x0, %rax
je 0xa47d1
leaq 0x30004(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
jmp 0xa46ae
leaq 0x2fff3(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0x230(%rbp)
jmp 0xa46c6
movq -0x230(%rbp), %rdi
leaq 0x1adc(%rip), %rsi      # 0xa61b0
callq 0xc670
movq %rax, -0x238(%rbp)
jmp 0xa46e2
movq -0x238(%rbp), %rdi
leaq 0x5e94(%rip), %rsi      # 0xaa584
callq 0xc670
movq %rax, -0x240(%rbp)
jmp 0xa46fe
movq -0x240(%rbp), %rdi
leaq 0xd3f(%rip), %rsi       # 0xa544b
callq 0xc670
movq %rax, -0x248(%rbp)
jmp 0xa471a
movq -0x248(%rbp), %rdi
leaq 0x53c3(%rip), %rsi      # 0xa9aeb
callq 0xc670
movq %rax, -0x250(%rbp)
jmp 0xa4736
movq -0x250(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x258(%rbp)
jmp 0xa474f
movq -0x258(%rbp), %rdi
movq 0x2f863(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0xa4764
leaq 0x2ff3d(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0xa4775
jmp 0xa47d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xa4c81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xa47c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x108(%rbp), %rdi
callq 0xc3e0
leaq -0x128(%rbp), %rdi
callq 0xc3e0
jmp 0xa4c81
jmp 0xa47d3
jmp 0xa47d5
jmp 0xa4c37
jmp 0xa47dc
jmp 0xa47de
jmp 0xa47e0
leaq -0x148(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0xc960
leaq -0x70(%rbp), %rdi
callq 0xc260
movq %rax, -0x268(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xc260
movq -0x268(%rbp), %rdi
movq -0x260(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x2a660
jmp 0xa482b
movq -0xc8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movq (%rdi), %rax
movq 0x10(%rax), %rax
leaq -0x148(%rbp), %rsi
callq *%rax
movb %al, -0x269(%rbp)
jmp 0xa4856
movb -0x269(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0xa49cc
movq -0x28(%rbp), %rdx
leaq 0x5d19(%rip), %rsi      # 0xaa58f
leaq -0x168(%rbp), %rdi
callq 0x25900
jmp 0xa4884
movq -0x28(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0xc850
leaq -0x168(%rbp), %rdi
callq 0xc3e0
leaq 0x2fe01(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0x278(%rbp)
jmp 0xa48b8
movq -0x278(%rbp), %rax
cmpq $0x0, %rax
je 0xa49c6
leaq 0x2fdd8(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
jmp 0xa48da
leaq 0x2fdc7(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0x280(%rbp)
jmp 0xa48f2
movq -0x280(%rbp), %rdi
leaq 0x18b0(%rip), %rsi      # 0xa61b0
callq 0xc670
movq %rax, -0x288(%rbp)
jmp 0xa490e
movq -0x288(%rbp), %rdi
leaq 0x5c68(%rip), %rsi      # 0xaa584
callq 0xc670
movq %rax, -0x290(%rbp)
jmp 0xa492a
movq -0x290(%rbp), %rdi
leaq 0xb13(%rip), %rsi       # 0xa544b
callq 0xc670
movq %rax, -0x298(%rbp)
jmp 0xa4946
movq -0x298(%rbp), %rdi
leaq 0x5197(%rip), %rsi      # 0xa9aeb
callq 0xc670
movq %rax, -0x2a0(%rbp)
jmp 0xa4962
movq -0x2a0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x2a8(%rbp)
jmp 0xa497b
movq -0x2a8(%rbp), %rdi
movq 0x2f637(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0xa4990
leaq 0x2fd11(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0xa49a1
jmp 0xa49c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x148(%rbp), %rdi
callq 0xc3e0
jmp 0xa4c81
jmp 0xa49c8
jmp 0xa49ca
jmp 0xa49cc
jmp 0xa49ce
jmp 0xa49d0
jmp 0xa49d2
leaq -0x148(%rbp), %rdi
callq 0xc3e0
movq -0x1f0(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0xc8(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x2dde0
movb %al, -0x2a9(%rbp)
jmp 0xa4a01
movb -0x2a9(%rbp), %al
testb $0x1, %al
jne 0xa4c35
jmp 0xa4a11
leaq 0x5b88(%rip), %rsi      # 0xaa5a0
leaq -0x1e8(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x25900
jmp 0xa4a2a
leaq 0x5b88(%rip), %rdx      # 0xaa5b9
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x2eef0
jmp 0xa4a46
movb -0x29(%rbp), %cl
leaq 0x5b7d(%rip), %rax      # 0xaa5cd
leaq 0x1f73(%rip), %rdx      # 0xa69ca
testb $0x1, %cl
cmovneq %rax, %rdx
leaq -0x1a8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x2eef0
jmp 0xa4a73
movq -0x28(%rbp), %rdx
leaq -0x188(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x34a30
jmp 0xa4a8c
movq -0x28(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0xc850
leaq -0x188(%rbp), %rdi
callq 0xc3e0
leaq -0x1a8(%rbp), %rdi
callq 0xc3e0
leaq -0x1c8(%rbp), %rdi
callq 0xc3e0
leaq -0x1e8(%rbp), %rdi
callq 0xc3e0
leaq 0x2fbd5(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0x2b8(%rbp)
jmp 0xa4ae4
movq -0x2b8(%rbp), %rax
cmpq $0x0, %rax
je 0xa4c2f
leaq 0x2fbac(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
jmp 0xa4b06
leaq 0x2fb9b(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0x2c0(%rbp)
jmp 0xa4b1e
movq -0x2c0(%rbp), %rdi
leaq 0x1684(%rip), %rsi      # 0xa61b0
callq 0xc670
movq %rax, -0x2c8(%rbp)
jmp 0xa4b3a
movq -0x2c8(%rbp), %rdi
leaq 0x5a3c(%rip), %rsi      # 0xaa584
callq 0xc670
movq %rax, -0x2d0(%rbp)
jmp 0xa4b56
movq -0x2d0(%rbp), %rdi
leaq 0x8e7(%rip), %rsi       # 0xa544b
callq 0xc670
movq %rax, -0x2d8(%rbp)
jmp 0xa4b72
movq -0x2d8(%rbp), %rdi
leaq 0x4f6b(%rip), %rsi      # 0xa9aeb
callq 0xc670
movq %rax, -0x2e0(%rbp)
jmp 0xa4b8e
movq -0x2e0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xc5b0
movq %rax, -0x2e8(%rbp)
jmp 0xa4ba7
movq -0x2e8(%rbp), %rdi
movq 0x2f40b(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0xa4bbc
leaq 0x2fae5(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0xa4bcd
jmp 0xa4c2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xa4c21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0xa4c15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0xc3e0
leaq -0x1c8(%rbp), %rdi
callq 0xc3e0
leaq -0x1e8(%rbp), %rdi
callq 0xc3e0
jmp 0xa4c81
jmp 0xa4c31
jmp 0xa4c33
jmp 0xa4c37
jmp 0xa4c37
jmp 0xa4c39
jmp 0xa4c3b
jmp 0xa4c3d
movb -0x29(%rbp), %al
movb %al, -0x2e9(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xc3e0
leaq -0x90(%rbp), %rdi
callq 0xc3e0
leaq -0x70(%rbp), %rdi
callq 0xc3e0
leaq -0x50(%rbp), %rdi
callq 0xc3e0
movb -0x2e9(%rbp), %al
andb $0x1, %al
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
leaq -0xb0(%rbp), %rdi
callq 0xc3e0
leaq -0x90(%rbp), %rdi
callq 0xc3e0
leaq -0x70(%rbp), %rdi
callq 0xc3e0
leaq -0x50(%rbp), %rdi
callq 0xc3e0
movq -0xb8(%rbp), %rdi
callq 0xcba0
nopw (%rax,%rax)