// File: /workspace/github_c_makefile_star2_O0/Leeheng86[P]word2vec/word2phrase.c
// Function: main
int main(int argc, char **argv) {
  int i;
  if (argc == 1) {
    printf("WORD2PHRASE tool v0.1a\n\n");
    printf("Options:\n");
    printf("Parameters for training:\n");
    printf("\t-train <file>\n");
    printf("\t\tUse text data from <file> to train the model\n");
    printf("\t-output <file>\n");
    printf("\t\tUse <file> to save the resulting word vectors / word clusters / phrases\n");
    printf("\t-min-count <int>\n");
    printf("\t\tThis will discard words that appear less than <int> times; default is 5\n");
    printf("\t-threshold <float>\n");
    printf("\t\t The <float> value represents threshold for forming the phrases (higher means less phrases); default 100\n");
    printf("\t-debug <int>\n");
    printf("\t\tSet the debug mode (default = 2 = more info during training)\n");
    printf("\nExamples:\n");
    printf("./word2phrase -train text.txt -output phrases.txt -threshold 100 -debug 2\n\n");
    return 0;
  }
  if ((i = ArgPos((char *)"-train", argc, argv)) > 0) strcpy(train_file, argv[i + 1]);
  if ((i = ArgPos((char *)"-debug", argc, argv)) > 0) debug_mode = atoi(argv[i + 1]);
  if ((i = ArgPos((char *)"-output", argc, argv)) > 0) strcpy(output_file, argv[i + 1]);
  if ((i = ArgPos((char *)"-min-count", argc, argv)) > 0) min_count = atoi(argv[i + 1]);
  if ((i = ArgPos((char *)"-threshold", argc, argv)) > 0) threshold = atof(argv[i + 1]);
  vocab = (struct vocab_word *)calloc(vocab_max_size, sizeof(struct vocab_word));
  vocab_hash = (int *)calloc(vocab_hash_size, sizeof(int));
  TrainModel();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x209e
leaq 0x1149(%rip), %rdi      # 0x3110
movb $0x0, %al
callq 0x1030
leaq 0x1154(%rip), %rdi      # 0x3129
movb $0x0, %al
callq 0x1030
leaq 0x1150(%rip), %rdi      # 0x3133
movb $0x0, %al
callq 0x1030
leaq 0x115c(%rip), %rdi      # 0x314d
movb $0x0, %al
callq 0x1030
leaq 0x115e(%rip), %rdi      # 0x315d
movb $0x0, %al
callq 0x1030
leaq 0x1180(%rip), %rdi      # 0x318d
movb $0x0, %al
callq 0x1030
leaq 0x1183(%rip), %rdi      # 0x319e
movb $0x0, %al
callq 0x1030
leaq 0x11c0(%rip), %rdi      # 0x31e9
movb $0x0, %al
callq 0x1030
leaq 0x11c5(%rip), %rdi      # 0x31fc
movb $0x0, %al
callq 0x1030
leaq 0x1202(%rip), %rdi      # 0x3247
movb $0x0, %al
callq 0x1030
leaq 0x1209(%rip), %rdi      # 0x325c
movb $0x0, %al
callq 0x1030
leaq 0x1267(%rip), %rdi      # 0x32c8
movb $0x0, %al
callq 0x1030
leaq 0x1268(%rip), %rdi      # 0x32d7
movb $0x0, %al
callq 0x1030
leaq 0x129a(%rip), %rdi      # 0x3317
movb $0x0, %al
callq 0x1030
leaq 0x1298(%rip), %rdi      # 0x3323
movb $0x0, %al
callq 0x1030
movl $0x0, -0x4(%rbp)
jmp 0x21f3
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x12c3(%rip), %rdi      # 0x336f
callq 0x1f10
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x20d6
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x302f(%rip), %rdi      # 0x5100
callq 0x1080
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x1292(%rip), %rdi      # 0x3376
callq 0x1f10
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x210d
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1120
movl %eax, 0x2fb3(%rip)      # 0x50c0
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x1262(%rip), %rdi      # 0x337d
callq 0x1f10
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x2145
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x3000(%rip), %rdi      # 0x5140
callq 0x1080
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x1232(%rip), %rdi      # 0x3385
callq 0x1f10
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x217c
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1120
movl %eax, 0x2f48(%rip)      # 0x50c4
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x1206(%rip), %rdi      # 0x3390
callq 0x1f10
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x21b9
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x10e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x2f1f(%rip)     # 0x50d8
movq 0x2f10(%rip), %rdi      # 0x50d0
movl $0x10, %esi
callq 0x1070
movq %rax, 0x2faf(%rip)      # 0x5180
movl $0x1dcd6500, %edi       # imm = 0x1DCD6500
movl $0x4, %esi
callq 0x1070
movq %rax, 0x2fa1(%rip)      # 0x5188
callq 0x1c10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq