// File: /workspace/github_c_makefile_star2_O3/Leeheng86[P]word2vec/word-analogy.c
// Function: main
int main(int argc, char **argv) {
  FILE *f;
  char st1[max_size];
  char bestw[N][max_size];
  char file_name[max_size], st[100][max_size];
  float dist, len, bestd[N], vec[max_size];
  long long words, size, a, b, c, d, cn, bi[100];
  char ch;
  float *M;
  char *vocab;
  if (argc < 2) {
    printf("Usage: ./word-analogy <FILE>\nwhere FILE contains word projections in the BINARY FORMAT\n");
    return 0;
  }
  strcpy(file_name, argv[1]);
  f = fopen(file_name, "rb");
  if (f == NULL) {
    printf("Input file not found\n");
    return -1;
  }
  fscanf(f, "%lld", &words);
  fscanf(f, "%lld", &size);
  vocab = (char *)malloc((long long)words * max_w * sizeof(char));
  M = (float *)malloc((long long)words * (long long)size * sizeof(float));
  if (M == NULL) {
    printf("Cannot allocate memory: %lld MB    %lld  %lld\n", (long long)words * size * sizeof(float) / 1048576, words, size);
    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 < 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);
  while (1) {
    for (a = 0; a < N; a++) bestd[a] = 0;
    for (a = 0; a < N; a++) bestw[a][0] = 0;
    printf("Enter three words (EXIT to break): ");
    a = 0;
    while (1) {
      st1[a] = fgetc(stdin);
      if ((st1[a] == '\n') || (a >= max_size - 1)) {
        st1[a] = 0;
        break;
      }
      a++;
    }
    if (!strcmp(st1, "EXIT")) break;
    cn = 0;
    b = 0;
    c = 0;
    while (1) {
      st[cn][b] = st1[c];
      b++;
      c++;
      st[cn][b] = 0;
      if (st1[c] == 0) break;
      if (st1[c] == ' ') {
        cn++;
        b = 0;
        c++;
      }
    }
    cn++;
    if (cn < 3) {
      printf("Only %lld words were entered.. three words are needed at the input to perform the calculation\n", cn);
      continue;
    }
    for (a = 0; a < cn; a++) {
      for (b = 0; b < words; b++) if (!strcmp(&vocab[b * max_w], st[a])) break;
      if (b == words) b = 0;
      bi[a] = b;
      printf("\nWord: %s  Position in vocabulary: %lld\n", st[a], bi[a]);
      if (b == 0) {
        printf("Out of dictionary word!\n");
        break;
      }
    }
    if (b == 0) continue;
    printf("\n                                              Word              Distance\n------------------------------------------------------------------------\n");
    for (a = 0; a < size; a++) vec[a] = M[a + bi[1] * size] - M[a + bi[0] * size] + M[a + bi[2] * size];
    len = 0;
    for (a = 0; a < size; a++) len += vec[a] * vec[a];
    len = sqrt(len);
    for (a = 0; a < size; a++) vec[a] /= len;
    for (a = 0; a < N; a++) bestd[a] = 0;
    for (a = 0; a < N; a++) bestw[a][0] = 0;
    for (c = 0; c < words; c++) {
      if (c == bi[0]) continue;
      if (c == bi[1]) continue;
      if (c == bi[2]) continue;
      a = 0;
      for (b = 0; b < cn; b++) if (bi[b] == c) a = 1;
      if (a == 1) 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;
        }
      }
    }
    for (a = 0; a < N; a++) printf("%50s\t\t%f\n", bestw[a], bestd[a]);
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x478e8, %rsp          # imm = 0x478E8
cmpl $0x1, %edi
jg 0x1225
leaq 0x101d(%rip), %rdi      # 0x2236
callq 0x10b0
xorl %eax, %eax
jmp 0x1c53
movq 0x8(%rsi), %rsi
leaq 0x2b50(%rsp), %rbx
movq %rbx, %rdi
callq 0x1050
leaq 0xe44(%rip), %rsi       # 0x2084
movq %rbx, %rdi
callq 0x1070
testq %rax, %rax
je 0x1c1b
movq %rax, %r15
leaq 0xe2c(%rip), %rbx       # 0x2087
leaq 0x18(%rsp), %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10f0
leaq 0x8(%rsp), %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r14), %r12
imulq $0x32, %r12, %rdi
callq 0x1080
movq %rax, 0x10(%rsp)
movq (%r13), %r13
movq %r13, %rbx
imulq %r12, %rbx
leaq (,%rbx,4), %rdi
callq 0x1080
movq %rax, (%rsp)
testq %rax, %rax
je 0x1c29
testq %r12, %r12
movq 0x10(%rsp), %r12
jle 0x1405
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x10d0
movl %eax, %ebp
imulq $0x32, %r14, %rax
movq %r12, %rcx
addq %rax, %r12
movb %bpl, (%rcx,%rax)
movq %r15, %rdi
callq 0x10c0
cmpb $0x20, %bpl
je 0x133d
movl $0x0, %r13d
testl %eax, %eax
jne 0x1340
xorl %r13d, %r13d
movq %r13, %rax
cmpq $0x32, %r13
setb %cl
cmpb $0xa, %bpl
setne %dl
andb %cl, %dl
movzbl %dl, %r13d
addq %rax, %r13
movq %r15, %rdi
callq 0x10d0
movl %eax, %ebp
movb %bpl, (%r12,%r13)
movq %r15, %rdi
callq 0x10c0
cmpb $0x20, %bpl
je 0x1340
testl %eax, %eax
je 0x1301
jmp 0x1340
xorl %r13d, %r13d
movb $0x0, (%r12,%r13)
movq 0x8(%rsp), %rdi
xorps %xmm0, %xmm0
testq %rdi, %rdi
jle 0x13ad
movq (%rsp), %r12
xorl %r13d, %r13d
imulq %rbx, %rdi
addq %r12, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x10a0
incq %r13
movq 0x8(%rsp), %rdi
addq $0x4, %r12
cmpq %rdi, %r13
jl 0x1359
testq %rdi, %rdi
xorps %xmm0, %xmm0
jle 0x13ad
movq %rbx, %rax
imulq %rdi, %rax
addq (%rsp), %rax
xorl %ecx, %ecx
movss (%rax,%rcx,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rdi
jne 0x1398
ucomiss 0xccc(%rip), %xmm0      # 0x2080
movq 0x10(%rsp), %r12
jb 0x13c1
sqrtss %xmm0, %xmm0
jmp 0x13c6
callq 0x10e0
movq 0x8(%rsp), %rax
testq %rax, %rax
jle 0x13f3
movq %rax, %rcx
imulq %rbx, %rcx
addq (%rsp), %rcx
xorl %edx, %edx
movss (%rcx,%rdx,4), %xmm1
divss %xmm0, %xmm1
movss %xmm1, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x13dd
incq %r14
addq $0x4, %rbx
cmpq 0x18(%rsp), %r14
jl 0x12ce
movq %r15, %rdi
callq 0x1060
movdqa 0xc3b(%rip), %xmm0      # 0x2050
pshufd $0xa0, %xmm0, %xmm1     # xmm1 = xmm0[0,0,2,2]
movdqa %xmm1, 0x70(%rsp)
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
movdqa %xmm0, 0x60(%rsp)
movq 0x2bae(%rip), %r15      # 0x3fe0
movl $0xa0, %edx
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x1040
xorl %eax, %eax
movdqa 0xbf0(%rip), %xmm0      # 0x2040
movdqa 0xbd8(%rip), %xmm1      # 0x2030
movdqa 0xbc0(%rip), %xmm2      # 0x2020
movdqa 0xba8(%rip), %xmm3      # 0x2010
movdqa 0x70(%rsp), %xmm7
movdqa 0xbe9(%rip), %xmm8      # 0x2060
movdqa 0x60(%rsp), %xmm9
movdqa 0xbe9(%rip), %xmm10     # 0x2070
movdqa %xmm0, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
packssdw %xmm5, %xmm5
movd %xmm5, %ecx
testb $0x1, %cl
je 0x14c5
movb $0x0, 0x3320(%rsp,%rax)
packssdw %xmm4, %xmm4
packssdw %xmm4, %xmm4
movd %xmm4, %ecx
shrl $0x10, %ecx
testb $0x1, %cl
je 0x14e1
movb $0x0, 0x3af0(%rsp,%rax)
movdqa %xmm1, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
packssdw %xmm4, %xmm5
packssdw %xmm5, %xmm5
pextrw $0x2, %xmm5, %ecx
testb $0x1, %cl
je 0x151f
movb $0x0, 0x42c0(%rsp,%rax)
pshufhw $0x84, %xmm4, %xmm4     # xmm4 = xmm4[0,1,2,3,4,5,4,6]
packssdw %xmm4, %xmm4
pextrw $0x3, %xmm4, %ecx
testb $0x1, %cl
je 0x153a
movb $0x0, 0x4a90(%rsp,%rax)
movdqa %xmm2, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
packssdw %xmm5, %xmm5
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x1579
movb $0x0, 0x5260(%rsp,%rax)
packssdw %xmm4, %xmm4
packssdw %xmm4, %xmm4
pextrw $0x5, %xmm4, %ecx
testb $0x1, %cl
je 0x1593
movb $0x0, 0x5a30(%rsp,%rax)
movdqa %xmm3, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
packssdw %xmm4, %xmm5
packssdw %xmm5, %xmm5
pextrw $0x6, %xmm5, %ecx
testb $0x1, %cl
je 0x15d1
movb $0x0, 0x6200(%rsp,%rax)
pshufhw $0x84, %xmm4, %xmm4     # xmm4 = xmm4[0,1,2,3,4,5,4,6]
packssdw %xmm4, %xmm4
pextrw $0x7, %xmm4, %ecx
testb $0x1, %cl
je 0x15ec
movb $0x0, 0x69d0(%rsp,%rax)
paddq %xmm10, %xmm0
paddq %xmm10, %xmm1
paddq %xmm10, %xmm2
paddq %xmm10, %xmm3
addq $0x3e80, %rax           # imm = 0x3E80
cmpq $0x13880, %rax          # imm = 0x13880
jne 0x1487
leaq 0xaa2(%rip), %rdi       # 0x20bb
xorl %eax, %eax
callq 0x1030
xorl %ebx, %ebx
movq (%r15), %rdi
callq 0x10d0
movb %al, 0x440(%rsp,%rbx)
leaq 0x1(%rbx), %rcx
cmpb $0xa, %al
je 0x1645
cmpq $0x7cf, %rbx            # imm = 0x7CF
movq %rcx, %rbx
jb 0x1622
movb $0x0, 0x43f(%rsp,%rcx)
movl 0x440(%rsp), %eax
movl $0x54495845, %ecx       # imm = 0x54495845
xorl %ecx, %eax
movzbl 0x444(%rsp), %ecx
orl %eax, %ecx
je 0x121e
leaq 0x16ba1(%rsp), %rax
xorl %ecx, %ecx
xorl %ebx, %ebx
incq %rcx
movq %rax, %rdx
movb 0x43f(%rsp,%rcx), %sil
movb %sil, -0x1(%rdx)
movb $0x0, (%rdx)
movzbl 0x440(%rsp,%rcx), %esi
testl %esi, %esi
je 0x16ae
incq %rdx
incq %rcx
cmpl $0x20, %esi
jne 0x167d
incq %rbx
addq $0x7d0, %rax            # imm = 0x7D0
jmp 0x1677
cmpq $0x2, %rbx
jae 0x16cd
incq %rbx
leaq 0xa26(%rip), %rdi       # 0x20e4
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
jmp 0x1432
xorl %r14d, %r14d
movq %rbx, 0x30(%rsp)
movq 0x18(%rsp), %rbp
testq %rbp, %rbp
jle 0x1717
imulq $0x7d0, %r14, %rax      # imm = 0x7D0
leaq (%rsp,%rax), %r15
addq $0x16ba0, %r15          # imm = 0x16BA0
movq %r12, %rbx
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1090
testl %eax, %eax
je 0x171a
incq %r13
addq $0x32, %rbx
cmpq %r13, %rbp
jne 0x16f7
movq %rbp, %r13
jmp 0x171a
xorl %r13d, %r13d
cmpq %rbp, %r13
movl $0x0, %ebx
cmovneq %r13, %rbx
movq %rbx, 0x120(%rsp,%r14,8)
imulq $0x7d0, %r14, %rax      # imm = 0x7D0
leaq (%rsp,%rax), %rsi
addq $0x16ba0, %rsi          # imm = 0x16BA0
leaq 0x9fc(%rip), %rdi       # 0x2143
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1030
testq %rbx, %rbx
je 0x1c0a
leaq 0x1(%r14), %rax
movq 0x30(%rsp), %rbx
cmpq %rbx, %r14
movq %rax, %r14
jne 0x16d5
testq %r13, %r13
movq 0x2867(%rip), %r15      # 0x3fe0
je 0x1432
leaq 0xa08(%rip), %rdi       # 0x218e
callq 0x10b0
movq 0x8(%rsp), %rax
pxor %xmm0, %xmm0
testq %rax, %rax
jle 0x1813
movq 0x130(%rsp), %rcx
imulq %rax, %rcx
movq (%rsp), %rdi
leaq (%rdi,%rcx,4), %rcx
movq 0x120(%rsp), %rdx
imulq %rax, %rdx
leaq (%rdi,%rdx,4), %rdx
movq 0x128(%rsp), %rsi
imulq %rax, %rsi
leaq (%rdi,%rsi,4), %rsi
xorl %edi, %edi
movss (%rsi,%rdi,4), %xmm1
subss (%rdx,%rdi,4), %xmm1
addss (%rcx,%rdi,4), %xmm1
movss %xmm1, 0xc10(%rsp,%rdi,4)
incq %rdi
cmpq %rdi, %rax
jne 0x17cf
testq %rax, %rax
jle 0x1813
pxor %xmm0, %xmm0
xorl %ecx, %ecx
movss 0xc10(%rsp,%rcx,4), %xmm1
mulss %xmm1, %xmm1
addss %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x17fa
ucomiss 0x866(%rip), %xmm0      # 0x2080
jb 0x1822
sqrtss %xmm0, %xmm0
jmp 0x1827
callq 0x10e0
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
jle 0x1851
xorl %eax, %eax
movss 0xc10(%rsp,%rax,4), %xmm1
divss %xmm0, %xmm1
movss %xmm1, 0xc10(%rsp,%rax,4)
incq %rax
cmpq %rax, %rcx
jne 0x1833
movq %rcx, 0x28(%rsp)
movl $0xa0, %edx
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x1040
xorl %eax, %eax
movdqa 0x7cc(%rip), %xmm0      # 0x2040
movdqa 0x7b4(%rip), %xmm1      # 0x2030
movdqa 0x79c(%rip), %xmm2      # 0x2020
movdqa 0x784(%rip), %xmm3      # 0x2010
movdqa 0x70(%rsp), %xmm7
movdqa 0x7c5(%rip), %xmm8      # 0x2060
movdqa 0x60(%rsp), %xmm9
movdqa 0x7c5(%rip), %xmm10     # 0x2070
movl $0x1, %edx
movdqa %xmm0, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
packssdw %xmm5, %xmm5
movd %xmm5, %ecx
testb $0x1, %cl
je 0x18ee
movb $0x0, 0x3320(%rsp,%rax)
packssdw %xmm4, %xmm4
packssdw %xmm4, %xmm4
movd %xmm4, %ecx
shrl $0x10, %ecx
testb $0x1, %cl
je 0x190a
movb $0x0, 0x3af0(%rsp,%rax)
movdqa %xmm1, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
packssdw %xmm4, %xmm5
packssdw %xmm5, %xmm5
pextrw $0x2, %xmm5, %ecx
testb $0x1, %cl
je 0x1948
movb $0x0, 0x42c0(%rsp,%rax)
pshufhw $0x84, %xmm4, %xmm4     # xmm4 = xmm4[0,1,2,3,4,5,4,6]
packssdw %xmm4, %xmm4
pextrw $0x3, %xmm4, %ecx
testb $0x1, %cl
je 0x1963
movb $0x0, 0x4a90(%rsp,%rax)
movdqa %xmm2, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
packssdw %xmm5, %xmm5
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x19a2
movb $0x0, 0x5260(%rsp,%rax)
packssdw %xmm4, %xmm4
packssdw %xmm4, %xmm4
pextrw $0x5, %xmm4, %ecx
testb $0x1, %cl
je 0x19bc
movb $0x0, 0x5a30(%rsp,%rax)
movdqa %xmm3, %xmm4
pxor %xmm8, %xmm4
pshufd $0xa0, %xmm4, %xmm5     # xmm5 = xmm4[0,0,2,2]
movdqa %xmm7, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pcmpeqd %xmm9, %xmm4
pand %xmm6, %xmm4
packssdw %xmm4, %xmm5
packssdw %xmm5, %xmm5
pextrw $0x6, %xmm5, %ecx
testb $0x1, %cl
je 0x19fa
movb $0x0, 0x6200(%rsp,%rax)
pshufhw $0x84, %xmm4, %xmm4     # xmm4 = xmm4[0,1,2,3,4,5,4,6]
packssdw %xmm4, %xmm4
pextrw $0x7, %xmm4, %ecx
testb $0x1, %cl
je 0x1a15
movb $0x0, 0x69d0(%rsp,%rax)
paddq %xmm10, %xmm0
paddq %xmm10, %xmm1
paddq %xmm10, %xmm2
paddq %xmm10, %xmm3
addq $0x3e80, %rax           # imm = 0x3E80
cmpq $0x13880, %rax          # imm = 0x13880
jne 0x18b0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
movq 0x28(%rsp), %rsi
jle 0x1bc2
movq 0x120(%rsp), %r8
movq 0x128(%rsp), %r9
movq 0x130(%rsp), %r10
leaq (,%rsi,4), %r11
movq (%rsp), %r13
xorl %ebp, %ebp
movq %rdi, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x48(%rsp)
movq %r10, 0x40(%rsp)
movq %r11, 0x38(%rsp)
cmpq %r8, %rbp
je 0x1bb3
cmpq %r9, %rbp
je 0x1bb3
cmpq %r10, %rbp
je 0x1bb3
movq $-0x1, %rax
xorl %ecx, %ecx
cmpq %rbp, 0x128(%rsp,%rax,8)
cmoveq %rdx, %rcx
incq %rax
cmpq %rax, %rbx
jne 0x1ab1
cmpq $0x1, %rcx
je 0x1bb3
pxor %xmm1, %xmm1
testq %rsi, %rsi
jle 0x1af6
xorl %eax, %eax
movss 0xc10(%rsp,%rax,4), %xmm0
mulss (%r13,%rax,4), %xmm0
addss %xmm0, %xmm1
incq %rax
cmpq %rax, %rsi
jne 0x1ada
leaq 0x3320(%rsp), %r15
xorl %r14d, %r14d
ucomiss 0x80(%rsp,%r14,4), %xmm1
ja 0x1b21
incq %r14
addq $0x7d0, %r15            # imm = 0x7D0
cmpq $0x28, %r14
jne 0x1b01
jmp 0x1bb3
movss %xmm1, 0x24(%rsp)
cmpq $0x26, %r14
ja 0x1b67
movl $0x27, %eax
leaq 0x163d0(%rsp), %rdi
leaq -0x1(%rax), %r12
movss 0x7c(%rsp,%rax,4), %xmm0
movss %xmm0, 0x80(%rsp,%rax,4)
leaq -0x7d0(%rdi), %rbx
movq %rbx, %rsi
callq 0x1050
movq %rbx, %rdi
movq %r12, %rax
cmpq %r14, %r12
ja 0x1b3a
movd 0x24(%rsp), %xmm0
movd %xmm0, 0x80(%rsp,%r14,4)
imulq $0x32, %rbp, %rsi
movq 0x10(%rsp), %r12
addq %r12, %rsi
movq %r15, %rdi
callq 0x1050
movl $0x1, %edx
movq 0x30(%rsp), %rbx
movq 0x28(%rsp), %rsi
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %r8
movq 0x48(%rsp), %r9
movq 0x40(%rsp), %r10
movq 0x38(%rsp), %r11
incq %rbp
addq %r11, %r13
cmpq %rdi, %rbp
jne 0x1a8d
leaq 0x3320(%rsp), %rbx
xorl %r14d, %r14d
movq 0x240c(%rip), %r15      # 0x3fe0
leaq 0x591(%rip), %r13       # 0x216c
xorps %xmm0, %xmm0
cvtss2sd 0x80(%rsp,%r14,4), %xmm0
movq %r13, %rdi
movq %rbx, %rsi
movb $0x1, %al
callq 0x1030
incq %r14
addq $0x7d0, %rbx            # imm = 0x7D0
cmpq $0x28, %r14
jne 0x1bdb
jmp 0x1432
leaq 0x565(%rip), %rdi       # 0x2176
callq 0x10b0
jmp 0x142b
leaq 0x5ff(%rip), %rdi       # 0x2221
callq 0x10b0
jmp 0x1c4e
shrq $0x12, %rbx
movabsq $0xfffffffffff, %rsi    # imm = 0xFFFFFFFFFFF
andq %rbx, %rsi
leaq 0x44b(%rip), %rdi       # 0x208c
movq %r12, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x478e8, %rsp          # imm = 0x478E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq