// File: mh0fm4[P]SCDC/src/components/node/node_tcp.cc
// Function: scdc_nodeport_tcp::authority(char const*, scdc_args*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool scdc_nodeport_tcp::authority(const char *conf, scdc_args *args, std::string &auth)
{
  SCDC_TRACE("authority: conf: '" << conf << "'");

  auth.clear();

  const char *hostname;

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

  auth = hostname;

  string c(conf);

  if (c == "port")
  {
    int port;

    if (!args->get<int>(SCDC_ARGS_TYPE_INT, &port))
    {
      SCDC_FAIL("authority: failed to get port parameter!");
      return false;
    }

    char port_str[16];

    sprintf(port_str, ":%d", port);
    auth += port_str;
  }

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

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x93ac9
movq -0x20(%rbp), %rdi
callq 0xc8f0
movq -0x18(%rbp), %rdi
movl $0x4, %esi
leaq -0x28(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4d6c0
cmpq $0x0, %rax
jne 0x93b7b
jmp 0x93af2
leaq 0x40baf(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
cmpq $0x0, %rax
je 0x93b70
leaq 0x40b9a(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
leaq 0x40b8b(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, %rdi
leaq 0x12681(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, %rdi
leaq 0x15bcf(%rip), %rsi     # 0xa970d
callq 0xc670
movq %rax, %rdi
leaq 0x15bcf(%rip), %rsi     # 0xa971c
callq 0xc670
movq %rax, %rdi
movq 0x40464(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
leaq 0x40b40(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x93b72
movb $0x0, -0x1(%rbp)
jmp 0x93d76
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdi
callq 0xc920
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0xcbc0
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x27820
jmp 0x93bbc
leaq -0x49(%rbp), %rdi
callq 0xc730
leaq 0x15bf0(%rip), %rsi     # 0xa97bc
leaq -0x48(%rbp), %rdi
callq 0x25b80
movb %al, -0x91(%rbp)
jmp 0x93bdd
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x93bec
jmp 0x93d5c
movq -0x18(%rbp), %rdi
movl $0x1, %esi
leaq -0x60(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4d490
movq %rax, -0xa0(%rbp)
jmp 0x93c09
movq -0xa0(%rbp), %rax
cmpq $0x0, %rax
jne 0x93d2c
jmp 0x93c1c
leaq 0x40a85(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0xa8(%rbp)
jmp 0x93c34
movq -0xa8(%rbp), %rax
cmpq $0x0, %rax
je 0x93d1b
leaq 0x40a5c(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25800
jmp 0x93c56
leaq 0x40a4b(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x257e0
movq %rax, -0xb0(%rbp)
jmp 0x93c6e
movq -0xb0(%rbp), %rdi
leaq 0x12534(%rip), %rsi     # 0xa61b0
callq 0xc670
movq %rax, -0xb8(%rbp)
jmp 0x93c8a
movq -0xb8(%rbp), %rdi
leaq 0x15a75(%rip), %rsi     # 0xa970d
callq 0xc670
movq %rax, -0xc0(%rbp)
jmp 0x93ca6
movq -0xc0(%rbp), %rdi
leaq 0x15a95(%rip), %rsi     # 0xa9749
callq 0xc670
movq %rax, -0xc8(%rbp)
jmp 0x93cc2
movq -0xc8(%rbp), %rdi
movq 0x402f0(%rip), %rsi     # 0xd3fc0
callq 0xc6d0
jmp 0x93cd7
leaq 0x409ca(%rip), %rax     # 0xd46a8
movq (%rax), %rdi
callq 0x25820
jmp 0x93ce8
jmp 0x93d1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0xc730
jmp 0x93d84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xc3e0
jmp 0x93d84
jmp 0x93d1d
jmp 0x93d1f
movb $0x0, -0x1(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0x93d6d
movl -0x60(%rbp), %edx
leaq 0x15a3c(%rip), %rsi     # 0xa9772
xorl %eax, %eax
leaq -0x80(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0xc0f0
movq -0xd0(%rbp), %rsi
movq -0x20(%rbp), %rdi
callq 0xc630
jmp 0x93d5a
jmp 0x93d5c
jmp 0x93d5e
jmp 0x93d60
jmp 0x93d62
movb $0x1, -0x1(%rbp)
movl $0x1, -0x64(%rbp)
leaq -0x48(%rbp), %rdi
callq 0xc3e0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0xcba0
nopl (%rax)