// File: /workspace/github_c_makefile_star2_O0/Leeheng86[P]word2vec/compute-accuracy.c
// Function: main
int main(int argc, char **argv)
{
  FILE *f;
  char st1[max_size], st2[max_size], st3[max_size], st4[max_size], bestw[N][max_size], file_name[max_size], ch;
  float dist, len, bestd[N], vec[max_size];
  long long words, size, a, b, c, d, b1, b2, b3, threshold = 0;
  float *M;
  char *vocab;
  int TCN, CCN = 0, TACN = 0, CACN = 0, SECN = 0, SYCN = 0, SEAC = 0, SYAC = 0, QID = 0, TQ = 0, TQS = 0;
  if (argc < 2) {
    printf("Usage: ./compute-accuracy <FILE> <threshold>\nwhere FILE contains word projections, and threshold is used to reduce vocabulary of the model for fast approximate evaluation (0 = off, otherwise typical value is 30000)\n");
    return 0;
  }
  strcpy(file_name, argv[1]);
  if (argc > 2) threshold = atoi(argv[2]);
  f = fopen(file_name, "rb");
  if (f == NULL) {
    printf("Input file not found\n");
    return -1;
  }
  fscanf(f, "%lld", &words);
  if (threshold) if (words > threshold) words = threshold;
  fscanf(f, "%lld", &size);
  vocab = (char *)malloc(words * max_w * sizeof(char));
  M = (float *)malloc(words * size * sizeof(float));
  if (M == NULL) {
    printf("Cannot allocate memory: %lld MB\n", words * size * sizeof(float) / 1048576);
    return -1;
  }
  for (b = 0; b < words; b++) {
    a = 0;
    while (1) {
      vocab[b * max_w + a] = fgetc(f);
      if (feof(f) || (vocab[b * max_w + a] == ' ')) break;
      if ((a < max_w) && (vocab[b * max_w + a] != '\n')) a++;
    }
    vocab[b * max_w + a] = 0;
    for (a = 0; a < max_w; a++) vocab[b * max_w + a] = toupper(vocab[b * max_w + a]);
    for (a = 0; a < size; a++) fread(&M[a + b * size], sizeof(float), 1, f);
    len = 0;
    for (a = 0; a < size; a++) len += M[a + b * size] * M[a + b * size];
    len = sqrt(len);
    for (a = 0; a < size; a++) M[a + b * size] /= len;
  }
  fclose(f);
  TCN = 0;
  while (1) {
    for (a = 0; a < N; a++) bestd[a] = 0;
    for (a = 0; a < N; a++) bestw[a][0] = 0;
    scanf("%s", st1);
    for (a = 0; a < strlen(st1); a++) st1[a] = toupper(st1[a]);
    if ((!strcmp(st1, ":")) || (!strcmp(st1, "EXIT")) || feof(stdin)) {
      if (TCN == 0) TCN = 1;
      if (QID != 0) {
        printf("ACCURACY TOP1: %.2f %%  (%d / %d)\n", CCN / (float)TCN * 100, CCN, TCN);
        printf("Total accuracy: %.2f %%   Semantic accuracy: %.2f %%   Syntactic accuracy: %.2f %% \n", CACN / (float)TACN * 100, SEAC / (float)SECN * 100, SYAC / (float)SYCN * 100);
      }
      QID++;
      scanf("%s", st1);
      if (feof(stdin)) break;
      printf("%s:\n", st1);
      TCN = 0;
      CCN = 0;
      continue;
    }
    if (!strcmp(st1, "EXIT")) break;
    scanf("%s", st2);
    for (a = 0; a < strlen(st2); a++) st2[a] = toupper(st2[a]);
    scanf("%s", st3);
    for (a = 0; a<strlen(st3); a++) st3[a] = toupper(st3[a]);
    scanf("%s", st4);
    for (a = 0; a < strlen(st4); a++) st4[a] = toupper(st4[a]);
    for (b = 0; b < words; b++) if (!strcmp(&vocab[b * max_w], st1)) break;
    b1 = b;
    for (b = 0; b < words; b++) if (!strcmp(&vocab[b * max_w], st2)) break;
    b2 = b;
    for (b = 0; b < words; b++) if (!strcmp(&vocab[b * max_w], st3)) break;
    b3 = b;
    for (a = 0; a < N; a++) bestd[a] = 0;
    for (a = 0; a < N; a++) bestw[a][0] = 0;
    TQ++;
    if (b1 == words) continue;
    if (b2 == words) continue;
    if (b3 == words) continue;
    for (b = 0; b < words; b++) if (!strcmp(&vocab[b * max_w], st4)) break;
    if (b == words) continue;
    for (a = 0; a < size; a++) vec[a] = (M[a + b2 * size] - M[a + b1 * size]) + M[a + b3 * size];
    TQS++;
    for (c = 0; c < words; c++) {
      if (c == b1) continue;
      if (c == b2) continue;
      if (c == b3) continue;
      dist = 0;
      for (a = 0; a < size; a++) dist += vec[a] * M[a + c * size];
      for (a = 0; a < N; a++) {
        if (dist > bestd[a]) {
          for (d = N - 1; d > a; d--) {
            bestd[d] = bestd[d - 1];
            strcpy(bestw[d], bestw[d - 1]);
          }
          bestd[a] = dist;
          strcpy(bestw[a], &vocab[c * max_w]);
          break;
        }
      }
    }
    if (!strcmp(st4, bestw[0])) {
      CCN++;
      CACN++;
      if (QID <= 5) SEAC++; else SYAC++;
    }
    if (QID <= 5) SECN++; else SYCN++;
    TCN++;
    TACN++;
  }
  printf("Questions seen / total: %d %d   %.2f %% \n", TQS, TQ, TQS/(float)TQ*100);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4f00, %rsp           # imm = 0x4F00
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x4ea0(%rbp)
movl $0x0, -0x4eb8(%rbp)
movl $0x0, -0x4ebc(%rbp)
movl $0x0, -0x4ec0(%rbp)
movl $0x0, -0x4ec4(%rbp)
movl $0x0, -0x4ec8(%rbp)
movl $0x0, -0x4ecc(%rbp)
movl $0x0, -0x4ed0(%rbp)
movl $0x0, -0x4ed4(%rbp)
movl $0x0, -0x4ed8(%rbp)
movl $0x0, -0x4edc(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x12c8
leaq 0x1d53(%rip), %rdi      # 0x3008
movb $0x0, %al
callq 0x1030
movl $0x0, -0x4(%rbp)
jmp 0x2143
leaq -0x2f00(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1050
cmpl $0x2, -0x8(%rbp)
jle 0x12f8
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x10d0
cltq
movq %rax, -0x4ea0(%rbp)
leaq -0x2f00(%rbp), %rdi
leaq 0x1dda(%rip), %rsi      # 0x30e0
callq 0x1080
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1330
leaq 0x1dc6(%rip), %rdi      # 0x30e3
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2143
movq -0x18(%rbp), %rdi
leaq 0x1dbe(%rip), %rsi      # 0x30f9
leaq -0x4e58(%rbp), %rdx
movb $0x0, %al
callq 0x1100
cmpq $0x0, -0x4ea0(%rbp)
je 0x1373
movq -0x4e58(%rbp), %rax
cmpq -0x4ea0(%rbp), %rax
jle 0x1371
movq -0x4ea0(%rbp), %rax
movq %rax, -0x4e58(%rbp)
jmp 0x1373
movq -0x18(%rbp), %rdi
leaq 0x1d7b(%rip), %rsi      # 0x30f9
leaq -0x4e60(%rbp), %rdx
movb $0x0, %al
callq 0x1100
imulq $0x32, -0x4e58(%rbp), %rdi
shlq $0x0, %rdi
callq 0x1090
movq %rax, -0x4eb0(%rbp)
movq -0x4e58(%rbp), %rdi
imulq -0x4e60(%rbp), %rdi
shlq $0x2, %rdi
callq 0x1090
movq %rax, -0x4ea8(%rbp)
cmpq $0x0, -0x4ea8(%rbp)
jne 0x13fe
movq -0x4e58(%rbp), %rsi
imulq -0x4e60(%rbp), %rsi
shlq $0x2, %rsi
shrq $0x14, %rsi
leaq 0x1d13(%rip), %rdi      # 0x30fe
movb $0x0, %al
callq 0x1030
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2143
movq $0x0, -0x4e70(%rbp)
movq -0x4e70(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jge 0x16d3
movq $0x0, -0x4e68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10e0
movb %al, %dl
movq -0x4eb0(%rbp), %rax
imulq $0x32, -0x4e70(%rbp), %rcx
addq -0x4e68(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rdi
callq 0x10c0
cmpl $0x0, %eax
jne 0x1479
movq -0x4eb0(%rbp), %rax
imulq $0x32, -0x4e70(%rbp), %rcx
addq -0x4e68(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jne 0x147b
jmp 0x14bb
cmpq $0x32, -0x4e68(%rbp)
jge 0x14b6
movq -0x4eb0(%rbp), %rax
imulq $0x32, -0x4e70(%rbp), %rcx
addq -0x4e68(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
je 0x14b6
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1428
movq -0x4eb0(%rbp), %rax
imulq $0x32, -0x4e70(%rbp), %rcx
addq -0x4e68(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq $0x0, -0x4e68(%rbp)
cmpq $0x32, -0x4e68(%rbp)
jge 0x1538
movq -0x4eb0(%rbp), %rax
imulq $0x32, -0x4e70(%rbp), %rcx
addq -0x4e68(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x1110
movb %al, %dl
movq -0x4eb0(%rbp), %rax
imulq $0x32, -0x4e70(%rbp), %rcx
addq -0x4e68(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x14e0
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
cmpq -0x4e60(%rbp), %rax
jge 0x15a1
movq -0x4ea8(%rbp), %rdi
movq -0x4e68(%rbp), %rax
movq -0x4e70(%rbp), %rcx
imulq -0x4e60(%rbp), %rcx
addq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x10b0
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1543
xorps %xmm0, %xmm0
movss %xmm0, -0x2f0c(%rbp)
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
cmpq -0x4e60(%rbp), %rax
jge 0x1640
movq -0x4ea8(%rbp), %rax
movq -0x4e68(%rbp), %rcx
movq -0x4e70(%rbp), %rdx
imulq -0x4e60(%rbp), %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x4ea8(%rbp), %rax
movq -0x4e68(%rbp), %rcx
movq -0x4e70(%rbp), %rdx
imulq -0x4e60(%rbp), %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm2
movss -0x2f0c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x2f0c(%rbp)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x15b7
movss -0x2f0c(%rbp), %xmm0
callq 0x2150
movss %xmm0, -0x2f0c(%rbp)
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
cmpq -0x4e60(%rbp), %rax
jge 0x16ba
movss -0x2f0c(%rbp), %xmm1
movq -0x4ea8(%rbp), %rax
movq -0x4e68(%rbp), %rcx
movq -0x4e70(%rbp), %rdx
imulq -0x4e60(%rbp), %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1660
jmp 0x16bc
movq -0x4e70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e70(%rbp)
jmp 0x1409
movq -0x18(%rbp), %rdi
callq 0x1060
movl $0x0, -0x4eb4(%rbp)
movq $0x0, -0x4e68(%rbp)
cmpq $0x1, -0x4e68(%rbp)
jge 0x1722
movq -0x4e68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, -0x2f10(%rbp,%rax,4)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x16f1
movq $0x0, -0x4e68(%rbp)
cmpq $0x1, -0x4e68(%rbp)
jge 0x1763
leaq -0x2730(%rbp), %rax
imulq $0x7d0, -0x4e68(%rbp), %rcx # imm = 0x7D0
addq %rcx, %rax
movb $0x0, (%rax)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x172d
leaq -0x7f0(%rbp), %rsi
leaq 0x19ae(%rip), %rdi      # 0x311f
movb $0x0, %al
callq 0x1070
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
movq %rax, -0x4ee8(%rbp)
leaq -0x7f0(%rbp), %rdi
callq 0x1040
movq %rax, %rcx
movq -0x4ee8(%rbp), %rax
cmpq %rcx, %rax
jae 0x17e4
movq -0x4e68(%rbp), %rax
movsbl -0x7f0(%rbp,%rax), %edi
callq 0x1110
movb %al, %cl
movq -0x4e68(%rbp), %rax
movb %cl, -0x7f0(%rbp,%rax)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1783
leaq -0x7f0(%rbp), %rdi
leaq 0x1930(%rip), %rsi      # 0x3122
callq 0x10a0
cmpl $0x0, %eax
je 0x182c
leaq -0x7f0(%rbp), %rdi
leaq 0x191a(%rip), %rsi      # 0x3124
callq 0x10a0
cmpl $0x0, %eax
je 0x182c
movq 0x37c5(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x10c0
cmpl $0x0, %eax
je 0x196f
cmpl $0x0, -0x4eb4(%rbp)
jne 0x183f
movl $0x1, -0x4eb4(%rbp)
cmpl $0x0, -0x4ed4(%rbp)
je 0x1904
cvtsi2ssl -0x4eb8(%rbp), %xmm0
cvtsi2ssl -0x4eb4(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x179c(%rip), %xmm1     # 0x3004
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movl -0x4eb8(%rbp), %esi
movl -0x4eb4(%rbp), %edx
leaq 0x18a6(%rip), %rdi      # 0x3129
movb $0x1, %al
callq 0x1030
cvtsi2ssl -0x4ec0(%rbp), %xmm0
cvtsi2ssl -0x4ebc(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x175e(%rip), %xmm1     # 0x3004
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
cvtsi2ssl -0x4ecc(%rbp), %xmm1
cvtsi2ssl -0x4ec4(%rbp), %xmm2
divss %xmm2, %xmm1
movss 0x173a(%rip), %xmm2     # 0x3004
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
cvtsi2ssl -0x4ed0(%rbp), %xmm2
cvtsi2ssl -0x4ec8(%rbp), %xmm3
divss %xmm3, %xmm2
movss 0x1716(%rip), %xmm3     # 0x3004
mulss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
leaq 0x184f(%rip), %rdi      # 0x314c
movb $0x3, %al
callq 0x1030
movl -0x4ed4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ed4(%rbp)
leaq -0x7f0(%rbp), %rsi
leaq 0x17fe(%rip), %rdi      # 0x311f
movb $0x0, %al
callq 0x1070
movq 0x36b1(%rip), %rax      # 0x4fe0
movq (%rax), %rdi
callq 0x10c0
cmpl $0x0, %eax
je 0x1941
jmp 0x20fe
leaq -0x7f0(%rbp), %rsi
leaq 0x1852(%rip), %rdi      # 0x31a1
movb $0x0, %al
callq 0x1030
movl $0x0, -0x4eb4(%rbp)
movl $0x0, -0x4eb8(%rbp)
jmp 0x16e6
leaq -0x7f0(%rbp), %rdi
leaq 0x17a7(%rip), %rsi      # 0x3124
callq 0x10a0
cmpl $0x0, %eax
jne 0x198c
jmp 0x20fe
leaq -0xfc0(%rbp), %rsi
leaq 0x1785(%rip), %rdi      # 0x311f
movb $0x0, %al
callq 0x1070
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
movq %rax, -0x4ef0(%rbp)
leaq -0xfc0(%rbp), %rdi
callq 0x1040
movq %rax, %rcx
movq -0x4ef0(%rbp), %rax
cmpq %rcx, %rax
jae 0x1a0d
movq -0x4e68(%rbp), %rax
movsbl -0xfc0(%rbp,%rax), %edi
callq 0x1110
movb %al, %cl
movq -0x4e68(%rbp), %rax
movb %cl, -0xfc0(%rbp,%rax)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x19ac
leaq -0x1790(%rbp), %rsi
leaq 0x1704(%rip), %rdi      # 0x311f
movb $0x0, %al
callq 0x1070
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
movq %rax, -0x4ef8(%rbp)
leaq -0x1790(%rbp), %rdi
callq 0x1040
movq %rax, %rcx
movq -0x4ef8(%rbp), %rax
cmpq %rcx, %rax
jae 0x1a8e
movq -0x4e68(%rbp), %rax
movsbl -0x1790(%rbp,%rax), %edi
callq 0x1110
movb %al, %cl
movq -0x4e68(%rbp), %rax
movb %cl, -0x1790(%rbp,%rax)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1a2d
leaq -0x1f60(%rbp), %rsi
leaq 0x1683(%rip), %rdi      # 0x311f
movb $0x0, %al
callq 0x1070
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
movq %rax, -0x4f00(%rbp)
leaq -0x1f60(%rbp), %rdi
callq 0x1040
movq %rax, %rcx
movq -0x4f00(%rbp), %rax
cmpq %rcx, %rax
jae 0x1b0f
movq -0x4e68(%rbp), %rax
movsbl -0x1f60(%rbp,%rax), %edi
callq 0x1110
movb %al, %cl
movq -0x4e68(%rbp), %rax
movb %cl, -0x1f60(%rbp,%rax)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1aae
movq $0x0, -0x4e70(%rbp)
movq -0x4e70(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jge 0x1b65
movq -0x4eb0(%rbp), %rdi
imulq $0x32, -0x4e70(%rbp), %rax
addq %rax, %rdi
leaq -0x7f0(%rbp), %rsi
callq 0x10a0
cmpl $0x0, %eax
jne 0x1b4f
jmp 0x1b65
jmp 0x1b51
movq -0x4e70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e70(%rbp)
jmp 0x1b1a
movq -0x4e70(%rbp), %rax
movq %rax, -0x4e88(%rbp)
movq $0x0, -0x4e70(%rbp)
movq -0x4e70(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jge 0x1bc9
movq -0x4eb0(%rbp), %rdi
imulq $0x32, -0x4e70(%rbp), %rax
addq %rax, %rdi
leaq -0xfc0(%rbp), %rsi
callq 0x10a0
cmpl $0x0, %eax
jne 0x1bb3
jmp 0x1bc9
jmp 0x1bb5
movq -0x4e70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e70(%rbp)
jmp 0x1b7e
movq -0x4e70(%rbp), %rax
movq %rax, -0x4e90(%rbp)
movq $0x0, -0x4e70(%rbp)
movq -0x4e70(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jge 0x1c2d
movq -0x4eb0(%rbp), %rdi
imulq $0x32, -0x4e70(%rbp), %rax
addq %rax, %rdi
leaq -0x1790(%rbp), %rsi
callq 0x10a0
cmpl $0x0, %eax
jne 0x1c17
jmp 0x1c2d
jmp 0x1c19
movq -0x4e70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e70(%rbp)
jmp 0x1be2
movq -0x4e70(%rbp), %rax
movq %rax, -0x4e98(%rbp)
movq $0x0, -0x4e68(%rbp)
cmpq $0x1, -0x4e68(%rbp)
jge 0x1c77
movq -0x4e68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, -0x2f10(%rbp,%rax,4)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1c46
movq $0x0, -0x4e68(%rbp)
cmpq $0x1, -0x4e68(%rbp)
jge 0x1cb8
leaq -0x2730(%rbp), %rax
imulq $0x7d0, -0x4e68(%rbp), %rcx # imm = 0x7D0
addq %rcx, %rax
movb $0x0, (%rax)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1c82
movl -0x4ed8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ed8(%rbp)
movq -0x4e88(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jne 0x1cdc
jmp 0x16e6
movq -0x4e90(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jne 0x1cf1
jmp 0x16e6
movq -0x4e98(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jne 0x1d06
jmp 0x16e6
movq $0x0, -0x4e70(%rbp)
movq -0x4e70(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jge 0x1d5c
movq -0x4eb0(%rbp), %rdi
imulq $0x32, -0x4e70(%rbp), %rax
addq %rax, %rdi
leaq -0x1f60(%rbp), %rsi
callq 0x10a0
cmpl $0x0, %eax
jne 0x1d46
jmp 0x1d5c
jmp 0x1d48
movq -0x4e70(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e70(%rbp)
jmp 0x1d11
movq -0x4e70(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jne 0x1d71
jmp 0x16e6
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
cmpq -0x4e60(%rbp), %rax
jge 0x1e26
movq -0x4ea8(%rbp), %rax
movq -0x4e68(%rbp), %rcx
movq -0x4e90(%rbp), %rdx
imulq -0x4e60(%rbp), %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x4ea8(%rbp), %rax
movq -0x4e68(%rbp), %rcx
movq -0x4e88(%rbp), %rdx
imulq -0x4e60(%rbp), %rdx
addq %rdx, %rcx
subss (%rax,%rcx,4), %xmm0
movq -0x4ea8(%rbp), %rax
movq -0x4e68(%rbp), %rcx
movq -0x4e98(%rbp), %rdx
imulq -0x4e60(%rbp), %rdx
addq %rdx, %rcx
addss (%rax,%rcx,4), %xmm0
movq -0x4e68(%rbp), %rax
movss %xmm0, -0x4e50(%rbp,%rax,4)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1d7c
movl -0x4edc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4edc(%rbp)
movq $0x0, -0x4e78(%rbp)
movq -0x4e78(%rbp), %rax
cmpq -0x4e58(%rbp), %rax
jge 0x2051
movq -0x4e78(%rbp), %rax
cmpq -0x4e88(%rbp), %rax
jne 0x1e69
jmp 0x203a
movq -0x4e78(%rbp), %rax
cmpq -0x4e90(%rbp), %rax
jne 0x1e7e
jmp 0x203a
movq -0x4e78(%rbp), %rax
cmpq -0x4e98(%rbp), %rax
jne 0x1e93
jmp 0x203a
xorps %xmm0, %xmm0
movss %xmm0, -0x2f08(%rbp)
movq $0x0, -0x4e68(%rbp)
movq -0x4e68(%rbp), %rax
cmpq -0x4e60(%rbp), %rax
jge 0x1f1a
movq -0x4e68(%rbp), %rax
movss -0x4e50(%rbp,%rax,4), %xmm0
movq -0x4ea8(%rbp), %rax
movq -0x4e68(%rbp), %rcx
movq -0x4e78(%rbp), %rdx
imulq -0x4e60(%rbp), %rdx
addq %rdx, %rcx
movss (%rax,%rcx,4), %xmm2
movss -0x2f08(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x2f08(%rbp)
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1ea9
movq $0x0, -0x4e68(%rbp)
cmpq $0x1, -0x4e68(%rbp)
jge 0x2038
movss -0x2f08(%rbp), %xmm0
movq -0x4e68(%rbp), %rax
ucomiss -0x2f10(%rbp,%rax,4), %xmm0
jbe 0x201f
movq $0x0, -0x4e80(%rbp)
movq -0x4e80(%rbp), %rax
cmpq -0x4e68(%rbp), %rax
jle 0x1fd9
movq -0x4e80(%rbp), %rax
subq $0x1, %rax
movss -0x2f10(%rbp,%rax,4), %xmm0
movq -0x4e80(%rbp), %rax
movss %xmm0, -0x2f10(%rbp,%rax,4)
leaq -0x2730(%rbp), %rdi
imulq $0x7d0, -0x4e80(%rbp), %rax # imm = 0x7D0
addq %rax, %rdi
movq -0x4e80(%rbp), %rax
subq $0x1, %rax
leaq -0x2730(%rbp), %rsi
imulq $0x7d0, %rax, %rax      # imm = 0x7D0
addq %rax, %rsi
callq 0x1050
movq -0x4e80(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x4e80(%rbp)
jmp 0x1f5b
movss -0x2f08(%rbp), %xmm0
movq -0x4e68(%rbp), %rax
movss %xmm0, -0x2f10(%rbp,%rax,4)
leaq -0x2730(%rbp), %rdi
imulq $0x7d0, -0x4e68(%rbp), %rax # imm = 0x7D0
addq %rax, %rdi
movq -0x4eb0(%rbp), %rsi
imulq $0x32, -0x4e78(%rbp), %rax
addq %rax, %rsi
callq 0x1050
jmp 0x2038
jmp 0x2021
movq -0x4e68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e68(%rbp)
jmp 0x1f25
jmp 0x203a
movq -0x4e78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x4e78(%rbp)
jmp 0x1e40
leaq -0x1f60(%rbp), %rdi
leaq -0x2730(%rbp), %rsi
callq 0x10a0
cmpl $0x0, %eax
jne 0x20b2
movl -0x4eb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4eb8(%rbp)
movl -0x4ec0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ec0(%rbp)
cmpl $0x5, -0x4ed4(%rbp)
jg 0x20a1
movl -0x4ecc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ecc(%rbp)
jmp 0x20b0
movl -0x4ed0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ed0(%rbp)
jmp 0x20b2
cmpl $0x5, -0x4ed4(%rbp)
jg 0x20cc
movl -0x4ec4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ec4(%rbp)
jmp 0x20db
movl -0x4ec8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ec8(%rbp)
movl -0x4eb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4eb4(%rbp)
movl -0x4ebc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ebc(%rbp)
jmp 0x16e6
movl -0x4edc(%rbp), %esi
movl -0x4ed8(%rbp), %edx
cvtsi2ssl -0x4edc(%rbp), %xmm0
cvtsi2ssl -0x4ed8(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0xede(%rip), %xmm1      # 0x3004
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x1071(%rip), %rdi      # 0x31a6
movb $0x1, %al
callq 0x1030
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x4f00, %rsp           # imm = 0x4F00
popq %rbp
retq
nop