// File: theuni[P]libbtcnet/tests/multinet.cpp
// Function: CConnman::OnStartup()
void OnStartup()
    {
        /* Establish the network options. Notice that these are per-connection,
           though they're inherited as necessary. So a DNS Query on a main-net seed
           will return connections with main-net options. A connection manager will
           happily connect to multiple different networks simultaneously. The only
           requirement is that the header structure is similar enough to Bitcoin's
           that it can be expressed in the parameters below.
         */
        CNetworkConfig mainnet_config;
        mainnet_config.header_msg_size_offset = 16;
        mainnet_config.header_msg_size_size = 4;
        mainnet_config.header_size = 24;
        mainnet_config.chunk_size = 0;
        mainnet_config.message_max_size = 1000000 + mainnet_config.header_size;
        mainnet_config.message_start = mainnet_message_start;
        mainnet_config.protocol_version = 70011;
        mainnet_config.protocol_handshake_version = 209;
        mainnet_config.service_flags = 0;

        CNetworkConfig testnet_config = mainnet_config;
        testnet_config.message_start = testnet_message_start;


        /* Establish the connection options. See libbtcnet/connection.h for more. */
        CConnectionOptions myopts;
        myopts.nRetries = 0;
        myopts.doResolve = CConnectionOptions::RESOLVE_CONNECT;
        myopts.nConnTimeout = 1;
        myopts.nFamily = CConnectionOptions::ANY;

        m_connections.emplace_back(myopts, mainnet_config, "seed.bitcoin.sipa.be", 8333);
        m_connections.emplace_back(myopts, testnet_config, "testnet-seed.bitcoin.petertodd.org", 8333);

        m_connections.emplace_back(myopts, mainnet_config, "dnsseed.bluematt.me", 8333);
        m_connections.emplace_back(myopts, testnet_config, "testnet-seed.bluematt.me", 8333);

        m_connections.emplace_back(myopts, mainnet_config, "dnsseed.bitcoin.dashjr.org", 8333);
        m_connections.emplace_back(myopts, testnet_config, "testnet-seed.bitcoin.schildbach.de", 8333);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x6d60
movl $0x10, -0x40(%rbp)
movl $0x4, -0x3c(%rbp)
movl $0x18, -0x38(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x38(%rbp), %eax
addl $0xf4240, %eax          # imm = 0xF4240
movl %eax, -0x34(%rbp)
leaq -0x30(%rbp), %rdi
leaq 0x3232b(%rip), %rsi     # 0x38440
callq 0x6d80
jmp 0x611c
movl $0x1117b, -0x14(%rbp)   # imm = 0x1117B
movl $0xd1, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6fb0
jmp 0x6143
leaq -0x78(%rbp), %rdi
leaq 0x3230a(%rip), %rsi     # 0x38458
callq 0x6d80
jmp 0x6155
leaq -0xb4(%rbp), %rdi
callq 0xa570
jmp 0x6163
movq -0xd8(%rbp), %rdi
movl $0x0, -0xac(%rbp)
movl $0x4, -0xb0(%rbp)
movl $0x1, -0xa8(%rbp)
movl $0x1e, -0x8c(%rbp)
addq $0x10, %rdi
movl $0x208d, -0xb8(%rbp)    # imm = 0x208D
leaq 0x1eea3(%rip), %rcx     # 0x2504a
leaq -0xb4(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0xb8(%rbp), %r8
callq 0x7010
jmp 0x61c0
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
movl $0x208d, -0xbc(%rbp)    # imm = 0x208D
leaq 0x1ee83(%rip), %rcx     # 0x2505f
leaq -0xb4(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0xbc(%rbp), %r8
callq 0x7060
jmp 0x61f8
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
movl $0x208d, -0xc0(%rbp)    # imm = 0x208D
leaq 0x1ee6e(%rip), %rcx     # 0x25082
leaq -0xb4(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0xc0(%rbp), %r8
callq 0x70b0
jmp 0x622d
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
movl $0x208d, -0xc4(%rbp)    # imm = 0x208D
leaq 0x1ee4d(%rip), %rcx     # 0x25096
leaq -0xb4(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0xc4(%rbp), %r8
callq 0x7100
jmp 0x6265
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
movl $0x208d, -0xc8(%rbp)    # imm = 0x208D
leaq 0x1ee2e(%rip), %rcx     # 0x250af
leaq -0xb4(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0xc8(%rbp), %r8
callq 0x7150
jmp 0x629a
movq -0xd8(%rbp), %rdi
addq $0x10, %rdi
movl $0x208d, -0xcc(%rbp)    # imm = 0x208D
leaq 0x1ee14(%rip), %rcx     # 0x250ca
leaq -0xb4(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0xcc(%rbp), %r8
callq 0x7060
jmp 0x62d2
leaq -0x88(%rbp), %rdi
callq 0x6930
leaq -0x40(%rbp), %rdi
callq 0x6930
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6316
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x6930
leaq -0x40(%rbp), %rdi
callq 0x6930
movq -0x48(%rbp), %rdi
callq 0x5710
nopl (%rax,%rax)