// File: /workspace/github_cpp_makefile_star2_O3/aalto-speech[P]ftk/src/1g-threshold-sents.cc
// Function: main
int main(int argc, char* argv[]) {

    conf::Config config;
    config("usage: 1g-threshold-sents [OPTION...] CORPUS VOCAB_INIT VOCAB_FINAL\n")
      ('h', "help", "", "", "display help")
      ('i', "threshold-increment=FLOAT", "arg", "1.0", "Threshold increment for each iteration, DEFAULT: 1.0")
      ('m', "min-length=INT", "arg", "2", "Minimum length of factors to remove, DEFAULT: 2")
      ('v', "vocab-size=INT", "arg must", "", "Target vocabulary size")
      ('s', "stop-list=STRING", "arg", "", "Text file containing subwords that should not be removed")
      ('f', "forward-backward", "", "", "Use Forward-backward segmentation instead of Viterbi")
      ('8', "utf-8", "", "", "Utf-8 character encoding in use");
    config.default_parse(argc, argv);
    if (config.arguments.size() != 3) config.print_help(stderr, 1);

    flt_type short_factor_min_lp = -25.0;
    string corpus_fname = config.arguments[0];
    string vocab_fname = config.arguments[1];
    string out_vocab_fname = config.arguments[2];
    float threshold_increment = config["threshold-increment"].get_float();
    unsigned int min_removal_length = config["min-length"].get_int();
    unsigned int target_vocab_size = config["vocab-size"].get_int();
    bool enable_forward_backward = config["forward-backward"].specified;
    bool utf8_encoding = config["utf-8"].specified;

    set<string> stoplist;
    if (config["stop-list"].specified) {
        vector<string> stopstrings;
        Unigrams::read_sents(config["stop-list"].get_str(), stopstrings);
        stoplist.insert(stopstrings.begin(), stopstrings.end());
    }

    cerr << setprecision(15) << std::boolalpha;
    cerr << "parameters, training corpus: " << corpus_fname << endl;
    cerr << "parameters, initial vocabulary: " << vocab_fname << endl;
    cerr << "parameters, final vocabulary: " << out_vocab_fname << endl;
    cerr << "parameters, threshold increment: " << threshold_increment << endl;
    cerr << "parameters, minimum length for factors to remove: " << min_removal_length << endl;
    if (stoplist.size() > 0)
        cerr << "parameters, stoplist with " << stoplist.size() << " subwords" << endl;
    cerr << "parameters, target vocab size: " << target_vocab_size << endl;
    cerr << "parameters, use forward-backward: " << enable_forward_backward << endl;
    cerr << "parameters, utf-8 encoding: " << utf8_encoding << endl;

    int maxlen;
    set<string> short_factors;
    map<string, flt_type> vocab;
    map<string, flt_type> freqs;
    vector<string> sents;

    cerr << "Reading vocabulary " << vocab_fname << endl;
    int retval = Unigrams::read_vocab(vocab_fname, vocab, maxlen, utf8_encoding);
    if (retval < 0) {
        cerr << "something went wrong reading vocabulary" << endl;
        exit(EXIT_FAILURE);
    }
    cerr << "\t" << "size: " << vocab.size() << endl;
    cerr << "\t" << "maximum string length: " << maxlen << endl;
    find_short_factors(vocab, short_factors, min_removal_length, utf8_encoding);

    cerr << "Reading training corpus " << corpus_fname << endl;
    retval = Unigrams::read_sents(corpus_fname, sents);
    if (retval < 0) {
        cerr << "something went wrong reading training corpus" << endl;
        exit(EXIT_FAILURE);
    }
    cerr << "\t" << "number of sentences in corpus: " << sents.size() << endl;

    Unigrams ug;
    if (enable_forward_backward)
        ug.set_segmentation_method(forward_backward);
    else
        ug.set_segmentation_method(viterbi);
    ug.set_utf8(utf8_encoding);

    cerr << endl << "Initial threshold" << endl;
    flt_type cost = ug.resegment_sents(sents, vocab, freqs);
    cerr << "likelihood: " << cost << endl;

    flt_type threshold_value = 0.0;
    while (vocab.size() > target_vocab_size) {
        threshold_value += threshold_increment;
        ug.cutoff(freqs, threshold_value, stoplist, min_removal_length);
        cerr << "\tthreshold: " << threshold_value << "\t" << "vocabulary size: " << freqs.size() << endl;
        vocab = freqs;
        Unigrams::freqs_to_logprobs(vocab);
        assert_factors(vocab, short_factors, short_factor_min_lp);
        cost = ug.resegment_sents(sents, vocab, freqs);
        cerr << "likelihood: " << cost << endl;
    }

    Unigrams::write_vocab(out_vocab_fname, vocab);
    exit(EXIT_SUCCESS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x748, %rsp            # imm = 0x748
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x768(%rbp), %rdi
callq 0x870a
leaq -0x670(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x21f2b(%rip), %rsi     # 0x27020
leaq 0x21f68(%rip), %rdx     # 0x27064
leaq -0x680(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x680(%rbp), %rsi
callq 0x8770
movq %rax, %r15
leaq -0x650(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x21f3d(%rip), %rsi     # 0x2706d
leaq 0x21f3a(%rip), %rdx     # 0x27071
leaq -0x660(%rbp), %rdi
callq 0x79fe
leaq -0x4a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x226a2(%rip), %rdx     # 0x277f7
leaq -0x4b0(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x480(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22681(%rip), %rdx     # 0x277f7
leaq -0x490(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x460(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21ece(%rip), %rsi     # 0x27065
leaq 0x21ed3(%rip), %rdx     # 0x27071
leaq -0x470(%rbp), %rdi
callq 0x79fe
leaq -0x660(%rbp), %rdx
leaq -0x4b0(%rbp), %rcx
leaq -0x490(%rbp), %r8
leaq -0x470(%rbp), %r9
movq %r15, %rdi
movl $0x68, %esi
callq 0x8788
movq %rax, %r15
leaq -0x440(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e8a(%rip), %rsi     # 0x27072
leaq 0x21e9c(%rip), %rdx     # 0x2708b
leaq -0x450(%rbp), %rdi
callq 0x79fe
leaq -0x420(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e7f(%rip), %rsi     # 0x2708c
leaq 0x21e7b(%rip), %rdx     # 0x2708f
leaq -0x430(%rbp), %rdi
callq 0x79fe
leaq -0x400(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e8f(%rip), %rsi     # 0x270c1
leaq 0x21e8b(%rip), %rdx     # 0x270c4
leaq -0x410(%rbp), %rdi
callq 0x79fe
leaq -0x3e0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e39(%rip), %rsi     # 0x27090
leaq 0x21e66(%rip), %rdx     # 0x270c4
leaq -0x3f0(%rbp), %rdi
callq 0x79fe
leaq -0x450(%rbp), %rdx
leaq -0x430(%rbp), %rcx
leaq -0x410(%rbp), %r8
leaq -0x3f0(%rbp), %r9
movq %r15, %rdi
movl $0x69, %esi
callq 0x8788
movq %rax, %r15
leaq -0x3c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e1d(%rip), %rsi     # 0x270c5
leaq 0x21e24(%rip), %rdx     # 0x270d3
leaq -0x3d0(%rbp), %rdi
callq 0x79fe
leaq -0x3a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21dbf(%rip), %rsi     # 0x2708c
leaq 0x21dbb(%rip), %rdx     # 0x2708f
leaq -0x3b0(%rbp), %rdi
callq 0x79fe
leaq -0x380(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21e10(%rip), %rsi     # 0x27102
leaq 0x21e0a(%rip), %rdx     # 0x27103
leaq -0x390(%rbp), %rdi
callq 0x79fe
leaq -0x360(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21dbd(%rip), %rsi     # 0x270d4
leaq 0x21de5(%rip), %rdx     # 0x27103
leaq -0x370(%rbp), %rdi
callq 0x79fe
leaq -0x3d0(%rbp), %rdx
leaq -0x3b0(%rbp), %rcx
leaq -0x390(%rbp), %r8
leaq -0x370(%rbp), %r9
movq %r15, %rdi
movl $0x6d, %esi
callq 0x8788
movq %rax, %r15
leaq -0x340(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d9c(%rip), %rsi     # 0x27104
leaq 0x21da3(%rip), %rdx     # 0x27112
leaq -0x350(%rbp), %rdi
callq 0x79fe
leaq -0x320(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d86(%rip), %rsi     # 0x27113
leaq 0x21d87(%rip), %rdx     # 0x2711b
leaq -0x330(%rbp), %rdi
callq 0x79fe
leaq -0x300(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22445(%rip), %rdx     # 0x277f7
leaq -0x310(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x2e0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d49(%rip), %rsi     # 0x2711c
leaq 0x21d58(%rip), %rdx     # 0x27132
leaq -0x2f0(%rbp), %rdi
callq 0x79fe
leaq -0x350(%rbp), %rdx
leaq -0x330(%rbp), %rcx
leaq -0x310(%rbp), %r8
leaq -0x2f0(%rbp), %r9
movq %r15, %rdi
movl $0x76, %esi
callq 0x8788
movq %rax, %r15
leaq -0x2c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21d0f(%rip), %rsi     # 0x27133
leaq 0x21d18(%rip), %rdx     # 0x27143
leaq -0x2d0(%rbp), %rdi
callq 0x79fe
leaq -0x2a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c43(%rip), %rsi     # 0x2708c
leaq 0x21c3f(%rip), %rdx     # 0x2708f
leaq -0x2b0(%rbp), %rdi
callq 0x79fe
leaq -0x280(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22389(%rip), %rdx     # 0x277f7
leaq -0x290(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x260(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21cb5(%rip), %rsi     # 0x27144
leaq 0x21ce6(%rip), %rdx     # 0x2717c
leaq -0x270(%rbp), %rdi
callq 0x79fe
leaq -0x2d0(%rbp), %rdx
leaq -0x2b0(%rbp), %rcx
leaq -0x290(%rbp), %r8
leaq -0x270(%rbp), %r9
movq %r15, %rdi
movl $0x73, %esi
callq 0x8788
movq %rax, %r15
leaq -0x240(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c9d(%rip), %rsi     # 0x2717d
leaq 0x21ca6(%rip), %rdx     # 0x2718d
leaq -0x250(%rbp), %rdi
callq 0x79fe
leaq -0x220(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x222f2(%rip), %rdx     # 0x277f7
leaq -0x230(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x200(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x222d1(%rip), %rdx     # 0x277f7
leaq -0x210(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x1e0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c47(%rip), %rsi     # 0x2718e
leaq 0x21c74(%rip), %rdx     # 0x271c2
leaq -0x1f0(%rbp), %rdi
callq 0x79fe
leaq -0x250(%rbp), %rdx
leaq -0x230(%rbp), %rcx
leaq -0x210(%rbp), %r8
leaq -0x1f0(%rbp), %r9
movq %r15, %rdi
movl $0x66, %esi
callq 0x8788
movq %rax, %r15
leaq -0x1c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21c2b(%rip), %rsi     # 0x271c3
leaq 0x21c29(%rip), %rdx     # 0x271c8
leaq -0x1d0(%rbp), %rdi
callq 0x79fe
leaq -0x1a0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2223a(%rip), %rdx     # 0x277f7
leaq -0x1b0(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x180(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22219(%rip), %rdx     # 0x277f7
leaq -0x190(%rbp), %rdi
movq %rdx, %rsi
callq 0x79fe
leaq -0x160(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x21bca(%rip), %rsi     # 0x271c9
leaq 0x21be2(%rip), %rdx     # 0x271e8
leaq -0x170(%rbp), %rdi
callq 0x79fe
leaq -0x1d0(%rbp), %rdx
leaq -0x1b0(%rbp), %rcx
leaq -0x190(%rbp), %r8
leaq -0x170(%rbp), %r9
movq %r15, %rdi
movl $0x38, %esi
callq 0x8788
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x5653
callq 0x4350
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x566b
callq 0x4350
movq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x5683
callq 0x4350
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x569b
callq 0x4350
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x56b3
callq 0x4350
movq -0x210(%rbp), %rdi
leaq -0x200(%rbp), %rax
cmpq %rax, %rdi
je 0x56cb
callq 0x4350
movq -0x230(%rbp), %rdi
leaq -0x220(%rbp), %rax
cmpq %rax, %rdi
je 0x56e3
callq 0x4350
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x56fb
callq 0x4350
movq -0x270(%rbp), %rdi
leaq -0x260(%rbp), %rax
cmpq %rax, %rdi
je 0x5713
callq 0x4350
movq -0x290(%rbp), %rdi
leaq -0x280(%rbp), %rax
cmpq %rax, %rdi
je 0x572b
callq 0x4350
movq -0x2b0(%rbp), %rdi
leaq -0x2a0(%rbp), %rax
cmpq %rax, %rdi
je 0x5743
callq 0x4350
movq -0x2d0(%rbp), %rdi
leaq -0x2c0(%rbp), %rax
cmpq %rax, %rdi
je 0x575b
callq 0x4350
movq -0x2f0(%rbp), %rdi
leaq -0x2e0(%rbp), %rax
cmpq %rax, %rdi
je 0x5773
callq 0x4350
movq -0x310(%rbp), %rdi
leaq -0x300(%rbp), %rax
cmpq %rax, %rdi
je 0x578b
callq 0x4350
movq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rax
cmpq %rax, %rdi
je 0x57a3
callq 0x4350
movq -0x350(%rbp), %rdi
leaq -0x340(%rbp), %rax
cmpq %rax, %rdi
je 0x57bb
callq 0x4350
movq -0x370(%rbp), %rdi
leaq -0x360(%rbp), %rax
cmpq %rax, %rdi
je 0x57d3
callq 0x4350
movq -0x390(%rbp), %rdi
leaq -0x380(%rbp), %rax
cmpq %rax, %rdi
je 0x57eb
callq 0x4350
movq -0x3b0(%rbp), %rdi
leaq -0x3a0(%rbp), %rax
cmpq %rax, %rdi
je 0x5803
callq 0x4350
movq -0x3d0(%rbp), %rdi
leaq -0x3c0(%rbp), %rax
cmpq %rax, %rdi
je 0x581b
callq 0x4350
movq -0x3f0(%rbp), %rdi
leaq -0x3e0(%rbp), %rax
cmpq %rax, %rdi
je 0x5833
callq 0x4350
movq -0x410(%rbp), %rdi
leaq -0x400(%rbp), %rax
cmpq %rax, %rdi
je 0x584b
callq 0x4350
movq -0x430(%rbp), %rdi
leaq -0x420(%rbp), %rax
cmpq %rax, %rdi
je 0x5863
callq 0x4350
movq -0x450(%rbp), %rdi
leaq -0x440(%rbp), %rax
cmpq %rax, %rdi
je 0x587b
callq 0x4350
movq -0x470(%rbp), %rdi
leaq -0x460(%rbp), %rax
cmpq %rax, %rdi
je 0x5893
callq 0x4350
movq -0x490(%rbp), %rdi
leaq -0x480(%rbp), %rax
cmpq %rax, %rdi
je 0x58ab
callq 0x4350
movq -0x4b0(%rbp), %rdi
leaq -0x4a0(%rbp), %rax
cmpq %rax, %rdi
je 0x58c3
callq 0x4350
movq -0x660(%rbp), %rdi
cmpq %r13, %rdi
je 0x58d4
callq 0x4350
movq -0x680(%rbp), %rdi
cmpq %r12, %rdi
je 0x58e5
callq 0x4350
leaq -0x768(%rbp), %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x91b0
movq -0x6d0(%rbp), %rax
movq -0x6c8(%rbp), %rcx
subq %rax, %rcx
cmpq $0x60, %rcx
je 0x5930
movq 0x2f6b3(%rip), %rax     # 0x34fc8
movq (%rax), %rsi
leaq -0x768(%rbp), %rdi
movl $0x1, %edx
callq 0x9752
movq -0x6d0(%rbp), %rax
leaq -0xb0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0xc0(%rbp), %rdi
callq 0x7960
movq -0x6d0(%rbp), %rax
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x7960
movq -0x6d0(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x7960
leaq -0x630(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x21833(%rip), %rsi     # 0x271e9
leaq 0x2183f(%rip), %rdx     # 0x271fc
leaq -0x640(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x640(%rbp), %rsi
callq 0x926a
movq %rax, %rdi
callq 0x8672
movss %xmm0, -0x38(%rbp)
movq -0x640(%rbp), %rdi
cmpq %r12, %rdi
je 0x59fa
callq 0x4350
leaq -0x610(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x217f0(%rip), %rsi     # 0x271fd
leaq 0x217f3(%rip), %rdx     # 0x27207
leaq -0x620(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x620(%rbp), %rsi
callq 0x926a
movq %rax, %rdi
callq 0x862c
movl %eax, -0x3c(%rbp)
movq -0x620(%rbp), %rdi
cmpq %r12, %rdi
je 0x5a4f
callq 0x4350
leaq -0x5f0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x217a6(%rip), %rsi     # 0x27208
leaq 0x217a9(%rip), %rdx     # 0x27212
leaq -0x600(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x600(%rbp), %rsi
callq 0x926a
movq %rax, %rdi
callq 0x862c
movl %eax, -0x48(%rbp)
movq -0x600(%rbp), %rdi
cmpq %r12, %rdi
je 0x5aa4
callq 0x4350
leaq -0x5d0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x216c6(%rip), %rsi     # 0x2717d
leaq 0x216cf(%rip), %rdx     # 0x2718d
leaq -0x5e0(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x5e0(%rbp), %rsi
callq 0x926a
movb 0x4a(%rax), %al
movb %al, -0x2a(%rbp)
movq -0x5e0(%rbp), %rdi
cmpq %r12, %rdi
je 0x5af4
callq 0x4350
leaq -0x5b0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x216bc(%rip), %rsi     # 0x271c3
leaq 0x216ba(%rip), %rdx     # 0x271c8
leaq -0x5c0(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x5c0(%rbp), %rsi
callq 0x926a
movb 0x4a(%rax), %al
movb %al, -0x29(%rbp)
movq -0x5c0(%rbp), %rdi
cmpq %r12, %rdi
je 0x5b44
callq 0x4350
leaq -0x4d8(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x590(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2169d(%rip), %rsi     # 0x27213
leaq 0x2169f(%rip), %rdx     # 0x2721c
leaq -0x5a0(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x5a0(%rbp), %rsi
callq 0x926a
movb 0x4a(%rax), %bl
movq -0x5a0(%rbp), %rdi
cmpq %r12, %rdi
je 0x5bb0
callq 0x4350
testb %bl, %bl
je 0x5cba
xorps %xmm0, %xmm0
movaps %xmm0, -0x120(%rbp)
movq $0x0, -0x110(%rbp)
leaq -0x550(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x21633(%rip), %rsi     # 0x27213
leaq 0x21635(%rip), %rdx     # 0x2721c
leaq -0x560(%rbp), %rdi
callq 0x79fe
leaq -0x768(%rbp), %rdi
leaq -0x560(%rbp), %rsi
callq 0x926a
movq %rax, %rdi
callq 0x86f6
leaq -0x570(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x580(%rbp), %rdi
callq 0x7960
leaq -0x580(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x1f190
movq -0x580(%rbp), %rdi
cmpq %r13, %rdi
je 0x5c53
callq 0x4350
movq -0x560(%rbp), %rdi
cmpq %r12, %rdi
je 0x5c64
callq 0x4350
movq -0x120(%rbp), %rbx
movq -0x118(%rbp), %r12
leaq -0x4e0(%rbp), %rax
movq %rax, -0x150(%rbp)
cmpq %r12, %rbx
je 0x5cae
leaq -0x150(%rbp), %r13
leaq -0x4e0(%rbp), %rdi
leaq -0x4d8(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x7a9c
addq $0x20, %rbx
cmpq %r12, %rbx
jne 0x5c8c
leaq -0x120(%rbp), %rdi
callq 0x6b3e
movq 0x2f327(%rip), %rdi     # 0x34fe8
movq (%rdi), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x8(%rdi,%rcx)
movq -0x18(%rax), %rax
orl $0x1, 0x18(%rdi,%rax)
leaq 0x2153c(%rip), %rsi     # 0x2721d
movl $0x1d, %edx
callq 0x4400
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq 0x2f2e8(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2f2d4(%rip), %rdi     # 0x34fe8
leaq 0x21520(%rip), %rsi     # 0x2723b
movl $0x20, %edx
callq 0x4400
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq 0x2f2ae(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2f29a(%rip), %rdi     # 0x34fe8
leaq 0x21507(%rip), %rsi     # 0x2725c
movl $0x1e, %edx
callq 0x4400
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq 0x2f274(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
movq 0x2f260(%rip), %rdi     # 0x34fe8
leaq 0x214ec(%rip), %rsi     # 0x2727b
movl $0x21, %edx
callq 0x4400
cvtss2sd -0x38(%rbp), %xmm0
movq 0x2f243(%rip), %rdi     # 0x34fe8
movsd %xmm0, -0xd0(%rbp)
callq 0x4590
movq %rax, %rdi
callq 0x4180
movq 0x2f227(%rip), %rdi     # 0x34fe8
leaq 0x214d5(%rip), %rsi     # 0x2729d
movl $0x32, %edx
callq 0x4400
movl -0x3c(%rbp), %esi
movq 0x2f20c(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
cmpq $0x0, -0x4b8(%rbp)
je 0x5e3d
movq 0x2f1ee(%rip), %rdi     # 0x34fe8
leaq 0x214cf(%rip), %rsi     # 0x272d0
movl $0x1a, %edx
callq 0x4400
movq -0x4b8(%rbp), %rsi
movq 0x2f1cf(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rbx
leaq 0x214c3(%rip), %rsi     # 0x272eb
movl $0x9, %edx
movq %rax, %rdi
callq 0x4400
movq %rbx, %rdi
callq 0x4180
movq 0x2f1a4(%rip), %rdi     # 0x34fe8
leaq 0x214aa(%rip), %rsi     # 0x272f5
movl $0x1f, %edx
callq 0x4400
movl -0x48(%rbp), %esi
movq 0x2f189(%rip), %rdi     # 0x34fe8
movq %rsi, -0xc8(%rbp)
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2f16e(%rip), %rdi     # 0x34fe8
leaq 0x21494(%rip), %rsi     # 0x27315
movl $0x22, %edx
callq 0x4400
movzbl -0x2a(%rbp), %esi
movq 0x2f152(%rip), %rdi     # 0x34fe8
callq 0x45d0
movq %rax, %rdi
callq 0x4180
movq 0x2f13e(%rip), %rdi     # 0x34fe8
leaq 0x21487(%rip), %rsi     # 0x27338
movl $0x1c, %edx
callq 0x4400
movzbl -0x29(%rbp), %r12d
movq 0x2f121(%rip), %rdi     # 0x34fe8
movl %r12d, %esi
callq 0x45d0
movq %rax, %rdi
callq 0x4180
leaq -0x118(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x148(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x6a8(%rbp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %rcx, -0x60(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq 0x2f0b2(%rip), %rdi     # 0x34fe8
leaq 0x21418(%rip), %rsi     # 0x27355
movl $0x13, %edx
callq 0x4400
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq 0x2f08c(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x530(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
addq %rsi, %rdx
leaq -0x540(%rbp), %rdi
callq 0x7960
leaq -0x540(%rbp), %rdi
leaq -0x150(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
movl %r12d, %ecx
callq 0x1e96e
movl %eax, %ebx
movq -0x540(%rbp), %rdi
cmpq %r13, %rdi
je 0x5fbe
callq 0x4350
testl %ebx, %ebx
jns 0x5feb
movq 0x2f01f(%rip), %rdi     # 0x34fe8
leaq 0x21399(%rip), %rsi     # 0x27369
movl $0x27, %edx
callq 0x4400
movq 0x2f007(%rip), %rdi     # 0x34fe8
callq 0x4180
jmp 0x6144
movq 0x2eff6(%rip), %rdi     # 0x34fe8
leaq 0x217fd(%rip), %rsi     # 0x277f6
movl $0x1, %edx
callq 0x4400
movq 0x2efde(%rip), %rdi     # 0x34fe8
leaq 0x212fd(%rip), %rsi     # 0x2730e
movl $0x6, %edx
callq 0x4400
movq -0x128(%rbp), %rsi
movq 0x2efbf(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq 0x2efab(%rip), %rdi     # 0x34fe8
leaq 0x217b2(%rip), %rsi     # 0x277f6
movl $0x1, %edx
callq 0x4400
movq 0x2ef93(%rip), %rdi     # 0x34fe8
leaq 0x21335(%rip), %rsi     # 0x27391
movl $0x17, %edx
callq 0x4400
movl -0x4c(%rbp), %esi
movq 0x2ef78(%rip), %rdi     # 0x34fe8
callq 0x4620
movq %rax, %rdi
callq 0x4180
leaq -0x150(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl -0x3c(%rbp), %edx
movl %r12d, %ecx
callq 0x68d7
movq 0x2ef4b(%rip), %rdi     # 0x34fe8
leaq 0x21305(%rip), %rsi     # 0x273a9
movl $0x18, %edx
callq 0x4400
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq 0x2ef25(%rip), %rdi     # 0x34fe8
callq 0x4400
movq %rax, %rdi
callq 0x4180
leaq -0x510(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x520(%rbp), %rdi
callq 0x7960
leaq -0x520(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1f190
movl %eax, %ebx
movq -0x520(%rbp), %rdi
cmpq %r12, %rdi
je 0x611c
callq 0x4350
testl %ebx, %ebx
jns 0x614e
movq 0x2eec1(%rip), %rdi     # 0x34fe8
leaq 0x21294(%rip), %rsi     # 0x273c2
movl $0x2c, %edx
callq 0x4400
movq 0x2eea9(%rip), %rdi     # 0x34fe8
callq 0x4180
movl $0x1, %edi
callq 0x4420
movq 0x2ee93(%rip), %rdi     # 0x34fe8
leaq 0x2169a(%rip), %rsi     # 0x277f6
movl $0x1, %edx
callq 0x4400
movq 0x2ee7b(%rip), %rdi     # 0x34fe8
leaq 0x2127b(%rip), %rsi     # 0x273ef
movl $0x1f, %edx
callq 0x4400
movq -0x68(%rbp), %rsi
subq -0x70(%rbp), %rsi
sarq $0x5, %rsi
movq 0x2ee57(%rip), %rdi     # 0x34fe8
callq 0x4250
movq %rax, %rdi
callq 0x4180
cmpb $0x0, -0x2a(%rbp)
je 0x61ad
leaq 0x12ab4(%rip), %rax     # 0x18c5f
jmp 0x61b4
leaq 0x124e7(%rip), %rax     # 0x1869b
movq %rax, -0x80(%rbp)
movb -0x29(%rbp), %al
movb %al, -0x78(%rbp)
movq 0x2ee23(%rip), %rdi     # 0x34fe8
callq 0x4180
movq %rax, %rbx
leaq 0x2123b(%rip), %rsi     # 0x2740f
movl $0x11, %edx
movq %rax, %rdi
callq 0x4400
movq %rbx, %rdi
callq 0x4180
leaq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rsi
leaq -0x150(%rbp), %rdx
leaq -0x6b0(%rbp), %rcx
callq 0x1f60c
movsd %xmm0, -0x38(%rbp)
movq 0x2edd8(%rip), %rdi     # 0x34fe8
leaq 0x2120a(%rip), %rsi     # 0x27421
movl $0xc, %edx
callq 0x4400
movq 0x2edc0(%rip), %rdi     # 0x34fe8
movsd -0x38(%rbp), %xmm0
callq 0x4590
movq %rax, %rdi
callq 0x4180
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movq 0x2ed9f(%rip), %r12     # 0x34fe8
leaq -0x150(%rbp), %r13
movq -0xc8(%rbp), %rax
cmpq %rax, -0x128(%rbp)
jbe 0x636b
movsd -0x38(%rbp), %xmm0
addsd -0xd0(%rbp), %xmm0
leaq -0x80(%rbp), %rdi
leaq -0x6b0(%rbp), %rsi
movsd %xmm0, -0x38(%rbp)
leaq -0x4e0(%rbp), %rdx
movl -0x3c(%rbp), %ecx
callq 0x1fb04
movl $0xc, %edx
movq %r12, %rdi
leaq 0x2118f(%rip), %rsi     # 0x2742e
callq 0x4400
movq %r12, %rdi
movsd -0x38(%rbp), %xmm0
callq 0x4590
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x21533(%rip), %rsi     # 0x277f6
callq 0x4400
movl $0x11, %edx
movq %rbx, %rdi
leaq 0x21164(%rip), %rsi     # 0x2743b
callq 0x4400
movq -0x688(%rbp), %rsi
movq %rbx, %rdi
callq 0x4250
movq %rax, %rdi
callq 0x4180
movq %r13, %rdi
leaq -0x6b0(%rbp), %rsi
callq 0x6f70
movq %r13, %rdi
movsd 0x20cfb(%rip), %xmm0    # 0x27008
callq 0x1f4a2
movq %r13, %rdi
leaq -0x120(%rbp), %rsi
callq 0x6ace
leaq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movq %r13, %rdx
leaq -0x6b0(%rbp), %rcx
callq 0x1f60c
movsd %xmm0, -0x48(%rbp)
movl $0xc, %edx
movq %r12, %rdi
leaq 0x210d5(%rip), %rsi     # 0x27421
callq 0x4400
movq %r12, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x4590
movq %rax, %rdi
callq 0x4180
jmp 0x6250
leaq -0x4f0(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
addq %rsi, %rdx
leaq -0x500(%rbp), %rdi
callq 0x7960
leaq -0x500(%rbp), %rdi
leaq -0x150(%rbp), %rsi
xorl %edx, %edx
movl $0x6, %ecx
callq 0x1edce
leaq -0x500(%rbp), %rdi
callq 0x4708
xorl %edi, %edi
callq 0x4420
movq %rax, %rbx
movq -0x500(%rbp), %rdi
jmp 0x63e1
jmp 0x63fe
jmp 0x63fe
jmp 0x63fe
jmp 0x63fe
jmp 0x63fe
movq %rax, %rbx
movq -0x520(%rbp), %rdi
cmpq %r12, %rdi
jne 0x63f7
jmp 0x6401
movq %rax, %rbx
movq -0x540(%rbp), %rdi
cmpq %r13, %rdi
je 0x6401
callq 0x4350
jmp 0x6401
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x6b3e
leaq -0x6b0(%rbp), %rdi
callq 0x7776
leaq -0x150(%rbp), %rdi
callq 0x7776
leaq -0x120(%rbp), %rdi
callq 0x778e
jmp 0x648a
jmp 0x6487
jmp 0x6460
movq %rax, %rbx
movq -0x580(%rbp), %rdi
cmpq %r13, %rdi
je 0x644d
callq 0x4350
jmp 0x644d
movq %rax, %rbx
movq -0x560(%rbp), %rdi
cmpq %r12, %rdi
je 0x6463
callq 0x4350
jmp 0x6463
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x6b3e
jmp 0x648a
movq %rax, %rbx
movq -0x5a0(%rbp), %rdi
cmpq %r12, %rdi
je 0x648a
callq 0x4350
jmp 0x648a
movq %rax, %rbx
leaq -0x4e0(%rbp), %rdi
callq 0x778e
jmp 0x64e9
movq %rax, %rbx
movq -0x5c0(%rbp), %rdi
jmp 0x64da
jmp 0x64e6
movq %rax, %rbx
movq -0x5e0(%rbp), %rdi
jmp 0x64da
jmp 0x64e6
movq %rax, %rbx
movq -0x600(%rbp), %rdi
jmp 0x64da
jmp 0x64e6
movq %rax, %rbx
movq -0x620(%rbp), %rdi
jmp 0x64da
jmp 0x64e6
movq %rax, %rbx
movq -0x640(%rbp), %rdi
cmpq %r12, %rdi
je 0x64e9
callq 0x4350
jmp 0x64e9
movq %rax, %rbx
movq -0xf0(%rbp), %rdi
leaq -0xe0(%rbp), %rax
cmpq %rax, %rdi
je 0x6506
callq 0x4350
jmp 0x6506
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x651c
callq 0x4350
jmp 0x651c
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
jne 0x687d
jmp 0x6887
jmp 0x6884
jmp 0x6884
movq %rax, %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x655b
callq 0x4350
jmp 0x655b
movq %rax, %rbx
movq -0x190(%rbp), %rdi
leaq -0x180(%rbp), %rax
cmpq %rax, %rdi
je 0x6578
callq 0x4350
jmp 0x6578
movq %rax, %rbx
movq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rax
cmpq %rax, %rdi
je 0x6595
callq 0x4350
jmp 0x6595
movq %rax, %rbx
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x65b4
callq 0x4350
jmp 0x65b4
jmp 0x65b1
movq %rax, %rbx
movq -0x1f0(%rbp), %rdi
leaq -0x1e0(%rbp), %rax
cmpq %rax, %rdi
je 0x65d1
callq 0x4350
jmp 0x65d1
movq %rax, %rbx
movq -0x210(%rbp), %rdi
leaq -0x200(%rbp), %rax
cmpq %rax, %rdi
je 0x65ee
callq 0x4350
jmp 0x65ee
movq %rax, %rbx
movq -0x230(%rbp), %rdi
leaq -0x220(%rbp), %rax
cmpq %rax, %rdi
je 0x660b
callq 0x4350
jmp 0x660b
movq %rax, %rbx
movq -0x250(%rbp), %rdi
leaq -0x240(%rbp), %rax
cmpq %rax, %rdi
je 0x662a
callq 0x4350
jmp 0x662a
jmp 0x6627
movq %rax, %rbx
movq -0x270(%rbp), %rdi
leaq -0x260(%rbp), %rax
cmpq %rax, %rdi
je 0x6647
callq 0x4350
jmp 0x6647
movq %rax, %rbx
movq -0x290(%rbp), %rdi
leaq -0x280(%rbp), %rax
cmpq %rax, %rdi
je 0x6664
callq 0x4350
jmp 0x6664
movq %rax, %rbx
movq -0x2b0(%rbp), %rdi
leaq -0x2a0(%rbp), %rax
cmpq %rax, %rdi
je 0x6681
callq 0x4350
jmp 0x6681
movq %rax, %rbx
movq -0x2d0(%rbp), %rdi
leaq -0x2c0(%rbp), %rax
cmpq %rax, %rdi
je 0x66a0
callq 0x4350
jmp 0x66a0
jmp 0x669d
movq %rax, %rbx
movq -0x2f0(%rbp), %rdi
leaq -0x2e0(%rbp), %rax
cmpq %rax, %rdi
je 0x66bd
callq 0x4350
jmp 0x66bd
movq %rax, %rbx
movq -0x310(%rbp), %rdi
leaq -0x300(%rbp), %rax
cmpq %rax, %rdi
je 0x66da
callq 0x4350
jmp 0x66da
movq %rax, %rbx
movq -0x330(%rbp), %rdi
leaq -0x320(%rbp), %rax
cmpq %rax, %rdi
je 0x66f7
callq 0x4350
jmp 0x66f7
movq %rax, %rbx
movq -0x350(%rbp), %rdi
leaq -0x340(%rbp), %rax
cmpq %rax, %rdi
je 0x6716
callq 0x4350
jmp 0x6716
jmp 0x6713
movq %rax, %rbx
movq -0x370(%rbp), %rdi
leaq -0x360(%rbp), %rax
cmpq %rax, %rdi
je 0x6733
callq 0x4350
jmp 0x6733
movq %rax, %rbx
movq -0x390(%rbp), %rdi
leaq -0x380(%rbp), %rax
cmpq %rax, %rdi
je 0x6750
callq 0x4350
jmp 0x6750
movq %rax, %rbx
movq -0x3b0(%rbp), %rdi
leaq -0x3a0(%rbp), %rax
cmpq %rax, %rdi
je 0x676d
callq 0x4350
jmp 0x676d
movq %rax, %rbx
movq -0x3d0(%rbp), %rdi
leaq -0x3c0(%rbp), %rax
cmpq %rax, %rdi
je 0x678c
callq 0x4350
jmp 0x678c
jmp 0x6789
movq %rax, %rbx
movq -0x3f0(%rbp), %rdi
leaq -0x3e0(%rbp), %rax
cmpq %rax, %rdi
je 0x67a9
callq 0x4350
jmp 0x67a9
movq %rax, %rbx
movq -0x410(%rbp), %rdi
leaq -0x400(%rbp), %rax
cmpq %rax, %rdi
je 0x67c6
callq 0x4350
jmp 0x67c6
movq %rax, %rbx
movq -0x430(%rbp), %rdi
leaq -0x420(%rbp), %rax
cmpq %rax, %rdi
je 0x67e3
callq 0x4350
jmp 0x67e3
movq %rax, %rbx
movq -0x450(%rbp), %rdi
leaq -0x440(%rbp), %rax
cmpq %rax, %rdi
je 0x6802
callq 0x4350
jmp 0x6802
jmp 0x67ff
movq %rax, %rbx
movq -0x470(%rbp), %rdi
leaq -0x460(%rbp), %rax
cmpq %rax, %rdi
je 0x681f
callq 0x4350
jmp 0x681f
movq %rax, %rbx
movq -0x490(%rbp), %rdi
leaq -0x480(%rbp), %rax
cmpq %rax, %rdi
je 0x683c
callq 0x4350
jmp 0x683c
movq %rax, %rbx
movq -0x4b0(%rbp), %rdi
leaq -0x4a0(%rbp), %rax
cmpq %rax, %rdi
je 0x6859
callq 0x4350
jmp 0x6859
movq %rax, %rbx
movq -0x660(%rbp), %rdi
cmpq %r13, %rdi
je 0x6871
callq 0x4350
jmp 0x6871
jmp 0x686e
movq %rax, %rbx
movq -0x680(%rbp), %rdi
cmpq %r12, %rdi
je 0x6887
callq 0x4350
jmp 0x6887
movq %rax, %rbx
leaq -0x6d0(%rbp), %rdi
callq 0x6b3e
leaq -0x700(%rbp), %rdi
callq 0x782c
leaq -0x730(%rbp), %rdi
callq 0x7896
leaq -0x748(%rbp), %r14
movq %r14, %rdi
callq 0x77f8
movq -0x20(%r14), %rdi
leaq -0x758(%rbp), %rax
cmpq %rax, %rdi
je 0x68cf
callq 0x4350
movq %rbx, %rdi
callq 0x4650