// File: xocoder[P]m_kcptun/src/conf_kcp.cpp
// Function: conf_create(int, char const**)
conf_kcp_t*
conf_create(int argc, const char *argv[]) {

   if (argc > 1) {
      conf_kcp_t *conf = new conf_kcp_t;
      memset(conf, 0, sizeof(*conf));

      conf->rs_data = 11;       // RS(11, 2)
      conf->rs_parity = 2;
      conf->mtu = 1400;
      conf->rcv_wndsize = 256;
      conf->snd_wndsize = 256;


      for (int i=1; i<argc; i+=2) {

         chann_addr_t addr;
         string opt = argv[i];
         string value = (argc - i) > 1 ? argv[i+1] : "";

         if (conf->src_count<4 && opt=="-l") {
            int i = conf->src_count;
            mnet_parse_ipport((char*)value.c_str(), &addr);
            strncpy(conf->src_ip[i], addr.ip, sizeof(addr.ip));
            conf->src_port[i] = addr.port;
            conf->src_count = i + 1;
         }

         if (conf->dest_count<4 && opt=="-r") {
            int i = conf->dest_count;
            mnet_parse_ipport((char*)value.c_str(), &addr);
            strncpy(conf->dest_ip[i], addr.ip, sizeof(addr.ip));
            conf->dest_port[i] = addr.port;
            conf->dest_count = i + 1;
         }

         if (opt == "-nodelay") {
            conf->nodelay = atoi(value.c_str());
         }

         if (opt == "-interval") {
            conf->interval = atoi(value.c_str());
         }

         if (opt == "-resend") {
            conf->resend = atoi(value.c_str());
         }

         if (opt == "-nc") {
            conf->nc = atoi(value.c_str());
         }

         if (opt == "-rcv_wndsize") {
            conf->rcv_wndsize = atoi(value.c_str());
         }

         if (opt == "-snd_wndsize") {
            conf->snd_wndsize = atoi(value.c_str());
         }

         if (opt == "-mtu") {
            conf->mtu = atoi(value.c_str());
         }

         if (opt == "-fast") {
            conf->fast = atoi(value.c_str());
         }

         if (opt == "-rs_data") {
            conf->rs_data = atoi(value.c_str());
         }

         if (opt == "-rs_parity") {
            conf->rs_parity = atoi(value.c_str());
         }

         if (opt == "-h" || opt == "-help") {
            goto usage;
         }

         if (opt == "-key") {
            conf->crypto = 1;
            snprintf(conf->key, 32, "%s", value.c_str());
         }

         if (opt == "-tcp_cache") {
            conf->tcp_cache = atoi(value.c_str());
         }

         if (opt == "-v" || opt == "-version") {
            cerr << "mkcptun: v20180609" << endl;
            return NULL;
         }
      }

      if (conf->tcp_cache <= 0) {
         conf->tcp_cache = 2*1024*1024;
      }

      if (conf->rs_data>0 && conf->rs_parity>0) {
         conf->mtu = 1400 / (conf->rs_data + conf->rs_parity) * conf->rs_data;
      } else {
         conf->rs_data = conf->rs_parity = 0;
      }

      switch (conf->fast) {

         case 3: {
            conf->nodelay = 1;
            conf->interval = 10;
            conf->resend = 2;
            conf->nc = 1;
            conf->rcv_wndsize = 1024;
            conf->snd_wndsize = 1024;
            break;
         }

         case 2: {
            conf->nodelay = 1;
            conf->interval = 20;
            conf->resend = 4;
            conf->nc = 1;
            conf->rcv_wndsize = 512;
            conf->snd_wndsize = 512;
            break;
         }

         case 1: {
            conf->nodelay = 1;
            conf->interval = 40;
            conf->resend = 0;
            conf->nc = 1;
            conf->rcv_wndsize = 256;
            conf->snd_wndsize = 256;
            break;
         }

         default: {
            conf->nodelay = 0;
            conf->interval = 100;
            conf->resend = 0;
            conf->nc = 0;
            break;
         }
      }

      if (!_str_empty(conf->src_ip[0]) &&
          !_str_empty(conf->dest_ip[0]) &&
          conf->src_port[0] > 0 &&
          conf->dest_port[0] > 0)
      {
         // print conf
         cout << "---------- begin config ----------" << endl;
         for (int i=0; i<conf->src_count; i++) {
            cout << "listen: " << conf->src_ip[i] << ":" << conf->src_port[i] << endl;
         }
         for (int i=0; i<conf->dest_count; i++) {
            cout << "remote: " << conf->dest_ip[i] << ":" << conf->dest_port[i] << endl;
         }

         cout << "nodelay: " << conf->nodelay << endl;
         cout << "interval: " << conf->interval << endl;

         cout << "resend: " << conf->resend << endl;
         cout << "nc: " << conf->nc << endl;

         if (conf->rs_data) {
            cout << "mtu (with rs): " << conf->mtu << endl;
         } else {
            cout << "mtu: " << conf->mtu << endl;
         }
         cout << "crypto: " << conf->crypto << endl;

         cout << "rcv_wndsize: " << conf->rcv_wndsize << endl;
         cout << "snd_wndsize: " << conf->snd_wndsize << endl;
         
         cout << "fast: " << conf->fast << endl;         
         cout << "rs_data: " << conf->rs_data << endl;
         cout << "rs_parity: " << conf->rs_parity << endl;

#ifdef KCP_REMOTE
         cout << "tcp_cache: " << conf->tcp_cache << endl;
#endif
         cout << "---------- end config ----------" << endl;
         return conf;
      } else {
         cout << "invalid " << conf->src_ip << conf->src_port << endl;
      }

      delete conf;
   }

  usage:
   cerr << "Usage:" << endl;

#ifdef KCP_LOCAL
   cerr << argv[0] << ": -l LISTEN_IP:PORT -r REMOTE_IP_1:PORT -r REMOTE_IP_2:PORT -fast 3 -key 'SECRET_256bits'" << endl;
#else
   cerr << argv[0] << ": -l LISTEN_IP_1:PORT -l LISTEN_IP_2:PORT -t REMOTE_IP:PORT -fast 3 -key 'SECRET_256bits'" << endl;   
#endif

   cerr << "Optinal: \t support IP count " << IP_COUNT << endl;
   cerr << "-key     \t set communication secret" << endl;
   cerr << "-nodelay \t whether nodelay mode is enabled, 0 is not enabled; 1 enabled" <<endl;
   cerr << "-interval \t protocol internal work interval, in milliseconds" << endl;
   cerr << "-resend \t fast retransmission mode, 0 represents off by default, 2 can be set" << endl;
   cerr << "        \t (2 ACK spans will result in direct retransmission)" << endl;
   cerr << "-nc     \t whether to turn off flow control, 1 represents no flow control" << endl;
   cerr << "-snd_wndsize \t send window size" << endl;
   cerr << "-rcv_wndsize \t recv window size" << endl;
   cerr << "-fast   \t fast mode with pre defined option:" << endl;
   cerr << "        \t 3 most fast, with ikcp_nodelay  \t [1 10 2 1]" << endl;
   cerr << "        \t 2 mid fast, with ikcp_nodelay   \t [1 20 4 1]" << endl;
   cerr << "        \t 1 least fast, with ikcp_nodelay \t [1 40 0 1]" << endl;
   cerr << "        \t 0 default, with ikcp_nodelay    \t [0 100 0 0]" << endl;
   cerr << "-rs_data \t Reed-Solomon erasure codes data bytes, default 11" << endl;
   cerr << "-rs_parity \t Reed-Solomon erasure codes parity bytes, default 2" << endl;
#ifdef KCP_REMOTE
   cerr << "-tcp_cache \t TCP cache size, default 2*1024*1024" << endl;
#endif
   cerr << "-help   \t print this help" << endl;
   cerr << "-version \t print version" << endl;
   return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
cmpl $0x1, -0xc(%rbp)
jle 0xcbc9
movl $0x178, %edi            # imm = 0x178
callq 0x3310
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x178, %edx            # imm = 0x178
callq 0x31c0
movq -0x20(%rbp), %rax
movl $0xb, 0x14c(%rax)
movq -0x20(%rbp), %rax
movl $0x2, 0x150(%rax)
movq -0x20(%rbp), %rax
movl $0x578, 0x140(%rax)     # imm = 0x578
movq -0x20(%rbp), %rax
movl $0x100, 0x128(%rax)     # imm = 0x100
movq -0x20(%rbp), %rax
movl $0x100, 0x12c(%rax)     # imm = 0x100
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xc50d
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb8(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x3510
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0x58(%rbp), %rdi
callq 0xcf80
jmp 0xbe3f
leaq -0x59(%rbp), %rdi
callq 0x3370
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
cmpl $0x1, %eax
jle 0xbe6d
movq -0x18(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xc0(%rbp)
jmp 0xbe7d
leaq 0x73c4(%rip), %rax      # 0x13238
movq %rax, -0xc0(%rbp)
jmp 0xbe7d
movq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3510
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0xcf80
jmp 0xbeba
leaq -0x91(%rbp), %rdi
callq 0x3370
movq -0x20(%rbp), %rax
cmpl $0x4, (%rax)
jge 0xbfbe
leaq 0x7ac1(%rip), %rsi      # 0x1399b
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd1(%rbp)
jmp 0xbeeb
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0xbefa
jmp 0xbfbe
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0x70e0
jmp 0xbf20
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
movslq -0x98(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
leaq -0x38(%rbp), %rsi
movl $0x10, %edx
callq 0x31b0
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movslq -0x98(%rbp), %rcx
movl %edx, 0x84(%rax,%rcx,4)
movl -0x98(%rbp), %ecx
addl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0xbfbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x59(%rbp), %rdi
callq 0x3370
jmp 0xcea4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x3370
jmp 0xc4ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x31f0
jmp 0xc4ff
movq -0x20(%rbp), %rax
cmpl $0x4, 0x94(%rax)
jge 0xc06c
leaq 0x79c8(%rip), %rsi      # 0x1399e
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd2(%rbp)
jmp 0xbfe7
movb -0xd2(%rbp), %al
testb $0x1, %al
jne 0xbff3
jmp 0xc06c
movq -0x20(%rbp), %rax
movl 0x94(%rax), %eax
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0x70e0
jmp 0xc01d
movq -0x20(%rbp), %rdi
addq $0x98, %rdi
movslq -0x9c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
leaq -0x38(%rbp), %rsi
movl $0x10, %edx
callq 0x31b0
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rax
movslq -0x9c(%rbp), %rcx
movl %edx, 0x118(%rax,%rcx,4)
movl -0x9c(%rbp), %ecx
addl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x94(%rax)
leaq 0x792e(%rip), %rsi      # 0x139a1
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd3(%rbp)
jmp 0xc084
movb -0xd3(%rbp), %al
testb $0x1, %al
jne 0xc090
jmp 0xc0b0
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x130(%rax)
leaq 0x78f3(%rip), %rsi      # 0x139aa
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd4(%rbp)
jmp 0xc0c8
movb -0xd4(%rbp), %al
testb $0x1, %al
jne 0xc0d4
jmp 0xc0f4
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x134(%rax)
leaq 0x78b9(%rip), %rsi      # 0x139b4
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd5(%rbp)
jmp 0xc10c
movb -0xd5(%rbp), %al
testb $0x1, %al
jne 0xc118
jmp 0xc138
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x138(%rax)
leaq 0x787d(%rip), %rsi      # 0x139bc
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd6(%rbp)
jmp 0xc150
movb -0xd6(%rbp), %al
testb $0x1, %al
jne 0xc15c
jmp 0xc17c
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x13c(%rax)
leaq 0x783d(%rip), %rsi      # 0x139c0
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd7(%rbp)
jmp 0xc194
movb -0xd7(%rbp), %al
testb $0x1, %al
jne 0xc1a0
jmp 0xc1c0
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x128(%rax)
leaq 0x7806(%rip), %rsi      # 0x139cd
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd8(%rbp)
jmp 0xc1d8
movb -0xd8(%rbp), %al
testb $0x1, %al
jne 0xc1e4
jmp 0xc204
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x12c(%rax)
leaq 0x77cf(%rip), %rsi      # 0x139da
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xd9(%rbp)
jmp 0xc21c
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0xc228
jmp 0xc248
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x140(%rax)
leaq 0x7790(%rip), %rsi      # 0x139df
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xda(%rbp)
jmp 0xc260
movb -0xda(%rbp), %al
testb $0x1, %al
jne 0xc26c
jmp 0xc28c
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x144(%rax)
leaq 0x7752(%rip), %rsi      # 0x139e5
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xdb(%rbp)
jmp 0xc2a4
movb -0xdb(%rbp), %al
testb $0x1, %al
jne 0xc2b0
jmp 0xc2d0
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14c(%rax)
leaq 0x7717(%rip), %rsi      # 0x139ee
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xdc(%rbp)
jmp 0xc2e8
movb -0xdc(%rbp), %al
testb $0x1, %al
jne 0xc2f4
jmp 0xc314
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x150(%rax)
leaq 0x76de(%rip), %rsi      # 0x139f9
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xdd(%rbp)
jmp 0xc32c
movb -0xdd(%rbp), %al
testb $0x1, %al
jne 0xc35c
jmp 0xc338
leaq 0x76bd(%rip), %rsi      # 0x139fc
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xde(%rbp)
jmp 0xc350
movb -0xde(%rbp), %al
testb $0x1, %al
jne 0xc35c
jmp 0xc36b
movl $0x5, -0xa0(%rbp)
jmp 0xc4b2
leaq 0x7690(%rip), %rsi      # 0x13a02
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xdf(%rbp)
jmp 0xc383
movb -0xdf(%rbp), %al
testb $0x1, %al
jne 0xc38f
jmp 0xc3d7
movq -0x20(%rbp), %rax
movl $0x1, 0x148(%rax)
movq -0x20(%rbp), %rax
addq $0x158, %rax            # imm = 0x158
movq %rax, -0xe8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x3140
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl $0x20, %esi
leaq 0x7003(%rip), %rdx      # 0x133d3
movb $0x0, %al
callq 0x34b0
leaq 0x7629(%rip), %rsi      # 0x13a07
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xe9(%rbp)
jmp 0xc3ef
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0xc3fb
jmp 0xc41b
leaq -0x90(%rbp), %rdi
callq 0x3140
movq %rax, %rdi
callq 0x34a0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x154(%rax)
leaq 0x75f0(%rip), %rsi      # 0x13a12
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xea(%rbp)
jmp 0xc433
movb -0xea(%rbp), %al
testb $0x1, %al
jne 0xc463
jmp 0xc43f
leaq 0x75cf(%rip), %rsi      # 0x13a15
leaq -0x58(%rbp), %rdi
callq 0xd030
movb %al, -0xeb(%rbp)
jmp 0xc457
movb -0xeb(%rbp), %al
testb $0x1, %al
jne 0xc463
jmp 0xc4a8
movq 0xbb86(%rip), %rdi      # 0x17ff0
leaq 0x75ad(%rip), %rsi      # 0x13a1e
callq 0x32f0
movq %rax, -0xf8(%rbp)
jmp 0xc47f
movq -0xf8(%rbp), %rdi
movq 0xbb33(%rip), %rsi      # 0x17fc0
callq 0x3340
jmp 0xc494
movq $0x0, -0x8(%rbp)
movl $0x1, -0xa0(%rbp)
jmp 0xc4b2
movl $0x0, -0xa0(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x31f0
leaq -0x58(%rbp), %rdi
callq 0x31f0
movl -0xa0(%rbp), %eax
movl %eax, -0xfc(%rbp)
testl %eax, %eax
je 0xc4ef
jmp 0xc4d9
movl -0xfc(%rbp), %eax
subl $0x1, %eax
je 0xce97
jmp 0xc4ea
jmp 0xcbcb
jmp 0xc4f1
movl -0x24(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x24(%rbp)
jmp 0xbdf7
leaq -0x58(%rbp), %rdi
callq 0x31f0
jmp 0xcea4
movq -0x20(%rbp), %rax
cmpl $0x0, 0x154(%rax)
jg 0xc528
movq -0x20(%rbp), %rax
movl $0x200000, 0x154(%rax)  # imm = 0x200000
movq -0x20(%rbp), %rax
cmpl $0x0, 0x14c(%rax)
jle 0xc577
movq -0x20(%rbp), %rax
cmpl $0x0, 0x150(%rax)
jle 0xc577
movq -0x20(%rbp), %rax
movl 0x14c(%rax), %ecx
movq -0x20(%rbp), %rax
addl 0x150(%rax), %ecx
movl $0x578, %eax            # imm = 0x578
cltd
idivl %ecx
movl %eax, %ecx
movq -0x20(%rbp), %rax
imull 0x14c(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x140(%rax)
jmp 0xc593
movq -0x20(%rbp), %rax
movl $0x0, 0x150(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x14c(%rax)
movq -0x20(%rbp), %rax
movl 0x144(%rax), %eax
movl %eax, -0x100(%rbp)
subl $0x1, %eax
je 0xc67e
jmp 0xc5ae
movl -0x100(%rbp), %eax
subl $0x2, %eax
je 0xc625
jmp 0xc5bb
movl -0x100(%rbp), %eax
subl $0x3, %eax
jne 0xc6d4
jmp 0xc5cc
movq -0x20(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x20(%rbp), %rax
movl $0xa, 0x134(%rax)
movq -0x20(%rbp), %rax
movl $0x2, 0x138(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x13c(%rax)
movq -0x20(%rbp), %rax
movl $0x400, 0x128(%rax)     # imm = 0x400
movq -0x20(%rbp), %rax
movl $0x400, 0x12c(%rax)     # imm = 0x400
jmp 0xc70c
movq -0x20(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x20(%rbp), %rax
movl $0x14, 0x134(%rax)
movq -0x20(%rbp), %rax
movl $0x4, 0x138(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x13c(%rax)
movq -0x20(%rbp), %rax
movl $0x200, 0x128(%rax)     # imm = 0x200
movq -0x20(%rbp), %rax
movl $0x200, 0x12c(%rax)     # imm = 0x200
jmp 0xc70c
movq -0x20(%rbp), %rax
movl $0x1, 0x130(%rax)
movq -0x20(%rbp), %rax
movl $0x28, 0x134(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x138(%rax)
movq -0x20(%rbp), %rax
movl $0x1, 0x13c(%rax)
movq -0x20(%rbp), %rax
movl $0x100, 0x128(%rax)     # imm = 0x100
movq -0x20(%rbp), %rax
movl $0x100, 0x12c(%rax)     # imm = 0x100
jmp 0xc70c
movq -0x20(%rbp), %rax
movl $0x0, 0x130(%rax)
movq -0x20(%rbp), %rax
movl $0x64, 0x134(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x138(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x13c(%rax)
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
callq 0xceb0
testb $0x1, %al
jne 0xcb60
movq -0x20(%rbp), %rdi
addq $0x98, %rdi
callq 0xceb0
testb $0x1, %al
jne 0xcb60
movq -0x20(%rbp), %rax
cmpl $0x0, 0x84(%rax)
jle 0xcb60
movq -0x20(%rbp), %rax
cmpl $0x0, 0x118(%rax)
jle 0xcb60
movq 0xb86e(%rip), %rdi      # 0x17fd0
leaq 0x72c8(%rip), %rsi      # 0x13a31
callq 0x32f0
movq %rax, %rdi
movq 0xb848(%rip), %rsi      # 0x17fc0
callq 0x3340
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0xc812
movq 0xb834(%rip), %rdi      # 0x17fd0
leaq 0x72b1(%rip), %rsi      # 0x13a54
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
movslq -0xa4(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x32f0
movq %rax, %rdi
leaq 0x7340(%rip), %rsi      # 0x13b10
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movslq -0xa4(%rbp), %rcx
movl 0x84(%rax,%rcx,4), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb7c7(%rip), %rsi      # 0x17fc0
callq 0x3340
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xc787
movl $0x0, -0xa8(%rbp)
movl -0xa8(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x94(%rcx), %eax
jge 0xc8b2
movq 0xb797(%rip), %rdi      # 0x17fd0
leaq 0x721d(%rip), %rsi      # 0x13a5d
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
addq $0x98, %rsi
movslq -0xa8(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x32f0
movq %rax, %rdi
leaq 0x72a0(%rip), %rsi      # 0x13b10
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movslq -0xa8(%rbp), %rcx
movl 0x118(%rax,%rcx,4), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb727(%rip), %rsi      # 0x17fc0
callq 0x3340
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0xc81c
movq 0xb717(%rip), %rdi      # 0x17fd0
leaq 0x71a6(%rip), %rsi      # 0x13a66
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x130(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb6df(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb6e3(%rip), %rdi      # 0x17fd0
leaq 0x717c(%rip), %rsi      # 0x13a70
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x134(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb6ab(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb6af(%rip), %rdi      # 0x17fd0
leaq 0x7153(%rip), %rsi      # 0x13a7b
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x138(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb677(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb67b(%rip), %rdi      # 0x17fd0
leaq 0x7128(%rip), %rsi      # 0x13a84
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x13c(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb643(%rip), %rsi      # 0x17fc0
callq 0x3340
movq -0x20(%rbp), %rax
cmpl $0x0, 0x14c(%rax)
je 0xc9c5
movq 0xb63a(%rip), %rdi      # 0x17fd0
leaq 0x70ec(%rip), %rsi      # 0x13a89
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x140(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb602(%rip), %rsi      # 0x17fc0
callq 0x3340
jmp 0xc9f9
movq 0xb604(%rip), %rdi      # 0x17fd0
leaq 0x70c6(%rip), %rsi      # 0x13a99
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x140(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb5cc(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb5d0(%rip), %rdi      # 0x17fd0
leaq 0x7098(%rip), %rsi      # 0x13a9f
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x148(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb598(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb59c(%rip), %rdi      # 0x17fd0
leaq 0x706d(%rip), %rsi      # 0x13aa8
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x128(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb564(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb568(%rip), %rdi      # 0x17fd0
leaq 0x7047(%rip), %rsi      # 0x13ab6
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x12c(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb530(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb534(%rip), %rdi      # 0x17fd0
leaq 0x7021(%rip), %rsi      # 0x13ac4
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x144(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb4fc(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb500(%rip), %rdi      # 0x17fd0
leaq 0x6ff4(%rip), %rsi      # 0x13acb
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x14c(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb4c8(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb4cc(%rip), %rdi      # 0x17fd0
leaq 0x6fca(%rip), %rsi      # 0x13ad5
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rax
movl 0x150(%rax), %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb494(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb498(%rip), %rdi      # 0x17fd0
leaq 0x6fa2(%rip), %rsi      # 0x13ae1
callq 0x32f0
movq %rax, %rdi
movq 0xb472(%rip), %rsi      # 0x17fc0
callq 0x3340
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xce97
movq 0xb469(%rip), %rdi      # 0x17fd0
leaq 0x6f94(%rip), %rsi      # 0x13b02
callq 0x32f0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
addq $0x4, %rsi
callq 0x3270
movq %rax, %rdi
movq -0x20(%rbp), %rsi
addq $0x84, %rsi
callq 0x3270
movq %rax, %rdi
movq 0xb420(%rip), %rsi      # 0x17fc0
callq 0x3340
movq -0x20(%rbp), %rax
movq %rax, -0x108(%rbp)
cmpq $0x0, %rax
je 0xcbc7
movq -0x108(%rbp), %rdi
movl $0x178, %esi            # imm = 0x178
callq 0x3330
jmp 0xcbc9
jmp 0xcbcb
movq 0xb41e(%rip), %rdi      # 0x17ff0
leaq 0x6f32(%rip), %rsi      # 0x13b0b
callq 0x32f0
movq %rax, %rdi
movq 0xb3d8(%rip), %rsi      # 0x17fc0
callq 0x3340
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq 0xb3f5(%rip), %rdi      # 0x17ff0
callq 0x32f0
movq %rax, %rdi
leaq 0x6f08(%rip), %rsi      # 0x13b12
callq 0x32f0
movq %rax, %rdi
movq 0xb3a7(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb3cb(%rip), %rdi      # 0x17ff0
leaq 0x6f40(%rip), %rsi      # 0x13b6c
callq 0x32f0
movq %rax, %rdi
movl $0x8, %esi
callq 0x34f0
movq %rax, %rdi
movq 0xb378(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb39c(%rip), %rdi      # 0x17ff0
leaq 0x6f2e(%rip), %rsi      # 0x13b89
callq 0x32f0
movq %rax, %rdi
movq 0xb356(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb37a(%rip), %rdi      # 0x17ff0
leaq 0x6f30(%rip), %rsi      # 0x13bad
callq 0x32f0
movq %rax, %rdi
movq 0xb334(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb358(%rip), %rdi      # 0x17ff0
leaq 0x6f56(%rip), %rsi      # 0x13bf5
callq 0x32f0
movq %rax, %rdi
movq 0xb312(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb336(%rip), %rdi      # 0x17ff0
leaq 0x6f71(%rip), %rsi      # 0x13c32
callq 0x32f0
movq %rax, %rdi
movq 0xb2f0(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb314(%rip), %rdi      # 0x17ff0
leaq 0x6f9d(%rip), %rsi      # 0x13c80
callq 0x32f0
movq %rax, %rdi
movq 0xb2ce(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb2f2(%rip), %rdi      # 0x17ff0
leaq 0x6fb8(%rip), %rsi      # 0x13cbd
callq 0x32f0
movq %rax, %rdi
movq 0xb2ac(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb2d0(%rip), %rdi      # 0x17ff0
leaq 0x6fdf(%rip), %rsi      # 0x13d06
callq 0x32f0
movq %rax, %rdi
movq 0xb28a(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb2ae(%rip), %rdi      # 0x17ff0
leaq 0x6fdd(%rip), %rsi      # 0x13d26
callq 0x32f0
movq %rax, %rdi
movq 0xb268(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb28c(%rip), %rdi      # 0x17ff0
leaq 0x6fdb(%rip), %rsi      # 0x13d46
callq 0x32f0
movq %rax, %rdi
movq 0xb246(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb26a(%rip), %rdi      # 0x17ff0
leaq 0x6fe6(%rip), %rsi      # 0x13d73
callq 0x32f0
movq %rax, %rdi
movq 0xb224(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb248(%rip), %rdi      # 0x17ff0
leaq 0x6ffb(%rip), %rsi      # 0x13daa
callq 0x32f0
movq %rax, %rdi
movq 0xb202(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb226(%rip), %rdi      # 0x17ff0
leaq 0x7010(%rip), %rsi      # 0x13de1
callq 0x32f0
movq %rax, %rdi
movq 0xb1e0(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb204(%rip), %rdi      # 0x17ff0
leaq 0x7025(%rip), %rsi      # 0x13e18
callq 0x32f0
movq %rax, %rdi
movq 0xb1be(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb1e2(%rip), %rdi      # 0x17ff0
leaq 0x703b(%rip), %rsi      # 0x13e50
callq 0x32f0
movq %rax, %rdi
movq 0xb19c(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb1c0(%rip), %rdi      # 0x17ff0
leaq 0x7056(%rip), %rsi      # 0x13e8d
callq 0x32f0
movq %rax, %rdi
movq 0xb17a(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb19e(%rip), %rdi      # 0x17ff0
leaq 0x7074(%rip), %rsi      # 0x13ecd
callq 0x32f0
movq %rax, %rdi
movq 0xb158(%rip), %rsi      # 0x17fc0
callq 0x3340
movq 0xb17c(%rip), %rdi      # 0x17ff0
leaq 0x706c(%rip), %rsi      # 0x13ee7
callq 0x32f0
movq %rax, %rdi
movq 0xb136(%rip), %rsi      # 0x17fc0
callq 0x3340
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x3500
nopl (%rax)