// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/lib/scdc/scdc.cc
// Function: scdc_main_config_hook_config(void*, char const*, char const*, char const*, long long, _scdc_result_t*)
static scdcint_t scdc_main_config_hook_config(void *dataprov, const char *cmd, const char *param, const char *val, scdcint_t val_size, scdc_result_t *result)
{
  SCDC_TRACE(__func__ << ": cmd: '" << cmd << "', param: '" << param << "', val: " << string(val, val_size));

  string c(cmd), p(param);

  bool done = false;
  bool ret = true;

  scdc_config_result res;

  if (p == "")
  {
    if (c == "info")
    {
      done = true;

      ret = scdc_dataprov_config::info(res, "libscdc configuration");

    } else if (c == "ls")
    {
      done = true;

      ret = scdc_dataprov_config::ls(res, "dataprovs")
         && scdc_dataprov_config::ls(res, "nodeports")
         && scdc_dataprov_config::ls(res, "nodeconns")
#if NODECONN_CACHE_CONNECTIONS
         && scdc_dataprov_config::ls(res, "nodeconn_cache_connections")
#endif
         && true;

    } else done = false;

  } else
  {
    if (done);
    if (c == "info")
    {
      done = true;

      if (p == "dataprovs") ret = scdc_dataprov_config::info(res, param, "data providers");
      else if (p == "nodeports") ret = scdc_dataprov_config::info(res, param, "node ports");
      else if (p == "nodeports") ret = scdc_dataprov_config::info(res, param, "node connections");
#if NODECONN_CACHE_CONNECTIONS
      else if (p == "nodeconn_cache_connections") ret = scdc_dataprov_config::info(res, param, "number of node connections to cache (integer)");
#endif
      else done = false;

/*    } else if (c == "ls")
    {*/
    } else if (c == "put")
    {
      done = true;

/*      if (p == "dataprovs")  ret = scdc_dataprov_config::put<>(res, param);
      else if (p == "nodeports")  ret = scdc_dataprov_config::put<>(res, param);
      else if (p == "nodeconns")  ret = scdc_dataprov_config::put<>(res, param);*/
      if (p == "");
#if NODECONN_CACHE_CONNECTIONS
      else if (p == "nodeconn_cache_connections") ret = scdc_dataprov_config::put<scdcint_t>(res, param, val, data->nodeconns.cache_connections);
#endif
      else done = false;

    } else if (c == "get")
    {
      done = true;

      if (p == "dataprovs")  ret = scdc_dataprov_config::get<size_t>(res, param, scdc_main_context.data->dataprovs.size());
      else if (p == "nodeports")  ret = scdc_dataprov_config::get<size_t>(res, param, scdc_main_context.data->nodeports.size());
      else if (p == "nodeconns")  ret = scdc_dataprov_config::get<size_t>(res, param, scdc_main_context.data->nodeconns.size());
#if NODECONN_CACHE_CONNECTIONS
      else if (p == "nodeconn_cache_connections") ss << scdc_main_context.data->nodeconns.cache_connections;
#endif
      else done = false;
    }
  }

  if (!done || (done && !ret))
  {
    SCDC_FAIL(__func__ << ": command '" << cmd << "' failed");
    return SCDC_FAILURE;
  }

  if (result) SCDC_RESULT_SET_STR(result, res.c_str());

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %r9, %rbx
movq %rdx, %r15
movq %rsi, %r14
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1a132
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
callq 0x1a132
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x39308(%rip), %rsi     # 0x524bd
leaq 0x48(%rsp), %rdi
callq 0x19be0
movl %eax, %ebp
leaq 0x38688(%rip), %rsi     # 0x51850
leaq 0x68(%rsp), %rdi
callq 0x19be0
testb %bpl, %bpl
je 0x191f1
testb %al, %al
je 0x1923a
leaq 0x3806f(%rip), %rsi     # 0x51251
leaq 0x8(%rsp), %rdi
callq 0x1a288
jmp 0x19398
testb %al, %al
je 0x1928b
leaq 0x3c1b4(%rip), %rsi     # 0x553b4
leaq 0x48(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x192be
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x1a132
leaq 0x38050(%rip), %rsi     # 0x5127b
leaq 0x8(%rsp), %rdi
callq 0x1a288
jmp 0x1938e
leaq 0x38bbc(%rip), %rsi     # 0x51dfd
leaq 0x68(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x1943b
leaq 0x3c15a(%rip), %rsi     # 0x553b4
leaq 0x8(%rsp), %rdi
callq 0x1a2c8
leaq 0x37ffc(%rip), %rsi     # 0x51267
leaq 0x8(%rsp), %rdi
callq 0x1a2c8
leaq 0x37ff5(%rip), %rsi     # 0x51271
leaq 0x8(%rsp), %rdi
callq 0x1a2c8
jmp 0x19398
leaq 0x3880e(%rip), %rsi     # 0x51aa0
leaq 0x68(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x192fb
leaq 0x39216(%rip), %rsi     # 0x524bd
leaq 0x48(%rsp), %rdi
callq 0x19be0
testb %al, %al
jne 0x19398
jmp 0x1943b
leaq 0x37fa2(%rip), %rsi     # 0x51267
leaq 0x48(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x19352
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x1a132
leaq 0x37f9e(%rip), %rsi     # 0x5128a
leaq 0x8(%rsp), %rdi
callq 0x1a288
jmp 0x1938e
leaq 0x38816(%rip), %rsi     # 0x51b18
leaq 0x68(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x1943b
leaq 0x3c099(%rip), %rsi     # 0x553b4
leaq 0x48(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x193c1
movq 0x5c2cc(%rip), %rax     # 0x75600
movq 0x60(%rax), %rax
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1a16e
jmp 0x192b1
leaq 0x37f0e(%rip), %rsi     # 0x51267
leaq 0x48(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x1943b
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x1a132
leaq 0x37f11(%rip), %rsi     # 0x51295
leaq 0x8(%rsp), %rdi
callq 0x1a288
leaq 0x28(%rsp), %rdi
callq 0xb230
pushq $0x1
popq %r14
testq %rbx, %rbx
je 0x194cb
movq 0x8(%rsp), %rsi
movq (%rbx), %rdx
addq $0x8, %rbx
decq %rdx
movq %rbx, %rdi
callq 0xb2c0
jmp 0x194cb
leaq 0x37e9f(%rip), %rsi     # 0x51267
leaq 0x48(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x193fe
movq 0x5c223(%rip), %rax     # 0x75600
movq 0x90(%rax), %rax
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1a16e
jmp 0x192b1
leaq 0x37e6c(%rip), %rsi     # 0x51271
leaq 0x48(%rsp), %rdi
callq 0x19be0
testb %al, %al
je 0x1943b
movq 0x5c1e6(%rip), %rax     # 0x75600
movq 0xc0(%rax), %rax
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1a16e
jmp 0x192b1
movq 0x5c13e(%rip), %rdi     # 0x75580
cmpq $0x0, 0x8(%rdi)
je 0x194c8
addq $0x20, %rdi
callq 0xb800
movq 0x5c127(%rip), %rax     # 0x75580
movq 0x8(%rax), %rdi
leaq 0x37d24(%rip), %rsi     # 0x51188
callq 0xb520
leaq 0x37d24(%rip), %rsi     # 0x51194
movq %rax, %rdi
callq 0xb520
leaq 0x37e27(%rip), %rsi     # 0x512a6
movq %rax, %rdi
callq 0xb520
leaq 0x3a7a1(%rip), %rsi     # 0x53c2f
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r14, %rsi
callq 0xb520
leaq 0x399e8(%rip), %rsi     # 0x52e90
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq 0x5c0c1(%rip), %rdi     # 0x75580
addq $0x20, %rdi
callq 0xb3e0
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0xb230
leaq 0x48(%rsp), %rdi
callq 0xb230
leaq 0x68(%rsp), %rdi
callq 0xb230
movq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1951e
jmp 0x1951e
jmp 0x19508
jmp 0x1951e
jmp 0x1951e
jmp 0x19508
jmp 0x1951e
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xb230
jmp 0x19521
jmp 0x1951e
movq %rax, %rbx
jmp 0x19535
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb230
leaq 0x48(%rsp), %rdi
callq 0xb230
leaq 0x68(%rsp), %rdi
callq 0xb230
movq %rbx, %rdi
callq 0xb9a0