// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xc(%rdi), %rax
movq %rax, 0x20(%rsp)
leaq 0x10(%rdi), %rax
movq %rax, 0x18(%rsp)
leaq 0x48(%rdi), %r15
xorl %r12d, %r12d
leaq 0x4c94(%rip), %r13      # 0x13a88
movq %rdi, 0x28(%rsp)
movb 0xdaa1(%rip), %al       # 0x1c8a0
testb %al, %al
je 0xef9e
movl $0x0, 0x14(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
leaq 0x5326(%rip), %rdx      # 0x14141
leaq 0xd89e(%rip), %rcx      # 0x1c6c0
leaq 0x14(%rsp), %r8
callq 0x3610
leal -0x64(%rax), %ecx
cmpl $0x13, %ecx
ja 0xee6c
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0xd15b(%rip), %rax      # 0x1bfa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3540
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0xef37
movl %eax, 0x8(%r14)
jmp 0xef37
movb $0x1, %cl
cmpl $0x3f, %eax
je 0xef3a
cmpl $-0x1, %eax
jne 0xef37
jmp 0xefb2
movq 0xd114(%rip), %rax      # 0x1bfa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3540
leal -0x1(%rax), %ecx
cmpl $0x3e6, %ecx            # imm = 0x3E6
ja 0xef37
movl %eax, (%r14)
jmp 0xef37
movq 0xd0e7(%rip), %rax      # 0x1bfa0
movq (%rax), %rax
movq %rax, 0x18(%r14)
jmp 0xef37
movq 0xd0d7(%rip), %rax      # 0x1bfa0
movq (%rax), %rax
movq %rax, 0x20(%r14)
jmp 0xef37
movq 0xd0c7(%rip), %rax      # 0x1bfa0
movq (%rax), %rax
movq %rax, 0x38(%r14)
jmp 0xef37
movq 0xd0b7(%rip), %rax      # 0x1bfa0
movq (%rax), %rax
movq %rax, 0x40(%r14)
jmp 0xef37
movq 0xd0a7(%rip), %rax      # 0x1bfa0
movq (%rax), %rax
movq %rax, 0x28(%r14)
jmp 0xef37
movq 0xd097(%rip), %rax      # 0x1bfa0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x3540
leal -0x1(%rax), %ecx
cmpl $0xfffe, %ecx           # imm = 0xFFFE
ja 0xef37
movl %eax, 0x4(%r14)
jmp 0xef37
movq 0xd070(%rip), %rax      # 0x1bfa0
movq (%rax), %rax
movq %rax, 0x30(%r14)
movl %r12d, %ecx
movl %ecx, %r12d
jmp 0xedf9
movq 0xd057(%rip), %rax      # 0x1bfa0
movq (%rax), %r14
movq %r14, 0x8(%rsp)
cmpb $0x0, (%r14)
je 0xef94
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x3130
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %r14
movzbl (%r14), %eax
testl %eax, %eax
je 0xef85
cmpl $0x2c, %eax
jne 0xef94
incq %r14
movq %r14, 0x8(%rsp)
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
callq 0xfcf8
jmp 0xef51
movl %r12d, %ecx
movq 0x28(%rsp), %r14
jmp 0xef3a
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x37d1
jmp 0xee07
cmpq $0x0, 0x70(%r14)
jne 0xf018
movq %r14, %r13
leaq 0x8(%rsp), %r14
movq $0x1, (%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0xfe0a
movq $0x5, (%r14)
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xfe0a
movq $0x9, (%r14)
leaq 0x8(%rsp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xfe0a
movq $0xd, (%r14)
movq %r13, %r14
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0xfe0a
cmpq $0x0, 0x28(%r14)
setne %al
cmpq $0x0, 0x20(%r14)
sete %cl
andb %al, %cl
orb %r12b, %cl
testb $0x1, %cl
jne 0xf041
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x3a1b
jmp 0xf032
nop