// File: /workspace/github_c_makefile_star2_O3/samtools[P]htslib/htscodecs/htscodecs/tokenise_name3.c
// Function: tok3_encode_names
uint8_t *tok3_encode_names(char *blk, int len, int level, int use_arith,
                           int *out_len, int *last_start_p) {
    int last_start = 0, i, j, nreads;

    if (len < 0) {
        *out_len = 0;
        return NULL;
    }

    // Count lines
    for (nreads = i = 0; i < len; i++)
        if (blk[i] <= '\n') // \n or \0 separated entries
            nreads++;

    name_context *ctx = create_context(nreads);
    if (!ctx)
        return NULL;

    // Construct trie
    int ctr = 0;
    for (i = j = 0; i < len; j=++i) {
        while (i < len && blk[i] > '\n')
            i++;
        if (i >= len)
            break;

        //blk[i] = '\0';
        last_start = i+1;
        if (build_trie(ctx, &blk[j], i-j, ctr++) < 0) {
            free_context(ctx);
            return NULL;
        }
    }
    if (last_start_p)
        *last_start_p = last_start;

    //fprintf(stderr, "Processed %d of %d in block, line %d\n", last_start, len, ctr);

    // Encode name
    for (i = j = 0; i < len; j=++i) {
        while (i < len && (signed char)blk[i] >= ' ') // non-ASCII check
            i++;
        if (i >= len)
            break;

        if (blk[i] != '\0' && blk[i] != '\n') {
            // Names must be 7-bit ASCII printable
            free_context(ctx);
            return NULL;
        }

        blk[i] = '\0';
        // try both 0 and 1 and pick best?
        if (encode_name(ctx, &blk[j], i-j, 1) < 0) {
            free_context(ctx);
            return NULL;
        }
    }

#if 0
    for (i = 0; i < ctx->max_tok*16; i++) {
        char fn[1024];
        if (!ctx->desc[i].buf_l) continue;
        sprintf(fn, "_tok.%02d_%02d.%d", i>>4,i&15,i);
        FILE *fp = fopen(fn, "w");
        fwrite(ctx->desc[i].buf, 1, ctx->desc[i].buf_l, fp);
        fclose(fp);
    }
#endif

    //dump_trie(t_head, 0);

    // FIXME: merge descriptors
    //
    // If we see foo7:1 foo7:12 foo7:7 etc then foo: is constant,
    // but it's encoded as alpha<foo>+dig<7>+char<:> instead of alpha<foo7:>.
    // Any time token type 0 is all match beyond the first location we have
    // a candidate for merging in string form.
    //
    // This saves around .1 to 1.3 percent on varying data sets.
    // Cruder hack is dedicated prefix/suffix matching to short-cut this.


    // Drop N_TYPE blocks if they all contain matches bar the first item,
    // as we can regenerate these from the subsequent blocks types during
    // decode.
    for (i = 0; i < ctx->max_tok*16; i+=16) {
        if (!ctx->desc[i].buf_l) continue;

        int z;
        for (z=1; z<ctx->desc[i].buf_l; z++) {
            if (ctx->desc[i].buf[z] != N_MATCH)
                break;
        }
        if (z == ctx->desc[i].buf_l) {
            int k;
            for (k=1; k<16; k++)
                if (ctx->desc[i+k].buf_l)
                    break;

            if (k < 16) {
                ctx->desc[i].buf_l = 0;
                free(ctx->desc[i].buf);
                ctx->desc[i].buf = NULL;
            }
        }
    }

    // Serialise descriptors
    uint32_t tot_size = 9;
    for (i = 0; i < ctx->max_tok*16; i++) {
        if (!ctx->desc[i].buf_l) continue;

        int tnum = i>>4;
        int ttype = i&15;

        uint64_t out_len = 1.5 * arith_compress_bound(ctx->desc[i].buf_l, 1); // guesswork
        uint8_t *out = malloc(out_len);
        if (!out) {
            free_context(ctx);
            return NULL;
        }

        if (compress(ctx->desc[i].buf, ctx->desc[i].buf_l, i&0xf, level,
                     use_arith, out, &out_len) < 0) {
            free_context(ctx);
            free(out);
            return NULL;
        }

        free(ctx->desc[i].buf);
        ctx->desc[i].buf = out;
        ctx->desc[i].buf_l = out_len;
        ctx->desc[i].tnum = tnum;
        ctx->desc[i].ttype = ttype;

        // Find dups
        int j;
        for (j = 0; j < i; j++) {
            if (!ctx->desc[j].buf)
                continue;
            if (ctx->desc[i].buf_l != ctx->desc[j].buf_l || ctx->desc[i].buf_l <= 4)
                continue;
            if (memcmp(ctx->desc[i].buf, ctx->desc[j].buf, ctx->desc[i].buf_l) == 0)
                break;
        }
        if (j < i) {
            ctx->desc[i].dup_from = j;
            tot_size += 3; // flag, dup_from, ttype
        } else {
            ctx->desc[i].dup_from = -1;
            tot_size += out_len + 1; // ttype
        }
    }

#if 0
    for (i = 0; i < ctx->max_tok*16; i++) {
        char fn[1024];
        if (!ctx->desc[i].buf_l && ctx->desc[i].dup_from == -1) continue;
        sprintf(fn, "_tok.%02d_%02d.%d.comp", i>>4,i&15,i);
        FILE *fp = fopen(fn, "w");
        fwrite(ctx->desc[i].buf, 1, ctx->desc[i].buf_l, fp);
        fclose(fp);
    }
#endif

    // Write
    uint8_t *out = malloc(tot_size+13);
    if (!out) {
        free_context(ctx);
        return NULL;
    }

    uint8_t *cp = out;

    *out_len = tot_size;
//    *(uint32_t *)cp = last_start; cp += 4;
//    *(uint32_t *)cp = nreads;     cp += 4;
    *cp++ = (last_start >>  0) & 0xff;
    *cp++ = (last_start >>  8) & 0xff;
    *cp++ = (last_start >> 16) & 0xff;
    *cp++ = (last_start >> 24) & 0xff;
    *cp++ = (nreads     >>  0) & 0xff;
    *cp++ = (nreads     >>  8) & 0xff;
    *cp++ = (nreads     >> 16) & 0xff;
    *cp++ = (nreads     >> 24) & 0xff;
    *cp++ = use_arith;
    //write(1, &nreads, 4);
    int last_tnum = -1;
    for (i = 0; i < ctx->max_tok*16; i++) {
        if (!ctx->desc[i].buf_l) continue;
        uint8_t ttype8 = ctx->desc[i].ttype;
        if (ctx->desc[i].tnum != last_tnum) {
            ttype8 |= 128;
            last_tnum = ctx->desc[i].tnum;
        }
        if (ctx->desc[i].dup_from >= 0) {
            //fprintf(stderr, "Dup %d from %d, sz %d\n", i, ctx->desc[i].dup_from, ctx->desc[i].buf_l);
            *cp++ = ttype8 | 64;
            *cp++ = ctx->desc[i].dup_from >> 4;
            *cp++ = ctx->desc[i].dup_from & 15;
        } else {
            *cp++ = ttype8;
            memcpy(cp, ctx->desc[i].buf, ctx->desc[i].buf_l);
            cp += ctx->desc[i].buf_l;
        }
    }

    //assert(cp-out == tot_size);

    free_context(ctx);

    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x27e8, %rsp           # imm = 0x27E8
movq %r9, 0x28(%rsp)
movq %r8, %rbx
testl %esi, %esi
js 0x7b2a5
movl %edx, %r12d
movl %esi, %ebp
movq %rdi, %r14
movl %ecx, 0x6c(%rsp)
movq %rdi, 0x78(%rsp)
je 0x7b2b0
movq %rbx, 0xa8(%rsp)
movl %ebp, %ebx
xorl %eax, %eax
xorl %edi, %edi
xorl %ecx, %ecx
cmpb $0xb, (%r14,%rax)
setl %cl
addl %ecx, %edi
incq %rax
cmpq %rax, %rbx
jne 0x7afaa
movq %rdi, 0xb0(%rsp)
callq 0x7ca03
movq %rax, %r13
xorl %eax, %eax
testq %r13, %r13
je 0x7c9d8
testl %ebp, %ebp
je 0x7b2e8
movq %r13, 0x10(%rsp)
xorl %eax, %eax
movl $0x0, 0x38(%rsp)
movq %rax, 0x88(%rsp)
movslq %eax, %r8
xorl %r13d, %r13d
movq %r8, %rax
cmpb $0xb, (%r14,%rax)
jl 0x7b018
incq %rax
decl %r13d
cmpq %rbx, %rax
jl 0x7b001
jmp 0x7b2db
movl %ebp, 0x58(%rsp)
movq %r12, 0x80(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x7b057
movl $0x1, %edi
movl $0x18, %esi
movq %r8, %r14
callq 0x4300
movq %r14, %r8
movq 0x10(%rsp), %rcx
movq %rax, 0x10(%rcx)
testq %rax, %rax
je 0x7c9c9
testl %r13d, %r13d
movq 0x78(%rsp), %r14
je 0x7b273
addq %r14, %r8
movl %r13d, %eax
negl %eax
cltq
movq %rax, 0x8(%rsp)
movl 0x38(%rsp), %eax
shll $0x8, %eax
movl %eax, 0x30(%rsp)
xorl %r9d, %r9d
movq %r8, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r10
incl 0x10(%r10)
movzbl (%r8,%r9), %ebp
cmpl $0xb, %ebp
jb 0x7b265
testb %bpl, %bpl
js 0x7c9c9
movq (%r10), %rax
testq %rax, %rax
je 0x7b0ce
movq %rax, %r12
movl 0x14(%rax), %ecx
cmpb %cl, %bpl
je 0x7b23d
movq 0x8(%r12), %rax
testq %rax, %rax
jne 0x7b0b3
jmp 0x7b0d1
xorl %r12d, %r12d
movq 0x10(%rsp), %rax
movq 0x18(%rax), %r15
testq %r15, %r15
jne 0x7b128
movq %r10, 0x20(%rsp)
movq %r9, %r14
movl $0x20, %edi
callq 0x4680
movq %rax, %r15
testq %rax, %rax
je 0x7b112
movq $0x18, (%r15)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%r15)
movq $0x0, 0x18(%r15)
movq 0x10(%rsp), %rax
movq %r15, 0x18(%rax)
movq 0x18(%rsp), %r8
movq %r14, %r9
movq 0x20(%rsp), %r10
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x7b13d
movq (%rax), %rcx
movq %rcx, 0x18(%r15)
jmp 0x7b212
movq (%r15), %r14
movq 0x8(%r15), %rsi
movq 0x10(%r15), %rdi
testq %rsi, %rsi
je 0x7b182
movq %rsi, %rax
shlq $0x4, %rax
movq -0x8(%rdi,%rax), %rcx
leaq (%rcx,%r14), %rdx
cmpq $0x100000, %rdx         # imm = 0x100000
jae 0x7b182
addq %rax, %rdi
movq -0x10(%rdi), %rax
movq %rdx, -0x8(%rdi)
testq %rax, %rax
je 0x7c9c9
addq %rcx, %rax
jmp 0x7b212
shlq $0x4, %rsi
addq $0x10, %rsi
movq %r9, 0x60(%rsp)
movq %r10, 0x20(%rsp)
callq 0x4840
testq %rax, %rax
je 0x7c9c9
movq %rax, %rcx
movl $0x100000, %eax         # imm = 0x100000
xorl %edx, %edx
divq %r14
movq %rcx, 0x10(%r15)
movq (%r15), %rdx
movq 0x8(%r15), %r14
movq %r14, 0x70(%rsp)
shlq $0x4, %r14
movq %rdx, 0x40(%rsp)
imulq %rdx, %rax
movq %rax, %rdi
movq %rcx, 0x48(%rsp)
callq 0x4680
movq 0x48(%rsp), %rcx
movq 0x20(%rsp), %r10
movq 0x60(%rsp), %r9
movq 0x18(%rsp), %r8
movq %rax, (%rcx,%r14)
testq %rax, %rax
je 0x7c9c9
addq %r14, %rcx
movq 0x70(%rsp), %rdx
incq %rdx
movq %rdx, 0x8(%r15)
movq 0x40(%rsp), %rdx
movq %rdx, 0x8(%rcx)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x8(%r12), %rcx
testq %r12, %r12
cmoveq %r10, %rcx
movq %rax, (%rcx)
movl 0x30(%rsp), %ecx
orl %ebp, %ecx
movl %ecx, 0x14(%rax)
movq %rax, %r12
movq 0x78(%rsp), %r14
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
orl %ebp, %ecx
movl %ecx, 0x14(%r12)
incl 0x10(%r12)
incq %r9
movq %r12, %r10
cmpq 0x8(%rsp), %r9
jb 0x7b094
incq %r9
cmpq 0x8(%rsp), %r9
jb 0x7b087
incl 0x38(%rsp)
movq 0x88(%rsp), %rcx
subl %r13d, %ecx
leal 0x1(%rcx), %eax
movl 0x58(%rsp), %ebp
cmpl %ebp, %eax
movq 0x80(%rsp), %r12
jl 0x7aff0
incl %ecx
movq 0x10(%rsp), %r13
movq %rcx, %rax
jmp 0x7b2e8
movl $0x0, (%rbx)
jmp 0x7c9d8
movq $0x0, 0xb0(%rsp)
xorl %edi, %edi
callq 0x7ca03
testq %rax, %rax
je 0x7c9d8
movq %rax, %r13
movq %rbx, 0xa8(%rsp)
xorl %eax, %eax
jmp 0x7b2e8
movq 0x10(%rsp), %r13
movq 0x88(%rsp), %rax
movq 0x28(%rsp), %rcx
testq %rcx, %rcx
je 0x7b2f4
movl %eax, (%rcx)
movq %rax, 0x88(%rsp)
testl %ebp, %ebp
movq %r13, 0x10(%rsp)
je 0x7c1f9
leaq 0x20(%r13), %rax
movq %rax, 0x60(%rsp)
leaq 0x14020(%r13), %rax
movq %rax, 0x98(%rsp)
leaq 0x14220(%r13), %rax
movq %rax, 0xa0(%rsp)
leaq 0x2a0(%r13), %rax
movq %rax, 0xb8(%rsp)
movl %ebp, %edx
movabsq $0x100000000, %rsi      # imm = 0x100000000
movq $0x0, 0x70(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x70(%rsp), %rcx
movslq %ecx, %rbx
movq %rbx, %rax
shlq $0x20, %rax
leaq (%r14,%rbx), %r8
xorl %r9d, %r9d
movl %ecx, %r15d
xorl %edi, %edi
cmpb $0x20, (%r8,%rdi)
jl 0x7b39b
addq %rsi, %rax
leaq (%rbx,%rdi), %rcx
incq %rcx
incq %rdi
incl %r15d
incl %r9d
cmpq %rdx, %rcx
jl 0x7b377
jmp 0x7c1f9
sarq $0x20, %rax
movzbl (%r14,%rax), %ecx
testl %ecx, %ecx
je 0x7b3b1
cmpl $0xa, %ecx
jne 0x7c9c4
movl %r9d, 0x38(%rsp)
movb $0x0, (%r14,%rax)
movslq 0x8(%r13), %r10
leal 0x1(%r10), %eax
movl %eax, 0x8(%r13)
movslq %edi, %rax
movq %rax, 0x18(%rsp)
movb (%r14,%rbx), %r13b
xorl %eax, %eax
cmpb $0x40, %r13b
sete %al
leaq (%r8,%rax), %rdx
negl %eax
leaq (%rax,%rdi), %rcx
cmpl $0x47, %ecx
movq %rdi, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %r10, 0x20(%rsp)
movq %r12, 0x80(%rsp)
movl %ebp, 0x58(%rsp)
jl 0x7b44f
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x6d, (%rdx,%rax)
jne 0x7b467
cmpb $0x5f, 0x7(%rdx)
jne 0x7b467
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x5f, 0xe(%rdx,%rax)
jne 0x7b467
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x2f, 0x3d(%rax,%rdx)
jne 0x7b467
movl $0x3c, %r11d
xorl %r15d, %r15d
movb $0x1, %al
movl %eax, 0x50(%rsp)
jmp 0x7b60a
addq %rdi, %rax
addq $-0x11, %rax
testl %eax, %eax
je 0x7b5d6
cmpl $0x24, %ecx
jl 0x7b614
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x2d, 0x8(%rdx,%rax)
jne 0x7b614
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x2d, 0xd(%rax,%rdx)
jne 0x7b614
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x2d, 0x12(%rdx,%rax)
jne 0x7b614
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x2d, 0x17(%rax,%rdx)
jne 0x7b614
xorl %r14d, %r14d
cmpb $0x3e, %r13b
sete %r14b
movq %rdx, 0x8(%rsp)
callq 0x4510
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %r8
movq 0x30(%rsp), %rdi
movq (%rax), %rax
movzbl (%rdx,%r14), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0x7(%rcx,%rdx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0x9(%rcx,%rdx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0xc(%rdx,%rcx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0xe(%rdx,%rcx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0x11(%rcx,%rdx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0x13(%rcx,%rdx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0x16(%rdx,%rcx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0x18(%rdx,%rcx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
xorl %ecx, %ecx
cmpb $0x3e, %r13b
sete %cl
movzbl 0x23(%rcx,%rdx), %ecx
testb $0x10, 0x1(%rax,%rcx,2)
je 0x7b614
movl $0x24, %r11d
movl $0x24, %r15d
jmp 0x7b602
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x3a, 0x5(%rax,%rdx)
jne 0x7b614
xorl %eax, %eax
cmpb $0x3e, %r13b
sete %al
cmpb $0x3a, 0xb(%rax,%rdx)
jne 0x7b614
movl $0x6, %r11d
movl $0x6, %r15d
movl $0x0, 0x50(%rsp)
movq 0x10(%rsp), %r13
jmp 0x7b6a9
testl %edi, %edi
je 0x7b63b
movslq %r15d, %rcx
subq %rbx, %rcx
xorl %eax, %eax
movq 0x10(%rsp), %r13
cmpb $0x21, (%r8,%rax)
jl 0x7b65e
incq %rax
cmpq %rax, %rcx
jne 0x7b625
movq 0x18(%rsp), %rax
jmp 0x7b663
movb $0x1, %al
movl %eax, 0x50(%rsp)
xorl %r15d, %r15d
movq 0x10(%rsp), %r13
cmpq $0x0, 0x10(%r13)
jne 0x7b8ab
movl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
jmp 0x7b875
testq %rax, %rax
je 0x7b69a
leal 0x1(%rax), %r15d
decq %rax
xorl %ecx, %ecx
movl %ecx, %edx
xorl %ecx, %ecx
cmpb $0x3a, (%r8,%rax)
sete %cl
addl %edx, %ecx
decl %r15d
addq $-0x1, %rax
jae 0x7b688
cmpl $0x4, %ecx
jb 0x7b66c
cmpl $0x4, %ecx
jne 0x7b69a
movslq %r15d, %r11
movl $0x0, 0x50(%rsp)
jmp 0x7b6a9
movl $0x7fffffff, %r11d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movb $0x1, %al
movl %eax, 0x50(%rsp)
movq 0x18(%rsp), %rdx
cmpq $0x0, 0x10(%r13)
je 0x7b872
testl %edi, %edi
je 0x7b8ab
movl %r15d, 0x40(%rsp)
movl %r10d, %eax
shll $0x8, %eax
movl %eax, 0x8(%rsp)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %r12d, %r12d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq 0x28(%rsp), %r9
movq %r11, 0x48(%rsp)
leaq 0x1(%r12), %rax
cmpq %rax, %rdx
movq %rax, %rbp
cmovaq %rdx, %rbp
movb (%r9,%r12), %bl
cmpb $0xb, %bl
jl 0x7b77f
movq 0x10(%r13), %r13
callq 0x4510
movq 0x48(%rsp), %r11
movq 0x20(%rsp), %r10
movq 0x28(%rsp), %r9
movl %r14d, %edx
movq %r13, %rcx
movq (%rcx), %r13
movl 0x14(%r13), %esi
leaq 0x8(%r13), %rcx
cmpb %sil, %bl
jne 0x7b724
incq %r12
movl %esi, %ecx
shrl $0x8, %ecx
movq (%rax), %rdi
movzbl %bl, %r8d
cmpl %r10d, %ecx
movl %ecx, %r14d
cmovel %edx, %r14d
movzwl (%rdi,%r8,2), %edi
testl $0x2004, %edi           # imm = 0x2004
cmovel %edx, %r14d
cmpq %r11, %r12
cmovel %ecx, %r15d
movzbl %sil, %edx
orl 0x8(%rsp), %edx
movl %edx, 0x14(%r13)
cmpq %rbp, %r12
je 0x7b784
movb (%r9,%r12), %bl
cmpb $0xb, %bl
jge 0x7b71e
jmp 0x7b787
movq %rax, %r12
jmp 0x7b797
movq %rbp, %r12
incq %r12
movq %r12, %rax
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rdx
cmpq %rdx, %rax
jb 0x7b6ee
cmpl $-0x1, %r15d
cmovnel %r15d, %r14d
cmpl %r10d, %ecx
cmovnel %ecx, %r14d
movl %r10d, %ebp
subl $0x1, %ebp
movl $0x0, %eax
cmovbl %eax, %ebp
testl %r14d, %r14d
cmovnsl %r14d, %ebp
movq (%r13), %rbx
cmpl %r10d, %ecx
je 0x7b862
movslq %ebp, %rax
leaq (%rax,%rax,2), %r15
movq (%rbx,%r15,8), %rdi
callq 0x41d0
cmpq 0x18(%rsp), %rax
jne 0x7b862
movq 0x20(%rsp), %r14
movl %r14d, %ecx
subl %ebp, %ecx
movq %r13, %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x7dc50
movq (%r13), %rbx
leaq (%r14,%r14,2), %r12
movq 0x28(%rsp), %rax
movq %rax, (%rbx,%r12,8)
movslq 0x8(%rbx,%r15,8), %rax
leaq (,%rax,4), %rcx
testq %rax, %rax
movl %eax, 0x8(%rbx,%r12,8)
leaq (%rcx,%rcx,2), %r14
movq %r14, %rdi
movl $0x600, %eax            # imm = 0x600
cmoveq %rax, %rdi
callq 0x4680
movq %rax, 0x10(%rbx,%r12,8)
testq %rax, %rax
movq %r13, %r12
je 0x7c9d0
movq 0x10(%rbx,%r15,8), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x43c0
jmp 0x7c177
movl %ebp, 0x8(%rsp)
movq 0x20(%rsp), %r14
movl 0x40(%rsp), %r15d
jmp 0x7b8c4
movq %r11, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x4300
movq %rax, 0x10(%r13)
testq %rax, %rax
sete %al
cmpl $0x0, 0x30(%rsp)
sete %cl
orb %al, %cl
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %rdx
movq %rbx, %r11
je 0x7b6c1
movl %r10d, %ecx
subl $0x1, %ecx
movl $0x0, %eax
cmovbl %eax, %ecx
movl %ecx, 0x8(%rsp)
movq (%r13), %rbx
movq %r10, %r14
movl $0x600, %edi            # imm = 0x600
callq 0x4680
leaq (%r14,%r14,2), %rcx
movq %rcx, 0x40(%rsp)
movq %rax, 0x10(%rbx,%rcx,8)
testq %rax, %rax
movq 0x10(%rsp), %r12
je 0x7c9d0
movq 0x20(%rsp), %rax
movl %eax, %ecx
subl 0x8(%rsp), %ecx
movq %r12, %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x7dc50
cmpl $0x24, %r15d
jne 0x7b9dd
movl 0x14420(%r12), %eax
cmpl $0x25, %eax
movq 0x60(%rsp), %r13
movl $0x0, %ebx
movq 0x40(%rsp), %rbp
jg 0x7b982
shll $0x4, %eax
cltq
leaq (%rax,%rax,4), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x4260
movslq 0x14420(%r12), %rax
movl %ebx, 0x14020(%r12,%rax,4)
movslq 0x14420(%r12), %rax
movl %ebx, 0x14220(%r12,%rax,4)
movl 0x14420(%r12), %ecx
leal 0x1(%rcx), %eax
movl %eax, 0x14420(%r12)
cmpl $0x25, %ecx
jl 0x7b92a
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x28(%rsp), %rdx
movsbl (%rdx,%r14), %edx
leaq 0x1(%r14), %r15
movq %r12, %rdi
movl %r15d, %esi
callq 0x7da2c
movq 0x28(%rsp), %rdx
movsbl (%rdx,%r14), %eax
movq (%r12), %rcx
movq 0x10(%rcx,%rbp,8), %rcx
movl %eax, 0x10(%rcx,%rbx)
movl $0x2, 0xc(%rcx,%rbx)
addq $0xc, %rbx
movq %r15, %r14
cmpq $0x24, %r15
jne 0x7b98c
movl $0x25, %r14d
movl $0x24, %r15d
jmp 0x7bae0
cmpb $0x0, 0x50(%rsp)
movq 0x60(%rsp), %r13
movq 0x40(%rsp), %r14
je 0x7b9fc
movl $0x1, %r14d
xorl %r15d, %r15d
jmp 0x7bae0
movl 0x14420(%r12), %eax
cmpl $0x1, %eax
movl $0x0, %ebx
jg 0x7ba5a
shll $0x4, %eax
cltq
leaq (%rax,%rax,4), %rax
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x4260
movslq 0x14420(%r12), %rax
movl %ebx, 0x14020(%r12,%rax,4)
movslq 0x14420(%r12), %rax
movl %ebx, 0x14220(%r12,%rax,4)
movl $0x2, 0x14420(%r12)
movl 0x8(%rsp), %eax
cmpl %eax, 0x20(%rsp)
movq 0x28(%rsp), %r8
jle 0x7baac
movq (%r12), %rax
movslq 0x8(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
cmpl $0x2, 0x8(%rax,%rcx,8)
jl 0x7baac
leaq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rcx
cmpl $0x1, 0xc(%rcx)
jne 0x7baac
cmpl %r15d, 0x10(%rcx)
jne 0x7baac
movq (%rax), %rsi
movslq %r15d, %rdx
movq %r8, %rdi
callq 0x44d0
movq 0x28(%rsp), %r8
testl %eax, %eax
je 0x7c1ba
movq %r12, %rdi
movl $0x1, %esi
movq %r8, %rdx
movl %r15d, %ecx
callq 0x7db00
movq (%r12), %rax
movq 0x10(%rax,%r14,8), %rax
movl %r15d, 0x10(%rax)
movl $0x0, 0x14(%rax)
movl $0x1, 0xc(%rax)
movl $0x2, %r14d
movq 0x30(%rsp), %rax
movl 0x38(%rsp), %ecx
cmpl %eax, %r15d
jge 0x7c064
movslq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movl %r14d, %r14d
movl %ecx, %eax
movq %rax, 0x50(%rsp)
movslq 0x14420(%r12), %rax
cmpq %rax, %r14
jl 0x7bb6f
cmpl $0x7f, %eax
jg 0x7c9d0
shll $0x4, %eax
cltq
leaq (%rax,%rax,4), %rax
movq 0x60(%rsp), %r13
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x4260
movslq 0x14420(%r12), %rax
xorl %ecx, %ecx
movl %ecx, 0x14020(%r12,%rax,4)
movslq 0x14420(%r12), %rax
movl %ecx, 0x14220(%r12,%rax,4)
leal 0x1(%r14), %eax
movl %eax, 0x14420(%r12)
callq 0x4510
movq (%rax), %rax
movslq %r15d, %rdx
movq 0x28(%rsp), %r10
leaq (%r10,%rdx), %rdi
movzbl (%r10,%rdx), %ecx
movzwl (%rax,%rcx,2), %esi
btl $0xa, %esi
jb 0x7bc6e
cmpb $0x30, %cl
movq 0x30(%rsp), %r9
movq 0x20(%rsp), %r11
jne 0x7bd57
xorl %ebp, %ebp
movl %r15d, %ebx
cmpl %r9d, %r15d
jae 0x7bbfd
movl %r15d, %ecx
movq 0x50(%rsp), %rdx
subq %rcx, %rdx
addq %r10, %rcx
xorl %esi, %esi
movl %r15d, %ebx
xorl %ebp, %ebp
cmpq $0x8, %rsi
ja 0x7bbfd
movzbl (%rcx,%rsi), %edi
movzwl (%rax,%rdi,2), %r8d
andl $0x800, %r8d            # imm = 0x800
je 0x7bbfd
movsbl %dil, %edi
leal (%rbp,%rbp,4), %r8d
leal (%rdi,%r8,2), %ebp
addl $-0x30, %ebp
incl %ebx
incq %rsi
cmpq %rsi, %rdx
jne 0x7bbc8
movl %r9d, %ebx
cmpl 0x8(%rsp), %r11d
jle 0x7bf18
movq (%r12), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movslq 0x8(%rax,%rcx,8), %rdx
cmpq %rdx, %r14
jge 0x7bf18
leaq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
leaq (%r14,%r14,2), %rdx
cmpl $0x3, (%rax,%rdx,4)
jne 0x7bf18
movq %r14, %r8
leaq (%rax,%rdx,4), %rsi
movl %ebp, %ecx
subl 0x4(%rsi), %ecx
jne 0x7bed9
movl %ebx, %r14d
subl %r15d, %r14d
cmpl %r14d, 0x8(%rsi)
jne 0x7bed9
movq %r12, %rdi
movq %r8, %r15
movl %r15d, %esi
callq 0x7dabe
jmp 0x7bf70
movq %rdi, 0x48(%rsp)
leal 0x1(%rdx), %esi
movq 0x30(%rsp), %rdi
cmpl %esi, %edi
cmovgl %edi, %esi
leal -0x1(%rsi), %ebx
incq %rdx
movl %r15d, %ebp
movq 0x20(%rsp), %r11
movq 0x18(%rsp), %r8
cmpq %r8, %rdx
jge 0x7bcb3
movzbl (%r10,%rdx), %edi
movzwl (%rax,%rdi,2), %edi
incl %ebp
incq %rdx
testl $0x404, %edi            # imm = 0x404
jne 0x7bc93
leal -0x1(%rbp), %ebx
jmp 0x7bcb5
movl %esi, %ebp
subl %r15d, %ebp
cmpl $0x1, %ebp
je 0x7bd66
cmpl 0x8(%rsp), %r11d
jle 0x7bd16
movq (%r12), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movslq 0x8(%rax,%rcx,8), %rdx
cmpq %rdx, %r14
jge 0x7bd16
leaq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rcx
leaq (%r14,%r14,2), %rdx
cmpl $0x1, (%rcx,%rdx,4)
jne 0x7bd16
leaq (%rcx,%rdx,4), %rcx
cmpl 0x4(%rcx), %ebp
jne 0x7bd16
movslq 0x8(%rcx), %rsi
addq (%rax), %rsi
movslq %ebp, %rdx
movq 0x48(%rsp), %rdi
callq 0x44d0
testl %eax, %eax
je 0x7bfd2
movq %r12, %rdi
movl %r14d, %esi
movq 0x48(%rsp), %rdx
movl %ebp, %ecx
callq 0x7db00
testl %eax, %eax
js 0x7c9d0
movq (%r12), %rax
movq 0x40(%rsp), %rcx
movq 0x10(%rax,%rcx,8), %rax
leaq (%r14,%r14,2), %rcx
movl %ebp, 0x4(%rax,%rcx,4)
movl %r15d, 0x8(%rax,%rcx,4)
movl $0x1, (%rax,%rcx,4)
jmp 0x7bf9f
movq %rdi, 0x48(%rsp)
btl $0xb, %esi
jb 0x7bdfb
movsbl %cl, %edx
cmpl 0x8(%rsp), %r11d
jle 0x7bdbb
movq (%r12), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movslq 0x8(%rax,%rcx,8), %rsi
cmpq %rsi, %r14
jge 0x7bdbb
leaq (%rax,%rcx,8), %rax
movq 0x10(%rax), %rax
leaq (%r14,%r14,2), %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x7bdbb
leaq (%rax,%rcx,4), %rax
cmpl %edx, 0x4(%rax)
movq 0x48(%rsp), %rbx
movq %r12, %rdi
movl %r14d, %esi
jne 0x7bf03
callq 0x7dabe
jmp 0x7bf08
movq %r12, %rdi
movl %r14d, %esi
callq 0x7da2c
testl %eax, %eax
movq 0x48(%rsp), %rbx
js 0x7c9d0
movsbl (%rbx), %eax
movq (%r12), %rcx
movq 0x40(%rsp), %rdx
movq 0x10(%rcx,%rdx,8), %rcx
leaq (%r14,%r14,2), %rdx
movl %eax, 0x4(%rcx,%rdx,4)
movl $0x2, (%rcx,%rdx,4)
movl %r15d, %ebx
jmp 0x7bf9f
xorl %ebp, %ebp
movl %r15d, %ebx
cmpl %r9d, %r15d
jae 0x7be4f
movl %r15d, %ecx
movq 0x50(%rsp), %rdx
subq %rcx, %rdx
addq %r10, %rcx
xorl %esi, %esi
movl %r15d, %ebx
xorl %ebp, %ebp
cmpq $0x8, %rsi
ja 0x7be4f
movzbl (%rcx,%rsi), %edi
movzwl (%rax,%rdi,2), %r8d
andl $0x800, %r8d            # imm = 0x800
je 0x7be4f
movsbl %dil, %edi
leal (%rbp,%rbp,4), %r8d
leal (%rdi,%r8,2), %ebp
addl $-0x30, %ebp
incl %ebx
incq %rsi
cmpq %rsi, %rdx
jne 0x7be1a
movl %r9d, %ebx
cmpl 0x8(%rsp), %r11d
jle 0x7be9b
movq (%r12), %rcx
movq 0x38(%rsp), %rdx
leaq (%rdx,%rdx,2), %rdx
movslq 0x8(%rcx,%rdx,8), %rsi
cmpq %rsi, %r14
jge 0x7be9b
leaq (%rcx,%rdx,8), %rcx
movq 0x10(%rcx), %rcx
leaq (%r14,%r14,2), %rdx
leaq (%rcx,%rdx,4), %rdx
movl (%rdx), %ecx
cmpl $0x7, %ecx
je 0x7bfbb
cmpl $0x3, %ecx
jne 0x7be9b
movl %ebx, %ecx
subl %r15d, %ecx
cmpl %ecx, 0x8(%rdx)
je 0x7bba9
movq %r12, %rdi
movl %r14d, %esi
movl $0x7, %edx
movl %ebp, %ecx
callq 0x7dc50
testl %eax, %eax
js 0x7c9d0
movq (%r12), %rax
movq 0x40(%rsp), %rcx
movq 0x10(%rax,%rcx,8), %rax
leaq (%r14,%r14,2), %rcx
movl %ebp, 0x4(%rax,%rcx,4)
movl $0x7, (%rax,%rcx,4)
decl %ebx
jmp 0x7bf9f
cmpl $0xff, %ecx
ja 0x7bf15
movl %ebx, %r14d
subl %r15d, %r14d
cmpl %r14d, 0x8(%rax,%rdx,4)
jne 0x7bf15
movq %r12, %rdi
movq %r8, %r15
movl %r15d, %esi
movl $0x9, %edx
callq 0x7dbb5
jmp 0x7bf70
callq 0x7da2c
testl %eax, %eax
jns 0x7bdd3
jmp 0x7c9d0
movq %r8, %r14
movl %r14d, %eax
shll $0x4, %eax
orl $0x4, %eax
cltq
leaq (%rax,%rax,4), %rax
leaq (%r13,%rax,8), %r13
movq %r13, %rdi
movl $0x1, %esi
callq 0x7dce8
testl %eax, %eax
js 0x7c9d0
movq %r14, %rsi
movl %ebx, %r14d
subl %r15d, %r14d
movq (%r13), %rax
movq 0x10(%r13), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r13)
movb %r14b, (%rax,%rcx)
movq %r12, %rdi
movq %rsi, %r15
movl $0x3, %edx
movl %ebp, %ecx
callq 0x7dc50
testl %eax, %eax
js 0x7c9d0
movq (%r12), %rax
movq 0x40(%rsp), %rcx
movq 0x10(%rax,%rcx,8), %rax
leaq (%r15,%r15,2), %rcx
movl %r14d, 0x8(%rax,%rcx,4)
movl %ebp, 0x4(%rax,%rcx,4)
movl $0x3, (%rax,%rcx,4)
decl %ebx
movq %r15, %r14
incq %r14
incl %ebx
movl %ebx, %r15d
cmpl 0x30(%rsp), %ebx
movq 0x60(%rsp), %r13
jl 0x7bb06
jmp 0x7c064
movl %ebp, %ecx
subl 0x4(%rdx), %ecx
jne 0x7bfe2
movq %r12, %rdi
movl %r14d, %esi
callq 0x7dabe
jmp 0x7bead
movq %r12, %rdi
movl %r14d, %esi
callq 0x7dabe
jmp 0x7bd28
cmpl $0xff, %ecx
ja 0x7c02c
movq 0x98(%rsp), %rax
movl (%rax,%r14,4), %eax
addl $0x5, %eax
movq 0xa0(%rsp), %rdx
cmpl (%rdx,%r14,4), %eax
jle 0x7c02c
movq %r12, %rdi
movl %r14d, %esi
movl $0x8, %edx
callq 0x7dbb5
testl %eax, %eax
js 0x7c9d0
movq %r14, %rcx
movq 0x98(%rsp), %rax
jmp 0x7c051
movq %r12, %rdi
movl %r14d, %esi
movl $0x7, %edx
movl %ebp, %ecx
callq 0x7dc50
testl %eax, %eax
js 0x7c9d0
movq %r14, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, %r14
leaq (%rax,%rcx,4), %rax
incl (%rax)
movq 0x10(%rsp), %r12
jmp 0x7beb5
movl 0x14420(%r12), %eax
cmpl %eax, %r14d
jl 0x7c0d2
cmpl $0x7f, %eax
movq 0x10(%rsp), %r12
jg 0x7c9d0
shll $0x4, %eax
cltq
leaq (%rax,%rax,4), %rax
movq 0x60(%rsp), %r13
leaq (,%rax,8), %rdi
addq %r13, %rdi
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x4260
movslq 0x14420(%r12), %rax
xorl %ecx, %ecx
movl %ecx, 0x14020(%r12,%rax,4)
movslq 0x14420(%r12), %rax
movl %ecx, 0x14220(%r12,%rax,4)
leal 0x1(%r14), %eax
movl %eax, 0x14420(%r12)
movl %r14d, %eax
shll $0x4, %eax
cltq
leaq (%rax,%rax,4), %rax
leaq (,%rax,8), %r15
addq %r13, %r15
movq %r15, %rdi
movl $0x1, %esi
callq 0x7dce8
testl %eax, %eax
movq 0x10(%rsp), %r12
js 0x7c9d0
movq (%r15), %rax
movq 0x10(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r15)
movb $0xc, (%rax,%rcx)
movq (%r12), %rax
movq 0x20(%rsp), %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rbx
movq 0x28(%rsp), %rcx
movq %rcx, (%rax,%rbx)
movl %r14d, 0x8(%rax,%rbx)
movq 0x10(%rax,%rbx), %rdi
movl %r14d, %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rsi
addq $0xc, %rsi
callq 0x4840
movq (%r12), %rcx
addq %rbx, %rcx
addq $0x10, %rcx
testq %rax, %rax
je 0x7c168
movq %rax, (%rcx)
movq 0x10(%rsp), %r12
jmp 0x7c177
cmpq $0x0, (%rcx)
movq 0x10(%rsp), %r12
je 0x7c9d0
movq 0x70(%rsp), %rax
movq 0x30(%rsp), %rcx
addl %ecx, %eax
incl %eax
movl 0x58(%rsp), %ebp
movq %rax, 0x70(%rsp)
cmpl %ebp, %eax
movq %r12, %r13
movq 0x80(%rsp), %r12
movq 0x78(%rsp), %r14
movq 0x90(%rsp), %rdx
movabsq $0x100000000, %rsi      # imm = 0x100000000
jl 0x7b35c
jmp 0x7c1f9
movq 0xb8(%rsp), %rdi
movl $0x1, %esi
callq 0x7dce8
testl %eax, %eax
js 0x7babf
movq 0x2a0(%r12), %rax
movq 0x2b0(%r12), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x2b0(%r12)
movb $0xa, (%rax,%rcx)
jmp 0x7babf
movl 0x14420(%r13), %eax
movl $0x9, %ebp
testl %eax, %eax
jle 0x7c8c3
leaq 0x20(%r13), %r15
leaq 0x30(%r13), %rcx
movq %rcx, 0x20(%rsp)
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %r15, 0x28(%rsp)
leaq (%r14,%r14,4), %rdx
movq 0x10(%r15,%rdx,8), %rcx
testq %rcx, %rcx
je 0x7c2a4
leaq (%r15,%rdx,8), %r15
cmpq $0x1, %rcx
je 0x7c263
movq (%r15), %rsi
movl $0x1, %edx
cmpb $0xa, (%rsi,%rdx)
jne 0x7c259
incq %rdx
cmpq %rdx, %rcx
jne 0x7c244
movl $0x1, %ecx
jmp 0x7c263
cmpq %rdx, %rcx
movl $0x1, %ecx
jne 0x7c29f
leaq (%rcx,%r14), %rdx
leaq (%rdx,%rdx,4), %rdx
movq 0x20(%rsp), %rsi
leaq (%rsi,%rdx,8), %rdx
addq $-0x10, %rcx
cmpq $0x0, (%rdx)
jne 0x7c289
addq $0x28, %rdx
incq %rcx
jne 0x7c278
jmp 0x7c29f
movq %rbx, 0x10(%r15)
movq (%r15), %rdi
callq 0x45c0
movq %rbx, (%r15)
movl 0x14420(%r13), %eax
movq 0x28(%rsp), %r15
addq $0x10, %r14
movl %eax, %ecx
shll $0x4, %ecx
movslq %ecx, %rcx
cmpq %rcx, %r14
jl 0x7c224
testl %eax, %eax
jle 0x7c8c3
movl %r12d, %eax
decl %eax
shrl $0x1f, %eax
addl %r12d, %eax
decl %eax
sarl %eax
xorl %ebx, %ebx
testl %eax, %eax
cmovlel %ebx, %eax
cmpl $0x4, %eax
movl $0x4, %ecx
cmovll %eax, %ecx
imulq $0x16c, %rcx, %rax      # imm = 0x16C
addq %rsp, %rax
addq $0xc0, %rax
movq %rax, 0x50(%rsp)
movl $0x9, %ebp
leaq (%rbx,%rbx,4), %r14
movq 0x10(%r15,%r14,8), %rdi
testq %rdi, %rdi
je 0x7c887
movl $0x1, %esi
callq 0x58054
movl %eax, %eax
cvtsi2sd %rax, %xmm0
mulsd 0x1d339(%rip), %xmm0    # 0x99660
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x193d5(%rip), %xmm0    # 0x95710
cvttsd2si %xmm0, %rdi
andq %rcx, %rdi
orq %rax, %rdi
movq %rdi, 0x18(%rsp)
callq 0x4680
testq %rax, %rax
je 0x7c9c4
movq %rax, 0x8(%rsp)
leaq (%r15,%r14,8), %rax
movq (%rax), %rcx
movq %rcx, 0x48(%rsp)
movq %rax, 0x78(%rsp)
movq 0x10(%rax), %r12
movl $0x71c, %edx            # imm = 0x71C
leaq 0xc0(%rsp), %rdi
leaq 0x24589(%rip), %rsi     # 0xa0910
callq 0x43c0
movl 0x6c(%rsp), %r10d
testl %r10d, %r10d
je 0x7c3a1
movl $0xc9, 0x2f4(%rsp)
movl %ebx, %eax
andl $0xf, %eax
leaq (%rax,%rax,8), %rcx
leaq (%rcx,%rcx,2), %r9
addq %rax, %r9
movq 0x50(%rsp), %rsi
movl (%rsi,%r9), %eax
testl %eax, %eax
movq 0x8(%rsp), %rdi
movq %rbp, 0x40(%rsp)
jle 0x7c7ad
movl %ebx, %ebp
andl $0xf, %ebp
leaq (,%rbp,8), %rcx
addq %rbp, %rcx
leaq (%rcx,%rcx,2), %rcx
addq %rsi, %rbp
addq %rcx, %rbp
addq %rsi, %r9
movq 0x18(%rsp), %rcx
leal -0x6(%rcx), %esi
movl %esi, 0x70(%rsp)
leaq 0x6(%rdi), %rsi
movq %rsi, 0x30(%rsp)
leaq (,%rcx,8), %rsi
subq %rcx, %rsi
movq %rsi, 0x90(%rsp)
movq $-0x1, %r15
movb $0x1, %r14b
movl $0x1, %ecx
leaq 0x7e0(%rsp), %r13
movq %r9, 0x38(%rsp)
movq %r13, 0x58(%rsp)
movq %r15, %rdx
movslq %eax, %r13
movq %rcx, %r15
movq 0x8(%rsp), %rdi
movq %rdx, 0x80(%rsp)
movq %r15, %rax
testl %r10d, %r10d
jne 0x7c460
movl (%rbp,%rax,4), %ecx
testb $0x4, %cl
je 0x7c460
andl $-0x5, %ecx
movl %ecx, (%rbp,%rax,4)
testb $0x3, %r12b
je 0x7c482
movl (%rbp,%rax,4), %r8d
testb $0x8, %r8b
je 0x7c488
leaq 0x1(%rax), %rcx
cmpq %r13, %rax
movq %rcx, %rax
jl 0x7c44b
jmp 0x7c7a0
movl (%r9,%r15,4), %r8d
jmp 0x7c48b
movq %rax, %r15
testl %r10d, %r10d
movq %r15, 0x60(%rsp)
je 0x7c547
movl 0x70(%rsp), %eax
movl %eax, 0x68(%rsp)
movq 0x48(%rsp), %rdi
movl %r12d, %esi
movq 0x30(%rsp), %rdx
leaq 0x68(%rsp), %rcx
callq 0x580e4
testq %rax, %rax
je 0x7c8ae
movl 0x68(%rsp), %r15d
cmpq $0x4, 0x18(%rsp)
movq 0x8(%rsp), %r9
jg 0x7c5f1
xorl %edi, %edi
xorl %edx, %edx
movl %r15d, %r8d
movl %r15d, %esi
movq %rdx, %rcx
movq %rdi, %rax
shrl $0x7, %esi
addq $0x7, %rdx
incq %rdi
cmpl $0x7f, %r8d
movl %esi, %r8d
ja 0x7c4e1
xorl %r14d, %r14d
cmpq %rdx, 0x90(%rsp)
jl 0x7c6d0
cmpq $0x4, %rax
movl $0x4, %edx
cmovaeq %rdx, %rax
incq %rax
xorl %r14d, %r14d
movl %r15d, %edx
shrl %cl, %edx
xorl %esi, %esi
testl %ecx, %ecx
setne %sil
andl $0x7f, %edx
shll $0x7, %esi
orl %edx, %esi
movb %sil, (%r9,%r14)
incq %r14
addl $-0x7, %ecx
cmpl %r14d, %eax
jne 0x7c51e
jmp 0x7c6d0
movl 0x70(%rsp), %eax
movl %eax, 0x68(%rsp)
movq 0x48(%rsp), %rdi
movl %r12d, %esi
movq 0x30(%rsp), %rdx
leaq 0x68(%rsp), %rcx
callq 0x6336a
testq %rax, %rax
je 0x7c8ae
movl 0x68(%rsp), %r15d
cmpq $0x4, 0x18(%rsp)
movq 0x8(%rsp), %r9
jg 0x7c5f1
xorl %edi, %edi
xorl %edx, %edx
movl %r15d, %r8d
movl %r15d, %esi
movq %rdx, %rcx
movq %rdi, %rax
shrl $0x7, %esi
addq $0x7, %rdx
incq %rdi
cmpl $0x7f, %r8d
movl %esi, %r8d
ja 0x7c58b
xorl %r14d, %r14d
cmpq %rdx, 0x90(%rsp)
jl 0x7c6d0
cmpq $0x4, %rax
movl $0x4, %edx
cmovaeq %rdx, %rax
incq %rax
xorl %r14d, %r14d
movl %r15d, %edx
shrl %cl, %edx
xorl %esi, %esi
testl %ecx, %ecx
setne %sil
andl $0x7f, %edx
shll $0x7, %esi
orl %edx, %esi
movb %sil, (%r9,%r14)
incq %r14
addl $-0x7, %ecx
cmpl %r14d, %eax
jne 0x7c5c8
jmp 0x7c6d0
cmpl $0x7f, %r15d
ja 0x7c605
movb %r15b, (%r9)
movl $0x1, %r14d
jmp 0x7c6d0
movl %r15d, %eax
cmpl $0x3fff, %r15d          # imm = 0x3FFF
ja 0x7c62d
shrl $0x7, %eax
orb $-0x80, %al
movb %al, (%r9)
movl %r15d, %eax
andb $0x7f, %al
movb %al, 0x1(%r9)
movl $0x2, %r14d
jmp 0x7c6d0
cmpl $0x1fffff, %r15d        # imm = 0x1FFFFF
ja 0x7c65b
shrl $0xe, %eax
orb $-0x80, %al
movb %al, (%r9)
movl %r15d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x1(%r9)
movl %r15d, %eax
andb $0x7f, %al
movb %al, 0x2(%r9)
movl $0x3, %r14d
jmp 0x7c6d0
cmpl $0xfffffff, %r15d       # imm = 0xFFFFFFF
ja 0x7c695
shrl $0x15, %eax
orb $-0x80, %al
movb %al, (%r9)
movl %r15d, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x1(%r9)
movl %r15d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x2(%r9)
movl %r15d, %eax
andb $0x7f, %al
movb %al, 0x3(%r9)
movl $0x4, %r14d
jmp 0x7c6d0
shrl $0x1c, %eax
orb $-0x80, %al
movb %al, (%r9)
movl %r15d, %eax
shrl $0x15, %eax
orb $-0x80, %al
movb %al, 0x1(%r9)
movl %r15d, %eax
shrl $0xe, %eax
orb $-0x80, %al
movb %al, 0x2(%r9)
movl %r15d, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, 0x3(%r9)
movl %r15d, %eax
andb $0x7f, %al
movb %al, 0x4(%r9)
movl $0x5, %r14d
movl %r14d, %edi
addq %r9, %rdi
movq 0x30(%rsp), %rsi
movq %r15, %rdx
callq 0x4830
addl %r15d, %r14d
movl %r14d, %r15d
movq 0x80(%rsp), %rdx
cmpq %r15, %rdx
movl 0x6c(%rsp), %r10d
movq 0x38(%rsp), %r9
ja 0x7c71f
movq 0x60(%rsp), %rcx
leaq 0x1(%rcx), %r15
movb $0x1, %r14b
cmpq %r13, %rcx
movq 0x8(%rsp), %rdi
jl 0x7c448
jmp 0x7c7a6
cmpq %r13, 0x60(%rsp)
movq 0x8(%rsp), %rsi
jge 0x7c8bb
cmpl $0x2001, %r15d          # imm = 0x2001
setae %al
leaq 0x7e0(%rsp), %rcx
movq 0x58(%rsp), %rdi
cmpq %rcx, %rdi
sete %cl
andb %al, %cl
cmpb $0x1, %cl
movq 0x10(%rsp), %r13
jne 0x7c771
movq %r15, %rdi
callq 0x4680
movq 0x8(%rsp), %rsi
movq %rax, %rdi
testq %rax, %rax
je 0x7c9ef
movq %rdi, %r13
movq %r15, %rdx
callq 0x43c0
movq 0x38(%rsp), %r9
movslq (%r9), %rax
movq 0x60(%rsp), %rdx
leaq 0x1(%rdx), %rcx
xorl %r14d, %r14d
cmpq %rax, %rdx
movl 0x6c(%rsp), %r10d
jl 0x7c42d
jmp 0x7c7d7
testb $0x1, %r14b
je 0x7c7cc
movq 0x58(%rsp), %r13
jmp 0x7c7bc
movq $-0x1, %rdx
leaq 0x7e0(%rsp), %r13
movq %r13, %rsi
movq %rdx, %r15
callq 0x43c0
xorl %r14d, %r14d
jmp 0x7c7d7
xorl %r14d, %r14d
movq %rdx, %r15
movq 0x58(%rsp), %r13
leaq 0x7e0(%rsp), %rax
cmpq %rax, %r13
je 0x7c7ec
movq %r13, %rdi
callq 0x45c0
testb %r14b, %r14b
movq 0x10(%rsp), %r13
jne 0x7c9ef
movl %ebx, %ebp
shrl $0x4, %ebp
movl %ebx, %r14d
andl $0xf, %r14d
movq 0x78(%rsp), %r12
movq (%r12), %rdi
callq 0x45c0
movq 0x8(%rsp), %rdi
movq %rdi, (%r12)
movq %r15, 0x10(%r12)
movl %ebp, 0x18(%r12)
movl %r14d, 0x1c(%r12)
testq %rbx, %rbx
movq 0x40(%rsp), %rbp
je 0x7c871
movq 0x20(%rsp), %r12
xorl %r14d, %r14d
movq -0x10(%r12), %rsi
testq %rsi, %rsi
je 0x7c865
cmpq $0x5, %r15
jb 0x7c865
cmpq (%r12), %r15
jne 0x7c865
movq %r15, %rdx
callq 0x44d0
movq 0x8(%rsp), %rdi
testl %eax, %eax
je 0x7c8a0
incq %r14
addq $0x28, %r12
cmpq %r14, %rbx
jne 0x7c83e
movq 0x78(%rsp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
addl %r15d, %ebp
incl %ebp
movq 0x28(%rsp), %r15
incq %rbx
movslq 0x14420(%r13), %rax
shlq $0x4, %rax
cmpq %rax, %rbx
jl 0x7c2fc
jmp 0x7c8c3
movq 0x78(%rsp), %rax
movl %r14d, 0x20(%rax)
addl $0x3, %ebp
jmp 0x7c882
movb $0x1, %r14b
movq 0x18(%rsp), %r15
jmp 0x7c7d2
xorl %r14d, %r14d
jmp 0x7c7d2
leal 0xd(%rbp), %edi
callq 0x4680
testq %rax, %rax
je 0x7c9c4
movq %rbp, %rcx
movq %rax, %rbp
movq 0xa8(%rsp), %rax
movl %ecx, (%rax)
movq 0x88(%rsp), %rcx
movb %cl, (%rbp)
movb %ch, 0x1(%rbp)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x2(%rbp)
shrl $0x18, %ecx
movb %cl, 0x3(%rbp)
movq 0xb0(%rsp), %rcx
movb %cl, 0x4(%rbp)
movb %ch, 0x5(%rbp)
movl %ecx, %eax
shrl $0x10, %eax
movb %al, 0x6(%rbp)
shrl $0x18, %ecx
movb %cl, 0x7(%rbp)
movl 0x6c(%rsp), %eax
movb %al, 0x8(%rbp)
cmpl $0x0, 0x14420(%r13)
jle 0x7c9ba
movq %rbp, %r14
addq $0x9, %r14
leaq 0x40(%r13), %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %r15d, %r15d
cmpq $0x0, -0x10(%rbx)
je 0x7c981
movl -0x8(%rbx), %r12d
movl -0x4(%rbx), %ecx
movl %ecx, %edx
orb $-0x80, %dl
cmpl %eax, %r12d
movzbl %dl, %eax
cmovel %ecx, %eax
cmpl $0x0, (%rbx)
js 0x7c986
orb $0x40, %al
movb %al, (%r14)
movl (%rbx), %eax
shrl $0x4, %eax
movb %al, 0x1(%r14)
movb (%rbx), %al
andb $0xf, %al
movb %al, 0x2(%r14)
addq $0x3, %r14
jmp 0x7c9a0
movl %eax, %r12d
jmp 0x7c9a0
movb %al, (%r14)
incq %r14
movq -0x20(%rbx), %rsi
movq -0x10(%rbx), %rdx
movq %r14, %rdi
callq 0x43c0
addq -0x10(%rbx), %r14
incq %r15
movslq 0x14420(%r13), %rcx
shlq $0x4, %rcx
addq $0x28, %rbx
movl %r12d, %eax
cmpq %rcx, %r15
jl 0x7c944
movq %r13, %rdi
callq 0x7cabc
jmp 0x7c9da
movq %r13, %rdi
jmp 0x7c9d3
movq 0x10(%rsp), %rdi
jmp 0x7c9d3
movq %r12, %rdi
callq 0x7cabc
xorl %ebp, %ebp
movq %rbp, %rax
addq $0x27e8, %rsp           # imm = 0x27E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
callq 0x7cabc
movq 0x8(%rsp), %rdi
callq 0x45c0
jmp 0x7c9d8