// File: /workspace/github_cpp_makefile_star2_O1/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 0x600ca
leaq 0x2c52f(%rip), %r14     # 0x8c570
movq (%r14), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x60213
addq $0x20, %rdi
callq 0xb7d0
movq (%r14), %rax
movq 0x8(%rax), %rbx
leaq 0xa122(%rip), %rsi      # 0x6a188
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0xdd8e(%rip), %rsi      # 0x6de08
movl $0xb, %edx
movq %rbx, %rdi
callq 0xb5f0
leaq 0xd9be(%rip), %rsi      # 0x6da4c
movl $0x16, %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
jmp 0x6020a
movq %rsi, %rbx
movq %rdi, %r14
movl $0x8, %edi
callq 0xb500
movq $0x0, (%rax)
movq %rax, 0x30(%r14)
movq 0x20(%r14), %r12
testq %r12, %r12
jle 0x6010d
movl $0x18, %edi
callq 0xb500
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x5f994
movq %r15, 0x38(%r14)
movq 0x8(%r14), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x28(%rax)
cmpq $0x4, %rbx
je 0x60139
cmpq $0x1, %rbx
jne 0x6015d
movl $0x100, 0x28(%r14)      # imm = 0x100
movq (%r14), %rax
movq %r14, %rdi
callq *0x38(%rax)
jmp 0x60156
movl $0x101, 0x28(%r14)      # imm = 0x101
movq 0x30(%r14), %rdi
leaq 0xed(%rip), %rdx        # 0x60239
xorl %esi, %esi
movq %r14, %rcx
callq 0xba00
movb $0x1, %al
jmp 0x60215
leaq 0x2c40c(%rip), %r15     # 0x8c570
movq (%r15), %rdi
cmpq $0x0, 0x18(%rdi)
je 0x60213
addq $0x20, %rdi
callq 0xb7d0
movq (%r15), %rax
movq 0x18(%rax), %r14
leaq 0xa2ff(%rip), %rsi      # 0x6a488
movl $0xc, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xdc6b(%rip), %rsi      # 0x6de08
movl $0xb, %edx
movq %r14, %rdi
callq 0xb5f0
leaq 0xdc14(%rip), %rsi      # 0x6ddc5
movl $0x6, %edx
movq %r14, %rdi
callq 0xb5f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb1d0
movq %rax, %rbx
leaq 0xd890(%rip), %rsi      # 0x6da63
movl $0xf, %edx
movq %rax, %rdi
callq 0xb5f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xb4d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xb050
movq %rax, %rdi
callq 0xb340
movq (%r15), %rdi
addq $0x20, %rdi
callq 0xb3b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0xb510
movq %rbx, %rdi
callq 0xb9c0