// File: /workspace/github_cpp_makefile_star2_O2/tenup-coin[P]seeder/main.cpp
// Function: CDnsSeedOpts::ParseCommandLine(int, char**)
void ParseCommandLine(int argc, char **argv) {
    static const char *help = "tenup-seeder\n"
                              "Usage: %s -h <host> -n <ns> [-m <mbox>] [-t <threads>] [-p <port>]\n"
                              "\n"
                              "Options:\n"
                              "-h <host>       Hostname of the DNS seed\n"
                              "-n <ns>         Hostname of the nameserver\n"
                              "-m <mbox>       E-Mail address reported in SOA records\n"
                              "-t <threads>    Number of crawlers to run in parallel (default 96)\n"
                              "-d <threads>    Number of DNS server threads (default 4)\n"
                              "-p <port>       UDP port to listen on (default 53)\n"
                              "-o <ip:port>    Tor proxy IP/Port\n"
                              "-i <ip:port>    IPV4 SOCKS5 proxy IP/Port\n"
                              "-k <ip:port>    IPV6 SOCKS5 proxy IP/Port\n"
                              "-w f1,f2,...    Allow these flag combinations as filters\n"
                              "--testnet       Use testnet\n"
                              "--wipeban       Wipe list of banned nodes\n"
                              "--wipeignore    Wipe list of ignored nodes\n"
                              "-?, --help      Show this text\n"
                              "\n";
    bool showHelp = false;

    while(1) {
      static struct option long_options[] = {
        {"host", required_argument, 0, 'h'},
        {"ns",   required_argument, 0, 'n'},
        {"mbox", required_argument, 0, 'm'},
        {"threads", required_argument, 0, 't'},
        {"dnsthreads", required_argument, 0, 'd'},
        {"port", required_argument, 0, 'p'},
        {"onion", required_argument, 0, 'o'},
        {"proxyipv4", required_argument, 0, 'i'},
        {"proxyipv6", required_argument, 0, 'k'},
        {"filter", required_argument, 0, 'w'},
        {"testnet", no_argument, &fUseTestNet, 1},
        {"wipeban", no_argument, &fWipeBan, 1},
        {"wipeignore", no_argument, &fWipeBan, 1},
        {"help", no_argument, 0, 'h'},
        {0, 0, 0, 0}
      };
      int option_index = 0;
      int c = getopt_long(argc, argv, "h:n:m:t:p:d:o:i:k:w:", long_options, &option_index);
      if (c == -1) break;
      switch (c) {
        case 'h': {
          host = optarg;
          break;
        }
        
        case 'm': {
          mbox = optarg;
          break;
        }
        
        case 'n': {
          ns = optarg;
          break;
        }
        
        case 't': {
          int n = strtol(optarg, NULL, 10);
          if (n > 0 && n < 1000) nThreads = n;
          break;
        }

        case 'd': {
          int n = strtol(optarg, NULL, 10);
          if (n > 0 && n < 1000) nDnsThreads = n;
          break;
        }

        case 'p': {
          int p = strtol(optarg, NULL, 10);
          if (p > 0 && p < 65536) nPort = p;
          break;
        }

        case 'o': {
          tor = optarg;
          break;
        }

        case 'i': {
          ipv4_proxy = optarg;
          break;
        }

        case 'k': {
          ipv6_proxy = optarg;
          break;
        }

        case 'w': {
          char* ptr = optarg;
          while (*ptr != 0) {
            unsigned long l = strtoul(ptr, &ptr, 0);
            if (*ptr == ',') {
                ptr++;
            } else if (*ptr != 0) {
                break;
            }
            filter_whitelist.insert(l);
          }
          break;
        }

        case '?': {
          showHelp = true;
          break;
        }
      }
    }
    if (filter_whitelist.empty()) {
        filter_whitelist.insert(1);
        filter_whitelist.insert(5);
        filter_whitelist.insert(9);
        filter_whitelist.insert(13);
    }
    if (host != NULL && ns == NULL) showHelp = true;
    if (showHelp) fprintf(stderr, help, argv[0]);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movl %esi, %ebp
leaq 0xc(%rdi), %rax
movq %rax, 0x28(%rsp)
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rdi, (%rsp)
leaq 0x48(%rdi), %r15
xorl %ebx, %ebx
leaq 0x8(%rsp), %r12
leaq 0x30(%rsp), %r13
movq %rdx, 0x18(%rsp)
movb 0xfb80(%rip), %al       # 0x1d8d0
testb %al, %al
je 0xdf09
andl $0x0, 0x14(%rsp)
movl %ebp, %edi
movq %r14, %rsi
leaq 0x53d8(%rip), %rdx      # 0x13141
leaq 0xf980(%rip), %rcx      # 0x1d6f0
leaq 0x14(%rsp), %r8
callq 0x3650
leal -0x64(%rax), %ecx
cmpl $0x13, %ecx
ja 0xddc1
leaq 0x4cff(%rip), %rdx      # 0x12a88
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0xf207(%rip), %rax      # 0x1cfa0
movq (%rax), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3580
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0xdea9
movq (%rsp), %rcx
movl %eax, 0x8(%rcx)
jmp 0xdea9
movb $0x1, %cl
cmpl $0x3f, %eax
je 0xdeab
cmpl $-0x1, %eax
jne 0xdea9
jmp 0xe150
movq 0xf1bf(%rip), %rax      # 0x1cfa0
movq (%rax), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3580
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0xdea9
movq (%rsp), %rcx
movl %eax, (%rcx)
jmp 0xdea9
movq 0xf191(%rip), %rax      # 0x1cfa0
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, 0x18(%rcx)
jmp 0xdea9
movq 0xf17a(%rip), %rax      # 0x1cfa0
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, 0x20(%rcx)
jmp 0xdea9
movq 0xf166(%rip), %rax      # 0x1cfa0
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, 0x38(%rcx)
jmp 0xdea9
movq 0xf152(%rip), %rax      # 0x1cfa0
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, 0x40(%rcx)
jmp 0xdea9
movq 0xf13e(%rip), %rax      # 0x1cfa0
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, 0x28(%rcx)
jmp 0xdea9
movq 0xf12a(%rip), %rax      # 0x1cfa0
movq (%rax), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x3580
leal -0x1(%rax), %ecx
cmpl $0xfffe, %ecx           # imm = 0xFFFE
ja 0xdea9
movq (%rsp), %rcx
movl %eax, 0x4(%rcx)
jmp 0xdea9
movq 0xf102(%rip), %rax      # 0x1cfa0
movq (%rax), %rax
movq (%rsp), %rcx
movq %rax, 0x30(%rcx)
movl %ebx, %ecx
movl %ecx, %ebx
jmp 0xdd4a
movq 0xf0e7(%rip), %rax      # 0x1cfa0
movq (%rax), %r14
movq %r14, 0x8(%rsp)
cmpb $0x0, (%r14)
je 0xdf00
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x3120
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %r14
movzbl (%r14), %eax
testl %eax, %eax
je 0xdef3
cmpl $0x2c, %eax
jne 0xdf00
incq %r14
movq %r14, 0x8(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xeeb8
jmp 0xdec1
movl %ebx, %ecx
movq 0x18(%rsp), %r14
jmp 0xdeab
leaq 0xf9c0(%rip), %rdi      # 0x1d8d0
callq 0x36d0
testl %eax, %eax
je 0xdd58
leaq 0x51c5(%rip), %rax      # 0x130e9
movq %rax, 0xf7c5(%rip)      # 0x1d6f0
pushq $0x1
popq %rcx
movl %ecx, 0xf7c4(%rip)      # 0x1d6f8
andq $0x0, 0xf7c4(%rip)      # 0x1d700
pushq $0x68
popq %rdx
movl %edx, 0xf7c3(%rip)      # 0x1d708
leaq 0x51a2(%rip), %rax      # 0x130ee
movq %rax, 0xf7bd(%rip)      # 0x1d710
movl %ecx, 0xf7bf(%rip)      # 0x1d718
andq $0x0, 0xf7bf(%rip)      # 0x1d720
movl $0x6e, 0xf7bd(%rip)     # 0x1d728
leaq 0x517f(%rip), %rax      # 0x130f1
movq %rax, 0xf7b7(%rip)      # 0x1d730
movl %ecx, 0xf7b9(%rip)      # 0x1d738
andq $0x0, 0xf7b9(%rip)      # 0x1d740
movl $0x6d, 0xf7b7(%rip)     # 0x1d748
leaq 0x5161(%rip), %rax      # 0x130f9
movq %rax, 0xf7b1(%rip)      # 0x1d750
movl %ecx, 0xf7b3(%rip)      # 0x1d758
andq $0x0, 0xf7b3(%rip)      # 0x1d760
movl $0x74, 0xf7b1(%rip)     # 0x1d768
leaq 0x5138(%rip), %rax      # 0x130f6
movq %rax, 0xf7ab(%rip)      # 0x1d770
movl %ecx, 0xf7ad(%rip)      # 0x1d778
andq $0x0, 0xf7ad(%rip)      # 0x1d780
movl $0x64, 0xf7ab(%rip)     # 0x1d788
leaq 0x511d(%rip), %rax      # 0x13101
movq %rax, 0xf7a5(%rip)      # 0x1d790
movl %ecx, 0xf7a7(%rip)      # 0x1d798
andq $0x0, 0xf7a7(%rip)      # 0x1d7a0
movl $0x70, 0xf7a5(%rip)     # 0x1d7a8
leaq 0x43ae(%rip), %rax      # 0x123b8
movq %rax, 0xf79f(%rip)      # 0x1d7b0
movl %ecx, 0xf7a1(%rip)      # 0x1d7b8
andq $0x0, 0xf7a1(%rip)      # 0x1d7c0
movl $0x6f, 0xf79f(%rip)     # 0x1d7c8
leaq 0x50d6(%rip), %rax      # 0x13106
movq %rax, 0xf799(%rip)      # 0x1d7d0
movl %ecx, 0xf79b(%rip)      # 0x1d7d8
andq $0x0, 0xf79b(%rip)      # 0x1d7e0
movl $0x69, 0xf799(%rip)     # 0x1d7e8
leaq 0x50ba(%rip), %rax      # 0x13110
movq %rax, 0xf793(%rip)      # 0x1d7f0
movl %ecx, 0xf795(%rip)      # 0x1d7f8
andq $0x0, 0xf795(%rip)      # 0x1d800
movl $0x6b, 0xf793(%rip)     # 0x1d808
leaq 0x509e(%rip), %rax      # 0x1311a
movq %rax, 0xf78d(%rip)      # 0x1d810
movl %ecx, 0xf78f(%rip)      # 0x1d818
andq $0x0, 0xf78f(%rip)      # 0x1d820
movl $0x77, 0xf78d(%rip)     # 0x1d828
leaq 0x507f(%rip), %rax      # 0x13121
movq %rax, 0xf787(%rip)      # 0x1d830
andl $0x0, 0xf788(%rip)      # 0x1d838
movq 0x28(%rsp), %rax
movq %rax, 0xf784(%rip)      # 0x1d840
movl %ecx, 0xf786(%rip)      # 0x1d848
leaq 0x5060(%rip), %rax      # 0x13129
movq %rax, 0xf780(%rip)      # 0x1d850
andl $0x0, 0xf781(%rip)      # 0x1d858
movq 0x20(%rsp), %rax
movq %rax, 0xf77d(%rip)      # 0x1d860
movl %ecx, 0xf77f(%rip)      # 0x1d868
leaq 0x5041(%rip), %rsi      # 0x13131
movq %rsi, 0xf779(%rip)      # 0x1d870
andl $0x0, 0xf77a(%rip)      # 0x1d878
movq %rax, 0xf77b(%rip)      # 0x1d880
movl %ecx, 0xf77d(%rip)      # 0x1d888
leaq 0x502a(%rip), %rax      # 0x1313c
movq %rax, 0xf777(%rip)      # 0x1d890
andl $0x0, 0xf778(%rip)      # 0x1d898
andq $0x0, 0xf778(%rip)      # 0x1d8a0
movl %edx, 0xf77a(%rip)      # 0x1d8a8
xorps %xmm0, %xmm0
movaps %xmm0, 0xf788(%rip)     # 0x1d8c0
movaps %xmm0, 0xf771(%rip)     # 0x1d8b0
leaq 0xf78a(%rip), %rdi      # 0x1d8d0
callq 0x32a0
jmp 0xdd58
movq (%rsp), %r12
cmpq $0x0, 0x70(%r12)
jne 0xe1ba
leaq 0x8(%rsp), %r14
movq $0x1, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0xf012
movq $0x5, (%r14)
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xf012
movq $0x9, (%r14)
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xf012
movq $0xd, (%r14)
movq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0xf012
cmpq $0x0, 0x28(%r12)
setne %al
cmpq $0x0, 0x20(%r12)
sete %cl
andb %al, %cl
orb %bl, %cl
testb $0x1, %cl
jne 0xe1e4
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xedd5(%rip), %rax      # 0x1cfc0
movq (%rax), %rdi
movq 0xf1fb(%rip), %rsi      # 0x1d3f0
movq (%r14), %rdx
xorl %eax, %eax
callq 0x35b0
jmp 0xe1d5
nop