// File: /workspace/github_c_makefile_star2_O1/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
pushq %rbx
pushq %rax
cmpl $0x1, %edi
jne 0x1f05
leaq 0x12dc(%rip), %rdi      # 0x312f
callq 0x1130
leaq 0x12e8(%rip), %rdi      # 0x3147
callq 0x1130
leaq 0x12e5(%rip), %rdi      # 0x3150
callq 0x1130
leaq 0x12f2(%rip), %rdi      # 0x3169
callq 0x1130
leaq 0x12f5(%rip), %rdi      # 0x3178
callq 0x1130
leaq 0x1318(%rip), %rdi      # 0x31a7
callq 0x1130
leaq 0x131c(%rip), %rdi      # 0x31b7
callq 0x1130
leaq 0x135a(%rip), %rdi      # 0x3201
callq 0x1130
leaq 0x1360(%rip), %rdi      # 0x3213
callq 0x1130
leaq 0x139e(%rip), %rdi      # 0x325d
callq 0x1130
leaq 0x13a6(%rip), %rdi      # 0x3271
callq 0x1130
leaq 0x1405(%rip), %rdi      # 0x32dc
callq 0x1130
leaq 0x1407(%rip), %rdi      # 0x32ea
callq 0x1130
leaq 0x143a(%rip), %rdi      # 0x3329
callq 0x1130
leaq 0x1439(%rip), %rdi      # 0x3334
callq 0x1130
jmp 0x2008
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x11cd(%rip), %rdi      # 0x30de
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1dd2
testl %eax, %eax
jle 0x1f32
movl %eax, %eax
movq 0x8(%rbx,%rax,8), %rsi
leaq 0x31e3(%rip), %rdi      # 0x5110
callq 0x1090
leaq 0x11ac(%rip), %rdi      # 0x30e5
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1dd2
testl %eax, %eax
jle 0x1f59
movl %eax, %eax
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1150
movl %eax, 0x317f(%rip)      # 0x50d8
leaq 0x118c(%rip), %rdi      # 0x30ec
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1dd2
testl %eax, %eax
jle 0x1f81
movl %eax, %eax
movq 0x8(%rbx,%rax,8), %rsi
leaq 0x31d4(%rip), %rdi      # 0x5150
callq 0x1090
leaq 0x116c(%rip), %rdi      # 0x30f4
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1dd2
testl %eax, %eax
jle 0x1fa8
movl %eax, %eax
movq 0x8(%rbx,%rax,8), %rdi
callq 0x1150
movl %eax, 0x3134(%rip)      # 0x50dc
leaq 0x1150(%rip), %rdi      # 0x30ff
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1dd2
testl %eax, %eax
jle 0x1fd5
movl %eax, %eax
movq 0x8(%rbx,%rax,8), %rdi
callq 0x10f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x311b(%rip)     # 0x50f0
movq 0x310c(%rip), %rdi      # 0x50e8
movl $0x10, %esi
callq 0x1080
movq %rax, 0x31a3(%rip)      # 0x5190
movl $0x1dcd6500, %edi       # imm = 0x1DCD6500
movl $0x4, %esi
callq 0x1080
movq %rax, 0x3195(%rip)      # 0x5198
callq 0x1acf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq