// File: mortrevere[P]ninjat/main.cpp
// Function: main
int main() {
  int error = init("0.0.2"); //will be used to handle all networking errors
  int sock;
  int port = PORT;
  struct sockaddr_in sin;
  sin.sin_addr.s_addr = INADDR_ANY;
  sin.sin_family = AF_INET;
  sin.sin_port = htons(port);
  std::string tmp, key, value;
  tmp = std::to_string(port);

  int csock;
  struct sockaddr_in csin;
  socklen_t tempo = sizeof(csin);

  std::vector<std::string> lines;
  std::ofstream fout;

  std::vector<std::thread> threads;
  std::vector<int> clients;
  std::vector<std::string> nicks;

  if(error != 0)
    die("Couldn't initialize network.");

  sock = socket(AF_INET, SOCK_STREAM, 0);
  if(sock == INVALID_SOCKET)
    die("Couldn't create socket.");
  else
    info("Main socket created.");

  //allows binding on FIN_WAIT1 hanging ports
  int reuse = 1;
  if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(int)) < 0)
    info("setsockopt(SO_REUSEADDR) failed");

  while(bind(sock, (sockaddr *)&sin, sizeof(sin)) != 0) {
    err("Can't listen to port " + std::to_string(port) + " ... check if the port is busy.");
    port++;
    info("Retrying on port " + std::to_string(port) + " ...");
    sin.sin_port = htons(port);
  }
  info("bind() successful on port " + std::to_string(port));

  listen(sock, 99);
  info("Listening on port " + std::to_string(port));

  while(1) {
    info("Waiting for peers ...");
    csock = accept(sock,(struct sockaddr*)&csin,&tempo);
    clients.push_back(csock);
    nicks.push_back("");
    threads.push_back(std::thread(clientCare,csock,std::ref(clients),std::ref(nicks)));
    sAll("Someone (#" + std::to_string(csock) + ") joined !\n", clients);

    s("/nick               : get a name and talk to people.\n", csock);
    s("/list               : list people on the chat\n", csock);
    s("/p <dest> <message> : pm someone based on nickname\n", csock);
    s("/p . <message>      : pm the last person you pm'd\n", csock);
    s("/quit               : well, you guessed it\n", csock);

    if(PRIVATE) {
      s("THIS SERVER IS PASSWORD-PROTECTED : use /auth <pw> to log in\n", csock);
    }
    info("NCC !");
  }

  for (auto& th : threads) th.join();
  info("End.");
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x770, %rsp            # imm = 0x770
movl $0x0, -0x4(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x6f0(%rbp)
callq 0x34b0
movq -0x6f0(%rbp), %rdx
leaq 0x61d2(%rip), %rsi      # 0xc322
leaq -0x28(%rbp), %rdi
callq 0x6ee0
jmp 0x615b
leaq -0x28(%rbp), %rdi
callq 0x3690
movl %eax, -0x6f4(%rbp)
jmp 0x616c
leaq -0x28(%rbp), %rdi
callq 0x31d0
leaq -0x29(%rbp), %rdi
callq 0x32f0
movl -0x6f4(%rbp), %eax
movl %eax, -0x8(%rbp)
movl $0x539, -0x44(%rbp)     # imm = 0x539
movl $0x0, -0x50(%rbp)
movw $0x2, -0x54(%rbp)
movzwl -0x44(%rbp), %edi
callq 0x3050
movw %ax, -0x52(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x33c0
leaq -0x98(%rbp), %rdi
callq 0x33c0
leaq -0xb8(%rbp), %rdi
callq 0x33c0
movl -0x44(%rbp), %esi
leaq -0xd8(%rbp), %rdi
callq 0x7830
jmp 0x61da
leaq -0x78(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
movq %rsi, -0x700(%rbp)
callq 0x3350
movq -0x700(%rbp), %rdi
callq 0x31d0
movl $0x10, -0xf0(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x7020
leaq -0x308(%rbp), %rdi
callq 0x3480
jmp 0x6221
leaq -0x320(%rbp), %rdi
callq 0x79d0
leaq -0x338(%rbp), %rdi
callq 0x79f0
leaq -0x350(%rbp), %rdi
callq 0x7020
cmpl $0x0, -0x8(%rbp)
je 0x6333
leaq -0x371(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0x34b0
movq -0x708(%rbp), %rdx
leaq 0x60b8(%rip), %rsi      # 0xc328
leaq -0x370(%rbp), %rdi
callq 0x6ee0
jmp 0x627e
leaq -0x370(%rbp), %rdi
callq 0x36f0
jmp 0x628c
leaq -0x370(%rbp), %rdi
callq 0x31d0
leaq -0x371(%rbp), %rdi
callq 0x32f0
jmp 0x6333
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x62cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x31d0
leaq -0x29(%rbp), %rdi
callq 0x32f0
jmp 0x6ecc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6eab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6e9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6322
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x370(%rbp), %rdi
callq 0x31d0
leaq -0x371(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x3090
movl %eax, -0x40(%rbp)
cmpl $-0x1, -0x40(%rbp)
jne 0x63e2
leaq -0x399(%rbp), %rdi
movq %rdi, -0x710(%rbp)
callq 0x34b0
movq -0x710(%rbp), %rdx
leaq 0x5fd3(%rip), %rsi      # 0xc345
leaq -0x398(%rbp), %rdi
callq 0x6ee0
jmp 0x6380
leaq -0x398(%rbp), %rdi
callq 0x36f0
jmp 0x638e
leaq -0x398(%rbp), %rdi
callq 0x31d0
leaq -0x399(%rbp), %rdi
callq 0x32f0
jmp 0x6470
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x63d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x31d0
leaq -0x399(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
leaq -0x3c1(%rbp), %rdi
movq %rdi, -0x718(%rbp)
callq 0x34b0
movq -0x718(%rbp), %rdx
leaq 0x5f5a(%rip), %rsi      # 0xc35d
leaq -0x3c0(%rbp), %rdi
callq 0x6ee0
jmp 0x6411
leaq -0x3c0(%rbp), %rdi
callq 0x3740
jmp 0x641f
leaq -0x3c0(%rbp), %rdi
callq 0x31d0
leaq -0x3c1(%rbp), %rdi
callq 0x32f0
jmp 0x6470
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x645f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x31d0
leaq -0x3c1(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movl $0x1, -0x3c8(%rbp)
movl -0x40(%rbp), %edi
movl $0x1, %esi
movl $0x2, %edx
leaq -0x3c8(%rbp), %rcx
movl $0x4, %r8d
callq 0x34c0
cmpl $0x0, %eax
jge 0x6530
leaq -0x3e9(%rbp), %rdi
movq %rdi, -0x720(%rbp)
callq 0x34b0
movq -0x720(%rbp), %rdx
leaq 0x5eaf(%rip), %rsi      # 0xc372
leaq -0x3e8(%rbp), %rdi
callq 0x6ee0
jmp 0x64d1
leaq -0x3e8(%rbp), %rdi
callq 0x3740
jmp 0x64df
leaq -0x3e8(%rbp), %rdi
callq 0x31d0
leaq -0x3e9(%rbp), %rdi
callq 0x32f0
jmp 0x6530
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x651f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0x31d0
leaq -0x3e9(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
jmp 0x6532
movl -0x40(%rbp), %edi
leaq -0x54(%rbp), %rsi
movl $0x10, %edx
callq 0x3070
cmpl $0x0, %eax
je 0x6711
movl -0x44(%rbp), %esi
leaq -0x450(%rbp), %rdi
callq 0x7830
jmp 0x655d
leaq 0x5e2e(%rip), %rsi      # 0xc392
leaq -0x430(%rbp), %rdi
leaq -0x450(%rbp), %rdx
callq 0x7340
jmp 0x6579
leaq 0x5e28(%rip), %rdx      # 0xc3a8
leaq -0x410(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x71f0
jmp 0x6595
leaq -0x410(%rbp), %rdi
callq 0x3780
jmp 0x65a3
leaq -0x410(%rbp), %rdi
callq 0x31d0
leaq -0x430(%rbp), %rdi
callq 0x31d0
leaq -0x450(%rbp), %rdi
callq 0x31d0
movl -0x44(%rbp), %eax
incl %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %esi
leaq -0x4b0(%rbp), %rdi
callq 0x7830
jmp 0x65e0
leaq 0x5de1(%rip), %rsi      # 0xc3c8
leaq -0x490(%rbp), %rdi
leaq -0x4b0(%rbp), %rdx
callq 0x7340
jmp 0x65fc
leaq 0x5ab0(%rip), %rdx      # 0xc0b3
leaq -0x470(%rbp), %rdi
leaq -0x490(%rbp), %rsi
callq 0x71f0
jmp 0x6618
leaq -0x470(%rbp), %rdi
callq 0x3740
jmp 0x6626
leaq -0x470(%rbp), %rdi
callq 0x31d0
leaq -0x490(%rbp), %rdi
callq 0x31d0
leaq -0x4b0(%rbp), %rdi
callq 0x31d0
movl -0x44(%rbp), %eax
movzwl %ax, %edi
callq 0x3050
movw %ax, -0x52(%rbp)
jmp 0x6532
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x66af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x66a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x31d0
leaq -0x430(%rbp), %rdi
callq 0x31d0
leaq -0x450(%rbp), %rdi
callq 0x31d0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6700
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x66f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x31d0
leaq -0x490(%rbp), %rdi
callq 0x31d0
leaq -0x4b0(%rbp), %rdi
callq 0x31d0
jmp 0x6e6f
movl -0x44(%rbp), %esi
leaq -0x4f0(%rbp), %rdi
callq 0x7830
jmp 0x6722
leaq 0x5cb1(%rip), %rsi      # 0xc3da
leaq -0x4d0(%rbp), %rdi
leaq -0x4f0(%rbp), %rdx
callq 0x7340
jmp 0x673e
leaq -0x4d0(%rbp), %rdi
callq 0x3740
jmp 0x674c
leaq -0x4d0(%rbp), %rdi
callq 0x31d0
leaq -0x4f0(%rbp), %rdi
callq 0x31d0
movl -0x40(%rbp), %edi
movl $0x63, %esi
callq 0x3320
movl -0x44(%rbp), %esi
leaq -0x530(%rbp), %rdi
callq 0x7830
jmp 0x6782
leaq 0x5c6c(%rip), %rsi      # 0xc3f5
leaq -0x510(%rbp), %rdi
leaq -0x530(%rbp), %rdx
callq 0x7340
jmp 0x679e
leaq -0x510(%rbp), %rdi
callq 0x3740
jmp 0x67ac
leaq -0x510(%rbp), %rdi
callq 0x31d0
leaq -0x530(%rbp), %rdi
callq 0x31d0
jmp 0x67c6
leaq -0x551(%rbp), %rdi
movq %rdi, -0x728(%rbp)
callq 0x34b0
movq -0x728(%rbp), %rdx
leaq 0x5c21(%rip), %rsi      # 0xc408
leaq -0x550(%rbp), %rdi
callq 0x6ee0
jmp 0x67f5
leaq -0x550(%rbp), %rdi
callq 0x3740
jmp 0x6803
leaq -0x550(%rbp), %rdi
callq 0x31d0
leaq -0x551(%rbp), %rdi
callq 0x32f0
movl -0x40(%rbp), %edi
leaq -0xec(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x30e0
movl %eax, -0x72c(%rbp)
jmp 0x6839
movl -0x72c(%rbp), %eax
movl %eax, -0xdc(%rbp)
leaq -0x338(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
callq 0x7a10
jmp 0x685a
leaq -0x579(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x34b0
movq -0x738(%rbp), %rdx
leaq 0x5827(%rip), %rsi      # 0xc0a2
leaq -0x578(%rbp), %rdi
callq 0x6ee0
jmp 0x6889
leaq -0x350(%rbp), %rdi
leaq -0x578(%rbp), %rsi
callq 0x7a80
jmp 0x689e
leaq -0x578(%rbp), %rdi
callq 0x31d0
leaq -0x579(%rbp), %rdi
callq 0x32f0
leaq -0x338(%rbp), %rdi
callq 0x7ae0
movq %rax, -0x590(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x7b10
movq %rax, -0x598(%rbp)
leaq -0x2573(%rip), %rsi     # 0x4370
leaq -0x588(%rbp), %rdi
leaq -0xdc(%rbp), %rdx
leaq -0x590(%rbp), %rcx
leaq -0x598(%rbp), %r8
callq 0x7b40
jmp 0x6906
leaq -0x320(%rbp), %rdi
leaq -0x588(%rbp), %rsi
callq 0x7ab0
jmp 0x691b
leaq -0x588(%rbp), %rdi
callq 0x7c10
movl -0xdc(%rbp), %esi
leaq -0x5f8(%rbp), %rdi
callq 0x7830
jmp 0x693b
leaq 0x5adc(%rip), %rsi      # 0xc41e
leaq -0x5d8(%rbp), %rdi
leaq -0x5f8(%rbp), %rdx
callq 0x7340
jmp 0x6957
leaq 0x5acb(%rip), %rdx      # 0xc429
leaq -0x5b8(%rbp), %rdi
leaq -0x5d8(%rbp), %rsi
callq 0x71f0
jmp 0x6973
leaq -0x5b8(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x3ca0
jmp 0x6988
leaq -0x5b8(%rbp), %rdi
callq 0x31d0
leaq -0x5d8(%rbp), %rdi
callq 0x31d0
leaq -0x5f8(%rbp), %rdi
callq 0x31d0
leaq -0x619(%rbp), %rdi
movq %rdi, -0x740(%rbp)
callq 0x34b0
movq -0x740(%rbp), %rdx
leaq 0x5a68(%rip), %rsi      # 0xc435
leaq -0x618(%rbp), %rdi
callq 0x6ee0
jmp 0x69db
movl -0xdc(%rbp), %esi
leaq -0x618(%rbp), %rdi
movl $0x1, %edx
callq 0x3c00
jmp 0x69f4
leaq -0x618(%rbp), %rdi
callq 0x31d0
leaq -0x619(%rbp), %rdi
callq 0x32f0
leaq -0x641(%rbp), %rdi
movq %rdi, -0x748(%rbp)
callq 0x34b0
movq -0x748(%rbp), %rdx
leaq 0x5a3e(%rip), %rsi      # 0xc46b
leaq -0x640(%rbp), %rdi
callq 0x6ee0
jmp 0x6a3b
movl -0xdc(%rbp), %esi
leaq -0x640(%rbp), %rdi
movl $0x1, %edx
callq 0x3c00
jmp 0x6a54
leaq -0x640(%rbp), %rdi
callq 0x31d0
leaq -0x641(%rbp), %rdi
callq 0x32f0
leaq -0x669(%rbp), %rdi
movq %rdi, -0x750(%rbp)
callq 0x34b0
movq -0x750(%rbp), %rdx
leaq 0x5a0d(%rip), %rsi      # 0xc49a
leaq -0x668(%rbp), %rdi
callq 0x6ee0
jmp 0x6a9b
movl -0xdc(%rbp), %esi
leaq -0x668(%rbp), %rdi
movl $0x1, %edx
callq 0x3c00
jmp 0x6ab4
leaq -0x668(%rbp), %rdi
callq 0x31d0
leaq -0x669(%rbp), %rdi
callq 0x32f0
leaq -0x691(%rbp), %rdi
movq %rdi, -0x758(%rbp)
callq 0x34b0
movq -0x758(%rbp), %rdx
leaq 0x59e1(%rip), %rsi      # 0xc4ce
leaq -0x690(%rbp), %rdi
callq 0x6ee0
jmp 0x6afb
movl -0xdc(%rbp), %esi
leaq -0x690(%rbp), %rdi
movl $0x1, %edx
callq 0x3c00
jmp 0x6b14
leaq -0x690(%rbp), %rdi
callq 0x31d0
leaq -0x691(%rbp), %rdi
callq 0x32f0
leaq -0x6b9(%rbp), %rdi
movq %rdi, -0x760(%rbp)
callq 0x34b0
movq -0x760(%rbp), %rdx
leaq 0x59b4(%rip), %rsi      # 0xc501
leaq -0x6b8(%rbp), %rdi
callq 0x6ee0
jmp 0x6b5b
movl -0xdc(%rbp), %esi
leaq -0x6b8(%rbp), %rdi
movl $0x1, %edx
callq 0x3c00
jmp 0x6b74
leaq -0x6b8(%rbp), %rdi
callq 0x31d0
leaq -0x6b9(%rbp), %rdi
callq 0x32f0
leaq -0x6e1(%rbp), %rdi
movq %rdi, -0x768(%rbp)
callq 0x34b0
movq -0x768(%rbp), %rdx
leaq 0x5980(%rip), %rsi      # 0xc52d
leaq -0x6e0(%rbp), %rdi
callq 0x6ee0
jmp 0x6bbb
leaq -0x6e0(%rbp), %rdi
callq 0x3740
jmp 0x6bc9
leaq -0x6e0(%rbp), %rdi
callq 0x31d0
leaq -0x6e1(%rbp), %rdi
callq 0x32f0
jmp 0x67c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6c0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x31d0
leaq -0x4f0(%rbp), %rdi
callq 0x31d0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6c43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x510(%rbp), %rdi
callq 0x31d0
leaq -0x530(%rbp), %rdi
callq 0x31d0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6c7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x550(%rbp), %rdi
callq 0x31d0
leaq -0x551(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6cb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x578(%rbp), %rdi
callq 0x31d0
leaq -0x579(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x7c10
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6d1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6d13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x5b8(%rbp), %rdi
callq 0x31d0
leaq -0x5d8(%rbp), %rdi
callq 0x31d0
leaq -0x5f8(%rbp), %rdi
callq 0x31d0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6d56
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x618(%rbp), %rdi
callq 0x31d0
leaq -0x619(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6d8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x640(%rbp), %rdi
callq 0x31d0
leaq -0x641(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6dc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x668(%rbp), %rdi
callq 0x31d0
leaq -0x669(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6dfb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x690(%rbp), %rdi
callq 0x31d0
leaq -0x691(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6e2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x6b8(%rbp), %rdi
callq 0x31d0
leaq -0x6b9(%rbp), %rdi
callq 0x32f0
jmp 0x6e6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x6e63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0x31d0
leaq -0x6e1(%rbp), %rdi
callq 0x32f0
leaq -0x350(%rbp), %rdi
callq 0x7040
leaq -0x338(%rbp), %rdi
callq 0x7c40
leaq -0x320(%rbp), %rdi
callq 0x7ca0
leaq -0x308(%rbp), %rdi
callq 0x33e0
leaq -0x108(%rbp), %rdi
callq 0x7040
leaq -0xb8(%rbp), %rdi
callq 0x31d0
leaq -0x98(%rbp), %rdi
callq 0x31d0
leaq -0x78(%rbp), %rdi
callq 0x31d0
movq -0x38(%rbp), %rdi
callq 0x34a0
nopw %cs:(%rax,%rax)
nop