// File: /workspace/github_c_makefile_star2_O3/stanfordnlp[P]GloVe/src/cooccur.c
// Function: get_cooccurrence
int get_cooccurrence(void) {
    int flag, x, y, fidcounter = 1;
    long long a, j = 0, k, id, counter = 0, ind = 0, vocab_size, w1, w2, *lookup = NULL, *history = NULL;
    char format[20], filename[200], str[MAX_STRING_LENGTH + 1];
    FILE *fid, *foverflow;
    real *bigram_table = NULL, r;
    HASHREC *htmp, **vocab_hash = inithashtable();
    CREC *cr = malloc(sizeof(CREC) * (overflow_length + 1));
    history = malloc(sizeof(long long) * window_size);
    
    fprintf(stderr, "COUNTING COOCCURRENCES\n");
    if (verbose > 0) {
        fprintf(stderr, "window size: %d\n", window_size);
        if (symmetric == 0) fprintf(stderr, "context: asymmetric\n");
        else fprintf(stderr, "context: symmetric\n");
    }
    if (verbose > 1) fprintf(stderr, "max product: %lld\n", max_product);
    if (verbose > 1) fprintf(stderr, "overflow length: %lld\n", overflow_length);
    sprintf(format,"%%%ds %%lld", MAX_STRING_LENGTH); // Format to read from vocab file, which has (irrelevant) frequency data
    if (verbose > 1) fprintf(stderr, "Reading vocab from file \"%s\"...", vocab_file);
    fid = fopen(vocab_file,"r");
    if (fid == NULL) { 
        log_file_loading_error("vocab file", vocab_file);
        free_resources(vocab_hash, cr, lookup, history, bigram_table);
        return 1;
    }
    while (fscanf(fid, format, str, &id) != EOF) hashinsert(vocab_hash, str, ++j); // Here id is not used: inserting vocab words into hash table with their frequency rank, j
    fclose(fid);
    vocab_size = j;
    j = 0;
    if (verbose > 1) fprintf(stderr, "loaded %lld words.\nBuilding lookup table...", vocab_size);
    
    /* Build auxiliary lookup table used to index into bigram_table */
    lookup = (long long *)calloc( vocab_size + 1, sizeof(long long) );
    if (lookup == NULL) {
        fprintf(stderr, "Couldn't allocate memory!");
        free_resources(vocab_hash, cr, lookup, history, bigram_table);
        return 1;
    }
    lookup[0] = 1;
    for (a = 1; a <= vocab_size; a++) {
        if ((lookup[a] = max_product / a) < vocab_size) lookup[a] += lookup[a-1];
        else lookup[a] = lookup[a-1] + vocab_size;
    }
    if (verbose > 1) fprintf(stderr, "table contains %lld elements.\n",lookup[a-1]);
    
    /* Allocate memory for full array which will store all cooccurrence counts for words whose product of frequency ranks is less than max_product */
    bigram_table = (real *)calloc( lookup[a-1] , sizeof(real) );
    if (bigram_table == NULL) {
        fprintf(stderr, "Couldn't allocate memory!");
        free_resources(vocab_hash, cr, lookup, history, bigram_table);
        return 1;
    }
    
    fid = stdin;
    // sprintf(format,"%%%ds",MAX_STRING_LENGTH);
    sprintf(filename,"%s_%04d.bin", file_head, fidcounter);
    foverflow = fopen(filename,"wb");
    if (verbose > 1) fprintf(stderr,"Processing token: 0");

    // if symmetric > 0, we can increment ind twice per iteration,
    // meaning up to 2x window_size in one loop
    long long const overflow_threshold = symmetric == 0 ? overflow_length - window_size : overflow_length - 2 * window_size;
    
    /* For each token in input stream, calculate a weighted cooccurrence sum within window_size */
    while (1) {
        if (ind >= overflow_threshold) {
            // If overflow buffer is (almost) full, sort it and write it to temporary file
            qsort(cr, ind, sizeof(CREC), compare_crec);
            write_chunk(cr,ind,foverflow);
            fclose(foverflow);
            fidcounter++;
            sprintf(filename,"%s_%04d.bin",file_head,fidcounter);
            foverflow = fopen(filename,"wb");
            ind = 0;
        }
        flag = get_word(str, fid);
        if (verbose > 2) fprintf(stderr, "Maybe processing token: %s\n", str);
        if (flag == 1) {
            // Newline, reset line index (j); maybe eof.
            if (feof(fid)) {
                if (verbose > 2) fprintf(stderr, "Not getting coocurs as at eof\n");
                break;
            }
            j = 0;
            if (verbose > 2) fprintf(stderr, "Not getting coocurs as at newline\n");
            continue;
        }
        counter++;
        if ((counter%100000) == 0) if (verbose > 1) fprintf(stderr,"\033[19G%lld",counter);
        htmp = hashsearch(vocab_hash, str);
        if (htmp == NULL) {
            if (verbose > 2) fprintf(stderr, "Not getting coocurs as word not in vocab\n");
            continue; // Skip out-of-vocabulary words
        }
        w2 = htmp->num; // Target word (frequency rank)
        for (k = j - 1; k >= ( (j > window_size) ? j - window_size : 0 ); k--) { // Iterate over all words to the left of target word, but not past beginning of line
            w1 = history[k % window_size]; // Context word (frequency rank)
            if (verbose > 2) fprintf(stderr, "Adding cooccur between words %lld and %lld.\n", w1, w2);
            if ( w1 < max_product/w2 ) { // Product is small enough to store in a full array
                bigram_table[lookup[w1-1] + w2 - 2] += distance_weighting ? 1.0/((real)(j-k)) : 1.0; // Weight by inverse of distance between words if needed
                if (symmetric > 0) bigram_table[lookup[w2-1] + w1 - 2] += distance_weighting ? 1.0/((real)(j-k)) : 1.0; // If symmetric context is used, exchange roles of w2 and w1 (ie look at right context too)
            }
            else { // Product is too big, data is likely to be sparse. Store these entries in a temporary buffer to be sorted, merged (accumulated), and written to file when it gets full.
                cr[ind].word1 = w1;
                cr[ind].word2 = w2;
                cr[ind].val = distance_weighting ? 1.0/((real)(j-k)) : 1.0;
                ind++; // Keep track of how full temporary buffer is
                if (symmetric > 0) { // Symmetric context
                    cr[ind].word1 = w2;
                    cr[ind].word2 = w1;
                    cr[ind].val = distance_weighting ? 1.0/((real)(j-k)) : 1.0;
                    ind++;
                }
            }
        }
        history[j % window_size] = w2; // Target word is stored in circular buffer to become context word in the future
        j++;
    }
    
    /* Write out temp buffer for the final time (it may not be full) */
    if (verbose > 1) fprintf(stderr,"\033[0GProcessed %lld tokens.\n",counter);
    qsort(cr, ind, sizeof(CREC), compare_crec);
    write_chunk(cr,ind,foverflow);
    sprintf(filename,"%s_0000.bin",file_head);
    
    /* Write out full bigram_table, skipping zeros */
    if (verbose > 1) fprintf(stderr, "Writing cooccurrences to disk");
    fid = fopen(filename,"wb");
    j = 1e6;
    for (x = 1; x <= vocab_size; x++) {
        if ( (long long) (0.75*log(vocab_size / x)) < j) {
            j = (long long) (0.75*log(vocab_size / x));
            if (verbose > 1) fprintf(stderr,".");
        } // log's to make it look (sort of) pretty
        for (y = 1; y <= (lookup[x] - lookup[x-1]); y++) {
            if ((r = bigram_table[lookup[x-1] - 2 + y]) != 0) {
                fwrite(&x, sizeof(int), 1, fid);
                fwrite(&y, sizeof(int), 1, fid);
                fwrite(&r, sizeof(real), 1, fid);
            }
        }
    }
    
    if (verbose > 1) fprintf(stderr,"%d files in total.\n",fidcounter + 1);
    fclose(fid);
    fclose(foverflow);
    free_resources(vocab_hash, cr, lookup, history, bigram_table);
    return merge_files(fidcounter + 1); // Merge the sorted temporary files
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x568, %rsp            # imm = 0x568
callq 0x2b48
movq %rax, %r15
movq 0x4f20(%rip), %rdi      # 0x6130
shlq $0x4, %rdi
addq $0x10, %rdi
callq 0x1170
movq %rax, %r12
movslq 0x4edd(%rip), %rdi      # 0x6104
shlq $0x3, %rdi
callq 0x1170
movq %rax, 0x20(%rsp)
movq 0x4dbc(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1ed5(%rip), %rdi      # 0x311b
pushq $0x17
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x11d0
cmpl $0x0, 0x4ea5(%rip)      # 0x6100
jg 0x1a06
leaq 0x1f2f(%rip), %rsi      # 0x3197
leaq 0x80(%rsp), %rdi
movl $0x3e8, %edx            # imm = 0x3E8
xorl %eax, %eax
callq 0x11b0
cmpl $0x2, 0x4e7d(%rip)      # 0x6100
jge 0x1a42
movq 0x4eb0(%rip), %rdi      # 0x6140
leaq 0x1f2c(%rip), %rsi      # 0x31c3
callq 0x1190
pushq $0x1
popq %rbp
testq %rax, %rax
je 0x1319
movq %rax, %r14
movq %r12, 0x18(%rsp)
movq %r15, 0x28(%rsp)
leaq 0x80(%rsp), %rsi
leaq 0x170(%rsp), %rdx
leaq 0x78(%rsp), %rcx
movq %rax, %rdi
xorl %eax, %eax
callq 0x1070
cmpl $-0x1, %eax
je 0x1346
leaq 0x170(%rsp), %r15
leaq 0x78(%rsp), %r13
xorl %ebp, %ebp
movq 0x28(%rsp), %r12
incq %rbp
movq %r12, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x20e2
movq %r14, %rdi
leaq 0x80(%rsp), %rsi
movq %r15, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x1070
cmpl $-0x1, %eax
jne 0x12e9
jmp 0x1348
movq 0x4e20(%rip), %rsi      # 0x6140
leaq 0x1e9e(%rip), %rdi      # 0x31c5
callq 0x1ee4
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq 0x20(%rsp), %rcx
xorl %r8d, %r8d
callq 0x291c
jmp 0x19f2
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x10d0
cmpl $0x2, 0x4da9(%rip)      # 0x6100
movq 0x18(%rsp), %r12
jge 0x1a66
leaq 0x1(%rbp), %rdi
pushq $0x8
popq %rsi
callq 0x1130
testq %rax, %rax
je 0x1a86
movq %rax, %r13
movq $0x1, (%rax)
testq %rbp, %rbp
je 0x13bf
movq 0x4dab(%rip), %rcx      # 0x6138
movq (%r13), %rsi
movq %rbp, %rdi
negq %rdi
movq %rcx, %rax
cqto
idivq %rbx
cmpq %rbp, %rax
jl 0x13a7
movq %rbp, %rax
addq %rax, %rsi
movq %rsi, (%r13,%rbx,8)
leaq (%rdi,%rbx), %rax
incq %rax
incq %rbx
cmpq $0x1, %rax
jne 0x1397
cmpl $0x1, 0x4d3a(%rip)      # 0x6100
jg 0x1aae
movq (%r13,%rbp,8), %rbx
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x1130
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x1ad3
movq 0x4be7(%rip), %rax      # 0x5fd8
movq (%rax), %rbx
movq 0x4d2d(%rip), %rdx      # 0x6128
leaq 0x1cc2(%rip), %rsi      # 0x30c4
leaq 0xa0(%rsp), %r14
pushq $0x1
popq %rcx
movq %r14, %rdi
movl %ecx, 0x4(%rsp)
xorl %eax, %eax
callq 0x11b0
leaq 0x1e13(%rip), %rsi      # 0x3235
movq %r14, %rdi
callq 0x1190
movq %rax, 0x38(%rsp)
cmpl $0x2, 0x4cca(%rip)      # 0x6100
jge 0x1b0f
cmpl $0x0, 0x4cc5(%rip)      # 0x6108
setne %cl
movslq 0x4cb7(%rip), %rax      # 0x6104
shlq %cl, %rax
movq 0x4cd9(%rip), %rcx      # 0x6130
subq %rax, %rcx
movq %rcx, 0x48(%rsp)
movq 0x40(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x58(%rsp)
xorl %r14d, %r14d
movq $0x0, 0x30(%rsp)
xorl %edi, %edi
movq %rbp, 0x50(%rsp)
movq %rdi, 0x8(%rsp)
cmpq 0x48(%rsp), %r14
jl 0x14fd
movq %r12, %rdi
movq %r14, %rsi
pushq $0x10
popq %rdx
leaq 0xda1(%rip), %rcx       # 0x223d
callq 0x1090
movq %r12, %rdi
movq %r14, %rsi
movq 0x38(%rsp), %r14
movq %r14, %rdx
callq 0x2196
movq %r14, %rdi
callq 0x10d0
movl 0x4(%rsp), %ecx
incl %ecx
movq 0x4c5f(%rip), %rdx      # 0x6128
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
leaq 0x1be9(%rip), %rsi      # 0x30c4
movl %ecx, 0x4(%rsp)
xorl %eax, %eax
callq 0x11b0
movq %r14, %rdi
leaq 0x1d45(%rip), %rsi      # 0x3235
callq 0x1190
movq %rax, 0x38(%rsp)
xorl %r14d, %r14d
leaq 0x170(%rsp), %rdi
movq %rbx, %rsi
callq 0x2b57
movl %eax, %r15d
cmpl $0x3, 0x4be9(%rip)      # 0x6100
jge 0x1566
cmpl $0x1, %r15d
jne 0x1588
movq %rbx, %rdi
callq 0x1160
movl 0x4bd3(%rip), %ecx      # 0x6100
testl %eax, %eax
jne 0x17e2
movl $0x0, %edi
cmpl $0x3, %ecx
jl 0x1480
movq 0x4aae(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1d33(%rip), %rdi      # 0x3287
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
xorl %edi, %edi
jmp 0x1480
movq 0x4a8b(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1cd5(%rip), %rsi      # 0x324c
leaq 0x170(%rsp), %rdx
xorl %eax, %eax
callq 0x1150
jmp 0x1519
movq 0x30(%rsp), %rax
incq %rax
movq %rax, 0x30(%rsp)
xorl %edx, %edx
movl $0x186a0, %ecx          # imm = 0x186A0
divq %rcx
testq %rdx, %rdx
jne 0x15b1
cmpl $0x2, 0x4b55(%rip)      # 0x6100
jge 0x17c0
movq 0x28(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x205c
testq %rax, %rax
je 0x1788
movq 0x8(%rax), %r8
movslq 0x4b2d(%rip), %rsi      # 0x6104
movq 0x8(%rsp), %rdi
movq %rdi, %rax
subq %rsi, %rax
movl $0x0, %ecx
cmovleq %rcx, %rax
cmpq %rax, %rdi
jle 0x1765
movq 0x58(%rsp), %rax
leaq (%rax,%r8,8), %r9
movl 0x4afd(%rip), %ecx      # 0x6100
pushq $0x1
popq %rbp
movq %rdi, %r12
movq %r8, 0x68(%rsp)
movq %r9, 0x60(%rsp)
decq %r12
movq %r12, %rax
cqto
idivq %rsi
movq 0x20(%rsp), %rax
movq (%rax,%rdx,8), %r15
cmpl $0x3, %ecx
jge 0x172d
movq 0x4b01(%rip), %rax      # 0x6138
cqto
idivq %r8
cvtsi2sd %rbp, %xmm0
cmpq %rax, %r15
jge 0x16a3
cmpl $0x0, 0x4acb(%rip)      # 0x6118
movsd 0x19b3(%rip), %xmm1     # 0x3008
je 0x1663
movsd 0x19a9(%rip), %xmm1     # 0x3008
divsd %xmm0, %xmm1
movq -0x8(%r13,%r15,8), %rax
movsd (%r9,%rax,8), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%r9,%rax,8)
cmpl $0x0, 0x4a89(%rip)      # 0x6108
jle 0x1709
movq -0x8(%r13,%r8,8), %rax
movq 0x40(%rsp), %rdx
leaq (%rdx,%rax,8), %rax
addsd -0x10(%rax,%r15,8), %xmm1
movsd %xmm1, -0x10(%rax,%r15,8)
jmp 0x1709
movq %r14, %rax
shlq $0x4, %rax
movq 0x18(%rsp), %rdx
movl %r15d, (%rdx,%rax)
movl %r8d, 0x4(%rdx,%rax)
cmpl $0x0, 0x4a59(%rip)      # 0x6118
movsd 0x1941(%rip), %xmm1     # 0x3008
je 0x16d5
movsd 0x1937(%rip), %xmm1     # 0x3008
divsd %xmm0, %xmm1
movq 0x18(%rsp), %rdx
movsd %xmm1, 0x8(%rdx,%rax)
leaq 0x1(%r14), %rax
cmpl $0x0, 0x4a1d(%rip)      # 0x6108
jle 0x1706
shlq $0x4, %rax
movl %r8d, (%rdx,%rax)
movl %r15d, 0x4(%rdx,%rax)
movsd %xmm1, 0x8(%rdx,%rax)
addq $0x2, %r14
jmp 0x1709
movq %rax, %r14
movslq 0x49f4(%rip), %rsi      # 0x6104
movq %rdi, %rax
subq %rsi, %rax
movl $0x0, %edx
cmovleq %rdx, %rax
incq %rbp
cmpq %rax, %r12
jg 0x1613
jmp 0x1765
movq 0x48c4(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1ba0(%rip), %rsi      # 0x32de
movq %r15, %rdx
movq %r8, %rcx
xorl %eax, %eax
callq 0x1150
movq 0x60(%rsp), %r9
movq 0x68(%rsp), %r8
movq 0x8(%rsp), %rdi
movl 0x49a0(%rip), %ecx      # 0x6100
jmp 0x1630
movq %rdi, %rax
cqto
idivq %rsi
movq 0x20(%rsp), %rax
movq %r8, (%rax,%rdx,8)
incq %rdi
movq 0x18(%rsp), %r12
movq 0x50(%rsp), %rbp
jmp 0x1480
cmpl $0x3, 0x4971(%rip)      # 0x6100
movq 0x8(%rsp), %rdi
jl 0x1480
movq 0x4857(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1b09(%rip), %rdi      # 0x32b4
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
movq 0x8(%rsp), %rdi
jmp 0x1480
movq 0x4831(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1ad9(%rip), %rsi      # 0x32aa
movq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x1150
jmp 0x15b1
cmpl $0x3, %ecx
jge 0x1b30
cmpl $0x2, %ecx
jge 0x1b57
leaq 0xa42(%rip), %rcx       # 0x223d
pushq $0x10
popq %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1090
movq %r12, %rdi
movq %r14, %rsi
movq 0x38(%rsp), %rdx
callq 0x2196
movq 0x4908(%rip), %rdx      # 0x6128
leaq 0x1b00(%rip), %rsi      # 0x3327
leaq 0xa0(%rsp), %rdi
xorl %eax, %eax
callq 0x11b0
cmpl $0x2, 0x48c3(%rip)      # 0x6100
jge 0x1b79
leaq 0x19eb(%rip), %rsi      # 0x3235
leaq 0xa0(%rsp), %rdi
callq 0x1190
movq %rax, %rbx
movl $0x1, 0x14(%rsp)
testq %rbp, %rbp
jle 0x19a5
movq %rbp, %rax
movl $0xf4240, %ecx          # imm = 0xF4240
movq %rcx, 0x8(%rsp)
pushq $0x1
popq %r14
pushq $0x1
popq %r15
pushq $0x4
popq %rbp
pushq $0x8
popq %r12
movq %r14, %rcx
cqto
idivq %rcx
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x48(%rsp)
callq 0x1110
mulsd 0x1769(%rip), %xmm0     # 0x3010
cvttsd2si %xmm0, %rax
cmpq %rax, 0x8(%rsp)
jle 0x18eb
movsd 0x48(%rsp), %xmm0
callq 0x1110
mulsd 0x174a(%rip), %xmm0     # 0x3010
cvttsd2si %xmm0, %rax
movq %rax, 0x8(%rsp)
cmpl $0x2, 0x4829(%rip)      # 0x6100
jl 0x18eb
movq 0x4718(%rip), %rax      # 0x5ff8
movq (%rax), %rsi
pushq $0x2e
popq %rdi
callq 0x1120
movl $0x1, 0x10(%rsp)
movslq %r15d, %rax
movq -0x8(%r13,%rax,8), %rcx
cmpq %rcx, (%r13,%rax,8)
jle 0x198c
pushq $0x1
popq %rax
movq %r14, %rdx
movq 0x58(%rsp), %rsi
leaq (%rsi,%rcx,8), %rcx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
ucomisd 0x16f0(%rip), %xmm0     # 0x3018
jne 0x192c
jnp 0x196e
leaq 0x14(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x11d0
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x11d0
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x11d0
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %r15d
incl %eax
movl %eax, 0x10(%rsp)
movslq %eax, %rdx
movslq %r15d, %rsi
movq -0x8(%r13,%rsi,8), %rcx
movq (%r13,%rsi,8), %rsi
subq %rcx, %rsi
cmpq %rdx, %rsi
jge 0x190c
incl %r15d
movl %r15d, 0x14(%rsp)
movslq %r15d, %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
jge 0x188a
cmpl $0x1, 0x4754(%rip)      # 0x6100
jg 0x1b9a
movl 0x4(%rsp), %ebp
incl %ebp
movq 0x18(%rsp), %r14
movq %rbx, %rdi
callq 0x10d0
movq 0x38(%rsp), %rdi
callq 0x10d0
movq 0x28(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq 0x20(%rsp), %rcx
movq 0x40(%rsp), %r8
callq 0x291c
movl %ebp, %edi
callq 0x2545
movl %eax, %ebp
movl %ebp, %eax
addq $0x568, %rsp            # imm = 0x568
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x45eb(%rip), %r14      # 0x5ff8
movq (%r14), %rdi
movl 0x46ee(%rip), %edx      # 0x6104
leaq 0x1716(%rip), %rsi      # 0x3133
xorl %eax, %eax
callq 0x1150
cmpl $0x0, 0x46dd(%rip)      # 0x6108
movq (%r14), %rcx
jne 0x1bbf
leaq 0x1709(%rip), %rdi      # 0x3144
pushq $0x14
jmp 0x1bc8
movq 0x45af(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq 0x46ed(%rip), %rdx      # 0x6140
leaq 0x1749(%rip), %rsi      # 0x31a3
xorl %eax, %eax
callq 0x1150
jmp 0x1289
movq 0x458b(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x1759(%rip), %rsi      # 0x31d0
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1150
jmp 0x1362
movq 0x456b(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1765(%rip), %rdi      # 0x31fc
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
movq 0x28(%rsp), %rdi
movq %r12, %rsi
xorl %edx, %edx
jmp 0x1afa
movq 0x4543(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq (%r13,%rbp,8), %rbx
leaq 0x1752(%rip), %rsi      # 0x3216
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1150
jmp 0x13d1
movq 0x451e(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1718(%rip), %rdi      # 0x31fc
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
movq 0x28(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq 0x20(%rsp), %rcx
xorl %r8d, %r8d
callq 0x291c
pushq $0x1
popq %rbp
jmp 0x19f2
movq 0x44e2(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1718(%rip), %rdi      # 0x3238
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
jmp 0x143c
movq 0x44c1(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x1727(%rip), %rdi      # 0x3268
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
movl 0x45ae(%rip), %ecx      # 0x6100
jmp 0x17eb
movq 0x449a(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
leaq 0x17a3(%rip), %rsi      # 0x330b
movq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x1150
jmp 0x17f4
movq 0x4478(%rip), %rax      # 0x5ff8
movq (%rax), %rcx
leaq 0x17a9(%rip), %rdi      # 0x3333
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
jmp 0x1843
movq 0x4457(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movl 0x4(%rsp), %ebp
incl %ebp
leaq 0x17a0(%rip), %rsi      # 0x3351
movl %ebp, %edx
xorl %eax, %eax
callq 0x1150
jmp 0x19b8
leaq 0x1593(%rip), %rdi      # 0x3159
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
cmpl $0x2, 0x4528(%rip)      # 0x6100
jl 0x1261
movq 0x4413(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq 0x4549(%rip), %rdx      # 0x6138
leaq 0x1577(%rip), %rsi      # 0x316d
xorl %eax, %eax
callq 0x1150
cmpl $0x2, 0x44fc(%rip)      # 0x6100
jl 0x1261
movq 0x43e7(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq 0x4515(%rip), %rdx      # 0x6130
leaq 0x155e(%rip), %rsi      # 0x3180
xorl %eax, %eax
callq 0x1150
jmp 0x1261