// File: mh0fm4[P]SCDC/src/lib/scdc/scdc.cc
// Function: scdc_dataset_cmd_intern
scdcint_t scdc_dataset_cmd_intern(scdc_dataset_t dataset, const char *cmd, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_args_t *args)
{
  SCDC_TRACE(__func__ << ": dataset: '" << dataset << "', cmd = '" << string(cmd) << "'" << ", input = " << static_cast<void *>(input) << ", output = " << static_cast<void *>(output));

  scdcint_t cmd_size = strlen(cmd);

  string adhoc_cmd;

  if (dataset == SCDC_DATASET_NULL)
  {
    dataset = new _scdc_dataset_t;
    dataset->dataset = 0;

    cmd_size = strlen(cmd);

    string suri, scmd, sparams;
    split_cmdline(cmd, cmd_size, &scmd, &suri, &sparams);

    if (suri.size() <= 0)
    {
      SCDC_RESULT_SET_STR(scdc_main_context.data->result, "no URI given");
      SCDC_FAIL(__func__ << ": " << SCDC_RESULT_STR(scdc_main_context.data->result));
      delete dataset;
      return SCDC_FAILURE;
    }

    string sscheme, sauthority, spath;
    split_uri(suri.c_str(), suri.size(), &sscheme, &sauthority, &spath);

    scdc_args xargs(args);

    dataset->nodeconn = scdc_main_context.data->nodeconns.open(sscheme.c_str(), sauthority.c_str(), &xargs);

    if (!dataset->nodeconn)
    {
      SCDC_RESULT_SET_STR(scdc_main_context.data->result, "open connection failed");
      SCDC_FAIL(__func__ << ": " << SCDC_RESULT_STR(scdc_main_context.data->result));
      delete dataset;
      return SCDC_FAILURE;
    }

    join_uri(0, 0, spath.c_str(), suri);
    suri = ":" + suri;

    join_cmdline(scmd.c_str(), suri.c_str(), sparams.c_str(), adhoc_cmd);

    cmd = adhoc_cmd.c_str();
    cmd_size = adhoc_cmd.size();
  }

  SCDC_TRACE(__func__ << ": adhoc command: '" << adhoc_cmd << "'");

  scdc_dataset_input_t input_null = *SCDC_DATASET_INPUT_NONE;
  if (!input) input = &input_null;

  scdc_dataset_output_t output_null = *SCDC_DATASET_OUTPUT_ENDL;
  if (!output) output = &output_null;

  /* backup original output */
  scdc_dataset_output_t output_given = *output;
  scdc_dataset_inout_intern_t output_intern_given = (output->intern)?*output->intern:SCDC_DATASET_OUTPUT_INTERN_NULL;

  SCDC_TRACE_DATASET_INPUT(input, "scdc_dataset_cmd_intern: IN input: ");
  SCDC_TRACE_DATASET_OUTPUT(output, "scdc_dataset_cmd_intern: IN output: ");

  scdcint_t output_next_hash_in = scdc_dataset_inout_next_hash(output);

  bool ret;
  scdc_result result;

  double cmd_timing = z_time_wtime();

  if (dataset->dataset) ret = dataset->dataset->do_cmd(string(cmd, cmd_size), input, output, result);
  else ret = dataset->nodeconn->dataset_cmd(string(cmd, cmd_size), input, output, result);

  cmd_timing = z_time_wtime() - cmd_timing;
  SCDC_TRACE(__func__ << ": timing: " << cmd_timing);

  SCDC_TRACE(__func__ << ": result: '" << result << "'");

  SCDC_RESULT_SET_STR(scdc_main_context.data->result, result.c_str());

  scdcint_t output_next_hash_out = scdc_dataset_inout_next_hash(output);

  SCDC_TRACE_DATASET_INPUT(input, "scdc_dataset_cmd_intern: OUT input: ");
  SCDC_TRACE_DATASET_OUTPUT(output, "scdc_dataset_cmd_intern: OUT output: ");

  /* if there was an output next given, but the resulting cmd output is different */
  if (output_given.next && output_next_hash_in != output_next_hash_out)
  {
    SCDC_TRACE(__func__ << ": redirecting cmd output to given output");
    scdc_dataset_output_redirect(output, "to:outputsink", &output_given);

    /* restore original output */
    *output = output_given;

    if (output->intern) *output->intern = output_intern_given;
  }

  if (ret)
  {
    SCDC_TRACE(__func__ << ": successful");

/*    SCDC_INFO("scdc_dataset_cmd: timing: " << cmd_timing << ", input: " << ((input)?input->total_size:0) / cmd_timing * 1e-6 << " MB/s, output: " << ((output)?output->total_size:0) / cmd_timing * 1e-6 << " MB/s");*/

  } else SCDC_TRACE(__func__ << ": failed: '" << SCDC_DATASET_OUTPUT_STR(output) << "'");

  if (!dataset->dataset)
  {
    scdc_main_context.data->nodeconns.close(dataset->nodeconn);

    delete dataset;
    dataset = SCDC_DATASET_NULL;
  }

/*  if (ret) SCDC_INFO("using dataset " << dataset << " to execute command '" << cmd << "'");*/

  return (ret)?SCDC_SUCCESS:SCDC_FAILURE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
jmp 0x23181
movq -0x18(%rbp), %rdi
callq 0xc280
movq %rax, -0x38(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xc960
cmpq $0x0, -0x10(%rbp)
jne 0x23854
movl $0x20, %edi
callq 0xc690
movq %rax, -0x350(%rbp)
jmp 0x231b5
movq -0x350(%rbp), %rdi
callq 0x25730
jmp 0x231c3
movq -0x350(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0xc280
movq %rax, -0x38(%rbp)
leaq -0x88(%rbp), %rdi
movq %rdi, -0x360(%rbp)
callq 0xc960
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0xc960
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0xc960
movq -0x368(%rbp), %rdx
movq -0x360(%rbp), %rcx
movq -0x358(%rbp), %r8
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2a040
jmp 0x23244
leaq -0x88(%rbp), %rdi
callq 0xc460
cmpq $0x0, %rax
ja 0x23413
movq 0xb14bf(%rip), %rax     # 0xd4720
movq (%rax), %rdi
addq $0x8, %rdi
movq 0xb14b1(%rip), %rax     # 0xd4720
movq (%rax), %rax
movq (%rax), %rdx
subq $0x1, %rdx
leaq 0x82f92(%rip), %rsi     # 0xa6212
callq 0xc320
movq 0xb141c(%rip), %rdi     # 0xd46a8
callq 0x257e0
movq %rax, -0x370(%rbp)
jmp 0x2329a
movq -0x370(%rbp), %rax
cmpq $0x0, %rax
je 0x233ca
movq 0xb13f6(%rip), %rdi     # 0xd46a8
callq 0x25800
jmp 0x232b9
movq 0xb13e8(%rip), %rdi     # 0xd46a8
callq 0x257e0
movq %rax, -0x378(%rbp)
jmp 0x232ce
movq -0x378(%rbp), %rdi
leaq 0x82ed4(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x380(%rbp)
jmp 0x232ea
movq -0x380(%rbp), %rdi
leaq 0x82ec4(%rip), %rsi     # 0xa61bc
callq 0xc670
movq %rax, -0x388(%rbp)
jmp 0x23306
movq -0x388(%rbp), %rdi
leaq 0x82f0b(%rip), %rsi     # 0xa621f
callq 0xc670
movq %rax, -0x390(%rbp)
jmp 0x23322
movq -0x390(%rbp), %rdi
leaq 0x867bb(%rip), %rsi     # 0xa9aeb
callq 0xc670
movq %rax, -0x398(%rbp)
jmp 0x2333e
movq -0x398(%rbp), %rdi
movq 0xb13d4(%rip), %rax     # 0xd4720
movq (%rax), %rsi
addq $0x8, %rsi
callq 0xc670
movq %rax, -0x3a0(%rbp)
jmp 0x23361
movq -0x3a0(%rbp), %rdi
movq 0xb0c51(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x23376
movq 0xb132b(%rip), %rdi     # 0xd46a8
callq 0x25820
jmp 0x23384
jmp 0x233ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23d25
movq -0x350(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0x20, %esi
callq 0xc6a0
jmp 0x23d25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2382b
jmp 0x233cc
jmp 0x233ce
movq -0x10(%rbp), %rax
movq %rax, -0x3a8(%rbp)
cmpq $0x0, %rax
je 0x233fc
movq -0x3a8(%rbp), %rdi
callq 0x25780
movq -0x3a8(%rbp), %rdi
movl $0x20, %esi
callq 0xc6a0
movq $0x0, -0x8(%rbp)
movl $0x1, -0xcc(%rbp)
jmp 0x237d1
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0xc960
leaq -0x110(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0xc960
leaq -0x130(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0xc960
leaq -0x88(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0xc260
movq -0x3d0(%rbp), %rdi
movq %rax, -0x3c8(%rbp)
callq 0xc460
movq -0x3c8(%rbp), %rdi
movq -0x3c0(%rbp), %rdx
movq -0x3b8(%rbp), %rcx
movq -0x3b0(%rbp), %r8
movq %rax, %rsi
callq 0x2a760
jmp 0x23498
movq -0x30(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x25660
jmp 0x234aa
movq 0xb126f(%rip), %rax     # 0xd4720
addq $0x98, %rax
movq %rax, -0x3e8(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xc260
movq %rax, -0x3e0(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc260
movq -0x3e8(%rbp), %rdi
movq -0x3e0(%rbp), %rsi
movq %rax, %rdx
leaq -0x168(%rbp), %rcx
callq 0x506e0
movq %rax, -0x3d8(%rbp)
jmp 0x23503
movq -0x3d8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x236c2
movq 0xb11fa(%rip), %rax     # 0xd4720
movq (%rax), %rdi
addq $0x8, %rdi
movq 0xb11ec(%rip), %rax     # 0xd4720
movq (%rax), %rax
movq (%rax), %rdx
subq $0x1, %rdx
leaq 0x82cf2(%rip), %rsi     # 0xa6237
callq 0xc320
movq 0xb1157(%rip), %rdi     # 0xd46a8
callq 0x257e0
movq %rax, -0x3f0(%rbp)
jmp 0x2355f
movq -0x3f0(%rbp), %rax
cmpq $0x0, %rax
je 0x23679
movq 0xb1131(%rip), %rdi     # 0xd46a8
callq 0x25800
jmp 0x2357e
movq 0xb1123(%rip), %rdi     # 0xd46a8
callq 0x257e0
movq %rax, -0x3f8(%rbp)
jmp 0x23593
movq -0x3f8(%rbp), %rdi
leaq 0x82c0f(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0x400(%rbp)
jmp 0x235af
movq -0x400(%rbp), %rdi
leaq 0x82bff(%rip), %rsi     # 0xa61bc
callq 0xc670
movq %rax, -0x408(%rbp)
jmp 0x235cb
movq -0x408(%rbp), %rdi
leaq 0x82c46(%rip), %rsi     # 0xa621f
callq 0xc670
movq %rax, -0x410(%rbp)
jmp 0x235e7
movq -0x410(%rbp), %rdi
leaq 0x864f6(%rip), %rsi     # 0xa9aeb
callq 0xc670
movq %rax, -0x418(%rbp)
jmp 0x23603
movq -0x418(%rbp), %rdi
movq 0xb110f(%rip), %rax     # 0xd4720
movq (%rax), %rsi
addq $0x8, %rsi
callq 0xc670
movq %rax, -0x420(%rbp)
jmp 0x23626
movq -0x420(%rbp), %rdi
movq 0xb098c(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x2363b
movq 0xb1066(%rip), %rdi     # 0xd46a8
callq 0x25820
jmp 0x23649
jmp 0x23679
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23807
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x256b0
jmp 0x23807
jmp 0x2367b
jmp 0x2367d
movq -0x10(%rbp), %rax
movq %rax, -0x428(%rbp)
cmpq $0x0, %rax
je 0x236ab
movq -0x428(%rbp), %rdi
callq 0x25780
movq -0x428(%rbp), %rdi
movl $0x20, %esi
callq 0xc6a0
movq $0x0, -0x8(%rbp)
movl $0x1, -0xcc(%rbp)
jmp 0x237a1
leaq -0x130(%rbp), %rdi
callq 0xc260
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq -0x88(%rbp), %rcx
movq %rsi, %rdi
callq 0x2ab30
jmp 0x236e6
leaq 0x82c77(%rip), %rsi     # 0xa6364
leaq -0x188(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x25900
jmp 0x23702
leaq -0x88(%rbp), %rdi
movq %rdi, -0x440(%rbp)
leaq -0x188(%rbp), %rsi
movq %rsi, -0x448(%rbp)
callq 0xc850
movq -0x448(%rbp), %rdi
callq 0xc3e0
leaq -0xa8(%rbp), %rdi
callq 0xc260
movq -0x440(%rbp), %rdi
movq %rax, -0x438(%rbp)
callq 0xc260
movq %rax, -0x430(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xc260
movq -0x438(%rbp), %rdi
movq -0x430(%rbp), %rsi
movq %rax, %rdx
leaq -0x58(%rbp), %rcx
callq 0x2a660
jmp 0x2377d
leaq -0x58(%rbp), %rdi
callq 0xc260
movq %rax, -0x18(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xc460
movq %rax, -0x38(%rbp)
movl $0x0, -0xcc(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x256b0
leaq -0x130(%rbp), %rdi
callq 0xc3e0
leaq -0x110(%rbp), %rdi
callq 0xc3e0
leaq -0xf0(%rbp), %rdi
callq 0xc3e0
leaq -0xc8(%rbp), %rdi
callq 0xc3e0
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
leaq -0x88(%rbp), %rdi
callq 0xc3e0
movl -0xcc(%rbp), %eax
testl %eax, %eax
jne 0x23d0f
jmp 0x23805
jmp 0x23854
leaq -0x130(%rbp), %rdi
callq 0xc3e0
leaq -0x110(%rbp), %rdi
callq 0xc3e0
leaq -0xf0(%rbp), %rdi
callq 0xc3e0
leaq -0xc8(%rbp), %rdi
callq 0xc3e0
leaq -0xa8(%rbp), %rdi
callq 0xc3e0
leaq -0x88(%rbp), %rdi
callq 0xc3e0
jmp 0x23d25
jmp 0x23856
jmp 0x23858
jmp 0x2385a
leaq -0x1e0(%rbp), %rdi
leaq 0x83770(%rip), %rsi     # 0xa6fd8
movl $0x58, %edx
callq 0xc530
cmpq $0x0, -0x20(%rbp)
jne 0x23884
leaq -0x1e0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x238(%rbp), %rdi
leaq 0xae9f6(%rip), %rsi     # 0xd2288
movl $0x58, %edx
callq 0xc530
cmpq $0x0, -0x28(%rbp)
jne 0x238ae
leaq -0x238(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x290(%rbp), %rdi
movl $0x58, %edx
callq 0xc530
movq -0x28(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x238df
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x450(%rbp)
jmp 0x238ef
leaq 0x836ca(%rip), %rax     # 0xa6fb0
movq %rax, -0x450(%rbp)
jmp 0x238ef
movq -0x450(%rbp), %rsi
leaq -0x2b8(%rbp), %rdi
movl $0x28, %edx
callq 0xc530
jmp 0x23909
jmp 0x2390b
jmp 0x2390d
jmp 0x2390f
jmp 0x23911
movq -0x28(%rbp), %rdi
callq 0x229c0
movq %rax, -0x458(%rbp)
jmp 0x23923
movq -0x458(%rbp), %rax
movq %rax, -0x2c0(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0xc960
callq 0x23d40
movsd %xmm0, -0x460(%rbp)
jmp 0x2394c
movsd -0x460(%rbp), %xmm0
movsd %xmm0, -0x2f0(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x23a67
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x480(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x478(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x470(%rbp)
leaq -0x311(%rbp), %rdi
movq %rdi, -0x468(%rbp)
callq 0xcbc0
movq -0x478(%rbp), %rsi
movq -0x470(%rbp), %rdx
movq -0x468(%rbp), %rcx
leaq -0x310(%rbp), %rdi
callq 0xc7a0
jmp 0x239c6
movq -0x480(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq (%rdi), %rax
movq 0x10(%rax), %rax
leaq -0x310(%rbp), %rsi
leaq -0x2e8(%rbp), %r8
callq *%rax
movb %al, -0x481(%rbp)
jmp 0x239f4
movb -0x481(%rbp), %al
andb $0x1, %al
movb %al, -0x2c1(%rbp)
leaq -0x310(%rbp), %rdi
callq 0xc3e0
leaq -0x311(%rbp), %rdi
callq 0xc730
jmp 0x23b4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23d01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23a56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x310(%rbp), %rdi
callq 0xc3e0
leaq -0x311(%rbp), %rdi
callq 0xc730
jmp 0x23d01
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x4a8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x4a0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x498(%rbp)
leaq -0x339(%rbp), %rdi
movq %rdi, -0x490(%rbp)
callq 0xcbc0
movq -0x4a0(%rbp), %rsi
movq -0x498(%rbp), %rdx
movq -0x490(%rbp), %rcx
leaq -0x338(%rbp), %rdi
callq 0xc7a0
jmp 0x23ac1
movq -0x4a8(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x338(%rbp), %rsi
leaq -0x2e8(%rbp), %r8
callq 0x25a10
movb %al, -0x4a9(%rbp)
jmp 0x23aeb
movb -0x4a9(%rbp), %al
andb $0x1, %al
movb %al, -0x2c1(%rbp)
leaq -0x338(%rbp), %rdi
callq 0xc3e0
leaq -0x339(%rbp), %rdi
callq 0xc730
jmp 0x23b4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x23b39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x338(%rbp), %rdi
callq 0xc3e0
leaq -0x339(%rbp), %rdi
callq 0xc730
jmp 0x23d01
callq 0x23d40
movsd %xmm0, -0x4b8(%rbp)
jmp 0x23b59
movsd -0x4b8(%rbp), %xmm0
subsd -0x2f0(%rbp), %xmm0
movsd %xmm0, -0x2f0(%rbp)
jmp 0x23b73
jmp 0x23b75
jmp 0x23b77
jmp 0x23b79
jmp 0x23b7b
movq 0xb0b9e(%rip), %rax     # 0xd4720
movq (%rax), %rax
addq $0x8, %rax
movq %rax, -0x4c8(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0xc260
movq -0x4c8(%rbp), %rdi
movq %rax, %rsi
movq 0xb0b73(%rip), %rax     # 0xd4720
movq (%rax), %rax
movq (%rax), %rdx
decq %rdx
callq 0xc320
movq -0x28(%rbp), %rdi
callq 0x229c0
movq %rax, -0x4c0(%rbp)
jmp 0x23bcd
movq -0x4c0(%rbp), %rax
movq %rax, -0x348(%rbp)
jmp 0x23bdd
jmp 0x23bdf
jmp 0x23be1
jmp 0x23be3
jmp 0x23be5
cmpq $0x0, -0x258(%rbp)
je 0x23c5b
movq -0x2c0(%rbp), %rax
cmpq -0x348(%rbp), %rax
je 0x23c5b
jmp 0x23c01
jmp 0x23c03
jmp 0x23c05
movq -0x28(%rbp), %rdi
leaq 0x8263e(%rip), %rsi     # 0xa624e
xorl %eax, %eax
leaq -0x290(%rbp), %rdx
callq 0x47200
jmp 0x23c20
movq -0x28(%rbp), %rdi
leaq -0x290(%rbp), %rsi
movl $0x58, %edx
callq 0xc530
movq -0x28(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x23c59
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
leaq -0x2b8(%rbp), %rsi
movl $0x28, %edx
callq 0xc530
jmp 0x23c5b
testb $0x1, -0x2c1(%rbp)
je 0x23c6c
jmp 0x23c66
jmp 0x23c68
jmp 0x23c6a
jmp 0x23c74
jmp 0x23c6e
jmp 0x23c70
jmp 0x23c72
jmp 0x23c74
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x23cd1
movq 0xb0a9a(%rip), %rdi     # 0xd4720
addq $0x98, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x50d50
jmp 0x23c9b
movq -0x10(%rbp), %rax
movq %rax, -0x4d0(%rbp)
cmpq $0x0, %rax
je 0x23cc9
movq -0x4d0(%rbp), %rdi
callq 0x25780
movq -0x4d0(%rbp), %rdi
movl $0x20, %esi
callq 0xc6a0
movq $0x0, -0x10(%rbp)
movb -0x2c1(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0xcc(%rbp)
leaq -0x2e8(%rbp), %rdi
callq 0xc3e0
jmp 0x23d0f
leaq -0x2e8(%rbp), %rdi
callq 0xc3e0
jmp 0x23d25
leaq -0x58(%rbp), %rdi
callq 0xc3e0
movq -0x8(%rbp), %rax
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0xc3e0
movq -0x60(%rbp), %rdi
callq 0xcba0
nopw (%rax,%rax)