LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/node_tcp.cc
// Function: scdc_nodeconn_tcp::open(char const*)
bool scdc_nodeconn_tcp::open(const char *authority)
{
  SCDC_TRACE("open: connect to '" << authority << "'");

  stringlist sl(':', authority);

  string host = sl.front_pop();
  if (host.size() <= 0) host = NODE_TCP_HOST_DEFAULT;

  int port = NODE_TCP_PORT_DEFAULT;

  if (sl.size() >= 1)
  {
    sscanf(sl.front_pop().c_str(), "%d", &port);
  }

  scdc_transport_tcp *transport_tcp = static_cast<scdc_transport_tcp *>(transport);

  transport_connection = transport_tcp->connect(host.c_str(), port);

  if (!transport_connection)
  {
    SCDC_FAIL("open: connect failed!");
    return false;
  }

  transport_connection->on_idle_handler = scdc_nodeconn_on_idle_close_handler;
  transport_connection->on_idle_data = this;

  return scdc_nodeconn::open(authority);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movl $0x3a, %esi
movq %rbx, %rdx
movq $-0x1, %rcx
callq 0x1b8f2
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1b92c
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
jne 0x5d24b
leaq 0x10558(%rip), %rcx     # 0x6d791
leaq 0x8(%rsp), %rdi
movl $0x9, %r8d
xorl %esi, %esi
callq 0xb870
movl $0x5cdc, 0x4(%rsp)      # imm = 0x5CDC
cmpq $0x0, 0x38(%rsp)
je 0x5d29c
leaq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1b92c
leaq 0x60(%rsp), %r15
movq -0x10(%r15), %rdi
leaq 0x104ad(%rip), %rsi     # 0x6d727
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0xb4e0
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x5d29c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xb510
movq 0x68(%r14), %rdi
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edx
movq (%rdi), %rax
callq *0x100(%rax)
movq %rax, 0x70(%r14)
testq %rax, %rax
je 0x5d2dc
leaq 0xf0e(%rip), %rcx       # 0x5e1d0
movq %rcx, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5e1b2
movl %eax, %ebx
jmp 0x5d36e
leaq 0x2f28d(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5d36c
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0xce84(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x103a9(%rip), %rsi     # 0x6d6c1
movl $0xe, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0x1046f(%rip), %rsi     # 0x6d79b
movl $0x15, %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 %ebx, %ebx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d389
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x28(%rsp), %rdi
callq 0x1bb7e
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x5d3a8
jmp 0x5d3a8
movq %rax, %rbx
jmp 0x5d3c6
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d3c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x28(%rsp), %rdi
callq 0x1bb7e
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/node_uds.cc
// Function: scdc_nodeport_uds::authority(char const*, scdc_args*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_nodeport_uds::authority(const char *conf, scdc_args *args, std::string &auth)
{
  SCDC_TRACE("authority: conf: '" << conf << "'");

  auth.clear();

  const char *socketname;

  if (!args->get<const char *>(SCDC_ARGS_TYPE_CSTR, &socketname))
  {
    SCDC_FAIL("authority: failed to get socket name parameter!");
    return false;
  }

  auth = socketname;

  SCDC_TRACE("authority: return: '" << auth << "'");

  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq $0x0, 0x8(%rdx)
movq (%rdx), %rax
movb $0x0, (%rax)
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x5d491
movq (%rsi), %rdi
movq %rsp, %rdx
movl $0x4, %esi
callq *%rax
testq %rax, %rax
setne %bl
jmp 0x5d493
xorl %ebx, %ebx
testb %bl, %bl
je 0x5d4bf
movq (%rsp), %r15
movq 0x8(%r14), %r12
movq %r15, %rdi
callq 0xb200
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0xb870
jmp 0x5d54f
leaq 0x2f0aa(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5d54f
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0xcca1(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x102ef(%rip), %rsi     # 0x6d7ea
movl $0xe, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0x102ea(%rip), %rsi     # 0x6d7f9
movl $0x2f, %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 %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/node_uds.cc
// Function: scdc_nodeport_uds::supported(char const*, scdc_args*)
bool scdc_nodeport_uds::supported(const char *uri, scdc_args *args)
{
  SCDC_TRACE("supported: uri: '" << uri << "'");

  bool ret = (string(uri).compare(0, strlen(SCDC_NODE_UDS_SCHEME) + 1, SCDC_NODE_UDS_SCHEME ":") == 0);

  SCDC_TRACE("supported: return: '" << ret << "'");

  return ret;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x1bdd6
leaq 0x102aa(%rip), %rcx     # 0x6d829
movl $0x9, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb700
movl %eax, %ebx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d5ab
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb510
testl %ebx, %ebx
sete %al
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5d5d4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/node_uds.cc
// Function: scdc_nodeport_uds::scdc_nodeport_uds()
scdc_nodeport_uds::scdc_nodeport_uds()
  :scdc_nodeport("uds", SCDC_NODEPORT_START_LOOP_UNTIL_CANCEL|SCDC_NODEPORT_START_ASYNC_UNTIL_CANCEL)
{
  transport = new scdc_transport_uds();

  scdc_compcoup_transport *compcoup_transport = new scdc_compcoup_transport(transport);

  transport->set_compcoup_transport(compcoup_transport);
  compcoup = compcoup_transport;

  socketfile = make_uds_socketfile(NODE_UDS_SOCKETNAME_DEFAULT);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0xe43c(%rip), %rsi      # 0x6ba30
movl $0x5, %edx
callq 0x5e214
leaq 0x2dfab(%rip), %rax     # 0x8b5b0
movq %rax, (%rbx)
leaq 0x98(%rbx), %r14
leaq 0xa8(%rbx), %rbp
movq %rbp, 0x98(%rbx)
movq $0x0, 0xa0(%rbx)
movb $0x0, 0xa8(%rbx)
movl $0x48, %edi
callq 0xb500
movq %rax, %r12
movq %rax, %rdi
callq 0x61f4c
movq %r12, 0x90(%rbx)
movl $0x30, %edi
callq 0xb500
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x62e4c
movq 0x90(%rbx), %rax
movq %r13, 0x8(%rax)
movq %r13, 0x30(%rbx)
leaq 0xfb6b(%rip), %rsi      # 0x6d1e4
leaq 0x8(%rsp), %rdi
callq 0x5d404
leaq 0x8(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb670
movq (%rbx), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5d6ad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5d6df
movq %rax, %r15
movl $0x30, %esi
movq %r13, %rdi
jmp 0x5d6d8
jmp 0x5d6df
movq %rax, %r15
movl $0x48, %esi
movq %r12, %rdi
callq 0xb510
jmp 0x5d6e2
movq %rax, %r15
movq (%r14), %rdi
cmpq %rbp, %rdi
je 0x5d6f6
movq (%rbp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0x5e27a
movq %r15, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/node_uds.cc
// Function: scdc_nodeport_uds::open(char const*, scdc_args*)
bool scdc_nodeport_uds::open(const char *conf, scdc_args *args)
{
  SCDC_TRACE("open: conf: '" << conf << "'");

  bool ret = true;

  if (!scdc_nodeport::open(conf, args))
  {
    SCDC_FAIL("open: opening base");
    ret = false;

  } else
  {
    scdc_transport_uds *transport_uds = static_cast<scdc_transport_uds *>(transport);

    SCDC_TRACE("open: socketfile: '" << socketfile << "'");

    if (!transport_uds->open(socketfile.c_str()))
    {
      SCDC_FAIL("open: opening UDS transport");
      ret = false;
      goto do_close;
    }

do_close:
    if (!ret) scdc_nodeport::close();
  }

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5e84c
testb %al, %al
je 0x5da88
movq 0x90(%rbx), %rdi
movq 0x98(%rbx), %rsi
movq (%rdi), %rax
callq *0xf8(%rax)
movl %eax, %ebp
testb %al, %al
jne 0x5db1a
leaq 0x2eb87(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5da72
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0xc77e(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xfdcc(%rip), %rsi      # 0x6d7ea
movl $0xe, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xfe63(%rip), %rsi      # 0x6d895
movl $0x1b, %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
jne 0x5db1a
movq %rbx, %rdi
callq 0x5ea3e
jmp 0x5db1a
leaq 0x2eae1(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5db18
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0xc6d8(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0xfd26(%rip), %rsi      # 0x6d7ea
movl $0xe, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0xe055(%rip), %rsi      # 0x6bb2d
movl $0x12, %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 %ebp, %ebp
movl %ebp, %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/node/node_uds.cc
// Function: scdc_nodeport_uds::start(long long)
bool scdc_nodeport_uds::start(scdcint_t mode)
{
  if (!scdc_nodeport::start(mode)) return false;

  if (cmd_handler_args.handler)
  {
    scdc_compcoup_transport *compcoup_transport = static_cast<scdc_compcoup_transport *>(compcoup);
    compcoup_transport->set_cmd_handler(cmd_handler_args.handler, cmd_handler_args.data);
  }

  if (mode == SCDC_NODEPORT_START_LOOP_UNTIL_CANCEL && loop_handler_dummy_args.handler)
  {
    transport->set_loop_handler(loop_handler_dummy_args.handler, loop_handler_dummy_args.data);
  }

  if (max_connections >= 0) transport->set_max_connections(max_connections);

  scdc_transport_uds *transport_uds = static_cast<scdc_transport_uds *>(transport);

  return transport_uds->start(mode);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5ea44
testb %al, %al
je 0x5dbbe
movq 0x48(%r14), %rax
testq %rax, %rax
je 0x5db6e
movq 0x30(%r14), %rcx
movq 0x50(%r14), %rdx
movq %rax, 0x20(%rcx)
movq %rdx, 0x28(%rcx)
cmpq $0x1, %rbx
jne 0x5db90
movq 0x58(%r14), %rax
testq %rax, %rax
je 0x5db90
movq 0x60(%r14), %rcx
movq 0x90(%r14), %rdx
movq %rax, 0x10(%rdx)
movq %rcx, 0x18(%rdx)
movq 0x68(%r14), %rax
testq %rax, %rax
js 0x5dba4
movq 0x90(%r14), %rcx
movq %rax, 0x20(%rcx)
movq 0x90(%r14), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/node_uds.cc
// Function: scdc_nodeport_uds::stop()
bool scdc_nodeport_uds::stop()
{
  scdc_transport_uds *transport_uds = static_cast<scdc_transport_uds *>(transport);

  transport_uds->stop();

  if (loop_handler_dummy_args.handler)
  {
    transport->set_loop_handler(0, 0);
  }

  if (cmd_handler_args.handler)
  {
    scdc_compcoup_transport *compcoup_transport = static_cast<scdc_compcoup_transport *>(compcoup);
    compcoup_transport->set_cmd_handler(0, 0);
  }

  return scdc_nodeport::stop();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
cmpq $0x0, 0x58(%rbx)
je 0x5dbee
movq 0x90(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
cmpq $0x0, 0x48(%rbx)
je 0x5dc00
movq 0x30(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x5ea6c
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/node_uds.cc
// Function: scdc_nodeconn_uds::scdc_nodeconn_uds()
scdc_nodeconn_uds::scdc_nodeconn_uds()
  :scdc_nodeconn("uds")
{
  transport = new scdc_transport_uds();

  scdc_compcoup_transport *compcoup_transport = new scdc_compcoup_transport(transport);

  transport->set_compcoup_transport(compcoup_transport);
  compcoup = compcoup_transport;

  transport_connection = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xddec(%rip), %rsi      # 0x6ba30
callq 0x5e0fc
leaq 0x2d9b0(%rip), %rax     # 0x8b600
movq %rax, (%rbx)
movl $0x48, %edi
callq 0xb500
movq %rax, %r14
movq %rax, %rdi
callq 0x61f4c
movq %r14, 0x68(%rbx)
movl $0x30, %edi
callq 0xb500
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
callq 0x62e4c
movq 0x68(%rbx), %rax
movq %r12, 0x8(%rax)
movq %r12, 0x60(%rbx)
movq $0x0, 0x70(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x30, %esi
movq %r12, %rdi
jmp 0x5dcbe
jmp 0x5dcc5
movq %rax, %r15
movl $0x48, %esi
movq %r14, %rdi
callq 0xb510
jmp 0x5dcc8
movq %rax, %r15
movq %rbx, %rdi
callq 0x5e16e
movq %r15, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/nodeport.cc
// Function: scdc_nodeport::scdc_nodeport(char const*, long long)
scdc_nodeport::scdc_nodeport(const char *type_, scdcint_t supported_modes_)
  :type(type_), supported_modes(supported_modes_), compcoup(0), open_args(0), open_args_refcount(0)
{
  cmd_handler_args.handler = 0;
  cmd_handler_args.data = 0;

  loop_handler_dummy_args.handler = 0;
  loop_handler_dummy_args.data = 0;

  max_connections = -1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x2d48b(%rip), %rax     # 0x8b6b0
movq %rax, (%rdi)
addq $0x8, %rdi
leaq 0x7(%rsp), %rdx
callq 0x1bdd6
movq %rbx, 0x28(%r14)
leaq 0x80(%r14), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
xorl %ecx, %ecx
movq %rcx, 0x40(%r14)
movq %rax, 0x70(%r14)
movq %rcx, 0x78(%r14)
movb $0x0, 0x80(%r14)
movups %xmm0, 0x48(%r14)
movups %xmm0, 0x58(%r14)
movq $-0x1, 0x68(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/nodeport.cc
// Function: scdc_nodeport::open(char const*, scdc_args*)
bool scdc_nodeport::open(const char *conf, scdc_args *args)
{
  SCDC_TRACE("open: conf: '" << conf << "'");

  bool ret = true;

  args = open_args_init(args);

  string confs(conf);

  if (conf && !open_config(confs, args))
  {
    SCDC_FAIL("open: processing configuration failed");
    ret = false;
    goto do_quit;
  }

  if (args->get<scdc_nodeport_loop_handler_args_t>(SCDC_ARGS_TYPE_NODEPORT_LOOP_HANDLER_DUMMY, &loop_handler_dummy_args, true) == SCDC_ARG_REF_NULL)
  {
    SCDC_ERROR("open: getting loop handler dummy");
    ret = false;
    goto do_quit;

  } else
  {
    SCDC_TRACE("open_config_conf: loop_handler_dummy: " << reinterpret_cast<void *>(loop_handler_dummy_args.handler) << " / " << static_cast<void *>(loop_handler_dummy_args.data));
  }

  open_args_clear();

do_quit:
  if (!ret) open_args_release();

  return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x34bae
movq %rax, %r14
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x1bdd6
testq %r15, %r15
je 0x5e892
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5e49c
testb %al, %al
je 0x5e8c4
leaq 0x58(%rbx), %rdx
movl $0x15, %esi
movq %r14, %rdi
movl $0x1, %ecx
callq 0x5eafa
testq %rax, %rax
je 0x5e951
movq 0x38(%rbx), %rax
movq $0x0, (%rax)
movb $0x1, %bpl
jmp 0x5e9e3
leaq 0x2dca5(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x5e9e1
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x8(%rax), %r14
leaq 0xb898(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xf00d(%rip), %rsi      # 0x6d911
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xd361(%rip), %rsi      # 0x6bc79
movl $0x25, %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
jmp 0x5e9d5
leaq 0x2dc18(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x5e9e1
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0xbb0f(%rip), %rsi      # 0x6a488
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xef84(%rip), %rsi      # 0x6d911
movl $0xa, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xefe5(%rip), %rsi      # 0x6d986
movl $0x20, %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
xorl %ebp, %ebp
testb %bpl, %bpl
jne 0x5e9f0
movq %rbx, %rdi
callq 0x34c88
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ea0b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5ea36
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/node/nodeport.cc
// Function: scdc_nodeport::start(long long)
bool scdc_nodeport::start(scdcint_t mode)
{
  if (!(supported_modes & mode))
  {
    SCDC_TRACE("start: mode '" << mode << "' not supported");
    return false;
  }

  if (compcoup) compcoup->set_compression(cfg_compression.c_str());

  SCDC_TRACE("cfg_compression: '" << cfg_compression << "'");

  return true;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
andq 0x28(%rdi), %rbx
je 0x5ea64
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x5ea64
movq 0x70(%rdi), %rsi
movq (%rax), %rcx
movq %rax, %rdi
callq *0x48(%rcx)
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::open_conf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, scdc_args*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_posix_fs_handler::open_conf(std::string &conf, scdc_args *args, scdc_result &result)
{
  SCDC_TRACE_F("conf: '" << conf << "'");

  bool ret = false;

  const char *r;
  if (!args->get<const char *>(SCDC_ARGS_TYPE_CSTR, &r))
  {
    result = "getting root directory failed";
    SCDC_ERROR_F(result);
    goto do_return;
  }

  root_dir = r;
  if (*root_dir.rbegin() != '/') root_dir += '/';

  ret = true;

do_return:
  SCDC_TRACE_F("return: " << ret << ", result: '" << result << "'");

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %r15
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x5ebb2
movq (%rdx), %rdi
movq %rsp, %rdx
movl $0x4, %esi
callq *%rax
testq %rax, %rax
setne %bl
jmp 0x5ebb4
xorl %ebx, %ebx
testb %bl, %bl
je 0x5ebff
movq (%rsp), %r14
movq 0x8(%r15), %r12
movq %r14, %rdi
callq 0xb200
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0xb870
movq (%r15), %rax
movq 0x8(%r15), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x5ecd7
movq %r15, %rdi
movl $0x2f, %esi
callq 0xb420
jmp 0x5ecd7
movq 0x8(%r14), %rdx
leaq 0xedad(%rip), %rcx      # 0x6d9b7
movl $0x1d, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0xb870
leaq 0x2d94f(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x5ecd7
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x18(%rax), %r15
leaq 0xb840(%rip), %rsi      # 0x6a488
movl $0xc, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0xed79(%rip), %rsi      # 0x6d9d5
movl $0x12, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0xed78(%rip), %rsi      # 0x6d9e8
movl $0x9, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0xee1f(%rip), %rsi      # 0x6daa3
movl $0x2, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r14
movq (%rax), %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 (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_posix_fs_handler::open(scdc_result &result)
{
  SCDC_TRACE_F("");

  bool ret = false;

  if (!dir_exists(""))
  {
    result = "root directory '" + root_dir + "' does not exist or is not a directory";
    SCDC_ERROR_F(result);
    goto do_return;
  }

  ret = true;

do_return:
  SCDC_TRACE_F("return: " << ret << ", result: '" << result << "'");

  return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc80f(%rip), %rsi      # 0x6b50d
callq 0x5eeac
movl %eax, %ebx
testb %al, %al
jne 0x5ee77
leaq 0xd57b(%rip), %rsi      # 0x6c28f
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x1b85e
leaq 0xecc7(%rip), %rsi      # 0x6d9f2
movq %r12, %rdi
callq 0xba60
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5ed5b
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5ed63
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0xb670
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x5ed9f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5edba
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
leaq 0x2d7af(%rip), %r12     # 0x8c570
movq (%r12), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x5ee77
addq $0x20, %rdi
callq 0xb7d0
movq (%r12), %rax
movq 0x18(%rax), %r15
leaq 0xb6a0(%rip), %rsi      # 0x6a488
movl $0xc, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0xebd9(%rip), %rsi      # 0x6d9d5
movl $0x12, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0xa579(%rip), %rsi      # 0x69389
movl $0x4, %edx
movq %r15, %rdi
callq 0xb5f0
leaq 0xec7f(%rip), %rsi      # 0x6daa3
movl $0x2, %edx
movq %r15, %rdi
callq 0xb5f0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0xb5f0
movq %rax, %r14
movq (%rax), %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 (%r12), %rdi
addq $0x20, %rdi
callq 0xb3b0
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5eea3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::dir_rewind(__dirstream*, char const*)
scdc_posix_fs_handler::dir_t scdc_posix_fs_handler::dir_rewind(dir_t dir, const char *path)
{
  std::string p = root_dir + path;
  SCDC_TRACE_F("dir: " << dir << ", path: '" << path << "' -> '" << p << "'");

  ::rewinddir(dir);
  return dir;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1d19a
movq %r15, %rdi
movq %r14, %rsi
callq 0xba60
movq %rbx, %rdi
callq 0xb290
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f140
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f169
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::dir_count_entries(__dirstream*)
scdcint_t scdc_posix_fs_handler::dir_count_entries(dir_t dir)
{
  SCDC_TRACE_F("dir: " << dir);

  scdcint_t n = 0;
  struct dirent *ent;
  while ((ent = ::readdir(dir)) != NULL)
  {
    if (dirent_is_dir(ent) || dirent_is_file(ent)) ++n;
  }

  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb850
testq %rax, %rax
je 0x5f1b5
movq %rax, %r15
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x5f1c1
testb %al, %al
jne 0x5f1a0
cmpb $0x8, 0x12(%r15)
jne 0x5f1a3
incq %r14
movq %rbx, %rdi
callq 0xb850
movq %rax, %r15
testq %rax, %rax
jne 0x5f18d
jmp 0x5f1b8
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::dir_count_dirs(__dirstream*)
scdcint_t scdc_posix_fs_handler::dir_count_dirs(dir_t dir)
{
  SCDC_TRACE_F("dir: " << dir);

  scdcint_t n = 0;
  struct dirent *ent;
  while ((ent = ::readdir(dir)) != NULL)
  {
    if (dirent_is_dir(ent)) ++n;
  }

  return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb850
xorl %r14d, %r14d
testq %rax, %rax
je 0x5f22f
movq %rax, %rdi
callq 0x5f1c1
movzbl %al, %eax
addq %rax, %r14
movq %rbx, %rdi
callq 0xb850
jmp 0x5f212
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::dir_list_dirs(__dirstream*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
bool scdc_posix_fs_handler::dir_list_dirs(dir_t dir, std::vector<std::string> &dirs)
{
  SCDC_TRACE_F("dir: " << dir);

  struct dirent *ent;
  while ((ent = ::readdir(dir)) != NULL)
  {
    if (dirent_is_dir(ent)) dirs.push_back(ent->d_name);
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0xb850
testq %rax, %rax
je 0x5f2cb
movq %rax, %r12
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r15
movq %r12, %rdi
callq 0x5f1c1
testb %al, %al
je 0x5f2bb
leaq 0x13(%r12), %r13
movq %rbp, 0x8(%rsp)
movq %r13, %rdi
callq 0xb200
leaq (%r12,%rax), %rdx
addq $0x13, %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1bee6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5f67e
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5f2bb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %r14, %rdi
callq 0xb850
movq %rax, %r12
testq %rax, %rax
jne 0x5f268
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5f2f6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::dir_count_files(__dirstream*)
scdcint_t scdc_posix_fs_handler::dir_count_files(dir_t dir)
{
  SCDC_TRACE_F("dir: " << dir);

  scdcint_t n = 0;
  struct dirent *ent;
  while ((ent = ::readdir(dir)) != NULL)
  {
    if (dirent_is_file(ent)) ++n;
  }

  return n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rsi, %rdi
callq 0xb850
xorl %r14d, %r14d
testq %rax, %rax
je 0x5f32b
xorl %ecx, %ecx
cmpb $0x8, 0x12(%rax)
sete %cl
addq %rcx, %r14
movq %rbx, %rdi
callq 0xb850
jmp 0x5f310
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::dir_list_files(__dirstream*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
bool scdc_posix_fs_handler::dir_list_files(dir_t dir, std::vector<std::string> &files)
{
  SCDC_TRACE_F("dir: " << dir);

  struct dirent *ent;
  while ((ent = ::readdir(dir)) != NULL)
  {
    if (dirent_is_file(ent)) files.push_back(ent->d_name);
  }

  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0xb850
testq %rax, %rax
je 0x5f3c3
movq %rax, %r12
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r15
cmpb $0x8, 0x12(%r12)
jne 0x5f3b3
leaq 0x13(%r12), %r13
movq %rbp, 0x8(%rsp)
movq %r13, %rdi
callq 0xb200
leaq (%r12,%rax), %rdx
addq $0x13, %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x1bee6
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5f67e
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5f3b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %r14, %rdi
callq 0xb850
movq %rax, %r12
testq %rax, %rax
jne 0x5f364
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5f3ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::file_open(char const*, int)
scdc_posix_fs_handler::file_t scdc_posix_fs_handler::file_open(const char *path, int flags)
{
  std::string p = root_dir + path;
  SCDC_TRACE_F("path: '" << path << "' -> '" << p << "', flags: " << flags);

  /* file mode: user/group/others can read/write */
  const mode_t mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH;

  return ::open(p.c_str(), flags, mode);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1d19a
movq %r15, %rdi
movq %r14, %rsi
callq 0xba60
movq 0x8(%rsp), %rdi
movl %ebx, %esi
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0xb380
movl %eax, %ebx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f570
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x5f580
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5f59a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/dataprov/posix_fs_handler.cc
// Function: scdc_posix_fs_handler::file_reopen(char const*, int, int, char const*)
scdc_posix_fs_handler::file_t scdc_posix_fs_handler::file_reopen(const char *path, int flags, file_t file, const char *old_path)
{
  std::string p = root_dir + path;
  SCDC_TRACE_F("path: '" << path << "' -> '" << p << "', flags: " << flags << ", old_path: '" << old_path << "'");

  /* FIXME: check whether path == old_path and flags == old_flags (determine with fnctl and F_GETFL) to prevent unnecessary close and open */
  if (::close(file) != 0) return file_null;

  return ::open(p.c_str(), flags);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x1d19a
movq %r15, %rdi
movq %r14, %rsi
callq 0xba60
movl %ebp, %edi
callq 0xbaa0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x5f5fe
movq (%rsp), %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0xb380
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5f614
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb510
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5f625
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5f63e
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/transport/transport.cc
// Function: scdc_transport_connection_t::release()
void scdc_transport_connection_t::release()
{
  SCDC_TRACE("release: idle: '" << idle << "'");

  SCDC_ASSERT(!idle);

  idle = true;
  
  if (on_idle_handler) on_idle_handler(on_idle_data);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x9(%rdi)
jne 0x5f972
leaq 0x2ccc3(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x5f972
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0xac77(%rip), %rsi      # 0x6a549
movl $0xd, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xe146(%rip), %rsi      # 0x6da2c
movl $0x16, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xaa4a(%rip), %rsi      # 0x6a344
movl $0x1, %edx
movq %r14, %rdi
callq 0xb5f0
movq %r14, %rdi
movl $0x3d, %esi
callq 0xb9a0
movq %rax, %r14
leaq 0xe125(%rip), %rsi      # 0x6da43
movl $0x8, %edx
movq %rax, %rdi
callq 0xb5f0
leaq 0xc556(%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
movb $0x1, 0x9(%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x5f98a
movq 0x18(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::scdc_transport_connection_pool(long long, scdc_transport*)
scdc_transport_connection_pool::scdc_transport_connection_pool(scdcint_t max_connections_, scdc_transport *transport_)
  :max_connections(max_connections_), transport(transport_)
{
#if THREAD_POOLING
  SCDC_TRACE("scdc_transport_connection_pool: max. " << max_connections << " connections, with thread pooling");
#else
  SCDC_TRACE("scdc_transport_connection_pool: max. " << max_connections << " connections, without thread pooling");
#endif

  pool = new scdc_transport_connection_pool_t();

  pool->run = true;
  pool->naquired_entries = 0;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movl $0xb0, %edi
callq 0xb500
movq %rax, %r14
xorl %r15d, %r15d
movl $0xb0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0xb2d0
leaq 0x60(%r14), %rax
movq %rax, 0x68(%r14)
movq %rax, 0x60(%r14)
movq %r15, 0x70(%r14)
leaq 0x80(%r14), %rax
movq %rax, 0x88(%r14)
movq %rax, 0x80(%r14)
movq %r15, 0x90(%r14)
leaq 0x98(%r14), %rax
movq %rax, 0xa0(%r14)
movq %rax, 0x98(%r14)
movq %r15, 0xa8(%r14)
movq %r14, 0x10(%rbx)
movb $0x1, 0x58(%r14)
movq %r15, 0x78(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0xb7e0
movq 0x10(%rbx), %rdi
addq $0x28, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0xb660
nop
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::~scdc_transport_connection_pool()
scdc_transport_connection_pool::~scdc_transport_connection_pool()
{
  pthread_cond_destroy(&pool->cond);
  pthread_mutex_destroy(&pool->lock);

  delete pool; pool = 0;

  transport = 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
addq $0x28, %rdi
callq 0xba70
movq 0x10(%rbx), %rdi
callq 0xb620
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x5fadf
leaq 0x98(%r14), %r15
movq 0x98(%r14), %rdi
cmpq %r15, %rdi
je 0x5fa88
movq (%rdi), %r12
movl $0x18, %esi
callq 0xb510
movq %r12, %rdi
cmpq %r15, %r12
jne 0x5fa73
leaq 0x80(%r14), %r15
movq 0x80(%r14), %rdi
cmpq %r15, %rdi
je 0x5fab0
movq (%rdi), %r12
movl $0x18, %esi
callq 0xb510
movq %r12, %rdi
cmpq %r15, %r12
jne 0x5fa9b
leaq 0x60(%r14), %r15
movq 0x60(%r14), %rdi
cmpq %r15, %rdi
je 0x5fad2
movq (%rdi), %r12
movl $0x18, %esi
callq 0xb510
movq %r12, %rdi
cmpq %r15, %r12
jne 0x5fabd
movl $0xb0, %esi
movq %r14, %rdi
callq 0xb510
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::insert(scdc_transport_connection_t*)
void scdc_transport_connection_pool::insert(scdc_transport_connection_t *conn)
{
  SCDC_TRACE("insert: conn: '" << conn << "'");

  bool async = (max_connections > 1);

  scdc_transport_connection_pool_entry_t *entry = acquire_entry(async);

  if (!entry)
  {
    SCDC_TRACE("insert: aquire entry failed: closing connection '" << conn << "'");
    transport->close(conn);
    return;
  }

  if (async)
  {
    SCDC_TRACE("insert: run async in thread");

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

    pthread_cond_signal(&entry->cond);

  } else
  {
    SCDC_TRACE("insert: run direct in function");

    entry->conn = conn;

    run_entry(entry);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r12
xorl %esi, %esi
cmpq $0x2, %r12
setge %sil
callq 0x5fb84
testq %rax, %rax
je 0x5fb4f
movq %rax, %r14
cmpq $0x2, %r12
jl 0x5fb6a
leaq 0x8(%r14), %r15
movq %r15, %rdi
callq 0xb7d0
movq %rbx, 0x70(%r14)
movq %r15, %rdi
callq 0xb3b0
addq $0x30, %r14
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xb030
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movq 0x60(%rax), %rax
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
movq %rbx, 0x70(%r14)
movq %r15, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5fc7a
// File: /workspace/github_cpp_makefile_star2_O1/mh0fm4[P]SCDC/src/components/transport/transport.cc
// Function: scdc_transport_connection_pool::acquire_entry(bool)
scdc_transport_connection_pool_entry_t *scdc_transport_connection_pool::acquire_entry(bool async)
{
  SCDC_TRACE("acquire_entry:");

  pthread_mutex_lock(&pool->lock);

  while (pool->run && pool->total_entries.size() >= static_cast<unsigned>(max_connections)
#if THREAD_POOLING
    && pool->free_entries.size() <= 0
#endif
    ) pthread_cond_wait(&pool->cond, &pool->lock);

  if (!pool->run)
  {
    SCDC_TRACE("acquire_entry: stopped running");
    pthread_mutex_unlock(&pool->lock);
    return 0;
  }

#if !THREAD_POOLING
  /* cleanup dead entries */
  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

  scdc_transport_connection_pool_entry_t *entry;

#if THREAD_POOLING
  if (pool->free_entries.size() > 0)
  {
    entry = pool->free_entries.front();
    pool->free_entries.pop_front();

  } else
#endif
  {
    entry = create_entry(async);
    pool->total_entries.push_back(entry);
  }

  ++pool->naquired_entries;

  pthread_mutex_unlock(&pool->lock);

  SCDC_TRACE("acquire_entry: return: '" << entry << "'");

  return entry;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xb7d0
movq 0x10(%rbx), %rsi
movb 0x58(%rsi), %al
cmpb $0x1, %al
jne 0x5fc1c
movl (%rbx), %ecx
cmpq %rcx, 0x90(%rsi)
jb 0x5fbe0
xorl %r14d, %r14d
cmpq $0x0, 0xa8(%rsi)
jne 0x5fbe0
leaq 0x28(%rsi), %rdi
callq 0xb840
movq 0x10(%rbx), %rsi
movb 0x58(%rsi), %al
testb %al, %al
je 0x5fc65
movl (%rbx), %ecx
cmpq %rcx, 0x90(%rsi)
jae 0x5fbb3
testb $0x1, %al
je 0x5fc1c
movq 0xa8(%rsi), %rax
testq %rax, %rax
je 0x5fc21
movq 0x98(%rsi), %r15
movq 0x10(%r15), %r14
decq %rax
movq %rax, 0xa8(%rsi)
movq %r15, %rdi
callq 0xb940
movl $0x18, %esi
movq %r15, %rdi
callq 0xb510
jmp 0x5fc5d
xorl %r14d, %r14d
jmp 0x5fc65
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x5fe12
movq %rax, %r14
movq 0x10(%rbx), %r12
leaq 0x80(%r12), %r15
movl $0x18, %edi
callq 0xb500
movq %r14, 0x10(%rax)
movq %rax, %rdi
movq %r15, %rsi
callq 0xb090
incq 0x90(%r12)
movq 0x10(%rbx), %rsi
incq 0x78(%rsi)
movq %rsi, %rdi
callq 0xb3b0
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsi), %r14
movq %r14, %rdi
callq 0xb7d0
leaq 0x30(%rbx), %r12
cmpq $0x0, 0x70(%rbx)
je 0x5fce3
movq %r14, %rdi
callq 0xb3b0
movq 0x70(%rbx), %r13
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *0x58(%rax)
movq 0x8(%r15), %rdi
movq (%rdi), %rax
movq %r13, %rsi
callq *0x60(%rax)
movq $0x0, 0x70(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5feb6
movq %r14, %rdi
callq 0xb7d0
jmp 0x5fcf6
movb $0x1, 0x6a(%rbx)
movq %r12, %rdi
movq %r14, %rsi
callq 0xb840
movb $0x0, 0x6a(%rbx)
cmpb $0x0, 0x69(%rbx)
jne 0x5fc99
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xb3b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0xb7d0
movq 0x10(%rbx), %rsi
cmpq $0x0, 0x78(%rsi)
jle 0x5fd89
leaq 0x28(%rsi), %rdi
callq 0xb840
jmp 0x5fd1f
movq 0x98(%rdi), %r14
movq 0x10(%r14), %r15
decq %rax
movq %rax, 0xa8(%rdi)
movq %r14, %rdi
callq 0xb940
movl $0x18, %esi
movq %r14, %rdi
callq 0xb510
leaq 0x8(%r15), %r14
movq %r14, %rdi
callq 0xb7d0
movb $0x0, 0x69(%r15)
movq %r14, %rdi
callq 0xb3b0
leaq 0x30(%r15), %rdi
callq 0xb030
movq %r15, %rsi
callq 0x5fdd6
movq 0x10(%rbx), %rdi
movq 0xa8(%rdi), %rax
testq %rax, %rax
jne 0x5fd35
popq %rbx
popq %r14
popq %r15
jmp 0xb3b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0xb7d0
movb $0x0, 0x69(%rbx)
movq %r14, %rdi
callq 0xb3b0
addq $0x30, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb030
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5fdeb
movq 0x60(%rbx), %rdi
xorl %esi, %esi
callq 0xb460
leaq 0x30(%rbx), %rdi
callq 0xba70
leaq 0x8(%rbx), %rdi
callq 0xb620
testq %rbx, %rbx
je 0x5fe10
movl $0x78, %esi
movq %rbx, %rdi
popq %rbx
jmp 0xb510
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x78, %edi
callq 0xb500
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)
movaps %xmm0, 0x60(%rax)
xorl %r12d, %r12d
movq %r12, 0x70(%rax)
leaq 0x30(%rax), %r15
movq %r14, (%rax)
leaq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xb7e0
movq %r15, %rdi
xorl %esi, %esi
callq 0xb660
movb %bpl, 0x68(%rbx)
movb %bpl, 0x69(%rbx)
movb $0x0, 0x6a(%rbx)
movq %r12, 0x70(%rbx)
testl %ebp, %ebp
je 0x5fe99
movq %rbx, %rdi
addq $0x60, %rdi
leaq 0x16(%rip), %rdx        # 0x5fea5
xorl %esi, %esi
movq %rbx, %rcx
callq 0xba00
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq