LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::run_entry(scdc_transport_connection_pool_entry_t*)
void scdc_transport_connection_pool::run_entry(scdc_transport_connection_pool_entry_t *entry)
{
  SCDC_TRACE("run_entry: entry: '" << entry << "'");

  pthread_mutex_lock(&entry->lock);

  do
  {
    if (entry->conn)
    {
      pthread_mutex_unlock(&entry->lock);

      execute(entry->conn);

/*      pthread_mutex_lock(&entry->lock);*/
      entry->conn = 0;
/*      pthread_mutex_unlock(&entry->lock);*/

      release_entry(entry);

#if THREAD_POOLING
      pthread_mutex_lock(&entry->lock);
#else
      SCDC_TRACE("run_entry: return A");
      return;
#endif

    } else
    {
      entry->wait = true;
      pthread_cond_wait(&entry->cond, &entry->lock);
      entry->wait = false;
    }

  } while (entry->run);

  pthread_mutex_unlock(&entry->lock);

  SCDC_TRACE("run_entry: return B");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsi), %r14
movq %r14, %rdi
callq 0xb800
leaq 0x30(%rbx), %r12
cmpq $0x0, 0x70(%rbx)
je 0x4985d
movq %r14, %rdi
callq 0xb3e0
movq 0x70(%rbx), %rsi
movq %r15, %rdi
callq 0x49a4a
andq $0x0, 0x70(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x49a00
movq %r14, %rdi
callq 0xb800
jmp 0x49870
movb $0x1, 0x6a(%rbx)
movq %r12, %rdi
movq %r14, %rsi
callq 0xb860
movb $0x0, 0x6a(%rbx)
cmpb $0x0, 0x69(%rbx)
jne 0x49828
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb3e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::finish()
void scdc_transport_connection_pool::finish()
{
  SCDC_TRACE("finish:");

  pthread_mutex_lock(&pool->lock);

  /* wait until all entries have been released */
  while (pool->naquired_entries > 0) pthread_cond_wait(&pool->cond, &pool->lock);

#if THREAD_POOLING
  while (pool->free_entries.size() > 0)
  {
    scdc_transport_connection_pool_entry_t *entry = pool->free_entries.front();
    pool->free_entries.pop_front();
    exit_entry(entry);
    destroy_entry(entry);
  }
#else
  while (pool->dead_entries.size() > 0)
  {
    scdc_transport_connection_pool_entry_t *entry = pool->dead_entries.front();
    pool->dead_entries.pop_front();
    destroy_entry(entry);
  }
#endif

  pthread_mutex_unlock(&pool->lock);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xb800
movq 0x10(%rbx), %rsi
cmpq $0x0, 0x78(%rsi)
jle 0x498de
leaq 0x28(%rsi), %rdi
callq 0xb860
jmp 0x4989a
movq 0x98(%rsi), %rax
addq $0x98, %rsi
movq 0x10(%rax), %r14
movq %rsi, %rdi
callq 0x4a5dc
movq %r14, %rsi
callq 0x498f8
movq %r14, %rsi
callq 0x4992a
movq 0x10(%rbx), %rsi
cmpq $0x0, 0xa8(%rsi)
jne 0x498b0
movq %rsi, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb3e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::exit_entry(scdc_transport_connection_pool_entry_t*)
void scdc_transport_connection_pool::exit_entry(scdc_transport_connection_pool_entry_t *entry)
{
  SCDC_TRACE("exit_entry: entry: '" << entry << "'");

  pthread_mutex_lock(&entry->lock);
  entry->run = false;
  pthread_mutex_unlock(&entry->lock);

  pthread_cond_signal(&entry->cond);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x8(%rsi), %r14
movq %r14, %rdi
callq 0xb800
movb $0x0, 0x69(%rbx)
movq %r14, %rdi
callq 0xb3e0
addq $0x30, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb030
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::destroy_entry(scdc_transport_connection_pool_entry_t*)
void scdc_transport_connection_pool::destroy_entry(scdc_transport_connection_pool_entry_t *entry)
{
  SCDC_TRACE("destroy_entry: entry: '" << entry << "'");

  if (entry->async)
  {
    SCDC_TRACE("destroy_entry: joining thread with id: '" << entry->thread << "'");
    pthread_join(entry->thread, NULL);
  }

  pthread_cond_destroy(&entry->cond);
  pthread_mutex_destroy(&entry->lock);

  delete entry;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpb $0x1, 0x68(%rsi)
jne 0x4993f
movq 0x60(%rbx), %rdi
xorl %esi, %esi
callq 0xb4a0
leaq 0x30(%rbx), %rdi
callq 0xba60
leaq 0x8(%rbx), %rdi
callq 0xb640
pushq $0x78
popq %rsi
movq %rbx, %rdi
popq %rbx
jmp 0xb550
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::create_entry(bool)
scdc_transport_connection_pool_entry_t *scdc_transport_connection_pool::create_entry(bool async)
{
  SCDC_TRACE("create_entry: async: '" << async << "'");

  scdc_transport_connection_pool_entry_t *entry = new scdc_transport_connection_pool_entry_t();

  entry->pool = this;

  pthread_mutex_init(&entry->lock, NULL);
  pthread_cond_init(&entry->cond, NULL);

  entry->async = async;
  entry->run = async;
  entry->wait = false;
  entry->conn = 0;

  if (entry->async)
  {
    SCDC_TRACE("acquire_entry: creating thread");
    pthread_create(&entry->thread, NULL, entry_thread_run, entry);
    SCDC_TRACE("acquire_entry: id: '" << entry->thread << "'");
  }

  return entry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
pushq $0x78
popq %rdi
callq 0xb540
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movaps %xmm0, 0x50(%rax)
andq $0x0, 0x70(%rax)
movaps %xmm0, 0x60(%rax)
leaq 0x30(%rax), %r15
movq %r14, (%rax)
leaq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xb810
movq %r15, %rdi
xorl %esi, %esi
callq 0xb680
movb %bpl, 0x68(%rbx)
movb %bpl, 0x69(%rbx)
movb $0x0, 0x6a(%rbx)
andq $0x0, 0x70(%rbx)
testl %ebp, %ebp
je 0x499e1
movq %rbx, %rdi
addq $0x60, %rdi
leaq 0x18(%rip), %rdx        # 0x499ef
xorl %esi, %esi
movq %rbx, %rcx
callq 0xb9f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::release_entry(scdc_transport_connection_pool_entry_t*)
void scdc_transport_connection_pool::release_entry(scdc_transport_connection_pool_entry_t *entry)
{
  SCDC_TRACE("release_entry: entry: '" << entry << "'");

  pthread_mutex_lock(&pool->lock);

#if THREAD_POOLING
  pool->free_entries.push_back(entry);
#else
  pool->total_entries.erase(std::find(pool->total_entries.begin(), pool->total_entries.end(), entry));
  exit_entry(entry);
  pool->dead_entries.push_back(entry);
#endif

  --pool->naquired_entries;

  pthread_mutex_unlock(&pool->lock);

  pthread_cond_signal(&pool->cond);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %rsi, (%r14)
movq 0x10(%rdi), %rdi
callq 0xb800
movl $0x98, %edi
addq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x4a5e4
movq 0x10(%rbx), %rdi
decq 0x78(%rdi)
callq 0xb3e0
movq 0x10(%rbx), %rdi
addq $0x28, %rdi
callq 0xb030
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::shutdown(bool)
void scdc_transport_connection_pool::shutdown(bool interrupt)
{
  SCDC_TRACE("shutdown:");

  pthread_mutex_lock(&pool->lock);

  for (std::list<scdc_transport_connection_pool_entry_t *>::iterator i = pool->total_entries.begin(); i != pool->total_entries.end(); ++i)
  {
    scdc_transport_connection_pool_entry_t *entry = *i;

    pthread_mutex_lock(&entry->lock);
    
    if (entry->conn) transport->shutdown(entry->conn, interrupt);

    pthread_mutex_unlock(&entry->lock);
  }

  pool->run = false;

  pthread_mutex_unlock(&pool->lock);

  pthread_cond_signal(&pool->cond);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xb800
movq 0x10(%rbx), %rdi
leaq 0x80(%rdi), %r15
movzbl %bpl, %ebp
movq (%r15), %r15
leaq 0x80(%rdi), %rax
cmpq %rax, %r15
je 0x49adf
movq 0x10(%r15), %r12
leaq 0x8(%r12), %r14
movq %r14, %rdi
callq 0xb800
movq 0x70(%r12), %rsi
testq %rsi, %rsi
je 0x49ad1
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
movl %ebp, %edx
callq *0x50(%rax)
movq %r14, %rdi
callq 0xb3e0
movq 0x10(%rbx), %rdi
jmp 0x49a9b
movb $0x0, 0x58(%rdi)
callq 0xb3e0
movq 0x10(%rbx), %rdi
addq $0x28, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb030
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::start(long long)
bool scdc_transport::start(scdcint_t mode)
{
  SCDC_TRACE("start: running: '" << running << "'");

  if (running)
  {
    SCDC_FAIL("start: already running");
    return false;
  }

  server = new scdc_transport_server_t();

  /* use connection pool */
  if (max_connections > 0) server_connections = new scdc_transport_connection_pool(max_connections, this);

  compcoup_transport->start(mode);

  if (mode == SCDC_NODEPORT_START_LOOP_UNTIL_CANCEL)
  {
    async = false;
    running = true;
    shutdowned = false;
    canceled = false;
    run();

  } else if (mode == SCDC_NODEPORT_START_ASYNC_UNTIL_CANCEL)
  {
    async = true;
    running = true;
    shutdowned = false;
    canceled = false;
    pthread_create(&server->thread, NULL, server_run, this);

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

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x1, 0x29(%rdi)
jne 0x49bad
leaq 0x2ba2b(%rip), %rbx     # 0x75580
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x49caf
addq $0x20, %rdi
callq 0xb800
movq (%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x760e(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xb282(%rip), %rsi      # 0x54e08
movq %rax, %rdi
callq 0xb520
leaq 0xaeb7(%rip), %rsi      # 0x54a4c
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%rbx), %rdi
jmp 0x49ca6
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x8
popq %rdi
callq 0xb540
andq $0x0, (%rax)
movq %rax, 0x30(%r14)
movq 0x20(%r14), %r12
testq %r12, %r12
jle 0x49be9
pushq $0x18
popq %rdi
callq 0xb540
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x49628
movq %r15, 0x38(%r14)
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x28(%rax)
cmpq $0x4, %rbx
je 0x49c15
cmpq $0x1, %rbx
jne 0x49c36
movl $0x100, 0x28(%r14)      # imm = 0x100
movq (%r14), %rax
movq %r14, %rdi
callq *0x38(%rax)
jmp 0x49c32
movl $0x101, 0x28(%r14)      # imm = 0x101
movq 0x30(%r14), %rdi
leaq 0xab(%rip), %rdx        # 0x49cd3
xorl %esi, %esi
movq %r14, %rcx
callq 0xb9f0
movb $0x1, %al
jmp 0x49cb1
leaq 0x2b943(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x49caf
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x18(%rax), %rdi
leaq 0x782a(%rip), %rsi      # 0x51488
callq 0xb520
leaq 0xb19e(%rip), %rsi      # 0x54e08
movq %rax, %rdi
callq 0xb520
leaq 0xb14c(%rip), %rsi      # 0x54dc5
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb1d0
leaq 0xadd0(%rip), %rsi      # 0x54a63
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0xb550
movq %rbx, %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::stop()
bool scdc_transport::stop()
{
  SCDC_TRACE("stop: running: '" << running << "', canceled: '" << canceled << "'");

  if (!running && !canceled)
  {
    SCDC_FAIL("stop: not running");
    return false;
  }

  if (!canceled) cancel(true);

  if (async)
  {
    pthread_join(server->thread, NULL);
    async = false;
  }

  /* wait for all connections of the connection pool to be finished */
  if (server_connections) server_connections->finish();

  compcoup_transport->stop();

  delete server_connections; server_connections = 0;
  delete server; server = 0;

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x2b(%rdi), %al
cmpb $0x0, 0x29(%rdi)
jne 0x49cf6
testb $0x1, %al
je 0x49d6c
testb $0x1, %al
jne 0x49d06
movq (%rbx), %rax
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq *0x30(%rax)
cmpb $0x1, 0x28(%rbx)
jne 0x49d1e
movq 0x30(%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0xb4a0
movb $0x0, 0x28(%rbx)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x49d2c
callq 0x4988a
movq 0x8(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x49d47
movq %r14, %rdi
callq 0x49688
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0xb550
andq $0x0, 0x38(%rbx)
movq 0x30(%rbx), %rdi
pushq $0x8
popq %rsi
callq 0xb550
andq $0x0, 0x30(%rbx)
movb $0x1, %al
jmp 0x49dcd
leaq 0x2b80d(%rip), %rbx     # 0x75580
movq (%rbx), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x49dcb
addq $0x20, %rdi
callq 0xb800
movq (%rbx), %rax
movq 0x8(%rax), %rdi
leaq 0x73f4(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xb068(%rip), %rsi      # 0x54e08
movq %rax, %rdi
callq 0xb520
leaq 0xacc4(%rip), %rsi      # 0x54a73
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%rbx), %rdi
addq $0x20, %rdi
callq 0xb3e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::cancel(bool)
bool scdc_transport::cancel(bool interrupt)
{
  SCDC_TRACE("cancel: interrupt: '" << interrupt << "', running: '" << running << "'");

  if (!running)
  {
    SCDC_FAIL("cancel: not running");
    return false;
  }

  compcoup_transport->cancel(interrupt);

  running = false;
  canceled = true;

  /* shutdown (potential) server */
  shutdown(0, interrupt);

  /* shutdown all connections of the connection pool */
  if (server_connections) server_connections->shutdown(interrupt);

  return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movb 0x29(%rdi), %bl
testb %bl, %bl
je 0x49e1d
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
movzbl %sil, %ebp
movl %ebp, %esi
callq *0x38(%rax)
movb $0x0, 0x29(%r14)
movb $0x1, 0x2b(%r14)
movq (%r14), %rax
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq *0x50(%rax)
movq 0x38(%r14), %rdi
testq %rdi, %rdi
je 0x49e7c
movl %ebp, %esi
callq 0x49a76
jmp 0x49e7c
leaq 0x2b75c(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x49e7c
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x7343(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xafb7(%rip), %rsi      # 0x54e08
movq %rax, %rdi
callq 0xb520
leaq 0xac25(%rip), %rsi      # 0x54a85
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::run()
void scdc_transport::run()
{
  SCDC_TRACE("run:");

  scdcint_t i = 0;

  while (running)
  {
    SCDC_TRACE("run: loop: " << i << ": accept");

    scdc_transport_connection_t *conn = accept();

    SCDC_TRACE("run: loop: " << i << ": accept: '" << conn << "'");

    if (conn)
    {
      if (server_connections) server_connections->insert(conn);
      else
      {
        serve(conn);
        close(conn);
      }
    }

    if (loop_handler) loop_handler(loop_handler_data, i);

    ++i;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpb $0x1, 0x29(%rbx)
jne 0x49ee8
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x40(%rax)
testq %rax, %rax
je 0x49ed1
movq %rax, %r15
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x49eb9
movq %r15, %rsi
callq 0x496d2
jmp 0x49ed1
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x58(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x60(%rax)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x49ee3
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq *%rax
incq %r14
jmp 0x49e8f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::connect(scdc_transport_connection_t*)
scdc_transport_connection_t *scdc_transport::connect(scdc_transport_connection_t *conn)
{
  SCDC_TRACE("connect:");

  create_incoming(conn);
  create_outgoing(conn);

  compcoup_transport->connect(conn);

  conn->open = true;

  return conn;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
pushq $-0x1
popq %r15
movq %r15, %rdx
callq *0xd8(%rax)
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq *0xe8(%rax)
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x50(%rax)
movb $0x1, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: send_outgoing_dataset_inout(scdc_transport_connection_t*, _scdc_dataset_inout_t*)
static bool send_outgoing_dataset_inout(scdc_transport_connection_t *conn, scdc_dataset_input_t *inout)
{
#if 0
  return send_outgoing_dataset_inout(conn, input);
#else

  bool ret = true;

#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)
    {
      ret = ret && send_outgoing_buf(conn, SCDC_DATASET_INOUT_MBUF_M(inout, i));
    }

  } else
#endif
  {
    scdc_buf_t *inout_buf;

#if SCDC_DEPRECATED
    scdc_buf_t buf;

    buf.ptr = SCDC_DATASET_INOUT_BUF_PTR(inout);
    buf.size = SCDC_DATASET_INOUT_BUF_SIZE(inout);
    buf.current = SCDC_DATASET_INOUT_BUF_CURRENT(inout);

    inout_buf = &buf;
#else /* SCDC_DEPRECATED */
    inout_buf = &inout->buf;
#endif /* SCDC_DEPRECATED */

    ret = send_outgoing_buf(conn, inout_buf);

#if SCDC_DEPRECATED
    SCDC_DATASET_INOUT_BUF_CURRENT(inout) = buf.current;
#endif /* SCDC_DEPRECATED */
  }

  return ret;

#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rcx
testq %rcx, %rcx
js 0x4a2eb
movq 0x10(%rbx), %rax
movq %rsp, %r15
movq %rax, (%r15)
movq %rcx, 0x8(%r15)
movq 0x20(%rbx), %rax
movq %rax, 0x10(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x4a485
movq 0x10(%r15), %rcx
movq %rcx, 0x20(%rbx)
andb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb $0x1, %al
xorl %r15d, %r15d
xorl %r12d, %r12d
testq %rcx, %rcx
js 0x4a2fc
xorl %edx, %edx
jmp 0x4a305
movq 0x20(%rbx), %rsi
xorl %edx, %edx
subq %rsi, %rdx
cmpq %rdx, %r12
jge 0x4a2dd
testb $0x1, %al
je 0x4a323
movq 0x10(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x4a485
movq 0x18(%rbx), %rcx
jmp 0x4a325
xorl %eax, %eax
incq %r12
addq $0x18, %r15
jmp 0x4a2f3
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::send_outgoing(scdc_transport_connection_t*)
bool scdc_transport::send_outgoing(scdc_transport_connection_t *conn)
{
  SCDC_TRACE("send_outgoing:");

  scdcint_t n = conn->outgoing.get_read_pos_buf_size();
  
  if (n > 0) n = send(conn, conn->outgoing.get_read_pos_buf(), n);

/*  SCDC_INFO("send: " << n);*/

  if (n < 0) return false;

  conn->total_send += n;

  conn->outgoing.inc_read_pos(n);

  conn->outgoing.compact();

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x90(%rsi), %rbx
movq 0x98(%rsi), %rdx
subq %rdx, %rbx
jle 0x4a367
addq 0x78(%r14), %rdx
movq (%rdi), %rax
movq %r14, %rsi
movq %rbx, %rcx
callq *0x78(%rax)
movq %rax, %rbx
testq %rbx, %rbx
js 0x4a380
addq %rbx, 0x20(%r14)
leaq 0x70(%r14), %rdi
addq %rbx, 0x98(%r14)
callq 0x4fa60
testq %rbx, %rbx
setns %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::recv_incoming(scdc_transport_connection_t*)
bool scdc_transport::recv_incoming(scdc_transport_connection_t *conn)
{
  SCDC_TRACE("recv_incoming:");

  conn->incoming.compact();

  scdcint_t n = conn->incoming.get_write_pos_buf_size();

  if (n > 0) n = receive(conn, conn->incoming.get_write_pos_buf(), n);

/*  SCDC_INFO("receive: " << n);*/

  if (n < 0) return false;

  conn->total_receive += n;

  conn->incoming.inc_write_pos(n);

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rsi), %rdi
callq 0x4fa60
movq 0x40(%rbx), %rax
movq 0x50(%rbx), %rdx
subq %rdx, %rax
jle 0x4a3c5
addq 0x38(%rbx), %rdx
movq (%r14), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq *0x80(%r8)
testq %rax, %rax
js 0x4a3d2
addq %rax, 0x28(%rbx)
addq %rax, 0x50(%rbx)
testq %rax, %rax
setns %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::create_incoming(scdc_transport_connection_t*, long long)
void scdc_transport::create_incoming(scdc_transport_connection_t *conn, scdcint_t size)
{
  if (size < 0) size = DEFAULT_TRANSPORT_ALLOC_INCOMING_SIZE;
  conn->incoming.alloc_buf(size);

  conn->incoming.set_data(conn);
  conn->incoming.set_next(scdc_transport_incoming_next);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testq %rdx, %rdx
movl $0x8000, %esi           # imm = 0x8000
cmovnsq %rdx, %rsi
leaq 0x30(%rbx), %rdi
callq 0x4a5f0
movq %rbx, 0x60(%rbx)
leaq 0x6(%rip), %rax         # 0x4a40a
movq %rax, 0x68(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport::create_outgoing(scdc_transport_connection_t*, long long)
void scdc_transport::create_outgoing(scdc_transport_connection_t *conn, scdcint_t size)
{
  if (size < 0) size = DEFAULT_TRANSPORT_ALLOC_OUTGOING_SIZE;
  conn->outgoing.alloc_buf(size);

  conn->outgoing.set_data(conn);
  conn->outgoing.set_next(scdc_transport_outgoing_next);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
testq %rdx, %rdx
movl $0x8000, %esi           # imm = 0x8000
cmovnsq %rdx, %rsi
leaq 0x70(%rbx), %rdi
callq 0x4a5f0
movq %rbx, 0xa0(%rbx)
leaq 0x9(%rip), %rax         # 0x4a45e
movq %rax, 0xa8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: send_outgoing_buf(scdc_transport_connection_t*, _scdc_buf_t*)
static bool send_outgoing_buf(scdc_transport_connection_t *conn, scdc_buf_t *buf)
{
  bool ret = true;

  scdcint_t mx = buf->current;
  buf->current = 0;

  const char *src = static_cast<char *>(buf->ptr);
  scdcint_t src_size = buf->size;

  if (mx > 0)
  {
    /* 1st: copy from inout to outgoing */
    char *dst = conn->outgoing.get_write_pos_buf();
    scdcint_t dst_size = conn->outgoing.get_write_pos_buf_size();

    scdcint_t n = min(src_size, mx);

    /* only short messages that fit into outgoing */
    if (n <= DEFAULT_TRANSPORT_SEND_OUTGOING_DATASET_INOUT_THRESHOLD && n <= dst_size)
    {
      memcpy(dst, src, n);

      conn->outgoing.inc_write_pos(n);

      src += n;
      src_size -= n;

      mx -= n;
      buf->current += n;
    }
  }

  if (mx > 0)
  {
    /* send outgoing before sending inout directly */
    ret = ret && conn->transport->send_outgoing(conn);

    /* 2nd: send from inout */

    scdcint_t n;

    while (1)
    {
      n = min(src_size, mx);

      if (n <= 0) break;

      n = conn->transport->send(conn, src, n);

/*      SCDC_INFO("conn->transport->send: " << n);*/

      if (n < 0) break;

      conn->total_send += n;

      src += n;
      src_size -= n;

      mx -= n;
      buf->current += n;
    }

    ret = ret && (n >= 0);
  }

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x10(%rsi), %r13
andq $0x0, 0x10(%rsi)
movb $0x1, %al
testq %r13, %r13
jle 0x4a557
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r15
movq 0x8(%rsi), %r12
cmpq %r12, %r13
movq %r12, %rbp
cmovlq %r13, %rbp
cmpq $0x400, %rbp            # imm = 0x400
jg 0x4a501
movq 0x80(%r14), %rax
movq 0x90(%r14), %rdi
subq %rdi, %rax
cmpq %rax, %rbp
jg 0x4a501
addq 0x78(%r14), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0xb420
addq %rbp, 0x90(%r14)
addq %rbp, 0x10(%rbx)
subq %rbp, %r13
movb $0x1, %al
jle 0x4a557
addq %rbp, %r15
subq %rbp, %r12
movq (%r14), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0xd0(%rax)
movl %eax, %ebp
cmpq %r12, %r13
movq %r12, %rax
cmovlq %r13, %rax
testq %rax, %rax
jle 0x4a54c
movq (%r14), %rdi
movq (%rdi), %r8
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq *0x78(%r8)
testq %rax, %rax
js 0x4a54c
addq %rax, 0x20(%r14)
addq %rax, %r15
subq %rax, %r12
subq %rax, %r13
addq %rax, 0x10(%rbx)
jmp 0x4a512
testq %rax, %rax
setns %al
andb %al, %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_O2/mh0fm4[P]SCDC/src/components/transport/transport_stream.cc
// Function: scdc_transport_stream::start(long long, _IO_FILE*, _IO_FILE*)
bool scdc_transport_stream::start(scdcint_t mode, FILE *ifile, FILE *ofile)
{
  SCDC_TRACE("start: mode '" << mode << "', ifile: '" << ifile << "', ofile: '" << ofile << "'");

#if SCDC_TRANSPORT_STREAM_USE_IOSTREAM
  stream_server->stream_conn.is = 0;
  stream_server->stream_conn.os = 0;
#endif
  stream_server->stream_conn.ifile = (ifile)?ifile:stdin;
  stream_server->stream_conn.ofile = (ofile)?ofile:stdout;

  return scdc_transport::start(mode);
}

// Assembly:
movq %rcx, %xmm0
movq %rdx, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm1, %xmm0
pshufd $0xb1, %xmm0, %xmm2     # xmm2 = xmm0[1,0,3,2]
pand %xmm0, %xmm2
movq 0x2a786(%rip), %rax     # 0x74fd0
movq 0x40(%rdi), %rcx
movq 0x2a763(%rip), %rdx     # 0x74fb8
movq (%rdx), %xmm0
movq (%rax), %xmm3
punpcklqdq %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0]
pand %xmm2, %xmm3
pandn %xmm1, %xmm2
por %xmm3, %xmm2
movdqu %xmm2, 0x2d8(%rcx)
jmp 0x49b40
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_stream.cc
// Function: scdc_transport_stream::stop()
bool scdc_transport_stream::stop()
{
  SCDC_TRACE("stop");

  if (!scdc_transport::stop())
  {
    SCDC_FAIL("stop: failed to stop");
    return false;
  }

#if SCDC_TRANSPORT_STREAM_USE_IOSTREAM
  stream_server->stream_conn.is = 0;
  stream_server->stream_conn.os = 0;
#endif
  stream_server->stream_conn.ifile = 0;
  stream_server->stream_conn.ofile = 0;

  return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x49ce2
movl %eax, %ebx
testb %al, %al
je 0x4a89c
movq 0x40(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x2d8(%rax)
jmp 0x4a8fb
leaq 0x2acdd(%rip), %r14     # 0x75580
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4a8fb
addq $0x20, %rdi
callq 0xb800
movq (%r14), %rax
movq 0x8(%rax), %rdi
leaq 0x68c4(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0xa24b(%rip), %rsi      # 0x54b1b
movq %rax, %rdi
callq 0xb520
leaq 0xa24f(%rip), %rsi      # 0x54b2e
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r14), %rdi
addq $0x20, %rdi
callq 0xb3e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_stream.cc
// Function: scdc_transport_stream::accept()
scdc_transport_connection_t *scdc_transport_stream::accept()
{
  SCDC_TRACE("accept:");

  scdc_transport_stream_connection_t *stream_conn = 0;

  stream_server->stream_conn.open = 
#if SCDC_TRANSPORT_STREAM_USE_IOSTREAM
    (stream_server->stream_conn.is && !stream_server->stream_conn.is->eof() && stream_server->stream_conn.os && !stream_server->stream_conn.os->eof()) ||
#endif
    (stream_server->stream_conn.ifile && !feof(stream_server->stream_conn.ifile) && stream_server->stream_conn.ofile && !feof(stream_server->stream_conn.ofile));

  SCDC_TRACE("accept: I/O streams open: " << stream_server->stream_conn.open);

  if (stream_server->stream_conn.open)
  {
    stream_conn = &stream_server->stream_conn;

  } else
  {
    cancel(false);
    return 0;
  }

  SCDC_TRACE("accept: '" << stream_conn << "'");

  return scdc_transport::accept(stream_conn);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rcx
movq 0x2d8(%rcx), %rdi
testq %rdi, %rdi
je 0x4a927
callq 0xb890
movq 0x40(%rbx), %rcx
testl %eax, %eax
je 0x4a93a
movb $0x0, 0x8(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x30(%rax)
xorl %eax, %eax
popq %rbx
retq
movq 0x2e0(%rcx), %rdi
testq %rdi, %rdi
je 0x4a927
callq 0xb890
movq 0x40(%rbx), %rsi
testl %eax, %eax
sete 0x8(%rsi)
jne 0x4a92b
movq %rbx, %rdi
popq %rbx
jmp 0x49eee
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_stream.cc
// Function: scdc_transport_stream::connect(_IO_FILE*, _IO_FILE*)
scdc_transport_connection_t *scdc_transport_stream::connect(FILE *ifile, FILE *ofile)
{
  SCDC_TRACE("start: ifile: '" << ifile << "', ofile: '" << ofile << "'");

  scdc_transport_stream_connection_t *stream_conn = new scdc_transport_stream_connection_t(this);

#if SCDC_TRANSPORT_STREAM_USE_IOSTREAM
  stream_conn->is = 0;
  stream_conn->os = 0;
#endif
  stream_conn->ifile = (ifile)?ifile:stdin;
  stream_conn->ofile = (ofile)?ofile:stdout;

  return scdc_transport::connect(stream_conn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movl $0x2e8, %edi            # imm = 0x2E8
callq 0xb540
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4ac38
movq %r12, %xmm0
movq %r15, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm1, %xmm0
pshufd $0xb1, %xmm0, %xmm2     # xmm2 = xmm0[1,0,3,2]
pand %xmm0, %xmm2
movq 0x2a5f3(%rip), %rax     # 0x74fd0
movq 0x2a5d4(%rip), %rcx     # 0x74fb8
movq (%rcx), %xmm0
movq (%rax), %xmm3
punpcklqdq %xmm0, %xmm3    # xmm3 = xmm3[0],xmm0[0]
pand %xmm2, %xmm3
pandn %xmm1, %xmm2
por %xmm3, %xmm2
movdqu %xmm2, 0x2d8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x49f66
movq %rax, %r14
movl $0x2e8, %esi            # imm = 0x2E8
movq %rbx, %rdi
callq 0xb550
movq %r14, %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_tcp.cc
// Function: scdc_transport_tcp::accept()
scdc_transport_connection_t *scdc_transport_tcp::accept()
{
  SCDC_TRACE("accept:");

  scdc_transport_tcp_connection_t *tcp_conn = new scdc_transport_tcp_connection_t(this);

  socklen_t saddrlen = sizeof(tcp_server->saddr);

#if SCDC_TRANSPORT_TCP_USE_SHUTDOWN_EXCEPTION
  try
  {
#endif
    tcp_conn->socket = ::accept(tcp_server->server_socket, (struct sockaddr *) &tcp_server->saddr, &saddrlen);

#if SCDC_TRANSPORT_TCP_USE_SHUTDOWN_EXCEPTION
  } catch (const std::exception& ex)
  {
    SCDC_ERROR("connection " << tcp_conn << ": exception during accept");
    tcp_conn->socket = -1;
  }
#endif

  if (tcp_conn->socket != -1)
  {
    tcp_conn->open = true;

  } else
  {
    if (!shutdowned) SCDC_FAIL("accept: accepting connection failed: '" << strerror(errno) << "'");
    delete tcp_conn;
    tcp_conn = 0;
    return 0;
  }

  SCDC_TRACE("accept: '" << tcp_conn << "'");

  return scdc_transport::accept(tcp_conn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movl $0x2d8, %edi            # imm = 0x2D8
callq 0xb540
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4b622
leaq 0xc(%rsp), %rdx
movl $0x10, (%rdx)
movq 0x40(%r14), %rsi
movl 0x10(%rsi), %edi
callq 0xb150
movl %eax, 0x2d4(%rbx)
cmpl $-0x1, %eax
je 0x4b03e
movb $0x1, 0x8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x49eee
jmp 0x4b0e8
cmpb $0x0, 0x2a(%r14)
jne 0x4b0d1
leaq 0x2a530(%rip), %r15     # 0x75580
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4b0d1
addq $0x20, %rdi
callq 0xb800
movq (%r15), %rax
movq 0x8(%rax), %rdi
leaq 0x6117(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0x9b34(%rip), %rsi      # 0x54bb1
movq %rax, %rdi
callq 0xb520
leaq 0x9bc5(%rip), %rsi      # 0x54c51
movq %rax, %rdi
callq 0xb520
movq %rax, %r14
callq 0xb060
movl (%rax), %edi
callq 0xb180
movq %r14, %rdi
movq %rax, %rsi
callq 0xb520
leaq 0x82ae(%rip), %rsi      # 0x53363
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3e0
movq %rbx, %rdi
callq 0x4ac4e
movl $0x2d8, %esi            # imm = 0x2D8
movq %rbx, %rdi
callq 0xb550
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x2d8, %esi            # imm = 0x2D8
movq %rbx, %rdi
callq 0xb550
movq %r14, %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_tcp.cc
// Function: scdc_transport_tcp::shutdown(scdc_transport_connection_t*, bool)
void scdc_transport_tcp::shutdown(scdc_transport_connection_t *conn, bool interrupt)
{
  SCDC_TRACE("shutdown: interrupt: '" << interrupt << "'");

  scdc_transport::shutdown(conn, interrupt);

#if SCDC_TRANSPORT_TCP_USE_SHUTDOWN_EXCEPTION
  if (interrupt) throw scdc_transport_tcp_shutdown_ex();
#endif

  if (conn)
  {
    SCDC_TRACE("shutdown: connection socket shutdown");

    scdc_transport_tcp_connection_t *tcp_conn = static_cast<scdc_transport_tcp_connection_t *>(conn);

    ::shutdown(tcp_conn->socket, SHUT_RDWR);

  } else if (tcp_server)
  {
    SCDC_TRACE("shutdown: server socket shutdown");

    ::shutdown(tcp_server->server_socket, SHUT_RDWR);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x49f24
testq %rbx, %rbx
je 0x4b127
addq $0x2d4, %rbx            # imm = 0x2D4
jmp 0x4b134
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x4b145
addq $0x10, %rbx
movl (%rbx), %edi
pushq $0x2
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb740
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_tcp.cc
// Function: scdc_transport_tcp::send(scdc_transport_connection_t*, void const*, long long)
scdcint_t scdc_transport_tcp::send(scdc_transport_connection_t *conn, const void *buf, scdcint_t buf_size)
{
  SCDC_TRACE("send: conn: '" << conn << "', buf: '" << buf << "', buf_size: " << buf_size);

  scdc_transport_tcp_connection_t *tcp_conn = static_cast<scdc_transport_tcp_connection_t *>(conn);

  scdcint_t n = 0;

  bool except = false;

#if SCDC_TRANSPORT_TCP_USE_SHUTDOWN_EXCEPTION
  try
  {
#endif
do_send:
    n = ::send(tcp_conn->socket, buf, buf_size, 0);

    if (n < 0 && errno == EINTR)
    {
      SCDC_TRACE("send: continuing after EINTR");
      goto do_send;
    }

#if SCDC_TRANSPORT_TCP_USE_SHUTDOWN_EXCEPTION
  } catch (const scdc_transport_tcp_shutdown_ex &ex)
  {
    SCDC_INFO("connection: " << tcp_conn << ": send: catch shutdown exception");
    n = -1;
    except = false;
  }
#endif

  if (n < 0)
  {
    if (!except) SCDC_ERROR("connection: " << tcp_conn << ": send: send failed: '" << strerror(errno) << "'");
    return -1;
  }

  SCDC_TRACE("connection: " << tcp_conn << ": sent " << n << " byte(s)");
  
  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movl 0x2d4(%r14), %edi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xb280
testq %rax, %rax
jns 0x4b504
callq 0xb060
cmpl $0x4, (%rax)
je 0x4b430
leaq 0x2a122(%rip), %r12     # 0x75580
movq (%r12), %rdi
pushq $-0x1
popq %rbx
cmpq $0x0, 0x18(%rdi)
je 0x4b507
movq %rax, %r15
addq $0x20, %rdi
callq 0xb800
movq (%r12), %rax
movq 0x18(%rax), %rdi
leaq 0x5ffd(%rip), %rsi      # 0x51488
callq 0xb520
leaq 0x971a(%rip), %rsi      # 0x54bb1
movq %rax, %rdi
callq 0xb520
leaq 0x969d(%rip), %rsi      # 0x54b43
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r14, %rsi
callq 0xb3f0
leaq 0x982b(%rip), %rsi      # 0x54ceb
movq %rax, %rdi
callq 0xb520
movq %rax, %r14
movl (%r15), %edi
callq 0xb180
movq %r14, %rdi
movq %rax, %rsi
callq 0xb520
leaq 0x7e7e(%rip), %rsi      # 0x53363
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x4b507
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_tcp.cc
// Function: scdc_transport_tcp::receive(scdc_transport_connection_t*, void*, long long)
scdcint_t scdc_transport_tcp::receive(scdc_transport_connection_t *conn, void *buf, scdcint_t max_buf_size)
{
  SCDC_TRACE("receive: conn: '" << conn << "', buf: '" << buf << "', max_buf_size: " << max_buf_size);

  scdc_transport_tcp_connection_t *tcp_conn = static_cast<scdc_transport_tcp_connection_t *>(conn);

  if (max_buf_size <= 0)
  {
    SCDC_TRACE("connection: " << tcp_conn << ": receive: nothing to receive");
    return 0;
  }

  scdcint_t n = 0;

  bool except = false;

#if SCDC_TRANSPORT_TCP_USE_SHUTDOWN_EXCEPTION
  try
  {
#endif

do_recv:
    n = ::recv(tcp_conn->socket, buf, max_buf_size, 0);

    if (n < 0 && errno == EINTR)
    {
      SCDC_TRACE("receive: continuing after EINTR");
      goto do_recv;
    }

#if SCDC_TRANSPORT_TCP_USE_SHUTDOWN_EXCEPTION
  } catch (const scdc_transport_tcp_shutdown_ex &ex)
  {
    SCDC_INFO("connection " << tcp_conn << ": receive: catch shutdown receive");
    n = -1;
    except = false;
  }
#endif

  if (n < 0)
  {
    if (!except) SCDC_ERROR("connection: " << tcp_conn << ": receive: receive failed: '" << strerror(errno) << "'");
    return -1;
  }

  SCDC_TRACE("connection " << tcp_conn << ": receive: received " << n << " byte(s)");

  /* receiving 0 bytes signals that the socket was closed */
  if (n == 0) n = -1;

  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
jle 0x4b602
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movl 0x2d4(%r14), %edi
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xb160
testq %rax, %rax
jns 0x4b606
callq 0xb060
cmpl $0x4, (%rax)
je 0x4b52e
leaq 0x2a024(%rip), %r12     # 0x75580
movq (%r12), %rdi
pushq $-0x1
popq %rbx
cmpq $0x0, 0x18(%rdi)
je 0x4b612
movq %rax, %r15
addq $0x20, %rdi
callq 0xb800
movq (%r12), %rax
movq 0x18(%rax), %rdi
leaq 0x5eff(%rip), %rsi      # 0x51488
callq 0xb520
leaq 0x961c(%rip), %rsi      # 0x54bb1
movq %rax, %rdi
callq 0xb520
leaq 0x959f(%rip), %rsi      # 0x54b43
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r14, %rsi
callq 0xb3f0
leaq 0x9744(%rip), %rsi      # 0x54d02
movq %rax, %rdi
callq 0xb520
movq %rax, %r14
movl (%r15), %edi
callq 0xb180
movq %r14, %rdi
movq %rax, %rsi
callq 0xb520
leaq 0x7d80(%rip), %rsi      # 0x53363
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x4b612
xorl %ebx, %ebx
jmp 0x4b612
xorl %ebx, %ebx
cmpq $0x1, %rax
sbbq %rbx, %rbx
orq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_uds.cc
// Function: scdc_transport_uds::close()
void scdc_transport_uds::close()
{
  SCDC_TRACE("close:");

  ::close(uds_server->server_socket);

  ::unlink(uds_server->uds_filename.c_str());

  delete uds_server;
  uds_server = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movl 0x70(%rax), %edi
callq 0xbaa0
movq 0x40(%rbx), %rax
movq 0x78(%rax), %rdi
callq 0xb250
movq 0x40(%rbx), %r14
testq %r14, %r14
je 0x4b8e0
leaq 0x78(%r14), %rdi
callq 0xb230
movl $0x98, %esi
movq %r14, %rdi
callq 0xb550
andq $0x0, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_uds.cc
// Function: scdc_transport_uds::accept()
scdc_transport_connection_t *scdc_transport_uds::accept()
{
  SCDC_TRACE("accept:");

  scdc_transport_uds_connection_t *uds_conn = new scdc_transport_uds_connection_t(this);

  socklen_t saddrlen = sizeof(uds_server->saddr);

#if SCDC_TRANSPORT_UDS_USE_SHUTDOWN_EXCEPTION
  try
  {
#endif
    uds_conn->socket = ::accept(uds_server->server_socket, (struct sockaddr *) &uds_server->saddr, &saddrlen);

#if SCDC_TRANSPORT_UDS_USE_SHUTDOWN_EXCEPTION
  } catch (const scdc_transport_uds_shutdown_ex &ex)
  {
    SCDC_INFO("connection " << uds_conn << ": exception during accept");
    uds_conn->socket = -1;
  }
#endif

  if (uds_conn->socket != -1)
  {
    uds_conn->open = true;

  } else
  {
    if (!shutdowned) SCDC_FAIL("accept: accepting connection failed: '" << strerror(errno) << "'");
    delete uds_conn;
    uds_conn = 0;
    return 0;
  }

  SCDC_TRACE("accept: '" << uds_conn << "'");

  return scdc_transport::accept(uds_conn);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movl $0x2d8, %edi            # imm = 0x2D8
callq 0xb540
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4bedc
leaq 0xc(%rsp), %rdx
movl $0x6e, (%rdx)
movq 0x40(%r14), %rsi
movl 0x70(%rsi), %edi
callq 0xb150
movl %eax, 0x2d4(%rbx)
cmpl $-0x1, %eax
je 0x4b954
movb $0x1, 0x8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x49eee
jmp 0x4b9fe
cmpb $0x0, 0x2a(%r14)
jne 0x4b9e7
leaq 0x29c1a(%rip), %r15     # 0x75580
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x4b9e7
addq $0x20, %rdi
callq 0xb800
movq (%r15), %rax
movq 0x8(%rax), %rdi
leaq 0x5801(%rip), %rsi      # 0x51188
callq 0xb520
leaq 0x93a1(%rip), %rsi      # 0x54d34
movq %rax, %rdi
callq 0xb520
leaq 0x92af(%rip), %rsi      # 0x54c51
movq %rax, %rdi
callq 0xb520
movq %rax, %r14
callq 0xb060
movl (%rax), %edi
callq 0xb180
movq %r14, %rdi
movq %rax, %rsi
callq 0xb520
leaq 0x7998(%rip), %rsi      # 0x53363
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3e0
movq %rbx, %rdi
callq 0x4ac4e
movl $0x2d8, %esi            # imm = 0x2D8
movq %rbx, %rdi
callq 0xb550
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x2d8, %esi            # imm = 0x2D8
movq %rbx, %rdi
callq 0xb550
movq %r14, %rdi
callq 0xb9a0
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_uds.cc
// Function: scdc_transport_uds::shutdown(scdc_transport_connection_t*, bool)
void scdc_transport_uds::shutdown(scdc_transport_connection_t *conn, bool interrupt)
{
  SCDC_TRACE("shutdown: interrupt: '" << interrupt << "'");

  scdc_transport::shutdown(conn, interrupt);

#if SCDC_TRANSPORT_UDS_USE_SHUTDOWN_EXCEPTION
  if (interrupt) throw scdc_transport_uds_shutdown_ex();
#endif

  if (conn)
  {
    SCDC_TRACE("shutdown: connection socket shutdown");

    scdc_transport_uds_connection_t *uds_conn = static_cast<scdc_transport_uds_connection_t *>(conn);

    ::shutdown(uds_conn->socket, SHUT_RDWR);

  } else if (uds_server)
  {
    SCDC_TRACE("shutdown: server socket shutdown");

    ::shutdown(uds_server->server_socket, SHUT_RDWR);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x49f24
testq %rbx, %rbx
je 0x4ba3d
addq $0x2d4, %rbx            # imm = 0x2D4
jmp 0x4ba4a
movq 0x40(%r14), %rbx
testq %rbx, %rbx
je 0x4ba5b
addq $0x70, %rbx
movl (%rbx), %edi
pushq $0x2
popq %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb740
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_uds.cc
// Function: scdc_transport_uds::send(scdc_transport_connection_t*, void const*, long long)
scdcint_t scdc_transport_uds::send(scdc_transport_connection_t *conn, const void *buf, scdcint_t buf_size)
{
  SCDC_TRACE("send: conn: '" << conn << "', buf: '" << buf << "', buf_size: " << buf_size);

  scdc_transport_uds_connection_t *uds_conn = static_cast<scdc_transport_uds_connection_t *>(conn);

  scdcint_t n = 0;

  bool except = false;

#if SCDC_TRANSPORT_UDS_USE_SHUTDOWN_EXCEPTION
  try
  {
#endif
do_send:
    n = ::send(uds_conn->socket, buf, buf_size, 0);

    if (n < 0 && errno == EINTR)
    {
      SCDC_TRACE("send: continuing after EINTR");
      goto do_send;
    }

#if SCDC_TRANSPORT_UDS_USE_SHUTDOWN_EXCEPTION
  } catch (const scdc_transport_uds_shutdown_ex &ex)
  {
    SCDC_INFO("connection: " << uds_conn << ": send: catch shutdown exception");
    n = -1;
    except = false;
  }
#endif

  if (n < 0)
  {
    if (!except) SCDC_ERROR("connection: " << uds_conn << ": send: send failed: '" << strerror(errno) << "'");
    return -1;
  }

  SCDC_TRACE("connection: " << uds_conn << ": send: sent " << n << " byte(s)");
  
  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movl 0x2d4(%r14), %edi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xb280
testq %rax, %rax
jns 0x4bdbe
callq 0xb060
cmpl $0x4, (%rax)
je 0x4bcea
leaq 0x29868(%rip), %r12     # 0x75580
movq (%r12), %rdi
pushq $-0x1
popq %rbx
cmpq $0x0, 0x18(%rdi)
je 0x4bdc1
movq %rax, %r15
addq $0x20, %rdi
callq 0xb800
movq (%r12), %rax
movq 0x18(%rax), %rdi
leaq 0x5743(%rip), %rsi      # 0x51488
callq 0xb520
leaq 0x8fe3(%rip), %rsi      # 0x54d34
movq %rax, %rdi
callq 0xb520
leaq 0x8de3(%rip), %rsi      # 0x54b43
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r14, %rsi
callq 0xb3f0
leaq 0x8f71(%rip), %rsi      # 0x54ceb
movq %rax, %rdi
callq 0xb520
movq %rax, %r14
movl (%r15), %edi
callq 0xb180
movq %r14, %rdi
movq %rax, %rsi
callq 0xb520
leaq 0x75c4(%rip), %rsi      # 0x53363
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x4bdc1
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mh0fm4[P]SCDC/src/components/transport/transport_uds.cc
// Function: scdc_transport_uds::receive(scdc_transport_connection_t*, void*, long long)
scdcint_t scdc_transport_uds::receive(scdc_transport_connection_t *conn, void *buf, scdcint_t max_buf_size)
{
  SCDC_TRACE("receive: conn: '" << conn << "', buf: '" << buf << "', max_buf_size: " << max_buf_size);

  scdc_transport_uds_connection_t *uds_conn = static_cast<scdc_transport_uds_connection_t *>(conn);

  if (max_buf_size <= 0)
  {
    SCDC_TRACE("connection: " << uds_conn << ": receive: nothing to receive");
    return 0;
  }

  scdcint_t n = 0;

  bool except = false;

#if SCDC_TRANSPORT_UDS_USE_SHUTDOWN_EXCEPTION
  try
  {
#endif

do_recv:
    n = ::recv(uds_conn->socket, buf, max_buf_size, 0);

    if (n < 0 && errno == EINTR)
    {
      SCDC_TRACE("receive: continuing after EINTR");
      goto do_recv;
    }

#if SCDC_TRANSPORT_UDS_USE_SHUTDOWN_EXCEPTION
  } catch (const scdc_transport_uds_shutdown_ex &ex)
  {
    SCDC_INFO("connection " << uds_conn << ": receive: catch shutdown receive");
    n = -1;
    except = false;
  }
#endif

  if (n < 0)
  {
    if (!except) SCDC_ERROR("connection: " << uds_conn << ": receive: receive failed: '" << strerror(errno) << "'");
    return -1;
  }

  SCDC_TRACE("connection " << uds_conn << ": receive: received " << n << " byte(s)");

  /* receiving 0 bytes signals that the socket was closed */
  if (n == 0) n = -1;

  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
jle 0x4bebc
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movl 0x2d4(%r14), %edi
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xb160
testq %rax, %rax
jns 0x4bec0
callq 0xb060
cmpl $0x4, (%rax)
je 0x4bde8
leaq 0x2976a(%rip), %r12     # 0x75580
movq (%r12), %rdi
pushq $-0x1
popq %rbx
cmpq $0x0, 0x18(%rdi)
je 0x4becc
movq %rax, %r15
addq $0x20, %rdi
callq 0xb800
movq (%r12), %rax
movq 0x18(%rax), %rdi
leaq 0x5645(%rip), %rsi      # 0x51488
callq 0xb520
leaq 0x8ee5(%rip), %rsi      # 0x54d34
movq %rax, %rdi
callq 0xb520
leaq 0x8ce5(%rip), %rsi      # 0x54b43
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
movq %r14, %rsi
callq 0xb3f0
leaq 0x8e8a(%rip), %rsi      # 0x54d02
movq %rax, %rdi
callq 0xb520
movq %rax, %r14
movl (%r15), %edi
callq 0xb180
movq %r14, %rdi
movq %rax, %rsi
callq 0xb520
leaq 0x74c6(%rip), %rsi      # 0x53363
movq %rax, %rdi
callq 0xb520
movq %rax, %rdi
callq 0xb270
movq (%r12), %rdi
addq $0x20, %rdi
callq 0xb3e0
jmp 0x4becc
xorl %ebx, %ebx
jmp 0x4becc
xorl %ebx, %ebx
cmpq $0x1, %rax
sbbq %rbx, %rbx
orq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop