LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_direct.cc
// Function: scdc_compcoup_direct::dataset_cmd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, _scdc_dataset_inout_t*, _scdc_dataset_inout_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_compcoup_direct::dataset_cmd(const std::string &cmd, scdc_dataset_input_t *input, scdc_dataset_output_t *output, scdc_result &result)
{
  SCDC_TRACE("dataset_cmd: cmd: '" << cmd << "'");

  if (!running)
  {
    result = "direct disabled";
    return 0;
  }

  return scdc_compcoup::dataset_cmd(cmd, input, output, result);
}

// Assembly:
movq %r8, %rax
cmpb $0x0, 0x18(%rdi)
je 0x62c87
movq %rax, %r8
jmp 0x67984
pushq %rax
movq 0x8(%rax), %rdx
leaq 0xb0ee(%rip), %rcx      # 0x6dd81
movl $0xf, %r8d
movq %rax, %rdi
xorl %esi, %esi
callq 0xb870
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_direct.cc
// Function: scdc_compcoup_direct::start(long long)
bool scdc_compcoup_direct::start(scdcint_t mode)
{
  SCDC_TRACE("start: mode: '" << mode << "'");

  if (running) return false;

  if (mode == SCDC_NODEPORT_START_LOOP_UNTIL_CANCEL)
  {
    pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
    pthread_mutex_lock(&lock);

    running = true;

    pthread_cond_t cond = PTHREAD_COND_INITIALIZER;

    data = static_cast<void *>(&cond);
    pthread_cond_wait(&cond, &lock);
    data = 0;

    pthread_cond_destroy(&cond);

    running = false;

    pthread_mutex_unlock(&lock);
    pthread_mutex_destroy(&lock);

  } else if (mode == SCDC_NODEPORT_START_ASYNC_UNTIL_CANCEL)
  {
    running = true;

  } else
  {
    SCDC_ERROR("start: mode '" << mode << "' not supported");
    return false;
  }

  return true;
}

// Assembly:
cmpb $0x0, 0x18(%rdi)
je 0x62cb1
xorl %eax, %eax
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x4, %rsi
je 0x62d37
cmpq $0x1, %rbx
jne 0x62d43
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
xorl %r12d, %r12d
movq %r12, 0x20(%rbx)
movq %rbx, %rdi
callq 0xb7d0
movb $0x1, 0x18(%r14)
leaq 0x30(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq %r15, 0x10(%r14)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb840
movq %r12, 0x10(%r14)
movq %r15, %rdi
callq 0xba70
movb $0x0, 0x18(%r14)
movq %rbx, %rdi
callq 0xb3b0
movq %rbx, %rdi
callq 0xb620
jmp 0x62d3c
movb $0x1, 0x18(%r14)
movb $0x1, %al
jmp 0x62dfb
leaq 0x29826(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x62df9
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0x7719(%rip), %rsi      # 0x6a488
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xb029(%rip), %rsi      # 0x6ddac
movl $0x11, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xb027(%rip), %rsi      # 0x6ddbe
movl $0xd, %edx
movq %r14, %rdi
callq 0xb5f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb1d0
movq %rax, %rbx
leaq 0xacaa(%rip), %rsi      # 0x6da63
movl $0xf, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_direct.cc
// Function: scdc_compcoup_direct::cancel(bool)
bool scdc_compcoup_direct::cancel(bool interrupt)
{
  SCDC_TRACE("cancel: interrupt: '" << interrupt << "'");

  if (!running) return false;

  if (data)
  {
    pthread_cond_t *cond = static_cast<pthread_cond_t *>(data);
    pthread_cond_signal(cond);
  }

  running = false;

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movb 0x18(%rdi), %bl
cmpb $0x1, %bl
jne 0x62e42
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x62e3d
callq 0xb030
movb $0x0, 0x18(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::dataset_input_outgoing_produce(scdc_transport_connection_t*, _scdc_dataset_inout_t*)
bool scdc_compcoup_transport::dataset_input_outgoing_produce(scdc_transport_connection_t *conn, scdc_dataset_input_t *input)
{
  while (1)
  {
    SCDC_TRACE("dataset_input_outgoing_produce: outgoing produce");
    if (!dataset_input_outgoing_send(conn, input))
    {
      SCDC_FAIL("dataset_input_outgoing_produce: send failed");
      return false;
    }

    if (!input || !input->next) break;

    SCDC_TRACE("dataset_input_outgoing_produce: next");
    if (!input->next(input, 0))
    {
      SCDC_FAIL("dataset_input_outgoing_produce: next failed");
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6601c
testb %al, %al
je 0x64aaa
movb $0x1, %al
testq %rbx, %rbx
je 0x64b4a
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
je 0x64b4a
movq %rbx, %rdi
xorl %esi, %esi
callq *%rcx
testq %rax, %rax
jne 0x64a59
leaq 0x27add(%rip), %rax     # 0x8c570
movq (%rax), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x64b48
leaq 0x9853(%rip), %rbx      # 0x6e2fb
jmp 0x64ac6
leaq 0x27abf(%rip), %rax     # 0x8c570
movq (%rax), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x64b48
leaq 0x9809(%rip), %rbx      # 0x6e2cf
addq $0x20, %rdi
callq 0xb7d0
leaq 0x27a9a(%rip), %r15     # 0x8c570
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x56a4(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x9307(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %r14, %rdi
callq 0xb5f0
movl $0x2b, %edx
movq %r14, %rdi
movq %rbx, %rsi
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 (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::dataset_output_incoming_consume(scdc_transport_connection_t*, _scdc_dataset_inout_t*, bool*)
bool scdc_compcoup_transport::dataset_output_incoming_consume(scdc_transport_connection_t *conn, scdc_dataset_output_t *output, bool *next)
{
  scdc_dataset_output_t output_null;

  /* use null output for consuming all output */
  if (!output)
  {
    scdc_dataset_output_unset(&output_null);
    output = &output_null;
  }

  *next = true;

  while (*next)
  {
    SCDC_TRACE("dataset_output_incoming_consume: incoming receive");
    if (!dataset_output_incoming_recv(conn, output, next))
    {
      SCDC_FAIL("dataset_output_incoming_consume: receive failed");
      return false;
    }

    if (output == &output_null) continue; 

    if (!output->next) break;

    SCDC_TRACE("dataset_output_incoming_consume: next");
    if (!output->next(output, 0))
    {
      SCDC_FAIL("dataset_output_incoming_consume: next failed");
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rsp, %r15
testq %rsi, %rsi
jne 0x64b77
movq %r15, %rdi
callq 0x2b09c
movq %r15, %r12
movb $0x1, (%rbx)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x6615a
testb %al, %al
je 0x64bb3
cmpq %r15, %r12
je 0x64ba7
movq 0x38(%r12), %rax
testq %rax, %rax
je 0x64bac
movq %r12, %rdi
xorl %esi, %esi
callq *%rax
testq %rax, %rax
je 0x64c0e
cmpb $0x0, (%rbx)
jne 0x64b7a
movb $0x1, %al
jmp 0x64cab
leaq 0x279b6(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x64ca9
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x55a9(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x920c(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x9720(%rip), %rsi      # 0x6e327
movl $0x2f, %edx
jmp 0x64c67
leaq 0x2795b(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x64ca9
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x554e(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x91b1(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x96f5(%rip), %rsi      # 0x6e357
movl $0x2c, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
leaq 0x278d3(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: read_output_next(_scdc_dataset_inout_t*, _scdc_result_t*)
static scdcint_t read_output_next(scdc_dataset_output_t *output, scdc_result_t *result)
{
  SCDC_TRACE("read_output_next:");

  scdc_transport_connection_t *transport_connection = static_cast<scdc_transport_connection_t *>(output->data);

  bool next = false, ret = true;

  if (transport_connection->current_incoming_output_next || transport_connection->current_incoming_output_size > 0) ret = scdc_compcoup_transport::dataset_output_incoming_recv(transport_connection, output, &next);
  else SCDC_DATASET_INOUT_BUF_CURRENT(output) = 0;

  if (next)
  {
    /* continue with current output->next and output->data */

  } else
  {
    if (transport_connection->current_incoming_output_intern)
    {
      /* continue with current output->next and output->data */

      /* unset internal buffer usage for next 'next' */
      transport_connection->current_incoming_output_intern = false;

    } else
    {
      /* stop and release connection */
      output->next = 0;
      output->data = 0;

      transport_connection->release();
    }
  }

  return (ret)?SCDC_SUCCESS:SCDC_FAILURE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x40(%rdi), %rbx
movb $0x0, 0xf(%rsp)
cmpb $0x0, 0x2d1(%rbx)
jne 0x64cdf
cmpq $0x0, 0x2c8(%rbx)
jle 0x64d29
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6615a
movzbl %al, %r15d
cmpb $0x0, 0xf(%rsp)
jne 0x64d1c
cmpb $0x1, 0x2d3(%rbx)
jne 0x64d0c
movb $0x0, 0x2d3(%rbx)
jmp 0x64d1c
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r14)
movq %rbx, %rdi
callq 0x5f894
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq $0x0, 0x20(%r14)
movl $0x1, %r15d
jmp 0x64cf3
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::on_dataset_close(scdc_transport_connection_t*)
void scdc_compcoup_transport::on_dataset_close(scdc_transport_connection_t *conn)
{
  SCDC_TRACE("on_dataset_close:");

  /* read request: DATASET_CLOSE <state> */

  scdc_result result;

  scdc_dataset_transport::read_state_begin(conn);
  scdc_dataset *dataset = dataprovs->dataset_open_read_state(conn->get_incoming(), result);
  scdc_dataset_transport::read_state_end(conn);

  /* send answer: DATASET_CLOSE (OK|FAILED) RESULT <string> */

  scdc_dataset_transport::write_delim(conn, "DATASET_CLOSE", -1, default_delim);

  if (dataset)
  {
    scdc_dataset_transport::write_delim(conn, "OK", -1, default_delim);
    dataprovs->dataset_close(dataset, result);

  } else
  {
    SCDC_FAIL("on_dataset_close: failed");
    scdc_dataset_transport::write_delim(conn, "FAILED", -1, default_delim);
  }

  scdc_dataset_transport::write_delim(conn, "RESULT", -1, default_delim);
  scdc_dataset_transport::write_string(conn, result.c_str(), result.size());

  transport->send_outgoing(conn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq %rsi, %rdi
callq 0x67000
movq 0x8(%r14), %rdi
leaq 0x30(%rbx), %rsi
movq %rsp, %rdx
callq 0x1e73c
movq %rax, %r15
movq %rbx, %rdi
callq 0x67100
leaq 0x8aef(%rip), %rsi      # 0x6def6
movq %rbx, %rdi
movq $-0x1, %rdx
movl $0x20, %ecx
callq 0x668c4
testq %r15, %r15
je 0x6544f
leaq 0x410d(%rip), %rsi      # 0x69534
movq %rbx, %rdi
movq $-0x1, %rdx
movl $0x20, %ecx
callq 0x668c4
movq 0x8(%r14), %rdi
movq %rsp, %rdx
movq %r15, %rsi
callq 0x1e72e
jmp 0x65501
leaq 0x2711a(%rip), %r13     # 0x8c570
movq (%r13), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x654e6
addq $0x20, %rdi
callq 0xb7d0
movq (%r13), %rax
movq 0x8(%rax), %r15
leaq 0x4d0b(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x896e(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0x8f31(%rip), %rsi      # 0x6e3d6
movl $0x18, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %r15, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r13), %rdi
addq $0x20, %rdi
callq 0xb3b0
leaq 0x8986(%rip), %rsi      # 0x6de73
movq %rbx, %rdi
movq $-0x1, %rdx
movl $0x20, %ecx
callq 0x668c4
leaq 0x899d(%rip), %rsi      # 0x6dea5
movq %rbx, %rdi
movq $-0x1, %rdx
movl $0x20, %ecx
callq 0x668c4
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x66f58
movq 0x10(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0xd0(%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x65553
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x65563
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6557c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::on_cmd_handler(char const*, scdc_data*)
bool scdc_compcoup_transport::on_cmd_handler(const char *cmd, scdc_data *incoming)
{
  if (!cmd_handler) return false;
  
  if (cmd[0] == '\0') return true;

  scdcint_t n = cmd_handler(cmd_handler_data, cmd, incoming->get_read_pos_buf(), incoming->get_read_pos_buf_size());

  return (n >= 0);
}

// Assembly:
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x65cd4
cmpb $0x0, (%rsi)
je 0x65cd7
pushq %rax
movq 0x28(%rdi), %rdi
movq 0x20(%rdx), %rcx
movq 0x28(%rdx), %r8
movq 0x8(%rdx), %rdx
addq %r8, %rdx
subq %r8, %rcx
callq *%rax
testq %rax, %rax
setns %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::dataset_input_outgoing_send(scdc_transport_connection_t*, _scdc_dataset_inout_t*)
bool scdc_compcoup_transport::dataset_input_outgoing_send(scdc_transport_connection_t *conn, scdc_dataset_input_t *input)
{
  SCDC_TRACE("dataset_input_outgoing_send:");

  if (!scdc_dataset_transport::write_input_info(conn, input))
  {
    SCDC_FAIL("dataset_input_outgoing_send: write input info failed");
    return false;
  }

  if (input)
  {
    if (!conn->transport->send_outgoing_dataset_input(conn, input))
    {
      SCDC_FAIL("dataset_input_outgoing_send: send dataset input failed");
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x675a6
testb %al, %al
je 0x660b4
movb $0x1, %bl
testq %r14, %r14
je 0x66151
movq (%r15), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movq %r14, %rdx
callq *0xb8(%rax)
testb %al, %al
jne 0x66151
leaq 0x26510(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x6614f
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x4103(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7d66(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x8083(%rip), %rsi      # 0x6e130
movl $0x36, %edx
jmp 0x6610d
leaq 0x264b5(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x6614f
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x40a8(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7d0b(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7ff3(%rip), %rsi      # 0x6e0fb
movl $0x34, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
leaq 0x2642d(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::dataset_output_outgoing_send(scdc_transport_connection_t*, _scdc_dataset_inout_t*)
bool scdc_compcoup_transport::dataset_output_outgoing_send(scdc_transport_connection_t *conn, scdc_dataset_output_t *output)
{
  SCDC_TRACE("dataset_output_outgoing_send:");

  if (!scdc_dataset_transport::write_output_info(conn, output))
  {
    SCDC_FAIL("dataset_output_outgoing_send: write output info failed");
    return false;
  }

  if (output)
  {
    if (!conn->transport->send_outgoing_dataset_output(conn, output))
    {
      SCDC_FAIL("dataset_output_outgoing_send: send dataset output failed");
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x675a6
testb %al, %al
je 0x66532
movb $0x1, %bl
testq %r14, %r14
je 0x665cf
movq (%r15), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movq %r14, %rdx
callq *0xc0(%rax)
testb %al, %al
jne 0x665cf
leaq 0x26092(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x665cd
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x3c85(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x78e8(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7d10(%rip), %rsi      # 0x6e23b
movl $0x38, %edx
jmp 0x6658b
leaq 0x26037(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x665cd
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x3c2a(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x788d(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7c7e(%rip), %rsi      # 0x6e204
movl $0x36, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
leaq 0x25faf(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::dataset_input_incoming_consume(scdc_transport_connection_t*, _scdc_dataset_inout_t*, bool*)
bool scdc_compcoup_transport::dataset_input_incoming_consume(scdc_transport_connection_t *conn, scdc_dataset_input_t *input, bool *next)
{
  scdc_dataset_input_t input_null;

  /* use null input for consuming all input */
  if (!input)
  {
    scdc_dataset_input_unset(&input_null);
    input = &input_null;
  }

  *next = true;

  while (*next)
  {
    SCDC_TRACE("dataset_input_incoming_consume: incoming receive");
    if (!dataset_input_incoming_recv(conn, input, next))
    {
      SCDC_FAIL("dataset_input_incoming_consume: receive failed");
      return false;
    }

    if (input == &input_null) continue; 

    if (!input->next) break;

    SCDC_TRACE("dataset_input_incoming_consume: next");
    if (!input->next(input, 0))
    {
      SCDC_FAIL("dataset_input_incoming_consume: next failed");
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rsp, %r15
testq %rsi, %rsi
jne 0x665ff
movq %r15, %rdi
callq 0x2b07c
movq %r15, %r12
movb $0x1, (%rbx)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x65cdc
testb %al, %al
je 0x6663b
cmpq %r15, %r12
je 0x6662f
movq 0x38(%r12), %rax
testq %rax, %rax
je 0x66634
movq %r12, %rdi
xorl %esi, %esi
callq *%rax
testq %rax, %rax
je 0x66696
cmpb $0x0, (%rbx)
jne 0x66602
movb $0x1, %al
jmp 0x66733
leaq 0x25f2e(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x66731
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x3b21(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7784(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7be5(%rip), %rsi      # 0x6e274
movl $0x2e, %edx
jmp 0x666ef
leaq 0x25ed3(%rip), %rbx     # 0x8c570
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x66731
addq $0x20, %rdi
callq 0xb7d0
movq (%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x3ac6(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7729(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7bb9(%rip), %rsi      # 0x6e2a3
movl $0x2b, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
leaq 0x25e4b(%rip), %rax     # 0x8c570
movq (%rax), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_compcoup_transport::dataset_output_outgoing_produce(scdc_transport_connection_t*, _scdc_dataset_inout_t*)
bool scdc_compcoup_transport::dataset_output_outgoing_produce(scdc_transport_connection_t *conn, scdc_dataset_output_t *output)
{
  while (1)
  {
    SCDC_TRACE("dataset_output_outgoing_produce: outgoing produce");
    dataset_output_outgoing_send(conn, output);

    if (!output || !output->next) break;

    SCDC_TRACE("dataset_output_outgoing_produce: next");
    if (!output->next(output, 0))
    {
      SCDC_FAIL("dataset_output_outgoing_produce: next failed");
      return false;
    }
  }

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6649a
movb $0x1, %al
testq %rbx, %rbx
je 0x6680b
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
je 0x6680b
movq %rbx, %rdi
xorl %esi, %esi
callq *%rcx
testq %rax, %rax
jne 0x6674a
leaq 0x25df0(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x66809
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0x39e7(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x764a(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x7bbb(%rip), %rsi      # 0x6e384
movl $0x2c, %edx
movq %rbx, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: write_output_next(_scdc_dataset_inout_t*, _scdc_result_t*)
static scdcint_t write_output_next(scdc_dataset_output_t *output, scdc_result_t *result)
{
  scdc_transport_connection_t *transport_connection = static_cast<scdc_transport_connection_t *>(output->data);

  bool ret = true;

  ret = ret && scdc_dataset_transport::write_output_info(transport_connection, output);
  ret = ret && transport_connection->transport->send_outgoing_dataset_output(transport_connection, output);

  return (ret)?SCDC_SUCCESS:SCDC_FAILURE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x675a6
testb %al, %al
je 0x668b4
movq (%r14), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
movzbl %al, %eax
jmp 0x668b6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::write_delim(scdc_transport_connection_t*, char const*, long long, char)
static bool write_delim(scdc_transport_connection_t *transport_connection_, const char *s, scdcint_t n, char delim)
    {
      if (n < 0) n = strlen(s);

      bool ret = true;

      ret = ret && write_bytes(transport_connection_, s, n);
      ret = ret && write_bytes(transport_connection_, &delim, 1);

      if (!ret) SCDC_FAIL("write_delim: failed");

      return ret;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb %cl, 0xf(%rsp)
testq %rdx, %rdx
jns 0x668e7
movq %r14, %rdi
callq 0xb200
movq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x672f6
testb %al, %al
je 0x6690c
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x672f6
movl %eax, %ebx
jmp 0x6690e
xorl %ebx, %ebx
testb %bl, %bl
jne 0x669a6
leaq 0x25c53(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x669a6
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x384a(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x74ad(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x7ad0(%rip), %rsi      # 0x6e436
movl $0x13, %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 (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::read_delim(scdc_transport_connection_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, char, bool*)
static bool read_delim(scdc_transport_connection_t *transport_connection_, std::string *s, char delim, bool *stop_at_delim = 0)
    {
      scdc_data *incoming = transport_connection_->get_incoming();
      bool ret = true;

      (*s).clear();

      while (ret)
      {
        const char *src = incoming->get_read_pos_buf();
        scdcint_t src_size = incoming->get_read_pos_buf_size();

/*        SCDC_TRACE("read_delim: '" << string(src, src_size) << "'");*/

        const char *end = memchr(src, delim, src_size);

        scdcint_t n = (end)?(end - src):src_size;

        *s += string(src, n);

        if (end) n += 1;
        incoming->inc_read_pos(n);

        if (stop_at_delim && n > 0)
        {
          *stop_at_delim = (end != 0);
          break;
        }

        if (end) break;

        ret = incoming->do_next();
      }

      return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movq %rdi, %r15
leaq 0x30(%rdi), %rax
movq %rax, 0x38(%rsp)
movq $0x0, 0x8(%rsi)
movq %rsi, 0x40(%rsp)
movq (%rsi), %rax
movb $0x0, (%rax)
movb $0x1, %al
movl %eax, 0x8(%rsp)
leaq 0x28(%rsp), %r12
testb $0x1, 0x8(%rsp)
je 0x66acd
movq 0x50(%r15), %r13
movq 0x58(%r15), %rax
movq 0x38(%r15), %r14
addq %rax, %r14
subq %rax, %r13
movq %r14, %rdi
movl 0xc(%rsp), %esi
movq %r13, %rdx
callq 0xb5b0
movq %rax, %rbx
movq %rax, %rbp
subq %r14, %rbp
testq %rax, %rax
movq %r13, %rdx
cmovneq %rbp, %rdx
movq %r12, 0x18(%rsp)
addq %r14, %rdx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x1bee6
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x40(%rsp), %rdi
callq 0xb150
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x66a72
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb510
incq %rbp
testq %rbx, %rbx
cmovneq %rbp, %r13
addq %r13, 0x58(%r15)
cmpq $0x0, 0x10(%rsp)
je 0x66a9a
testq %r13, %r13
jle 0x66a9a
testq %rbx, %rbx
movq 0x10(%rsp), %rax
setne (%rax)
jmp 0x66a9f
testq %rbx, %rbx
je 0x66aab
xorl %ebx, %ebx
testb %bl, %bl
jne 0x669f3
jmp 0x66acd
movq 0x68(%r15), %rax
movb $0x1, %bl
testq %rax, %rax
je 0x66ac3
movq 0x38(%rsp), %rdi
callq *%rax
movl %eax, 0x8(%rsp)
jmp 0x66aa1
movl $0x0, 0x8(%rsp)
jmp 0x66aa1
movl 0x8(%rsp), %eax
andb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x66afc
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::read_state()
bool read_state()
    {
      bool ret = true;

      ret = ret && read_state_begin(transport_connection);
      ret = ret && read_delim(transport_connection, &state, state_end);

      char c;
      ret = ret && read_bytes(transport_connection, &c, 1);
      SCDC_ASSERT(c == default_delim);

      return ret;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq 0x60(%rdi), %rdi
callq 0x67000
testb %al, %al
je 0x66b4e
movq 0x60(%r14), %rdi
leaq 0x38(%r14), %rsi
xorl %ebx, %ebx
movl $0x3e, %edx
xorl %ecx, %ecx
callq 0x669b2
testb %al, %al
je 0x66b50
movq 0x60(%r14), %rdi
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
callq 0x67440
movl %eax, %ebx
jmp 0x66b50
xorl %ebx, %ebx
cmpb $0x20, 0xf(%rsp)
je 0x66c27
leaq 0x25a0e(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x66c27
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0x39c2(%rip), %rsi      # 0x6a549
movl $0xd, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x72a2(%rip), %rsi      # 0x6de3d
movl $0x1e, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x3795(%rip), %rsi      # 0x6a344
movl $0x1, %edx
movq %r14, %rdi
callq 0xb5f0
movq %r14, %rdi
movl $0x7d, %esi
callq 0xb9a0
movq %rax, %r14
leaq 0x7877(%rip), %rsi      # 0x6e44a
movl $0x15, %edx
movq %rax, %rdi
callq 0xb5f0
leaq 0x52a1(%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 (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::write_state()
bool write_state()
    {
      bool ret = true;

      ret = ret && write_state_begin(transport_connection);
      ret = ret && write_delim(transport_connection, state.data(), state.size(), state_end);

      ret = ret && write_bytes(transport_connection, &default_delim, 1);

      return ret;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
leaq 0x7620(%rip), %rsi      # 0x6e503
movl $0x1, %edx
callq 0x672f6
testb %al, %al
je 0x66f21
movq 0x60(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
movl $0x3e, %ecx
callq 0x668c4
testb %al, %al
je 0x66f21
movq 0x60(%rbx), %rdi
leaq 0x75ec(%rip), %rsi      # 0x6e502
movl $0x1, %edx
popq %rbx
jmp 0x672f6
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::write_string(scdc_transport_connection_t*, char const*, long long)
static bool write_string(scdc_transport_connection_t *transport_connection_, const char *s, scdcint_t n)
    {
      if (n < 0) n = strlen(s);

      char t[16];
      scdcint_t nt = sprintf(t, "%" scdcint_fmt, n);

      bool ret = true;

      ret = ret && write_delim(transport_connection_, t, nt, string_begin);
      ret = ret && write_bytes(transport_connection_, s, n);
      ret = ret && write_bytes(transport_connection_, &string_end, 1);
      ret = ret && write_bytes(transport_connection_, &default_delim, 1);

      return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rdx, %rdx
jns 0x66f7d
movq %r14, %rdi
callq 0xb200
movq %rax, %r15
leaq 0x5d3c(%rip), %rsi      # 0x6ccc0
xorl %ebp, %ebp
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xb0d0
movslq %eax, %rdx
movq %rbx, %rdi
movq %r12, %rsi
movl $0x27, %ecx
callq 0x668c4
testb %al, %al
je 0x66ff1
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x672f6
testb %al, %al
je 0x66fef
leaq 0x753f(%rip), %rsi      # 0x6e505
movl $0x1, %edx
movq %rbx, %rdi
callq 0x672f6
testb %al, %al
je 0x66fef
leaq 0x7524(%rip), %rsi      # 0x6e502
movl $0x1, %edx
movq %rbx, %rdi
callq 0x672f6
movl %eax, %ebp
jmp 0x66ff1
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::read_state_begin(scdc_transport_connection_t*)
static bool read_state_begin(scdc_transport_connection_t *transport_connection_)
    {
      char c;
      bool ret = read_bytes(transport_connection_, &c, 1);

      SCDC_ASSERT(c == state_begin);

      return ret;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xf(%rsp), %r14
movl $0x1, %edx
movq %r14, %rsi
callq 0x67440
movl %eax, %ebx
cmpb $0x3c, (%r14)
je 0x670f3
leaq 0x25542(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x670f3
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0x34f6(%rip), %rsi      # 0x6a549
movl $0xd, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x6dd6(%rip), %rsi      # 0x6de3d
movl $0x1e, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x32c9(%rip), %rsi      # 0x6a344
movl $0x1, %edx
movq %r14, %rdi
callq 0xb5f0
movq %r14, %rdi
movl $0x47, %esi
callq 0xb9a0
movq %rax, %r14
leaq 0x7423(%rip), %rsi      # 0x6e4c2
movl $0x13, %edx
movq %rax, %rdi
callq 0xb5f0
leaq 0x4dd5(%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 (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::read_state_end(scdc_transport_connection_t*)
static bool read_state_end(scdc_transport_connection_t *transport_connection_)
    {
      bool ret = true;

      char c;
      ret = ret && read_bytes(transport_connection_, &c, 1);
      SCDC_ASSERT(c == state_end);

      ret = ret && read_bytes(transport_connection_, &c, 1);
      SCDC_ASSERT(c == default_delim);

      return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7(%rsp), %r14
movl $0x1, %edx
movq %r14, %rsi
callq 0x67440
movl %eax, %ebp
cmpb $0x3e, (%r14)
je 0x671f4
leaq 0x25441(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x671f4
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0x33f5(%rip), %rsi      # 0x6a549
movl $0xd, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x6cd5(%rip), %rsi      # 0x6de3d
movl $0x1e, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x31c8(%rip), %rsi      # 0x6a344
movl $0x1, %edx
movq %r14, %rdi
callq 0xb5f0
movq %r14, %rdi
movl $0x5e, %esi
callq 0xb9a0
movq %rax, %r14
leaq 0x7336(%rip), %rsi      # 0x6e4d6
movl $0x11, %edx
movq %rax, %rdi
callq 0xb5f0
leaq 0x4cd4(%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 (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
testb %bpl, %bpl
je 0x6720f
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x67440
movl %eax, %ebx
jmp 0x67211
xorl %ebx, %ebx
cmpb $0x20, 0x7(%rsp)
je 0x672e8
leaq 0x2534d(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x672e8
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0x3301(%rip), %rsi      # 0x6a549
movl $0xd, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x6be1(%rip), %rsi      # 0x6de3d
movl $0x1e, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x30d4(%rip), %rsi      # 0x6a344
movl $0x1, %edx
movq %r14, %rdi
callq 0xb5f0
movq %r14, %rdi
movl $0x61, %esi
callq 0xb9a0
movq %rax, %r14
leaq 0x71b6(%rip), %rsi      # 0x6e44a
movl $0x15, %edx
movq %rax, %rdi
callq 0xb5f0
leaq 0x4be0(%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 (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::write_bytes(scdc_transport_connection_t*, void const*, long long)
static bool write_bytes(scdc_transport_connection_t *transport_connection_, const void *buf, scdcint_t nbytes)
    {
      scdc_data *outgoing = transport_connection_->get_outgoing();
      bool ret = true;

      const char *src = static_cast<const char*>(buf);

      while (ret)
      {
        scdcint_t n = min(nbytes, outgoing->get_write_pos_buf_size());

        memcpy(outgoing->get_write_pos_buf(), src, n);

        src += n;
        outgoing->inc_write_pos(n);
        nbytes -= n;

        if (nbytes <= 0) break;

        ret = outgoing->do_next();
      }

      return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x70(%rdi), %r12
movb $0x1, %bpl
testb $0x1, %bpl
je 0x67369
movq 0x80(%r15), %r13
movq 0x90(%r15), %rdi
subq %rdi, %r13
cmpq %rbx, %r13
cmovgeq %rbx, %r13
addq 0x78(%r15), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0xb3f0
addq %r13, 0x90(%r15)
subq %r13, %rbx
jle 0x67361
movq 0xa8(%r15), %rax
testq %rax, %rax
je 0x6735f
movq %r12, %rdi
callq *%rax
movl %eax, %ebp
jmp 0x67361
xorl %ebp, %ebp
addq %r13, %r14
testq %rbx, %rbx
jg 0x67311
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::read_bytes(scdc_transport_connection_t*, void*, long long)
static bool read_bytes(scdc_transport_connection_t *transport_connection_, void *buf, scdcint_t nbytes)
    {
      scdc_data *incoming = transport_connection_->get_incoming();
      bool ret = true;

      char *dst = static_cast<char *>(buf);

      while (ret)
      {
        const char *src = incoming->get_read_pos_buf();
        scdcint_t src_size = incoming->get_read_pos_buf_size();

        scdcint_t n = min(nbytes, src_size);

        memcpy(dst, src, n);
        dst += n;

        incoming->inc_read_pos(n);
        nbytes -= n;

        if (nbytes <= 0) break;

        ret = incoming->do_next();
      }

      return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rdi), %r12
movb $0x1, %bpl
testb $0x1, %bpl
je 0x674aa
movq 0x50(%r15), %r13
movq 0x58(%r15), %rax
movq 0x38(%r15), %rsi
addq %rax, %rsi
subq %rax, %r13
cmpq %rbx, %r13
cmovgeq %rbx, %r13
movq %r14, %rdi
movq %r13, %rdx
callq 0xb3f0
addq %r13, 0x58(%r15)
subq %r13, %rbx
jle 0x674a2
movq 0x68(%r15), %rax
testq %rax, %rax
je 0x674a0
movq %r12, %rdi
callq *%rax
movl %eax, %ebp
jmp 0x674a2
xorl %ebp, %ebp
addq %r13, %r14
testq %rbx, %rbx
jg 0x6745b
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::read_bytes(scdc_transport_connection_t*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, long long)
static bool read_bytes(scdc_transport_connection_t *transport_connection_, string *s, scdcint_t nbytes)
    {
      scdc_data *incoming = transport_connection_->get_incoming();
      bool ret = true;

      (*s).clear();

      while (ret)
      {
        const char *src = incoming->get_read_pos_buf();
        scdcint_t src_size = incoming->get_read_pos_buf_size();

        scdcint_t n = min(nbytes, src_size);

        *s += string(src, n);

        incoming->inc_read_pos(n);
        nbytes -= n;

        if (nbytes <= 0) break;

        ret = incoming->do_next();
      }

      return ret;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rdi), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x8(%rsi)
movq (%rsi), %rax
movb $0x0, (%rax)
movb $0x1, %bpl
leaq 0x10(%rsp), %r12
testb $0x1, %bpl
je 0x67570
movq 0x50(%r15), %r13
movq 0x58(%r15), %rax
movq 0x38(%r15), %rsi
addq %rax, %rsi
subq %rax, %r13
cmpq %rbx, %r13
cmovgeq %rbx, %r13
movq %r12, (%rsp)
leaq (%rsi,%r13), %rdx
movq %rsp, %rdi
callq 0x1bee6
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0xb150
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6754c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
addq %r13, 0x58(%r15)
subq %r13, %rbx
jle 0x6756b
movq 0x68(%r15), %rax
testq %rax, %rax
je 0x67569
movq 0x20(%rsp), %rdi
callq *%rax
movl %eax, %ebp
jmp 0x6756b
xorl %ebp, %ebp
testq %rbx, %rbx
jg 0x674f6
andb $0x1, %bpl
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6759e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/compcoup/compcoup_transport.cc
// Function: scdc_dataset_transport::write_inout_info(scdc_transport_connection_t*, _scdc_dataset_inout_t*)
static bool write_inout_info(scdc_transport_connection_t *transport_connection_, scdc_dataset_inout_t *inout)
    {
      scdc_dataset_inout_t inout_null;
      if (!inout)
      {
        scdc_dataset_inout_unset(&inout_null);
        inout = &inout_null;
      }

      scdcint_t inout_buf_current = 0;
#if SCDC_DATASET_INOUT_BUF_MULTIPLE
      if (SCDC_DATASET_INOUT_MBUF_ISSET(inout))
      {
        scdcint_t i;
        for (i = 0; i < SCDC_DATASET_INOUT_MBUF_GET_C(inout); ++i) inout_buf_current += SCDC_DATASET_INOUT_MBUF_M_CURRENT(inout, i);

      } else
#endif
      {
        inout_buf_current = SCDC_DATASET_INOUT_BUF_CURRENT(inout);
      }

      char info[256];
      scdcint_t n = sprintf(info, "%s|%" scdcint_fmt "|%c|%" scdcint_fmt "|%d", inout->format, inout->total_size, inout->total_size_given, inout_buf_current, (inout->next)?1:0);

      if (!write_delim(transport_connection_, info, n, default_delim))
      {
        SCDC_FAIL("write_inout_info: write failed");
        return false;
      }

      return true;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x675ca
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x2b028
movq 0x18(%r14), %rax
testq %rax, %rax
js 0x676c6
movq 0x20(%r14), %r9
movq 0x28(%r14), %rcx
movsbl 0x30(%r14), %r8d
xorl %eax, %eax
cmpq $0x0, 0x38(%r14)
setne %al
movl %eax, (%rsp)
leaq 0x6e7b(%rip), %rsi      # 0x6e473
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xb0d0
movslq %eax, %rdx
movq %rbx, %rdi
movq %r15, %rsi
movl $0x20, %ecx
callq 0x668c4
movl %eax, %ebx
testb %al, %al
jne 0x676b7
leaq 0x24f42(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x676b7
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0x2b39(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x679c(%rip), %rsi      # 0x6ddff
movl $0x14, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x6e0f(%rip), %rsi      # 0x6e486
movl $0x1e, %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 (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
movl %ebx, %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %ecx
xorl %r9d, %r9d
xorl %edx, %edx
testq %rax, %rax
js 0x676d9
xorl %esi, %esi
jmp 0x676e2
movq 0x20(%r14), %rdi
xorl %esi, %esi
subq %rdi, %rsi
cmpq %rsi, %rdx
jge 0x675db
movq 0x10(%r14), %rsi
addq (%rsi,%rcx), %r9
incq %rdx
addq $0x18, %rcx
jmp 0x676d0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/common/data.cc
// Function: scdc_data::compact()
void scdc_data::compact()
{
  if (read_pos <= 0) return;

  SCDC_TRACE("compact: " << write_pos - read_pos << " bytes at offset " << read_pos);

  if (read_pos < write_pos) memmove(buf, buf + read_pos, write_pos - read_pos);

  write_pos -= read_pos;
  read_pos = 0;
}

// Assembly:
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
jle 0x6797f
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdx
subq %rsi, %rdx
jle 0x6796e
movq 0x8(%rbx), %rdi
addq %rdi, %rsi
callq 0xb930
movq 0x28(%rbx), %rax
subq %rax, 0x20(%rbx)
movq $0x0, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Andrea-Guerrieri[P]LEOSoC/LEOSoC/LEOSoC.cpp
// Function: leosoc_init(int)
int leosoc_init ( int id )
{

    printf ( "LEOSoC start\n\r" );

    for ( int indx = 0; indx < PR_REGIONS; indx++ )
    {
            pl.aaw[indx].pr.timeout = 5;
    }

    if ( pmu_detect_platform () )
    {
        fpi_program_full ( id );
        pthread_create( &interrupt , NULL, interrupt_thread, ( void * ) NULL );
        pthread_create( &timer[id] , NULL, timer_thread, ( void * ) id );


        app_run = TRUE;
    }
    else
    {
        app_run = FALSE;
        leosoc_end ();
    }
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x1819a8(%rip), %rdi    # 0x586034
xorl %eax, %eax
callq 0x4cc020
movl $0x30, %eax
leaq 0x1f0ef9(%rip), %rcx    # 0x5f5598
movl $0x5, (%rax,%rcx)
addq $0x30, %rax
cmpq $0x1b0, %rax            # imm = 0x1B0
jne 0x40469f
callq 0x4047f4
testb %al, %al
jne 0x4046c7
movb $0x0, 0x1f0ece(%rip)    # 0x5f5590
callq 0x404702
movzbl %bl, %edi
callq 0x404890
leaq 0x1f15e2(%rip), %rdi    # 0x5f5cb8
leaq -0x125(%rip), %rdx      # 0x4045b8
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x4de280
movslq %ebx, %rcx
leaq 0x1f15d0(%rip), %rax    # 0x5f5cc0
leaq (%rax,%rcx,8), %rdi
leaq -0xd6(%rip), %rdx       # 0x404625
xorl %esi, %esi
callq 0x4de280
// File: /workspace/github_cpp_makefile_star2_O1/Andrea-Guerrieri[P]LEOSoC/LEOSoC/LEOSoC.cpp
// Function: leosoc_join(int, int)
int leosoc_join ( int id, int timeout )
{
    printf ( "waiting for hw thread id %d \n\r", id );

  
    pl.aaw[id].pr.timeout = timeout*100000;

    while ( pl.aaw[id].pr.status != STATUS_ENDED )
    {
        usleep (1);
    }

  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
leaq 0x1818d2(%rip), %rdi    # 0x58605e
movl %ebp, %esi
xorl %eax, %eax
callq 0x4cc020
imull $0x186a0, %ebx, %edx    # imm = 0x186A0
movslq %ebp, %rax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
leaq 0x1f0deb(%rip), %rcx    # 0x5f5598
movl %edx, 0x30(%rax,%rcx)
cmpl $0x4, 0x24(%rax,%rcx)
je 0x4047d0
leaq (%rax,%rcx), %rbx
addq $0x1c, %rbx
movl $0x1, %edi
callq 0x534370
cmpl $0x4, 0x8(%rbx)
jne 0x4047c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq