LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/m_foundation/src/model/m_skiplist.c
// Function: skt_popf
void*
skt_popf(skt_t *lst) {
   if (lst && lst->count>0) {
      skt_node_t *p = lst->header->forward[0];
      return skt_remove(lst, p->key);
   }
   return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x68d2
cmpl $0x0, 0xc(%rdi)
jle 0x68d2
movq 0x10(%rdi), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
popq %rbp
jmp 0x67bc
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/m_foundation/src/model/m_skiplist.c
// Function: skt_iter_init
skt_iter_t*
skt_iter_init(skt_t *lst, skt_iter_t *it) {
   if (lst && lst->count>0 && it) {
      memset(it, 0, sizeof(*it));
      return it;
   }
   return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x68f9
testq %rsi, %rsi
je 0x68f9
cmpl $0x0, 0xc(%rdi)
jle 0x68f9
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
movq %rsi, %rax
jmp 0x68fb
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/m_foundation/src/model/m_skiplist.c
// Function: skt_iter_next
skt_iter_t*
skt_iter_next(skt_t *lst, skt_iter_t *it) {
   if (lst && lst->count>0 && it) {
      if (it->prev == NULL) {
         it->prev = lst->header;
      } else if ( it->curr ) {
         it->prev = ((skt_node_t*)it->prev)->forward[0];
      }
      it->curr = ((skt_node_t*)it->prev)->forward[0];
      skt_node_t *node = (skt_node_t*)it->curr;
      if (node != lst->tail) {
         it->key = node->key;
         it->value = node->value;
         return it;
      }
   }
   return NULL;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x6954
testq %rsi, %rsi
je 0x6954
cmpl $0x0, 0xc(%rdi)
jle 0x6954
pushq %rbp
movq %rsp, %rbp
movq (%rsi), %rax
movq %rdi, %rcx
testq %rax, %rax
je 0x6928
cmpq $0x0, 0x8(%rsi)
movq %rax, %rcx
je 0x692f
movq 0x10(%rcx), %rax
movq %rax, (%rsi)
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsi)
cmpq 0x18(%rdi), %rax
je 0x6951
movq (%rax), %rcx
movq %rcx, 0x10(%rsi)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsi)
movq %rsi, %rax
jmp 0x6953
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/m_foundation/src/model/m_skiplist.c
// Function: skt_iter_remove
void*
skt_iter_remove(skt_t *lst, skt_iter_t *it) {
   if (lst && lst->count>0 && it) {
      if (it->key > 0) {
         it->curr = NULL;
         return skt_remove(lst, it->key);
      }
   }
   return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x6980
testq %rsi, %rsi
je 0x6980
cmpl $0x0, 0xc(%rdi)
jle 0x6980
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x6980
andq $0x0, 0x8(%rsi)
movq %rax, %rsi
popq %rbp
jmp 0x67bc
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/session_proto.cpp
// Function: proto_probe(unsigned char const*, int, proto_t*)
int
proto_probe(const unsigned char *buf, int buf_len, proto_t *proto) {
   if (buf && buf_len>0 && proto) {
      proto->ptype = (buf[0] >> _TYPE_OFFSET);
      proto->sid = (buf[1]<<8) | buf[2];
      if (proto->ptype == PROTO_TYPE_CTRL) {
         proto->u.cmd = (buf[0] & _CMD_MASK);
      } else {
         proto->u.data = (unsigned char*)(buf + 3);

      }
      proto->data_length = buf_len - 3;
      return 1;
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
sete %al
testl %esi, %esi
setle %cl
testq %rdx, %rdx
sete %r8b
orb %al, %r8b
xorl %eax, %eax
orb %cl, %r8b
jne 0x69db
movzbl (%rdi), %eax
shrl $0x5, %eax
movl %eax, (%rdx)
movzwl 0x1(%rdi), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
movl %ecx, 0x4(%rdx)
cmpl $0x1, %eax
jne 0x69c8
movb (%rdi), %al
andb $0x1f, %al
movb %al, 0x8(%rdx)
jmp 0x69d0
addq $0x3, %rdi
movq %rdi, 0x8(%rdx)
addl $-0x3, %esi
movl %esi, 0x10(%rdx)
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/session_proto.cpp
// Function: proto_mark_cmd(unsigned char*, unsigned int, int)
int
proto_mark_cmd(unsigned char *buf, unsigned sid, int cmd) {
   if (buf && cmd>0) {
      buf[0] = (PROTO_TYPE_CTRL << _TYPE_OFFSET) | (cmd & _CMD_MASK);
      buf[1] = (sid >> 8) & 0xff;
      buf[2] = sid & 0xff;
      return 3;
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
testq %rdi, %rdi
sete %sil
testl %edx, %edx
setle %r8b
xorl %eax, %eax
orb %sil, %r8b
jne 0x6a0a
andb $0x1f, %dl
orb $0x20, %dl
movb %dl, (%rdi)
movb %ch, 0x1(%rdi)
movb %cl, 0x2(%rdi)
movl $0x3, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/session_proto.cpp
// Function: proto_mark_data(unsigned char*, unsigned int)
int
proto_mark_data(unsigned char *buf, unsigned sid) {
   if (buf) {
      buf[0] = (PROTO_TYPE_DATA << _TYPE_OFFSET);
      buf[1] = (sid >> 8) & 0xff;
      buf[2] = (sid & 0xff);
      return 3;
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x6a27
movl %esi, %eax
movb $0x40, (%rdi)
movb %ah, 0x1(%rdi)
movb %al, 0x2(%rdi)
movl $0x3, %eax
jmp 0x6a29
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/kcp_local.cpp
// Function: local_tcpin_listen(chann_msg_t*)
void
_local_tcpin_listen(chann_msg_t *e) {
   if (e->event == CHANN_EVENT_ACCEPT) {

      tun_local_t *tun = (tun_local_t*)e->opaque;
      if ( tun ) {

         // setup local session
         unsigned sid = ++tun->session_idx;
         session_unit_t *u = session_create(tun->session_lst, sid, e->r, tun);
         if ( u ) {
            mnet_chann_set_cb(e->r, _local_tcpin_callback, u);

            // open remote tcp
            unsigned char buf[16] = { 0 };
            if ( proto_mark_cmd(buf, sid, PROTO_CMD_OPEN) ) {
               ikcp_send(tun->kcpout, (const char*)buf, 16);
            }

            cout << "accept tcpin: " << e->r << ", sid " << sid << endl;
            return;
         }
      }

      mnet_chann_disconnect(e->r);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpl $0x3, (%rdi)
jne 0x7aca
movq %rdi, %r14
movq 0x18(%rdi), %r15
testq %r15, %r15
je 0x7ad5
movl 0x58(%r15), %ebx
incl %ebx
movl %ebx, 0x58(%r15)
movq 0x50(%r15), %rdi
movq 0x10(%r14), %rdx
movl %ebx, %esi
movq %r15, %rcx
callq 0x7ee8
testq %rax, %rax
je 0x7ad5
movq 0x10(%r14), %rdi
leaq 0xac(%rip), %rsi        # 0x7b06
movq %rax, %rdx
callq 0x4798
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rdi
movaps %xmm0, (%rdi)
pushq $0x1
popq %rdx
movl %ebx, %esi
callq 0x69dd
testl %eax, %eax
je 0x7a8a
movq 0x48(%r15), %rdi
leaq -0x30(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x2bef
movq 0x753f(%rip), %rdi      # 0xefd0
leaq 0x354b(%rip), %rsi      # 0xafe3
callq 0x2270
movq 0x10(%r14), %rsi
movq %rax, %rdi
callq 0x2210
leaq 0x3542(%rip), %rsi      # 0xaff2
movq %rax, %rdi
callq 0x2270
movl %ebx, %esi
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x2150
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r14), %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4702
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/kcp_local.cpp
// Function: local_tcpin_callback(chann_msg_t*)
void
_local_tcpin_callback(chann_msg_t *e) {
   session_unit_t *u = (session_unit_t*)e->opaque;
   tun_local_t *tun = (tun_local_t*)u->opaque;

   switch (e->event) {

      case CHANN_EVENT_RECV: {
         if ( u->connected ) {
            const int mss = tun->kcpout->mss - MKCP_OVERHEAD;
            long chann_ret = 0;
            do {
               int offset = proto_mark_data(tun->buf, u->sid);
               chann_ret = mnet_chann_recv(e->n, &tun->buf[offset], mss - offset);

               if (chann_ret > 0 && _local_kcp_can_send_more(tun)) {
                  int kcp_ret = ikcp_send(tun->kcpout, (const char*)tun->buf, chann_ret + offset);
                  if (kcp_ret < 0) {
                     cerr << "Fail to send kcp " << kcp_ret << endl;
                  }
               }
            } while (chann_ret > 0);
         }
         break;
      }

      case CHANN_EVENT_DISCONNECT:  {

         // send disconnect msg
         if ( _local_kcp_can_send_more(tun) ) {
            unsigned char buf[16] = { 0 };
            if ( proto_mark_cmd(buf, u->sid, PROTO_CMD_CLOSE) ) {
               ikcp_send(tun->kcpout, (const char*)buf, 16);
            }
         }

         session_destroy(tun->session_lst, u);
         mnet_chann_close(e->n);

         cout << "local tcp error or disconnect !" << endl;
         break;
      }

      default: {
         break;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x18(%rdi), %rax
movq %rax, -0x30(%rbp)
movq 0x18(%rax), %r15
movq %rdi, -0x38(%rbp)
movl (%rdi), %eax
cmpl $0x5, %eax
je 0x7bde
cmpl $0x1, %eax
jne 0x7c4b
movq -0x30(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x7c4b
movq 0x48(%r15), %rax
movl 0x8(%rax), %ebx
addl $-0x18, %ebx
leaq 0x98(%r15), %r12
movq -0x30(%rbp), %rax
movl (%rax), %esi
movq %r12, %rdi
callq 0x6a0c
movl %eax, %r13d
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
movslq %r13d, %rax
leaq (%r12,%rax), %rsi
movl %ebx, %edx
subl %eax, %edx
callq 0x48a0
testl %eax, %eax
jle 0x7c4b
movl %eax, %r14d
movq %r15, %rdi
callq 0x7c5a
testl %eax, %eax
je 0x7b5a
movq 0x48(%r15), %rdi
addl %r13d, %r14d
movq %r12, %rsi
movl %r14d, %edx
callq 0x2bef
testl %eax, %eax
jns 0x7b5a
movl %eax, %r14d
movq 0x7436(%rip), %rdi      # 0xeff0
leaq 0x3438(%rip), %rsi      # 0xaff9
callq 0x2270
movq %rax, %rdi
movl %r14d, %esi
callq 0x23e0
movq %rax, %rdi
callq 0x2150
jmp 0x7b5a
movq %r15, %rdi
callq 0x7c5a
testl %eax, %eax
je 0x7c16
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movq -0x30(%rbp), %rax
movl (%rax), %esi
pushq $0x3
popq %rdx
callq 0x69dd
testl %eax, %eax
je 0x7c16
movq 0x48(%r15), %rdi
leaq -0x50(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x2bef
movq 0x50(%r15), %rdi
movq -0x30(%rbp), %rsi
callq 0x7f81
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42e4
movq 0x7399(%rip), %rdi      # 0xefd0
leaq 0x33cd(%rip), %rsi      # 0xb00b
callq 0x2270
movq %rax, %rdi
callq 0x2150
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/kcp_local.cpp
// Function: local_udpout_callback(chann_msg_t*)
void
_local_udpout_callback(chann_msg_t *e) {
   tun_local_t *tun = (tun_local_t*)e->opaque;   

   switch (e->event) {

      case CHANN_EVENT_RECV: {
         long ret = mnet_chann_recv(e->n, tun->buf, MKCP_BUF_SIZE);

         if (ret > MKCP_OVERHEAD) {
            const int rs_offset = tun->rt ? sizeof(uint16_t) : 0;
            uint8_t *data = tun->buf + rs_offset;
            int data_len = tun->rt ? rskcp_dec_info(tun->rt, ret) : (ret - XOR64_CHECKSUM_SIZE);
            
            if ( tun->rt ) {
               ret = rskcp_decode(tun->rt, tun->buf, ret, &tun->buf[data_len]);
               data_len = *((uint16_t*)tun->buf); // restore data_len
            } else {
               ret = xor64_checksum_check(data, data_len, &tun->buf[data_len]);
            }

            if ( ret ) {
               if ( tun->conf->crypto ) {
                  data_len = rc4_decrypt((const char*)data, data_len,
                                         (char*)tun->buf, MKCP_BUF_SIZE,
                                         tun->ukey, (tun->ti>>20));
                  if (data_len < 0) {
                     return;
                  }
                  data = tun->buf;
               }

               if (data_len >= MKCP_OVERHEAD) {
                  ikcp_input(tun->kcpout, (const char*)data, data_len);
               }
            }
         }

         break;
      }

      case CHANN_EVENT_DISCONNECT:  {
         cout << "local udp disconnect !" << endl;
         break;
      }

      default: {
         break;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl (%rdi), %eax
cmpl $0x5, %eax
je 0x7d0d
cmpl $0x1, %eax
jne 0x7da5
movq 0x18(%rdi), %r12
movq 0x8(%rdi), %rdi
leaq 0x98(%r12), %rbx
movq %rbx, %rsi
movl $0x10000, %edx          # imm = 0x10000
callq 0x48a0
cmpl $0x19, %eax
jl 0x7da5
movl %eax, %r14d
movq 0x90(%r12), %rdi
xorl %eax, %eax
testq %rdi, %rdi
setne %al
leaq (%rbx,%rax,2), %r15
je 0x7d30
movl %r14d, %esi
callq 0x807a
movq 0x90(%r12), %rdi
testq %rdi, %rdi
je 0x7d36
movslq %eax, %rcx
addq %rbx, %rcx
movq %rbx, %rsi
movl %r14d, %edx
callq 0x8161
movzwl (%rbx), %r14d
jmp 0x7d48
movq 0x72bc(%rip), %rdi      # 0xefd0
leaq 0x3346(%rip), %rsi      # 0xb061
callq 0x2270
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2150
addl $-0x8, %r14d
jmp 0x7d39
movl %eax, %r14d
movslq %r14d, %rsi
leaq (%rbx,%rsi), %rdx
movq %r15, %rdi
callq 0x575a
testl %eax, %eax
je 0x7da5
movq 0x78(%r12), %rax
cmpl $0x0, 0x148(%rax)
je 0x7d84
movq 0x60(%r12), %r8
movq 0x68(%r12), %r9
shrq $0x14, %r9
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
movl $0x10000, %ecx          # imm = 0x10000
callq 0x5581
movl %eax, %r14d
testl %eax, %eax
jns 0x7d87
jmp 0x7da5
movq %r15, %rbx
cmpl $0x18, %r14d
jl 0x7da5
movq 0x48(%r12), %rdi
movl %r14d, %edx
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2f59
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/kcp_local.cpp
// Function: local_kcpout_callback(char const*, int, IKCPCB*, void*)
int
_local_kcpout_callback(const char *buf, int len, ikcpcb *kcp, void *user) {
   tun_local_t *tun = (tun_local_t*)user;
   chann_t *udpout = tun->udpout[tun->udpout_idx];
   tun->udpout_idx = (tun->udpout_idx + 1) % tun->conf->src_count;

   if (tun && mnet_chann_state(udpout) >= CHANN_STATE_CONNECTED) {
      const int rs_offset = tun->rt ? sizeof(uint16_t) : 0;
      int data_len = len;
      uint8_t *data = tun->buf + rs_offset;

      if ( tun->conf->crypto ) {
         data_len = rc4_encrypt(buf, len,
                                (char*)data, MKCP_BUF_SIZE - XOR64_CHECKSUM_SIZE,
                                tun->ukey, (tun->ti>>20));
      } else {
         memcpy(data, buf, len);
      }

      int ret = 0;
      
      if ( tun->rt ) {
         int plen = 0;
         *((uint16_t*)tun->buf) = data_len;
         int raw_len = rskcp_enc_info(tun->rt, (data_len + rs_offset), &plen);
         ret = rskcp_encode(tun->rt, tun->buf, (data_len + rs_offset), &tun->buf[raw_len]);
         data_len = raw_len + plen;
      } else {
         ret = xor64_checksum_gen((uint8_t*)data, data_len, &tun->buf[data_len]);
         data_len += XOR64_CHECKSUM_SIZE;
      }

      if (ret && data_len>0) {
         ret = mnet_chann_send(udpout, tun->buf, data_len);
         if (ret == data_len) {
            return len;
         }
      }
   }
   return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movl %esi, %ebx
movq %rdi, %r14
movslq (%rcx), %rax
movq 0x8(%rcx,%rax,8), %r12
incl %eax
movq 0x78(%rcx), %rcx
cltd
idivl (%rcx)
movl %edx, (%r15)
movq %r12, %rdi
callq 0x4306
cmpl $0x3, %eax
jl 0x7ed4
movq %r12, -0x40(%rbp)
xorl %r13d, %r13d
cmpq $0x0, 0x90(%r15)
setne %r13b
addl %r13d, %r13d
leaq (%r15,%r13), %rcx
addq $0x98, %rcx
movq 0x78(%r15), %rax
cmpl $0x0, 0x148(%rax)
movq %rcx, -0x38(%rbp)
je 0x7e41
movq 0x60(%r15), %r8
movq 0x68(%r15), %r9
shrq $0x14, %r9
movq %r14, %rdi
movl %ebx, %esi
movq %rcx, %rdx
movl $0xfff8, %ecx           # imm = 0xFFF8
callq 0x5328
movl %eax, %r12d
jmp 0x7e52
movslq %ebx, %rdx
movq %rcx, %rdi
movq %r14, %rsi
callq 0x2220
movl %ebx, %r12d
leaq 0x98(%r15), %r14
movq 0x90(%r15), %rdi
testq %rdi, %rdi
je 0x7ea1
leaq -0x2c(%rbp), %rdx
andl $0x0, (%rdx)
movw %r12w, 0x98(%r15)
addl %r12d, %r13d
movl %r13d, %esi
callq 0x8043
movq 0x90(%r15), %rdi
movslq %eax, %r12
leaq (%r14,%r12), %rcx
movq %r14, %rsi
movl %r13d, %edx
callq 0x80a4
leaq -0x2c(%rbp), %rcx
addl (%rcx), %r12d
jmp 0x7eb7
movslq %r12d, %rdx
addq %r14, %rdx
movq -0x38(%rbp), %rdi
movl %r12d, %esi
callq 0x56d8
addl $0x8, %r12d
testl %eax, %eax
je 0x7ed4
testl %r12d, %r12d
jle 0x7ed4
movq -0x40(%rbp), %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x49cb
cmpl %r12d, %eax
je 0x7ed6
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/session_mgnt.cpp
// Function: session_create(s_skt*, unsigned int, s_mchann*, void*)
session_unit_t*
session_create(skt_t *lst, unsigned sid, chann_t *tcp, void *opaque) {
   if (lst && tcp) {
      session_unit_t *u = (session_unit_t*)malloc(sizeof(*u));
      if (u) {
         u->sid = sid;
         u->tcp = tcp;
         u->opaque = opaque;
         u->connected = 0;
         if ( skt_insert(lst, sid, u) ) {
            return u;
         }
         free(u); // fail to insert
      }
   }
   return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
jne 0x7f4c
movq %rdx, %r13
movl %esi, %r15d
movq %rdi, %r14
pushq $0x20
popq %rdi
callq 0x2340
testq %rax, %rax
je 0x7f4c
movq %rax, %rbx
movl %r15d, (%rax)
movq %r13, 0x8(%rax)
movq %r12, 0x18(%rax)
andl $0x0, 0x10(%rax)
movl %r15d, %esi
movq %r14, %rdi
movq %rax, %rdx
callq 0x668c
testq %rax, %rax
jne 0x7f4e
movq %rbx, %rdi
callq 0x2300
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/session_mgnt.cpp
// Function: session_destroy(s_skt*, session_unit_t*)
void
session_destroy(skt_t *lst, session_unit_t *u) {
   if (lst && u) {
      skt_remove(lst, u->sid);
   }
   if ( u ) {
      memset(u, 0, sizeof(*u));
      free(u);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x7fa3
movl (%rbx), %esi
callq 0x67bc
jmp 0x7fa8
testq %rbx, %rbx
je 0x7fb6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2300
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/rs_kcp.cpp
// Function: rskcp_create(int, int)
rskcp_t*
rskcp_create(int data_bytes, int parity_bytes) {
   if ( cm256_init() ) {
      return (rskcp_t*)0;
   }

   rskcp_t *rt = (rskcp_t*)mm_malloc(sizeof(rskcp_t));
   if (rt) {
      cm256_encoder_params p = { data_bytes, parity_bytes, 1 };
      rt->param = p;
      for (int i=0; i<(data_bytes + parity_bytes); i++) {
         rt->blocks[i].Index = i;
      }
   }
   return rt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %r14d
pushq $0x2
popq %rdi
callq 0x8220
testl %eax, %eax
je 0x7fdf
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x311a(%rip), %rsi      # 0xb100
pushq $0x1d
popq %rdx
movl $0x1010, %edi           # imm = 0x1010
callq 0x57cc
xorl %ecx, %ecx
testq %rax, %rax
je 0x7fd8
movl %r14d, (%rax)
movl %ebx, 0x4(%rax)
movl $0x1, 0x8(%rax)
addl %r14d, %ebx
testl %ebx, %ebx
cmovlel %ecx, %ebx
movq %rax, %rdx
addq $0x18, %rdx
cmpq %rcx, %rbx
je 0x7fda
movb %cl, (%rdx)
incq %rcx
addq $0x10, %rdx
jmp 0x8016
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/rs_kcp.cpp
// Function: rskcp_enc_info(s_rskcp*, int, int*)
int
rskcp_enc_info(rskcp_t *rt, int raw_len, int *parity_len) {
   if (!rt || raw_len<=0 || !parity_len) {
      return 0;
   }

   cm256_encoder_params *p = &rt->param;
   int di=0, pi=0;
   do {
      di += p->OriginalCount;
      pi += p->RecoveryCount;
   } while (di < raw_len);

   *parity_len = pi;
   return di;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
sete %al
testl %esi, %esi
setle %cl
testq %rdx, %rdx
sete %r8b
orb %al, %r8b
xorl %eax, %eax
orb %cl, %r8b
jne 0x8078
movl (%rdi), %ecx
movl 0x4(%rdi), %r8d
xorl %edi, %edi
xorl %eax, %eax
addl %r8d, %edi
addl %ecx, %eax
cmpl %esi, %eax
jl 0x806d
movl %edi, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/rs_kcp.cpp
// Function: rskcp_dec_info(s_rskcp*, int)
int
rskcp_dec_info(rskcp_t *rt, int data_len) {
   if (!rt || data_len<=0) {
      return 0;
   }

   cm256_encoder_params *p = &rt->param;
   int di=0, pi=0;
   do {
      di += p->OriginalCount;
      pi += p->RecoveryCount;
   } while (data_len < di + pi);

   return di;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
sete %cl
testl %esi, %esi
setle %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x80a2
movl (%rdi), %ecx
movl 0x4(%rdi), %edx
addl %ecx, %edx
xorl %edi, %edi
xorl %eax, %eax
addl %edx, %edi
addl %ecx, %eax
cmpl %esi, %edi
jg 0x809a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/rs_kcp.cpp
// Function: rskcp_encode(s_rskcp*, unsigned char*, int, unsigned char*)
int
rskcp_encode(rskcp_t *rt, unsigned char *raw, int raw_len, unsigned char *parity) {
   if (!rt || !raw_len || raw_len<=0 || !parity) {
      return 0;
   }

   cm256_encoder_params *p = &rt->param;
   cm256_block *blocks = rt->blocks;
   int ri=0, pi=0, ret=0;
   
   do {
      _rskcp_fill_blocks(blocks, &raw[ri], p->OriginalCount);

      ret = cm256_encode(*p, blocks, &parity[pi]);
      if ( !ret ) {
         ri += p->OriginalCount;
         pi += p->RecoveryCount;
      }
   } while (!ret && raw_len<ri);

   return !ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rsi, -0x38(%rbp)
testq %rdi, %rdi
sete %al
movl %edx, -0x2c(%rbp)
testl %edx, %edx
setle %dl
testq %rcx, %rcx
sete %sil
orb %al, %sil
xorl %ecx, %ecx
orb %dl, %sil
jne 0x812d
movq %rdi, %r12
leaq 0x10(%rdi), %r13
movl (%rdi), %edx
xorl %r15d, %r15d
xorl %r14d, %r14d
movslq %r14d, %rsi
addq -0x38(%rbp), %rsi
movq %r13, %rdi
callq 0x813e
movq (%r12), %rdi
movl 0x8(%r12), %esi
movslq %r15d, %rcx
addq %rbx, %rcx
movq %r13, %rdx
callq 0x834f
testl %eax, %eax
jne 0x8126
movl (%r12), %edx
addl %edx, %r14d
addl 0x4(%r12), %r15d
cmpl -0x2c(%rbp), %r14d
jg 0x80ea
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/src/rs_kcp.cpp
// Function: rskcp_decode(s_rskcp*, unsigned char*, int, unsigned char*)
int
rskcp_decode(rskcp_t *rt, unsigned char *data, int data_len, unsigned char *parity) {
   if (!rt || !data || data_len<=0 || !parity) {
      return 0;
   }

   cm256_encoder_params *p = &rt->param;
   cm256_block *blocks = rt->blocks;
   int di=0, pi=0, ret=0;
   
   do {
      _rskcp_fill_blocks(blocks, &data[di], p->OriginalCount);
      _rskcp_fill_blocks(blocks + p->OriginalCount, &parity[pi], p->RecoveryCount);
      
      ret = cm256_decode(*p, blocks);
      if ( !ret ) {
         di += p->OriginalCount;
         pi += p->RecoveryCount;
      }
   } while (!ret && data_len<di+pi);
   
   return !ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r12
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %dil
orb %al, %dil
movl %edx, -0x2c(%rbp)
testl %edx, %edx
setle %al
movq %rcx, -0x38(%rbp)
testq %rcx, %rcx
sete %sil
xorl %ecx, %ecx
orb %al, %sil
orb %dil, %sil
jne 0x820d
leaq 0x10(%r12), %r13
movl (%r12), %edx
xorl %r14d, %r14d
xorl %ebx, %ebx
movslq %ebx, %rsi
addq %r15, %rsi
movq %r13, %rdi
callq 0x813e
movslq (%r12), %rdi
shlq $0x4, %rdi
addq %r13, %rdi
movslq %r14d, %rsi
addq -0x38(%rbp), %rsi
movl 0x4(%r12), %edx
callq 0x813e
movq (%r12), %rdi
movl 0x8(%r12), %esi
movq %r13, %rdx
callq 0x8b27
testl %eax, %eax
jne 0x8206
movl (%r12), %edx
addl %edx, %ebx
addl 0x4(%r12), %r14d
leal (%r14,%rbx), %ecx
cmpl -0x2c(%rbp), %ecx
jg 0x81b3
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/cm256/cm256.cpp
// Function: cm256_encode
int cm256_encode(
    cm256_encoder_params params, // Encoder params
    cm256_block* originals,      // Array of pointers to original blocks
    void* recoveryBlocks)        // Output recovery blocks end-to-end
{
    // Validate input:
    if (params.OriginalCount <= 0 ||
        params.RecoveryCount <= 0 ||
        params.BlockBytes <= 0)
    {
        return -1;
    }
    if (params.OriginalCount + params.RecoveryCount > 256)
    {
        return -2;
    }
    if (!originals || !recoveryBlocks)
    {
        return -3;
    }

    uint8_t* recoveryBlock = static_cast<uint8_t*>(recoveryBlocks);

    for (int block = 0; block < params.RecoveryCount; ++block, recoveryBlock += params.BlockBytes)
    {
        cm256_encode_block(params, originals, (params.OriginalCount + block), recoveryBlock);
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, -0x38(%rbp)
movq %rdi, %r14
movq %rdi, %r12
shrq $0x20, %r12
testl %r14d, %r14d
setle %al
testl %r12d, %r12d
setle %cl
movl %esi, -0x2c(%rbp)
testl %esi, %esi
setle %dl
orb %al, %dl
orb %cl, %dl
je 0x838f
pushq $-0x1
jmp 0x83dc
leal (%r12,%r14), %eax
cmpl $0x100, %eax            # imm = 0x100
jbe 0x839e
pushq $-0x2
jmp 0x83dc
cmpq $0x0, -0x38(%rbp)
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x83da
movl -0x2c(%rbp), %r15d
movl %r14d, %r13d
subl $0x1, %r12d
jb 0x83ec
movq %r14, %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl %r13d, %ecx
movq %rbx, %r8
callq 0x823b
addq %r15, %rbx
incl %r13d
jmp 0x83b7
pushq $-0x3
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x83dd
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/cm256/cm256.cpp
// Function: CM256Decoder::Initialize(cm256_encoder_params_t&, cm256_block_t*)
bool CM256Decoder::Initialize(cm256_encoder_params& params, cm256_block* blocks)
{
    Params = params;

    cm256_block* block = blocks;
    OriginalCount = 0;
    RecoveryCount = 0;

    // Initialize erasures to zeros
    for (int ii = 0; ii < params.OriginalCount; ++ii)
    {
        ErasuresIndices[ii] = 0;
    }

    // For each input block,
    for (int ii = 0; ii < params.OriginalCount; ++ii, ++block)
    {
        int row = block->Index;

        // If it is an original block,
        if (row < params.OriginalCount)
        {
            Original[OriginalCount++] = block;

            if (ErasuresIndices[row] != 0)
            {
                // Error out if two row indices repeat
                return false;
            }

            ErasuresIndices[row] = 1;
        }
        else
        {
            Recovery[RecoveryCount++] = block;
        }
    }

    // Identify erasures
    for (int ii = 0, indexCount = 0; ii < 256; ++ii)
    {
        if (!ErasuresIndices[ii])
        {
            ErasuresIndices[indexCount] = static_cast<uint8_t>( ii );

            if (++indexCount >= RecoveryCount)
            {
                break;
            }
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
movq (%rsi), %rax
movq %rax, (%rdi)
andl $0x0, 0x1018(%rdi)
andl $0x0, 0x810(%rdi)
xorl %ecx, %ecx
movslq (%rsi), %rax
cmpq %rax, %rcx
jge 0x8425
movb $0x0, 0x101c(%rdi,%rcx)
incq %rcx
jmp 0x8410
xorl %r9d, %r9d
xorl %r8d, %r8d
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x8489
movzbl 0x8(%rdx), %r11d
cmpl %r11d, %eax
jle 0x8469
leal 0x1(%r9), %r10d
movl %r10d, 0x1018(%rdi)
movslq %r9d, %r9
movq %rdx, 0x818(%rdi,%r9,8)
cmpb $0x0, 0x101c(%rdi,%r11)
jne 0x84b9
movb $0x1, 0x101c(%rdi,%r11)
movl (%rsi), %eax
jmp 0x847e
movslq %r8d, %r10
incl %r8d
movl %r8d, 0x810(%rdi)
movq %rdx, 0x10(%rdi,%r10,8)
movl %r9d, %r10d
incl %ecx
addq $0x10, %rdx
movl %r10d, %r9d
jmp 0x842d
xorl %edx, %edx
xorl %esi, %esi
cmpq $0x100, %rdx            # imm = 0x100
je 0x84b9
cmpb $0x0, 0x101c(%rdi,%rdx)
jne 0x84b4
movslq %esi, %rsi
movb %dl, 0x101c(%rdi,%rsi)
incl %esi
cmpl 0x810(%rdi), %esi
jge 0x84b9
incq %rdx
jmp 0x848d
cmpl %eax, %ecx
setge %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/cm256/cm256.cpp
// Function: CM256Decoder::DecodeM1()
void CM256Decoder::DecodeM1()
{
    // XOR all other blocks into the recovery block
    uint8_t* outBlock = static_cast<uint8_t*>(Recovery[0]->Block);
    const uint8_t* inBlock = 0;

    // For each block,
    for (int ii = 0; ii < OriginalCount; ++ii)
    {
        const uint8_t* inBlock2 = static_cast<const uint8_t*>(Original[ii]->Block);

        if (!inBlock)
        {
            inBlock = inBlock2;
        }
        else
        {
            // outBlock ^= inBlock ^ inBlock2
            gf256_add2_mem(outBlock, inBlock, inBlock2, Params.BlockBytes);
            inBlock = 0;
        }
    }

    // Complete XORs
    if (inBlock)
    {
        gf256_add_mem(outBlock, inBlock, Params.BlockBytes);
    }

    // Recover the index it corresponds to
    Recovery[0]->Index = ErasuresIndices[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq (%rax), %r14
xorl %r15d, %r15d
xorl %esi, %esi
movslq 0x1018(%rbx), %rax
cmpq %rax, %r15
jge 0x850a
movq 0x818(%rbx,%r15,8), %rax
movq (%rax), %rdx
testq %rsi, %rsi
je 0x8502
movl 0x8(%rbx), %ecx
movq %r14, %rdi
callq 0x91c3
xorl %edx, %edx
incq %r15
movq %rdx, %rsi
jmp 0x84d9
testq %rsi, %rsi
je 0x851a
movl 0x8(%rbx), %edx
movq %r14, %rdi
callq 0x90ec
movb 0x101c(%rbx), %al
movq 0x10(%rbx), %rcx
movb %al, 0x8(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/xocoder[P]m_kcptun/vendor/cm256/cm256.cpp
// Function: cm256_decode
int cm256_decode(
    cm256_encoder_params params, // Encoder params
    cm256_block* blocks)         // Array of 'originalCount' blocks as described above
{
    if (params.OriginalCount <= 0 ||
        params.RecoveryCount <= 0 ||
        params.BlockBytes <= 0)
    {
        return -1;
    }
    if (params.OriginalCount + params.RecoveryCount > 256)
    {
        return -2;
    }
    if (!blocks)
    {
        return -3;
    }

    // If there is only one block,
    if (params.OriginalCount == 1)
    {
        // It is the same block repeated
        blocks[0].Index = 0;
        return 0;
    }

    CM256Decoder state;
    if (!state.Initialize(params, blocks))
    {
        return -5;
    }

    // If nothing is erased,
    if (state.RecoveryCount <= 0)
    {
        return 0;
    }

    // If m=1,
    if (params.RecoveryCount == 1)
    {
        state.DecodeM1();
        return 0;
    }

    // Decode for m>1
    state.Decode();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x1130, %rsp           # imm = 0x1130
movq %rdi, -0x20(%rbp)
movl %esi, -0x18(%rbp)
testl %edi, %edi
setle %al
movq %rdi, %r14
shrq $0x20, %r14
testl %r14d, %r14d
setle %cl
testl %esi, %esi
setle %sil
orb %al, %sil
orb %cl, %sil
je 0x8b60
pushq $-0x1
jmp 0x8bba
leal (%r14,%rdi), %eax
cmpl $0x100, %eax            # imm = 0x100
jbe 0x8b6f
pushq $-0x2
jmp 0x8bba
testq %rdx, %rdx
je 0x8b81
cmpl $0x1, %edi
jne 0x8b85
movb $0x0, 0x8(%rdx)
xorl %ebx, %ebx
jmp 0x8bbb
pushq $-0x3
jmp 0x8bba
leaq -0x1140(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x83f0
testb %al, %al
je 0x8bb8
xorl %ebx, %ebx
cmpl $0x0, -0x930(%rbp)
jle 0x8bbb
leaq -0x1140(%rbp), %rdi
cmpl $0x1, %r14d
jne 0x8bc9
callq 0x84c0
jmp 0x8bbb
pushq $-0x5
popq %rbx
movl %ebx, %eax
addq $0x1130, %rsp           # imm = 0x1130
popq %rbx
popq %r14
popq %rbp
retq
callq 0x88fe
jmp 0x8bbb
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int init(const std::string& version) {
  std::cout << "ninjat server - v" << version;
#ifdef WIN32
  WSADATA WSAData;
  std::cout << " (Win32)" << std::endl;
  return WSAStartup(MAKEWORD(2,2), &WSAData);
#else
  std::cout << " (GNU/Linux)" << std::endl;
  return 0;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x5ace(%rip), %r14      # 0x7fd8
leaq 0x2af3(%rip), %rsi      # 0x5004
movq %r14, %rdi
callq 0x21f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21d0
leaq 0x2aeb(%rip), %rsi      # 0x5016
movq %r14, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x2120
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: die(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void die(const std::string& err) {
  std::cout << "[FATAL ERROR] : " << err << std::endl;
#ifdef WIN32
  WSACleanup();
#endif
  std::exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x5a88(%rip), %rdi      # 0x7fd8
leaq 0x2acc(%rip), %rsi      # 0x5023
callq 0x21f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21d0
movq %rax, %rdi
callq 0x2120
pushq $0x1
popq %rdi
callq 0x2250
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: fileRead(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::string fileRead(const std::string& path) {
  std::ifstream infile(path, std::ios::in);
  std::string out("");
  char chr;
  if(infile){while(infile.get(chr)){out += chr;}return out;}else {return "";}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2300
leaq 0x2ab0(%rip), %rsi      # 0x50a2
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x40c8
movq 0x30(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x50(%rsp,%rax)
je 0x2627
leaq 0x2a8a(%rip), %rsi      # 0x50a2
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x40c8
jmp 0x26a0
leaq 0x30(%rsp), %r14
leaq 0xe(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2290
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x265e
movsbl 0xe(%rsp), %esi
movq %r12, %rdi
callq 0x21b0
jmp 0x2636
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x2681
movq %rdx, (%rbx)
movq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x2687
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
callq 0x2070
movq %rbx, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x26cd
movq %rax, %rbx
jmp 0x26da
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2100
leaq 0x30(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: s(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, bool)
bool s(std::string toSend, int sock, bool format = true) {
  if(sock <= 0)
    return false;
  if(format)
    toSend = "\t\t\t\t\t\t" + toSend;

  int error = send(sock,toSend.c_str(),toSend.size(),0);
  return !(error == SOCKET_ERROR);
}

// Assembly:
testl %esi, %esi
jle 0x286a
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movq %rdi, %r14
testb %dl, %dl
je 0x284a
leaq 0x2873(%rip), %rsi      # 0x509c
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x4151
movq %r14, %rdi
movq %r15, %rsi
callq 0x2260
movq %r15, %rdi
callq 0x2100
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x2130
cmpl $-0x1, %eax
setne %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: buildList(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
std::string buildList(std::vector<std::string>& nicks) {
  std::string list = std::to_string(nicks.size()) + " users :";
  for(unsigned int i = 0; i < nicks.size(); i++)
    list += " " + (nicks[i].length() ? nicks[i] : "<no_nickname_yet>");
  return list;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
subq (%r14), %rsi
sarq $0x5, %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x41e6
leaq 0x2719(%rip), %rdx      # 0x5053
movq %rbx, %rdi
movq %r15, %rsi
callq 0x41c7
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x2100
xorl %ebp, %ebp
leaq 0x28(%rsp), %r13
movl %ebp, %ebp
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rbp, %rax
jbe 0x29d4
movq %rbp, %rax
shlq $0x5, %rax
movq 0x8(%rsi,%rax), %r12
testq %r12, %r12
je 0x298c
addq %rax, %rsi
movq %r13, %rdi
callq 0x2280
jmp 0x29a0
movq %r13, %rdi
leaq 0x26c6(%rip), %rsi      # 0x505c
leaq 0x7(%rsp), %rdx
callq 0x40c8
movq %r15, %rdi
leaq 0x26a7(%rip), %rsi      # 0x5051
movq %r13, %rdx
callq 0x4228
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23a0
movq %r15, %rdi
callq 0x2100
movq %r13, %rdi
callq 0x2100
testq %r12, %r12
incl %ebp
jmp 0x2959
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
jmp 0x2a19
jmp 0x29f2
movq %rax, %r14
jmp 0x2a16
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x2100
jmp 0x2a09
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x2100
testq %r12, %r12
movq %rbx, %rdi
callq 0x2100
movq %r14, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: setNick(int, std::vector<int, std::allocator<int>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool setNick(int csock, std::vector<int>& clients, std::vector<std::string>& nicks, std::string nick) {
  for(unsigned int i = 0; i < clients.size(); i++) {
    if(clients[i] == csock) {
      nicks[i] = nick;
      return true;
    }
  }
  return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rsi), %rax
movq 0x8(%rsi), %rbx
subq %rax, %rbx
sarq $0x2, %rbx
xorl %esi, %esi
movl %esi, %r14d
cmpq %r14, %rbx
jbe 0x2a5e
leal 0x1(%r14), %esi
cmpl %edi, (%rax,%r14,4)
jne 0x2a3a
movq %r14, %rdi
shlq $0x5, %rdi
addq (%rdx), %rdi
movq %rcx, %rsi
callq 0x2150
cmpq %r14, %rbx
seta %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: getIndex(int, std::vector<int, std::allocator<int>>&)
int getIndex(int csock, std::vector<int>& clients) {
  for (std::size_t i = 0; i < clients.size(); i++) {
    if(clients[i] == csock) {
      return i;
    }
  }
  return -1;
}

// Assembly:
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
xorl %esi, %esi
pushq $-0x1
popq %rax
cmpq %rsi, %rdx
je 0x2a90
cmpl %edi, (%rcx,%rsi,4)
je 0x2a8e
incq %rsi
jmp 0x2a7f
movl %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: getIndexByNick(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
int getIndexByNick(std::string nick, std::vector<std::string>& nicks) {
  for (std::size_t i = 0; i < nicks.size(); i++) {
    if(nicks[i] == nick) {
      return i;
    }
  }
  return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r12d, %r12d
pushq $-0x1
popq %rbx
xorl %r13d, %r13d
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq %rax, %r13
jae 0x2ad7
addq %r12, %rdi
movq %r15, %rsi
callq 0x424c
testb %al, %al
jne 0x2ad4
incq %r13
addq $0x20, %r12
jmp 0x2aa9
movl %r13d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/mortrevere[P]ninjat/main.cpp
// Function: clientCleanup(int, std::vector<int, std::allocator<int>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool)
void clientCleanup(int csock, std::vector<int>& clients, std::vector<std::string>& nicks, bool notifyEveryone = true) {
  std::string nick = nicks[getIndex(csock, clients)];
  nicks.erase(nicks.begin() + getIndex(csock, clients));
  clients.erase(clients.begin() + getIndex(csock, clients));
  closesocket(csock);
  if(notifyEveryone && nick != "") {
    sAll(" *** [QUIT] : " + nick + "\n", clients);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movl %edi, %r14d
callq 0x2a6c
movslq %eax, %rsi
shlq $0x5, %rsi
addq (%r15), %rsi
movq %rsp, %rdi
callq 0x2280
movq (%r15), %r12
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2a6c
movslq %eax, %rsi
shlq $0x5, %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x4276
movq (%rbx), %r15
movl %r14d, %edi
movq %rbx, %rsi
callq 0x2a6c
cltq
leaq (%r15,%rax,4), %rsi
movq %rbx, %rdi
callq 0x427c
movl %r14d, %edi
callq 0x23b0
testb %bpl, %bpl
je 0x2bb8
leaq 0x2541(%rip), %rsi      # 0x50a2
movq %rsp, %rdi
callq 0x42b5
testb %al, %al
je 0x2bb8
leaq 0x24fa(%rip), %rsi      # 0x506e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x4151
leaq 0x27f8(%rip), %rdx      # 0x5380
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x41c7
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
callq 0x286d
leaq 0x40(%rsp), %rdi
callq 0x2100
leaq 0x20(%rsp), %rdi
callq 0x2100
movq %rsp, %rdi
callq 0x2100
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2100
jmp 0x2bdf
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2100
jmp 0x2bf4
jmp 0x2bf1
jmp 0x2bf1
jmp 0x2bf1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/examples/user-types-ex01.cxx
// Function: main
int main() {
    my_type mv1 = { {2, 4, 6}, {1, 3, 5} },
            mv2;
    std::string json;
        cxon::to_bytes(json, mv1);
        cxon::from_bytes(mv2, json);
    // json == "{ \"even\": [2, 4, 6], \"odd\": [1, 3, 5] }"
    assert(mv1 == mv2);
}

// Assembly:
pushq %rbx
subq $0xb0, %rsp
movabsq $0x400000002, %rax      # imm = 0x400000002
leaq 0x60(%rsp), %rsi
movq %rax, (%rsi)
movl $0x6, 0x8(%rsi)
leaq 0x30(%rsp), %rdi
pushq $0x3
popq %rdx
leaq 0x98(%rsp), %rcx
callq 0x2428
leaq 0x48(%rsp), %rdi
movabsq $0x300000001, %rax      # imm = 0x300000001
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movl $0x5, 0x8(%rsi)
pushq $0x3
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x245e
xorps %xmm0, %xmm0
leaq 0x78(%rsp), %rax
movaps %xmm0, -0x18(%rax)
andq $0x0, -0x8(%rax)
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x98(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x276d
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x2e27
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2496
testb %al, %al
je 0x2395
leaq 0x10(%rsp), %rdi
callq 0x20b0
leaq 0x60(%rsp), %rdi
callq 0x24d6
leaq 0x30(%rsp), %rdi
callq 0x24d6
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbx
retq
leaq 0x1c8c(%rip), %rdi      # 0x4028
leaq 0x1c90(%rip), %rsi      # 0x4033
leaq 0x1c9d(%rip), %rcx      # 0x4047
pushq $0x1e
popq %rdx
callq 0x2100
jmp 0x23b4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20b0
leaq 0x60(%rsp), %rdi
callq 0x24d6
leaq 0x30(%rsp), %rdi
callq 0x24d6
jmp 0x23e9
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x25c2
jmp 0x23e9
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2180
// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/examples/../src/cxon/lang/common/cio/class.hxx
// Function: bool cxon::cio::cls::imp::imp::write_<cxon::JSON<cxon::cio::key::simple_traits<cxon::json::format_traits>>, 0ul, 2ul>::field<my_type, std::tuple<cxon::cio::cls::field<std::vector<int, std::allocator<int>> my_type::*>, cxon::cio::cls::field<std::__cxx11::list<int, std::allocator<int>> my_type::*>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, cxon::context<cxon::JSON<cxon::json::format_traits>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, my_type const&, std::tuple<cxon::cio::cls::field<std::vector<int, std::allocator<int>> my_type::*>, cxon::cio::cls::field<std::__cxx11::list<int, std::allocator<int>> my_type::*>> const&, cxon::context<cxon::JSON<cxon::json::format_traits>>&)
static bool field(O& o, const T& t, const Fs& fs, Cx& cx) {
                            using E = typename std::tuple_element<N, Fs>::type;
                            CXON_IF_CONSTEXPR (!val::is_sink<typename E::type>::value)
                                if (!std::get<N>(fs).isdf(t))
                                    return  write_field_<X>(o, t, std::get<N>(fs), cx) &&
                                            write_next_<X, N + 1, L>::field(o, t, fs, cx)
                                    ;
                            return          write_<X, N + 1, L>::field(o, t, fs, cx);
                        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
addq $0x18, %rdx
callq 0x2997
testb %al, %al
je 0x2989
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x29e6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq