// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r14
movq %rdx, %r15
movq %rsi, %rbx
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x1bdd6
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r15, %rsi
callq 0x1bdd6
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x50808(%rip), %rsi     # 0x6b50d
leaq 0x48(%rsp), %rdi
callq 0xb110
movl %eax, %ebp
leaq 0x4fb83(%rip), %rsi     # 0x6a89b
leaq 0x68(%rsp), %rdi
callq 0xb110
testl %ebp, %ebp
je 0x1addd
testl %eax, %eax
je 0x1ae35
leaq 0x4fdb2(%rip), %rsi     # 0x6aaeb
leaq 0x68(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1ae83
leaq 0x4fe11(%rip), %rsi     # 0x6ab63
leaq 0x68(%rsp), %rdi
callq 0xb110
movb $0x1, %r13b
testl %eax, %eax
jne 0x1ae9a
leaq 0x53646(%rip), %rsi     # 0x6e3b4
leaq 0x48(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1b0a4
leaq 0x4f4e0(%rip), %rsi     # 0x6a267
leaq 0x48(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1b10d
leaq 0x4f4d1(%rip), %rsi     # 0x6a271
leaq 0x48(%rsp), %rdi
callq 0xb110
movb $0x1, %bpl
testl %eax, %eax
jne 0x1af1b
movq 0x71834(%rip), %rax     # 0x8c5f0
movq 0xc0(%rax), %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1be14
jmp 0x1b130
testl %eax, %eax
je 0x1ae9f
leaq 0x50061(%rip), %rsi     # 0x6ae4d
leaq 0x68(%rsp), %rdi
callq 0xb110
movb $0x1, %bpl
testl %eax, %eax
jne 0x1ae7b
leaq 0x535b0(%rip), %rsi     # 0x6e3b4
leaq 0x28(%rsp), %rdi
callq 0x1bfb2
leaq 0x4f452(%rip), %rsi     # 0x6a267
leaq 0x28(%rsp), %rdi
callq 0x1bfb2
leaq 0x4f44b(%rip), %rsi     # 0x6a271
leaq 0x28(%rsp), %rdi
callq 0x1bfb2
jmp 0x1af18
leaq 0x53578(%rip), %rsi     # 0x6e3b4
leaq 0x48(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1aeb2
leaq 0x4f416(%rip), %rsi     # 0x6a267
leaq 0x48(%rsp), %rdi
callq 0xb110
testl %eax, %eax
je 0x1aed7
leaq 0x4f401(%rip), %rsi     # 0x6a267
leaq 0x48(%rsp), %rdi
callq 0xb110
movb $0x1, %bpl
testl %eax, %eax
je 0x1b0c6
movb $0x1, %r13b
jmp 0x1af1b
leaq 0x50683(%rip), %rsi     # 0x6b50d
leaq 0x48(%rsp), %rdi
callq 0xb110
testl %eax, %eax
setne %r13b
movb $0x1, %bpl
jmp 0x1af1b
leaq 0x4f3ab(%rip), %rsi     # 0x6a251
leaq 0x28(%rsp), %rdi
callq 0x1bf76
jmp 0x1af15
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x1bdd6
leaq 0x4f3b0(%rip), %rsi     # 0x6a27b
leaq 0x28(%rsp), %rdi
callq 0x1bf76
jmp 0x1aefa
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x1bdd6
leaq 0x4f39a(%rip), %rsi     # 0x6a28a
leaq 0x28(%rsp), %rdi
callq 0x1bf76
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1af15
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movb $0x1, %bpl
xorl %r13d, %r13d
testb %r13b, %r13b
jne 0x1af4a
testb %bpl, %bpl
je 0x1af4a
testq %r14, %r14
je 0x1af41
movq 0x28(%rsp), %rsi
movq (%r14), %rdx
addq $0x8, %r14
decq %rdx
movq %r14, %rdi
callq 0xb2a0
movzbl %bpl, %ebx
jmp 0x1b042
movq 0x7161f(%rip), %rdi     # 0x8c570
cmpq $0x0, 0x8(%rdi)
je 0x1b040
addq $0x20, %rdi
callq 0xb7d0
movq 0x71604(%rip), %rax     # 0x8c570
movq 0x8(%rax), %r14
leaq 0x4f211(%rip), %rsi     # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x4f209(%rip), %rsi     # 0x6a194
movl $0x9, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x4f307(%rip), %rsi     # 0x6a2a6
movl $0x1c, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x51c7c(%rip), %rsi     # 0x6cc2f
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
testq %rbx, %rbx
je 0x1afdd
movq %rbx, %rdi
callq 0xb200
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xb5f0
jmp 0x1aff5
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0xb990
leaq 0x50e8c(%rip), %rsi     # 0x6be88
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 0x71539(%rip), %rdi     # 0x8c570
addq $0x20, %rdi
callq 0xb3b0
xorl %ebx, %ebx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b059
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b074
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b08f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x71545(%rip), %rax     # 0x8c5f0
movq 0x60(%rax), %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1be14
jmp 0x1b130
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x1bdd6
leaq 0x4f1b6(%rip), %rsi     # 0x6a295
leaq 0x28(%rsp), %rdi
callq 0x1bf76
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1af18
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x1af18
movq 0x714dc(%rip), %rax     # 0x8c5f0
movq 0x90(%rax), %rax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0x1be14
movl %eax, %ebp
jmp 0x1af18
jmp 0x1b16c
jmp 0x1b16c
jmp 0x1b145
jmp 0x1b16c
jmp 0x1b16c
jmp 0x1b145
jmp 0x1b16c
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b16f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
jmp 0x1b16f
jmp 0x1b16c
movq %rax, %rbx
jmp 0x1b1a1
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x1b186
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b1a1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b1bc
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0