static int SocketAddress_to_str(char *dest, int max_len,

                                const char *prefix, SocketAddress *addr,

                                bool is_listen, bool is_telnet)

{

    switch (addr->type) {

    case SOCKET_ADDRESS_KIND_INET:

        return snprintf(dest, max_len, "%s%s:%s:%s%s", prefix,

                        is_telnet ? "telnet" : "tcp", addr->u.inet->host,

                        addr->u.inet->port, is_listen ? ",server" : "");

        break;

    case SOCKET_ADDRESS_KIND_UNIX:

        return snprintf(dest, max_len, "%sunix:%s%s", prefix,

                        addr->u.q_unix->path, is_listen ? ",server" : "");

        break;

    case SOCKET_ADDRESS_KIND_FD:

        return snprintf(dest, max_len, "%sfd:%s%s", prefix, addr->u.fd->str,

                        is_listen ? ",server" : "");

        break;

    default:

        abort();

    }

}

static int SocketAddress_to_str(char *dest, int max_len,

                                const char *prefix, SocketAddress *addr,

                                bool is_listen, bool is_telnet)

{

    switch (addr->type) {

    case SOCKET_ADDRESS_KIND_INET:

        return snprintf(dest, max_len, "%s%s:%s:%s%s", prefix,

                        is_telnet ? "telnet" : "tcp", addr->u.inet->host,

                        addr->u.inet->port, is_listen ? ",server" : "");

        break;

    case SOCKET_ADDRESS_KIND_UNIX:

        return snprintf(dest, max_len, "%sunix:%s%s", prefix,

                        addr->u.q_unix->path, is_listen ? ",server" : "");

        break;

    case SOCKET_ADDRESS_KIND_FD:

        return snprintf(dest, max_len, "%sfd:%s%s", prefix, addr->u.fd->str,

                        is_listen ? ",server" : "");

        break;

    default:

        abort();

    }

}

static int FUNC_0(char *VAR_0, int VAR_1,

                                const char *VAR_2, SocketAddress *VAR_3,

                                bool VAR_4, bool VAR_5)

{

    switch (VAR_3->type) {

    case SOCKET_ADDRESS_KIND_INET:

        return snprintf(VAR_0, VAR_1, "%s%s:%s:%s%s", VAR_2,

                        VAR_5 ? "telnet" : "tcp", VAR_3->u.inet->host,

                        VAR_3->u.inet->port, VAR_4 ? ",server" : "");

        break;

    case SOCKET_ADDRESS_KIND_UNIX:

        return snprintf(VAR_0, VAR_1, "%sunix:%s%s", VAR_2,

                        VAR_3->u.q_unix->path, VAR_4 ? ",server" : "");

        break;

    case SOCKET_ADDRESS_KIND_FD:

        return snprintf(VAR_0, VAR_1, "%sfd:%s%s", VAR_2, VAR_3->u.fd->str,

                        VAR_4 ? ",server" : "");

        break;

    default:

        abort();

    }

}

static int FUNC_0(char *VAR_0, int VAR_1,
const char *VAR_2, SocketAddress *VAR_3,
bool VAR_4, bool VAR_5)
{ switch (VAR_3->type) { case SOCKET_ADDRESS_KIND_INET:
return snprintf(VAR_0, VAR_1, "%s%s:%s:%s%s", VAR_2,
VAR_5 ? "telnet" : "tcp", VAR_3->u.inet->host,
VAR_3->u.inet->port, VAR_4 ? ",server" : ""); break; case SOCKET_ADDRESS_KIND_UNIX:
return snprintf(VAR_0, VAR_1, "%sunix:%s%s", VAR_2,
VAR_3->u.q_unix->path, VAR_4 ? ",server" : ""); break; case SOCKET_ADDRESS_KIND_FD:
return snprintf(VAR_0, VAR_1, "%sfd:%s%s", VAR_2, VAR_3->u.fd->str,
VAR_4 ? ",server" : ""); break; default:
abort(); } }