// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x90, %rsp
movq %r9, %r14
movq %rdx, %r15
movq %rsi, %rbx
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1bd28
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r15, %rsi
callq 0x1bd28
leaq 0x40(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x508cb(%rip), %rsi     # 0x6b52d
leaq 0x50(%rsp), %rdi
callq 0xb110
movl %eax, %ebp
leaq 0x4fc46(%rip), %rsi     # 0x6a8bb
leaq 0x70(%rsp), %rdi
callq 0xb110
testl %ebp, %ebp
je 0x1ad34
testl %eax, %eax
je 0x1ad8d
leaq 0x4fe75(%rip), %rsi     # 0x6ab0b
leaq 0x70(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1adfd
leaq 0x4fed4(%rip), %rsi     # 0x6ab83
leaq 0x70(%rsp), %rdi
callq 0xb110
testl %eax, %eax
jne 0x1aec1
leaq 0x5375c(%rip), %rsi     # 0x6e424
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1b01f
leaq 0x4f5a6(%rip), %rsi     # 0x6a287
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1b041
leaq 0x4f597(%rip), %rsi     # 0x6a291
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
jne 0x1aec1
movq 0x718dd(%rip), %rax     # 0x8c5f0
movq 0xc0(%rax), %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x1bd66
jmp 0x1b064
testl %eax, %eax
je 0x1ae18
leaq 0x5012a(%rip), %rsi     # 0x6ae6d
leaq 0x70(%rsp), %rdi
callq 0xb110
testl %eax, %eax
jne 0x1aec1
leaq 0x536c8(%rip), %rsi     # 0x6e424
leaq 0x30(%rsp), %rdi
callq 0x1bf0a
leaq 0x4f51a(%rip), %rsi     # 0x6a287
leaq 0x30(%rsp), %rdi
callq 0x1bf0a
leaq 0x4f513(%rip), %rsi     # 0x6a291
leaq 0x30(%rsp), %rdi
callq 0x1bf0a
jmp 0x1ae8e
leaq 0x53690(%rip), %rsi     # 0x6e424
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1ae2b
leaq 0x4f4da(%rip), %rsi     # 0x6a287
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1ae50
leaq 0x4f4c1(%rip), %rsi     # 0x6a287
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
jne 0x1aec1
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0x1bd28
leaq 0x4f4c4(%rip), %rsi     # 0x6a2b5
leaq 0x30(%rsp), %rdi
callq 0x1bece
jmp 0x1ae73
leaq 0x50729(%rip), %rsi     # 0x6b52d
leaq 0x50(%rsp), %rdi
callq 0xb110
testl %eax, %eax
setne %al
movb $0x1, %bpl
jmp 0x1ae93
leaq 0x4f452(%rip), %rsi     # 0x6a271
leaq 0x30(%rsp), %rdi
callq 0x1bece
jmp 0x1ae8e
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0x1bd28
leaq 0x4f457(%rip), %rsi     # 0x6a29b
leaq 0x30(%rsp), %rdi
callq 0x1bece
jmp 0x1ae73
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0x1bd28
leaq 0x4f441(%rip), %rsi     # 0x6a2aa
leaq 0x30(%rsp), %rdi
callq 0x1bece
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ae8e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %bpl
xorl %eax, %eax
testb %al, %al
jne 0x1aec1
testb %bpl, %bpl
je 0x1aec1
testq %r14, %r14
je 0x1aeb8
movq 0x30(%rsp), %rsi
movq (%r14), %rdx
addq $0x8, %r14
decq %rdx
movq %r14, %rdi
callq 0xb2a0
movzbl %bpl, %ebx
jmp 0x1afb9
movq 0x716a8(%rip), %rdi     # 0x8c570
cmpq $0x0, 0x8(%rdi)
je 0x1afb7
addq $0x20, %rdi
callq 0xb7d0
movq 0x7168d(%rip), %rax     # 0x8c570
movq 0x8(%rax), %r14
leaq 0x4f2ba(%rip), %rsi     # 0x6a1a8
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x4f2b2(%rip), %rsi     # 0x6a1b4
movl $0x9, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x4f3b0(%rip), %rsi     # 0x6a2c6
movl $0x1c, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x51d75(%rip), %rsi     # 0x6cc9f
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
testq %rbx, %rbx
je 0x1af54
movq %rbx, %rdi
callq 0xb200
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xb5f0
jmp 0x1af6c
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0xb990
leaq 0x50f8d(%rip), %rsi     # 0x6bf00
movl $0x8, %edx
movq %r14, %rdi
callq 0xb5f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r14, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq 0x715c2(%rip), %rdi     # 0x8c570
addq $0x20, %rdi
callq 0xb3b0
xorl %ebx, %ebx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x1afd0
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1afeb
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b00c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x715ca(%rip), %rax     # 0x8c5f0
movq 0x60(%rax), %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x1bd66
jmp 0x1b064
movq 0x715a8(%rip), %rax     # 0x8c5f0
movq 0x90(%rax), %rax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x1bd66
movl %eax, %ebp
jmp 0x1ae91
jmp 0x1b0a0
jmp 0x1b0a0
jmp 0x1b079
jmp 0x1b0a0
jmp 0x1b0a0
jmp 0x1b079
jmp 0x1b0a0
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b0a3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x1b0a3
jmp 0x1b0a0
movq %rax, %rbx
jmp 0x1b0d5
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b0ba
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b0d5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b0f6
movq 0x80(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0