// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_call.cc
// Function: redirect_call_execute
int redirect_call_execute(redirect_call_t *rc)
{
#if REDIRECT_CALL_PARAMS_CACHE
  char cache_state[256];
  rdint_t cache_state_size = 0;

  if (rc->cache) redirect_cache_check(rc->cache, rc->dataset, rc->uri, cache_state, &cache_state_size);

  TRACE_F("cache_state: %.*s", static_cast<int>(cache_state_size), cache_state);
#endif

  char cmd[REDIRECT_CALL_URI_MAX_SIZE + REDIRECT_CALL_OP_MAX_SIZE + REDIRECT_CALL_CACHE_STATE_MAX_SIZE + REDIRECT_CALL_INPUT_CONF_MAX_SIZE + REDIRECT_CALL_OUTPUT_CONF_MAX_SIZE];
  rdint_t cmd_size = 0;

  if (rc->dataset == SCDC_DATASET_NULL) cmd_size += sprintf(cmd, "%s ", rc->uri);

  cmd_size += sprintf(cmd + cmd_size, "%s ", rc->op);

#if REDIRECT_CALL_PARAMS_CACHE
  cmd_size += redirect_call_put_inout_conf_str(cmd + cmd_size, "cstate", cache_state, cache_state_size);
#endif
  cmd_size += redirect_call_put_inout_conf_str(cmd + cmd_size, "iconf", rc->input_conf, rc->input_conf_n);
  cmd_size += redirect_call_put_inout_conf_str(cmd + cmd_size, "oconf", rc->output_conf_put, rc->output_conf_put_n);

  rc->input->next = do_input_next;
  rc->input->data = rc;
#if REDIRECT_CALL_PARAMS_NEW
  rc->params_state[0] = rc->params_state[1] = 0;
#else
  rc->input_state = 0;
#endif

  rc->input->next(rc->input, 0);

  TRACE_F("cmd: '%s'", cmd);

  if (scdc_dataset_cmd(rc->dataset, cmd, rc->input, rc->output) != SCDC_SUCCESS)
  {
    TRACE_F("failed");
    return 0;
  }

  /* extract result and output_conf_get from output */
  const char *s = scdc_last_result();
  rdint_t n = 0;
  n += redirect_call_get_inout_conf_str(s + n, "result", rc->result_str, 0);
  rc->output_conf_get_n = 0;
  n += redirect_call_get_inout_conf_str(s + n, "oconf", rc->output_conf_get, 0);

  TRACE_F("result: '%s'", rc->result_str);
  TRACE_F("output_conf_get: '%s'", rc->output_conf_get);

  rc->output_offset = 0;

  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x758, %rsp            # imm = 0x758
andq $0x0, 0x8(%rsp)
movq %rdi, %rbx
movq 0xba8(%rdi), %rdi
testq %rdi, %rdi
je 0xeea9
movq 0x148(%rbx), %rsi
leaq 0x44(%rbx), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x8(%rsp), %r8
callq 0xe329
movq 0x66108(%rip), %r13     # 0x74fb8
movq (%r13), %rdi
leaq 0x4194e(%rip), %rsi     # 0x50809
leaq 0x4195b(%rip), %rdx     # 0x5081d
xorl %r14d, %r14d
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rdi
movl 0x8(%rsp), %edx
leaq 0x41958(%rip), %rsi     # 0x50833
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0xb6b0
cmpq $0x0, 0x148(%rbx)
jne 0xef1a
leaq 0x44(%rbx), %rdx
leaq 0x41aaa(%rip), %rsi     # 0x509b2
leaq 0x110(%rsp), %rdi
xorl %eax, %eax
callq 0xb0c0
movslq %eax, %r14
leaq (%rsp,%r14), %r15
addq $0x110, %r15            # imm = 0x110
leaq 0x4(%rbx), %rdx
leaq 0x41a82(%rip), %rsi     # 0x509b2
xorl %ebp, %ebp
movq %r15, %rdi
xorl %eax, %eax
callq 0xb0c0
movslq %eax, %r14
addq %r15, %r14
movq 0x8(%rsp), %rcx
leaq 0x418f7(%rip), %rsi     # 0x50845
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0xf135
addq %rax, %r14
leaq 0x168(%rbx), %rdx
movq 0x150(%rbx), %rcx
leaq 0x418d9(%rip), %rsi     # 0x5084c
movq %r14, %rdi
callq 0xf135
addq %rax, %r14
leaq 0x368(%rbx), %rdx
movq 0x158(%rbx), %rcx
leaq 0x418bf(%rip), %rsi     # 0x50852
movq %r14, %rdi
callq 0xf135
movq 0xb08(%rbx), %rdi
leaq 0x1cc(%rip), %rax       # 0xf175
movq %rax, 0x38(%rdi)
movq %rbx, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x870(%rbx)
callq 0xf175
movq (%r13), %rdi
leaq 0x4183e(%rip), %rsi     # 0x50809
leaq 0x4184b(%rip), %rdx     # 0x5081d
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rdi
leaq 0x4164d(%rip), %rsi     # 0x50631
leaq 0x110(%rsp), %r14
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0xb6b0
movq 0x148(%rbx), %rdi
movq 0xb08(%rbx), %rdx
movq 0xb10(%rbx), %rcx
movq %r14, %rsi
xorl %eax, %eax
callq 0x1909c
cmpq $0x1, %rax
jne 0xf0e6
callq 0x17d8e
movq %rax, %r12
leaq 0x768(%rbx), %r15
movq %rax, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xf400
andq $0x0, 0x160(%rbx)
addq %rax, %r12
leaq 0x568(%rbx), %r14
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xf400
movq (%r13), %rdi
leaq 0x41798(%rip), %r12     # 0x50809
leaq 0x417a5(%rip), %rdx     # 0x5081d
movq %r12, %rsi
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rdi
leaq 0x416c4(%rip), %rsi     # 0x50751
movq %r15, %rdx
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rsi
pushq $0xa
popq %rbp
movl %ebp, %edi
callq 0xb6b0
movq (%r13), %rdi
movq %r12, %rsi
leaq 0x4176a(%rip), %rdx     # 0x5081d
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rdi
leaq 0x41793(%rip), %rsi     # 0x50858
movq %r14, %rdx
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rsi
movl %ebp, %edi
callq 0xb6b0
andl $0x0, 0xb04(%rbx)
pushq $0x1
popq %rbp
jmp 0xf121
movq (%r13), %rdi
leaq 0x41718(%rip), %rsi     # 0x50809
leaq 0x41725(%rip), %rdx     # 0x5081d
xorl %eax, %eax
callq 0xb7c0
movq (%r13), %rcx
leaq 0x43d88(%rip), %rdi     # 0x52e92
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0xba80
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0xb6b0
movl %ebp, %eax
addq $0x758, %rsp            # imm = 0x758
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq